GFZ-61863E B-61863E
GE Fanuc CNC
PMC Ladder Language Programming Manual
Presented By: CNC Center
For Product Needs Please Visit:
http://www.cnccenter.com/
OR Email:
<EMAIL_ADDRESS>OR Call:
1-800-963-3513 GE Fanuc CNC Manuals www.cnccenter.com
GE Fanuc Automation
Computer Numerical Control Products
PMC Model PA1/PA3/SA1/SA2/SA3/SA5 SB/SB2/SB3/SB4/SB5/SB6/SC/SC3/SC4/NB/NB2 Ladder Language
Programming Manual
GFZ-61863E/10 December 1997
GFL-001
Warnings, Cautions, and Notes as Used in this Publication
Warning
Warning notices are used in this publication to emphasize that hazardous voltages, currents, temperatures, or other conditions that could cause personal injury exist in this equipment or may be associated with its use.
In situations where inattention could cause either personal injury or damage to equipment, a Warning notice is used.
Caution
Caution notices are used where equipment might be damaged if care is not taken.
Note Notes merely call attention to information that is especially significant to understanding and operating the equipment.
This document is based on information available at the time of its publication. While efforts have been made to be accurate, the information contained herein does not purport to cover all details or variations in hardware or software, nor to provide for every possible contingency in connection with installation, operation, or maintenance. Features may be described herein which are not present in all hardware and software systems. GE Fanuc Automation assumes no obligation of notice to holders of this document with respect to changes subsequently made.
GE Fanuc Automation makes no representation or warranty, expressed, implied, or statutory with respect to, and assumes no responsibility for the accuracy, completeness, sufficiency, or usefulness of the information contained herein. No warranties of merchantability or fitness for purpose shall apply.
PowerMotion is a trademark of GE Fanuc Automation North America, Inc.
©Copyright 1997 GE Fanuc Automation North America, Inc.
All Rights Reserved.
B–61863E/10 DEFINITION OF WARNING, CAUTION, AND NOTE
s–1
DEFINITION OF WARNING, CAUTION, AND NOTE
This manual includes safety precautions for protecting the user and preventing damage to the machine. Precautions are classified into Warning and Caution according to their bearing on safety. Also, supplementary information is described as a Note. Read the Warning, Caution, and Note thoroughly before attempting to use the machine.
WARNING
Applied when there is a danger of the user being injured or when there is a damage of both the user being injured and the equipment being damaged if the approved procedure is not observed.
CAUTION
Applied when there is a danger of the equipment being damaged, if the approved procedure is not observed.

I. PMC SEQUENCE PROGRAM
1.  19.
2.
3.
4.
5.
6.
7.
8.
9.
II. PMC OPERATION (CRT/MDI)
1.
3.
4.
5.
6.
III. PMC PROGRAMMER (CRT/MDI)
1.
2.
3.
4.
5.
6.
7.
8.
9.
IV. STEP SEQUENCE FUNCTION
1.
3.
4.
5.
6.
2.
3.
4.
5.

B. WINDOW FUNCTION DESCRIPTION (EXCEPT FS 15B PMC–NB/NB2) 694. . . . .
B.2 LOW–SPEED RESPONSE AND HIGH–SPEED RESPONSE OF WINDOW FUNCTION 694. . . . . .

                       B.4.24 Reading Tool Life Management Data (Tool Group No.)
     B.4.29 Reading Tool Life Management Data (Tool Length Compensation No. (1) : Tool No.)
 B.4.30 Reading Tool Life Management Data (Tool Length Compensation No. (2) : Tool Order No.)
 B.4.31 Reading Tool Life Management Data (Cutter Compensation No. (1) : Tool No.)
 B.4.32 Reading Tool Life Management Data (Cutter Compensation No. (2) : Tool Order No.)
 B.4.33 Reading Tool Life Management Data (Tool Information (1) : Tool No.)
 B.4.34 Reading Tool Life Management Data (Tool Information (2): Tool Order No.)
 B.4.35 Reading Tool Life Management Data (Tool No.)

C.
C.2 LOW–SPEED RESPONSE AND HIGH–SPEED RESPONSE OF WINDOW FUNCTION 833. . . . . .

                 C.3.18 Reading the Tool Life Management Data (Number of Tool Groups) (Low–speed response) 862. . . . . . .     C.3.23 Reading Tool Life Management Data (Tool Length Compensation No.1) (Low–speed response) 865. . . C.3.24 Reading Tool Life Management Data (Tool Length Compensation No.2) (Low–speed response) 866. . .

D.

E.

F.

H.

I.

J.

K.

M.
N.

