FANUC Series 30i/300i/300is-MODEL A. Machining Center System. User's manual - page 52

 

  Index      Manuals     FANUC Series 30i/300i/300is-MODEL A. Machining Center System. User's manual (B-63944EN/03)

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     50      51      52      53     ..

 

 

 

FANUC Series 30i/300i/300is-MODEL A. Machining Center System. User's manual - page 52

 

 

15.COMPENSATION FUNCTION

 PROGRAMMING 

B-63944EN/03

 

 

- 372 - 

Explanation 
  - Selection of tool length compensation 

Select tool length compensation A, B, or C, by setting bits 0 (TLC) 
and 1 (TLB) of parameter No.5001 . 
 

Parameter No.5001 

Bit 1 (TLB) 

Bit 0 (TLC) 

Type 

Tool length compensation A 

Tool length compensation B 

0/1 

Tool length compensation C 

 

  - Direction of the offset 

When G43 is specified, the tool length compensation value (stored in 
offset memory) specified with the H code is added to the coordinates 
of the end position specified by a command in the program. When 
G44 is specified, the same value is subtracted from the coordinates of 
the end position. The resulting coordinates indicate the end position 
after compensation, regardless of whether the absolute or incremental 
mode is selected. 
When the specification of an axis is omitted, a movement is made by 
the tool length compensation value. 
G43 and G44 are modal G codes. They are valid until another G code 
belonging to the same group is used. 

B-63944EN/03

 PROGRAMMING 

15.COMPENSATION FUNCTION

 

 

- 373 - 

  - Specification of the tool length compensation value 

The tool length compensation value assigned to the number (offset 
number) specified in the H code is selected from offset memory and 
added to or subtracted from the moving command in the program. 
 

Example 

 : 
H1 ; 

The offset value of offset number 1 is 
selected. 

 : 
G43 Z_ ; Offset is applied according to the offset 

value of offset number 1. 

 : 
H2 ; 

Offset is applied according to the offset 
value of offset number 2. 

 : 
H0 ; 

Offset is applied according to the offset 
value 0. 

 : 
H3 ; 

Offset is applied according to the offset 
value of offset number 3. 

 : 
G49 ; 

Offset is canceled. 

 : 
H4 ; 

The offset value of offset number 4 is 
selected. 

 : 

 
A tool length compensation value is to be set in the offset memory 
corresponding to an offset number. 
 

 WARNING 

 

When another offset number is specified, the tool 
length compensation value just changes to a new 
value.    The new tool length compensation value 
is not added to the old tool length compensation 
value. 

 

H1 : Tool length compensation value 20.0 

 

H2 : Tool length compensation value 30.0 

 

G90 G43 Z100.0 H1 ; Z will move to 120.0 

 

G90 G43 Z100.0 H2 ; Z will move to 130.0 

 

NOTE 

 

The tool length compensation value corresponding 
to offset No. 0, that is, H0 always means 0.    It is 
impossible to set any other tool length 
compensation value to H0. 

 

15.COMPENSATION FUNCTION

 PROGRAMMING 

B-63944EN/03

 

 

- 374 - 

  - Performing tool length compensation along two or more axes 

Tool length compensation B can be executed along two or more axes 
when the axes are specified in two or more blocks. 
By setting bit 3 (TAL) of parameter No. 5001 to 1, tool length 
compensation C can also can be executed along two or more axes 
when the axes are specified in two or more blocks.  If no axis is 
specified in the same block, the alarm PS0027 is issued.    If two or 
more axes are specified in the same block, the alarm PS0336 is issued. 

Example 1 

 

When tool length compensation B is executed 
along the X-axis and Y-axis 

 

G19 G43 H_ ;          Offset in X axis   

 

G18 G43 H_ ;          Offset in Y axis   

Example 2 

 

When tool length compensation C is executed 
along the X-axis and Y-axis 

  G43 X_ H_ ;      Offset in X axis  
  G43 Y_ H_ ;      Offset in Y axis  

Example 3 

 

When an alarm is issued with tool length 
compensation C 

 

G43 X_ Y_ H_ ;      An alarm (PS0336) occurs 

 

  - Tool length compensation cancel 

To cancel tool length compensation, specify G49 or H0. After G49 or 
H0 is specified, the system immediately cancels the offset mode. 
 

