4.15.4 Example of Tool Radius Compensation: G41/G42


  • SAMPL41.CNC

;First set parameter

;parameter→tool compensation graph

;tool number 1 radius compensation =2.5 mm

;

;The formal path begins

G17 G90

G92 X0 Y0 Z0

G0 X100. Y100.

M97 P1041            ;calling subprogram O1041

G0 X0 Y0

M01                  ;formal path end

;

;Tool radius left compensation started

H1                   ;choose first tool table

G41 G0 X100. Y100.

M97 P1041            ;calling subprogram O1041

G40 G0 X0 Y0         ;end G41

M30                  ;program end

;

O1041                ; subprogram

G01 X200. F1500.

X190. Y110.

G03 X110.Y190.I-40.J40.

G01 X100. Y200.

Y100.

M99                  ; subprogram end


Example of Tool Radius Compensation: G41


  • SAMPL42.CNC

;First set parameter

;parameter->tool table

;Tool nimber 1 radius = 2.5 mm

;The formal path begins

G17 G90

G92 X0 Y0 Z0

G0 X100. Y100.

M97 P1042          ;calling subprogram O1042

G0 X0 Y0

M01                ;formal path end

;

;Tool right compensate start

H1                 ;tool 1 compensation from tool table

G42 G0 X100. Y100.

M97 P1042          ;calling calling subprogram O1042

G40 G0 X0 Y0       ;end G42

M30                ;program end

;

O1042              ;subprogram

G01 X200. F1500.

X190. Y110.

G03 X110.Y190.I-40.J40.

G01 X100. Y200.

Y100.

M99                ;subprogram end


Example of Tool Radius Compensation: G42