Miscellaneous Function M
Miscellaneous function is composed of address symbol M and subsequent number (one to three digits). It is mainly used to control the running of machining program and start/stop of miscellaneous functions.
Function M has non-modal and modal forms:
Non-modal function M
It is effective only in the program block containing it.
Modal function M
A group of function M that can be mutually canceled; an modal function M remains effective until another function M in the same group appears to cancel it.
M commands and meanings are shown in the table below.
M Command | Meaning |
---|---|
M00 | Compulsory Program Stop |
M01 | Optional Program Stop |
M02 | End of the Program |
M03 | Spindle On (CW rotation) |
M04 | Spindle On (CCW rotation) |
M05 | Spindle Off |
M08 | Coolant On |
M09 | Coolant Off |
M10 | Invalid Command |
M11 | Invalid Command |
M17 | Subprogram Return |
M30 | End of Program, and Return to Program Top |
M98 | Subprogram Call |
M99 | End of Subprogram, and Return to the Beginning of Main Program for Continuous Execution |
M801 | String Transmission between Modules |
M802 | Integer Transmission between Modules |
M901 | Direct Controling over Output Port |
M902 | Direct Setting Reference Point |
M903 | Change Current Tool No.Change current tool No. |