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

 

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

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     289      290      291      292     ..

 

 

 

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

 

 

B.PROGRAM CODE LIST

 APPENDIX 

B-63944EN/03

 

 

- 2284 - 

ISO code 

EIA code 

Custom macro 

Character name 

Character 

Code 

(hexadecimal)

Character

Code 

(hexadecimal)

without 

custom 

macro 

with 

custom 

macro 

Usable as file 

name 

Space SP 

A0 

SP 

10 

 

 

 

Absolute rewind stop 

% A5 ER 0B      

Control out (start of 
comment) 

( 28 

(2-4-5) 

1A     

Control in (end of 
comment) 

A9 (2-4-7) 4A 

   

 

Plus sign 

2B 

70 

 

 

Minus sign 

2D 

40 

 

 

Colon (address O) 

3A 

 

 

 

 

Optional block skip 

AF 

31 

 

 

 

Period (decimal point) 

2E 

6B 

 

 

Sharp # 

A3 

Parameter

 

(No.6012) 

 

 

 

Dollar sign 

24 

 

 

 

 

Ampersand 

& A6 & 0E      

Apostrophe ’

 

27   

 

 

Asterisk * 

AA 

Parameter

 

(No.6010) 

 

 

 

Comma 

, AC , 3B     

Semicolon ; 

FB     

 

 

Left angle bracket 

2C 

 

 

 

 

Equal sign 

BD 

Parameter

 

(No.6011) 

 

 

 

Right angle bracket 

BE 

 

 

 

 

Question mark 

3F 

 

 

 

 

Commercial at mark 

C0 

 

 

 

 

Quotation mark 

 

22   

 

 

Left square bracket 

DB 

Parameter

 

(No.6013) 

 

 

 

Right square bracket 

DD 

Parameter

 

(No.6014) 

 

 

 

Underscore _ 

6F 

Parameter

 

(No.6018)

 

 

 

Lowercase letter a 

E1 

 

 

 

Lowercase letter b 

E2 

 

 

 

Lowercase letter c 

63 

 

 

 

Lowercase letter d 

E4 

 

 

 

Lowercase letter e 

65 

 

 

 

Lowercase letter f 

66 

 

 

 

Lowercase letter g 

E7 

 

 

 

Lowercase letter h 

E8 

 

 

 

Lowercase letter i 

69 

 

 

 

Lowercase letter j 

6A 

 

 

 

Lowercase letter k 

EB 

 

 

 

Lowercase letter l 

6C 

 

 

 

Lowercase letter m 

ED 

 

 

 

Lowercase letter n 

EE 

 

 

 

Lowercase letter o 

6F 

 

 

 

Lowercase letter p 

F0 

 

 

 

B-63944EN/03

 APPENDIX 

B.PROGRAM CODE LIST

 

 

- 2285 - 

ISO code 

EIA code 

Custom macro 

Character name 

Character 

Code 

(hexadecimal)

Character

Code 

(hexadecimal)

without 

custom 

macro 

with 

custom 

macro 

Usable as file 

name 

Lowercase letter q 

71 

 

 

 

Lowercase letter r 

72 

 

 

 

Lowercase letter s 

F3 

 

 

 

Lowercase letter t 

74 

 

 

 

Lowercase letter u 

F5 

 

 

 

Lowercase letter v 

F6 

 

 

 

Lowercase letter w 

77 

 

 

 

Lowercase letter x 

78 

 

 

 

Lowercase letter y 

F9 

 

 

 

Lowercase letter z 

FA 

 

 

 

 

NOTE 

1  The symbols used in the "Custom macro" column 

have the following meanings. 

(Space) : The character will be registered in 

memory and has a specific meaning. It is 
used incorrectly in a statement other than 
a comment, an alarm occurs. 

  : 

The character will not be registered in 
memory and will be ignored. 

  : 

The character will be registered in 
memory, but will be ignored during 
program execution.    The character that 
has "*" in its "Usable as file name" field 
and is used as a file name is not ignored. 

  : 

The character will be registered in 
memory. If it is used in a statement other 
than a comment, an alarm occurs. 

  : 

If it is used in a statement other than a 
comment, the character will not be 
registered in memory.    If it is used in a 
comment, it will be registered in memory. 

2  The symbol used in the column "Usable as file 

name" has the following meaning: 

*

  : 

Capable of being coded between "<" and 
">" as a file name. 

3  Codes not in this table are ignored if their parity is 

correct. 

4  Codes with incorrect parity cause the TH alarm. 

But they are ignored without generating the TH 
alarm when they are in the comment section. 

 

 APPENDIX 

B-63944EN/03

 

 

- 2286 - 

C. LIST OF FUNCTIONS AND 

PROGRAM FORMAT 

LIST OF FUNCTIONS AND PROGRAM 
FORMAT 

 
With some functions, the format used for specification on the 
machining center system differs from the format used for specification 
on the lathe system.    Moreover, some functions are used for only one 
of the control types for the machining center system and lathe system. 
Some functions cannot be added as options depending on the model. 
For details of command formats, see the relevant sections or 
subsections. 
 
In the list, the following symbols are used: 

 

For machining center 
x : 1st basic axis (X),   
y : 2nd basic axis (Y),   
z : 3rd basic axis (Z) 

 For 

lathe 

x : 1st basic axis (X),   
z : 2nd basic axis (Z),   
coded using G code system A 

 

IP_ : presents a combination of arbitrary axis addresses using 

X,Y,Z,A,B and C (such as X_ Y_ Z_). 

 

B-63944EN/03

 APPENDIX 

 

 

- 2287 - 

C.LIST OF FUNCTIONS AND

PROGRAM FORMAT

(1/11) 

Functions Illustration 

Program 

format 

Positioning  
(G00) 

Start point

IP

 

G00 

IP

_ ;   

Linear interpolation 
(G01) 

Start point

IP

 

G01 

IP

_ F_; 

Circular interpolation   
(G02, G03)   

(x, y)

G03

(x, y)

J

R

I

G02

R

I

J

Start point

Start point

 For machining center 

G02

G03

X_ Y_

R_

I_ J_

F_ ;

G17

G02

G03

X_ Z_

R_

I_ K_

F_ ;

G18

G02

G03

Y_ Z_

R_

J_ K_

F_ ;

G19

 

 

 For lathe 

G02

G03

X_ Z_

R_

I_ K_

F_ ;

 

Helical interpolation 
(G02, G03) 

(x, y)

(xyz)

z

Start
point

  In case of G03 on X-Y plane

 

 

G02

G03

X_ Y_ 

R_ 

I_ J_ 

α

_ F_ ;

G17

G02

G03

X_ Z_ 

R_ 

I_ K_ 

α

_ F_ ;

G18

G02

G03

Y_ Z_ 

R_ 

J_ K_ 

α

_ F_ ;

G19

α

:    Arbitrary address except the circular 

interpolation axis 

 

Involute interpolation 
 (G02.2, G03.2) 

Yp

Pe

0

R

Xp

Ps

Base circle

Po

Start
point

End point

I

J

(In case of X-Y plane) 

G02.2

G03.2

Xp_ Yp_ I_ J_ R_ F_ ;

G17

G02.2

G03.2

Zp_Xp_ K_ I_ R_ F_ ;

G18

G02.2

G03.2

Yp_ Zp_ J_ K_ R_ F_ ;

G19

 

Exponential interpolation 
(G02.3, G03.3) 

A (Rotary axis)

X (Linear axis)

X

A

Relationship between X-axis and A-axis

Positive rotation 
G02.3 X_ Y_ Z_ I_ J_ K_ R_ F_ Q_; 
Negative rotation 

G03.3 X_ Y_ Z_ I_ J_ K_ R_ F_ Q_;

 

 APPENDIX 

B-63944EN/03

 

 

- 2288 - 

C. LIST OF FUNCTIONS AND 

PROGRAM FORMAT 

(2/11) 

Functions Illustration 

Program 

format 

Three-dimensional circular 
interpolation 
(G02.4, G03.4) 

X

Y

Z

Start
point

Intermediate point
(X1,Y1,Z1)

End point (X2,Y2,Z2)

 

G02.4 X

X1

 Y

Y1

 Z

Z1

 

α

α

1

 

β

β

;  

            First block (mid-point of the arc) 
            X

X2

 Y

Y2

 Z

Z2

 

α

α

2

 

β

β

2

 ; 

            Second block (end point of the 
arc) 

α

β

 :  Arbitrary axes other than the 

3-dimensional circular interpolation axis 
(up to two axes) 

G03.4 can also be specified instead of G02.4.

 

Dwell 
(G04) 

 

G04

X_

;

P_

 

AI contour control 
(G05) 

 

G05 P10000 ; AI contour control start 
G05 P0 ;      AI contour control end 

AI contour control 
(G05.1) 

 

G05.1 Q1 ; AI contour control mode on 
G05.1 Q0 ; AI contour control mode off 

Nano smoothing 
(G05.1) 

 

G05.1 Q3 

IP

0 ; Nano smoothing mode on 

G05.1 Q0 ; Nano smoothing mode off 

Smooth interpolation 
(G05.1) 

 

G05.1 Q2 ; Smooth interpolation mode on 
G05.1 Q0 ; Smooth interpolation mode off 

NURBS interpolation 
(G06.2) 

 

G06.2[P_] K_ 

IP

_ [R_] [F_];     

NURBS interpolation mode on 
P : Rank of NURBS curve 

IP

 : Control point 

R : Weight 
K : Knot 
F : Feedrate 

Hypothetical axis interpolation 
(G07) 

 

G07 

IP

0 ;    Hypothetical axis setting 

G07 

IP

1 ;    Hypothetical axis cancel 

Cylindrical interpolation 
(G07.1) 

 

G07 

IP

_ r_; 

Cylindrical interpolation mode 

r : Cylinder radius 
G07 

IP

 0; Cylindrical interpolation mode cancel

AI contour control (Advanced 
preview control) 
(G08) 

 

G08 P1 ; AI contour control mode on 
G08 P0 ; AI contour control mode off 

Exact stop 
(G09) 

Speed

Time

In-position check

G09                     

IP

_ ;

G01
G02
G03

 

B-63944EN/03

 APPENDIX 

 

 

- 2289 - 

C.LIST OF FUNCTIONS AND

PROGRAM FORMAT

(3/11) 

Functions Illustration 

Program 

format 

Programmable data input 
(G10) 

 

 For machining center 

Tool compensation memory A 
    G10 L01 P_ R_ ; 
Tool compensation memory B 
    G10 L10 P_ R_ ; (Geometry offset amount) 
    G10 L11 P_ R_ ; (Wear offset amount) 
Tool compensation memory C 
    G10 L10 P_ R_ ; (Geometry offset amount/H)
    G10 L11 P_ R_ ; (Wear offset amount/H) 
    G10 L12 P_ R_ ; (Geometry offset amount/D)
    G10 L13 P_ R_ ; (Wear offset amount/D) 

 For lathe

 

Geometry offset amount 
    G10 P_ X_ Z_ R_ Q_ ; 
    P = 10000 + Geometry offset number 
Wear offset amount 
    G10 P_ X_ Z_ C_ Q_ ; 
    P = Wear offset number 

Tool retract and recover 
(G10.6) 

 

IP

Retract 

Repositioning

Withdrawal

Return

 

G10.6 

IP

_ ; 

Specify the amount of retraction

G10.6 (as a single block containing no other 
commands) ; 
 

Cancel the amount of retraction

Polar coordinate interpolation 
(G12.1, G13.1) 

 

G12.1 ; Polar coordinate interpolation mode on
G13.1 ; Polar coordinate interpolation cancel 

Polar coordinate command 
(G15, G16) 

Yp

Xp

Yp

Xp

Local coordinate system

Workpiece coordinate system

 

G17 G16 Xp_ Yp_ . . . ; 
G18 G16 Zp_ Xp_ . . . ; 
G19 G16 Yp_ Zp_ . . . ; 
G15 ; Cancel 

Plane selection 
(G17, G18, G19) 

 

G17 ; Xp Yp-plane selection 
G18 ; Zp Xp-plane selection 
G19 ; Yp Zp-plane selection 

Inch/metric conversion 
(G20, G21) 

 

Inch input  G20 ; 
Metric input  G21 ; 

Stored stroke check 
(G22, 23) 

(XYZ)

(IJK)

 

G22 X_ Y_ Z_ I_ J_ K_ ; 
G23 ;  Cancel 

Reference position return check 
(G27) 

Start point

IP

 

G27 

IP

_ ; 

 APPENDIX 

B-63944EN/03

 

 

- 2290 - 

C. LIST OF FUNCTIONS AND 

PROGRAM FORMAT 

(4/11) 

Functions Illustration 

Program 

format 

Reference position return 
(G28) 
2nd Reference position return 
(G30) 

Start point

Reference position (G28)

Intermediate point

  2nd reference position(G30)

IP

G28 

IP

_ ; 

 
G30 

IP

_ ; 

Movement from reference 
position 
(G29) 

Reference position

IP

Intermediate point

G29 

IP_

 ; 

Floating reference position 
return 
(G30.1) 

Start
point

Floating reference position

Intermediate point

IP

 

G30.1 

IP_ 

;  

Skip function 
(G31) 

      Start point

Skip signal

IP

G31 

IP

_ F_ ; 

Threading 
(G33) 

 For machining center 

G33 

IP

_ F_ ; 

  F : Lead 

Threading 
(G32) 

  F

 

 For lathe

 

Equal lead threading 
G32 P_ F_ ; 

Tool radius/tool nose radius 
compensation, 3-dimensional 
cutter compensation   
(G38, G39, G40 to G42) 

G41

G42

G40

 

 For machining center 

G17

G18

G19

G41

G42

D_ ;

 

D : Tool compensation number 
G40 : Cancel 
 

Tool radius/tool nose radius 
compensation 
(G40 to G42) 
(G38, G39) 

 

 For lathe only

 

G41
G42

G40 : Cancel

IP

    ;

 

3-dimensional cutter 
compensation 
(G41.2, G42.2) 
 
 
 
 
(G41.3) 

Compensatio
n plane

Y

Z

X

Tool vector

Cutter compensation
amount

Tool center path
(path after
compensation)

Programmed path
(path before compensation)

Cutter compensation vector

Tool side offset 

Tool used

Reference

tool

Cutter

compensatio

n vector

Χυττερ χοµπενσατιο

ν αµουντ

Tool center path

(path after

compensation)

Programmed

path

Tool vector

Leading edge offset 

G41.2

G42.2

IP

_ D_ ; Tool side offset 

G40 

IP

_ ; Cancellation of cutter compensation 

 
 
 
 
G41.3 D_ ; Leading edge offset 
G40 ; Canceling the leading edge offset 
 

B-63944EN/03

 APPENDIX 

 

 

- 2291 - 

C.LIST OF FUNCTIONS AND

PROGRAM FORMAT

(5/11) 

Functions Illustration 

Program 

format 

Normal direction control 
(G40.1, G41.1, G42.1) 

 

Tool 

Tool

C-axis 

C-axis

Programmed 
path 

Normal direction (in 
which the tool moves)

G41.1 ; Normal direction control on : right 
G42.1 ; Normal direction control on : left 
G40.1 ; Normal direction control cancel 

Tool length compensation 
(G43, G44, G49) 

Z

Compensation

G43

Z_ H_ ;

G44

G43

H_ ;

G44

 

H : Tool compensation number 
G49 : Cancel

 

Tool length compensation in 
tool axis direction 
(G43.1) 

C

B

Z

Y

X

C

B

Tool axis direction

Workpiece

G43.1 H_ ;  Tool length compensation in tool 

axis direction 

H : Compensation number 
G49 ; Compensation cancel 

Tool center point control   
(TYPE1) 
(G43.4) 

 

G43.4 

IP

 

α

 

β

 H ;   

Tool center point control (TYPE1) start 

IP

 

α

 

β

 ;   

IP

 :  In the case of an absolute command, the 

coordinate value of the end point of the tool 
tip movement 

 

In the case of an incremental command, 
the amount of the tool tip movement 

α

β

 :In the case of an absolute command, the 

coordinate value of the end point of the 
rotation axes 

 

In the case of an incremental command, 
the amount of the rotation axis movement 

H : Tool compensation number

 

Tool center point control   
(TYPE2) 
(G43.5) 

 

G43.5 

IP

   H  Q  ; 

Tool center point control (TYPE2) start 

IP

   I  J  K   ;         

IP

 :  In the case of an absolute command, the 

coordinate value of the end point of the tool 
tip movement 

 

In the case of an incremental command, 
the amount of the tool tip movement 

I,J,K :  Tool axis direction at the block end point 

as seen from the programming 
coordinate system 

H : Tool compensation number 
Q : Inclination angle of the tool (in degrees)

 

Tool offset 
(G43.7) 

 

 For lathe only

 

 

 

 

 

 

 

 

Content      ..     289      290      291      292     ..