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

 

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

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     64      65      66      67     ..

 

 

 

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

 

 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 484 - 

Category

Variable 

number

Variable 

name 

Description 

<1> 
<2> 
<3> 

#4119 
#4319 
#4519 

[#_BUFS] 
[#_ACTS] 
[#_INTS] 

Modal information (S code) 

<1> 
<2> 
<3> 

#4120 
#4320 
#4520 

[#_BUFT] 
[#_ACTT] 
[#_INTT] 

Modal information (T code) 

<1> 
<2> 
<3> 

#4130 
#4330 
#4530 

[#_BUFWZP]
[#_ACTWZP]
[#_INTWZP] 

Modal information 
(additional workpiece coordinate 
system number P) 

 

T

 

(Category:  <1>  Previous block, <2>  Running block, <3>  
Interrupted block) 
 

Category

Variable 

number

Variable 

name 

Description 

<1> 
<2> 
<3> 

#4001 
#4201 
#4401 

[#_BUFG[1]] 
[#_ACTG[1]] 
[#_INTG[1]] 

Modal information (G code:    group 1)

<1> 
<2> 
<3> 

#4002 
#4202 
#4402 

[#_BUFG[2]] 
[#_ACTG[2]] 
[#_INTG[2]] 

Modal information (G code:    group 2)





<1> 
<2> 
<3> 

#4030 
#4230 
#4430 

[#_BUFG[30]]
[#_ACTG[30]]
[#_INTG[30]] 

Modal information 
(G code:  group 30) 

<1> 
<2> 
<3> 

#4108 
#4308 
#4508 

[#_BUFE] 
[#_ACTE] 
[#_INTE] 

Modal information (E code)

 

<1> 
<2> 
<3> 

#4109 
#4309 
#4509 

[#_BUFF] 
[#_ACTF] 
[#_INTF] 

Modal information (F code) 

<1> 
<2> 
<3> 

#4113 
#4313 
#4513 

[#_BUFM] 
[#_ACTM] 
[#_INTM] 

Modal information (M code) 

<1> 
<2> 
<3> 

#4114 
#4314 
#4514 

[#_BUFN] 
[#_ACTN] 
[#_INTN] 

Modal information 
(sequence number N) 

<1> 
<2> 
<3> 

#4115 
#4315 
#4515 

[#_BUFO] 
[#_ACTO] 
[#_INTO] 

Modal information 
(program number O) 

<1> 
<2> 
<3> 

#4119 
#4319 
#4519 

[#_BUFS] 
[#_ACTS] 
[#_INTS] 

Modal information (S code) 

<1> 
<2> 
<3> 

#4120 
#4320 
#4520 

[#_BUFT] 
[#_ACTT] 
[#_INTT] 

Modal information (T code) 

<1> 
<2> 
<3> 

#4130 
#4330 
#4530 

[#_BUFWZP]
[#_ACTWZP]
[#_INTWZP] 

Modal information 
(additional workpiece coordinate 
system number P) 

 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 485 - 

 

 

NOTE 

1  Previous block and running block 
 

Since the CNC reads the block that is ahead of the 
block currently being executed by the machining 
program, the block being retrieved by the CNC is 
normally different from that currently being 
executed.    The previous block indicates the block 
that is ahead of the block being retrieved by the 
CNC, that is, the block that is ahead of the program 
block in which #4001 to #4130 are specified. 

2  When variables exceeding the number of control 

axes are specified, the alarm PS0115, “VARIABLE 
NO. OUT OF RANGE” occurs. 

 

[Example] O1234 

 

N10 G00 X200. Y200. ;   

 

N20 G01 X1000. Y1000. F10. ; 

 

            : 

 

            : 

 

N50 G00 X500. Y500. ;   

 

N60 #1 = #4001 ;   

Assume that the CNC is currently executing N20.  If the CNC retrieved and 
processed the blocks up to N60 as shown above, the running block is N20 and 
the previous block is N50.  Therefore, group 1 modal information in the 
running block is G01 and group 1 modal information in the previous block is 
G00. 
When N60 #1 = #4201, #1 = 1. 
When N60 #1 = #4001, #1 = 0. 

 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 486 - 

  - Position information #5001-#5080, #100001-#100200 (Attribute:    R) 

The end position of the previous block, the specified current position 
(for the machine coordinate system and workpiece coordinate system), 
and the skip signal position can be obtained by reading the values of 
system variables #5001 to #5080 or #100001 to -#100200. 
 

Variable 

number 

Variable name 

Position information 

Coordinate 

system 

Tool position/tool 

length/cutter 

compensation 

Reading 

operation during 

movement 

#5001 
#5002 

#5020 

[#_ABSIO[1]] 
[#_ABSIO[2]] 

[#_ABSIO[20]] 

1st axis block end point position 
2nd axis block end point position 

20th axis block end point position

#100001 
#100002 

#100050 

[#_ABSIO[1]] 
[#_ABSIO[2]] 

[#_ABSIO[50]] 

1st axis block end point position 
2nd axis block end point position 

50th axis block end point position

Workpiece 
coordinate 

system 

Not included 

Enabled 

#5021 
#5022 

#5040 

[#_ABSMT[1]] 
[#_ABSMT[2]] 

[#_ABSMT[20]] 

1st axis current position 
2nd axis current position 

20th axis current position 

#100051 
#100052 

#100100 

[#_ABSMT[1]] 
[#_ABSMT[2]] 

[#_ABSMT[50]] 

1st axis current position 
2nd axis current position 

50th axis current position

 

Machine 

coordinate 

system 

Included Disabled 

#5041 
#5042 

#5060 

[#_ABSOT[1]] 
[#_ABSOT[2]] 

[#_ABSOT[20]] 

1st axis current position 
2nd axis current position 

20th axis current position 

#100101 
#100102 

#100150 

[#_ABSOT[1]] 
[#_ABSOT[2]] 

[#_ABSOT[50]] 

1st axis current position 
2nd axis current position 

50th axis current position 

Workpiece 
coordinate 

system 

Included Disabled 

#5061 
#5062 

#5080 

[#_ABSKP[1]] 
[#_ABSKP[2]] 

[#_ABSKP[20]] 

1st axis skip position 
2nd axis skip position 

20th axis skip position 

#100151 
#100152 

#100200 

[#_ABSKP[1]] 
[#_ABSKP[2]] 

[#_ABSKP[50]] 

1st axis skip position 
2nd axis skip position 

50th axis skip position 

Workpiece 
coordinate 

system 

Included Enabled 

 

NOTE 

1  When variables exceeding the number of control axes are specified, the alarm 

PS0115, “VARIABLE NO. OUT OF RANGE” occurs. 

2  The position information for 20th or earlier axis can be used with #5001 to #5080. 
3  The block end point position (ABSIO) of the skip (G31) is the position where the 

skip signal is turned on.    If the skip signal is not turned on, the position is the end 
position of the block. 

4  "Read operation during movement is disabled" means that the accurate reading of 

values during movement is not guaranteed. 

 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 487 - 

 - 

Tool length compensation value #5081-#5100, #100201-#100250 (Attribute:    R) 

 

M

 

Tool length compensation in the block currently being executed can 
be obtained for each axis by reading system variables #5081 to #5100 
or #100201 to #100250. 
 

Variable 

number 

Variable 

name 

Position information 

Read operation 

during 

movement 

#5081 
#5082 

#5100 

[#_TOFS[1]] 
[#_TOFS[2]] 

[#_TOFS[20]]

1st axis tool length compensation value 
2nd axis tool length compensation value 

20th axis tool length compensation value 

#100201 
#100202 

#100250 

[#_TOFS[1]] 
[#_TOFS[2]] 

[#_TOFS[50]]

1st axis tool length compensation value 
2nd axis tool length compensation value 

50th axis tool length compensation value 

Disabled 

 

NOTE 

1  When variables exceeding the number of control 

axes are specified, the alarm PS0115, “VARIABLE 
NO. OUT OF RANGE” occurs. 

2  The tool length compensation for 20th or earlier 

axis can also be used with #5081 to #5100. 

 

 - Tool offset  #5081-#5083, #5121-#5123 (Attribute:  R) 

 #100201-#100250, 

#100901-#100950 

 

T

 

Tool offset in the block currently being executed can be obtained for 
each axis by reading system variables #5081 to #5083 or #5121 to 
#5123.  (X-axis: X-axis of basic three axes, Z-axis: Z-axis of basic 
three axes, Y-axis: Y-axis of basic three axes) 
<1>  Without tool geometry/wear compensation memory 

Variable 

number 

Variable name

Position information 

Read operation 

during 

movement 

#5081 
#5082 
#5083 
#5084 

#5100 

[#_TOFSWX] 
[#_TOFSWZ] 
[#_TOFSWY] 
[#_TOFS[4]] 

[#_TOFS[20]] 

X-axis tool offset value 
Z-axis tool offset value 
Y-axis tool offset value 
4th axis tool offset value 
                      : 
20th axis tool offset value 

#100201 
#100202 
#100203 
#100204 

#100250 

[#_TOFSWX] 
[#_TOFSWZ] 
[#_TOFSWY] 
[#_TOFS[4]] 

[#_TOFS[50]] 

X-axis tool offset value 
Z-axis tool offset value 
Y-axis tool offset value 
4th axis tool offset value 
                      : 
50th axis tool offset value 

Disabled 

 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 488 - 

<2>  With tool geometry/wear compensation memory 

Variable 

number 

Variable name

Position information 

Read operation 

during 

movement 

#5081 
#5082 
#5083 
#5084 

#5100 

[#_TOFSWX] 
[#_TOFSWZ] 
[#_TOFSWY] 
[#_TOFS[4]] 

[#_TOFS[20]] 

X-axis tool offset value (geometry) 
Z-axis tool offset value (geometry) 
Y-axis tool offset value (geometry) 
4th axis tool offset value (geometry) 
                      : 
20th axis tool offset value (geometry) 

#100201 
#100202 
#100203 
#100204 

#100250 

[#_TOFSWX] 
[#_TOFSWZ] 
[#_TOFSWY] 
[#_TOFS[4]] 

[#_TOFS[50]] 

X-axis tool offset value (geometry) 
Z-axis tool offset value (geometry) 
Y-axis tool offset value (geometry) 
4th axis tool offset value (geometry) 
                      : 
50th axis tool offset value (geometry) 

#5121 
#5122 
#5123 
#5124 

#5140 

[#_TOFSGX] 
[#_TOFSGZ] 
[#_TOFSGY] 
[#_TOFSG[4]] 

[#_TOFSG[20]]

X-axis tool offset value (geometry) 
Z-axis tool offset value (geometry) 
Y-axis tool offset value (geometry) 
4th axis tool offset value (geometry) 
                      : 
20th axis tool offset value (geometry) 

#100901 
#100902 
#100903 
#100904 

#100950 

[#_TOFSGX] 
[#_TOFSGZ] 
[#_TOFSGY]  
[#_TOFSG[4]] 

[#_TOFSG[50]]

X-axis tool offset value (geometry) 
Z-axis tool offset value (geometry) 
Y-axis tool offset value (geometry) 
4th axis tool offset value (geometry) 
                      : 
50th axis tool offset value (geometry) 

Disabled 

 
When tool geometry/wear compensation memory exists, the system 
variable values vary as follows depending on parameter LWT 
(No.5002#2) and parameter LGT (No.5002#4). 
 

Variable 

number

LWT=0 

LGT=0 

LWT=1 

LGT=0

 

LWT=0 

LGT=1 

LWT=1 

LGT=1 

#5081 
#5082 
#5083 

Wear 
compensation 

Wear 
compensation 

Wear 
compensation 

#5121 
#5122 
#5123 

Geometry 
compensation 

Wear 
compensation + 
Geometry 
compensation 

Geometry 
compensation 

Geometry 
compensation 

 

NOTE 

1  The set value is read as the tool offset regardless 

of bit 1 (ORC) of parameter No.5004 and bit 0 
(OWD) of parameter No.5040. 

2  To read the tool offset (geometry) using #5121 to 

#5123, set bit 2 (VHD) of parameter No.6004 to 0. 

 

 

 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 489 - 

  - Servo position deviation #5101-#5120, #100251-#100300 (Attribute:    R) 

The servo position deviation for each axis can be obtained by reading 
system variables #5101 to #5120 or #100251 to #100300. 

 

Variable 

number 

Variable name

Position information 

Read operation 

during 

movement 

#5101 
#5102 

#5120 

[#_SVERR[1]] 
[#_SVERR[2]] 

[#_SVERR[20]]

1st axis servo position deviation 
2nd axis servo position deviation 

20th axis servo position deviation 

#100251 
#100252 

#100300 

[#_SVERR[1]] 
[#_SVERR[2]] 

[#_SVERR[50]]

1st axis servo position deviation 
2nd axis servo position deviation 

50th axis servo position deviation 

Disabled 

 

NOTE 

1  When variables exceeding the number of control 

axes are specified, the alarm PS0115, “VARIABLE 
NO. OUT OF RANGE” occurs. 

2  The servo position deviation for 20th or earlier axis 

can be used with #5101 to #5120. 

 

  - Manual handle interruption #5121-#5140, #100651-#100700 (Attribute:    R) 

The manual handle interruption for each axis can be obtained by 
reading system variables #5121 to #5140 or #100651 to #100700. 

 

Variable 

number 

Variable 

name 

Position information 

Read operation 

during 

movement 

#5121 
#5122 

#5140 

[#_MIRTP[1]]
[#_MIRTP[2]]

[#_MIRTP[20]]

1st axis manual handle interruption 
2nd axis manual handle interruption 

20th axis manual handle interruption 

#100651 
#100652 

#100700 

[#_MIRTP[1]]
[#_MIRTP[2]]

[#_MIRTP[50]]

1st axis manual handle interruption 
2nd axis manual handle interruption 

50th axis manual handle interruption 

Disabled 

 

NOTE 

1  When variables exceeding the number of control 

axes are specified, the alarm PS0115, “VARIABLE 
NO. OUT OF RANGE” occurs. 

2  The manual handle interruption for 20th or earlier 

axis can be used with #5121 to #5140. 

 

T

 

NOTE 

 

#5121 to #5140 are enabled only when bit 2 (VHD) 
of parameter No.6004 is set to 1. 

 

 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 490 - 

  - Distance to go #5181-#5200, #100801-#100850 (Attribute:  R) 

The distance to go value for each axis can be obtained by reading 
system variables #5181 to #5200 or #100801 to #100850. 
 

Variable 

number

Variable 

name 

Position information 

Read operation 

during movement

#5181 
#5182 

#5200 

[#_DIST[1]]
[#_DIST[2]]

[#_DIST[20]]

1st axis distance to go value 
2nd axis distance to go value 

20th axis distance to go value 

#100801
#100802

#100850

[#_DIST[1]]
[#_DIST[2]]

[#_DIST[50]]

1st axis distance to go value 
2nd axis distance to go value 

50th axis distance to go value 

Disabled 

 

NOTE 

1  When variables exceeding the number of control 

axes are specified, the alarm PS0115, “VARIABLE 
NO. OUT OF RANGE” occurs. 

2  The distance to go values for 20th or earlier axis 

can be used with #5181 to #5200. 

 

  - Workpiece coordinate system shift value #2501, #2601 (Attribute:    R/W) 

 

T

 

The X-axis workpiece coordinate system shift value can be obtained 
by system variable #2501 while Z-axis workpiece coordinate system 
shift value by system variable #2601. Each workpiece coordinate 
system shift value can be obtained by system variable 
#100751-#100800.  The X-axis or Z-axis workpiece coordinate 
system shift value can be changed by assigning values to the system 
variables.  (X-axis: X-axis of basic three axes, Z-axis: Z-axis of basic 
three axes, Y-axis: Y-axis of basic three axes) 
 

Variable number

Variable name

Description 

  #2501 

  [#_WZ_SFTX] 

X-axis workpiece shift value 

  #2601 

  [#_WZ_SFTZ] 

Z-axis workpiece shift value 

 #100751 
 #100752 
 : 
 #100800 

[#_WZ_SFT[1]] 

[#_WZ_SFT [2]]

[#_WZ_SFT [50]]

1st axis workpiece shift value 
2nd axis workpiece shift value 

50th axis workpiece shift value 

 

NOTE 

1  The value of a variable with a number greater than 

the number of controlled axes is undefined.

 

2  The X-axis of three basic axes can also be used in 

system variable #2501, and the Z-axis of three basic 
axes can also be used in system variable #2601. 

 

 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 491 - 

  - Workpiece origin offset value #5201-#5340, #100301-#100650 (Attribute:    R/W) 

 
The workpiece origin offset value can be obtained by reading system 
variables #5201 to #5340 or #100301 to #100650.    The offset value 
can also be changed by assigning values to the system variables. 
 

Variable 

number 

Variable name

Controlled axis 

Workpiece 

coordinate system

#5201 
#5202 

#5220 

[#_WZCMN[1]] 
[#_WZCMN[2]] 

[#_WZCMN[20]] 

1st axis external workpiece origin offset value 
2nd axis external workpiece origin offset value 

20th axis external workpiece origin offset value 

External workpiece 
origin offset value 
(applied to all 
coordinate systems)

#5221 
#5222 

#5240 

[#_WZG54[1]] 
[#_WZG54[2]] 

[#_WZG54[20]] 

1st axis workpiece origin offset value 
2nd axis workpiece origin offset value 

20th axis workpiece origin offset value 

G54 

#5241 
#5242 

#5260 

[#_WZG55[1]] 
[#_WZG55[2]] 

[#_WZG55[20]] 

1st axis workpiece origin offset value 
2nd axis workpiece origin offset value 

20th axis workpiece origin offset value 

G55 

#5261 
#5262 

#5280 

[#_WZG56[1]] 
[#_WZG56[2]] 

[#_WZG56[20]] 

1st axis workpiece origin offset value 
2nd axis workpiece origin offset value 

20th axis workpiece origin offset value 

G56 

#5281 
#5282 

#5300 

[#_WZG57[1]] 
[#_WZG57[2]] 

[#_WZG57[20]] 

1st axis workpiece origin offset value 
2nd axis workpiece origin offset value 

20th axis workpiece origin offset value 

G57 

#5301 
#5302 

#5320 

[#_WZG58[1]] 
[#_WZG58[2]] 

[#_WZG58[20]] 

1st axis workpiece origin offset value 
2nd axis workpiece origin offset value 

20th axis workpiece origin offset value 

G58 

#5321 
#5322 

#5340 

[#_WZG59[1]] 
[#_WZG59[2]] 

[#_WZG59[20]] 

1st axis workpiece origin offset value 
2nd axis workpiece origin offset value 

20th axis workpiece origin offset value 

G59 

#100301 
#100302 

#100350 

[#_WZCMN[1]] 
[#_WZCMN[2]] 

[#_WZCMN[50]] 

1st axis external workpiece origin offset value 
2nd axis external workpiece origin offset value 

50th axis external workpiece origin offset value 

External workpiece 
origin offset value 
(applied to all 
coordinate systems)

#100351 
#100352 

#100400 

[#_WZG54[1]] 
[#_WZG54[2]] 

[#_WZG54[50]] 

1st axis workpiece origin offset value 
2nd axis workpiece origin offset value 

50th axis workpiece origin offset value 

G54 

#100401 
#100402 

#100450 

[#_WZG55[1]] 
[#_WZG55[2]] 

[#_WZG55[50]] 

1st axis workpiece origin offset value 
2nd axis workpiece origin offset value 

50th axis workpiece origin offset value 

G55 

#100451 
#100452 

#100500 

[#_WZG56[1]] 
[#_WZG56[2]] 

[#_WZG56[50]] 

1st axis workpiece origin offset 
2nd axis workpiece origin offset 

50th axis workpiece origin offset 

G56 

 

 

 

 

 

 

 

Content      ..     64      65      66      67     ..