Modal G-Codes – Learn G Code Programming

Modal G-Codes

A modal G-code is a G-code that remains effective in cnc program until another G-code in the same group is encountered (programmed).

Every G code has a Group associated with it, only one G code of associated Group can be active at a time in cnc program.

As
G00, G01, G02, G03   Are from Same group
G43, G49                    Same group
G54~G59                    Same group
G98~G99                    Same group

Learn G Code Programming

Learn G Code Programming

Modal G-Codes Example

N10 G0 X30 Y5          (G0 is effective in this block)
N20 X50 Y10            (No G-code specified, G0 remains effective)
N30 G1 X30 F200        (G1 is effective from this block, NOT G0)

As G0, G1, G2, G3 are from same group so in above cnc program example in
N10 G0 is active,
although in N20 no other G-code of that group is given so G0 remains active
but in N30 G1 is programmed so this cancels G0