FANUC Series 0i-MODEL F Plus. CONNECTION MANUAL (FUNCTION) - page 261

 

  Index      Manuals     FANUC Series 0i-MODEL F Plus. CONNECTION MANUAL (FUNCTION) B-64693EN-1/01

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     259      260      261      262     ..

 

 

 

FANUC Series 0i-MODEL F Plus. CONNECTION MANUAL (FUNCTION) - page 261

 

 

12. PROGRAM COMMAND

 

 

B-64693EN-1/01

 

- 2042 - 

 

NOTE 

1  Check the reference position return end signals ZP1 to ZP8 

<Fn094> of the axes actually moving during Composite control. 

2  When parking the master axis during synchronization control, check 

the reference position return end signals ZP1 to ZP8<Fn094> of the 
slave axis. 

3  Bit 3 (IMRx) of parameter No.14000 is not set for the synchronous 

control on the slave axis. When IMRx = 1, the reference position 
return end signals ZP1 to ZP8<Fn094> of the slave axis must be "1". 

 

Warning 

  WARNING 

 

When switching inch input (G20) to metric input (G21) and vice versa, tool 
compensation values are automatically converted. 

 

Note 

NOTE 

1  When the least input increment and the least command increment systems are 

different, the maximum error is half of the least command increment. This error 
is not accumulated. 
(Example) 
  - Increment system : IS-B 
  - Least input increment (for input uit) : In case of "0.0001" inch 
  - Least command increment (for machine unit) : "0.00254" -> "0.003" 
(Difference =   
   0.00046 : About 1/2 of least command increment) 
  Input "0.0001 inch" -> the moving increment of the machine "0.00254 mm". 
  However, when the increment system is IS-B, the value of the movement of the 
  machine becomes "0.003 mm". 
  Therefore, the error margin of "0.00046 mm" (About 1/2 of least command 
  increment) is generated as a difference. 

2  The inch and metric input can also be switched using bit 2 (INI) of parameter No. 

0000. 

3  If a function selected using bit 2 (IRF) of parameter No. 14000 or bit 0 (NIM) of 

parameter No. 11222 is not used, be sure to perform inch/metric switching at the 
reference position (machine coordinate system origin). 

 

B-64693EN-1/01

 

 

12. PROGRAM COMMAND

 

- 2043 - 

Alarm and message 

Number 

Message 

Description 

PS1298 

ILLEGAL INCH/METRIC 
CONVERSION 

(1) When the bit 1 (CIM) of parameter No. 11222 set to 0, and 

the workpiece coordinate system has been shifted from the 
machine coordinate system by the following, the 
inch/metric conversion has been performed. 
- Manual intervention performed with the manual absolute 

signal being off 

- Machine locked 
- Handle interrupt 
- Mirror image   
- Workpiece coordinate system shift caused by local 

coordinate system setting (G52) or workpiece coordinate 
system setting (G92) 

(2)

 

Inch/metric conversion was executed in a modal state 

where it can not command. Check the modal state. 

(3) Inch/metric conversion can not be commanded with 

programmable parameter input or # 3005 (setting data). It 
commands G20/G21 or G70/G71. 

(4) During automatic operation, inch / metric conversion by 

MDI input or PMC window was done. Stop automatic 
operation and command. 

PS5362 

CONVERT INCH/MM AT REF-POS 

(1) When the bit 1 (INAx) of parameter No. 14000 set to 1, the 

inch-metric switch command is executed at a position of 
the machine coordinate system origin other than zero. 

(2) When the bit 3 (IMRx) or bit 2 (IRFx) of parameter No. 

14000 set to 1, the inch-metric switch command is 
executed at the other than reference position (parameter 
No. 1240). Perform an inch/metric conversion after 
returning to the reference position. 

(3) When bit 0 (NIM) of parameter No.11222 set to 1, the 

inch/metric conversion by programmable parameter input 
or #3005 (setting data) was executed at a position other 
than the machine coordinate system origin (position = 
zero). Please command it at the machine coordinate zero 
position. 

 

Reference item 

Manual name 

Item name 

OPERATOR’S MANUAL (B-64694EN) 

Inch metric conversion (G20, G21) 

 

12.6 

CUSTOM MACRO 

12.6.1 

Custom Macro 

Overview 

A  subprogram is useful for repeatedly executing the same operation. With the custom macro function, 
however, variables, operation commands, conditional branches, and so forth can be used to create 
general-purpose programs more simply for pocketing, user-specific canned cycles, and so forth. 
From a machining program, a custom macro can be called with a simple instruction as in the case of a 
subprogram. 

