shansen Posted July 14, 2014 Share Posted July 14, 2014 Is there anyway to check if an Mvar isn't defined within a PLC? Something like: IF(M100-> = *) P100=1 ELSE P100=0 ENDIF Link to comment Share on other sites More sharing options...
shansen Posted July 14, 2014 Author Share Posted July 14, 2014 OK, I did end up finding a solution, although I'd still like to hear if anyone has a better way of doing this. To check if an Mvar is defined, I defined a 2nd Mvar that points to the first Mvars' pointer location (see Turbo software reference manual, memory map section). The Turbo PMAC2 Mvars pointers are located at L:$4000-L:$5FFF. M101->X:$4064,24 ;(point to M100 pointer location) IF(M101>0) P100=1 ELSE P100=0 ENDIF ;(check if M100 is defined or not) Link to comment Share on other sites More sharing options...
steve.milici Posted July 14, 2014 Share Posted July 14, 2014 This is the best way. Link to comment Share on other sites More sharing options...
Recommended Posts