Hi,
try pasting this code into your script:
local inst=mc.mcGetInstance()
local signalHandle=mc.mcSignalGetHandle(inst,mc.ISIG_INPUT4)
local wait= mc.mcSignalGetState(signalHandle)
if wait==0 then
mc.mcCntlFeedHold(inst)
else
mc.mcCntlCycleStart(inst)
end
Note that this code is pretty crude. If your input signal is low AT ANY TIME it will stop whatever job is running
and if it goes high the job, or any job loaded will start whether you wanted it to or not.
Is this want you want?. If so then you can put it into the PLC script and try it. If it is too crude then you need to think about
'under what circumstances do I want the job to pause while waiting for this signal'
Craig