-Shenzhen Guanhong Automation Co.,Ltd.-
SZGH-CNC1000MDb Series
- 111 -
Chapter 4 M INSTRCUTIONS
4.1 M Function (Auxiliary Function)
M instruction consists of instruction address M and its following 1~2 bit digits, used for
controlling the flow of executed program or outputting M instructions to PLC.
M
Instruction value(the leading zero can be omitted)
Instruction address
When address M followed by a number is specified, a code signal and strobe signal are
transmitted. These signals are used for turning on/off the power to the machine.
In general, only one M code is valid in a block but up to three M codes can be specified in a
block (although some machines may not allow that). The correspondence between M codes and
functions is up to the machine tool builder.
All M codes are processed in the machine except for M97 M98, M99,M codes for calling a
subprogram , and M codes for calling a custom macro. Refer to the appropriate manual issued by
the machine tool builder.
The following M codes have special meanings.
M00, M01, M02, M30, M97, M98, M99 must not be specified together with another M code.
Some M codes other than M00, M01, M02, M30, M97, M98 and M99 cannot be specified
together with other M codes; each of those M codes must be specified in a single block.
4.1.1 Program Stop(M00)
Automatic operation is stopped after a block containing M00 is executed.
When the program is stopped, all existing modal information remains unchanged. The
automatic operation can be restarted by actuating the cycle operation. This differs with the machine
tool builder.
4.1.2 Optional Stop (M01)
Similarly to M00, automatic operation is stopped after a block containing M01 is executed.
This code is only effective and program stop when input point M22(PIN5 of CN10 Plug) is valid
4.1.3 End of Program (M02,M30)
This indicates the end of the main program.Automatic operation is stopped and the CNC unit is
reset.
4.1.4 Cycle of Program (M20)
Run program cycle , cycle time is set by P18 in User parameter.
4.1.5 Account of Workpiece(M87)
N
umber of workpieces will add one automatically as P10=0 in Other parameter.
4.1.6 Unconditional Jump (M97)
M97 P_ , jump to specified block number that specified by P.P4 said entrance line number with
4 field numbers specified program transfer main program.
Example: M97 P0120 , when execute this code, CNC will jump to “N0120” block and run.
Содержание SZGH-CNC1000MDb Series
Страница 220: ...Shenzhen Guanhong Automation Co Ltd SZGH CNC1000MDb Series 207 Appendix I Wiring Diagram of CN3 Plug...
Страница 221: ...Shenzhen Guanhong Automation Co Ltd SZGH CNC1000MDb Series 208 Appendix II Wiring Diagram of CN10 Plug...
Страница 222: ...Shenzhen Guanhong Automation Co Ltd SZGH CNC1000MDb Series 209 Appendix III Wiring Diagram of CN4 Plug...