Probably wont be much use for you as it basically just sends the axes to a set position and then sends signals to my PLC which then does the rest but here it is
Code "G53G0Y310Z-5M3S200"
While IsMoving()
Wend
If GetInput(2) Then
SetModOutput(17,1)
Sleep 1000
SetModOutput(17,0)
SetModOutPut (29,1)
Sleep 1000
SetModOutPut (29,0)
Else
SetModOutput(18,1)
Sleep 1000
SetModOutput(18,0)
SetModOutPut (29,1)
Sleep 1000
SetModOutPut (29,0)
End If
setoemdro(824,0)
Code "M5G43H0"
Hood