# Supported G-code

G codes of the RS274/NGC language are shown on a specific page each.

The descriptions contain command prototypes, formatted as a code block.

In the command prototypes, three dots … substitute a real value. As described earlier, a real value may be (1) an explicit number, 4, for example, (2) an expression like [2+2], (3) a parameter value, #86, for example, or (4) a unary function value like acos[0].

In most cases, if axis words (any or all of X…, Y…, Z…, A…, B…, C…) are given, they specify a destination point. Axis numbers are in the currently active coordinate system unless explicitly described as being in the absolute coordinate system. Where axis words are optional, any omitted axes will have their current value. Any items in the command prototypes not explicitly described as optional are required. It is an error if a required item is omitted.

In the prototypes, the values following letters are often given as explicit numbers. Unless stated otherwise, the explicit numbers can be real values. For example, G10 L2 could equally well be written G[2*5] L[1+1]. If the value of parameter 100 were 2, G10 L#100 would also mean the same. Using real values which are not explicit numbers as just shown in the examples is rarely useful.

If L… is written in a prototype the … will often be referred to as the "L number". Similarly the … in H… may be called the "H number", and so on for any other letter.

G Code | Meaning |
---|---|

G0 | Rapid positioning |

G1 | Linear interpolation |

G2 | Circular/helical interpolation (clockwise) |

G3 | Circular/helical interpolation (counterclockwise) |

G4 | Dwell |

G10 | Coordinate system origin setting |

G17 | XY-plane selection |

G18 | XZ-plane selection |

G19 | YZ-plane selection |

G20 | Imperial system selection |

G21 | Millimeter system selection |

G28 | Move to park position 1, setup on the variable page |

G30 | Move to park position 2, setup on the variable page |

G33 | Lathe, motion synchronized to the spindle |

G38.2 | Straight probe |

G40 | Cancel cutter radius compensation |

G41 | Start cutter radius compensation left |

G42 | Start cutter radius compensation right |

G43 | Tool length offset (plus), tool X offset for lathe |

G49 | Cancel tool length offset |

G53 | Motion in machine coordinate system |

G54 | Use preset work coordinate system 1 |

G55 | Use preset work coordinate system 2 |

G56 | Use preset work coordinate system 3 |

G57 | Use preset work coordinate system 4 |

G58 | Use preset work coordinate system 5 |

G59 | Use preset work coordinate system 6 |

G59.1 | Use preset work coordinate system 7 |

G59.2 | Use preset work coordinate system 8 |

G59.3 | Use preset work coordinate system 9 |

G61 | Set path control mode: exact path |

G61.1 | Set path control mode: exact stop |

G64 | Set path control mode: continuous |

G68 | XY rotation |

G76 | Lathe, threading |

G80 | Cancel motion mode (including any canned cycle) |

G81 | Canned cycle: drilling |

G82 | Canned cycle: drilling with dwell |

G83 | Canned cycle: peck drilling |

G84 | Canned cycle: right-hand tapping |

G85 | Canned cycle: boring, no dwell, feed out |

G86 | Canned cycle: boring, spindle stop, rapid out |

G87 | Canned cycle: back boring |

G88 | Canned cycle: boring, spindle stop, manual out |

G89 | Canned cycle: boring, dwell, feed out |

G90 | Absolute distance mode |

G91 | Incremental distance mode |

G92 | Offset coordinate systems and set parameters |

G92.1 | Cancel offset coordinate systems and set parameters to zero |

G92.2 | Cancel offset coordinate systems but do not reset parameters |

G92.3 | Apply parameters to offset coordinate systems |

G93 | Inverse time feed rate mode |

G94 | Units per minute feed rate mode |

G98 | Initial level return in canned cycles |

G99 | R-point level return in canned cycles |