daves Posted July 22, 2014 Share Posted July 22, 2014 What can change a PLC's coordinate system? I have a 'command processor' PLC running and reacting to commands (from PMAC or a connected PC). There are many commands handled but I just experienced a problem where the DISABLE command did not kill the motors (dangerous) because PLC10 was using CS0 even though it had been set to CS1 earlier: open plc 10 switch (pmCmnd) { case 0: break; case DISABLECMND: ddisable; break; case COORD1CMND: Plc[10].Ldata.Coord = 1; break; } pmCmnd = 0; close The COORD1CMND is issued at the start of the session and non of my code explicitly alters the CS after that. When I discovered the motors were still closed loop issuing COORD1CMND again and then DISABLECMND worked as expected. I can get around this by always setting the CS before each command (we only have one anyway) or should I do &*ddisable? in script? Cheers Dave Link to comment Share on other sites More sharing options...
curtwilson Posted July 22, 2014 Share Posted July 22, 2014 Something has to be changing Plc[10].Ldata.Coord. You can monitor it externally using the full name. Even if you cannot trace it, it takes very little time to set it each time you want to issue a command. Link to comment Share on other sites More sharing options...
Recommended Posts