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

 

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

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     59      60      61      62     ..

 

 

 

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

 

 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 444 - 

[Example]  SETVN 510[TOOL_NO, WORK_NO, COUNTER1, COUNTER2]; 
 

The command above names the variables as follows. 

Variable Name 

#510 TOOL_NO 
#511 WORK_NO 
#512 COUNTER1 
#513 COUNTER2 

 

The names specified by the command can be used in a 
program.  For example, when 10 is assigned to #510, the 
expression [#TOOL_NO]=10; can be used instead #510=10;.

 

 

NOTE 

 

If the same name was specified for different 
common variables, only the variable which has the 
smaller variable number can be referenced with the 
specified name. 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 445 - 

16.2 

SYSTEM VARIABLES 

 
System variables can be used to read and write internal CNC data such 
as tool compensation values and current position data.  System 
variables are essential for automation and general-purpose program 
development. 
 

List of system variables and constants 

n represents a subscript. 
R, W, and R/W are attributes of a variable and indicate read-only, 
write-only, and read/write enabled, respectively. 
 

 - Interface signals 

System 

variable 

number 

System 

variable 

name 

Attribute Description 

#1000-#1031 [#_UI[n]] 

R  Interface 

input signals (BIT), UI000-UI031 

NOTE)  Subscript n represents a BIT position (0-31). 

#1032-#1035  [#_UIL[n]] 

Interface input signals (LONG), UI000-UI031/ UI100-UI131/ 
UI200-UI231/UI300-UI331 
NOTE)  Subscript n (0-3):    0 = UI000-UI031, 1 = UI100-UI131,   

2 = UI200-231, 3 = UI300-UI331 

#1100-#1131 [#_UO[n]] 

R/W  Interface 

output signals (BIT), UO000-UO031 

NOTE)  Subscript n represents a BIT position (0-31). 

#1132-#1135 [#_UOL[n]]  R/W  Interface 

output signals (LONG), UO000-UO031/   

UO100-UO131/UO200-UO231/UO300-UO331 
NOTE)  Subscript n (0-3):    0 = UO000-UO031, 1 = UO100-UO131,   

2 = UO200-231, 3 = UO300-UO331 

 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 446 - 

  - Tool compensation value 

 

M

 

Tool compensation memory A 

System variable 

number 

System 

variable name

Attribute

Description 

#2001-#2200 
 
 
#10001-#10999 

[#_OFS[n]] 

R/W 

Tool compensation value 
Note)  Subscript n represents a compensation 

number (1 to 200). 

When the number of sets is larger than 200, 
the numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

 

Tool compensation memory B when bit 3 (V15) of parameter No.6000 = 0 

System variable 

number 

System 

variable name

Attribute

Description 

#2001-#2200 

Tool compensation value (wear) 
Note)  Subscript n represents a compensation 

number (1 to 200). 

#10001-#10999 

[#_OFSW[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2201-#2400 

Tool compensation value (H code, geometry) 
Note)  Subscript n represents a compensation 

number (1 to 200). 

#11001-#11999 

[#_OFSG[n]]  

R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

 

Tool compensation memory B when bit 3 (V15) of parameter No.6000 = 1 

System variable 

number 

System 

variable name

Attribute

Description 

#2001-#2200 

Tool compensation value (geometry) 
Note)  Subscript n represents a compensation 

number (1 to 200). 

#10001-#10999 

[#_OFSG[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2201-#2400 

Tool compensation value (H code, wear) 
Note)  Subscript n represents a compensation 

number (1 to 200). 

#11001-#11999 

[#_OFSW[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 447 - 

Tool compensation memory C when bit 3 (V15) of parameter No.6000 = 0 

System variable 

number 

System 

variable name

Attribute

Description 

#2001-#2200 

Tool compensation value (H code, wear) 
Note)  Subscript n represents a compensation 

number (1 to 200). 

#10001-#10999 

[#_OFSHW[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2201-#2400 

Tool compensation value (H code, geometry) 
Note)  Subscript n represents a compensation 

number (1 to 200). 

#11001-#11999 

[#_OFSHG[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#12001-#12999 [#_OFSDW[n]]  R/W Tool 

compensation value (D code, wear) 

Note)  Subscript n represents a compensation 

number (1 to 999). 

