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

 

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

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     61      62      63      64     ..

 

 

 

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

 

 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 460 - 

System variable 

number 

System 

variable name

Attribute

Description 

#7941-#7960 [#_WZP48[n]]  R/W 

G54.1P48 workpiece origin offset value 
Note)  Subscript n represents an axis number 

(1 to 20). 

#101001-#101050 [#_WZP1[n]] 

R/W  G54.1P1 workpiece origin offset value 

Note)  Subscript n represents an axis number 

(1 to 50). 

#101051-#101100 [#_WZP2[n]] 

R/W  G54.1P2 workpiece origin offset value 

Note)  Subscript n represents an axis number 

(1 to 50). 





#115901-#115950 [#_WZP299[n]]

R/W  G54.1P299 workpiece origin offset value 

Note) 

(1 to 50). 

#115951-#116000 [#_WZP300[n]]

R/W  G54.1P300 workpiece origin offset value 

Note)  Subscript n represents an axis number 

(1 to 50). 

 

 

  - Skip position (detection unit) 

System variable 

number 

System 

variable name

Attribute

Description 

#5421-#5440 

Skip position (detection unit) 
Note)  Subscript n represents an axis number 

(1 to 20). 

#100701-#100750 

[#_SKPDTC[n]]

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number 

(1 to 50). 

 

  - Rotary table dynamic fixture offset value 

 

M

 

System variable 

number 

System 

variable name

Attribute

Description 

#5500 

[#_FOFSP] 

Number of the standard fixture offset being 
selected (P) 

#5501-#5520 

Offset value of the standard fixture offset being 
selected 
Note)  Subscript n represents an axis number 

(1 to 20). 

#117001-#117050 

[#_FOFSVAL[n]]

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number 

(1 to 50). 

#5521-#5540 

Standard fixture offset value (first set) 
Note)  Subscript n represents an axis number 

(1 to 20). 

#117051-#117100 

[#_FOFS1[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number 

(1 to 50). 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 461 - 

System variable 

number 

System 

variable name

Attribute

Description 

#5541-#5560 

Standard fixture offset value (second set) 
Note)  Subscript n represents an axis number 

(1 to 20). 

#117101-#117150 

[#_FOFS2[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number 

(1 to 50). 

#5561-#5580 

Standard fixture offset value (third set) 
Note)  Subscript n represents an axis number 

(1 to 20). 

#117151-#117200 

[#_FOFS3[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number 

(1 to 50). 

#5581-#5600 

Standard fixture offset value (fourth set) 
Note)  Subscript n represents an axis number 

(1 to 20). 

#117201-#117250 

[#_FOFS4[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number

(1 to 50). 

#5601-#5620 

Standard fixture offset value (fifth set) 
Note)  Subscript n represents an axis number 

(1 to 20). 

 

#117251-#117300 

[#_FOFS5[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number 

(1 to 50). 

#5621-#5640 

Standard fixture offset value (sixth set) 
Note)  Subscript n represents an axis number 

(1 to 20). 

#117301-#117350 

[#_FOFS6[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number 

(1 to 50). 

#5641-#5660 

Standard fixture offset value (seventh set) 
Note)  Subscript n represents an axis number 

(1 to 20). 

#117351-#117400 

[#_FOFS7[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number 

(1 to 50). 

#5661-#5680 

Standard fixture offset value (eighth set) 
Note)  Subscript n represents an axis number 

(1 to 20). 

#117401-#117450 

[#_FOFS8[n]] R/W 

The numbers to the left can also be used. 
Note)  Subscript n represents an axis number 

(1 to 50). 

 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 462 - 

  - Second geometry tool offset value 

 

T

 

System variable 

number 

System 

variable name

Attribute

Description 

#5801-#5832 
 
 
 
#27001-#27999 

[#_OFSX2G[n]]

R/W Second 

geometry tool offset X-axis 

compensation value 
Note)  Subscript n represents a compensation 

number (1 to 32). 

If the number of pairs is greater than 32, the 
numbers on the left are also permitted. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#5833-#5864 
 
 
 
#28001-#28999 

[#_OFSZ2G[n]]

R/W 

Second geometry tool offset Z-axis 
compensation value 
Note)  Subscript n represents a compensation 

number (1 to 32). 

If the number of pairs is greater than 32, the 
numbers on the left are also permitted. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

#5865-#5896 
 
 
 
#29001-#29999 

[#_OFSY2G[n]]

R/W Second 

geometry tool offset Y-axis 

compensation value 
Note)  Subscript n represents a compensation 

number (1 to 32). 

If the number of pairs is greater than 32, the 
numbers on the left are also permitted. 
Note)  Subscript n represents a compensation 

