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

 

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

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     262      263      264      265     ..

 

 

 

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

 

 

12. PROGRAM COMMAND

 

 

B-64693EN-1/01

 

- 2066 - 

 

[Example]  When parameter No. 6047 = 90000000, parameter No. 6048 = 4000, and parameter No. 

6049 = 100 are set, a set of 100 custom macro calls (simple calls) is defined as follows: 
M90000000 

 O4000 

M90000001 

 O4001 

M90000002 

 O4002 

  : 
M90000099 

 O4099 

 

NOTE 

1  When the following conditions are satisfied, all calls using these 

parameters are disabled: 
1)  When a value not within the specifiable range is set in each 

parameter 

2)  (Value of parameter No. 6048 + value of parameter No. 6049 - 

1) > 9999 

2  If a range of M codes set by these parameters duplicate M codes 

specified in parameter No. 6080 through No. 6089, the calls 
specified by parameter No. 6080 through 6089 are made 
preferentially. 

 

6050 

 

G code that calls the custom macro of program number 9010 

to 

 

to 

6059 

 

G code that calls the custom macro of program number 9019 

 

 

[Input type]  Parameter input 

 

[Data type]  Word path 

[Valid data range]  (-9999 to 9999 : excluding 0, 5, 65, 66 and 67) 

Set the G  codes used to call the custom macros of program numbers 9010 to 9019. 
However, note that when a negative value is set in this parameter, it becomes a modal call. 
For example, if this parameter is set to -11, the modal call mode is entered by G11. 
Whether  the modal call is equivalent to G66 or G66.1 depends on bit 3 (MGE) of 
parameter No. 6007. 
 

6060 

 

G code with a decimal point used to call the custom macro of program number 9040 

to 

 

to 

6069 

 

G code with a decimal point used to call the custom macro of program number 9049 

 

 

[Input type]  Parameter input 

 

[Data type]  Word path 

[Valid data range]  -999 to 999 

Set the G codes used to call the custom macros of program numbers 9040 to 9049. 
However, note that when a negative value is set in this parameter, it becomes a modal call. 
For example, if this parameter is set to -11, the modal call mode is entered by G11. 
Whether the modal call is equivalent to G66 or G66.1 depends on bit 3 (MGE) of 
parameter No. 6007. Set G codes in the format Gm.n. The value expressed by (m

×

10+n) 

is set in the parameter. The values m and n must satisfy the following relationships: 0 ≤m 

≤99, 0 ≤n ≤9. 
 

NOTE 

 

Parameter Nos. 6060 to 6069 are valid when bit 0 (DPG) of 
parameter No. 6007 is set to 1. 

 

B-64693EN-1/01

 

 

12. PROGRAM COMMAND

 

- 2067 - 

6071 

 

M code used to call the subprogram of program number 9001 

to 

 

to 

6079 

 

M code used to call the subprogram of program number 9009 

 

 

[Input type]  Parameter input 

 

[Data type]  2-word path 

[Valid data range]  3 to 99999999 (excluding 30, 98 and 99) 

These parameters set the M codes that call the subprograms of program numbers 9001 to 
9009. 
 

NOTE 

 

If the same M code is set in these parameters, the younger number 
is called preferentially. For example, if 100 is set in parameter No. 
6071 and 6072, and programs O9001 and O9002 both exist, 
O9001 is called when M100 is specified. 

 

6080 

 

M code used to call the custom macro of program number 9020 

to 

 

to 

6089 

 

M code used to call the custom macro of program number 9029 

 

 

[Input type]  Parameter input 

 

[Data type]  2-word path 

[Valid data range]  3 to 99999999 (excluding 30, 98 and 99) 

Set the M codes used to call the custom macros of program numbers 9020 to 9029. The 
simple call mode is set. 
 

NOTE 

1  If the same M code is set in these parameters, the younger number 

is called preferentially. For example, if 200 is set in parameters 
Nos. 6081 and 6082, and programs O9021 and O9022 both exist, 
O9021 is called when M200 is specified. 

2  If the same M code is set in a parameters Nos. 6071 to 6079 used 

to call subprograms and in a parameters Nos. 6080 to 6089 used 
to call custom macros, a custom macro is called preferentially. For 
example, if 300 is set in parameters Nos. 6071 and 6081, and 
programs O9001 and O9021 both exist, O9021 is called when 
M300 is specified. 

 

6090 

 

ASCII code that calls the subprogram of program number 9004 

 

6091 

 

ASCII code that calls the subprogram of program number 9005 

 

 

[Input type]  Parameter input 

 

[Data type]  Byte path 

[Valid data range]  65(A:41H) to 90(Z:5AH) 

These parameters set the ASCII codes that call subprograms in decimal. 
The settable addresses are indicated below. 
 

Address 

Parameter setting value 

