G-code
Supported G-code
1min
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 linear motion) docid\ smeipmfnlzqwnk8pfsszc rapid positioning g1 (linear motion feed at feed rate) docid\ riq0kxply7lfjpieik24b linear interpolation g2, g3 (arc at linear feed) docid\ dpeeyjkcmm8ghofgpx91b circular/helical interpolation (clockwise) g2, g3 (arc at linear feed) docid\ dpeeyjkcmm8ghofgpx91b circular/helical interpolation (counterclockwise) g4 (dwell) docid\ g jgi faouvo1tqr5no78 dwell g10 (set coordinate system data) docid\ b9lkozr8vyiim7e85u0x3 coordinate system origin setting g17, g18, g19 (plane selection) docid\ uo pghd6gwtj4p9xj2nzp xy plane selection g17, g18, g19 (plane selection) docid\ uo pghd6gwtj4p9xj2nzp xz plane selection g17, g18, g19 (plane selection) docid\ uo pghd6gwtj4p9xj2nzp yz plane selection g20, g21, g70, g71 (length units) docid\ tmfh7vgzkxlcgky5dalrg imperial system selection g20, g21, g70, g71 (length units) docid\ tmfh7vgzkxlcgky5dalrg millimeter system selection g28, g30 (return to home) docid\ hiqpvg7odggc7wqsv ank move to park position 1, setup on the variable page g28, g30 (return to home) docid\ hiqpvg7odggc7wqsv ank move to park position 2, setup on the variable page g33, g33 1 (spindle synchronized motion) docid\ fwbx0fgep7fioiezuhpa5 lathe, motion synchronized to the spindle g38 2 (straight probe) docid\ f kbf l0l8hsyegslp9xs straight probe g40, g41, g41 1, g42, g42 1 (cutter radius compensation) docid\ fyqhunsflfsdbpenqykqj cancel cutter radius compensation g40, g41, g41 1, g42, g42 1 (cutter radius compensation) docid\ fyqhunsflfsdbpenqykqj start cutter radius compensation left g40, g41, g41 1, g42, g42 1 (cutter radius compensation) docid\ fyqhunsflfsdbpenqykqj start cutter radius compensation right g43, g43 1, g49 (tool length offset) docid\ dcuuepsg6yte sd5bbvdh tool length offset (plus), tool x offset for lathe g43, g43 1, g49 (tool length offset) docid\ dcuuepsg6yte sd5bbvdh cancel tool length offset g53 (move in absolute coordinates) docid\ lcnwmz2i2ii08f90obal motion in machine coordinate system g54 g59 3 (select coordinate system) docid\ bax8uyfaimzylpap9bpj3 use preset work coordinate system 1 g54 g59 3 (select coordinate system) docid\ bax8uyfaimzylpap9bpj3 use preset work coordinate system 2 g54 g59 3 (select coordinate system) docid\ bax8uyfaimzylpap9bpj3 use preset work coordinate system 3 g54 g59 3 (select coordinate system) docid\ bax8uyfaimzylpap9bpj3 use preset work coordinate system 4 g54 g59 3 (select coordinate system) docid\ bax8uyfaimzylpap9bpj3 use preset work coordinate system 5 g54 g59 3 (select coordinate system) docid\ bax8uyfaimzylpap9bpj3 use preset work coordinate system 6 g54 g59 3 (select coordinate system) docid\ bax8uyfaimzylpap9bpj3 use preset work coordinate system 7 g54 g59 3 (select coordinate system) docid\ bax8uyfaimzylpap9bpj3 use preset work coordinate system 8 g54 g59 3 (select coordinate system) docid\ bax8uyfaimzylpap9bpj3 use preset work coordinate system 9 g61, g64 (path control mode and look ahead feed) docid 2bjzdn24vlty2jwzo txw set path control mode exact path g61, g64 (path control mode and look ahead feed) docid 2bjzdn24vlty2jwzo txw set path control mode exact stop g61, g64 (path control mode and look ahead feed) docid 2bjzdn24vlty2jwzo txw set path control mode continuous g68 (coordinate system rotation) docid\ vpyib1fwdn7bzilxiurb6 xy rotation g76 (threading lathe) docid\ d1pna2zyfwitu3zqndh54 lathe, threading g80 (cancel modal motion) docid fsuesglv1pm3hkfv84fl cancel motion mode (including any canned cycle) g81 g89 (canned cycles) docid\ bmnlfqh73fioeamgbffvk canned cycle drilling g81 g89 (canned cycles) docid\ bmnlfqh73fioeamgbffvk canned cycle drilling with dwell g81 g89 (canned cycles) docid\ bmnlfqh73fioeamgbffvk canned cycle peck drilling g81 g89 (canned cycles) docid\ bmnlfqh73fioeamgbffvk canned cycle right hand tapping g81 g89 (canned cycles) docid\ bmnlfqh73fioeamgbffvk canned cycle boring, no dwell, feed out g81 g89 (canned cycles) docid\ bmnlfqh73fioeamgbffvk canned cycle boring, spindle stop, rapid out g81 g89 (canned cycles) docid\ bmnlfqh73fioeamgbffvk canned cycle back boring g81 g89 (canned cycles) docid\ bmnlfqh73fioeamgbffvk canned cycle boring, spindle stop, manual out g81 g89 (canned cycles) docid\ bmnlfqh73fioeamgbffvk canned cycle boring, dwell, feed out g90, g91 (set distance mode) docid\ nwnlrn2wtcaf7w5zic62j absolute distance mode g90, g91 (set distance mode) docid\ nwnlrn2wtcaf7w5zic62j incremental distance mode g92, g92 1, g92 2, g92 3 (coordinate system offset) docid darrxy7xsfsm2qp6jjl offset coordinate systems and set parameters g92, g92 1, g92 2, g92 3 (coordinate system offset) docid darrxy7xsfsm2qp6jjl cancel offset coordinate systems and set parameters to zero g92, g92 1, g92 2, g92 3 (coordinate system offset) docid darrxy7xsfsm2qp6jjl cancel offset coordinate systems but do not reset parameters g92, g92 1, g92 2, g92 3 (coordinate system offset) docid darrxy7xsfsm2qp6jjl apply parameters to offset coordinate systems g93, g94, g95 (set feed rate mode) docid\ ktxmepfxifobiwmm13 uw inverse time feed rate mode g93, g94, g95 (set feed rate mode) docid\ ktxmepfxifobiwmm13 uw units per minute feed rate mode g98, g99 (set canned cycle return level) docid\ em 0wl cftu bq5 bezue initial level return in canned cycles g98, g99 (set canned cycle return level) docid\ em 0wl cftu bq5 bezue r point level return in canned cycles