bradp Posted October 18, 2012 Share Posted October 18, 2012 The attached doc file is a better formatted presentation of the data below. Interpretation of a plc and a motion programs status word is as below. To check status for a PLC program please check for Plc[n].LData.Status word. To check status for a motion program, please check the status for the coordinate system in which the motion program is running. Ex - Coord[n].LData.Status Combination of Higher 4 bits and Lower 4 bits of LData.Status word defines the status for a plc or a motion program as below. Higher 4 bits Lower 4 Bits 0 Not active 0 Running 2 Active 1 & Higher 4 Bits value is 2 Stopped on a Quit, Pause or Step 3 Single Step 1 & Higher Bits value is 0 PROG/PLC was aborted or disabled 2 Stopped on a Software Limit 3 Stopped on a Breakpoint 4 Stopped on an Illegal script operation code 5 Stopped on a Stack overflow 6 Stopped on a L-variable stack overflow 7 Stopped on a Called and non-existent program 8 Stopped on a Not assigned 9 Stopped on a Inverse Kinematics Fault (No equations defined) 10,11,12,13,14,15 Not assigned For example : Higher 4 bits = 0 and Lower 4 bits = 2. The status will be Not Active, Stopped on a Software Limit Higher 4 bits = 2 and Lower 4 bits = 0. The status will be Active, Running This is how we fill up the Programs list in Task Manager. 1. For all coordinates we get the following information. Coord.Program.Size Coord.Program.Number Coord.NumMotors Coord.ldata.Status Coord.Inverse.Size Coord.Forward.Size 2. For all motion programs we get the following information. Prog.Number Prog.Size 3. We loop through all Motion Programs. If Coord.Program.Number matches Prog.Number then we know that Prog.Numer is running in Coord coordinate system. In this case we can retrieve some other information from Coord like Type -> ‘Kinematic’ If( Coord.Inverse.Size != 0 or Coord.Forward.Size != 0 ) Else ‘Program’ Name -> From our userprog database based on Coord.Program.Number Coord -> Coord Size -> Coord.Program.Size Status -> Coord.ldata.Status. I will forward you anotehr email regarding how to interpret the Status word. Number of Motors -> Coord.NumMotorsInterpretation of a plc and a motion programs status word is as below.pdf Link to comment Share on other sites More sharing options...
devguru Posted January 13, 2014 Share Posted January 13, 2014 I am checking the status of a motion program with: Coord[1].LData.Status and I receive the following states: coord[1].Ldata.Status = 0x60, 0110 0000 coord[1].Ldata.Status = 0x63, 0110 0011 coord[1].Ldata.Status = 0x01, 0000 0001 I am interpreting that the first set of bits are the "higher" bits and the second set of bits are the "lower bits." For the value of 0x01 I understand this to mean the PLC is Not Active and the PROG/PLC was aborted or disabled. For 0x60, this value is achieved during a successful run of a motion program. The lower bits indicate that the motion program is running. But I do not know what the higher bits indicate as the table in the attached document only goes up to a value of 3. I am seeing a value of 6 for which I do not know what this corresponds to. The value 0x63 is where the motion program faults or stops running and from the lower bit values it looks like it is stopping on a Breakpoint. Are there additional states or definitions for the higher order bits? Link to comment Share on other sites More sharing options...
Recommended Posts