T series 

M series 

65 

66 

68 

70 

12. PROGRAM COMMAND

 

 

B-64693EN-1/01

 

- 2068 - 

Address 

Parameter setting value 

T series 

M series 

72 

73 

74 

75 

76 

77 

80 

81 

82 

83 

84 

86 

88 

89 

90 

 

NOTE 

1  When address L is set, the number of repeats cannot be specified. 
2  Set 0 when no subprogram is called. 

 

6093 

 

Top address of custom macro interface signal R address (input signal) 

 

6094 

 

Top address of custom macro interface signal R address (output signal) 

 

NOTE 

 

When these parameters are set, the power must be turned off before 
operation is continued. 

 

 

[Input type]  Parameter input 

 

[Data type]  2-word path 

 

[Valid data range]  0 to maximum address (multiple of 4. 0, 4, 8, ...) 

Set the top address of custom macro interface signal R address. 128 signals starting at the 
top address are allocated. 
 

 

[Example]   

Parameter 

System variable number 

Signal to use 

Attribute 

No.6093=1000 

#1068 
#1069 
#1070 
#1071 

R1000 to R1003 
R1004 to R1007 
R1008 to R1011 
R1012 to R1015 

No.6094=1100 

#1168 
#1169 
#1170 
#1171 

R1100 to R1103 
R1104 to R1107 
R1108 to R1111 
R1112 to R1115 

R/W 

*) 

The R and R/W attributes of variables represent, respectively, read-only and 
read/write enabled. 

 

B-64693EN-1/01

 

 

12. PROGRAM COMMAND

 

- 2069 - 

NOTE 

1  Each value specified with this parameter must be a multiple of 4 (0, 

4, 8, 

). Otherwise, this function is disabled. 

2  If a non-existent R address or system relay address is set, the 

corresponding system variable becomes invalid. The effective R 
address area varies depending on the PMC used and its memory. 
Be sure to specify a usable range by checking the specification of 
the PMC in use. 

3  When setting the parameter, make sure that the input signal 

addresses do not overlap with the output signal addresses. 

 

6100 

 

Precision setting for relational operators 

 

 

[Input type]  Parameter input 

 

[Data type]  Byte 

 

[Valid data range]  0 to 15 

This parameter sets the number of digits after the decimal point in two values to be 
compared using the custom macro relational operator. The two values are rounded off to 
the specified number of digits before comparison. 
 

NOTE 

1  This function is enabled by setting bit 5 (EDP) of parameter No. 

6019 to 1. 

2  This function is disabled if parameter No. 6100 is set to a value out 

of the valid data range. 

 

 

 

#7 

#6 

#5 

#4 

#3 

#2 

#1 

#0 

6210 

 

 

 

 

 

 

DSK 

 

 

 

 

[Input type]  Parameter input 

 

[Data type]  Bit path 

 

 

