Programming Chapter Three Commands and Functions
114
3.2.2 M02
—End of Program
Command format
:
M02
End programs and return to the first block to wait.
3.2.3 M20
—
End of Program and Machining Cycle
Command format
:
M20
End programs and return to the first block to execute repeatedly with M 20, which is used for
checking the system or the machine. When using M 20 in G50 program, the coordinates must be
the same those before and behind the program runs, otherwise the cycle function cannot be
executed completely. Without G50, the coordinates cannot be the same those before and behind
the program runs.
3.2.4 M30
—
End of Program
,
Spindle Stop and Cooling OFF
Command format
:
M30
End programs, stop the spindle and the cooling OFF, and return to the first block to wait.
3.2.5 M03 M04 M05
—
Spindle Control
Command format
:
M03
M04
M05
M03: spindle rotation( CW)
M04: spindle rotation(CCW)
M05: spindle stop
M03, M04, M05 can be set to the pulse or the level control mode by P12 Bit2.
Bit2=0: level mode. When M05 is valid, its corresponding output point outputs the level signal.
Bit2
=
1: pulse mode. The duration is set by P15 and the corresponding output point of M05
outputs the pulse signal.
Spindle brake control
:
P12 Bit3=1: after ending M05, dwell for 0.2s to transmit the spindle braking signal, and then
delay the time defined by P16 to cancel the spindle braking signal.
P12 Bit3=0: do not output the spindle braking signal after transmitting M05.
M05
0.2S
P15
P16
3.2.6 M08 M09
—
Cooling Control
Command format
:
M08
M09
M08: cooling ON.
M09: cooling OFF.