number (1 to 999). 

 

  - Dynamic standard tool compensation value 

 

M

 

System variable 

number 

System 

variable name

Attribute

Description 

#118051-#118100 [#_DOFS1[n]] 

R/W  Dynamic standard tool compensation value 

(first set) 

Note)  Subscript n represents an axis number 

(1 to 50). 

#118101-#118150 [#_DOFS2[n]] 

R/W  Dynamic standard tool compensation value 

(second set) 
Note)  Subscript n represents an axis number 

(1 to 50). 

#118151-#118200 [#_DOFS3[n]] 

R/W  Dynamic standard tool compensation value 

(third set) 

Note)  Subscript n represents an axis number 

(1 to 50). 

#118201-#118250 [#_DOFS4[n]] 

R/W  Dynamic standard tool compensation value 

(fourth set) 

Note)  Subscript n represents an axis number 

(1 to 50). 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 463 - 

System variable 

number 

System 

variable name

Attribute

Description 

#118251-#118300 [#_DOFS5[n]] 

R/W  Dynamic standard tool compensation value 

(fifth set) 

Note)  Subscript n represents an axis number 

(1 to 50). 

#118301-#118350 [#_DOFS6[n]] 

R/W  Dynamic standard tool compensation value 

(sixth set) 

Note)  Subscript n represents an axis number 

(1 to 50). 

#118351-#118400 [#_DOFS7[n]] 

R/W  Dynamic standard tool compensation value 

(seventh set) 
Note)  Subscript n represents an axis number 

(1 to 50). 

#118401-#118450 [#_DOFS8[n]] 

R/W  Dynamic standard tool compensation value 

(eighth set) 
Note)  Subscript n represents an axis number 

(1 to 50). 

 

 

 

  - Feedrate reduction ratio for rapid traverse overlap 

 

System variable 

number 

System 

variable name

Attribute

Description 

#100851- 

#100900 

[#_ROVLP [n]] 

R/W 

Feedrate reduction ratio for rapid traverse 
overlap 
Note)  Subscript n represents an axis number 

(1 to 50). 

 

 - System constant 

 

System constant 

number 

System 

constant name

Attribute

Description 

#0, #3100 