#2  DSK

  Skip position reading (system variables #5421 to #5440, #100701 to #100750) by the 

detection unit is: 
0: 

Disabled. 

1: 

Enabled. 

 

 

 

#7 

#6 

#5 

#4 

#3 

#2 

#1 

#0 

8106 

 

 

 

 

 

 

CVP 

 

 

 

 

[Input type]  Parameter input 

 

[Data type]  Bit 

 

 

# 2  CVP

  By a reset in path other than path 1, the custom macro variables common to paths set to 

the common variables #100 to #499 cleared by power-off is   
0: 

not cleared to <null>. 

1: 

cleared to <null>. (it depend to the bit 6(CCV) of parameter No.6001.) 

 

12. PROGRAM COMMAND

 

 

B-64693EN-1/01

 

- 2070 - 

NOTE 

1  When a reset is made in path 1, it is cleared regardless of the 

setting of this parameter. (it depend to the parameter CCV) 

2  This parameter is invalid for the path that the bit 0(NC1) of 

parameter No.6020 is 1. 

 

 

 

#7 

#6 

#5 

#4 

#3 

#2 

#1 

#0 

11648 

 

 

 

 

 

 

ESE 

 

 

 

 

[Input type]  Parameter input 

 

[Data type]  Bit 

 

 

#2  ESE

  ELSE statement of IF statement is: 

0: 

Not used 

1: 

Used. The following specifications are added. 
- The following instruction format is added to IF statement. 
    - IF[<conditional expression>] THEN; ~ ENDIF; 
    - IF[<conditional expression>] THEN Macro statement1; 
                             ELSE Macro statement2; 
    - IF[<conditional expression>] THEN; ~ ELSE; ~ ENDIF; 
- IF statement multiplexing (nest management) is enable. 
- "ELSE", and "ENDIF" are added to reserved words. 
 

11649 

 

Number of custom macro variables common to each path (for #98000 to #98499 ) 

 

 

[Input type]  Parameter input 

 

[Data type]  Word 

 

[Valid data range]  0 to 500 

 

NOTE 

 

When this parameter is set, the power must be turned off before 
operation is continued. 

 
When the custom macro variables common to each path is used, this parameter sets the 
number of custom macro common variables to be shared out of common variables 
#98000 to #98499. Be sure that the maximum number of available macro common 
variables is not exceeded. 

 

Example 

 

When 100 is set in parameter No.11649 

 

#98000 to #98099: Variables are shared by all paths 

 

#98100 to #98499: Variables are used by each path independently 

 

NOTE 

1  Addition of custom macro common variables 1000 is required. 
2  When 0 or a negative value is set, the custom macro variables 

common to each path is not used. 

3  By parameter NC4(No.11654#0), commonness/independence of   

variables can be set for each path. 

 

B-64693EN-1/01

 

 

12. PROGRAM COMMAND

 

- 2071 - 

11652 

 

Start number of common variables to be protected among the common variables (#98000 to #98499) 

 

11653 

 

End number of common variables to be protected among the common variables (#98000 to #98499) 

 

 

[Input type]  Parameter input 

 

[Data type]  2-Word path 

 

[Valid data range]  0, 98000 to 98499 

 

Among the common variables #98000 to #98499, the range of common variables 
specified by this parameter can be protected (by setting their attributes to read-only). If 
value is written to protected variable (on the left side), an alarm is issued. 
 

NOTE 

 

Set 0 in both parameter No.11652 and No.11653 not to protect 
common variables. 

 

 

 

#7 

#6 

#5 

#4 

#3 

#2 

#1 

#0 

11654 

 

 

 

 

 

 

 

 

NC4 

 

 

[Input type]  Parameter input 

 

[Data type]  Bit path 

 

NOTE 

 

When this parameter is set, the power must be turned off before 
operation is continued. 

 

 

# 0  NC4

  The parameter No.11649 (Number of custom macro variables common to each path for 

#98000 to #98499) is: 
0:    Effective. 

Among custom macro variable #98000-#98499 in this path, the number set in 
parameter No.11649 becomes the number of variables shared between each path. 

1:    Not effective. 

Custom macro variable #98000-#98499 in this path are independent of other path. 

 

NOTE 

 

This parameter for path 1 must be set to 0. 

 

Example 

 

In a 4-path system, when parameters are set as listed below, 
custom macro variables #98000 to #98099 for paths 1 to 3 are 
used as variables common to these paths, but for path 4, custom 
macro variables #98000 to #98099 for the path 4 are used 
independently. 

 

Path number 

No.11649 

NC4 

Used custom macro variables 

100 

Custom macro variables #98000 to #98099 are used 

as variables common to these paths, and other 

custom macro variables are used independently. 

All custom macro variables for path 4 are used 

independently. 

 

12. PROGRAM COMMAND

 

 

B-64693EN-1/01

 

- 2072 - 

Alarm and message 

Number 

Message 

Description 

PS0077 

TOO MANY SUB,MACRO NESTING 

The total number of subprogram and macro calls exceeds the 
permissible range. 
Another subprogram call was executed during an external 
memory subprogram call. 

PS0110 

OVERFLOW :INTEGER 

An integer went out of range during arithmetic calculations. 

PS0111 

OVERFLOW :FLOATING 

A decimal point (floating point number format data) went out of 
range during arithmetic calculations. 

PS0112 

ZERO DIVIDE 

An attempt was made to divide by zero in a custom macro. 

PS0114 

ILLEGAL EXPRESSION FORMAT 

The format used in an expression in a custom macro 
statement is in error. The parameter program format is in 
error. 

PS0115 

VARIABLE NO. OUT OF RANGE 

An illegal No. was specified in a local variable, common 
variable or a system variable in a custom macro. 
A non–existent custom macro variable No. was specified in 
the EGB axis skip function (G31.8), or there are not enough 
custom macro variables for storing the skip position. 

PS0116 

WRITE PROTECTED VARIABLE 

An attempt was made in a custom macro to use on the left 
side of an expression a variable that can only be used on the 
right side of an expression. 

PS0118 

TOO MANY BRACKET NESTING 

Too many brackets “[ ]” were nested in a custom macro. 
Nesting of [] is up to five times including [] of function. 

PS0119 

ARGUMENT VALUE OUT OF 
RANGE 

The value of an argument in a custom macro function is out of 
range. 

PS0122 

TOO MANY MACRO NESTING 

The nesting of the custom macro call exceeded the allowable 
range. 

PS0124 

MISSING END STATEMENT 

The END instruction corresponding to the DO instruction was 
missing in a custom macro. 

PS0125 

MACRO STATEMENT FORMAT 
ERROR 

The format used in a macro statement in a custom macro is in 
error. 

PS0126 

ILLEGAL LOOP NUMBER 

There is an error in the number of the DO and END 
statements of the custom macro, or it exceeds the allowable 
range (1 to 3). 

PS0127 

DUPLICATE NC,MACRO 
STATEMENT 

An NC statement and macro statement were specified in the 
same block. 

PS0129 

USE 'G' AS ARGUMENT 

G is used as an argument in a custom macro call. G can be 
specified as an argument only in an every-block call (G66.1).   

PS1091 

DUPLICATE SUB-CALL WORD 

More than one subprogram call instruction was specified in 
the same block. 

PS1092 

DUPLICATE MACRO-CALL WORD 

More than one macro call instruction was specified in the 
same block. 

PS1093 

DUPLICATE NC-WORD & M99 

An address other than O, N, P or L was specified in the same 
block as M99 during the macro modal call state. 

PS1095 

TOO MANY TYPE-2 ARGUMENT 

More than ten sets of I, J and K arguments were specified in 
the type–II arguments (A, B, C, I, J, K, I, J, K, ...) for custom 
macros. 

PS1096 

ILLEGAL VARIABLE NAME 

An illegal variable name was specified. A code that cannot be 
specified as a variable name was specified. [#_OFSxx] does 
not match the tool offset memory option configuration. 

PS1097 

TOO LONG VARIABLE NAME 

The specified variable name is too long. 

PS1098 

NO VARIABLE NAME 

The specified variable name cannot be used as it is not 
registered. 

B-64693EN-1/01

 

 

12. PROGRAM COMMAND

 

- 2073 - 

Number 

Message 

Description 

PS1099 

ILLLEGAL SUFFIX [ ] 

A suffix was not specified to a variable name that required a 
suffix enclosed by [ ]. 
A suffix was specified to a variable name that did not require a 
suffix enclosed by [ ]. 
The value enclosed by the specified [ ] was out of range. 

PS1100 

CANCEL WITHOUT MODAL CALL 

Call mode cancel (G67) was specified even though macro 
continuous–state call mode (G66) was not in effect. 

PS1101 

ILLEGAL CNC STATEMENT IRT. 

An interrupt was made in a state where a custom macro 
interrupt containing a move instruction could not be executed. 

PS1115 

READ PROTECTED VARIABLE 

An attempt was made in a custom macro to use on the right 
side of an expression a variable that can only be used on the 
left side of an expression. 

PS1124 

MISSING DO STATEMENT 

The DO instruction corresponding to the END instruction was 
missing in a custom macro. 

PS1128 

SEQUENCE NUMBER OUT OF 
RANGE 

The jump destination sequence No. in a custom macro 
statement GOTO instruction was out of range (valid range: 1 
to 99999999). 

PS1129 

MISSING IF STATEMENT 

There is no “IF” corresponding to "ELSE" and "ENDIF". 

PS1130 

TOO MANY IF STATEMENT 
NESTING 

The maximum value of the nesting of IF statement was 
exceeded. Up to 10 levels are allowed. 

PS1131 

MISSING OPEN BRACKET 

The number of left brackets ([) is less than the number of right 
brackets ()) in a custom macro statement. 

PS1132 

MISSING CLOSE BRACKET 

The number of right brackets (]) is less than the number of left 
brackets ([] in a custom macro statement. 

PS1133 

MISSING '=' 

An assignment directive (=) is missing in the arithmetic 
calculation instruction in a custom macro statement. 

PS1137 

IF STATEMENT FORMAT ERROR 

The format used in the IF statement in a custom macro is in 
error. 

PS1138 

WHILE STATEMENT FORMAT 
ERROR 

The format used in the WHILE statement in a custom macro is 
in error. 

PS1139 

SETVN STATEMENT FORMAT 
ERROR 

The format used in the SETVN statement in a custom macro 
is in error. 

PS1141 

ILLEGAL CHARACTER IN VAR. 
NAME 

The SETVN statement in a custom macro contacts a 
character that cannot be used in a variable name. 

PS1142 

TOO LONG V-NAME (SETVN) 

The variable name used in a SETVN statement in a custom 
macro exceeds 8 characters (31 characters when the custom 
macro variable name expansion function is enabled). 

PS1143 

BPRNT/DPRNT STATEMENT 
FORMAT ERROR 

The format used in the BPRINT statement or DPRINT 
statement is in error. 

 

Diagnosis data 

Diagnosis 

1493 

 

Number of macro statement blocks executed by custom and execution macros 

 

 

[Data type]  2-word 

 

[Unit of data]  Block 

The  number of macro statement blocks executed by custom and execution macros per 
1024 ms is displayed. 
This data provides an indication of the actual macro statement processing speed. 

 

 

 

 

 

 

 

 

Content      ..     262      263      264      265     ..