O.
It also describes the operation methods of CRT/MDI and SYSTEM P series for sequence programming.
This manual presents programming descriptions for the PMC models listed in the following table. Note that some models have been renamed; in the product name column, the old names are enclosed in parentheses, while the new names appear above the old names. However, the previous specifications are still applied to the renamed models. Thus, when using the renamed models, users should:
• Read the old names shown in this manual as the new names. • Read the old names appearing on the units as the new names.
The models covered by this manual, and their abbreviations are :
Product Name Abbreviations Applicable CNC
FANUC PMC–MODEL PA1 PMC–PA1 FANUC Power Mate–MODEL D
FANUC Series 21–MODEL A
FANUC PMC–MODEL PA3 PMC–PA3 FANUC Power Mate–MODEL D/F/H
FANUC Series 21–MODEL A
FANUC PMC–MODEL SA1 (Note 1)
(Old Name : FANUC PMC–MODEL RA1)
PMC–SA1
(PMC–RA1)
FANUC Series 18–MODEL A/B
FANUC Series 20
FANUC Series 21–MODEL B
FANUC Series 21i–MODEL A
Loader control function (Note 2)
FANUC PMC–MODEL SA2 (Note 1)
(Old Name : FANUC PMC–MODEL RA2)
PMC–SA2
(PMC–RA2)
FANUC Series 18–MODEL A
FANUC PMC–MODEL SA3 (Note 1)
(Old Name : FANUC PMC–MODEL RA3)
PMC–SA3
(PMC–RA3)
FANUC Series 18–MODEL A
FANUC Series 20
FANUC Series 21–MODEL B
FANUC PMC–MODEL SA5 (Note 1)
(Old Name : FANUC PMC–MODEL RA5)
PMC–SA5
(PMC–RA5)
FANUC Series 21i–MODEL A
FANUC PMC–MODEL SB (Note 1)
(Old Name : FANUC PMC–MODEL RB)
PMC–SB
(PMC–RB)
FANUC Series 16–MODEL A
FANUC PMC–MODEL SB2 (Note 1)
(Old Name : FANUC PMC–MODEL RB2)
PMC–SB2
(PMC–RB2)
FANUC PMC–MODEL SB3 (Note 1)
(Old Name : FANUC PMC–MODEL RB3)
PMC–SB3
(PMC–RB3)
FANUC Series 16–MODEL A/B
FANUC Series 18–MODEL B
FANUC PMC–MODEL SB4 (Note 1)
(Old Name : FANUC PMC–MODEL RB4)
PMC–SB4
(PMC–RB4)
FANUC Series 16–MODEL B
FANUC Series 18–MODEL B
Renaming of PMC Models
Applicable models
ww w.
cn cc
en ter
.co m
B–61863E/10PREFACE
p–2
Product Name Applicable CNCAbbreviations
FANUC PMC–MODEL SB5 (Note 1)
(Old Name : FANUC PMC–MODEL RB5)
PMC–SB5
(PMC–RB5)
FANUC Series 16–MODEL C
FANUC Series 18–MODEL C
FANUC Series 16i–MODEL A FANUC PMC–MODEL SB6 (Note 1)
(Old Name : FANUC PMC–MODEL RB6)
PMC–SB6
(PMC–RB6)
FANUC Series 16 –MODEL A
FANUC Series 18i–MODEL A
FANUC Power Mate i–MODEL D/H
FANUC PMC–MODEL SC (Note 1)
(Old Name : FANUC PMC–MODEL RC)
PMC–SC
(PMC–RC)
FANUC Series 16–MODEL A
FANUC PMC–MODEL SC3 (Note 1)
(Old Name : FANUC PMC–MODEL RC3)
PMC–SC3
(PMC–RC3)
FANUC Series 16–MODEL A/B/C
FANUC Series 18–MODEL B/C
FANUC PMC–MODEL SC4 (Note 1)
(Old Name : FANUC PMC–MODEL RC4)
PMC–SC4
(PMC–RC4)
FANUC Series 16–MODEL B/C
FANUC Series 18–MODEL B/C
FANUC PMC–MODEL NB PMC–NB FANUC Series 15–MODEL B
FANUC PMC–MODEL NB2 PMC–NB2
NOTE 1 These models have been renamed; in the product name
column, the old names are enclosed in parentheses, while the new names appear above the old names. However, the previous specifications are still applied to the renamed models. Thus, when using the renamed models, users should : • Read the old names shown in this manual as the new
names. • Read the old names appearing on the units as the new
names. 2 PMC–SA1 is applied to the loader control side of a CNC
having the loader control function. The CNC models having the loader control function are as follows : FANUC Series 16–MODEL A/B/C FANUC Series 18–MODEL A/B/C FANUC Series 21–MODEL B FANUC Series 16i–MODEL A FANUC Series 18i–MODEL A
ww w.
cn cc
en ter
.co m
B–61863E/10 PREFACE
p–3
However, it does not include all items required for sequence programming. For those required for sequence programming refer to the following manuals.
Name of manual Reference items Application
FANUC Power Mate-MODEL D/F CONNECTION MANUAL (B-62833EN)
Interface between PMC and CNC PMC-PA1 PMC-PA3
FANUC Power Mate-MODEL H CONNECTION MANUAL (B–62683EN)
Interface between PMC and CNC PMC-PA3
FANUC Power Mate i-MODEL D/H CONNECTION MANUAL (FUNCTION) (B–63733EN–1)
Interface between PMC and CNC PMC-SB5 PMC-SB6
FANUC Series 16/18 CONNECTION MANUAL (B-61803E)
Interface between PMC and CNC PMC-SA1 PMC-SA2 PMC-SA3 PMC-SB PMC-SB2 PMC-SB3 PMC-SC PMC-SC3
FANUC Series 16/18/160/180-MODEL B CONNECTION MANUAL (FUNCTION) (B-62443E-1)
Interface between PMC and CNC PMC-SB3 PMC-SB4 PMC-SC3 PMC-SC4
FANUC Series 16/18/160/180-MODEL C CONNECTION MANUAL (FUNCTION) (B-62753EN-1)
Interface between PMC and CNC PMC-SB5 PMC-SB6 PMC-SC3 PMC-SC4
FANUC Series 16i/18i/21i/160i/180i/210i–MODEL A CONNECTION MANUAL (FUNCTION) (B-63003EN-1)
Interface between PMC and CNC PMC-SA1 PMC-SA5 PMC-SB5 PMC-SB6
FANUC Series 20–FA/TA CONNECTION MANUAL (B–62173E)
Interface between PMC and CNC PMC-SA1 PMC-SA3
FANUC Series 21/210–MODEL B CONNECTION MANUAL (FUNCTION) (B–62703EN–1)
Interface between PMC and CNC PMC-SA1 PMC-SA3
FANUC Series 15-MODEL B BMI INTERFACE CONNECTION MANUAL (B-62073E-1)
Interface between PMC and CNC PMC-NB PMC-NB2
FANUC PMC-MODEL RC/RC3/RC4/NB C LANGUAGE PROGRAMMING MANUAL (B-61863E-1)
C language programming PMC-SC PMC-SC3 PMC-SC4 PMC-NB PMC-NB2
The models covered for reference by this manual, and their abbreviations are:
Product name Abbreviation CNC for
FANUC PMC-MODEL P PMC-P FANUC Power Mate-MODEL C
FANUC PMC-MODEL NA PMC-NA FANUC Series 15-MODEL B
Other manuals
Other application model names
ww w.
cn cc
en ter
.co m
I. PMC SEQUENCE PROGRAM
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
3
1 SEQUENCE PROGRAM CREATING PROCEDURE The procedure for creating the sequence program when the CNC machine tool is controlled by use of the PMC is shown in Fig. 1. Proceed according to the flow shown in Fig. 1. The procedure is briefly explained below.
Decide the control object (machine, CNC)
Decide the specifications of control operations � Calculate the number of DI/DO points � Estimate the control scale
Create the interface specifications DI/DO terminal allocation
Store the sequence program into the PMC RAM board by using the keys of the CRT/MDI
If necessary correct with the keys of the CRT/MDI
Create the ladder diagram Create the addrss table
Entry method of the sequence program
Specification of the programmer
Is there a simulator?
Debug the sequence program with the simulator
Should the program be corrected?
Enter the sequence program with the offline programmer key
When the debugging connect the offline programmer to CNC and transfer the sequence program to Debugging RAM
In necessary correct with the offline programmer key
Start of control system development
A
Offline programmer
No
Yes
Key-in
NC
No
Yes
5
6
����1 Sequence program creating procedure (1/2)
ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
4
A
Perform system operation Debugging RAM
Should the program be corrected?
Write into the ROM using the ROM writer
Perform system operation
Store the sequence program:
(1) Store in the disk of the offline programmer
(2) Store in ROM
Output the ladder diagram of the sequence program to the printer
Correct with the keys of the CRT/MDI
Should the program be corrected?
End
No
Yes
Yes
Make sure that the maintenance drawing is attached to the machine
7
8
9
10
11
12
����1 Sequence program creating procedure (2/2)
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
5
Table 1.1 shows the specification of PMCs. Note that the program size, processing speed, available function commands, internal addresses, and nonvolatile memory addresses of some PMCs are different from those of other PMCs.
Table 1.1 PMC specifications (1)
Specification of PMC
Internal relay (R) Message request (A) Keepmemory
� Variable timer (T) � Counter (C) � Keep relay (K) � Data table (D)
Subprogram (P) Label (L) Fixed timer
Program capacity � Ladder (step)
� Symbol, Comment (Note 1) � Message � Language only
Approx. 3, 000
1 to 128KB 0.1 to 64KB
–
Approx. 5, 000 Approx. 12,000 (Only for Power Mate D/H) 1 to 128KB 0.1 to 64KB
–
1100 byte 25 byte
80 byte 80 byte 20 byte 1860 byte
– –
Timer No. 100 devices specified
1118 byte 25 byte
80 byte 80 byte 20 byte 1860 byte 512 programs 9999 labels Timer No. 100 devices specified
I/O � I/O Link (Note 2) (I)
(Master) (O) � I/O Link (I)
(Slave) (O) � I/O card (I)
(O)
1024 points max. 1024 points max. 64 points max. 64 points max. 32 points max. 24 points max.
1024 points max. 1024 points max. 64 points max. 64 points max. 32 points max. 24 points max.
Capacity of each modules
It is impossible that make the data more than the total capacity of each modules.
MEMORY- MODULE
Total capacity
Mean processing time of basic command
4. 5 (us/ step)
0. 15 (us/ step)
MEMORY- MODULE
SYMBOL &
COMMENT MESSAGE
Command Basic command Function command
12 kinds 47 kinds
14 kinds 64 kinds
Sequence program (Note 3)
SRAM SRAM
Type of PMC PMC-PA1 PMC-PA3
Program method language Ladder Ladder
Number of ladder level 2 2
1st level execution period 8 ms 8 ms
A 62KB
B 126KB
C 126KB
A 62KB 62KB
B 126KB 64KB
C 126KB 64KB
Maximum data size of each modules
*
NOTE 1 The size of a symbol and that of a comment are fixed to 1KB.
The size of a message is fixed to 0.1KB. The maximum size of a symbol and that of a comment are 64KB each.
��� �"&# ��*+�) �,&�+"'& "* &'+ �-�"$��$� "& +!� �'.�) ��+������� ��
����� ��� "* ,*�� "& +!� �'.�) ��+������� ��
� �* -�$,�* "&�"��+��."+! �& �*+�)"*# ��� "& +!� +��$�� �')%�) -�)*"'&* '� +!� ()' )�%%"& %�&,�$
�&� ��+�$' * !�-� $"*+�� +!� %��& ()'��**"& +"%� '� ��*"� �'%%�&�*� �,+ +!"* %�&,�$ $"*+*
+!� �/��,+"'& +"%� �') '&� *+�(� �!� ��+,�$ $����) ()' )�% �/��,+"'& (�)�')%�&�� �*(���� '�
���! �� !�* &'+ ���& �!�& ���
5 Up to 256/256 points of Input/Output points are available or I/O Link (Slave) in the Power Mate–MODEL D/H.
1.1 SPECIFICATION OF PMCs
ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
6
����� 1.1 PMC specifications (2)
Type of PMC
Specification of PMC
PMC–RA1 PMC–RA2 PMC–RA3
Program method language Ladder Ladder Ladder
Number of ladder level 2 2 2
1st level execution period 8 ms 8 ms 8 ms
Mean processing time of basic command
5.0 (us/ step)
1.5 (us/ step)
0. 15 (us/ step)
*
Program capacity � Ladder (step)
� Symbol, Comment (Note 1)
� Message � Language only
Approx. 3, 000 Approx. 5, 000
1 to 128KB
0. 1 to 64KB –
Approx. 3, 000 Approx. 5, 000 Approx. 8, 000 Approx.12, 000 1 to 128KB
0. 1 to 64KB –
Approx. 3, 000 Approx. 5, 000 Approx. 8, 000 Approx.12, 000 1 to 128KB
0. 1 to 64KB –
Command Basic command Function command
12 kinds 49 kinds
12 kinds 48 kinds
14 kinds 66 kinds
Internal relay (R) Message request (A) Keepmemory
� Variable timer (T) � Counter (C) � Keep relay (K) � Data table (D)
Subprogram (P) Label (L) Fixed timer
1100 byte 25 byte
80 byte 80 byte 20 byte 1860 byte
– –
Timer No. 100 devices specified
1118 byte 25 byte
80 byte 80 byte 20 byte 1860 byte – –
Timer No. 100 devices specified
1118 byte 25 byte
80 byte 80 byte 20 byte 1860 byte
512 programs 9999 labels
Timer No. 100 devices specified
I/O � I/O link (I)
(O) � I/O card (I)
(O)
1024 points max. 1024 points max. 156 points max. 120 points max.
1024 points max. 1024 points max. 156 points max. 120 points max.
1024 points max. 1024 points max. 156 points max. 120 points max.
Sequence program EPROM 1Mbit×1 (128KB) (Note 2)
EPROM 1Mbit×1 (128KB)
EPROM 1Mbit×1 (128KB) (Note 2)
NOTE 1 The size of a symbol and that of a comment are fixed to 32KB.
The size of a message is fixed to 2.1KB. The maximum size of a symbol and that of a comment are 64KB each.
2 FLASH ROM is used in the FANUC Series 20. 3 As values indicated with an asterisk (*) in the table, former versions of the programming manual
and catalogs have listed the mean processing time of basic commands, but this manual lists the execution time for one step. The actual ladder program execution performance (speed) of each PMC has not been changed.
4 Application PMC for FANUC Series 16–MODEL A loader control function is PMC–RA1.
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
7
����� 1.1 PMC specifications (3)
Type of PMC
Specification of PMC
PMC–RB1 PMC–RB2 PMC–RB3
Program method language Ladder Ladder Ladder
Number of ladder level 2 2 2
1st level excution period 8 ms 8 ms 8 ms
Mean processing time of basic command
1.0 (us/ step)
1.0 (us/ step)
0. 15 (us/ step)
*
Program capacity � Ladder (step)
� Symbol, Comment (Note 1)
� Message � Language only
Approx. 5, 000 Approx. 8, 000 Approx.12, 000 Approx.16, 000
1 to 128KB
0.1 to 64KB –
Approx. 5, 000 Approx. 8, 000 Approx.12, 000 Approx.16, 000 Approx.24, 000 1 to 128KB
0.1 to 64KB –
Approx. 5, 000 Approx. 8, 000 Approx.12, 000 Approx.16, 000 Approx.24, 000 1 to 128KB
0.1 to 64KB –
Command Basic command Function command
12 kinds 49 kinds
12 kinds 49 kinds
14 kinds 68 kinds
Internal relay (R) Message request (A) Keepmemory
� Variable timer (T) � Counter (C) � Keep relay (K) � Data table(D) (D)
Subprogram (P) Label (L) Fixed timer
1100 byte 25 byte
80 byte 80 byte 20 byte 1860 byte
– –
Timer No. 100 devices specified
1118 byte 25 byte
80 byte 80 byte 20 byte 1860 byte – –
Timer No. 100 devices specified
1618 byte 25 byte
80 byte 80 byte 20 byte 3000 byte
512 programs 9999 labels
Timer No. 100 devices specified
I/O � I/O link (I)
(O) � I/O card (I)
(O)
1024 points max. 1024 points max. 156 points max. 120 points max.
1024 points max. 1024 points max. 156 points max. 120 points max.
1024 points max. 1024 points max. 156 points max. 120 points max.
Sequence program EPROM 1Mbit×1 (128KB)
EPROM 1Mbit×1 (128KB) ROM MODULE 256KB (Note 2)
EPROM 1Mbit×1 (128KB) ROM MODULE 256KB (Note 2)
NOTE 1 The size of a symbol and that of a comment are fixed to 32KB.
The size of a message is fixed to 2.1KB. The maximum size of a symbol and that of a comment are 64KB each.
2 When the number of steps of the PMC-RB2, RB3 ladder program is approx. 24,000, the capacity of the ROM module must be 256KB.
3 As values indicated with an asterisk (*) in the table, former versions of the programming manual and catalogs have listed the mean processing time of basic commands, but this manual lists the execution time for one step. The actual ladder program execution performance (speed) of each PMC has not been changed.
ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
8
����� 1.1 PMC specifications (4)
Type of PMC
Specification of PMC
PMC–RC PMC–RC3 PMC–NB(4047 Series)
Program method language Ladder C-language
Ladder C-language
Ladder C-language
Number of ladder level 3 3 3
1st level execution period 8 ms 8 ms 8 ms
Mean processing time of basic command
0.15 (us/ step)
0.15 (us/ step)
0.15 (us/ step)
Program capacity � Ladder (step)
� Symbol, Comment (Note 1)
� Message � Language only
Approx. 16,000 Approx. 24,000
1 to 128KB
0.1 to 64KB 896KB max.
Approx. 16,000 Approx. 24,000
1 to 128KB
0.1 to 64KB 896KB max.
Approx. 8,000 Approx. 16,000 (Note 2) Approx. 24,000 (Note 2) 1 to 128KB
0.1 to 64KB 896KB max.
Command Basic command Function command
12 kinds 51 kinds
14 kinds 68 kinds
14 kinds 68 kinds
Internal relay (R) Message request (A) Keepmemor
� Variable timer (T) � Counter (C) � Keep relay (K) � Data table (D)
Subprogram (P) Label (L) Fixed timer
1600 byte 25 byte
80 byte 80 byte 20 byte 3000 byte – –
Timer No. 100 devices specified
1618 byte 25 byte
80 byte 80 byte 20 byte 3000 byte
512 programs 9999 labels
Timer No. 100 devices specified
1618 byte 25 byte
80 byte 80 byte 20 byte 3000 byte
512 programs 9999 labels
Timer No. 100 devices specified
I/O � I/O link (I)
(O) � I/O card (I)
(O)
1024 points max. 1024 points max. 156 points max. 120 points max.
1024 points max. 1024 points max. 156 points max. 120 points max.
1024 points max. 1024 points max.
– –
Sequence program ROM MODULE 128KB 256KB 512KB 1MB
ROM MODULE 128KB 256KB 512KB 1MB
ROM MODULE 64KB 128KB 256KB 512KB 1MB
NOTE 1 The size of a symbol and that of a comment of
PMC-RC/RC3 are fixed 32KB. The size of message of PMC-RC/RC3 is fixed 2.1KB. The size of a symbol and that of a comment of PMC-NB are fixed 28KB. The size of message of PMC-NB is fixed 2.1KB. The maximum size of a symbol and that of a comment are 64KB each.
2 When the number of steps of the PMC-NB ladder program is not less than 8,000, the OPTION DRAM is required. (A02B-0162-J151, J152)
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
9
����� 1.1 PMC specifications (5)
Model Series 16–MODEL B/Series 18–MODEL B Series 18–MODEL B
PMC–RB3 PMC–RC3 PMC–RB4 PMC–RC4 PMC–RA1
Programming method language
Ladder Ladder
C–language Ladder
Step sequence
Ladder C–language
Step sequece Ladder
Number of ladder level 2 3 2 3 2
Level-1 Cycle Time 8 ms 8 ms 8 ms 8 ms 8 ms
Basic Instruction Execution Time 0.1 (us/ step)
* 0.1 (us/ step)
0.1 (us/ step)
* 0.1 (us/ step)
5.0 (us/ step)
Program capacity � Ladder (step)
� Symbol/Comment � Message � Language only
Approx. 5, 000 Approx. 8, 000 Approx.12, 000 Approx.16, 000 Approx.24, 000 1 to 128KB
0.1 to 64KB –
Approx.16, 000 Approx.24, 000 1 to 128KB
0.1 to 64KB max. 896KB
Approx. 5, 000 Approx. 8, 000 Approx.12, 000 Approx.16, 000 Approx.24, 000 1 to 128KB
0.1 to 64KB
Approx.16, 000 Approx.24, 000 1 to 128KB
0.1 to 64KB max. 896KB
Approx. 3, 000 Approx. 5, 000
1 to 128KB
0.1 to 64KB –
Instruction (Basic) (Functional)
14 kinds 67 kinds
14 kinds 69 kinds
14 kinds 67 kinds
14 kinds 69 kinds
12 kinds 49 kinds
Internal relay (R) Message request (A) Non-volatile
� Var. Timer (T) � Counter (C) � Keep relay (K) � Data table (D)
Subprogram (P) Label (L) Fixed timer
1618 byte 25 byte
80 byte 80 byte 20 byte 3000 byte
512 programs 9999 labels
Timer No. 100 devices specified
1618 byte 25 byte
80 byte 80 byte 20 byte 3000 byte
512 programs 9999 labels
Timer No. 100 devices specified
3200 byte 125 byte
300 byte 200 byte 50 byte 8000 byte
2000 programs 9999 labels
Timer No. 100 devices specified
3200 byte 125 byte
300 byte 200 byte 50 byte 8000 byte
2000 programs 9999 labels
Timer No. 100 devices specified
1100 byte 25 byte
80 byte 80 byte 20 byte 1860 byte – –
Timer No. 100 devices specified
Input/output � I/O link (I) Max.
(O) Max. � I/O card (I) Max.
(Note) (O) Max.
1024 points max. 1024 points max. 312 points max. 240 points max.
1024 points max. 1024 points max. 312 points max. 240 points max.
1024 points max. 1024 points max. 312 points max. 240 points max.
1024 points max. 1024 points max. 312 points max. 240 points max.
1024 points max. 1024 points max. 312 points max. 240 points max.
Sequence program storage media
Flash ROM 128KB 256KB
Flash ROM 128KB 256KB 512KB 1MB
Flash ROM 128KB 256KB
Flash ROM 128KB 256KB 512KB 1MB
Flash ROM 128KB
NOTE 1 That is the maximum number when 2 I/O cards (with 156 inputs/120 outputs) are used. 2 As values indicated with an asterisk (*) in the table, former versions of the programming manual
and catalogs have listed the mean processing time of basic commands, but this manual lists the execution time for one step. The actual ladder program execution performance (speed) of each PMC has not been changed.
3 Application PMC for FANUC Series 16–MODEL B loader control function is PMC–RA1.
ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
10
����� 1.1 PMC specifications (6)
Model Series 16–MODEL C/Series 18–MODEL C
Model PMC–RB5 PMC–RC3 PMC–RB6 PMC–RC4
Programming method language
Ladder Ladder
C–language Ladder
Step sequence
Ladder C–language
Step sequece
Number of ladder level 2 3 2 3
Level-1 Cycle Time 8 ms 8 ms 8 ms 8 ms
Basic Instruction Execution Time 0.1 (us/ step)
* 0.1 (us/ step)
0.1 (us/ step)
* 0.1 (us/ step)
Program capacity � Ladder (step)
� Symbol/Comment � Message � Language only
Approx. 3, 000 Approx. 5, 000 Approx. 8, 000 Approx.12, 000 Approx.16, 000 Approx.24, 000
1 to 128KB 0.1 to 64KB
–
Approx.16, 000 Approx.24, 000
1 to 128KB 0.1 to 64KB max. 896KB
Approx. 3, 000 Approx. 5, 000 Approx. 8, 000 Approx.12, 000 Approx.16, 000 Approx.24, 000 Approx.32, 000 1 to 128KB 0.1 to 64KB
–
Approx.16, 000 Approx.24, 000 Approx.32, 000 1 to 128KB 0.1 to 64KB max. 896KB
Instruction (Basic) (Functional)
14 kinds 67 kinds
14 kinds 69 kinds
14 kinds 67 kinds
14 kinds 69 kinds
Internal relay (R) Message request (A) Non-volatile
� Var. Timer (T) � Counter (C) � Keep relay (K) � Data table (D)
Subprogram (P) Label (L) Fixed timer
1618 byte 25 byte
80 byte 80 byte 20 byte 3000 byte
512 programs 9999 labels
Timer No. 100 devices specified
1618 byte 25 byte
80 byte 80 byte 20 byte 3000 byte
512 programs 9999 labels
Timer No. 100 devices specified
3200 byte 125 byte
300 byte 200 byte 50 byte 8000 byte
2000 programs 9999 labels
Timer No. 100 devices specified
3200 byte 125 byte
300 byte 200 byte 50 byte 8000 byte
2000 programs 9999 labels
Timer No. 100 devices specified
Input/output � I/O link (I) Max.
(O) Max. � I/O card (I) Max.
(Note) (O) Max.
1024 points max. 1024 points max. 312 points max. 240 points max.
1024 points max. 1024 points max. 312 points max. 240 points max.
1024 points max. 1024 points max. 312 points max. 240 points max.
1024 points max. 1024 points max. 312 points max. 240 points max.
Sequence program storage media
Flash ROM 128KB 256KB
Flash ROM 128KB 256KB 512KB 1MB
Flash ROM 128KB 256KB
Flash ROM 128KB 256KB 512KB 1MB
NOTE 1 That is the maximum number when 2 I/O cards (with 156
inputs/120 outputs) are used. 2 Application PMC for FANUC Series 16–MODEL C loader
control function is PMC–RA1.
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
11
����� 1.1 PMC specifications (7)
Model
Series 21–MODEL B/ Series 210–MODEL B
PMC–RA1 PMC–RA3
Programming method language
Ladder Ladder
Number of ladder level 2 2
1st level excution period 8 ms 8 ms
Mean processing time of basic command 5.0 (us/ step)
0.15 (us/ step)
*
Program capacity � Ladder (step)
� Symbol/Comment (Note 1)
� Message � Language only
Approx. 3, 000 Approx. 5, 000
1 to 128KB
0.1 to 64KB –
Approx. 3, 000 Approx. 5, 000 Approx. 8, 000 Approx.12, 000 1 to 128KB
0.1 to 64KB –
Command Basic command Functioncommand
12 kinds 49 kinds
14 kinds 66 kinds
Internal relay (R) Message request (A) Keepmemory
� Variable timer (T) � Counter (C) � Keep relay (K) � Data table (D)
Subprogram (P) Label (L) Fixed timer
1100 byte 25 byte
80 byte 80 byte
20 byte 1860 byte – –
Timer No. 100 devices specified
1118 byte 25 byte
80 byte 80 byte 20 byte 1860 byte
512 programs 9999 labels
Timer No. 100 devices specified
I/O � I/O link (I)
(O) � I/O card (I)
(O)
1024 points max. 1024 points max.
96 points max. 72 points max.
(Note 1)
1024 points max. 1024 points max.
96 points max. 72 points max.
(Note 1)
Sequence program Flash ROM 128KB
Flash ROM 128KB
NOTE 1 Output points of I/O card in 4082 series are following ;
PMC–RA1 : 64points, PMC–RA3 : 64points 2 As values indicated with an asterisk (*) in the table, former
versions of the programming manual and catalogs have listed the mean processing time of basic commands, but this manual lists the execution time for one step. The actual ladder program execution performance (speed) of each PMC has not been changed.
3 Application PMC for FANUC Series 21–B loader control function is PMC–RA1.
ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
12
����� 1.1 PMC specifications (8)
Model Series 16 i/18i/160i/180i
Model PMC–RB5 PMC–RB6
Programming method Ladder Ladder step sequence
Number of ladder levels 2 2
First–level execution period 8 ms 8 ms
Basic instruction processing time 0.085 (µ sec/step)
0.085 (µ sec/step)
Program capacity � Ladder (step)
� Symbol Comment
� Message
About 3,000 About 5,000 About 8,000 About 12,000 About 16,000 About 24,000
1KB to 128KB
0.1KB to 64KB
About 3,000 About 5,000 About 8,000 About 12,000 About 16,000 About 24,000 About 32,000
1KB to 128KB
0.1KB to 64KB
Instruction (Basic instruction) (Functional instruction)
14 67
14 67
Internal relay (R) Message request (A) Nonvolatile memory
� Variable timer (T) � Counter (C) � Keep replay (K) � Data table (D)
Subprogram (P) Label (L) Fixed timer
1618 bytes 25 bytes (200 points)
80 bytes (40 each) 80 bytes (20 each)
20 bytes 3000 bytes
512 each 9999 each
100 each (Timer number specification)
3200 bytes 125 bytes (1000 points)
300 bytes (150 each) 200 bytes (50 each)
50 bytes 8000 bytes 2000 each 9999 each 100 each
(Timer number specification)
I/O � I/O link (Input)
(Note 2) (Output) � Built–in I/O card (Input)
(Output)
1024 points maximum 1024 points maximum
– –
1024 points maximum 1024 points maximum
– –
Sequence program storage media Flash ROM 128KB 256KB
Flash ROM 128KB 256KB 384KB
NOTE 1 The PMC–RA1 can be used with the loader control function
of the FANUC Series 16i/18i/21i/160i/180i/210i. 2 For I/O of the FANUC Series 16i/18i/21i/160i/180i/210i,
only the I/O link is used.
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
13
����� 1.1 PMC specifications (9)
Series 21 i/210i
Model PMC–RA1 (Note 1)
PMC–RA5
Programming method Ladder Ladder
Number of ladder levels 2 2
First–level execution period 8 ms 8 ms
Basic instruction processing time 5.0 (µ sec/ step)
0.085 (µ sec/ step)
Program capacity � Ladder (step)
� Symbol Comment
� Message
About 3,000 About 5,000
1KB to 128KB
0.1KB to 64KB
About 3,000 About 5,000 About 8,000 About 12,000 About 16,000 1KB to 128KB
0.1KB to 64KB
Instruction (Basic instruction) (Functional instruction)
12 kinds 49 kinds
14 kinds 66 kinds
Internal relay (R) Message request (A) Nonvolatile memory
� Variable timer (T) � Counter (C) � Keep replay (K) � Data table (D)
Subprogram (P) Label (L) Fixed timer
1100 bytes 25 bytes (200 points)
80 bytes (40 each) 80 bytes (20 each)
20 bytes 1860 bytes
– –
100 each (Timer number specification)
1118 bytes 25 bytes (200 points)
80 bytes (40 each) 80 bytes (20 each)
20 bytes 1860 bytes
512 each 9999 each
100 each (Timer number specification)
I/O � I/O link (Input)
(Note 2) (Output) � Built–in I/O card (Input)
(Output)
1024 points maximum 1024 points maximum
– –
1024 points maximum 1024 points maximum
– –
Sequence program storage media Flash ROM 128KB
Flash ROM 128KB
NOTE 1 The PMC–RA1 can be used with the loader control function
of the FANUC Series 16i/18i/21i/160i/180i/210i. 2 For I/O of the FANUC Series 16i/18i/21i/160i/180i/210i,
only the I/O link is used.ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
14
����� 1.1 PMC specifications (10)
Series 15–MODEL B
Model PMC–NB (4048 Series)
PMC–NB2
Programming method language Ladder C–language
Ladder C–language
Step sequence
Number of ladder level 3 3
Level–1 Cycle Time 8 ms 8 ms
Basic instruction
Execution Time
0.1
(µs/step) 0.1
(µs/step)
Program capacity
� Ladder(step)
� Symbol/Comment
(Note)
� Message
� Language only
Approx. 8,000
Approx.16,000
Approx.24,000
1 to 128KB
0.1 to 64KB
max. 896KB
Approx. 8,000
Approx.16,000
Approx.24,000
1 to 128KB
0.1 to 64KB
max. 896KB
Instruction (Basic)
(Function)
14 kinds
69 kinds
14 kinds
69 kinds
Internal relay (R)
Message request (A)
Non–volatile
� Var.Timer (T)
� Counter (C)
� Keep relay (K)
� Data table (D)
Subprogram (P)
Label (L)
Fixed timer
1618 byte
25 byte
80 byte
80 byte
20 byte
3000 byte
512 programs
9999 labels
Max 100 timers specified by timer No.
3200 byte
125 byte
300 byte
200 byte
50 byte
8000 byte
2000 programs
9999 labels
Max 100 timers specified by timer No.
Input/output
� I/O link (I)
(O)
� I/O card (I)
(O)
max 1024 points.
max 1024 points.
–
–
max 1024 points.
max 1024 points.
–
–
Sequence program storage media
Flash ROM
64 KB
128 KB
256 KB
512 KB
1 MB
Flash ROM
64 KB
128 KB
256 KB
512 KB
1 MB
NOTE Please refer to (4) for PMC–NB(4047 Series). The above–mentioned table is a value for PMC–NB/NB2 (4048 Series).
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
15
Table 1.2 Summary of specification of ladder program (1)
Model PMC–PA1 PMC–PA3 PMC–P
PMC address
Interfaces between the PMC and CNC (F and G)
Compatible Incompatible (Note 2)
Interfaces between the PMC and machine (X and Y)
Compatible Incompatible (Note 2)
Others (R, A, C, K, D, T) Compatible Incompatible
Ladder program
ROM format (object) Incompatible (Note 1) rogram
compatibility Source format (mnemonic) Compatible Incompatible (Note 2)
System Divided system Not provided (Note 3) Provided
Undivided system Provided Not provided
Basic commands Compatible
Function commands
DISP (SUB49) Not provided (Note 4) Provided commands
COM (SUB9)
Coil count specification Not provided (Note 5) Provided (SUB9)
COME (SUB29) specification Provided
JMP (SUB10)
Coil count specification Not provided (Note 5) Provided (SUB10)
JMPE (SUB30) specification Provided
NOTE 1 The same ROM cannot be shared by different models. The
ROM must be rewritten using the offline programmer. 2 It is possible that convert the signal address by the
operation of “SIGNAL ADDRESS CONVERSION” (APPENDIX G).
3 The setting item of system parameter IGNORE DEVIDE CODE is not provided.
4 Use the DISPB (SUB41) command instead. 5 The range of the COM (SUB9) and JMP (SUB10)
commands cannot be specified with the number of coils. Specify the range with the COME (SUB29) and JMPE (SUB30) commands. If specify the number of coils, no error messages will be displayed while editing, but “ALARM093” will be displayed when send the data to RAM.
1.2 SUMMARY OF SPECIFICATION OF LADDER PROGRAM
ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
16
Table 1.2 Summary of specification of ladder program (2)
Model PMC–RA1 PMC– RA2
PMC– RA3/ RA5
PMC– RB
PMC– RB2
PMC– RB3/ RB4/ RB5/ RB6
PMC– RC
PMC– RC3/ RC4
PMC address Interfaces between the PMC and CNC (F and G)
Compatible
Interfaces between the PMC and machine (X and Y)
Compatible
Subprogram, label (P and L) Not provided Provided Not provided Provided Not provided
Provided
Others (R, A, C, K, D, T) Compatible (Note 1)
Ladder program
ROM format (object) Incompatible (Note 2) rogram
compatibility Source format (mnemonic) Compatible (Note 3)
System Divided system Not provided (Note 4) Provided Not provided (Note 4)
Provided Not provided
Undivided system Provided
Structuring Sub program Unusable Usable Unusable Usable Un- usable
Usable
Basic commands Compatible
Function d
END3 (SUB48) Not provided Provided commands DISP (SUB49) Not provided (Note 5) Provided
COM (SUB9)
Coil count specification Not provided (Note 6) Provided Not provided
(Note 6) Provided
Not provided (Note 6)
COME (SUB29) specification Provided
JMP (SUB10)
Coil count specification Not provided (Note 6) Provided Not provided
(Note 6) Provided
Not provided (Note 6)
JMPE (SUB30) specification Provided
FNC9X (SUB9X) Not provided Provided
MMCWR (SUB98), MMCWW (SUB99) MMC3R (SUB88), MMC3W (SUB89) (Note 7)
Provided (Note 7) Provided
MOVB (SUB43), MOVW (SUB44) , MOVN (SUB45) Not provided Provided Not provided Provided
Not provided
Provided
DIFU (SUB57), DIFD (SUB58) Not provided Provided Not provided Provided Notprovided Provided
AND (SUB60), OR (SUB61) NOT (SUB62), EOR (SUB59) Not provided Provided Not provided Provided
Not provided
Provided
Function command (for structured programming)
Commands for subprogram END (SUB64) , CALL (SUB65), CALLU (SUB66) , SP (SUB71), SPE (SUB72)
Not provided Provided Not provided Provided Notprovided Provided
rogramming) Extended jump command JMPB (SUB68), JMPC (SUB73) LBL (SUB69)
Not provided Provided Not provided Provided Notprovided Provided
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
17
NOTE 1 The internal relay and the data table in nonvolatile memory for the PMC-RB3, RC, RC3 are
extended, compared with those for other models. 2 The same ROM cannot be shared by different models. The ROM must be rewritten using the
offline programmer. However, the ROM for the PMC–RA2 can be used for the PMC–RA3 and the ROM for the PMC–RB2 can be used for the PMC–RB3.
3 The program can be converted by reinputting it after it is output in a source format. 4 The setting item of system parameter IGNORE DEVIDE CODE is not provided. 5 Use the DISPB (SUB41) command instead. 6 The range of the COM (SUB9) and JMP (SUB10) commands cannot be specified with the
number of coils. Specify the range with the COME (SUB29) and JMPE (SUB30) commands. 7 For the FS18A (PMC–RA1/RA2/RA3), only the MMC–III can be used. For the FS18B, the
MMC–III and MMC–IV can be used. For the FS21B (PMC–RA1/RA3), the MMC–IV can be used. For the FS16i/18i/21i, the MMC–IV can be used. For the FS16C/18C, the MMC–IV can be used.
ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
18
����� 1.2 Summary of specification of ladder program (3)
Model
Series
PMC– NA
(4046)
PMC– NB
(4047) (4048)
PMC– NB2
(4048)
PMC address Interfaces between the PMC and CNC (F and G) Incompatible
Interfaces between the PMC and machine (X and Y)
Compatible
Subprogram, label (P and L) Not provided
Provided
Others (R, A, C, K, D, T) Compatible (Note 1)
Ladder program
ROM format (object) Incompatible (Note 2) rogram
compatibility Source format (mnemonic) Compatible (Note 3)
System Divided system Provided Not provided
Undivided system Not provided
Provided
Structuring Subprogram Usable Unusable
Step sequence Unusable Usable
Basic commands Compatible
Function commands
END3 (SUB48) Provided commands
DISP (SUB49) Provided Not provided
COM (SUB9)
Coil count spesification Provided Not provided (SUB9)
COME (SUB29) specification Provided
JMP (SUB10)
Coil count specification Provided Not provided (SUB10)
JMPE (SUB30) specification Provided
FNC9X (SUB9X) Provided
LIBRY (SUB60), LEND (SUB61) Provided Not provided
MMCWR (SUB98), MMCWW (SUB99) MMC3R (SUB88), MMC3W (SUB89) MOVB (SUB43), MOVW (SUB44) MOVN (SUB45) DIFU (SUB57), DIFD (SUB58) AND (SUB60), OR (SUB61) NOT (SUB62), EOR (SUB59)
Not provided
Provided
Function command (for structured programming)
� Command for subprogram END (SUB64) , CALL (SUB65) , CALLU (SUB66) , SP (SUB71) , SPE (SUB72)
Not provided
Provided
� Extended jump command JMPB (SUB68) , JMPC (SUB73) , LBL (SUB69)
Not provided
Provided
NOTE 1 Management of internal relay address and that of datatable
are different between the PMC–NB/NB2 and the PMC–NA. 2 The same ROM cannot be shared by different models.
The ROM must be rewritten using the offline programmer. 3 The data can be converted by outputting in the source
format and then inputting again. Moreover, a part of functional instruction is not compatible between PMC–NB/NB2 and PMC–NA.
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
19
This is paragraph outlines functions of a sequence program before explaining the programming work.
A sequence program is a program for sequence control of machine tools and other systems.
A program is defined as a processing procedure to enable CPU to execute arithmetic processing.
This program is converted into a format (machine language instructions) to enable CPU to execute decoding and arithmetic processing, and stored into the RAM or ROM memory.
The CPU reads out instructions of the program stored into the memory at high speed every instruction, and executes the program by arithmetic operation.
The programming of a sequence program begins with the production of a ladder diagram which serves as a processing procedure for arithmetic processing by CPU.
This ladder program is produced using PMC instructions.
After producing the ladder diagram, the processing sequence of this ladder diagram is converted into machine language instructions, and stored into the memory (program input).
Conversion into the machine language instructions and storage into the memory are done by the PMC programmer. The PMC programmer is a function to produce a program.
The sequence program being stored into the memory is sequentially read out into the PMC’s CPU every instruction at high speed and executed.
Fig. 1.3 shows this relation.
The CPU reads out input circuit signals of address X0.0 by RD X0.0 instruction, and sets them into an operation register. Then, the CPU executes AND operation with internal relay states at address R10.0 according to the AND R10.1 instruction, and sets these results into the operation register.
The CPU executes instructions at high speed and outputs arithmetic results to the address Y0.0 output circuit.
1.3 WHAT IS A SEQUENCE PROGRAM?
ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
20
Input circuit
RD X0.0
AND R10.1
OR X6.1
AND.NOT R20.3
WRT Y0.0
X0.0 X6.1
Y0.0
Output circuit
Internal relay (RAM)
R10.1 R20.3
CPU
Sequence program memory
PMC (Programmable Machine Controller)
Sequence program inputX0.0 R10.1
C R20.3 Y0.0
A B D W
Controlled system, such as machine tools and other systems
X6.1
����1.3 Execution of sequence program by PMC
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
21
After deciding the control object specifications and calculating the number of input/output signal points, create the interface specifications. Use the input/output signal interface tables in the CONNECTING MANUAL for the creation of the interface specifications. Enter the signal names (within six characters) in the input/output signal interface table according to the type of the connected signals. For the input/output signals, see CONNECTING MANUAL.
Express the control operations decided by step 2 by use of the ladder diagram (relay circuit diagram). For the functions of the timer, counter, etc. which cannot be expressed with the relay symbols (i.e. the functional instructions), express them with the symbols assigned to the functional instructions.
In the offline programmer and built-in editing function, the sequence program can be entered in the ladder diagram format from the keys of the CRT/MDI panel or from the keys of the keyboard of the SYSTEM P series.
Also, the entered sequence program can be output to the printer in the ladder diagram format using the SYSTEM P series.
Therefore, entry can be performed while the ladder diagram is created on the CRT screen at the time of sequence program entry. Thus no ladder diagram may be prepared in advance.
However, in order to shorten the time occupied by the equipment for the creation of the sequence program or to efficiently create the sequence program, it is recommended to prepare the ladder diagram in advance.
The ladder diagram is used as a maintenance diagram by the personnel in charge of maintenance in FANUC, the machine tool builder and end user in the world. Therefore, the ladder diagram must be easy to understand.
Signal names (max. six characters) can be entered to the input/output signals, comments (max. 30 characters) can be entered to the relay coil, and comments (max. 30 characters) can be entered to the input/output signals of the address tables at the time of entry of the sequence program. Be sure to enter understandable signal names and comments as much as possible.
1.4 CREATION OF INTERFACE SPECIFICATIONS (STEPS 1 TO 3)
1.5 CREATION OF LADDER DIAGRAM (STEP 4)
ww w.
cn cc
en ter
.co m
MF
F7.0 SF
F7.2 TF
F7.3
MF
F 7.0
SF
F 7.2
TF
F 7.3
MFIN
R211.7
SFIN
R211.5
TFIN
R211.6
FIN
G4.3
Miscellaneous function finish signal
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
22
In the coding, the contents of control expressed in the ladder diagram are converted into PMC instructions. In the case of using the offline programmer or ladder diagram editting, since sequence program entry can be performed in the simple ladder diagram format, it is normally unnecessary to perform coding.
Coding is necessary only when the sequence program is punched on a paper tape and entered from the paper tape.
Examples of the ladder diagram and the coding are shown in Fig. 1.6.
Step number Instruction Address number, bit number
Remark
850 RD F7.0 MF
851 OR F7.2 SF
852 OR F7.3 TF
853 RD.NOT.STK F7.0 MF
854 OR R211.7 MFIN
856 AND.STK
857 RD.NOT.STK F7.2 SF
858 OR R211.5 SFIN
859 AND.STK
860 RD.NOT.STK F7.3 TF
861 OR R211.6 TFIN
862 AND.STK
863 WRT G4.3 FIN
����1.6
1.6 CODING (STEP 5)
ww w.
cn cc
en ter
.co m
B–61863E/10 1. SEQUENCE PROGRAM
CREATING PROCEDUREPMC SEQUENCE PROGRAM
23
The sequence program can be entered in five ways as follows:
(1) Entry with CRT/MDI keys The sequence program is entered in the ladder diagram format by pressing the keys of the CRT/MDI.
(2) Entry with keys of SYSTEM P series keyboard The sequence program is entered in the mnemonic symbol by pressing the keys of SYSTEM P series keyboard.
(3) Entry from PPR of SYSTEM P series The sequence program punched on a paper tape is read out of the PPR and stored in the memory of the SYSTEM P series.
(4) Entry form floppy disk of SYSTEM P series This method is used when a completed sequence program is slightly changed. The sequence program written in the floppy disk is stored in the memory of SYSTEM P series.
(5) Entry form ROM Writer This method is used when a completed sequence program is slightly changed. The sequence program written in the ROM is stored from the PMC Writer or FA Writer into P-G or Debugging RAM.
Check the sequence program and write it into the ROM after check is over. The sequence program can be checked in two ways.
(1) Check by simulator Instead of the machine, connect a simulator (consisting of lamps and switches). Instead of using input signals from the machine, enter signals by turning on and off the switches according to the machine movement. Check the output signals on the basis of the activation of the lamps.
(2) Check by system operation Perform checks by connecting the machine. Since it sometimes happens that unexpected operations may be executed depending on a sequence program, arrange for safety before starting operations.
(3) Writing into ROM When check of the sequence program is over, write the sequence program into the ROM. The ROMs to be used are as follows. Then, the ROM into the CNC unit, and deliver it as a regular product to an end user. Writing of the sequence program into the ROM, maintenance and control thereof shall be performed by the machine tool builder. For this purpose, FANUC provides the PMC Writer or FA Writer as the ROM writer and the ROM or the ROM module that is the PC board on which a ROM chip is mounted. Be sure to use these devices for entering a sequence program in ROMs.
1.7 SEQUENCE PROGRAM ENTRY (STEPS 6, 7)
1.8 SEQUENCE PROGRAM CHECK AND WRITE INTO ROM (STEPS 8 TO 11)
ww w.
cn cc
en ter
.co m
1. SEQUENCE PROGRAM CREATING PROCEDURE B–61863E/10PMC SEQUENCE PROGRAM
24
(1) Storage and control of sequence program After debugging, the sequence program should be stored and controlled by the machine tool builder. It can be stored in the following ways:
(a) Storing in ROM The sequence program can be stored in the ROM. For control, enter the drawing number, edition number, etc. of the machine tool builder into the label provided in the ROM, and attach it to the ROM for control. The same control is necessary for the ROM for product.
(b) Storing in floppy disk The sequence program can be stored in the floppy disk with offline programmer. Many programs can be stored in one floppy disk.
(c) Storing in paper tape The sequence program can be stored in the form of a paper tape.
(d) Storing in FANUC floppy disk cassette The sequence program can be stored in floppy disk cassette.
(2) Compiling and control of maintenance drawing The sequence program can be output to the printer in the ladder diagram format using the offline programmer or built-in editing function. Be sure to attach the ladder diagram to the machine as a maintenance drawing together with the machine tool magnetic circuit diagrams, etc.
1.9 STORAGE AND CONTROL OF SEQUENCE PROGRAM (STEPS 12 TO 14)
ww w.
cn cc
en ter
.co m
B–61863E/10 2. SEQUENCE PROGRAMPMC SEQUENCE PROGRAM
25
2 SEQUENCE PROGRAM Since PMC sequence control handled by software and operates on principles different from a general relay circuit, the sequence control method must be fully understood in order to design the PMC sequence.
ww w.
cn cc
en ter
.co m
2. SEQUENCE PROGRAM B–61863E/10PMC SEQUENCE PROGRAM
26
In a general relay sequence circuit, each relay operates at approximately the same time. In the figure below for example, when relay A operates, the relay D and E operate at approximately the same time. (When both contacts B and C are off.) In PMC sequence control, each relay of the circuit operates sequentially. When relay A operates, relay D operates, then relay E (see Fig. 2.1 (a)). Thus each relay operates in sequence which can be written as a ladder diagram. (programmed sequence)
A B D
A C
E
����2.1 (a) Circuit examples
Although the PMC sequential operation is performed at high speed, the speed will change with the order to be executed.
Fig. 2.1 (b) (A) and (B) illustrate operations varying from the relay circuit to PMC program.
A C
B
A
C
A
C
A C
B
(A)
(B)
(P.B)
(P.B)
����2.1 (b) Circuit examples
(1) Relay circuit Operations are the same in both Fig. 2.1 (b) (A) and (B). Turning on A (P.B) causes current to flow to coils B and C, which turns on B and C. When C turns on, B turns off.
(2) PMC program In Fig. 2.1 (b) (A), as in the relay circuit, turning on A (P.B) turns on B and C, and after one cycle of the PMC sequence, turns off B. But in Fig. 2.1 (b) (B), turning on A (P.B) turns on C, but does not turn on B.
2.1 EXECUTION PROCEDURE OF SEQUENCE PROGRAM
ww w.
cn cc
en ter
.co m
B–61863E/10 2. SEQUENCE PROGRAMPMC SEQUENCE PROGRAM
27
The sequence program is executed from the beginning of coding to the end of coding of the ladder diagram in the sequence written. When the sequence program ends, the program starts over from the beginning. This is called repetitive operation.
The execution time from the beginning to the end of the ladder diagram is called the sequence processing time, which varies according to the control scale (the number of steps) and the size of the 1st level sequence. The shorter the process time is, the better the signal response becomes.
2.2 REPETITIVE OPERATION
ww w.
cn cc
en ter
.co m
2. SEQUENCE PROGRAM B–61863E/10PMC SEQUENCE PROGRAM
28
A sequence program consists of three parts: 1st level sequence, 2nd level sequence and 3rd level sequence. The 3rd level sequence part is added to the models usable the 3rd level sequence. (see Fig. 2.3 (a)). The 1st level sequence part operates every 8 ms (high-speed sequential operation). If the 1st level sequence part is long, the total operating time, including the 2nd level sequence part, is extended. Therefore the 1st level sequence part must be programmed to be processed in as short time as possible. The 2nd level sequence part operates every 8×n ms. Here n is a dividing number for the 2nd level sequence part. The 2nd level sequence part is divided automatically when the sequence program is transferred to the RAM for debugging in the CNC unit or it is written on ROM after the program is created. The time for one cycle of the sequence program is then displayed on the offline programmer screen. The 3rd level sequence part operates during idle time of PMC.
Sequence program
1st level sequence part
2nd level sequence part
3rd level sequence part
Specifies the end of the 1st level sequence part.
SUB 1
SUB 2
SUB 48
Division 1
Division 2
Division n
Specifies the end of the 2nd level sequence part.
(Only the models usable the 3rd level sequence) Specifies the end of the 3rd level sequence part.
����2.3 (a) Construction of sequence program
(1) Division of the 2nd level sequence part The 2nd level sequence part must be divided in order to execute the 1st level sequence part. For example a sequence program is executed in the following sequence when the dividing number is n. (See Fig. 2.3 (b), 2.3 (c) ) After the last 2nd level sequence part (division n) is executed, the sequence program is executed again from the beginning. Thus, when the dividing number is n, the cycle of execution is 8mms (8ms×n). The 1st level sequence operates every 8 msec, and the 2nd level sequence every 8×n msec. If the steps of the 1st level sequence is increased, the steps of the 2nd level sequence operating within 8 msec becomes less, thereby increasing the dividing number and making the processing time longer. Therefore, it is desirable to program so as to reduce the 1st level sequence to a minimum. In the, PMC-RA1, -RA2, -RB and -RB2, 1.25 ms of 8 ms is assigned to execution of the 1st and 2nd level sequences. The remaining time is assigned to NC processing. In the PMC-RC, 5 ms of 8 ms is assigned to execution of the 1st and 2nd level sequences. The standard setting value is 5 ms when system parameter LADDER EXEC = 100%. The remaining time is assigned to execution of the 3rd level sequence and the program.
2.3 PRIORITY OF EXECUTION (1ST LEVEL, 2ND LEVEL AND 3RD LEVEL)
ww w.
cn cc
en ter
.co m
B–61863E/10 2. SEQUENCE PROGRAMPMC SEQUENCE PROGRAM
29
1st level
2nd level
NC processing
8ms 8ms 8ms
Division 1Division 1 Division nDivision 2
1.25ms 1.25ms 1.25ms
����2.3 (b) Sequence in which the Sequence Program Is Executed (PMC-RA1, -RA2, -RB and -RB2)
1st level
2nd level
3rd level, program execution, and displaying the PMC screen
8ms 8ms 8ms
Division 1Division 1 Division nDivision 2
5ms 5ms 5ms
����2.3 (c) Sequence in which the Sequence Program Is Executed (PMC-RC)
(2) 1st level sequence part Only short-width pulse signals are processed. These signals include emergency stop, overtravel of each axis, reference point return deceleration, external deceleration, skip, measuring position arrival and feed hold signals.
(3) 3rd level sequence The purpose of the 3rd level sequence is to execute such programs as display processing or control status monitor having no direct relation to the machine control (operator message, alarm display, etc.), to lighten the load of the 2nd level program having a direct relation to the machine control by transferring former programs to the 3rd level, and to shorten the PMC execution time (cycle time). For PMC-RC, when 3rd level program is not used, command SUB 48 (END3) following SUB 2 instruction.
(4) Divided system and undivided system There is a model can use the divided system and undivided system among the PMCs. In the divided system, a ladder program is divided before being executed if all ladder program run regardless of the sequence state (see Fig. 2.3 (d)). For an actual ladder program, not all ladder program run. The PMC cannot therefore be used effectively. The PMC can execute the ladder program in the system for terminating one cycle of the program using the time to execute the actual ladder program (undivide system) as well as in the divided system. The time required for the one cycle can be reduced by the effective use of jump instructions in the ladder program. Since the sequence using many functional instructions requires a lot of processing time, the undivided system should be specified so that the PMC is used more effectively (see Fig. 2.3 (e)). To operate the PMC in the undivided system, set system parameter IGNORE DIVIDE CODE to YES. The PMC model usable only the undivided system, does not have setting system parameter IGNORE DIVIDE CODE. It is always
ww w.
cn cc
en ter
.co m
2. SEQUENCE PROGRAM B–61863E/10PMC SEQUENCE PROGRAM
30
operated under the undivided system.
C
B
A
Functional instruction
Functional instruction
Functional instruction
The ladder program is divided if all functional instructions are executed regardless of execution of an actual ladder program.
����2.3 (d) Divisions in the divided system
C
B
A
Functional instruction
Functional instruction
Functional instruction
Execution of an actual ladder program when A = 0, B = 1, and C = 0.
����2.3 (e) Execution of a ladder program
(a) Example of effective use of the undivided system Example 1)
Many M codes are usually used. Since more than one M code is not used in the same block, the decoded M code is divided into several parts. Machine instructions are used as these decoded parts. The M code is divided into M codes having two digits such as M21, M22, M24, M28, and so on.
Example 2) To reduce the number of ROM types using the same ladder program for multiple machines, a PMC parameter must be specified so that any of the following ladder program run.
(Ladders dedicated to each machine)
(Selected by a PMC parameter)
Ladder A
Ladder B2Ladder B1 Ladder B3
(Ladder common to all machines)
����2.3 (f)
(5) Construction of sequence program in the case of using Sub-program.
ww w.
cn cc
en ter
.co m
B–61863E/10 2. SEQUENCE PROGRAMPMC SEQUENCE PROGRAM
31
END1 (SUB 1)
END2 (SUB 2)
END3 (SUB 48)
SP
SPE
SP
SPE
SP
SPE
END
1st level sequence part
2nd level sequence part
3rd level sequence part (Only about the PMC model usable the 3rd level sequence)
Sub program
End of sequence program
� Sub program must be written between 2nd � level program and 3rd level program.
� The end of sequence program is expressed � by END command.
����2.3 (g)
ww w.
cn cc
en ter
.co m
2. SEQUENCE PROGRAM B–61863E/10PMC SEQUENCE PROGRAM
32
� : Can be used � : Cannot be used
PA1 PA3 RA1 RA2 RA3 RA5 RB RB2 RB3 RB4 RB5 RB6 RC RC3 RC4 NB NB2
� � � � � � � � � � � � � � � � �
With the conventional PMC, a ladder program is described sequentially. By employing a ladder language that allows structured programming, the following benefits are derived:
� A program can be understood and developed easily.
� A program error can be found easily.
� When an operation error occurs, the cause can be found easily.
Three major structured programming capabilities are supported.
(1) Subprogramming A subprogram can consist of a ladder sequence as the processing unit.
� � �
Job A � � � �
�
FUNC � � � �
�
Job B
(2) Nesting Ladder subprograms created in (1) above are combined to structure a ladder sequence.
� � �
Job A Job A1 Job A11
Job B Job A12
Job An
Main Program Sub Program1 Sub Program2
2.4 SEQUENCE PROGRAM STRUCTURING
ww w.
cn cc
en ter
.co m
B–61863E/10 2. SEQUENCE PROGRAMPMC SEQUENCE PROGRAM
33
(3) Conditional branch The main program loops and checks whether conditions are satisfied. If a condition is satisfied, the corresponding subprogram is executed. If the condition is not satisfied, the subprogram is skipped.
Main Program Sub Program1
� � �
PROCESS11 PROCESS11 STATE1 PROCESS1
PROCESS12
STATE2 PROCESS2
PROCESS13
For details, see Chapter 9.
ww w.
cn cc
en ter
.co m
2. SEQUENCE PROGRAM B–61863E/10PMC SEQUENCE PROGRAM
34
Input signals (M function, T function, etc.) from the CNC and those (cycle start, feed hold, etc.) from the machine tool are sent to the PMC.
Signals for the CNC (cycle start, feed hold, etc.) and those for the machine tool (tunret rotation, spindle stop, etc.) are output from the PMC. Fig. 2.4 shows the relationship between these signals and the PMC.
Input signals are entered in the input memory of PMC and output signals are issued from PMC. As shown in Fig. 2.5, the input signals are synchronized only in the 2nd level sequence part.
Input signals from CNC
Input memory of CNC
1st level sequence part
Sequence program
2nd level sequence part
PMC
3rd level sequence part (Only PMC-RC)
Input signals from CNC
Input signals from machine tool
2nd level synchronous input signal memory
Output signals to the machine
Input signals from machine
Input signal memory
Output signalmemory
Output signals to machine tool
Input signals from machine tool
CNC
Output signals to CNC
MT
Transmitted every 2 ms
Transmitted every 8 ms
Transmitted at the start of 2nd level
Output memory of CNC
����2.5 PMC I/O signals
2.5 PROCESSING I/O SIGNALS
ww w.
cn cc
en ter
.co m
B–61863E/10 2. SEQUENCE PROGRAMPMC SEQUENCE PROGRAM
35
(1) Input memory of CNC The input signals from CNC are loaded in memory of CNC and are transferred to the PMC at intervals of 8 ms. Since the 1st level and the 3rd level sequence part directly refer to these signals and process operations, these signals do not synchronize with input signals from the CNC. See item 2.5.3.
(2) Input signals from machine tool (DI/DO card) Input signals from the machine tool are transferred to the input signal memory from the input circuit (DI/DO card). 1st level and 3rd level sequence part directly processes by reading signals loaded in the input signal memory.
(3) Input signal memory The input signal memory stores signals transferred from the machine tool at intervals of 2 ms period. The PMC 1st level sequence part and 3rd level sequence part are used to read and process signals stored in this memory. In this case, state of signals set in the input signal memory synchronizes with that of 1st level sequence part but not with that of 3rd level sequence part. See item 2.5.3.
(4) 2nd level synchronous input signal memory The 2nd level synchronous input signal memory stores signals processed by the 2nd level sequence section. State of the signals set in this memory synchronizes with that of the 2nd level sequence part. Input signal memory and input signals from the CNC are transferred to the 2nd level synchronous input signal memory only at the beginning of execution of the 2nd level sequence section. Therefore, the status of the 2nd level synchronous input signal memory does not change from the beginning to end of the execution of the 2nd level sequence part. Programmer function makes the processing so that the 1st level sequence section and 3rd level sequence section use the input signal memory and input signals from the CNC side and the 2nd level sequence section uses the 2nd level synchronous input signal memory.
(1) CNC output memory
The output signals are transferred from the PMC to the CNC output memory at intervals of 8 ms.
(2) Output signals to machine tool (DI/DO card) Output signals to the machine tool are transferred from the PMC output signal memory to the machine tool.
(3) Output signal memory The output signal memory is set by the PMC sequence program. Signals stored in this memory are transferred to the machine side at a 2 ms period.
2.5.1 Input Signal Processing
2.5.2 Output Signal Processingww
w. cn
cc en
ter .co
m
2. SEQUENCE PROGRAM B–61863E/10PMC SEQUENCE PROGRAM
36
NOTE The status of the CNC input memory, input signals from machine, CNC output memory and output signals to machine can be checked by using the PC self-diagnosis function. The self-diagnosis number specified is the address number used by the sequence program.
Signals input from the CNC are transferred to the PMC at intervals of 8 ms. Signals output to the CNC are transferred from the PMC at intervals of 8 ms. PMC I/O signals are generally transferred at intervals of 8 ms. In this case, note that state of the input signals from the CNC does not synchronize with that of the 1st level sequence program and the 2nd level sequence program. By this reason, if an input signal from the CNC may change while execution of the 1st level sequence program, for example, some trouble may occur like example in Fig. 2.5.3 (a). To avoid such trouble, write the state of signal TF in an internal relay at the start of the 1st level sequence, then the 1st level sequence program shall refer to the internal relay as signal TF. See Fig. 2.5.3 (b).
TF
If after TF=0 is load, signal state changes to TF=1, state of W1=1 and W2=1 may momentary occur
W1
TF W2
END 1
����2.5.3 (a)
Make signal TF synchronized one, and state of W1=1 and W2=1 may not occur.
TFM
TFM W1
TFM W2
END 1
TF
����2.5.3 (b)
2.5.3 I/O Signals to CNC
ww w.
cn cc
en ter
.co m
B–61863E/10 2. SEQUENCE PROGRAMPMC SEQUENCE PROGRAM
37
The status of the same input signal may be different in the 1st level and 2nd level sequences. That is, at 1st level, processing is performed using input signal memory and at 2nd level, processing is performed using the 2nd level synchronous input signal memory. Therefore, it is possible for a 2nd level input signal to delay by a cycle of 2nd level sequence execution at the worst, compared with a 1st level input signal. This must be kept in mind when writing the sequence program.
Signal statesO
A.M ON (short time width pulse signal)
B OFF
C OF
Differences drawn in Fig. 2.5.4 (a) and Fig. 2.5.4 (b) when the 1st level sequence has been executed are as follows:
(a) Fig. 2.5.4 (a) W2 may not be 1 even when W1=1. (Because the A.M signal may be different at the 1st and 2nd levels.)
(b) Fig. 2.5.4 (b) If W1=1, W2=1. When performing the sequence shown in Fig. 2.5.4 (a), proceed as follows: At 1st level, perform a high-speed sequence when the A.M signal changes (operating). At 2nd level, perform sequence processing when the A.M signal does not change (stopped).
A.M B
W1
END 1
A.M C
W2
A.M B
W1
END 1
W1 C
W2
1st Level
2nd Level
����2.5.4 (a) ����2.5.4 (b)
2.5.4 Difference of Status of Signals Between 1st Level and 2nd Level
ww w.
cn cc
en ter
.co m
2. SEQUENCE PROGRAM B–61863E/10PMC SEQUENCE PROGRAM
38
Interlocking is externally important in sequence control safety. Interlocking with the sequence program is necessary. However, interlocking with the end of the electric circuit in the machine tool magnetics cabinet must not be forgotten. Even though logically interlocked with the sequence program (software), the interlock will not work when trouble occurs in the hardware used to execute the sequence program. Therefore, always provide an interlock inside the machine tool magnetics cabinet panel to ensure operator safety and to protect the machine from damage.
2.6 INTERLOCKING
ww w.
cn cc
en ter
.co m
B–61863E/10 2. SEQUENCE PROGRAMPMC SEQUENCE PROGRAM
39
The exact sequence processing time is displayed on the CRT screen when the sequence programs have been completed. The time is 2nd level sequence division number n x 8 ms. This section explains how to estimate processing times that are important in sequence control when the ladder diagram, the basis of sequence program control, is almost complete.
(1) Processing time calculation units Sequence processing time estimation is based on the basic instructions (AND, OR, etc.). The execution time for a functional instruction is given in the execution constant column of the Functional Instruction Table. Converted to a basic instruction; that is the number of basic instructions that a functional instruction is equivalent to. Processing time is determined for the above using the equation in item below.
(2) Processing time estimation equation The number of division (n) in the 2nd level sequence is determined and the processing time is calculated using the following equations:
Sequence processing time = n (number of division) � 8 msec
(LT) msec n=
(ET)msec – (HT)msec +1
(n is an integer, fractions are omitted)
(a) (HT) is the execution time for the 1st level sequence section. (HT)={(number of steps in basic instruction)+(sum of functional instruction execution time constants)�10} �(IT) µsec Execution time constant for END.1 (206) must be included in HT.
(b) (LT) is the execution time for the 2nd level sequence section. (LT)={(number of steps in basic instruction)+(sum of functional instruction execution time constants)�10} �(IT) µsec END.2 execution time (127) must be included.
(c) (ET) is the execution time assigned to the 1st and 2nd level parts out of 8 ms. For PMC-RB (ET) = 1.25 ms = 1250µs For PMC-RC (standard setting when LADDER EXEC = 100%) (ET) = 5 ms = 5000µs
(d) IT) is the execution constant for calculating the processing time. The value is as follows: (IT) = 0.15µs
2.7 SEQUENCE PROGRAM PROCESSING TIME
ww w.
cn cc
en ter
.co m
2. SEQUENCE PROGRAM B–61863E/10PMC SEQUENCE PROGRAM
40
(3) Processing time calculation example
(a) 1st level sequence Basic instruction: 100 steps Functional instruction: CTR: 2 times,
COMPB: 2 times CTR execution time constant: 26 COMPB execution time constant: 24 END.1 execution time constant: 206 HT={100+(26�2+24�2+206)�10}�0.15 =474 µsec
(b) 2nd level sequence Basic instruction: 6,000 steps Functional instruction: TMR: 35 times, DECB: 25 times, ROTB: 2 times TMR execution time constant: 23 DECB execution time constant: 20 ROTB execution time constant: 33 END.2 execution time constant: 32 LT={6,000+(23 35+20 25+33 2+32) 10} 0.15=3004.5msec
(c) Determination of the number of divisions (n)
3004.5 µsec n= 1250µsec – 474 µsec +1 = 4.87
(d) Processing time calculation Sequence processing time=4 (number of division)� 8 msec=32 msec
ww w.
cn cc
en ter
.co m
Note)
Note)
Note)
B–61863E/10 2. SEQUENCE PROGRAMPMC SEQUENCE PROGRAM
41
In the PMC-RB, one 1M-bit EPROM is used for storing the sequence program. In the PMC-RA1, –RA2, –RB and –RB2, a 128KB, 256KB, 512KB, or 1MB ROM module is used for this purpose. Table 2.8 (a) shows the maximum memory capacity available for the sequence program. The number of bytes in parentheses indicates the size of the area dedicated to the programs other than the sequence program.
Table 2.8 (a) Maximum Memory Capacity for a Sequence Program
��� ROM Ladder Symbol andcomment Message Total
PMC-RA1, RA2, RB, RB2
1M-bit EPROM
64KB 64KB each 64KB 126KB
PMC-RC 128KB ROM module
96KB 64KB each 64KB 126KB
PMC-RC3 256KB ROM module
96KB 64KB each 64KB 254KB
PMC-NB 512KB ROM module
96KB 64KB each 64KB 288KB (222KB)
1MB ROM module
96KB 64KB each 64KB 288KB (734KB)
NOTE All ladder, symbol, comment, and message data items cannot be created using each maximum memory capacity. Reduce the memory capacity for any of the data items and create them so that they add up to the total capacity of each ROM.
Generate a sequence program within a range of bytes shown in Table 2.8 (a). Calculate the number of bytes of sequence program instructions and data based on Table 2.8 (b). When the program is initialized, symbol and comment areas are allocated 32KB (extendable and reducible in 1KB units) on memory. When the program is initialized, a message area is also allocated 2.1KB (extendable and reducible in 1KB units). Therefore, program the basic instructions and functional instructions listed in Table 2.8 (b) in the remaining capacity which is the difference of the number of bytes shown in Table 2.8 (a) and the number of bytes for symbols, comments, and messages.
Table 2.8 (b) Sizes of sequence program instructions and data
Basic instruction
Functional instruction
Functional instruction parameters
Message data Symbol Comment
4 bytes 4 bytes 4 bytes 1 byte/character (alphanumeric characters)
2 bytes/kana characters
10 bytes 1 byte/character
2.8 SEQUENCE PROGRAM MEMORY CAPACITY
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
42
3 ADDRESS An address shows a signal location. Addresses include input/output signals with respect to the machine, the input/output signals with respect to the CNC, the internal relays, the counters, the keep relays (PMC parameters), and data table. Each address consists of an address number (for every 8 signals) and a bit number (0 to 7). Enter the symbol table showing the relationship between the signal names and the addresses into the programmer by using the keys of the CRT/MDI or the keys of the keyboard of the offline programmer as in the case of the sequence program. For programming, see Chapter III and IV.
(1) Addresses related to PMC Four types of addresses as shown in Fig. 3 are necessary for creation of the PMC sequence program.
Internal relay
CNC signal
Machine (MT) signalPMC
Nonvolatile memory
(1) Counter (2) Keep relay (3) Data table (4) Variable Timer
Note)
����3 Addresses related to PMC
(a) The input/output signals with respect to the PMC, which are indicated by the solid lines, are transferred via the receiver and the driver of the I/O board.
(b) The input/output signals with respect to the PMC, which are indicated by the broken lines, are transferred only in the memory such as the RAM. All of these signals can be displayed on the CRT/MDI panel.
(2) Address regulations The address comprises the address number and the bit number in the format as shown below.
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
43
X 127. 7
Bit number (0 to 7) Address number (within four numerics after alphabet)
An alphabet must be specified at the beginning of the address number to indicate the type of the signal as shown in Table 3. When specifying the address in the byte unit by the functional instruction, specify X127. In this case, “.” and the bit number are not necessary.
Table 3 Alphabetic characters in address numbers (1)
Model
Character Signal description ��� ��� � � ��� ���� � ��� ���� �
� �� �� �� �� �� �� ��
X Input signal from the machine to the PMC (MT to PMC)
X0 to X127 (I/O Link Master)
X1000 to X1003 (Built–in l/O Card)
X1020 to X1051 (I/O Link Slave)
X1000 to X1005 X1020 to X1027
(Slave)
X0 to X127 (I/O Link Master)
X1000 to X1003 (Built–in I/O Card)
X1020 to X1051 (I/O Link Slave)
Y Output signal from the PMC to the machine (PMC to MT) (Caution 3)
Y0 to Y127 (I/O Link Master)
Y1000 to Y1002 (Built–in I/ O Card)
Y1020 to Y1051 (I/O Link Slave)
Y1000 to Y1003 Y1020 to Y1027
(Slave)
Y0 to Y127 (I/O Link Master)
Y1000 to Y1002 (Built–in l/O Card)
Y1020 to Y1051 (I/O Link Slave)
F Input signal from the NC to the PMC (NC to PMC)
F0 to F255 F1000 to F1255
(Dual path control)
F0 to F255 F0 to F255
G Output signal from the PMC to the NC (PMC to NC)
G0 to G255 G1000 to G1255
(Dual path control)
G0 to G255 G0 to G255
R Internal relay (Caution 1) R0 to R999 R9000 to
R9099
R0 to R999 R9000 to
R9117
R0 to R999 R9000 to R9117
R0 to R999 R9000 to R9117
A Message request signal A0 to A24 A0 to A24 A0 to A24
C Counter C0 to C79 C0 to C79 C0 to C79
K Keep relay (Caution 2) K0 to K19 K0 to K19 K0 to K19
T Variable timer T0 to T79 T0 to T79 T0 to T79
D Data table D0 to D1859 D0 to D1859 D0 to D1859
L Label Number – L1 to L9999 L1 to L9999 L1 to L9999
P Subprogram Number – P1 to P512 P1 to P512 P1 to P512
CAUTION 1 R9000 to R9117 are areas reserved for the PMC system
program; these areas cannot be used for output by a sequence program.
2 K17 to K19 are areas reserved for the PMC system program; these areas cannot be used for output by a sequence program.
3 I/O Link Master function is not available in the Power Mate–MODEL F. You cannot use the address X0–127 and Y0–127.
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
44
Table 3 Alphabetic characters in address numbers (2)
Model
Character Signal description ����� �����
� ��� � ��� � ��� � ��� � ���
X Input signal from the machine to the PMC (MT to PMC)
X0 to X127 X1000 to X1013 (Caution 1)
X0 to X127 X1000 to X1019
Y Output signal from the PMC to the machine (PMC to MT)
Y0 to Y127 Y1000 to Y1013 (Caution 1)
Y0 to Y127 Y1000 to Y1014
F Input signal from the NC to the PMC (NC to PMC)
F0 to F255 F1000 to F125
F0 to F255 F1000 to F1255
G Output signal from the PMC to the NC (PMC to NC)
G0 to G255 G1000 to G1255
G0 to G255 G1000 to G1255
R Internal relay (Caution 2) R0 to R999 R9000 to R9099
R0 to R999 R9000 to R9117
R0 to R999 R9000 to R9099
R0 to R999 R9000 to R9117
A Message request signal A0 to A24 A0 to A24
C Counter C0 to C79 C0 to C79
K Keep relay (Caution 3) K0 to K19 K0 to K19
D Data table D0 to D1859 D0 to D1859
T Variable timer T0 to T79 T0 to T79
L Label number – L1 to L9999 – L1 to L9999
P Subprogram number – P1 to P512 – P1 to P512
CAUTION 1 X1000 to X1007 and Y1000 to Y1007 are configured as a
matrix. 2 R9000 to R9117 are areas reserved for the PMC system
program; these areas cannot be used for output by a sequence program.
3 K17 to K19 are areas reserved for the PMC system program; these areas cannot be used for output by a sequence program.
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
45
Table 3 Alphabetic characters in address numbers (3)
Chara- Signal description Model
cter Signal description ��� �� ��� ��� ��� ��� ��� �� ��� ��� ��� ��
X Input signal from the machine to the PMC (MT to PMC)
X0 to X127 X1000 to X1039
X0 to X127
Y Output signal from the PMC to the machine (PMC to MT)
Y0 to Y127 Y1000 to Y1029
Y0 to Y127
F Input signal from the NC to the PMC (NC to PMC)
F0 to F255 F1000 to F1255
F0 to F319
G Output signal from the PMC to the NC (PMC to NC)
G0 to G255 G1000 to G1255
G0 to G511
R Internal relay (Caution 1) R0 to R999 R9000 to
R9099
R0 to R999 R9000 to
R9117
R0 to R1499 R9000 to
R9117
R0 to R1499 R9000 to
R9099
R0 to R1499 R9000 to
R9117
R0 to R1499 R9000 to
R9117
A Message request signal A0 to A24
C Counter C0 to C79
K Keep relay (Caution 2) K0 to K19
D Data table D0 to D1859 D0 to D2999
T Variable timer T0 to T79
L Label number – – L1 to L9999 – L1 to L9999
P Subprogram number – – P1 to P512 – P1 to P512
CAUTION 1 R9000 to R9117 are areas reserved for the PMC system
program; these areas cannot be used for output by a sequence program.
2 K17 to K19 are areas reserved for the PMC system program; these areas cannot be used for output by a sequence program.
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
46
Table 3 Alphabetic characters in address numbers (4)
Model
Character Signal descrip-tion ������ ������ � ������� ������ � ������
������ �
����� � ������� ����� � ������� ����� �
X Input signal from the machine to the PMC (MT to PMC)
X0 to X127 X1000 to X1019 X1020 to X1039
X0 to X127 X1000 to X1019 X1020 to X1039
Y Output signal from the PMC to the machine (PMC to MT)
Y0 to Y127 Y1000 to Y1014 Y1020 to Y1034
Y0 to Y127 Y1000 to Y1014 Y1020 to Y1034
F Input signal from the NC to the PMC (NC to PMC)
F0 to F255 F1000 to F1255
F0 to F255 F1000 to F1255
F0 to F511 F1000 to F1511 F2000 to F2511
F0 to F511 F1000 to F1511 F2000 to F2511
F0 to F255 F1000 to F1255
G Output signal from the PMC to the NC (PMC to NC)
G0 to G255 G1000 to G1255
G0 to G255 G1000 to G1255
G0 to G511 G1000 to G1511 G2000 to G2511
G0 to G511 G1000 to G1511 G2000 to G2511
G0 to G255 G1000 to G1255
R Internal relay R0 to R1499 R9000 to R9117
R0 to R1499 R9000 to R9117
R0 to R2999 R9000 to R9199
R0 to R2999 R9000 to R9199
R0 to R999 R9000 to R9099
A Message request signal
A0 to A24 A0 to A24 A0 to A124 A0 to A124 A0 to A24
C Counter C0 to C79 C0 to C79 C0 to C199 C0 to C199 C0 to C79
K Keep relay K0 to K19 K0 to K19 K0 to K39 K900 to K909
K0 to K39 K900 to K909
K0 to K19
T Data table T0 to T79 T0 to T79 T0 to T299 T0 to T299 T0 to T79
D Variable timer D0 to D2999 D0 to D2999 D0 to D7999 D0 to D7999 D0 to D1859
L Label number L1 to L9999 L1 to L9999 L1 to L9999 L1 to L9999 –
P Subprogram number P1 to P512 P1 to P512 P1 to P2000 P1 to P2000 –
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
47
Table 3 Alphabetic characters in address numbers (5)
Model
Character Signal description ������ ������ � �������� � ���� � �
����� � ������� ����� � �������
X Input signal from the machine to the PMC (MT to PMC)
X0 to X127 X1000 to X1019 X1020 to X1039
Y Output signal from the PMC to the machine (PMC to MT)
Y0 to Y127 Y1000 to Y1014 Y1020 to Y1034
F Input signal from the NC to the PMC (NC to PMC)
F0 to F255 F1000 to F1255
F0 to F255 F1000 to F1255
F0 to F511 F1000 to F1511 F2000 to F2511
F0 to F511 F1000 to F1511 F2000 to F2511
G Output signal from the PMC to the NC (PMC to NC)
G0 to G255 G1000 to G1255
G0 to G255 G1000 to G1255
G0 to G511 G1000 to G1511 G2000 to G2511
G0 to G511 G1000 to G1511 G2000 to G2511
R Internal relay R0 to R1499 R9000 to R9117
R0 to R1499 R9000 to R9117
R0 to R2999 R9000 to R9199
R0 to R2999 R9000 to R9199
A Message request signal A0 to A24 A0 to A24 A0 to A124 A0 to A124
C Counter C0 to C79 C0 to C79 C0 to C199 C0 to C199
K Keep relay K0 to K19 K0 to K19 K0 to K39 K900 to K909
K0 to K39 K900 to K909
T Data table T0 to T79 T0 to T79 T0 to T299 T0 to T299
D Variable timer D0 to D2999 D0 to D2999 D0 to D7999 D0 to D7999
L Label number L1 to L9999 L1 to L9999 L1 to L9999 L1 to L9999
P Subprogram number P1 to P512 P1 to P512 P1 to P2000 P1 to P2000
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
48
Table 3 Alphabetic characters in address numbers (6)
Model
Character Signal description ������ �����������
�� ���� �� ����
X Input signal from the machine to the PMC (MT to PMC)
X0 to X127 X1000 to X1011
Y Output signal from the PMC to the machine (PMC to MT)
Y0 to Y127 Y1000 to Y1008 (Note)
F Input signal from the NC to the PMC (NC to PMC)
F0 to F255 F1000 to F1255
G Output signal from the PMC to the NC (PMC to NC)
G0 to G255 G1000 to G1255
R Internal relay R0 to R1999 R9000 to R9099
R0 to R1499 R9000 to R9117
A Message request signal A0 to A24
C Counter C0 to C79
K Keep relay K0 to K19
D Data table – D0 to D1859
T Variable timer T0 to T79
L Label number – L1 to L9999
P Subprogram number – P1 to P512
NOTE The Y addresses for the 4082 series are Y0 to Y127 and Y1000 to Y1007.
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
49
Table 3 Alphabetic characters in address numbers (7)
Sym Model
Sym- bol Type of signal FANUC Series 16 �/18�/160�/180�bol
PMC–RB5 PMC–RB6
X ����� ���� � ��� ��� � ����� �� ���
�� � ����
X0 to X127 (Note) X0 to X127 (Note)
Y Output signal from the PMC to machine (PMC � MT)
Y0 to Y127 (Note) Y0 to Y127 (Note)
F Input signal from the NC to PMC ��� � ����
F0 to F255 F1000 to F1255
F0 to F511 F1000 to F1511 F2000 to F2511
G Output signal from the PMC to NC (PMC � NC)
G0 to G255 G1000 to G1255
G0 to G511 G1000 to G1511 G2000 to G2511
R Internal relay R0 to R1499 R9000 to R9117
R0 to R2999 R9000 to R9199
A Message request signal A0 to A24 A0 to A124
C Counter C0 to C79 C0 to C199
K Keep relay K0 to K19 K0 to K39 K900 to K909
D Variable timer T0 to T79 T0 to T299
T Data table D0 to D2999 D0 to D7999
L Label number L1 to L9999 L1 to L9999
P Subprogram number P1 to P512 P1 to P2000
NOTE With the 16/18–C, the addresses (X1000 and up, Y1000 and up) for the built–in I/O card are reserved. However, these areas cannot be used for I/O. Never use X1000 and up, or Y1000 and up.
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
50
Table 3 Alphabetic characters in address numbers (8)
Sym Model
Sym- bol Type of signal FANUC Series 21 �/210�bol
PMC–RA1 PMC–RA5
X Input signal from the machine to PMC ��� � ����
X0 to X127 (Note)
Y Output signal from the PMC to machine ���� � ���
Y0 to Y127 (Note)
F Input signal from the NC to PMC ��� � ����
F0 to F255 F1000 to F1255
G Output signal from the PMC to NC ���� � ���
G0 to G255 G1000 to G1255
R Internal relay R0 to R999 R9000 to R9099
R0 to R999 R9000 to R9117
A Message request signal A0 to A24
C Counter C0 to C79
K Keep relay K0 to K19
D Variable timer T0 to T79
T Data table D0 to D1859
L Label number – L1 to L9999
P Subprogram number – P1 to P512
NOTE With the 16/18–C, the addresses (X1000 and up, Y1000 and up) for the built–in I/O card are reserved. However, these areas cannot be used for I/O. Never use X1000 and up, or Y1000 and up.
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
51
Table 3 Alphabetic characters in address numbers (9)
Model
Character Signal descri ption ������ � ��� �� �Character Signal description ������ ���� �
�������
X Input signal from the machine to the PMC (MT to PMC)
X0 to X127
Y Output signal from the PMC to the machine (PMC to MT)
Y0 to Y127
F Input signal from the NC to the PMC (NC to PMC)
F0 to F319
G Output signal from the PMC to the NC (PMC to NC)
G0 to G511
R Internal relay R0 to R1499 R9000 to R9099
R0 to R1499 R9000 to R9117
A Message request signal A0 to A24 A0 to A124
C Counter (Non–volatile memory) C0 to C79 C0 to C199
K Keep relay (Non–volatile memory) K0 to K19 K0 to K39 K900 to K909
D Data table (Non–volatile memory) D0 to D2999 D0 to D7999
T Variable timer (Non–volatile memory)
T0 to T79 T0 to T299
L Label number L1 to L9999
P Subprogram number P1 to P512 P1 to P2000
CAUTION 1 R9000 to R9199 are areas reserved for the PMC system
program; these areas cannot be used for output by a sequence program.
2 K17 to K19 or K900 to K909 are areas reserved for the PMC system program; these areas cannot be used for output by a sequence program.
3 Please refer to (3) PMC–NB(Series 4047).
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
52
Addresses of the interfaces are outlined below. For details, see CONNECTING MANUAL of Series 16.
(1) Basic machine interface
(a) PMC�CNC related signals The addresses for Series 15 are from F0 to F511, for the others are from F0 to F255. For details of the signals, see CONNECTING MANUAL of CNC.
(b) PMC�CNC related signals The addresses for Series 15 are from G0 to G511, for the others are from G0 to G255. For details of the signals, see CONNECTING MANUAL of CNC.
3.1 ADDRESSES BETWEEN PMC AND CNC (PMC�NC)
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
53
(1) When the FANUC I/O UNIT-MODEL A is used
(a) PMC ← MT Addresses are from X0 to X127.
(b) PMC → MT Addresses are from X0 to X127.
Up to 1024 input and 1024 output points can be assigned to any address within the above range in byte units.
(2) When the built-in I/O card is used (except Series 15)
(a) PMC ← MT Addresses are from X1000 to X1019.
(b) PMC → MT Addresses are from X1000 to X1014.
The addresses in the above range are always specified. They cannot therefore be changed when the I/O points are assigned to them.
(3) NC signals whose addresses are fixed and that are input from the machine tool
Be sure to assign the following signals to be input from the machine tool to the specified addresses because the NC unit refers to the following fixed addresses during processing.
NOTE If both I/O Link and built-in I/O card are provided, the address of the I/O card is valid. (Except Series 15)
3.2 ADDRESSES BETWEEN PMC AND MACHINE TOOL (PMC�MT)
3.2.1 Addresses Between PMC and Machine Tool for PMC-RB/RC
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
54
Table 3.2.1 (a) Input Signals Whose Addresses Are Fixed (Series 16/Series 18)
Address Signal Symbol When the I/O Link
is used When the built-in I/O
card is used
T t
Signal indicating that X-axis measurement position is reached XAE X4.0 X1004.0 system Signal indicating that Z-axis measurement position is reached ZAE X4.1 X1004.1
Function B for directly entering the measurement value of tool compensation in the positive X direction
+MIT1 X4.2 X1004.2
Function B for directly entering the measurement value of tool compensation in the negative X direction
–MIT1 X4.3 X1004.3
Function B for directly entering the measurement value of tool compensation in the positive Z direction
+MIT2 X4.4 X1004.4
Function B for directly entering the measurement value of tool compensation in the negative Z direction
–MIT2 X4.5 X1004.5
M t
Signal indicating that X-axis measurement position is reached XAE X4.0 X1004.0 system Signal indicating that Y-axis measurement position is reached YAE X4.1 X1004.1
Signal indicating that Z-axis measurement position is reached ZAE X4.2 X1004.2
Common Skip signal SKIP X4.7 X1004.7
Emergency stop signal *ESP X8.4 X1008.4
Deceleration signal for 1st axis reference position return *DEC1 X9.0 X1009.0
Deceleration signal for 2nd axis reference position return *DEC2 X9.1 X1009.1
Deceleration signal for 3rd axis reference position return *DEC3 X9.2 X1009.2
Deceleration signal for 4th axis reference position return *DEC4 X9.3 X1009.3
Deceleration signal for 5th axis reference position return *DEC5 X9.4 X1009.4
Deceleration signal for 6th axis reference position return *DEC6 X9.5 X1009.5
Deceleration signal for 7th axis reference position return *DEC7 X9.6 X1009.6
Deceleration signal for 8th axis reference position return *DEC8 X9.7 X1009.7
If the NC is a TT system, the signals for tool post 2 listed in Table 3.2.1 (b) are always assigned to the following addresses. In addition, the system does not have the signals for tool post 1, DEC5 to DEC8 (X9.4 to X9.7).
Table 3.2.1 (b) Input Signals Whose Addresses Are Fixed (TT) (Series 16/Series 18)
Address Signal Symbol When the I/O Link is
used When the built-in I/O
card is used
TT t
Signal indicating that X-axis measurement position is reached XAE X13.0 X1013.0 system Signal indicating that Z-axis measurement position is reached ZAE X13.1 X1013.1
Function B for directly entering the measurement value of tool compensation in the positive X direction
+MIT1 X13.2 X1013.2
Function B for directly entering the measurement value of tool compensation in the negative X direction
–MIT1 X13.3 X1013.3
Function B for directly entering the measurement value of tool compensation in the positive Z direction
+MIT2 X13.4 X1013.4
Function B for directly entering the measurement value of tool compensation in the negative Z direction
–MIT2 X13.5 X1013.5
Skip signal SKIP X13.7 X1013.7
Deceleration signal for 1st axis reference position return *DEC1 X7.0 X1007.0
Deceleration signal for 2nd axis reference position return *DEC2 X7.1 X1007.1
Deceleration signal for 3rd axis reference position return *DEC3 X7.2 X1007.2
Deceleration signal for 4th axis reference position return *DEC4 X7.3 X1007.3
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
55
Table 3.2.1 (c) Input Signals Whose Addresses Are Fixed (Series 15)
Type of I/O nit Emergency Skip signal Measurement position reached signal
Type of I/O unit g ystop address p g
address AE1 (XAE) AE2 (ZAE)
Connection unit X6.4 X11.6 X8.3 X8.4
I/O unit X6.4 X11.6 X8.3 X8.4
The sequence program addresses of each module should be decided by the machine tool builder. These decided addresses are set to the programmer memory by using programmer.
The address information being set to the programmer is written together with a sequence program into ROM when a sequence program is written into ROM. No I/O address is changeable in the written stage of the address information into ROM. These addresses are determined by the connecting position (group number and base number) of the I/O base unit, each module position (slot number) mounted inside the I/O base unit and each module name.
Fig. 3.2.2 (a) and Fig. 3.2.2 (b) indicate the configuration of the I/O base unit in PMC-RB/RC.
For the specifications and details of connections of the I/O interface module, I/O module, CPU module, and other modules, see CONNECTING MANUAL of Series 16.
PMC
Base#0
I/O control unit I/O Unit
AIF01A
Base#1
I/O Unit
AIF01B
Group #0
����3.2.2 (a)
3.2.2 Assignment of I/O Module Addresses
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
56
PMC
Base#0
I/O control unit I/O Unit
AIF01A
Base#1
I/O Unit
AIF01B
Group #0
Base#0
I/O Unit
AIF01A
Base#1
I/O Unit
AIF01B
Group #1
Power Mate
Group #2
Connection unit Group #3
Base#0
Base#0
Possible to connect max. 16 groups Max. 2 Base/Group Max. 10 Slot/Base
����3.2.2 (b)
(1) Group No. Up to two I/O units can be connected using the additional I/O interface module AIF01B, based on I/O interface AIF01A. Up to two I/O units extended from AIF01A are called a group. When only one interface module is not enough to accommodate the required I/O modules, or when multiple I/O units are separately located remote from the machine, connect the first AIF01A and the second AIF01A with the cable. Up to 16 groups of I/O units can be connected.
(2) Base No. In one group, there are 2 max. I/O base units. The I/O unit with the I/O interface module IF01A is assigned to base No. 0 and another is assigned to base No.1.
(3) Slot No. A maximum of 5 or 10 I/O modules can be mounted on the I/O base unit ABU05A, ABU10A, respectively. The module mounting position on the I/O base unit is expressed with slot Nos. In each base unit, the mounting position of the I/O interface module is assigned to slot No. 0, and slot No. 1, 2, 3 ... are assigned in order from the left. In the case of I/O base unit (BU10B) for 10 slots, slot No. 1, 2 follow slot No. 8. The last slot No. 1, 2 are assigned for the next base address. Each module can be mounted on an arbitrary slot. It is possible to mount modules by skipping some slots.
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
57
(4) Module name For module names, see Table 3.2.2 (a) to (c). An actual module name begins with A. When specifying a module, omit the first letter A from the module name.
Example) When specifying module AID16D, enter ID16D.
Table 3.2.2 (a) Input Modules
No. Input format
Module name (Actual module name)
Rated voltage
Rated current Polarity Response time
Number of input points
Terminal Indica- tion
by LED
1 Non-insulati on DC input
ID32A (AID32A)
24VDC 7.5mA Both 20 ms max. 32 Connector Not provided
ID32B (AID32B)
24VDC 7.5mA Both 2 ms max. 32 Connector Not provided
2 Insulation DC input
ID16C (AID32C)
24VDC 7.5mA NEG 20 ms max. 16 Terminal board
Provided
ID16D (AID32D)
24VDC 7.5mA POS 20 ms max. 16 Terminal board
Provided
ID32E (AID32E)
24VDC 7.5mA Both 20 ms max. 32 Connector Not provided
ID32F (AID32F)
24VDC 7.5mA Both 2 ms max. 32 Connector Not provided
3 Non-insulati on DC input
IA16G (AIAHG)
100 to 120VAC
14.5mA (AC120V)
ON : 20ms max OFF : 45ms max
16 Terminal board
Provided
Polarity NEG : 0 V common (current output) POS : 24 V common (current output)
Table 3.2.2 (b) Output Modules
No. Output format
Module name (Actual module name)
Rated voltage
Rated current Polarity
Number of
points
Number of
points/ common
Terminal Indication
by LED Fuse
1 Insulation DC output
OD08C (AOD08C)
12 to 24 VDC
2A NEG 8 8 Terminal board
Provided Provided
OD08D (AOD08D)
2A POS 8 8 Terminal board
Provided Provided
OD16C (AOD16C)
0.5A NEG 16 8 Terminal board
Provided Not provided
OD16D (AOD16D)
0.5A POS 16 8 Terminal board
Provided Not provided
OD32C (AOD32C)
0.3A NEG 32 8 Connector Not provided Not provided
OD32D (AOD32D)
0.3A POS 32 8 Connector Not provided Not provided
2 AC output OA05E (AOA05E)
100 to 240 VAC
2A – 5 1 Terminal board
Provided Provided
OA08E (AOA08E)
1A – 8 4 Terminal board
Provided Provided
OA12E (AOR12G)
100 to 120 VAC
0.5A – 12 6 Terminal board
Provided Provided
3 Relay output
OR08G (AOR08G)
250 VAC/ 30 VDC
max
4A – 8 1 Terminal board
Provided Not provided
OR16G (AOR16G)
max. 2A – 16 4 Terminal
board Provided Not
provided
Polarity NEG : 0 V common (current output) POS : 24 V common (current output)
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
58
Table 3.2.2 (c) Other Modules
��� Name Module name (actual module name) Occupied address Specifications
1 FANUC CNC SYSTEM FANUC Power Mate
FS04A Input: 4 bytes Output: 4 bytes
FANUC Series 0–C (Applicable of FANUC I/O Link) FANUC Power Mate MODEL
FS08A Input: 8 bytes Output: 8 bytes
FANUC Power Mate–MODEL A/B/C/D/E/F/H
OC02I Input: 16 bytes FANUC Power Mate–MODEL D/H
OC02O Output: 16 bytes
OC03I Input: 32 bytes
OC03O Output: 32 bytes
2 Analog input module AD04A (AAD04A)
Input: 8 bytes
4 Operator’s panel connection unit OC01I Input: 12 bytes Ordering drawing No. A16B-2200-0660 (Sink type)
OC01O Output: 8 bytes A16B-2200-0660 (Sink ty e) A16B-2201-0730 (Source type)
5 Operator’s panel connection unit / 8 Input: 8 bytes Ordering drawing No. A16B-2200-0661 (Sink type)
/ 4 Output: 4 bytes A16B-2200-0661 (Sink ty e) A16B-2201-0731 (Source type)
6 Machine operator’s panel interface unit OC02I Input: 16 bytes
OC02O Output: 16 bytes
OC03I Input: 32 bytes
OC03O Output: 32 bytes
7 I/O link connection unit /� Input: � bytes Output: � bytes
Specify 1 to 8 in �.
OC02I Input: 16 bytes
OC02O Output: 16 bytes
OC03I Input: 32 bytes
OC03O Output: 32 bytes
8 I/O unit model B #� Input: � bytes Output: � bytes
Specify 1 to 10 in �.
## Input: 4 bytes Specify an area for reading the power-on/off state of each I/O unit model B.
9 Special modules not listed in Tables 3.1.2(a) and 3.1.2(b)
/� Input: � bytes Output: � bytes
Specify 1 to 8 in �.
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
59
��� SpecificationsOccupied address Module name
(actual module name)Name
10 Connector panel I/O module (Note 3) CM03I (/3) Input 3 bytes Basic unit only
CM06I (/6) Input 6 bytes Expansion unit 1 is used.
CM09I ��� � �� �� Expansion unit 2 is used.
CM12I (OC01I) Input 12 bytes Expansion unit 3 is used.
CM13I Input 13 bytes The first MPG unit is used.
CM14I Input 14 bytes The second MPG unit is used.
CM15I Input 15 bytes The third MPG unit is used.
CM16I (OC02I) Input 16 bytes DO alarm detection is used.
CM02O (/2) Output 2 bytes Basic unit only
CM04O (/4) Output 4 bytes Expansion unit 1 is used.
CM06O (/6) Output 6 bytes Expansion unit 2 is used.
CM08O (/8) Output 8 bytes Expansion unit 3 is used.
11 Operator’s panel I/O module (Note 3) CM12I (OC01I) Input 12 bytes
CM13I Input 13 bytes The first MPG unit is used.
CM14I Input 14 bytes The second MPG unit is used.
CM15I Input 15 bytes The third MPG unit is used.
CM16I (OC02I) Input 16 bytes DO alarm detection is used.
CM08O (/8) Output 8 bytes
NOTE 1 For the method of I/O link connection unit assignment, see
Subsection 3.2.3. 2 For the method of I/O link model B assignment, see
Subsection 3.2.4. 3 If the version of the programming system (FAPTLADDER,
FAPTLADDER–II) is too old to match a module above, use the compatible module indicated in parentheses. When a compatible module having the same number of points is not available, use a compatible module having a greater number of points.
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
60
(5) How to set address to each module The character and the mount position of each module is now decided with the group number, base number, slot number, and module name, so the address of each module can now be decided, corresponding these data and the input/output addresses. After display the I/O unit address screen as shown below on the programmer’s CRT, set necessary data on the screen, Then the module address is now assigned. The occupying DI/DO points (bytes) of each module are stored in the programmer, so just assign the address of the head byte of each module, and the addresses of the other bytes in the module are automatically assigned by the programmer. For instance, when the module ID32A is assigned address X5 as in Fig. 3.2.2 (d), the necessary 4 bytes are automatically secured. For details on operation, see Chapters III, IV, “Programmer”. The input/output addresses of each module can be freely decided in this method at the machine tool builder, so the address can be decided when making the ladder diagram, as long as it does not duplicate with the addresses of each module.
ADDRESS GROUP BASE SLOT NAME
X000
X001
X002
X003
X004
X005 0 0 5 ID32A
X006 0 0 5 ID32A
X007 0 0 5 ID32A
X008 0 0 5 ID32A
X009
Automaticall set
����3.2.2 (d) I/O unit address screen
NOTE When assigning Connection unit 1, Connection unit 2 or Connection unit for operator’s panel, set base number to 0 and slot number to 1.
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
61
(6) Notes when setting addresses
(a) The head bytes of the analog input module (AD04A) and analog output module (DA02A) must be assigned to even number addresses of input address (X���), and output address (Y���) each. When reading the A/D-converted digital value from the input address (X���) or when writing the D/A-converting value to the output address (Y���), readout and write-in must always be done in word (16 bits) units.
ADDRESS GROUP BASE SLOT NAME
X000 0 0 1 ID16C
X001 0 0 1 ID16C
X002 0 0 2 ID16D
X003 0 0 2 ID16D
X004 1 0 1 IA16G
X005 1 0 1 IA16G
X006 1 0 2 IA16G
X007 1 0 2 IA16G
X008 2 0 1 ID16D
X009 2 a 0 1 ID16D
����3.2.2 (e)
Concept:
In conventional data transfer, when data is to be transferred between CNC A and CNC B, the I/O units indicated by (a) (figure below) must be connected with each other. (In this case, data can be transferred using any I/O unit.)
(a)
I/ O Unit Model A
I/ O Unit Model A
I/ O Unit Model A
I/ O Unit Model A
I/ O Unit Model A
I/ O Unit Model A
CNC A CNC B
�
The I/O link connection unit replaces these I/O units, thus eliminating the need to connect them with, for example, cables.
3.2.3 I/O Link Connection Unit Assignment
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
62
�
�This portion is replaced by an I/O link connection unit.