12. PROGRAM COMMAND

 

 

B-64693EN-1/01

 

- 2044 - 

O0001 ;

  :

 :

 :

G65P9010 R50.0 L2 ;
 :

 :

M30 ;

Machining program

Custom macro

O9010 ;

#1=#18/2 ;

G01 G42 X#1 Y#1 F300 ;

G02 X#1 Y-#1 R#1 ;
 :
 :
 :

M99 ;

 

 
Thus, when a function is programmed as a custom macro body, the function can be made more universal. 
This means that a program can be created using variables for values that can change or are not defined yet. 
This feature also leads to application of group technology. 
For example, classify similar workpieces into a group and create a general-purpose custom macro by 
using variables for such a group. Thus, the need for programming for an individual workpiece in the 
group can be eliminated by assigning desired values to the variables. 
 

 

β

 

α

 

 

 
As an example, the bolt hole circle shown above can be created simply. By creating and once registering 
a custom macro for the bolt hole circle, the CNC can operate as if it had a bolt hole circle function. 
The programmer can use the bolt hole circle function by remembering the following command: 
 

G65 Pp Rr A

α

 B

β

 Kk ; 

  P : Macro number of bolt hole circle 
  r :  Radius 
 

α

:  Start angle 

 

β

:  Angle between circles 

  k :  Number of circles 

 

Signal 

Custom Macro Input Signals 

UI000 to UI015<Gn054,Gn055>, UI016 to UI031<Gn056,Gn057>,   
UI100 to UI131<Gn276 to Gn279>, UI200 to UI231<Gn280 to Gn283> 
UI300 to UI331<Gn284 to Gn287> 

  [Classification]  Input signal 
 

[Function]  No function is provided for the control unit. These signals can be read by a custom macro 

as a type of system variable, and are used for interface between custom macros and the 
PMC. 
These signals correspond to system variables as indicated below. 

B-64693EN-1/01

 

 

12. PROGRAM COMMAND

 

- 2045 - 

When the bit 0 (MIF) of parameter No. 6001 is set to 0 : 

Signals 

Q'ty 

Variables 

Correspondence of values 

UI000 
UI001 
UI002 
UI003 

UI014 
UI015 





#1000 
#1001 
#1002 
#1003 

#1014 
#1015 

0 at 0 and 1 at 1 

UI000 to UI015 

16 

#1032 

Unsigned 16-bit binary code 

*1

 

*1

 Variable value #1032 = 

{

}

=

×

+

15

0

2

]

1000

