EasyManua.ls Logo

GSK 980MDc - CHAPTER 2 MSTF CODES

GSK 980MDc
473 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER 2 MSTF CODES
13
I Programming
CHAPTER 2 MSTF CODES
2.1 M Codes (Miscellaneous Function)
The M codes are composed by code address M and 1~2 or 4 digits after the codes M is used for
controlling the program execution or outputting M code to PLC.
M □□□□
Codes value (00~99, 9000~9999,leading zero can be omitted)
Address
M98, M99 and M9000~M9999 are independently processed by CNC, and the M codes are not output to
PLC.
The function of M29 is fixed, namely, to output M codes to PLC.
The M02 and M30 are defined as program END codes by NC, meanwhile it also outputs M codes to
PLC for the I/O control (spindle OFF, cooling OFF control etc.).
The PLC program can not change the meaning of the above-mentioned codes when the M98, M99
and M9000~M9999 are regarded as program CALL codes and the M02 and M30 are regarded as
program END codes. The codes of other M codes are all output to PLC program for specifying the code
function; please refer to the manual issued by machine tool manufacturer.
One block only has one M code. The CNC alarm occurs when two or more M codes are existed in one
block.
Table 2-1 M code table for program execution
Codes Functions
M02
End-of-Run
M29
Rigid tapping designation
M30
End-of-Run
M98
Subprogram call
M99
Return from the subprogram; the program will be repeatedl
y
executed. If the code M99 is used for main program ending (namel
y
the current program is not called by other programs).
M9000~M9999
Call macro program (Program No. is larger than 9000)
2.1.1 End of Program (M02)
Format: M02
Function: The M02 code is executed in the Auto mode. The automatic run is ended after the other codes of
current block are executed; the cursor stops in the block in which the M02 is located and does not
return to the head of the program. If the program is to be executed again, the cursor should return
to the beginning of the program.
Besides the above-mentioned functions processed by CNC, the functions of code M02 also can be
defined by the PLC ladder diagram. The function defined by standard ladder diagram can be: the current
input state of CNC is not change after the code M02 is executed.
2.1.2 Rigid Tapping Designation M29
Format:M29
Function:In auto mode, after the execution of M29, the G74, G84 that followed is processed as rigid tapping
codes.

Table of Contents