Meaning
M: Address for the programming of the M functions.
<address extension>: The extended address notation applies for some M functions (e.g.
specification of the spindle number for spindle functions).
<value>: Assignment is made to a certain machine function through the value
assignment (M function number).
Type: INT
Range of values: 0 ... 2147483647 (max. INT value)
Predefined M functions
Certain important M functions for program execution are supplied as standard with the control:
M function Meaning
M0* Programmed stop
M1* Optional stop
M2* End of program, main program (as M30)
M3 Spindle clockwise
M4 Spindle counter-clockwise
M5 Spindle stop
M6 Tool change (default setting)
M17* End of subprogram
M19 Spindle positioning
M30* End of program, main program (as M2)
M40 Automatic gear change
M41 Gear stage 1
M42 Gear stage 2
M43 Gear stage 3
M44 Gear stage 4
M45 Gear stage 5
M70 Spindle is switched to axis mode
Note
Extended address notation cannot be used for the functions marked with *.
The functions M0, M1, M2, M17 and M30 are always triggered after the traversing movement.
Fundamentals
2.13 Auxiliary function outputs
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 345