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

 

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

 

Search            copyright infringement  

 

 

 

 

 

 

 

 

 

 

 

Content      ..     42      43      44      45     ..

 

 

 

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

 

 

11.AUXILIARY FUNCTION

 PROGRAMMING 

B-63944EN/03

 

 

- 308 - 

11.2 

MULTIPLE M COMMANDS IN A SINGLE BLOCK 

 
Usually, only one M code can be specified in one block.    By setting 
bit 7 (M3B) of parameter No. 3404 to 1, however, up to three M codes 
can be specified simultaneously in one block. 
Up to three M codes specified in one block are output to the machine 
at the same time.    So, when compared with a case where a single M 
code is specified in one block, a reduced machining cycle time can be 
achieved. 
 

Explanation 

CNC allows up to three M codes to be specified in one block.  
However, some M codes cannot be specified at the same time due to 
mechanical operation restrictions. For detailed information about the 
mechanical operation restrictions on simultaneous specification of 
multiple M codes in one block, refer to the manual of each machine 
tool builder. 
M00, M01, M02, M30, M98, M99, or M198 must not be specified 
together with another M code. 
Some M codes other than M00, M01, M02, M30, M98, M99, and 
M198 cannot be specified together with other M codes; each of those 
M codes must be specified in a single block.     
Such M codes include these which direct the CNC to perform internal 
operations in addition to sending the M codes themselves to the 
machine. To be specified, such M codes are M codes for calling 
program numbers 9001 to 9009 and M codes for disabling advance 
reading (buffering) of subsequent blocks. Meanwhile, multiple of M 
codes that direct the CNC only to send the M codes themselves 
(without performing internal operations ) can be specified in a single 
block. 
However, it is possible to specify multiple M codes that are sent to the 
machine in the same block unless they direct the CNC to perform 
internal operations.  (Since the processing method depends on the 
machine, refer to the manual of the machine tool builder.) 
 

Example 

One M command in a single block

Multiple M commands in a single 

block 

M40; 
M50; 
M60; 

G28G91X0Y0Z0; 



M40M50M60; 

G28G91X0Y0Z0; 





 

B-63944EN/03

 PROGRAMMING 

11.AUXILIARY FUNCTION

 

 

- 309 - 

11.3 

M CODE GROUPING FUNCTION 

 

Overview 

Classifying a maximum of 500 M codes into a maximum of 127 
groups allows the user: 

  To receive an alarm if an M code that must be specified alone is 

included when multiple M codes are specified in a block. 

  To receive an alarm if M codes belonging to the same group are 

specified in the same block when multiple M codes are specified in 
a block. 

 

11.3.1 

Setting an M Code Group Number Using the Setting Screen 

 

  - Procedure for displaying the M code group setting screen 

 

Fig. 11.3 (a) M code group setting screen 

 

You can use the “M code group setting screen (Fig. 11.3 (a))” to set a 
group number for each M code. 
 
Display the “M code group setting screen” using the following 
procedure: 
(1)  Press function key 

 

 and the continuous menu key several 

times.    Soft key [M CODE GROUP] appears. 

(2)  Press soft key [M CODE GROUP]. 
 
In the “NO.” field, M codes for which an M code group can be set are 
displayed. 
An M code group can be set for the following M codes:    M00 to M99, 
and any 400 M codes selected from M100 and subsequent M codes.   
For details of how to add the 100th and subsequent M codes, see the 
explanation of parameters Nos. 3441 to 3444. 

11.AUXILIARY FUNCTION

 PROGRAMMING 

B-63944EN/03

 

 

- 310 - 

 
In the “DATA” field, the M code group number corresponding to each 
M code is displayed. 
 

  - Setting a group number 

To set an M code group number on the “M code group setting screen 
(Fig. 11.3 (a)),” use he following procedure: 

Select the MDI mode. 

Set “PARAMETER WRITE” on the setting screen to 1.   

Display the “M code group setting screen”. 

Move the cursor to the M code to be set using page keys and 
cursor keys.    You can also enter the number of the M code to be 
set and press soft key [NO.SRH] to move the cursor to the M 
code. 

Enter a group number and press soft key [INPUT] or the 

 

key. 

The valid range of M code group numbers is from 1 to 127 (127 
groups).  If a value of 0 is input, it is not registered as an M code 
group. 
 

  - Examples of setting parameters Nos. 3441 to 3444 

In the following examples, the number of digits of an M code is 4. 
<1> to <4> indicate parameters Nos. 3441 to 3444. 
 
(1) When <1> = 300, <2> = 400, <3> = 500, and <4> = 900 are set 
 
 
 
 
 
 
 

M code groups can be set for M0000 to 
M0099, M0300 to M0599, and M0900 
to M999. 
M codes M0300 to M0599 and M0900 
to M999 are added to the M code group 
setting screen. 

 
 
 
 
 

Number 
0000          
 :     100 codes
0099          
0300          
 :     100 codes
0399          
0400          
 :     100 codes
0499          
0500          
 :     100 codes
0599          
0900          
 :     100 codes
0999          

B-63944EN/03

 PROGRAMMING 

11.AUXILIARY FUNCTION

 

 

- 311 - 

(2)  When <1> = 200, <2> = 0, <3> = 550, and <4> = 800 are set 
 
 
 
 

M code groups can be set for M0000 to M0099, 
M0200 to M0299, M0550 to M0649, and 
M0800 to M0899. 
(The setting of parameter <2> is invalid because 
it is 0.) 
In this case, M codes M0200 to M0299, M0550 
to M0649, and M0800 to M0899 are added to 
the M code group setting screen. 

 

Number 
0000 
 : 
0099 
0200  
 : 
0299  
0550  
 : 
0649 
0800 
 : 
0899 

