Programming instructions

ADT-CNC4620 Programming Manual
- 9 -
2. M S F T Instruction
2.1. Auxiliary function (M code)
M instruction consists of instruction address M and later 1~2 digits, and is used to control the flow
of executing program or output signals to machine tool.
Instruction value (00~99, leading value can be omitted)
Instruction address
One block only contains one valid M instruction. If a block has two or more M instructions, the
last M instruction is valid.
If M instruction and the instruction word that executes moving function are in the same block, the
sequence follows:
If M instruction is M00, M30, M98 and M99, execute M instruction after moving;
When M instruction outputs signal to the machine tool, execute M instruction while moving.
M Instructions List
Instruction Function Remark
M00 Program pauses
M30 Program ends
M98 Subroutine calling
M99 Return from subroutine
State isn’t retained
M03 Principal axis forward rotation
M04 Principal axis reverse rotation
*M05 Principal axis stop
Functions are interlocked, and state is
maintained
M08 Coolant on
*M09 Coolant off
Functions are interlocked, and state is
maintained
M10 Tailstock forward
M11 Tailstock backward
Functions are interlocked, and state is
maintained
M12 Chuck clamped
M13 Chuck released
Functions are interlocked, and state is
maintained
M32 Lubricant on
*M33 Lubricant off
Functions are interlocked, and state is
maintained