by cncdrive » Sat Jan 28, 2017 3:12 am
Gerry,
The exec.Switchbutton only changes the visual state of the button and the visual state change can be handled separately to let the programmers control the visual state of custom buttons based on their functions' states.
I mean for example a macro can change a custom toggle type button state to on off based on if the programmer's function could do and finish different things.
In other words it is not mandatory that a button should always change it's visual state when the button is pressed.
To switch the M1 button state you should execute the exec.Callbutton function on the button code.
You could do it in the constructor macro and then the M1 button could be switched off on startup.