this is some code to put in your Macro pump, or, in your flash frame scan.
since macropump and flash frames scan at 10 times (12 on ave. for flash) per second, this allows an input to only to only Push the buton once per push (since the the button would be scanned faster than most humans can remove there finger.
x=getuserdro(1000) 'each input has its on dro Input1 is a physical button
If GetInput(1) and x=0 then 'comming off the modbus but any input can be used here
SetUserDRO(1000,1) 'counter dro
DoOEMButton(*********) 'button pushed on
End If
If Not(GetInput(1)) and x>0 then
SetUserDRO(1000,0)
DoOEMButton(*********) 'button pushed again for off
End If
scott