# 13001-#13999 

[#_OFSDG[n]] 

R/W 

Tool compensation (D code, geometry) 
Note)  Subscript n represents a compensation 

number (1 to 999). 

 

Tool compensation memory C when bit 3 (V15) of parameter No.6000 = 1 

System variable 

number 

System 

variable name

Attribute

Description 

#2001-#2200 

Tool compensation value (H code, geometry) 
Note)  Subscript n represents a compensation 

number (1 to 200). 

#10001-#10999 

[#_OFSHG[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2201-#2400 

Tool compensation value (H code, wear) 
Note)  Subscript n represents a compensation 

number (1 to 200). 

#11001-#11999 

[#_OFSHW[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2401-#2600 

Tool compensation value (D code, geometry) 

(Note 2)

 

Note 1)  Subscript n represents a 

compensation number (1 to 200). 

Note 2)  Enabled when bit 5 (D15) of 

parameter No.6004 = 1. 

#12001-#12999 

[#_OFSDG[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2601-#2800 

Tool compensation value (D code, wear) 

(Note 2)

Note 1)  Subscript n represents a 

compensation number (1 to 200). 

Note 2)  Enabled when bit 5 (D15) of 

parameter No.6004 = 1. 

#13001-#13999 

[#_OFSDW[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 448 - 

 

  - Tool compensation value 

 

T

 

Without tool geometry/wear compensation memory 

System variable 

number 

System 

variable name

Attribute

Description 

#2001-#2064 
 
 
#10001-#10999 

[#_OFSX[n]] R/W 

X-axis 

compensation value (*1) 

Note)  Subscript n represents a compensation 

number (1 to 64). 

When the number of sets is larger than 64, the 
numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2101-#2164 
 
 
#11001-#11999 

[#_OFSZ[n]] 

R/W 

Z-axis compensation value (*1) 
Note)  Subscript n represents a compensation 

number (1 to 64). 

When the number of sets is larger than 64, the 
numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2201-#2264 
 
 
#12001-#12999 

[#_OFSR[n]] R/W 

Tool 

nose 

radius compensation value 

Note)  Subscript n represents a compensation 

number (1 to 64). 

When the number of sets is larger than 64, the 
numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2301-#2364 
 
 
#13001-#13999 

[#_OFST[n]] 

R/W 

Virtual tool tip T position 
Note)  Subscript n represents a compensation 

number (1 to 64). 

When the number of sets is larger than 64, the 
numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2401-#2449 
 
 
#14001-#14999 

[#_OFSY[n]] R/W 

Y-axis 

compensation value (*1) 

Note)  Subscript n represents a compensation 

number (1 to 49). 

When the    number of sets is larger than 49, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

(*1) X-axis: X-axis of basic three axes, Z-axis: Z-axis of basic three 

axes, Y-axis: Y-axis of basic three axes 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 449 - 

With tool geometry/wear compensation memory 

System variable 

number 

System 

variable name

Attribute

Description 

#2001-#2064 
 
 
#10001-#10999 

[#_OFSXW[n]] R/W 

X-axis 

compensation value (wear) (*1) 

Note)  Subscript n represents a compensation 

number (1 to 64). 

When the    number of sets is larger than 64, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2101-#2164 
 
 
#11001-#11999 

[#_OFSZW[n]] 

R/W 

Z-axis compensation value (wear) (*1) 
Note)  Subscript n represents a compensation 

number (1 to 64). 

When the    number of sets is larger than 64, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2201-#2264 
 
 
#12001-#12999 

[#_OFSRW[n]] 

R/W 

Tool nose radius compensation value (wear) 
Note)  Subscript n represents a compensation 

number (1 to 64). 

When the    number of sets is larger than 64, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2301-#2364 
 
 
#13001-#13999 

[#_OFST[n]] 

R/W 

Virtual tool tip T position 
Note)  Subscript n represents a compensation 

number (1 to 64). 

When the    number of sets is larger than 64, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2401-#2449 
 
 
#14001-#14999 

[#_OFSYW[n]] 

R/W 

Y-axis compensation value (wear) (*1) 
Note)  Subscript n represents a compensation 

number (1 to 49). 

When the    number of sets is larger than 49, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2451-#2499 
 
 
#19001-#19999 

[#_OFSYG[n]] R/W 

Y-axis 

compensation value (geometry) (*1) 

Note)  Subscript n represents a compensation 

number (1 to 49). 

When the    number of sets is larger than 49, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2701-#2749 
 
 
#15001-#15999 

[#_OFSXG[n]]

 

R/W X-axis 

compensation 

value (geometry) (*1) 

Note)  Subscript n represents a compensation 

number (1 to 49). 

When the    number of sets is larger than 49, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 49). 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 450 - 

