Here's what I'm trying to do...
CurrentPosX = mc.mcCntlGetDistToGo(inst, 0)
CurrentPosY = mc.mcCntlGetDistToGo(inst, 1)
if CurrentPosX > LastPosX and CurrentPosY > LastPosY then
--Do something
end
LastPosX = CurrentPosX
LastPosY = CurrentPosY
So the question is...If I put global variables LastPosX and LastPosY in the screen load script, will they be visible to the PLC script? Or...Will LastPosX and LastPosY retain their values from scan to scan? For instance, if I set LastPosX to 4.123, will it be nil on the next PLC scan or will it still be 4.123.
Thanks