Hello Damir,
if the function should only be enabled between M3 and M5 call in
g-code we can use them to enable like this:
add this conde in M3
setUserLed(2100,1)
add this conde in M5
setUserLed(2100,0)
and this in macropump
If (GetUserLed(2100)=True) and (GetLed(4)=True) Then
If Not IsActive(Input1) Then
DoSpinCW()
End if
End If
If IsActive(Input1) Then
DoSpinStop()
End if
the only thing i see, that nothing resets the UserLed if
you cancle a program.
but give it a try.
Thomas