System variable 

number 

System 

variable name

Attribute

Description 

#2801-#2849 
 
 
#16001-#16999 

[#_OFSZG[n]] R/W 

Z-axis 

compensation value (geometry) (*1) 

Note)  Subscript n represents a compensation 

number (1 to 49). 

When the    number of sets is larger than 49, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#2901-#2964 
 
 
 
#17001-#17999 

[#_OFSRG[n]] R/W 

Tool 

nose 

radius compensation value 

(geometry) 
Note)  Subscript n represents a compensation 

number (1 to 64). 

When the    number of sets is larger than 64, 
the numbers to the left can be used. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

(*1) X-axis: X-axis of basic three axes, Z-axis: Z-axis of basic three 

axes, Y-axis: Y-axis of basic three axes 

 

  - Workpiece coordinate system shift amount 

T

 

System variable 

number 

System 

variable name

Attribute

Description 

#2501 

[#_WKSFTX] 

R/W 

X-axis workpiece shift amount 

#2601 

[#_WKSFTZ] 

R/W 

Z-axis workpiece shift amount 

#100751 to   

#100800 

[#_WZ_SFT [n]]

R/W 

nth axis workpiece shift amount 
Note)  Subscript n represents an axis number 

(1 to 50). 

X-axis: X-axis of basic three axes, Z-axis: Z-axis of basic three axes 
 

 

  - Automatic operation or the like 

System variable 

number 

System 

variable name

Attribute

Description 

#3000 [#_ALM] W 

Macro 

alarm 

#3001 

[#_CLOCK1] 

R/W 

Clock 1 (ms) 

#3002 

[#_CLOCK2] 

R/W 

Clock 2 (hr) 

#3003 

[#_CNTL1] 

R/W 

Enable or disable the suppression of single 
block stop. 
Enable or disable the waiting of the auxiliary 
function completion signal. 

#3003 bit 0 

[#_M_SBK] 

R/W 

Enable or disable the suppression of single 
block stop. 

#3003 bit 1 

[#_M_FIN] 

R/W 

Enable or disable waiting for the auxiliary 
function completion signal. 

#3004 [#_CNTL2] 

R/W 

Enable 

or disable feed hold. 

Enable or disable feedrate override. 
Enable or disable exact stop check. 

#3004 bit 0 

[#_M_FHD] 

R/W 

Enable or disable feed hold. 

#3004 bit 1 

[#_M_OV] 

R/W 

Enable or disable feedrate override. 

#3004 bit 2 

[#_M_EST] 

R/W 

Enable or disable exact stop check. 

#3005 [#_SETDT] 

R/W 

Read/write setting data. 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 451 - 

System variable 

number 

System 

variable name

Attribute

Description 

#3006 

[#_MSGSTP] 

Stop with a message. 

#3007 [#_MRIMG] 

Status 

of 

a mirror image (DI and setting) 

#3008 [#_PRSTR] 

Restarting/not restarting a program 

 

 - Time 

System variable 

number 

System 

variable name

Attribute

Description 

#3011 [#_DATE] 

Year/Month/Date 

#3012 [#_TIME] R 

Hour/Minute/Second 

 

  - Number of parts 

System variable 

number 

System 

variable name

Attribute

Description 

#3901 

[#_PRTSA] 

R/W 

Total number of parts 

#3902 

[#_PRTSN] 

R/W 

Number of required parts 

 

  - Tool compensation memory 

 

M

 

System variable 

number 

System 

variable name

Attribute

Description 

#3980 

[#_OFSMEM] 

Tool compensation memory information 

 

 

  - Main program number 

System variable 

number 

System 

variable name

Attribute

Description 

#4000 

[#_MAINO] 

Main program number 

 

 

 

 

 

 

 

 

Content      ..     59      60      61      62     ..