Macro for custom M codes :
M221
DeActivateSignal(output2)
M321
ActivateSignal(output2)
This is the user button to do the same:
If Not(GetOEMLED(1801)) Then
SetUserLabel(23,"Z1 On")
SetUserLED(1801,1)'USER LED 1 ON
code"M221"
Else
SetUserLabel(23,"Z1 Off")
SetUserLED(1801,0)'USER LED 1 OFF
code"M321"
End If
I need to add the ability to change status of user buttons to match M code status. Also should I use the macro Refz [DoOembutton (1010) for the actual refZ instead of G28.1