[#_EMPTY] 

Null 

#3101 [#_PI] 

Circular 

constant 

π

   

= 3.14159265358979323846

#3102 

[#_E] 

Base of natural logarithm e 

= 2.71828182845904523536

 
 

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 464 - 

Explanation 

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

  - Interface signal #1000-#1031, #1032, #1033-#1035 (Attribute:    R) 
   

#1100-#1115, #1132, #1133-#1135 (Attribute:  R/W) 

[Input signal] 
The status of interface input signals can be obtained by reading the 
value of system variables #1000 to #1032. 
 

Variable 

number 

Variable 

name 

Point 

Interface input signal 

#1000 

[#_UI[0]] 

UI000  (2

0

#1001 

[#_UI[1]] 

UI001  (2

1

#1002 

[#_UI[2]] 

UI002  (2

2

#1003 

[#_UI[3]] 

UI003  (2

3

#1004 

[#_UI[4]] 

UI004  (2

4

#1005 

[#_UI[5]] 

UI005  (2

5

#1006 

[#_UI[6]] 

UI006  (2

6

#1007 

[#_UI[7]] 

UI007  (2

7

#1008 

[#_UI[8]] 

UI008  (2

8

#1009 

[#_UI[9]] 

UI009  (2

9

#1010 

[#_UI[10]] 

UI010  (2

10

#1011 

[#_UI[11]] 

UI011  (2

11

#1012 

[#_UI[12]] 

UI012  (2

12

#1013 

[#_UI[13]] 

UI013  (2

13

#1014 

[#_UI[14]] 

UI014  (2

14

#1015 

[#_UI[15]] 

UI015  (2

15

#1016 

[#_UI[16]] 

UI016  (2

16

#1017 

[#_UI[17]] 

UI017  (2

17

#1018 

[#_UI[18]] 

UI018  (2

18

#1019 

[#_UI[19]] 

UI019  (2

19

#1020 

[#_UI[20]] 

UI020  (2

20

#1021 

[#_UI[21]] 

UI021  (2

21

#1022 

[#_UI[22]] 

UI022  (2

22

#1023 

[#_UI[23]] 

UI023  (2

23

#1024 

[#_UI[24]] 

UI024  (2

24

#1025 

[#_UI[25]] 

UI025  (2

25

#1026 

[#_UI[26]] 

UI026  (2

26

#1027 

[#_UI[27]] 

UI027  (2

27

#1028 

[#_UI[28]] 

UI028  (2

28

#1029 

[#_UI[29]] 

UI029  (2

29

#1030 

[#_UI[30]] 

UI030  (2

30

#1031 

[#_UI[31]] 

UI031  (2

31

#1032 [#_UIL[0]]  32 

UI000-UI031 

#1033 [#_UIL[1]]  32 

UI100-UI131 

#1034 [#_UIL[2]]  32 

UI200-UI231 

#1035 [#_UIL[3]]  32 

UI300-UI331 

 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 465 - 

 

Variable value

Input signal 

1.0 Contact 

closed

0.0 Contact 

opened

 
Since the read value is 1.0 or 0.0 regardless of the unit system, the unit 
system must be considered when a macro is created. 
The input signals at 32 points can be read at a time by reading from 
system variables #1032 to #1035. 
 

 

31

30

0

2

1031

#

2

]

1000

[

#

1032

#

×

×

+

=

=

i

i

i

 

 

 

{

}

=

×

×

=

+

30

0

31

31

2

2

]

1032

[

#

i

i

i

V

V

n

 

 

 

When UIn

= 0, V

i

 = 0.

 

 When 

UIn

i

 = 1, V

i

 = 1.

 

 

 

n = 0-3

 

 
[Output signal] 
Interface output signals can be sent by assigning values to system 
variables #1100 to #1132 for sending interface signals. 
 

Variable 

number 

Variable 

name 

Point 

Interface input signal 

#1100 

[#_UO[0]] 

UO000  (2

0

#1101 

[#_UO[1]] 

UO001  (2

1

#1102 

[#_UO[2]] 

UO002  (2

2

#1103 

[#_UO[3]] 

UO003  (2

3

#1104 

[#_UO[4]] 

UO004  (2

4

#1105 

[#_UO[5]] 

UO005  (2

5

#1106 

[#_UO[6]] 

UO006  (2

6

#1107 

[#_UO[7]] 

UO007  (2

7

#1108 

[#_UO[8]] 

UO008  (2

8

#1109 

[#_UO[9]] 

UO009  (2

9

#1110 

[#_UO[10]] 

UO010  (2

10

#1111 

[#_UO[11]] 

UO011  (2

11

#1112 

[#_UO[12]] 

UO012  (2

12

#1113 

[#_UO[13]] 

UO013  (2

13

#1114 

[#_UO[14]] 

UO014  (2

14

#1115 

[#_UO[15]] 

UO015  (2

15

#1116 

[#_UO[16]] 

UO016  (2

16

#1117 

[#_UO[17]] 

UO017  (2

17

#1118 

[#_UO[18]] 

UO018  (2

18

#1119 

[#_UO[19]] 

UO019  (2

19

#1120 

[#_UO[20]] 

UO020  (2

20

#1121 

[#_UO[21]] 

UO021  (2

21

#1122 

[#_UO[22]] 

UO022  (2

22

#1123 

[#_UO[23]] 

UO023  (2

23

#1124 

[#_UO[24]] 

UO024  (2

24

16.CUSTOM MACRO

 PROGRAMMING 

B-63944EN/03

 

 

- 466 - 

Variable 

number 

Variable 

name 

Point 

Interface input signal 

#1125 

[#_UO[25]] 

UO025  (2

25

#1126 

[#_UO[26]] 

UO026  (2

26

#1127 

[#_UO[27]] 

UO027  (2

27

#1128 

[#_UO[28]] 

UO028  (2

28

#1129 

[#_UO[29]] 

UO029  (2

29

#1130 

[#_UO[30]] 

UO030  (2

30

#1131 

[#_UO[31]] 

UO031  (2

31

#1132 [#_UOL[0]]  32 

UO000-UO031 

#1133 [#_UOL[1]]  32 

UO100-UO131 

#1134 [#_UOL[2]]  32 

UO200-UO231 

#1135 [#_UOL[3]]  32 

UO300-UO331 

 

Variable value

Input signal 

1.0 Contact 

closed

0.0 Contact 

opened

 
The output signals at 32 points can be written at a time by writing to 
system variables #1132 to #1135.    The signals can also be read. 
 

 

31

30

0

2

1131

#

2

]

1000

[

#

1132

#

×

×

+

=

=

i

i

i

 

 

 

{

}

=

×

×

=

+

30

0

31

31

2

2

]

1132

[

#

i

i

i

V

V

n

 

 

 

When UIn

i

 = 0, V

i

 = 0.

 

 When 

UIn

i

 = 1, V

i

 = 1.

 

 

 

n = 0-3

 

 

NOTE 

1  When a value other than 1.0 or 0.0 is assigned to 

variables #1100 to #1131, it is assumed as follows. 

 

<null> is assumed to be 0. 

 

A value other than <null> or 0 is assumed to be 1. 

 

Where, a value less than 0.00000001 is undefined. 

2  When any of UI016 to UI031, UI100 to UI131, 

UI200 to UI231, UI300 to UI331, UO016 to UO031, 
UO200 to UO231, and UO300 to UO331 are used, 
parameter MIF (No.6001#0) must be set to 1. 

 

B-63944EN/03

 PROGRAMMING 

16.CUSTOM MACRO

 

 

- 467 - 

Example

 

Structure of DI

 

2

15

  2

14

2

13

2

12

2

11

2

10

2

9

2

8

2

7

2

6

2

5

 

2

4

 

2

3

 

2

2

2

1

2

0

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Used for other 
purposes 

Sign

10

2

 10

1

 10

0

 

 

Structure of DO

 

 

 

 

 

 

 

 

2

8

2

7

2

6

2

5

 

2

4

 

2

3

 

2

2

2

1

2

0

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Not used 

Used for other purposes 

Address 

 
<1>  Address switching signed BCD 3 digits are read.   
 
 

Macro calling instruction 

G65 P9100 D (address);   

 
 

A custom macro body is created as follows. 

O9100 ;   
#1132 = #1132 AND 496 OR#7 ;  :    Address sending 
G65 P9101 T60 ; 

:    Timer macro 

#100 = BIN[#1032 AND 4095] ; 

:    BCD 3 digits are read. 

IF [#1012 EQ    0] GOTO    9100 ;  :    A sign is attached.   
#100 = -#100 
N9100 M99

 

 
<2> Eight types of address switching signed BCD 6 digits (3-digit 

integer part + 3-digit fractional part) are read into #101. 

 
 

Structure on the machine side 

When DO 2

0

 = 0: 

Data with 3 decimal places 

When DO 2

0

 = 1: 

Data with 3-digit integer part 

When DO 2

3

 to 2

1

 = 000:  No1 data when #1 = 0 

When DO 2

3

 to 2

1

 = 001:  No2 data when #2 = 0 

          : 
When DO 2

3

 to 2

1

 = 111: 

No8 data when #8 = 0

 

 
 

Macro calling instruction 

G65   P9101   D (data number); 

 
 

A custom macro body is created as follows. 

O9101 ; 
G65 P9101 D[#1*2+1] ; 
#101 = #100  ;  
G65 P9100 D[#1*2] ;   
#101 = #101 + #100/1000 ; 
M99 ;

 

 

 

 

 

 

 

 

 

Content      ..     61      62      63      64     ..