214
M CODES
96-8000
June 1999
M19 Orient Spindle
The M19 code is used to orient the spindle to a fixed position. The spindle is oriented electronically on ma-
chines with a Vector drive. Machines without a vector drive the spindle is oriented with a shot pin. A P value can
be added that will cause the spindle to be oriented to a particular angle (in degrees). For example, M19 P270
will orient the spindle to 270 degrees. An R value will recognize up to four places to the right of the decimal
point. An M19 R123.4567 will position the spindle to the angle specified by the R value.
M21-M24 Optional User M
The M21 through M24 codes are optional for user interfaces. They will activate one of relays 25 through 28, wait
for the M-fin signal, release the relay, and wait for the M-fin signal to cease. The RESET button will terminate
any operation that is hung-up waiting for M-fin. When Through the Spindle Coolant is enabled, M24 is disabled.
When the M-Code Relay Board is installed and the Parameter 209 bit (MCD RLY BRD) is set to 1, M21-M28
become available on a secondary board.
M30 Prog End and Rewind
The M30 code is used to stop a program. It also stops the spindle and turns off the coolant. The program
pointer will be reset to the first block of the program and stop. The parts counters displayed on the Current
Commands display are also incremented. M30 will also cancel tool length offsets. When the Through the
Spindle Coolant (TSC) option is ON, M30 will shut it OFF, and then perform an M30 operation.
M31 Chip Conveyor Forward
M31 starts the chip conveyor motor in the forward direction. The forward direction is defined as the direction
that the conveyor must move to transport chips out of the work cell. The conveyor will not turn if the door is
open. This may be overridden by setting bit 17 of parameter 209 (CNVY DR OVRD).
M32 Chip Conveyor Reverse
M32 starts the chip conveyor motor in the reverse direction. The reverse direction is defined as the direction
opposite of forward. The conveyor will not turn if the door is open. This may be overridden by setting bit 17 of
parameter 209 (CNVY DR OVRD).
M33 Chip Conveyor Stop
M33 Stops Conveyor motion.
M34 Increment Coolant Spigot Position
M34 Increments the current spigot position one place. Incrementing the spigot position causes the spigot to
advance one place from the home position. The home position is designated as zero. If the current home
position is designated as 5 and M34 is executed, then the current spigot position will advance to position 6.
The spigot home places the spigot at the most positive Z axis location the spigot can attain. Incrementing the
spigot then lowers the coolant stream direction.