The 64 general purpose output signals can be controlled from gcode using the mcodes M220 and M221. The gcode
can wait on one of the 64 general purpose inputs to be a certain state with mcode M222. For more information, refer
to the
Mach4 Advanced M-Code Reference
manual.
The following instructions are for configuring a servo spindle as the main spindle on the machine. Some machines, such
as centerless grinders, may be using a servo spindle as an auxiliary spindle or subspindle. See
for
more information.
Using Signals In Gcode
M220 S2 D2000 (Turn on Output #2 and wait 2000ms)
M222 S1 T5 (Wait up to 5 seconds for Input #1 to turn on)
M221 S2 D1000 (Turn off Output #2 and wait 1000ms)
M222 S1 T10 I1 (Wait up to 10 seconds for Input #1 to turn off)
Spindle Configuration
Servo Spindle