Miscellaneous Functions
The miscellaneous functions or M words refer generally to the actions carried on the machine tool. Though M code can be placed anywhere in the block, it is generally suggested to place it at the end of block. The following are some of the more commonly used M codes, the use of which is similar to that of the machining centres.
M00-Program Stop
This command is used to provide a pause in the program. It stops the spindle and coolant flow. After M00 is executed, then it is necessary to press the Start on the control panel to continue with the program.
M01-Optional Stop
This is similar to M01 command but its operation depends on the Optional Stop push button on the control panel. If the optional stop has been activated before the block containing the M01 is read by the control then it functions similar to M00 otherwise it will be ignored.
M02-End of Program
This is the last block in a program.
M03-Spindle Start in Clockwise
The M03 command causes the spindle to run in the clockwise direction at the programmed spindle speed.
M04-Spindle Start in Counter Clockwise
The M04 command causes the spindle to run in the counter clockwise direction at the programmed spindle speed.
M05-Spindle Stop
The M05 command causes the spindle to stop and turns the coolant off.
M08-Coolant ON
M08 turns the coolant pump ON.
M09-Coolant OFF
M09 turns the coolant pump OFF.
M13-Main Spindle Clockwise/Coolant ON
This is a combination of M03 and M08.
M14-Main Spindle Counter Clockwise/Coolant ON
This is a combination of M04 and M08.
M30-End of Program and Rewind
M30 indicates the end of a part program and should be programmed in the last block.
Only one M code is allowed to be programmed in a given block.