G-codes are divided into 2 classes: modal commands (G-codes) and non-modal commands (G-codes). The difference lies in the ability to remain in the memory of the CNC system.
Modeless G-codes are valid only in the frame in which they are located. Modal G codes can be stored in the NC system for a long time, until they are canceled by another code. Also, modal G-codes, depending on their functional purpose, are divided into groups and their corresponding G-codes:
|G-code group name||List of commands (G-codes)|
|Motion control||G00, G01, G02, G03|
|Setting the unit of measurement of the source data||G20, G21|
|Setting work coordinate systems||G54-G59|
|Tool length compensation||G43, G44, G49|
|Tool radius compensation||G40, G41, G42|
|Coordinate assignment||G90, G91|
|Setting the active working plane for machining||G17, G18, G19|
|Return in continuous processing cycles||G98, G99|
It is not possible to use two modal G codes at the same time. For example, G-54 and G-56 cannot be active at the same time, as they are in the same group. One of these codes will necessarily cancel the action of the other.
Another feature of modal codes is that it is not necessary to enter the active code in subsequent frames, i.e. specifying a command once per frame, there is no need to specify this command in each subsequent frame of the control program.
For example: Due to the fact that the G01 modal command, the program can be written without duplicating it in subsequent frames. The G01 command will be valid until it is canceled by the G00 team from the same functional group.