Search code examples
okuma

Program status via Thinc API


How can I get program status such as interrupted, stopped, in progress, waiting, aborted and so on via Thinc API? There is nothing similar to it in CProgram of Okuma.CLDATAPI.DataAPI and Okuma.CMDATAPI.DataAPI.


Solution

  • On a Lathe API >= 1.9.1 or on a mill API >= 1.12.1 (I think) you can use the CMachine.GetNCStatus function

    Public Function GetNCStatus(ByVal enNCStatus As NCStatusEnum) As OnOffStateEnum
    

    Pass in the status you wish to check and this function will return to you a Boolean err I mean an On or Off from the OnOffStateEnum

    The NCStatusEnum members:

    • Program Stop: M00, M01
    • STM: Waiting on M-code, spindle acceleration, or Tool Change
    • SlideHold: Slide hold button was pushed
    • Limit: X,Z axes are at their variable limit position
    • Alarm: Indicates that machine is an alarm condition
    • Run: The machine is actually operating in the Automatic or MDI mode.

    In earlier versions of the API some of the same states could be tested by checking I/O bits.