+1 vote
277 views
in cnc programming by (9.4k points)

In this article, we describe absolute and incremental positioning which is called G90 and G91 codes on CNC machines.

Absolute (G90) and incremental positioning (G91) define how the control interprets axis
motion commands.
When you command axis motion after a G90 code, the axes move to that position relative
to the origin of the coordinate system currently in use.
When you command axis motion after a G91, the axes move to that position relative to the
current position.
Absolute programming is useful in most situations. Incremental programming is more
efficient for repetitive, equally spaced cuts.
Figure F5.6 shows a part with 5 equally spaced Ø0.25″ (13 mm) diameter holes. The hole
depth is 1.00″ (25.4 mm) and the spacing is 1.250″ (31.75 mm) apart.

Figure F5.6 – Absolute / Incremental Sample Program. G54 X0. Y0. for Incremental [1], G54 for Absolute [2]

Below are two example programs that drill the holes as shown in the drawing, with a comparison between absolute and incremental positioning. We start the holes with a center drill, and finish drilling the holes with a 0.250″ (6.35 mm) drill bit. We use a 0.200″ (5.08 mm) depth of cut for the center drill and 1.00″ (25.4 mm) depth of cut for the 0.250″ drill. G81, Drill Canned Cycle, is used to drill the holes.

F5.7: Mill Incremental Positioning Example.

%
O40002 (Incremental ex-prog) ;
N1 (G54 X0 Y0 is center left of part) ;
N2 (Z0 is on top of the part) ;
N3 (T1 is a center drill) ;
N4 (T2 is a drill) ;
N5 (T1 PREPARATION BLOCKS) ;
N6 T1 M06 (Select tool 1) ;
N7 G00 G90 G40 G49 G54 (Safe startup) ;
N8 X0 Y0 (Rapid to 1st position) ;
N9 S1000 M03 (Spindle on CW) ;
N10 G43 H01 Z0.1(Tool offset 1 on) ;
N11 M08(Coolant on) ;
N12 (T1 CUTTING BLOCKS) ;
N13 G99 G91 G81 F8.15 X1.25 Z-0.3 L5 ;
N14 (Begin G81, 5 times) ;
N15 G80 (Cancel G81) ;
N16 (T1 COMPLETION BLOCKS) ;
N17 G00 G90 G53 Z0. M09 (rapid retract, clnt off);
N18 M01 (Optional stop) ;
N19 (T2 PREPARATION BLOCKS) ;
N20 T2 M06 (Select tool 2) ;
N21 G00 G90 G40 G49 (Safe startup) ;
N22 G54 X0 Y0 (Rapid to 1st position) ;
N23 S1000 M03 (Spindle on CW) ;
N24 G43 H02 Z0.1(Tool offset 2 on) ;
N25 M08(Coolant on) ;
N26 (T2 CUTTING BLOCKS) ;
N27 G99 G91 G81 F21.4 X1.25 Z-1.1 L5 ;
N28 G80 (Cancel G81) ;
N29 (T2 COMPLETION BLOCKS) ;
N30 G00 Z0.1 M09 (Rapid retract, clnt off) ;
N31 G53 G90 G49 Z0 M05 (Z home, spindle off) ;
N32 G53 Y0 (Y home) ;
N33 M30 (End program) ;
%

F5.8: Mill Absolute Positioning Example

%
O40003 (Absolute ex-prog) ;
N1 (G54 X0 Y0 is center left of part) ;
N2 (Z0 is on top of the part) ;
N3 (T1 is a center drill) ;
N4 (T2 is a drill) ;
N5 (T1 PREPARATION BLOCKS) ;
N6 T1 M06 (Select tool 1) ;
N7 G00 G90 G40 G49 G54 (Safe startup) ;
N8 X1.25 Y0 (Rapid to 1st position) ;
N9 S1000 M03 (Spindle on CW) ;
N10 G43 H01 Z0.1 (Tool offset 1 on) ;
N11 M08 (Coolant on) ;
N12 (T1 CUTTING BLOCKS) ;
N13 G99 G81 F8.15 X1.25 Z-0.2 ;
N14 (Begin G81, 1st hole) ;
N15 X2.5 (2nd hole) ;
N16 X3.75 (3rd hole) ;
N17 X5. (4th hole) ;
N18 X6.25 (5th hole) ;
N19 G80 (Cancel G81) ;
N20 (T1 COMPLETION BLOCK) ;
N21 G00 G90 G53 Z0. M09 (Rapid retract, clnt off);
N22 M01 (Optional Stop) ;
N23 (T2 PREPARATION BLOCKS) ;
N24 T2 M06 (Select tool 2) ;
N25 G00 G90 G40 G49 (Safe startup) ;
N26 G54 X1.25 Y0 (Rapid to 1st position) ;
N27 S1000 M03 (Spindle on CW) ;
N28 G43 H02 Z0.1 (Tool offset 2 on) ;
N29 M08 (Coolant on) ;
N30 (T2 CUTTING BLOCKS) ;
N31 G99 G81 F21.4 X1.25 Z-1. (1st hole) ;
N32 X2.5 (2nd hole) ;
N33 X3.75 (3rd hole) ;
N34 X5. (4th hole) ;
N35 X6.25 (5th hole) ;
N36 G80 (Cancel G81) ;
N37 (T2 COMPLETION BLOCKS) ;
N38 G00 Z0.1 M09 (Rapid retract, Clnt off) ;
N39 G53 G49 Z0 M05 (Z home, Spindle off) ;
N40 G53 Y0 (Y home) ;
N41 M30 (End program) ;
%

The absolute program method needs more lines of code than the incremental program. The
programs have similar preparation and completion sections.
Look at line N13 in the incremental programming example, where the center drill operation
begins. G81 uses the loop address code, Lnn, to specify the number of times to repeat the
cycle. The address code L5 repeats this process (5) times. Each time the canned cycle
repeats, it moves the distance that the optional X and Y values specify. In this program, the
incremental program moves 1.25″ in X from the current position with each loop, and then
does the drill cycle.
For each drill operation, the program specifies a drill depth 0.1″ deeper than the actual
depth, because motion starts from 0.1″ above the part.
In absolute positioning, G81 specifies the drill depth, but it does not use the loop address
code. Instead, the program gives the position of each hole on a separate line. Until G80
cancels the canned cycle, the control does the drill cycle at each position.
The absolute positioning program specifies the exact hole depth, because the depth starts
at the part surface (Z=0).

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...