vb.netapifunctionenumsokuma

Invalid sub system


My application used to work fine until I updated the API version I was using in my references.
Specifically I went from CLDATAPI.dll version 2.3.0.0 to 2.5.0.0

Now I am getting the following error:
E01000261122 Failed to get program running state - Invalid sub system for this operation

I've written an application that uses several API functions including this one:

    Private Function GetCycleComplete() As Boolean 
        Try
        m_blnCycleComplete = m_Program.CycleComplete(MachineSideEnum.LeftSide)
        Return m_blnCycleComplete
        Catch ex As Exception
            Throw 
        End Try
    End Function

The machine I'm using for testing is an LT-2000-MY running with OSP-P300L.
I realize that my problem must be with the "MachineSideEnum.LeftSide" sub system.


Solution

  • For consistency between 2 sides machine and single side machine, R represents right side of machine on 2 sides machine and also the default side for single side machine.

    L represents left side of 2 sides machine and it is not available on single side machine.

    The spec of API is changed for this purpose.

    By default every object is created with NC_AL which represents data related to upper left spindle and A turret and is always available to all Lathe machine models. NC_RUN will provide data on current selection of spindle or turret.

    It is necessary to set correct sub system to access to certain data area related to spindle and turret or side of machine data if applicable.