B-63944EN/03

 PROGRAMMING 

15.COMPENSATION FUNCTION

 

 

- 375 - 

NOTE 

1  If offset is executed along two or more axes, offset 

along all axes is canceled by specifying G49.    If H0 
is used to specify cancellation, offset along only the 
axis normal to a selected plane is canceled in the 
case of tool length compensation B, or offset along 
only the last axis specified by G43 or G44 is 
canceled in the case of tool length compensation C.

2  If offset is executed along three or more axes, and 

offset along all axes is canceled using G49, the 
alarm PS0015 (TOO MANY SIMULTANEOUS 
AXES) may be issued.    By using H0 together, for 
example, cancel offset so that the number of 
simultaneously controlled axes (the number of axes 
along which movements are made simultaneously) 
does not exceed the allowable range of the system.

3  If tool length compensation and three-dimensional 

coordinate system conversion are canceled by a 
reset with three-dimensional coordinate system 
conversion performed during tool length 
compensation, the direction of tool length 
compensation vector cancellation becomes 
incorrect.    By setting bit 6 (LVK) of parameter No. 
5003 to 1 and setting bit 2 (D3R) of parameter No. 
5400 to 1, ensure that the tool length compensation 
vector and three-dimensional coordinate system 
conversion are not canceled by a reset. 

       

Example)
 G43 H1 ;
  G68 X_ Y_ Z_ I_ J_ K_ R_ ;
      :
      :           

Ensure that tool length compensation and three-dimensional

      :           

coordinate conversion are not canceled by a reset in this range.

 

G69 ;

 G49 ;

 

15.COMPENSATION FUNCTION

 PROGRAMMING 

B-63944EN/03

 

 

- 376 - 

Example 

 

Actual position

Programmed 
position 

Offset value 
=4mm 

#1

20

30

30

120 

#3 

#2

+Y 

+X

30

50 

+Z 

3

35

30

18

22

8

