Chapter 7
126
UM10350_PCNC770_Manual_0916A
Programming
M-code Meaning
M00 Program stop
M01 Optional program stop
M02 Program end
M03/04 Rotate spindle clockwise/counter clockwise
M05 Stop spindle rotation
M07 or M08 Coolant on
M09 All coolant off
M30 Program end and rewind
M48 Enable speed and feed override
M49 Disable speed and feed override
M64* Activate output relays
M65* Deactivate output relays
M66* Wait on an input
M98 Call subroutine
M99 Return from subroutine/repeat
M100 to M199 Operator dened M-codes
*NOTE: These commands are only useful when the mill is equipped with the USB I/O Module (PN 32616).
7.7.1 Program Stop and Program End – M00, M01, M02 and M30
To stop a running program temporarily, regardless of the oponal stop switch seng, program: M00
To stop a running program temporarily, but only if the oponal stop switch is on, program: M01
It is OK to program M00 and M01 in MDI mode, but the eect probably won’t be noceable because
normal behavior in MDI mode is to stop aer each line of input.
If a program is stopped by an M00, M01, pressing the Cycle Start buon restarts the program at the
following line of the G-code program.
To end a program, program: M02 or M30. M02 leaves the next line to be executed as the M02 line.
M30 rewinds the G-code le. These commands can have the following eects depending on the
opons chosen on the Congure>Logic dialog:
• Axis osets are set to zero (like G92.2) and origin osets are set to the default (like G54)
• Selected plane is set to XY (like G17)
• Distance mode is set to absolute (like G90)
• Feed rate mode is set to units per minute mode (like G94)
• Feed and speed overrides are set to on (like M48)
• Cuer Compensaon is turned o (like G40)
• The spindle is stopped (like M05)