Fanuc / Haas (milling)
G90 G54 G00 X100. Y50.This is the typical safety block at the start of every tool: absolute mode, work offset and positioning. Writing it in every tool keeps you from inheriting a G91 from the previous operation.
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.
G90 makes every X, Y and Z dimension measured from the active work offset (G54-G59) and not from where the tool happens to be. It is modal and it is the normal way to work on a mill, because you can copy the print dimensions straight across. Watch out on a Fanuc lathe with the A code set: there G90 is not absolute mode, it is the straight turning cycle, and absolute is told apart by using X and Z instead of U and W.
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 (milling)
G90 G54 G00 X100. Y50.This is the typical safety block at the start of every tool: absolute mode, work offset and positioning. Writing it in every tool keeps you from inheriting a G91 from the previous operation.
Fanuc (turning, A code set)
G90 X40. Z-50. F0.2Here G90 is the single pass straight turning cycle, not absolute mode. In that format, absolute is programmed with X and Z and incremental with U and W inside the same block. Do not mix the two up when converting programs.
Siemens 840D / 828D
G90 G54 G0 X100 Y50Siemens also lets you give a single absolute dimension inside an incremental block with AC(): X=AC(100). That way you do not have to change mode for one axis.
Heidenhain TNC (Klartext)
L X+100 Y+50 R0 FMAXIn Klartext dimensions are absolute by default and there is no G90 to write. An I in front of the axis (IX+10) makes that particular dimension incremental.
| Letter | What it sets | Unit |
|---|---|---|
| X Y Z | Coordinate of the destination point measured from the active work offset. Under G90 they are print dimensions; under G91 they would be increments. | mm / in |
| Z and R in canned cycles | Under G90 the Z of a canned cycle is the bottom coordinate and the R is the coordinate of the reference plane; under G91 they become distances. | mm / in |
| G90.1 / G91.1 | On the controls that support it, G90.1 makes the I, J and K arc centers absolute and G91.1 returns them to incremental, which is the normal behavior. | modal, no units |
An L-shaped slot in an aluminum plate with an 8 mm cutter. The three points of the path are dimensioned on the print from the same corner, so in absolute you copy them straight across. The comments say what each block would have to be if the same path were programmed in G91.
G21 G17 G40 G49 G80 | ( Millimeters, XY plane and a clean state. ) |
G91 G28 Z0. | ( Z to the reference point in incremental: this particular block is done in G91 on purpose. ) |
T2 M06 | ( 8 mm cutter. ) |
G90 G54 G00 X10. Y10. | ( Back to absolute and position. Under G90, X10 Y10 is a fixed point on the part; under G91 it would be 10 mm past wherever the cutter was. ) |
G43 H02 Z50. M03 S3800 | ( T2 length offset and spindle on. ) |
G00 Z2. M08 | ( Approach and coolant on. ) |
G01 Z-4. F200 | ( Goes in 4 mm below the face. In G90 it is a coordinate; in G91 it would be a 6 mm plunge from Z2. ) |
G01 X70. F450 | ( First leg of the slot out to X70. In G91 this block would be X60. ) |
Y45. | ( Second leg out to Y45. In G91 it would be Y35. ) |
X30. | ( Third leg out to X30. In G91 it would be X-40, with the sign giving the direction. ) |
G00 Z50. M09 | ( Retract and coolant off. ) |
G91 G28 Z0. M05 | ( Here incremental is what you want: it goes up from wherever it is to the reference point. Under G90 the block would go through the part Z0 first. ) |
G90 | ( Puts the control back in absolute before the end, so no later block inherits the G91. ) |
M30 | ( End of program. Many controls restore the default modals on M30, but that depends on machine parameters. ) |
Practically always on a mill: prints are dimensioned from a common origin and in absolute you copy the numbers with no arithmetic. On top of that, in absolute an error in one block affects only that block, while in incremental it drags everything that follows. The cases where you switch to incremental are few and well known: the safe retract G91 G28 Z0., repeated patterns with K or L, and geometry subprograms positioned from the calling block. Outside of that, the healthy thing is to write G90 in the safety block of every tool.
G90 and G54 are different and complementary: G54 says what point you measure from and G90 says you measure from that point and not from the tool. In canned cycles the mode changes the meaning of two words: under G90 the Z is the bottom coordinate and the R the coordinate of the reference plane, while under G91 the Z is the depth from R and the R a distance from the current position. The I, J and K arc centers, on the other hand, stay incremental on Fanuc and Haas unless you turn G90.1 on.
It cancels nothing. It does not clear a G92 or a G52 left active: the origin is still shifted and the absolute dimensions are measured from that shifted origin, which is exactly why a correct program can cut in the wrong place. It does not guarantee the control powers up in absolute either: the default mode at power-on depends on a machine parameter. And on a lathe with the A code set it does not mean absolute at all, it is a turning cycle that drives the tool to the programmed diameter.
Yes, and that is the norm: you work in G90 and switch to G91 for specific blocks, such as the retract G91 G28 Z0. or a repeated pattern. The important thing is to go back to G90 right afterwards. On Siemens and Heidenhain you can even mix them inside a block with AC() and I.
Not always. On a mill G90 is absolute mode. On a Fanuc lathe with the A code set, G90 is the straight turning cycle and absolute is expressed by using X and Z against U and W. Before reusing a mill block on a lathe, check the code set of the control.
On the modal code screen of the control, which shows the state of every group. It is the thirty second check worth doing before starting a program part way through or after jogging the machine by hand.
On Fanuc and Haas, no: arc centers are incremental from the start point even in G90. They only change if the control supports G90.1 and you turn it on; G91.1 puts them back to normal.
Yes, on two words: under G90 the Z is the bottom coordinate and the R the coordinate of the reference plane. Under G91 the Z becomes the depth measured from R and the R a distance from the current position, so the same cycle makes a different hole.
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.