Search This Blog

Tuesday, December 16, 2014

G90 and G91 Positioning gcodes

GCode G90 and G91 Absolute and incremental Positioning

In a CNC Programming the tool movement end point is always positioned by using two positioning G-Codes. They are:
1)      G90 Absolute positioning.
2)      G91 Incremental Positioning.

1)   G90 Absolute Positioning G-Code:

When Using G-code G90 (absolute positioning) Command, The end positioning of the tool movement is always from the absolute point (Absolute Zero) or the fixed point.  All the x y and z co-ordinate movements are calculated from the Zero point or the Axis Point. Absolute zero point is always set on the mid of the center table or the corner of the part or Center of the hole depending on the machines and the complexity of the part. In simple words “Absolute zero” is where the dimensions of the part program are defined from.
When using G90 the end point movement is the machine would go to that exact location from part zero, regardless of where it began, within the travel of the machine tool.

Example for G-Code G90 (Absolute Positioning):

N170 G90 G01 X-3 Y-2 F50;
As shown in the above code line the tool want to move to a position of 3 inches to the left, and 2 inches down from part zero was programmed, suppose if your tool somewhere in X500 Y500 position and when the G90 is called it moves to X-3 and Y-2 compared from absolute Zero.

2)   G91 Incremental Positioning G-Code:

When using G-code G91 (Incremental Positioning) Command, the tool always moves incrementing the last position value i.e., the control thinks that the last position of the tool is zero point and adds up the new position coded.  When using a G-code G91 incremental position command, each measurement or move is the actual distance to the next location is always from the current location. This G-code is modal G-code and is not cancelled until G90 is called. G91 makes all subsequent x y and z incremental throughout the program until it is cancelled.

In general, the G91 Incremental positioning G-code is used when repeating motions within a subprogram, for example, if you have four identical pockets to machine, then you can specify the motions incrementally to machine one pocket. Then just call up the subroutine again to repeat the commands to do another pocket at a new location. By doing this you can save programming effort to all the pockets.

Example for G-Code G91 (Incremental Positioning):

N170 G91 G01 X-3 Y-2 F50;
As shown in the above code line the tool want to move to a position of 3 inches to the left, and 2 inches down from the last tool position, suppose if your tool somewhere in X500 Y500 position and when the G91 is called as above example it moves to X497 and Y498 compared from absolute Zero.