Fanuc / Haas (motion)
G91 G01 X25. Y0. F300Every dimension is a signed increment from where the tool is. When the incremental stretch is over you have to go back to G90 explicitly: the control will not do it for you.
We use technical and security cookies and, only if you accept, analytics with no cross-site tracking. More in the Cookie policy and Privacy policy.
We use first-party cookies and technical storage to make the site work, Google reCAPTCHA security technology and, only if you accept, Vercel analytics (no cookies, no cross-site tracking). You can accept or reject analytics; both options are equivalent and you can change your choice at any time. More info: Cookie policy, Privacy policy, Legal notice and Terms and conditions.
G91 makes every dimension measured from the current position of the tool instead of from part zero: X10. in G91 means ten millimeters past where you are, in the positive direction of the axis. It is modal and it is used in specific cases: the safe retract G91 G28 Z0., repeated patterns with K or L and geometry subprograms. Outside those, forgetting to go back to G90 is one of the commonest causes of a crash.
For reference only: syntax changes with the control, the post-processor and the machine parameters. Check the official manual and run a simulation before cutting. Legal notice.
Fanuc / Haas (motion)
G91 G01 X25. Y0. F300Every dimension is a signed increment from where the tool is. When the incremental stretch is over you have to go back to G90 explicitly: the control will not do it for you.
Fanuc / Haas (safe retract)
G91 G28 Z0.The commonest use of G91: it takes the Z axis from wherever it is up to the reference point, with no intermediate point. The same block in G90 would go through the Z0 of part zero first, in other words through the face of the part.
Siemens 840D / 828D
G91 G1 X25 F300Siemens also lets you give a single incremental dimension inside an absolute block with IC(): X=IC(25). That saves changing mode for one axis.
Heidenhain TNC (Klartext)
L IX+25 R0 F300There is no modal G91: an I in front of the axis name marks that particular dimension as incremental. Dimensions without the I stay absolute inside the same block.
| Letter | What it sets | Unit |
|---|---|---|
| X Y Z | Signed increment from the current position. The sign gives the direction, not the side of the part. | mm / in |
| Z and R in canned cycles | Under G91 the R is measured from the current position of the axis and the Z is the depth measured from the R plane, not coordinates from part zero. | mm / in |
| K / L | Canned cycle repeats, which only have any effect in incremental mode: K on Fanuc, L on Haas. Each repeat applies the X and Y increment again. | integer |
A row of five 5 mm holes spaced 25 mm apart in X, in a 14 mm plate. In absolute you would have to write all five coordinates; in incremental you program the cycle once and repeat it four more times with the 25 mm step. The holes end up at X20, X45, X70, X95 and X120.
G91 G28 Z0. | ( Z to the reference point in incremental before the change. ) |
T4 M06 | ( 5 mm drill. ) |
G90 G54 G00 X20. Y30. | ( The start point always in absolute: first hole of the row. ) |
G43 H04 Z25. M03 S2400 | ( T4 length offset and spindle on. Z25 becomes the starting position of the axis. ) |
M08 | ( Coolant on. ) |
G91 G99 G81 X0. Y0. Z-18. R-23. F180 | ( Cycle in incremental: R-23 drops 23 mm from Z25 down to the Z2 coordinate, and Z-18 is the depth measured from the R plane (Z2 to Z-16). X0 Y0 drills at the current position without moving. ) |
X25. K4 | ( Repeats the cycle four more times, stepping 25 mm in X each time. On Haas the repeat is written L4. In G90 this block would drill the same hole in the same place. ) |
G80 G90 G00 Z25. M09 | ( Cancels the cycle and goes back to absolute in the same block. Leaving G91 active here is the classic cause of an unexpected move in the next block. ) |
G91 G28 Z0. M05 | ( Safe retract in incremental and spindle stop. ) |
G90 | ( Leaves the control in absolute. ) |
M30 | ( End of program. ) |
In three specific situations. First, the safe retract: G91 G28 Z0. takes the axis up from wherever it is without going through part zero. Second, repeated patterns: a row or a grid of holes is written once and repeated with K or L, which only work in incremental. Third, geometry subprograms reused at several positions: the subprogram carries the shape in incremental and the main program places it by positioning in absolute before each call. For everything else, absolute is safer and easier to debug.
In a canned cycle the change of mode changes the meaning of the R and of the Z: in incremental the R is measured from the current position of the axis and the Z is the depth from the R plane. So when you take a cycle from absolute to incremental you have to recalculate both, not just copy them. The shop rule that saves grief is to always close the incremental stretch with G80 G90 in the same block, and never leave a G91 active when you reach a tool change, the end of the program or a jump to a subprogram.
It wins on short, reusable programs: a twenty hole pattern fits in two blocks and the same subprogram serves four different positions. It loses on traceability, because to know where the tool is you have to add up every block before it, and on accumulated accuracy, because if the print is dimensioned in absolute and you chain rounded increments, the last point carries the sum of all the rounding. That is why prints dimensioned from a common origin are programmed in absolute and only the repeats are done in incremental.
Because in G91 the intermediate point is the current position and the machine goes straight up to the reference point. In G90 that Z0. is the Z0 coordinate of part zero, in other words the face of the part: the tool comes down to it before going up. It is one of the commonest crashes on a mill.
For repeated patterns with K or L, for reusable geometry subprograms and for retract moves. For the rest of the program, absolute is safer because an error in one block does not drag into the next ones.
Yes, if the increments come from subtracting rounded dimensions off a print dimensioned in absolute. The control calculates with more decimals than you write, so the error is in the program, not in the machine. The fix is to program in absolute whatever the print dimensions in absolute.
On Siemens with IC() and on Heidenhain with the I in front of the axis, yes, axis by axis. On Fanuc and Haas no: you have to change mode with G91 and come back with G90, and that round trip is best done in the same block as the rest of the cancellation.
No. The origin is still whatever G54 or whichever offset is active says: the only thing that changes is what the dimensions of each block are measured from. That said, a G10 L2 written with G91 active adds values to the offset instead of replacing them, and that does shift the zero.
CNC IDE: editing with G/M tooltips, line inspector, conversion between controls and 2D/3D toolpath.
CNC Alarms and Solutions Guide. Enter the error code or symptom to find the cause and how to repair it at the machine.
Estimate CNC turning and milling cycle time from G-code. Calculate parts per hour with a breakdown of cutting, rapids, canned cycles and tool changes.