[

#

i

i

i

 

 

 

These system variables cannot be used on the left side of an assignment statement. 

When the bit 0 (MIF) of parameter No. 6001 is set to 1 : 

Signals 

Q'ty 

Variables 

Correspondence of values 

UI000 
UI001 
UI002 
UI003 

UI030 
UI031 





#1000 
#1001 
#1002 
#1003 

#1030 
#1031 

0 at 0 and 1 at 1 

UI000 to UI031 

32 

#1032 

Signed 32-bit binary code 

*1

 

UI100 to UI131 

32 

#1033 

Signed 32-bit binary code 

*1

 

UI200 to UI231 

32 

#1034 

Signed 32-bit binary code 

*1

 

UI300 to UI331 

32 

#1035 

Signed 32-bit binary code 

*1

 

*1

 

Variable value #(1032+n) = 

{

}

=

×

×

30

0

31

31

i

2

2

i

i

V

V

 

 

 

Where Vi=0 when UIni is 0 and Vi=1 when UIni is 1 

 

n : 0 to 3 

 

These system variables cannot be used on the left side of an assignment statement. 

 

Custom Macro Output Signals 
 

UO000 to UO015<Fn054,Fn055>, UO100 to UO131<Fn056 to Fn059> 
UO016 to UO031<Fn276,Fn277>, UO200 to UO231<Fn280 to Fn283> 
UO300 to UO331<Fn284 to Fn287> 

  [Classification]  Output signal 
 

[Function]  No function is provided for the control unit. These signals can be read or written by a 

custom macro as a type of system variable, and are used for interface between custom 
macros and the PMC. 
These signals correspond to system variables as indicated below. 

 

When the bit 0 (MIF) of parameter No. 6001 is set to 0 : 

Signals 

Q'ty 

Variables 

Correspondence of values 

UO000 
UO001 
UO002 
UO003 

UO014 
UO015 





#1100 
#1101 
#1102 
#1103 

#1114 
#1115 

0 at 0 and 1 at 1 

UO000 to UO015 

16 

#1132 

Unsigned 16-bit binary code 

*1

 

UO100 to UO131 

32 

#1133 

Signed 32-bit binary code 

*2

 

12. PROGRAM COMMAND

 

 

B-64693EN-1/01

 

- 2046 - 

*1  Variable value #1132 = 

[

]

{

}

=

×

+

15

0

2

1100

#

i

i

i

 

 

*2  Variable value #1133 = 

{

}

=

×

×

30

0

31

31

i

2

2

i

i

V

V

 

 

Where Vi=0 when UO1i is 0and Vi=1 when UO1i is 1 

 

These system variables can be used on the left side of an assignment statement as 
well as on the right side. 

 

The value assigned to the system variable used  on the left side last is used for the 
value of the system variable to be assigned (sent) on the right side. 

 

When the bit 0 (MIF) of parameter No. 6001 is set to 1 : 

Signals 

Q'ty 

Variables 

Correspondence of values 

UO000 
UO001 
UO002 
UO003 

UO030 
UO031 





#1100 
#1101 
#1102 
#1103 

#1130 
#1131 

0 at 0 and 1 at 1 

UO000 to UO031 

32 

#1132 

Signed 32-bit binary code 

*1

 

UO100 to UO131 

32 

#1133 

Signed 32-bit binary code 

*1

 

UO200 to UO231 

32 

#1134 

Signed 32-bit binary code 

*1

 

UO300 to UO331 

32 

#1135 

Signed 32-bit binary code 

*1

 

*1  Variable value #(1132+n) = 

{

}

=

×

×

30

0

31

31

i

2

2

i

i

V

V

 

 

 

Where Vi=0 when UOni is 0and Vi=1 when UOni is 1 

 

n : 0 to 3 

 

These system variables can be used on the left side of an assignment statement as 
well as on the right side. 

 

The value assigned to the system variable used on the left side last is used for the 
value of the system variable to be assigned (sent) on the right side. 

 

Custom Macro Input Signals for Interface Signal R Addresses 
UI400 to UI431 <Rr to Rr+3> 
UI500 to UI531 <Rr+4 to Rr+7> 
UI600 to UI631 <Rr+8 to Rr+11> 
UI700 to UI731 <Rr+12 to Rr+15> 

  [Classification]  Input signal 
 

[Function]  No function is provided for the control unit. These signals can be read by a custom macro 

as a type of system variable, and are used for interface between custom macros and the 
PMC. 
These signals correspond to system variables as indicated below. 

Signals 

Q'ty 

Variables 

Correspondence of values 

UI400 
UI401 

UI431 


#1036 
#1037 

#1067 

0 at 0 and 1 at 1 

UI400 to UI431 

32 

#1068 

Signed 32-bit binary code 

UI500 to UI531 

32 

#1069 

Signed 32-bit binary code 

UI600 to UI631 

32 

#1070 

Signed 32-bit binary code 

UI700 to UI731 

32 

#1071 

Signed 32-bit binary code 

 

 

The letter r represents a setting of parameter No. 6093. 

 

These system variables cannot be used on the left side of an assignment statement. 

B-64693EN-1/01

 

 

12. PROGRAM COMMAND

 

- 2047 - 

 

NOTE 

 

These signals are available when bit 2 (IFR) of parameter No. 6020 
is set to 1. 

 

  WARNING 

 

To set bit 2 (IFR) of parameter No. 6020 to 1, set an appropriate 
value to parameter No.6094 beforehand. 
When parameter No.6094 is 0, R0~ of an internal relay is set. If the 
internal relay R0~ is used to another area, the operation not 
intended might be done. 

 

Custom Macro Output Signals for Interface Signal R Addresses 
UO400 to UO431 <Rr to Rr+3> 
UO500 to UO531 <Rr+4 to Rr+7> 
UO600 to UO631 <Rr+8 to Rr+11> 
UO700 to UO731 <Rr+12 to Rr+15> 

  [Classification]  Output signal 
 

[Function]  No function is provided for the control unit. These signals can be read or written by a 

custom macro as a type of system variable, and are used for interface between custom 
macros and the PMC. 
These signals correspond to system variables as indicated below. 

Signals 

Q'ty 

Variables 

Correspondence of values 

UO400 
UO401 

UO431 


#1136 
#1137 

#1167 

0 at 0 and 1 at 1 

UO400 to UO431 

32 

#1168 

Signed 32-bit binary code 

UO500 to UO531 

32 

#1169 

Signed 32-bit binary code 

UO600 to UO631 

32 

#1170 

Signed 32-bit binary code 

UO700 to UO731 

32 

#1171 

Signed 32-bit binary code 

 
 

The letter r represents a setting of parameter No. 6094. 

 

These system variables can be used on the left side of an assignment statement as 
well as on the right side. Using these system variables on the right side enables the 
last value assigned (sent) to each variable on the left side to be read. 

 

NOTE 

 

These signals are available when bit 2 (IFR) of parameter No. 6020 
is set to 1. 

 

  WARNING 

 

To set bit 2 (IFR) of parameter No. 6020 to 1, set an appropriate 
value to parameter No.6094 beforehand. 
When parameter No.6094 is 0, R0~ of an internal relay is set. If the 
internal relay R0~ is used to another area, the operation not 
intended might be done. 

 

12. PROGRAM COMMAND

 

 

B-64693EN-1/01

 

- 2048 - 

Signal address 

 

 

#7 

#6 

#5 

#4 

#3 

#2 

#1 

#0 

Gn054 

 

UI007 

UI006 

UI005 

UI004 

UI003 

UI002 

UI001 

UI000 

 

 

 

 

 

 

 

 

 

 

Gn055 

 

UI015 

UI014 

UI013 

UI012 

UI011 

UI010 

UI009 

UI008 

 

 

 

 

 

 

 

 

 

 

Gn056 

 

UI023 

UI022 

UI021 

UI020 

UI019 

UI018 

UI017 

UI016 

 

 

 

 

 

 

 

 

 

 

Gn057 

 

UI031 

UI030 

UI029 

UI028 

UI027 

UI026 

UI025 

UI024 

 

 

 

 

 

 

 

 

 

 

Gn276 

 

UI107 

UI106 

UI105 

UI104 

UI103 

UI102 

UI101 

UI100 

 

 

 

 

 

 

 

 

 

 

Gn277 

 

UI115 

UI114 

UI113 

UI112 

UI111 

UI110 

UI109 

UI108 

 

 

 

 

 

 

 

 

 

 

Gn278 

 

UI123 

UI122 

UI121 

UI120 

UI119 

UI118 

UI117 

UI116 

 

 

 

 

 

 

 

 

 

 

Gn279 

 

UI131 

UI130 

UI129 

UI128 

UI127 

UI126 

UI125 

UI124 

 

 

 

 

 

 

 

 

 

 

Gn280 

 

UI207 

UI206 

UI205 

UI204 

UI203 

UI202 

UI201 

UI200 

 

 

 

 

 

 

 

 

 

 

Gn281 

 

UI215 

UI214 

UI213 

UI212 

UI211 

UI210 

UI209 

UI208 

 

 

 

 

 

 

 

 

 

 

Gn282 

 

UI223 

UI222 

UI221 

UI220 

UI219 

UI218 

UI217 

UI216 

 

 

 

 

 

 

 

 

 

 

Gn283 

 

UI231 

UI230 

UI229 

UI228 

UI227 

UI226 

UI225 

UI224 

 

 

 

 

 

 

 

 

 

 

Gn284 

 

UI307 

UI306 

UI305 

UI304 

UI303 

UI302 

UI301 

UI300 

 

 

 

 

 

 

 

 

 

 

Gn285 

 

UI315 

UI314 

UI313 

UI312 

UI311 

UI310 

UI309 

UI308 

 

 

 

 

 

 

 

 

 

 

Gn286 

 

UI323 

UI322 

UI321 

UI320 

UI319 

UI318 

UI317 

UI316 

 

 

 

 

 

 

 

 

 

 

Gn287 

 

UI331 

UI330 

UI329 

UI328 

UI327 

UI326 

UI325 

UI324 

 

 

 

#7 

#6 

#5 

#4 

#3 

#2 

#1 

#0 

Fn054 

 

UO007 

UO006 

UO005 

UO004 

UO003 

UO002 

UO001 

UO000 

 

 

 

 

 

 

 

 

 

 

Fn055 

 

UO015 

UO014 

UO013 

UO012 

UO011 

UO010 

UO009 

UO008 

 

 

 

 

 

 

 

 

 

 

Fn056 

 

UO107 

UO106 

UO105 

UO104 

UO103 

UO102 

UO101 

UO100 

 

 

 

 

 

 

 

 

 

 

Fn057 

 

UO115 

UO114 

UO113 

UO112 

UO111 

UO110 

UO109 

UO108 

 

 

 

 

 

 

 

 

 

 

Fn058 

 

UO123 

UO122 

UO121 

UO120 

UO119 

UO118 

UO117 

UO116 

 

 

 

 

 

 

 

 

 

 

Fn059 

 

UO131 

UO130 

UO129 

UO128 

UO127 

UO126 

UO125 

UO124 

 

 

 

 

 

 

 

 

 

 

Fn276 

 

UO023 

UO022 

UO021 

UO020 

UO019 

UO018 

UO017 

UO016 

 

 

 

 

 

 

 

 

 

 

Fn277 

 

UO031 

UO030 

UO029 

UO028 

UO027 

UO026 

UO025 

UO024 

 

 

 

 

 

 

 

 

 

 

Fn280 

 

UO207 

UO206 

UO205 

UO204 

UO203 

UO202 

UO201 

UO200 

 

 

 

 

 

 

 

 

 

 

B-64693EN-1/01

 

 

12. PROGRAM COMMAND

 

- 2049 - 

Fn281 

 

UO215 

UO214 

UO213 

UO212 

UO211 

UO210 

UO209 

UO208 

 

 

 

 

 

 

 

 

 

 

Fn282 

 

UO223 

UO222 

UO221 

UO220 

UO219 

UO218 

UO217 

UO216 

 

 

 

 

 

 

 

 

 

 

Fn283 

 

UO231 

UO230 

UO229 

UO228 

UO227 

UO226 

UO225 

UO224 

 

 

 

 

 

 

 

 

 

 

Fn284 

 

UO307 

UO306 

UO305 

UO304 

UO303 

UO302 

UO301 

UO300 

 

 

 

 

 

 

 

 

 

 

Fn285 

 

UO315 

UO314 

UO313 

UO312 

UO311 

UO310 

UO309 

UO308 

 

 

 

 

 

 

 

 

 

 

Fn286 

 

UO323 

UO322 

UO321 

UO320 

UO319 

UO318 

UO317 

UO316 

 

 

 

 

 

 

 

 

 

 

Fn287 

 

UO331 

UO330 

UO329 

UO328 

UO327 

UO326 

UO325 

UO324 

 
(The letter r represents a setting of parameter No. 6093.) 

 

 

#7 

#6 

#5 

#4 

#3 

#2 

#1 

#0 

Rr 

 

UI407 

UI406 

UI405 

UI404 

UI403 

UI402 

UI401 

UI400 

 

Rr+1 

 

UI415 

UI414 

UI413 

UI412 

UI411 

UI410 

UI409 

UI408 

 

Rr+2 

 

UI423 

UI422 

UI421 

UI420 

UI419 

UI418 

UI417 

UI416 

 

Rr+3 

 

UI431 

UI430 

UI429 

UI428 

UI427 

UI426 

UI425 

UI424 

 

to 

 

 

 

 

 

 

 

 

 

 

Rr+15 

 

UI731 

UI730 

UI729 

UI728 

UI727 

UI726 

UI725 

UI724 

 
(The letter r represents a setting of parameter No. 6094.) 

 

 

#7 

#6 

#5 

#4 

#3 

#2 

#1 

#0 

Rr 

 

UO407 

UO406 

UO405 

UO404 

UO403 

UO402 

UO401 

UO400 

 

Rr+1 

 

UO415 

UO414 

UO413 

UO412 

UO411 

UO410 

UO409 

UO408 

 

Rr+2 

 

UO423 

UO422 

UO421 

UO420 

UO419 

UO418 

UO417 

UO416 

 

Rr+3 

 

UO431 

UO430 

UO429 

UO428 

UO427 

UO426 

UO425 

UO424 

 

to 

 

 

 

 

 

 

 

 

 

 

Rr+15 

 

UO731 

UO730 

UO729 

UO728 

UO727 

UO726 

UO725 

UO724 

 

Parameter 

 

 

#7 

#6 

#5 

#4 

#3 

#2 

#1 

#0 

6000 

 

SBV 

 

SBM 

HGO 

 

HMC 

MGO 

G67 

 

SBV 

 

SBM 

HGO 

V15 

HMC 

MGO 

G67 

 

 

[Input type]  Parameter input 

 

[Data type]  Bit path 

 

 

#0   G67

  If the macro modal call cancel command (G67) is specified when the macro modal call 

mode (G66/G66.1) is not set: 
0: 

Alarm PS1100, “CANCEL WITHOUT MODAL CALL” is issued. 

1: 

The specification of G67 is ignored. 

 

 

 

 

 

 

 

 

Content      ..     259      260      261      262     ..