Tool length compensation (in boring holes #1, #2, and #3) 

(1) 

(2)

(3)

(4)

(5)

(6)

(7) (8)

(9) 

(13)

(10) 

(11) 

(12) 

 

Program 
H1=-4.0 (Tool length compensation value) 
N1  G91 G00 X120.0 Y80.0 ;........................................................... (1) 
N2  G43 Z-32.0 H1 ;  ....................................................................... (2) 
N3  G01 Z-21.0 F1000 ;  ................................................................. (3) 
N4  G04 P2000 ;............................................................................... (4) 
N5  G00 Z21.0 ;................................................................................ (5) 
N6  X30.0 Y-50.0 ;........................................................................... (6) 
N7  G01 Z-41.0 ; .............................................................................. (7) 
N8  G00 Z41.0 ;................................................................................ (8) 
N9  X50.0 Y30.0 ; ............................................................................ (9) 
N10 G01 Z-25.0 ; ............................................................................ (10) 
N11 G04 P2000 ;  ........................................................................... (11) 
N12 G00 Z57.0 H0 ;  ...................................................................... (12) 
N13 X-200.0 Y-60.0 ;...................................................................... (13) 
N14 M2 ; 
 

Notes 
  - Command for setting a workpiece coordinate system in the tool length 

compensation mode 

Executing a workpiece coordinate system setting G code command 
(G92 or, for G code system A in the lathe system, G50) presets a 
coordinate system in such a way that the specified position will be a 
pre-compensation position. 
However, this G code cannot be used together with a block where tool 
length compensation vectors vary.  For details, see “Notes” in 
Subsection 7.2.1, “Setting a Workpiece Coordinate System.” 

B-63944EN/03

 PROGRAMMING 

15.COMPENSATION FUNCTION

 

 

- 377 - 

15.1.2 

G53, G28, G30, and G30.1 Commands in Tool Length 

Compensation Mode 

 
This section describes the tool length compensation cancellation and 
restoration performed when G53, G28, G30, or G31 is specified in 
tool length compensation mode. Also described is the timing of tool 
length compensation.   
 

Explanation 
  - Tool length compensation vector cancellation 

When G53, G28, G30, or G30.1 is specified in tool length 
compensation mode, tool length compensation vectors are canceled as 
described below.  However, the previously specified modal G code 
remains displayed; modal code display is not switched to G49. 
 
(1)  When G53 is specified   

Command Specified 

axis 

Operation 

Tool length compensation 
axis  

Canceled upon movement 
being performed 

G53 

IP

Other than tool length 
compensation axis 

Not canceled 

Tool length compensation 
axis  

Canceled upon movement 
being performed 

G49 G53 

IP

_

Other than tool length 
compensation axis 

Canceled 

(IP_ : Dimension word) 
 

 CAUTION 

 

If tool length compensation is applied along 
multiple axes, the offset vector along the axis 
specified by G53 is canceled. 

 
(2)  When G28, G30, or G30.1 is specified   

Command Specified 

axis 

Operation 

Tool length compensation 
axis  

Not canceled at an 
intermediate point.   
Canceled at the reference 
position. 

G28 

IP

Other than tool length 
compensation axis 

Not canceled at an 
intermediate point.   
Canceled at the reference 
position. 

Tool length compensation 
axis  

Canceled when a movement is 
made to an intermediate point.

G49 G28 

IP

_

Other than tool length 
compensation axis 

Canceled when a movement is 
made to an intermediate point.

(IP_ : Dimension word) 
 

15.COMPENSATION FUNCTION

 PROGRAMMING 

B-63944EN/03

 

 

- 378 - 

 CAUTION 

 

If tool length compensation is applied along 
multiple axes, the offset vector along the axis on 
which a reference position return operation has 
been performed is canceled. 

 

  - Tool length compensation vector restoration 

Tool length compensation vectors, canceled by specifying G53, G28, 
G30, or G30.1 in tool length compensation mode, are restored as 
described below. 
 

Type 

Parameter EVO

(No.5001#6) 

Restoration condition 

The H command or G43 (G44) is 
specified. 

A/B 

Restored by the next buffered block. 

C  

The H command or G43 (G44)

IP

_ is 

specified. 

(IP_ : Dimension word) 
 

 CAUTION 

 

If a tool length compensation vector is restored 
only with H_, G43, or G44 when tool length 
compensation is applied along multiple axes, the 
tool length compensation vector along only the 
axis normal to a selected plane is restored in the 
case of tool length compensation B, or the tool 
length compensation vector along only the last 
axis for which tool length compensation is 
specified is restored in the case of tool length 
compensation C.  The tool length compensation 
vector along any other axes is not restored. 

 

B-63944EN/03

 PROGRAMMING 

15.COMPENSATION FUNCTION

 

 

- 379 - 

15.2 

SCALING (G50, G51) 

 

Overview 

A programmed figure can be magnified or reduced (scaling). 
Two types of scaling are available, one in which the same 
magnification rate is applied to each axis and the other in which 
different magnification rates are applied to different axes. 
The magnification rate can be specified in the program. 
Unless specified in the program, the magnification rate specified in the 
parameter is applied. 
 

Y

X

P

4

P

4

P

1

P

1

P

3

P

2

P

2

P

3

P

0

P

: Scaling center

P

1

 to P

4

: Programmed figure

P

1

’ to P

4

: Scaled figure

0

 

Fig. 15.2 (a)    Scaling 

 

Format 

Scaling up or down along all axes   

at the same rate of magnification 

(When parameter XSC (No. 5400#6) = 0) 

Format 

Meaning of command 

G51 

IP

_P_ ;

 Scaling 

start 

Scaling is effective.
(Scaling mode)

 

G50 ;

 Scaling 

cancel 

IP

_

 

:  Absolute command for 

center coordinate value 
of scaling 

P_

 : 

Scaling 

magnification 

 

Scaling up or down along each axes at   

a different rate of magnification (mirror image) 

(When parameter XSC (No. 5400#6) = 1) 

Format 

Meaning of command 

G51 

IP

_I_J_K_;

 Scaling start 

Scaling is effective.
(Scaling mode)

 

G50 ;

 Scaling 

cancel 

IP

_

 

:  Absolute command for 

center coordinate value 
of scaling 

I_J_K_

  :  Scaling magnification for 

basic 3 axes (X, Y, and Z 
axes) respectively 

 

 

 

 

 

 

 

 

Content      ..     50      51      52      53     ..