I/ O Unit Model A
I/ O Unit Model A
I/O Link connection unit
I/ O Unit Model A
I/ O Unit Model A
CNC A CNC B
The assignment data depends on what type of I/O unit is to be replaced with an I/O link connection unit.
Occupied address Input unit name at the time of assignment Output unit name at the time of assignment
1 to 8 / � (� represents a number from 1 to 8.) / � (� represents a number from 1 to 8.)
16 OC02I OC02O
32 OC03I OC03O
When a connection unit that occupies 16-byte addresses is attached to the input side in GROUP = 1, enter “1.0.1.OC02I.”
Method of assignment:
Setting:
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
63
�Related hardware publications: FANUC I/O Unit-MODEL B Connection and Maintenance Manual (B–62163E)
I/O Unit MODEL Bs can be used together with a Power Mate operator panel interface unit, connection unit, and I/O Unit MODEL As. In this case, the I/O Unit MODEL Bs occupy one group; that is, no other type of unit can be present in that group. An example of connection is shown below.
[GROUP] =0
[GROUP] =1
[GROUP] =2
[GROUP] =3
I/O unit model B interface unit
I/O unit model B DI/DO unit (Unit No.=1)
I/O unit model B DI/DO unit (Unit No.=20)
I/O unit model B DI/DO unit (Unit No.=5)
I/O unit model B DI/DO unit (Unit No.=10)
I/O unit model B DI/DO unit (Unit No.=30)
I/O unit model B DI/DO unit (Unit No.=9)
I/ O LINK MASTER
Power Mate
[BASE] =0, [SLOT] =1
Operator’s panel interface unit
[BASE] =0, [SLOT] =1
[BASE] =0 [BASE] =1
[BASE] =0, [SLOT] =1 [BASE] =0, [SLOT] =20
[BASE] =0, [SLOT] =5 [BASE] =0, [SLOT] =10
→SLOT No. →SLOT No.
I/O Unit- A I/O Unit- A
[BASE] =0, [SLOT] =30 [BASE] =0, [SLOT] =9
3.2.4 I/O Unit Model B Assignment
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
64
Specify a group number in [GROUP]. Always specify 0 in [BASE]. Specify the unit number of an I/O unit model B in [SLOT]. But when you assign the power–on/off intormation, specify 0 in [SLOT]. The data specified by [SLOT] and [NAME] is as follows: [SLOT] = 0, 1, ...30:
Unit number (1 to 30) of an I/O unit model B DI/DO unit [NAME]: Addresses occupied by an I/O unit model B
Input/output size of ([base unit] + [extended unit])
Assigned name Occupied address
1 byte #1 Input/output: 1 byte
2 bytes #2 Input/output: 2 bytes
3 bytes #3 Input/output: 3 bytes
4 bytes #4 Input/output: 4 bytes
6 bytes #6 Input/output: 6 bytes
8 bytes #8 Input/output: 8 bytes
10 bytes #10 Input/output: 10 bytes
Power-on/off information ## Input: 4 bytes
When an I/O unit model B assigned unit number 10 and occupying an area of 3 bytes is attached to the input with GROUP = 1, enter “1.0.10.#3.”
When a Power Mate–MODEL D/H is used as I/O Link slave, it need to be assigned on the I/O Link master side. On the I/O link slave side, fixed addresses are used, so that no address needs to be assigned. (See Table 3 for the addresses used.) An example of connection is shown below.
Operator’s panel interface unit
[GROUP] =0
[GROUP] =1
I/ O LINK MASTER
[BASE] =0, [SLOT] =1
[BASE] =0, [SLOT] =1
Power Mate
Specify a group number in [GROUP]. Always specify 0 in [BASE]. Always specify 1 in [SLOT].
The data specified by [NAME] is as follows:
I/O points (input/output)
Input unit name at the time of assignment
Output unit name at the time of assignment
32/32 FS04A FS04A
64/64 FS08A FS08A
128/128 OC02I OC02O
256/256 OC03I OC03O
Method of assignment:
Setting:
3.2.5 Power Mate–model D/H Assignment
Method of assignment:ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
65
When a Power Mate–D of 256/256 points is connected with group 1, input the undermentioned assignment data.
·Input side : ”1.0.1.OC03I” ·Output side : ”1.0.1.OC03O”
Setting:
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
66
In each model, the following signals (bytes) can be used as internal relays. This area is cleared to zero when the power is turned on.
Model PA1 PA3
Number of bytes
1100 1118
Model RA1 RA2 RA3/RA5
Number of bytes 1100 1118 1118
Model RB RB2 RB3/RB5 RB4/RB6
Number of bytes 1100 1118 1618 3200
Model RC RC3 RC4
Number of bytes 1600 1618 3200
Model NB
Number of bytes 1618
NB2
3200
3.3 INTERNAL RELAY ADDRESSES (R)
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
67
PMC-RB4 PMC-RB6 PMC-RC4 PMC-NB2
PMC-RB4 PMC-RB6 PMC-RC4 PMC-NB2
PMC-RB3 PMC-RB5 PMC-RC PMC-RC3 PMC-NB
PMC-PA3 PMC-RA2 PMC-RA3 PMC-RA5 PMC-RB2 PMC-RB3 PMC-RB5 PMC-RC3 PMC-NB
⋅ R2999
R9000
⋅ ⋅ ⋅
PMC-PA1 PMC-PA3 PMC-RA1 PMC-RA2 PMC-RA3 PMC-RA5 PMC-RB PMC-RB2
PMC-PA1 PMC-RA1 PMC-RB PMC-RC
R0
R1
⋅ ⋅ ⋅
R999
⋅ ⋅ ⋅ ⋅ R1499
⋅ ⋅
⋅ R9099
⋅ ⋅
⋅ R9117
⋅ ⋅
⋅ R9199
Address number
� 7 6 5 4 3 2 1 0
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
68
(1) R9000 (Operation output register for the ADDB, SUBB, MULB, DIVB, and COMPB functional instructions)
The result is 0. The result is a negative value. The result overflows.
R9000
7 6 5 4 3 2 1 0
(2) R9000 (Error output for the EXIN, WINDR, WINDW, MMCWR, MMCWW, MMC3R, and MMC3W functional instructions)
The instruction ended in error.
R9000
7 6 5 4 3 2 1 0
(3) R9002 to R9005 (Operation output registers for the DIVB functional instruction) The data remaining after the DIVB functional instruction is executed is output.
(4) R9010 to R9027 (Interface area for the FNC9x functional instruction) (PMC-RC only) The area is provided as an interface between the FNC9x functional instruction to be executed and a desired function.
R9010
R9011
R9012
R9013
R9014
R9015
Contents of the command to be executed
Data output when the processing is completed
Addresses of the control data for SUB90
Addresses of the control data for SUB91
97 96 95 94 93 92 91 90
97 96 95 94 93 92 91 90
7 6 5 4 3 2 1 0
R9026
R9027
Addresses of the control data for SUB97
3.3.1 Area Managed by the System Program
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
69
(5) R9100 to R9117 (Interface area for the FNC9x functional instruction) (PMC-RC3/RC4/NB/NB2 only) The area is provided as an interface between the FNC9x functional instruction to be executed and a desired function.
R9100
R9101
R9102
R9103
R9104
R9105
Contents of the command to be executed
Data output when the processing is completed
Addresses of the control data for SUB90
Addresses of the control data for SUB91
97 96 95 94 93 92 91 90
97 96 95 94 93 92 91 90
7 6 5 4 3 2 1 0
R9116
R9117
Addresses of the control data for SUB97
(6) R9091 (System timer) 4 signals can be used as system timer. The specifications of every signal are as following.
7 6 5 4 3 2 1 0
R9091
always OFF always ON
(104 ms ON, 96 ms OFF)
Cyclic signal of 200 ms
Cyclic signal of 1 second.
(504 ms ON, 496 ms OFF)
CAUTION In the beginning, every signal is OFF. The signals of R9091.0 and R9091.1 are always set at the beginning of 1st level in every cycle. Every pulse signal (ON-OFF) includes �8 ms errors.ww
w. cn
cc en
ter .co
m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
70
104ms 96ms
R9091. 5
200ms
504ms 496ms
R9091. 6
1 second
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
71
This area is used as message display request. In each model, the following number of messages can be used. Where “Number of Messages” = “Number of Bytes” � 8 This area is cleared to zero when the power is turned on. For information about using the message, see the subsection “5.43”.
Number of messages
Number of bytes
200
25 25
200
25
200
Number of messages
Number of bytes
Model
200
25
RB RB2
25
200
RB3/ RB5
25
200
RB4/ RB6
125
1000
Number of messages
Number of bytes
Model
200
25
RC RC3
25
200
RC4
125
1000
Number of messages
Number of bytes
Model
200
25
NB
Number of messages
Number of bytes
Model
200
25
PA1 PA3
25
200
1000
125
NB2
Model RA1 RA2 RA3/ RA5
3.4 ADDRESSES FOR MESSAGE SELECTION DISPLAYED ON CRT (A)
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
72
PMC-PA1
PMC-PA3
PMC-RA1
PMC-RA2
PMC-RA3
PMC-RA5
PMC-RB
PMC-RB2
PMC-RB3
PMC-RB5
PMC-RC
PMC-RC3
PMC-NB
PMC-RB4
PMC-RB6
PMC-RC4
PMC-NB2
Address number
7 6 5 4 3 2 1 0
A0
A1
A24
A124
����3.4 Address of message display reguest
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
73
This area is used as counters. In each model, the following number of counters can be used. Where “Number of Counters” = “Number of Bytes” / 4 Since this area is nonvolatile, the contents of the memory do not disappear even when the power is turned off.
Model RA3/ RA5
Number of counters
Number of bytes
20
80
RA1 RA2
80
20
80
20
Number of counters
Number of bytes
Model
20
80
RB RB2
80
20
RB3/ RB5
80
20
RB4/ RB6
200
50
Number of counters
Number of bytes
Model
20
80
RC RC3
80
20
RC4
200
50
Number of counters
Number of bytes
Model
20
80
NB
Number of counters
Number of bytes
Model
20
80
PA1 PA3
80
20
50
200
NB2
3.5 ADDRESS OF COUNTER (C)
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
74
PMC-RB4
PMC-RB6
PMC-RC4
PMC-NB2
Address number
7 6 5 4 3 2 1 0
C0
C1
C2
C3
C76
C77
C78
C79
C196
C197
C198
C199
Preset value
current value
current value
Preset value
Preset value
current value
Counter
No. 1
Counter
No. 20
Counter
No. 50
PMC-PA1
PMC-PA3
PMC-RA1
PMC-RA2
PMC-RA3
PMC-RA5
PMC-RB
PMC-RB2
PMC-RB3
PMC-RB5
PMC-RC
PMC-RC3
PMC-NB
����3.5 Address of Counter
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
75
The area is used as keep relays and PMC parameters. In each model, the following number of bytes can be used. Since this area is nonvolatile, the contents of the memory do not disappear even when the power is turned off.
RA3/ RA5
Model
Number of bytes
Nonvolatile memory control address
PMC control software parameter
K17 to
K19
K16
20
PA1 PA3
20
K16
K17 to
K19
Model
Number of bytes
Nonvolatile memory control address
PMC control software parameter
K17 to
K19
K16
20
RA1 RA2
20
K16
K17 to
K19
20
K16
K17 to
K19
Model
Number of bytes
Nonvolatile memory control address
PMC control software parameter
K17 to
K19
K16
20
RB RB2
20
K16
K17 to
K19
RB3/ RB5
20
K16
K17 to
K19
RB4/ RB6
50
K16
K900 to
K909
Model
Number of bytes
Nonvolatile memory control address
PMC control software parameter
K17 to
K19
K16
20
RC RC3
20
K16
K17 to
K19
RC4
50
K16
K900 to
K909
Model
Number of bytes
Nonvolatile memory control address
PMC control software parameter
K17 to
K19
K16
20
NB
K900 to
K909
K16
50
NB2
3.6 ADDRESS OF KEEP RELAY AND NONVOLATILE MEMORY CONTROL (K)
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
76
PMC-PA1 PMC-PA3 PMC-RA1 PMC-RA2 PMC-RA3 PMC-RA5 PMC-RB PMC-RB2 PMC-RB3 PMC-RB5 PMC-RC PMC-RC3 PMC-NB
PMC-RB4 PMC-RB6 PMC-RC4 PMC-NB2
Address number
7 6 5 4 3 2 1 0
K0
K1
K19
K39
K900
K909
PMC-RB4 PMC-RB6 PMC-RC4 PMC-NB2
����3.6 Address of Keep Relay and Nonvolative Memory Control
For the information about using “Nonvolatile memory control”, see the section “6.1”. PMC control software parameter area is used by PMC control software. For more information about PMC control software parameter, see the section “II 4.3”.ww
w. cn
cc en
ter .co
m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
77
Data table is the area of nonvolatile memory. In each model, the following number of bytes can be used.
Number of bytes
Model
1860
RA1 RA2
1860 1860
Number of bytes
Model
1860
RB RB2
1860
RB3/ RB5
3000
RB4/ RB6
8000
Number of bytes
Model
3000
RC RC3
3000
RC4
8000
Number of bytes
Model
3000
NB
Number of bytes
Model
1860
PA1 PA3
1860
8000
NB2
RA3/ RA5
PMC-PA1
PMC-PA3
PMC-RA1
PMC-RA2
PMC-RA3
PMC-RA5
PMC-RB
PMC-RB2
PMC-RB4
PMC-RB6
PMC-RC4
PMC-NB2
Address number
7 6 5 4 3 2 1 0
D0
D1
D1859
D7999
PMC-RB3
PMC-RB5
PMC-RC
PMC-RC3
PMC-NB
D2999
����3.7 Address of Data Table
3.7 ADDRESS OF DATA TABLE (D)
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
78
This area is used by TMR instruction as variable timers. In each model, the following number of timers can be used. Where “Number of timers” = “Number of Bytes” / 2 Since this area is nonvolatile, the contents of the memory do not disappear even when the power is turned off.
Number of timers
Number of bytes
Model
40
80
RA1 RA2
80
40
80
40
Number of timers
Number of bytes
Model
40
80
RB RB2
80
40
RB3/ RB5
80
40
RB4 RB6
300
150
Number of timers
Number of bytes
Model
40
80
RC RC3
80
40
RC4
300
150
Number of timers
Number of bytes
Model
40
80
NB
Number of timers
Number of bytes
Model
40
80
PA1 PA3
80
40
150
300
NB2
RA3/ RA5
3.8 TIMER ADDRESSES (T)
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
79
PMC-PA1
PMC-PA3
PMC-RA1
PMC-RA2
PMC-RA3
PMC-RA5
PMC-RB
PMC-RB2
PMC-RB3
PMC-RB5
PMC-RC
PMC-RC3
PMC-NB
PMC-RB4
PMC-RB6
PMC-RC4
PMC-NB2
Address number
7 6 5 4 3 2 1 0
T0
T1
T2
T3
T78
T79
T298
T299
Timer
No. 1
Timer
No. 40
Timer
No. 2
Timer
No. 150
����3.8 Timer Address
ww w.
cn cc
en ter
.co m
3. ADDRESS B–61863E/10PMC SEQUENCE PROGRAM
80
Label addresses are used to specify jump destination labels (positions in a sequence program) in the JMPB and JMPC instructions. The same label number can appear in different LBL instructions in the same sequence program as long as it is unique in the program unit (main program, subprogram). In each model, the following number of label can be used.
RA3/ RA5
Number of labels
Model
–
RA1 RA2
– 9999
Number of labels
Model
–
RB RB2
–
RB3/ RB5
9999
RB4/ RB6
9999
Number of labels
Model
–
RC RC3
9999
RC4
9999
Number of labels
Model
9999
NB/ NB2
Number of labels
Model
–
PA1 PA3
9999
3.9 LABEL ADDRESSES (JMPB, JMPC, LBL) (L)
ww w.
cn cc
en ter
.co m
B–61863E/10 3. ADDRESSPMC SEQUENCE PROGRAM
81
Subprogram numbers are used to specify jump destination subprogram labels in the CALL and CALLU instructions. Subprogram number must be unique in the entire sequence program. In each model, the following number of subprograms can be used.
Model
Number of subprograms –
PA1 PA3
512
Model
Number of subprograms –
RA1 RA2
– 512
Model
Number of subprograms –
RB RB2
–
RB3/ RB5
512
RB3/ RB6
2000
Model
Number of subprograms –
RC RC3
512
RC4
2000
Model
Number of subprograms 512
NB
2000
NB2
RA3/ RA5
3.10 SUBPROGRAM NUMBERS (CALL, CALLU, SP) (P)
ww w.
cn cc
en ter
.co m
4. PMC BASIC INSTRUCTIONS B–61863E/10PMC SEQUENCE PROGRAM
82
4 PMC BASIC INSTRUCTIONS Designing a sequence program begins with writing a ladder diagram. The ladder diagram is written using relay contact symbols and functional instruction code. (These will be described later.) Logic written in the ladder diagram is entered as a sequence program in the Programmer.
There are two sequence program entry methods. One is the entry method with the mnemonic language (PMC instructions such as RD, AND and OR). The other is the relay symbol method (using relay symbols such as
, and ) in which the sequence program is entered by using the relay contact symbols and the functional instruction symbols of the ladder diagram. When the relay symbol method is used, the ladder diagram format can be used and programming can be performed without understanding the PMC instructions (basic instructions such as RD, AND and OR).
Actually, however, the sequence program entered by the relay symbol method is also internally converted into the instruction corresponding to the PMC instruction. When the sequence program is punched on a paper tape and then entered to the programmer, programming must be performed with the PMC instructions.
Also, the meanings of the functional instructions described later must be understood fully. See Subsection 4.1 and Section 5.
On how to enter the sequence program into the programmer by using the PMC instructions and relay symbols, see Chapter III or IV.
The following should be noted first before reading the explanation on PMC instructions.
This manual describes the entry method using mnemonic language.
(1) Signal address Relay coils and contacts written in a ladder diagram are each given an address, represented with an address number and a bit number. (See Fig. 4 (a)) Zero suppression is possible for the head zero. For details of address, see Section 3.
A B RO
X8.1
C
Y20.4
Signal name Relay name
R12.6 R9.0
Bit number
Address number
����4 (a) Address of signal
ww w.
cn cc
en ter
.co m
B–61863E/10 4. PMC BASIC INSTRUCTIONSPMC SEQUENCE PROGRAM
83
(2) Type There are two types of PMC instructions, basic and functional.
(a) Basic instruction Basic instructions are most often used when designing sequence programs. They perform one-bit operations, such as AND, or OR. There are 12 types.
(b) Functional instruction Functional instructions ease programming of machine movements that are difficult to program with basic instructions. Refer to Chapter V about the type of functional instruction.
(3) Storage of logical operation results A register is provided for storing the intermediate results of a logical operation during operation of a sequence program. This register consists of 9 bits. (See Fig. 4 (b) ) .
Stack register (which temporarily stores the inter- mediate result of an operation)
The result of an operation currently being executed enters here.
ST8 ST7 ST6 ST5 ST4 ST3 ST2 ST1 ST0
����4 (b)
Execution of an instruction (RD.STK or the like) to temporarily store the intermediate results of an operation as in the above figure, shifts left and stacks the status stored so far; conversely, execution (AND.STK or the like) to retrieve a stacked signal shifts it right. The signal stacked last is retrieved first. Refer to explanations of each instruction for concrete applications and operations.
ww w.
cn cc
en ter
.co m
4. PMC BASIC INSTRUCTIONS B–61863E/10PMC SEQUENCE PROGRAM
84
The type of instructions and contents of processing are listed in the Table 4.1.(a).
Information format 1: This is used when writing instructions on a coding sheet, punching out them on a paper tape or displayed on the CRT/MDI or offline programmer.
Information format 2: This is used when inputting instructions through programmer. This format is to simplify an input operation. RN, for instance, means RD.NOT and represents an input operation using both keys, “R” and “N”.
Details of each basic instruction will be given here.
Table 4.1 (a) Basic instruction and processing
Instruction ��� Format 1
(coding) Format 2
(keys ofFAPT LADDER) Contents of processing
1 RD R Reads the status of a specified signal and sets it in ST0.
2 RD.NOT RN Inverts the logical status of a specified signal, reads and sets it in ST0.
3 WRT W Outputs the results of logical operations (status of ST0) to a specified address.
4 WRT.NOT WN Inverts the results of logical operations (status of ST0) and outputs it to a specified address.
5 AND A Induces a logical product.
6 AND.NOT AN Inverts the status of a specified signal and induces a logical product.
7 OR O Induces a logical sum.
8 OR.NOT ON Inverts the status of a specified signal and induces a logical sum.
9 RD.STK RS Shifts the stack register left one bit, read and sets the status of a specified signal in ST0.
10 RD.NOT.STK RNS Shifts the stack register left one bit reads the inveried logical status of a specified signal, and sets it in ST0.
11 AND.STK AS Sets the logical product of ST0 and ST1, and shifts the stack register right one bit.
12 OR.STK OS Sets the logical sum of ST0 and ST1, and shifts the stack register right by one bit.
13 SET SET Calculates the logical OR of the contents of ST0 and the status of the signal at the specified address and outputs the result to the specified address.
14 RST RST Calculates the logical AND of the inverted contents of ST0 and the specified address and outputs the result to the address.
4.1 DETAILS OF BASIC INSTRUCTIONS
ww w.
cn cc
en ter
.co m
B–61863E/10 4. PMC BASIC INSTRUCTIONSPMC SEQUENCE PROGRAM
85
Basic instructions available on each models are as shown in the “Table 4.1(b)”.
Table 4.1(b) Basic instruction
Model
�� Instruction ����
� � ����
� � ����
� �� � �
���� � � � �
���� ��
���� � �� � �
���� � �� � �� � �� � �
���� ���� ���
���� � �
1 RD � � � � � � � � �
2 RD.NOT � � � � � � � � �
3 WRT � � � � � � � � �
4 WRT.NOT � � � � � � � � �
5 AND � � � � � � � � �
6 AND.NOT � � � � � � � � �
7 OR � � � � � � � � �
8 OR.NOT � � � � � � � � �
9 RD.STK � � � � � � � � �
10 RD.NOT.STK � � � � � � � � �
11 AND.STK � � � � � � � � �
12 OR.STK � � � � � � � � �
13 SET � � � � � � � � �
14 RST � � � � � � � � �
� : Cannot be used � : Can be used
NOTE SET/RST are not available on PMC-RA3 for Series 20.
ww w.
cn cc
en ter
.co m
4. PMC BASIC INSTRUCTIONS B–61863E/10PMC SEQUENCE PROGRAM
86
(1) Format
(Address)
Bit number
Address number
(2) Reads the status (1 or 0) of a signal at a specified address and sets it in ST0.
(3) Is used when beginning coding with contact A (). See the ladder diagram of Fig. 4.1.1 and entries in the coding sheet of Table 4.1.1 for an example of using the RD instruction.
(4) The signal read by the RD instruction may be any signal entered as the logical condition for one coil (output).
A C
W1
D G
W2
B
X5.1 E
Y5.2 F
Y5.3
R5.4 R200.1
R200.0X10.1 R2.1X2.0
����4.1.1 Ladder diagram
Table 4.1.1 Coding for Fig. 4.1.1
Coding sheet Status of operating result
Step Number Instruction Address No. Bit No. Remarks ST2 ST1 ST0
1 RD X10 . 1 A A
2 AND X 2 . 0 B A.B
3 AND . NOT R2 . 1 C A.B.C
4 WRT R200 . 0 W1 output A.B.C
5 RD X5 . 1 D D
6 OR . NOT Y5 . 2 E D+E
7 OR Y5 . 3 F D+E+F
8 AND R5 . 4 G (D+E+F)�G
9 WRT R200 . 1 W2 output (D+E+F)�G
10
4.1.1 RD
ww w.
cn cc
en ter
.co m
B–61863E/10 4. PMC BASIC INSTRUCTIONSPMC SEQUENCE PROGRAM
87
(1) Format
(Address)
Address number
Bit number
(2) Inverts the status of a signal at a specified address and set it in ST0.
(3) Is used when beginning coding with contact B (). See the ladder diagram of Fig. 4.1.2 and entries in the coding sheet of Table 4.1.2 for an example of using the RD.NOT instruction.
(4) The signal read by the RD.NOT instruction may be any contact B entered as the logical condition of one coil.
A C
W1
D G
W2
B
G5.1 E
X4.2 F
Y10.7
R10.5 R210.2
R210.1R1.1 F3.3F2.2
����4.1.2 Ladder diagram
Table 4.1.2 Coding for Fig. 4.1.2
Coding sheet Status of operating result
Step Number Instruction Address No. Bit No. Remarks ST2 ST1 ST0
1 RD. NOT R1 . 1 A A
2 AND . NOT F2 . 2 B A.B
3 AND . NOT F3 . 3 C A�B�C
4 WRT R210 . 1 W1 output A�B�C
5 RD. NOT G5 . 1 D D
6 OR . NOT X4 . 2 E D+E
7 OR Y10 . 7 F D+E+F
8 AND R10 . 5 G (D+E+F)�G
9 WRT R210 . 2 W2 output (D+E+F)�G
4.1.2 RD . NOT
ww w.
cn cc
en ter
.co m
4. PMC BASIC INSTRUCTIONS B–61863E/10PMC SEQUENCE PROGRAM
88
(1) Format
(Address)
Address number
Bit number
(2) Outputs the results of logical operations, that is, the status of ST0 to a specified address.
(3) The results of one logical operation can also be output to two or more addresses. How to use the WRT instruction in this case is shown in Fig. 4.1.3 and Table 4.1.3.
A C
W1
R220.1 B
X4.2
G2.2 Y11.1
W2
Y14.6
����4.1.3 Ladder diagram
Table 4.1.3 Coding for Fig. 4.1.3
Coding sheet Status of operating result
Step Number Instruction Address No. Bit No. Remarks ST2 ST1 ST0
1 RD R220 . 1 A A
2 OR X4 . 2 B A+B
3 AND G2 . 2 C (A+B)�C
4 WRT Y11 . 1 W1 output (A+B)�C
5 WRT Y14 . 6 W2 output (A+B)�C
4.1.3 WRT
ww w.
cn cc
en ter
.co m
B–61863E/10 4. PMC BASIC INSTRUCTIONSPMC SEQUENCE PROGRAM
89
(1) Format
(Address)
Address number
Bit number
(2) Inverts the results of logical operations, that is, the status of ST0 and outputs it to a specified address. Fig. 4.1.4 and Table 4.1.4 show an example on using the WRT.NOT instruction.
A C
W1
R220.1 B
X4.2
G2.2 Y11.1
W2
Y14.6
����4.1.4 Ladder diagram
Table 4.1.4 Coding for Fig. 4.1.4 Coding sheet Status of operating result
Step Number Instruction Address No. Bit No. Remarks ST2 ST1 ST0
1 RD R220 . 1 A A
2 OR X4 . 2 B A+B
3 AND G2 . 2 C (A+B) · C
4 WRT Y11 . 1 W1 output (D+E) · F
5 WRT. NOT Y14 . 6 W2 output (A+B) · C
4.1.4 WRT. NOT
ww w.
cn cc
en ter
.co m
4. PMC BASIC INSTRUCTIONS B–61863E/10PMC SEQUENCE PROGRAM
90
(1) Format
(Address)
Address number
Bit number
(2) Induces a logical product. (3) See Fig. 4.1.1 and Table 4.1.1 for an example of using the AND
instruction.
(1) Format
(Address)
Address number
Bit number
(2) Inverts the status of a signal at a specified address and induces a logical product.
(3) See Fig. 4.1.1 and Table 4.1.1 for an example of using the AND.NOT instruction.
(1) Format
(Address)
Address number
Bit number
(2) Induces a logical sum. (3) See Fig. 4.1.1 and Table 4.1.1 for an example of using the OR
instruction.
(1) Format
(Address)
Address number
Bit number
(2) Inverts the status of a signal at a specified address and induces a logical sum.
(3) See Fig. 4.1.1 and Table 4.1.1 for an example of using the OR.NOT instruction.
4.1.5 AND
4.1.6 AND. NOT
4.1.7 OR
4.1.8 OR. NOTww
w. cn
cc en
ter .co
m
B–61863E/10 4. PMC BASIC INSTRUCTIONSPMC SEQUENCE PROGRAM
91
(1) Format
(Address)
Address number
Bit number
(2) Stacks the intermediate results of a logical operations. After shifting the stack register left one bit, sets a signal at a specified address to ST0.
(3) Is used when the signal to be specified is contact A (). (4) See Fig. 4.1.9 and Table 4.1.9 for an example of using the RD.STK
instruction.
A B
W1
X1.1 C
Y1.2 D
Y15.0
X1.3 E
R2.1 R3.5
Y1.4 F
����4.1.9 Ladder diagram
Table 4.1.9 Coding for Fig. 4.1.9
Coding sheet Status of operating result
Step Number Instruction Address No. Bit No. Remarks ST2 ST1 ST0
1 RD X1 . 1 A A
2 AND Y1 . 2 B A�B
3 RD. STK X1 . 3 C A�B C
4 AND Y1 . 4 D A�B C�D
5 OR. STK A�B+C�D
6 RD. STK R2 . 1 E A�B+C�D E
7 AND R3 . 5 F A�B+C�D E�F
8 OR.STK A�B+C�D+E�F
9 WRT Y15 . 0 W1 output A�B+C�D+E�F
10
4.1.9 RD. STK
ww w.
cn cc
en ter
.co m
4. PMC BASIC INSTRUCTIONS B–61863E/10PMC SEQUENCE PROGRAM
92
(1) Format
(Address)
Address number
Bit number
(2) Stacks the intermediate results of a logical operations. Shifts the stack register left one bit, inverts the status of a signal at a specified address and sets it in ST0.
(3) Is used when the signal to be specified is contact B ().
(4) See Fig. 4.1.10 and Table 4.1.10 for an example of using the RD.NOT.STK instruction.
A B
W1
X1.0 C
X1.1 D
Y15.7
E
Y1.2 G
Y1.3 H
R1.5 X1.6 Y1.7
F
R1.4
����4.1.10 Ladder diagram
Table 4.1.10 Coding for Fig. 4.1.10
Coding sheet Status of operating result
Step Number Instruction
Address No. Bit No. Remarks ST2 ST1 ST0
1 RD X1 . 0 A A
2 AND. NOT X1 . 1 B A�B
3 RD.NOT.STK R1 . 4 C A�B C
4 AND. NOT R1 . 5 D A�B C�D
5 OR. STK A�B+C�D
6 RD. STK Y1 . 2 E A�B+C�D E
7 AND Y1 . 3 F A�B+C�D E�F
8 RD.STK X1 . 6 G A�B+C�D E�F G
9 AND. NOT Y1 . 7 H A�B+C�D E�F G�H
10 OR. STK A�B+C�D E�F+G�H
11 AND. STK (A�B+C�D)�(E�F+G�H)
12 WRT Y15 . 7 W1 output (A�B+C�D)�(E�F+G�H)
13
14
4.1.10 RD. NOT. STK
ww w.
cn cc
en ter
.co m
B–61863E/10 4. PMC BASIC INSTRUCTIONSPMC SEQUENCE PROGRAM
93
(1) Format
(Address)
Address number
Bit number
(2) Induces a logical product from the operation results in ST0 and ST1, sets the result in ST1, and shifts the stack register right one bit.
(3) See Fig. 4.1.10 and Table 4.1.10 for an example of using the AND.STK instruction.
(1) Format
(Address)
Address number
Bit number
(2) Induces a logical sum from the operation results in ST0 and in ST1, sets the result in ST1, and shifts the stack register right one bit.
(3) See Fig. 4.1.9 and Table 4.1.9 or Fig. 4.1.10 and Table 4.1.10 for examples of using the OR.STK instruction.
NOTE In Table 4.1.9 putting OR.STK at step 5 between steps 7 and 8 brings about the same result. But it is recommended to code as shown in Table 4.1.9, because coding OR.STK or AND.STK in succession is prone to cause an error.
4.1.11 AND. STK
4.1.12 OR. STK
ww w.
cn cc
en ter
.co m
4. PMC BASIC INSTRUCTIONS B–61863E/10PMC SEQUENCE PROGRAM
94
(1) Format
(Address)
Address No.
Bit No.
(2) Logical sum of the logical operation result ST0 with the content of the specified address is outputted to the same address.
(3) Refer to the figure below for an example of using the SET instruction.
(S) Y0.0
C
R0.0
A
X0.0