11.AUXILIARY FUNCTION

 PROGRAMMING 

B-63944EN/03

 

 

- 312 - 

11.3.2 

Setting an M Code Group Number Using a Program 

 
You can execute a program to set an M code group number and M 
code name.    The command format is shown below. 
 

Format 

G10 L40 Pn Rg ; 

Pn:  “n” specifies an M code. 
Rg: “g” specifies an M code group number. 

 

NOTE 

1  If the format is invalid, an alarm PS1144 is issued. 
2  If an M code group cannot be set for the M code 

specified for the P command or if the group number 
specified for the R command is not within the range 
between 0 and 127, an alarm PS1305 is issued. 

 
(Example) 
 

Executing the following program sets M code group “1” to M03: 

G10  L40  P03  R1 ; 

 
 

B-63944EN/03

 PROGRAMMING 

11.AUXILIARY FUNCTION

 

 

- 313 - 

11.3.3 

M Code Group Check Function 

 
When multiple M commands in a single block (enabled when bit 7 
(M3B) of parameter No. 3404 is set to 1) are used, you can check the 
following items.  You can also select whether to check the items 
using bit 1 (MGC) of parameter No. 3400. 
 
(1)  M code to be specified in a single block containing no other M 

codes 
If an M code which must be specified in a single block containing 
no other M codes is specified together with another M code, an 
alarm PS5016 is issued. 

(2)  M codes in the same group 

If multiple M codes in the same group are specified together, an 
alarm PS5016 is issued. 

 
The valid range of group numbers is from 0 to 127 (128 groups). 
Group numbers 0 and 1 have special meaning.  Note the following 
points: 

 

Each M code with group number 1 is assumed to be an M code to 
be specified in a single block containing no other M codes. 

 

For each M code with group number 0, the “same group M code 
check” is ignored.    That is, when multiple M codes with group 
number 0 are specified in a single block, the alarm is not issued. 

 

For each M code with group number 0, the “check for an M code 
to be specified in a single block containing no other M codes” is 
not ignored.    That is, if an M code with group number 1 and an 
M code with group number 0 are specified in a single block, the 
alarm is issued. 

  For M codes that are not to be output to the machine such as M98, 

M99, M198, and M codes for subprogram and macro calls (set in 
parameters Nos. 6071 to 6079 and Nos. 6080 to 6089 and with 
the macro executor), be sure to set 0 as the group number. 

 

For M00, M01, M02, M30, and M codes for which buffering is 
suppressed (set in parameters Nos. 3411 to 3432), be sure to set 1 
as the group number. 

 

11.AUXILIARY FUNCTION

 PROGRAMMING 

B-63944EN/03

 

 

- 314 - 

11.4 

SECOND AUXILIARY FUNCTIONS (B CODES) 

 

Overview 

If a value with a maximum of eight digits is specified after address B, 
the code signal and strobe signal are transferred for calculation of the 
rotation axis.  The code signal is retained until the next B code is 
specified. 
Only one B code can be specified for each block.  When the 
maximum number of digits are specified by parameter No.3033, an 
alarm is issued if the number of digits of a command exceeds the 
specified number. 
In addition, the address used for specifying the second auxiliary 
function can be changed to an address other than address B (address A, 
C, U, V, or W) by setting parameter No.3460. 
However, the address used for the second auxiliary function cannot 
also be used as the address of the controlled axis.    For details, refer to 
the manual available from the machine tool builder. 
 

Explanation 
  - Range of specification 

-99999999 to 99999999 
 

 - Output value 

The value specified after the address of the second auxiliary function 
is output on the code signals B00 to B31.    Note the following about a 
output value. 
 
1.  When a command with a decimal point or a negative command is 

disabled 

 

(When bit 0 (AUP) of parameter No.3450 is set to 0) 

 
 

When the second auxiliary function with no decimal point is 
specified, the specified value is output on the code signals as is, 
regardless of the desktop calculator decimal point setting (bit 0 
(DPI) of parameter No.3401). 

 Example: 

Specified value 

Output value 

B10 10 

 
 

When the second auxiliary function with a decimal point is 
specified, alarm PS0007 is issued. 

 

When the second auxiliary function is specified with a negative 
value, alarm PS0006 is issued. 

 

B-63944EN/03

 PROGRAMMING 

11.AUXILIARY FUNCTION

 

 

- 315 - 

2.  When a command with a decimal point or a negative command is 

enabled 

 

(When bit 0 (AUP) of parameter No.3450 is set to 1) 

 
 

When the desktop calculator decimal point setting is not 
specified (when bit 0 (DPI) of parameter No.3401 is set to 0), if 
the second auxiliary function with no decimal point is specified, 
the specified value is output on the code signals as is. 

 Example: 

Specified value 

Output value 

B10 10 

 
 

When desktop calculator decimal point input is specified (when 
bit 0 (DPI) of parameter No.3401 is set to 1), if the second 
auxiliary function with no decimal point is specified, the 
specified value multiplied by a magnification is output on the 
code signals.  (Magnifications are shown in Table 11.4 (a).) 

 Example: 

Specified value 

Output value 

B10 

10000  (When metric input is used and 

the reference axis is IS-B.  The 
magnification is 1000.) 

 
 

When the second auxiliary function with a decimal point is 
specified, the specified value multiplied by a magnification is 
output to the code signals.    (Magnifications are shown in Table 
11.4 (a).) 

 Example: 

Specified value 

Output value 

B10. 

10000  (When metric input is used and 

the reference axis is IS-B.  The 
magnification is 1000.) 

B0.123 

1230 

(When inch input is used, the 
reference axis is IS-B, and 
parameter AUX is set to 1.    The 
magnification is 10000.) 

 

 

 

 

 

 

 

 

Content      ..     42      43      44      45     ..