上海维宏电子科技股份有限公司
Weihong Electronic Technology Co., Ltd.
8 Specialized, Concentrated, Focused
compensation register. Although T command is a non-modal instruction, the value of tool
compensation invoked is effective until a new value is invoked for the next tool change.
4.2 Miscellaneous Function M Code
Miscellaneous function is composed of address word M and its subsequent number of one to
three digits. It is mainly used to control the running of machining file and on/off of machine
miscellaneous functions.
M function has non-modal and modal forms:
Non-modal M function: it is effective only in the program block containing it.
Modal M function: a group of M functions that can be mutually cancelled; an M function remains in
effect until another M function in the same group appears to cancel it.
Form 4-1 Miscellaneous Function M Code
End of program, and return to program top
Spindle on (CCW rotation)
End of subprogram, and return to the
beginning of main program for continuous
execution
String info transmission between modules
Automatic tool change
(ATC)
Integer info transmission between modules
Directly control output port
4.3 Preparatory Function G Code
Preparatory function G code is composed of address word G and its subsequent 1-3 digits. It is
used to specify machining operations, such as the moving track of tool relative to workpiece, machine
coordinate system, coordinate plane, tool compensation, coordinate offset, subprogram call, dwell,
and so on.
G function has two forms, which are non-modal and modal G function:
Non-modal G function: only effective in the specified program block, and cancelled at the end of
program block.