You are on page 1of 256

<>!

R-30+A CONTROLLER
Integrated PMC

OPERATOR'S MANUAL

B-82614EN/02
• Original Instructions

Before using the Robot, be sure to read the "FANUC Robot Safety Manual (B-80687EN)" and
understand the content.

• No part of this manual may be reproduced in any form.


• All specifications and designs are subject to change without notice.

The products in this manual are controlled based on Japan’s “Foreign Exchange and
Foreign Trade Law”. The export from Japan may be subject to an export license by the
government of Japan.
Further, re-export to another country may be subject to the license of the government of
the country from where the product is re-exported. Furthermore, the product may also be
controlled by re-export regulations of the United States government.
Should you wish to export or re-export these products, please contact FANUC for advice.

In this manual we have tried as much as possible to describe all the various matters.
However, we cannot describe all the matters which must not be done, or which cannot be
done, because there are so many possibilities.
Therefore, matters which are not especially described as possible in this manual should be
regarded as ”impossible”.
SAFETY
B-82614EN/02 SAFETY PRECAUTIONS

1 SAFETY PRECAUTIONS
For the safety of the operator and the system, follow all safety precautions when operating a robot and its
peripheral devices installed in a work cell.
In addition, refer to the “FANUC Robot SAFETY HANDBOOK (B-80687EN)”.

1.1 WORKING PERSON


The personnel can be classified as follows.

Operator:
• Turns robot controller power ON/OFF
• Starts robot program from operator’s panel

Programmer or teaching operator:


• Operates the robot
• Teaches robot inside the safety fence

Maintenance engineer:
• Operates the robot
• Teaches robot inside the safety fence
• Maintenance (adjustment, replacement)

- An operator cannot work inside the safety fence.


- A programmer, teaching operator, and maintenance engineer can work inside the safety fence. The
working activities inside the safety fence include lifting, setting, teaching, adjusting, maintenance,
etc..
- To work inside the fence, the person must be trained on proper robot operation.

During the operation, programming, and maintenance of your robotic system, the programmer, teaching
operator, and maintenance engineer should take additional care of their safety by using the following safety
precautions.

- Use adequate clothing or uniforms during system operation


- Wear safety shoes
- Use helmet

1.2 WORKING PERSON SAFETY


Working person safety is the primary safety consideration. Because it is very dangerous to enter the
operating space of the robot during automatic operation, adequate safety precautions must be observed.
The following lists the general safety precautions. Careful consideration must be made to ensure working
person safety.

(1) Have the robot system working persons attend the training courses held by FANUC.

FANUC provides various training courses. Contact our sales office for details.

s-3
SAFETY PRECAUTIONS B-82614EN/02

(2) Even when the robot is stationary, it is possible that the robot is still in a ready to move state, and is
waiting for a signal. In this state, the robot is regarded as still in motion. To ensure working person
safety, provide the system with an alarm to indicate visually or aurally that the robot is in motion.
(3) Install a safety fence with a gate so that no working person can enter the work area without passing
through the gate. Install an interlocking device, a safety plug, and so forth in the safety gate so that the
robot is stopped as the safety gate is opened.

The controller is designed to receive this interlocking signal of the door switch. When the gate is
opened and this signal received, the controller stops the robot (Please refer to "STOP TYPE OF
ROBOT" in SAFETY for detail of stop type). For connection, see Fig.1.2 (a) and Fig.1.2 (b).

(4) Provide the peripheral devices with appropriate grounding (Class A, Class B, Class C, and Class D).
(5) Try to install the peripheral devices outside the work area.
(6) Draw an outline on the floor, clearly indicating the range of the robot motion, including the tools such
as a hand.
(7) Install a mat switch or photoelectric switch on the floor with an interlock to a visual or aural alarm that
stops the robot when a working person enters the work area.
(8) If necessary, install a safety lock so that no one except the working person in charge can turn on the
power of the robot.

The circuit breaker installed in the controller is designed to disable anyone from turning it on
when it is locked with a padlock.

(9) When adjusting each peripheral device independently, be sure to turn off the power of the robot.

RP1
Pulsecoder
RI/RO,XHBK,XROT
RM1
Motor power/brake

EARTH

Safety fence

Interlocking device and safety plug that are activated if the


gate is opened.

Fig. 1.2 (a) Safety fence and safety gate

s-4
B-82614EN/02 SAFETY PRECAUTIONS

Dual chain
Panel board (Note)

EAS1 In case of R-30iA


Terminals EAS1,EAS11,EAS2,EAS21 or FENCE1,FENCE2
EAS11 are provided on the operation box or on the terminal block
of the printed circuit board.
EAS2
In case of R-30iA Mate
EAS21 Terminals EAS1,EAS11,EAS2,EAS21 are provided
on the emergency stop board or connector panel.
(in case of Open air type)

Termianls FENCE1,FENCE2 are provided


on the emergency stop board.
Single chain
Panel board
Refer to controller maintenance manual for details.
FENCE1

FENCE2

Fig.1.2 (b) Connection diagram for safety fence

1.2.1 Operator Safety


The operator is a person who operates the robot system. In this sense, a worker who operates the teach
pendant is also an operator. However, this section does not apply to teach pendant operators.

(1) If you do not have to operate the robot, turn off the power of the robot controller or press the
EMERGENCY STOP button, and then proceed with necessary work.
(2) Operate the robot system at a location outside of the safety fence
(3) Install a safety fence with a safety gate to prevent any worker other than the operator from entering the
work area unexpectedly and to prevent the worker from entering a dangerous area.
(4) Install an EMERGENCY STOP button within the operator’s reach.

The robot controller is designed to be connected to an external EMERGENCY STOP button.


With this connection, the controller stops the robot operation (Please refer to "STOP TYPE OF
ROBOT" in SAFETY for detail of stop type), when the external EMERGENCY STOP button is
pressed. See the diagram below for connection.

Dual chain
External stop button
Panel board
EES1
(Note)
EES11 Connect EES1and EES11,EES2 and EES21or EMGIN1and EMGIN2.

EES2 In case of R-30iA


EES1,EES11,EES2,EES21 or EMGIN1,EMGIN2 are on the panel board.
EES21
In case of R-30iA Mate
EES1,EES11,EES2,EES21 are on the emergency stop board
or connector panel (in case of Open air type),.
Single chain EMGIN1,EMGIN2 are on the emergency stop board.
External stop button Refer to the maintenance manual of the controller for details.
Panel board
EMGIN1
EMGIN2

Fig.1.2.1 Connection diagram for external emergency stop button

s-5
SAFETY PRECAUTIONS B-82614EN/02

1.2.2 Safety of the Teach Pendant Operator


While teaching the robot, the operator must enter the work area of the robot. The operator must ensure the
safety of the teach pendant operator especially.

(1) Unless it is specifically necessary to enter the robot work area, carry out all tasks outside the area.
(2) Before teaching the robot, check that the robot and its peripheral devices are all in the normal operating
condition.
(3) If it is inevitable to enter the robot work area to teach the robot, check the locations, settings, and other
conditions of the safety devices (such as the EMERGENCY STOP button, the DEADMAN switch on
the teach pendant) before entering the area.
(4) The programmer must be extremely careful not to let anyone else enter the robot work area.

Our operator panel is provided with an emergency stop button and a key switch (mode switch) for selecting the
automatic operation mode (AUTO) and the teach modes (T1 and T2). Before entering the inside of the safety fence
for the purpose of teaching, set the switch to a teach mode, remove the key from the mode switch to prevent other
people from changing the operation mode carelessly, then open the safety gate. If the safety gate is opened with the
automatic operation mode set, the robot stops (Please refer to "STOP TYPE OF ROBOT" in SAFETY for detail of
stop type). After the switch is set to a teach mode, the safety gate is disabled. The programmer should understand
that the safety gate is disabled and is responsible for keeping other people from entering the inside of the safety
fence. (In case of R-30iA Mate Controller standard specification, there is no mode switch. The automatic operation
mode and the teach mode is selected by teach pendant enable switch.)

Our teach pendant is provided with a DEADMAN switch as well as an emergency stop button. These button and
switch function as follows:
(1) Emergency stop button: Causes an emergency stop (Please refer to "STOP TYPE OF ROBOT" in SAFETY for
detail of stop type) when pressed.
(2) DEADMAN switch: Functions differently depending on the mode switch setting status.
(a) Automatic operation mode: The DEADMAN switch is disabled.
(b) Teach mode: Servo power is turned off when the operator releases the DEADMAN switch or when the
operator presses the switch strongly.
Note) The DEADMAN switch is provided to stop the robot when the operator releases the teach pendant or
presses the pendant strongly in case of emergency. The R-30iA/ R-30iA Mate employs a 3-position
DEADMAN switch, which allows the robot to operate when the 3-position DEADMAN switch is pressed to
its intermediate point. When the operator releases the DEADMAN switch or presses the switch strongly,
the robot stops immediately.

The operator’s intention of starting teaching is determined by the controller through the dual operation of setting the
teach pendant enable/disable switch to the enable position and pressing the DEADMAN switch. The operator should
make sure that the robot could operate in such conditions and be responsible in carrying out tasks safely.

The teach pendant, operator panel, and peripheral device interface send each robot start signal. However the validity
of each signal changes as follows depending on the mode switch and the DEADMAN switch of the operator panel, the
teach pendant enable switch and the remote condition on the software.

In case of R-30iA Controller or CE or RIA specification of R-30iA Mate Controller


Software
Teach pendant
Mode remote Teach pendant Operator panel Peripheral device
enable switch
condition
Local Not allowed Not allowed Not allowed
On
AUTO Remote Not allowed Not allowed Not allowed
mode Local Not allowed Allowed to start Not allowed
Off
Remote Not allowed Not allowed Allowed to start

s-6
B-82614EN/02 SAFETY PRECAUTIONS

Software
Teach pendant
Mode remote Teach pendant Operator panel Peripheral device
enable switch
condition
Local Allowed to start Not allowed Not allowed
On
T1, T2 Remote Allowed to start Not allowed Not allowed
mode Local Not allowed Not allowed Not allowed
Off
Remote Not allowed Not allowed Not allowed

In case of standard specification of R-30iA Mate Controller


Teach pendant enable switch Software remote condition Teach pendant Peripheral device
On Ignored Allowed to start Not allowed
Off Local Not allowed Not allowed
Remote Not allowed Allowed to start

(5) (Only when R-30iA Controller or CE or RIA specification of R-30iA Mate controller is selected.) To
start the system using the operator’s panel, make certain that nobody is the robot work area and that
there are no abnormal conditions in the robot work area.
(6) When a program is completed, be sure to carry out a test run according to the procedure below.
(a) Run the program for at least one operation cycle in the single step mode at low speed.
(b) Run the program for at least one operation cycle in the continuous operation mode at low speed.
(c) Run the program for one operation cycle in the continuous operation mode at the intermediate
speed and check that no abnormalities occur due to a delay in timing.
(d) Run the program for one operation cycle in the continuous operation mode at the normal
operating speed and check that the system operates automatically without trouble.
(e) After checking the completeness of the program through the test run above, execute it in the
automatic operation mode.
(7) While operating the system in the automatic operation mode, the teach pendant operator should leave
the robot work area.

1.2.3 Safety of the Maintenance Engineer


For the safety of maintenance engineer personnel, pay utmost attention to the following.

(1) During operation, never enter the robot work area.


(2) Except when specifically necessary, turn off the power of the controller while carrying out
maintenance. Lock the power switch, if necessary, so that no other person can turn it on.
(3) If it becomes necessary to enter the robot operation range while the power is on, press the emergency
stop button on the operator panel, or the teach pendant before entering the range. The maintenance
personnel must indicate that maintenance work is in progress and be careful not to allow other people
to operate the robot carelessly.
(4) When disconnecting the pneumatic system, be sure to reduce the supply pressure.
(5) Before the start of teaching, check that the robot and its peripheral devices are all in the normal
operating condition.
(6) Do not operate the robot in the automatic mode while anybody is in the robot work area.
(7) When you maintain the robot alongside a wall or instrument, or when multiple workers are working
nearby, make certain that their escape path is not obstructed.
(8) When a tool is mounted on the robot, or when any moving device other than the robot is installed, such
as belt conveyor, pay careful attention to its motion.
(9) If necessary, have a worker who is familiar with the robot system stand beside the operator panel and
observe the work being performed. If any danger arises, the worker should be ready to press the
EMERGENCY STOP button at any time.
(10) When replacing or reinstalling components, take care to prevent foreign matter from entering the
system.

s-7
SAFETY PRECAUTIONS B-82614EN/02

(11) When handling each unit or printed circuit board in the controller during inspection, turn off the circuit
breaker to protect against electric shock.
If there are two cabinets, turn off the both circuit breaker.
(12) When replacing parts, be sure to use those specified by FANUC.
In particular, never use fuses or other parts of non-specified ratings. They may cause a fire or result in
damage to the components in the controller.
(13) When restarting the robot system after completing maintenance work, make sure in advance that there
is no person in the work area and that the robot and the peripheral devices are not abnormal.

1.3 SAFETY OF THE TOOLS AND PERIPHERAL DEVICES

1.3.1 Precautions in Programming


(1) Use a limit switch or other sensor to detect a dangerous condition and, if necessary, design the program
to stop the robot when the sensor signal is received.
(2) Design the program to stop the robot when an abnormal condition occurs in any other robots or
peripheral devices, even though the robot itself is normal.
(3) For a system in which the robot and its peripheral devices are in synchronous motion, particular care
must be taken in programming so that they do not interfere with each other.
(4) Provide a suitable interface between the robot and its peripheral devices so that the robot can detect the
states of all devices in the system and can be stopped according to the states.

1.3.2 Precautions for Mechanism


(1) Keep the component cells of the robot system clean, and operate the robot in an environment free of
grease, water, and dust.
(2) Employ a limit switch or mechanical stopper to limit the robot motion so that the robot or cable does
not strike against its peripheral devices or tools.
(3) Observe the following precautions about the mechanical unit cables. When theses attentions are not
kept, unexpected troubles might occur.
• Use mechanical unit cable that have required user interface.
• Don’t add user cable or hose to inside of mechanical unit.
• Please do not obstruct the movement of the mechanical unit cable when cables are added to
outside of mechanical unit.
• In the case of the model that a cable is exposed, Please do not perform remodeling (Adding a
protective cover and fix an outside cable more) obstructing the behavior of the outcrop of the
cable.
• Please do not interfere with the other parts of mechanical unit when install equipments in the
robot.
(4) The frequent power-off stop for the robot during operation causes the trouble of the robot. Please avoid
the system construction that power-off stop would be operated routinely. (Refer to bad case example.)
Please execute power-off stop after reducing the speed of the robot and stopping it by hold stop or
cycle stop when it is not urgent. (Please refer to "STOP TYPE OF ROBOT" in SAFETY for detail of
stop type.)
(Bad case example)
• Whenever poor product is generated, a line stops by emergency stop.
• When alteration was necessary, safety switch is operated by opening safety fence and power-off
stop is executed for the robot during operation.
• An operator pushes the emergency stop button frequently, and a line stops.
• An area sensor or a mat switch connected to safety signal operate routinely and power-off stop is
executed for the robot.
(5) Robot stops urgently when collision detection alarm (SV050) etc. occurs. The frequent urgent stop by
alarm causes the trouble of the robot, too. So remove the causes of the alarm.
s-8
B-82614EN/02 SAFETY PRECAUTIONS

1.4 SAFETY OF THE ROBOT MECHANISM

1.4.1 Precautions in Operation


(1) When operating the robot in the jog mode, set it at an appropriate speed so that the operator can
manage the robot in any eventuality.
(2) Before pressing the jog key, be sure you know in advance what motion the robot will perform in the
jog mode.

1.4.2 Precautions in Programming


(1) When the work areas of robots overlap, make certain that the motions of the robots do not interfere
with each other.
(2) Be sure to specify the predetermined work origin in a motion program for the robot and program the
motion so that it starts from the origin and terminates at the origin.
Make it possible for the operator to easily distinguish at a glance that the robot motion has terminated.

1.4.3 Precautions for Mechanisms


(1) Keep the work areas of the robot clean, and operate the robot in an environment free of grease, water,
and dust.

1.4.4 Procedure to move arm without drive power in emergency or


abnormal situations
For emergency or abnormal situations (e.g. persons trapped in or by the robot), brake release unit can be
used to move the robot axes without drive power.
Please refer to controller maintenance manual and mechanical unit operator’s manual for using method of
brake release unit and method of supporting robot.

1.5 SAFETY OF THE END EFFECTOR

1.5.1 Precautions in Programming


(1) To control the pneumatic, hydraulic and electric actuators, carefully consider the necessary time delay
after issuing each control command up to actual motion and ensure safe control.
(2) Provide the end effector with a limit switch, and control the robot system by monitoring the state of the
end effector.

1.6 STOP TYPE OF ROBOT


The following three robot stop types exist:

Power-Off Stop (Category 0 following IEC 60204-1)


Servo power is turned off and the robot stops immediately. Servo power is turned off when the robot is
moving, and the motion path of the deceleration is uncontrolled.
The following processing is performed at Power-Off stop.
- An alarm is generated and servo power is turned off.
- The robot operation is stopped immediately. Execution of the program is paused.

s-9
SAFETY PRECAUTIONS B-82614EN/02

Controlled stop (Category 1 following IEC 60204-1)


The robot is decelerated until it stops, and servo power is turned off.
The following processing is performed at Controlled stop.
- The alarm "SRVO-199 Controlled stop" occurs along with a decelerated stop. Execution of the
program is paused.
- An alarm is generated and servo power is turned off.

Hold (Category 2 following IEC 60204-1)


The robot is decelerated until it stops, and servo power remains on.
The following processing is performed at Hold.
- The robot operation is decelerated until it stops. Execution of the program is paused.

WARNING
The stopping distance and stopping time of Controlled stop are longer than the
stopping distance and stopping time of Power-Off stop. A risk assessment for the
whole robot system, which takes into consideration the increased stopping
distance and stopping time, is necessary when Controlled stop is used.

When the E-Stop button is pressed or the FENCE is open, the stop type of robot is Power-Off stop or
Controlled stop. The configuration of stop type for each situation is called stop pattern. The stop pattern is
different according to the controller type or option configuration.

There are the following 3 Stop patterns.

Stop E-Stop External Servo


Mode FENCE open SVOFF input
pattern button E-Stop disconnect
AUTO P-Stop P-Stop C-Stop C-Stop P-Stop
A T1 P-Stop P-Stop - C-Stop P-Stop
T2 P-Stop P-Stop - C-Stop P-Stop
AUTO P-Stop P-Stop P-Stop P-Stop P-Stop
B T1 P-Stop P-Stop - P-Stop P-Stop
T2 P-Stop P-Stop - P-Stop P-Stop
AUTO C-Stop C-Stop C-Stop C-Stop C-Stop
C T1 P-Stop P-Stop - C-Stop P-Stop
T2 P-Stop P-Stop - C-Stop P-Stop
P-Stop: Power-Off stop
C-Stop: Controlled stop
-: Not stop

The following table indicates the Stop pattern according to the controller type or option configuration.

R-30iA R-30iA Mate


Option Standard Standard RIA CE
RIA type CE type Standard
(Single) (Dual) type type
Standard B (*) A A A A (**) A A
Stop type set (Stop pattern C)
N/A N/A C C N/A C C
(A05B-2500-J570)
(*) R-30iA standard (single) does not have servo disconnect.
(**) R-30iA Mate Standard does not have servo disconnect, and the stop type of SVOFF input is
Power-Off stop.

The stop pattern of the controller is displayed in "Stop pattern" line in software version screen. Please refer
"Software version" in operator's manual of controller for the detail of software version screen.
s - 10
B-82614EN/02 SAFETY PRECAUTIONS

"Stop type set (Stop pattern C)" option


"Stop type set (Stop pattern C)"(A05B-2500-J570) is an optional function. When this option is loaded, the
stop type of the following alarms becomes Controlled stop but only in AUTO mode. In T1 or T2 mode, the
stop type is Power-Off stop which is the normal operation of the system.

Alarm Condition
SRVO-001 Operator panel E-stop Operator panel E-stop is pressed.
SRVO-002 Teach pendant E-stop Teach pendant E-stop is pressed.
SRVO-007 External emergency stops External emergency stop input (EES1-EES11, EES2-EES21) is
open. (R-30iA controller)
SRVO-194 Servo disconnect Servo disconnect input (SD4-SD41, SD5-SD51) is open.
(R-30iA controller)
SRVO-218 Ext.E-stop/Servo Disconnect External emergency stop input (EES1-EES11, EES2-EES21) is
open. (R-30iA Mate controller)
SRVO-408 DCS SSO Ext Emergency Stop In DCS Safe I/O connect function, SSO[3] is OFF.
SRVO-409 DCS SSO Servo Disconnect In DCS Safe I/O connect function, SSO[4] is OFF.

Controlled stop is different from Power-Off stop as follows:


- In Controlled stop, the robot is stopped on the program path. This function is effective for a system
where the robot can interfere with other devices if it deviates from the program path.
- In Controlled stop, physical impact is less than Power-Off stop. This function is effective for systems
where the physical impact to the mechanical unit or EOAT (End Of Arm Tool) should be minimized.
- The stopping distance and stopping time of Controlled stop is longer than the stopping distance and
stopping time of Power-Off stop, depending on the robot model and axis. Please refer the operator's
manual of a particular robot model for the data of stopping distance and stopping time.

This function is available only in CE or RIA type hardware.

When this option is loaded, this function can not be disabled.

The stop type of DCS Position and Speed Check functions is not affected by the loading of this option.

WARNING
The stopping distance and stopping time of Controlled stop are longer than the
stopping distance and stopping time of Power-Off stop. A risk assessment for the
whole robot system, which takes into consideration the increased stopping
distance and stopping time, is necessary when this option is loaded.

s - 11
B-82614EN/02 TABLE OF CONTENTS

TABLE OF CONTENTS
SAFETY.......................................................................................................s-1
1 INTEGRATED PMC OVERVIEW ............................................................ 1
1.1 INTEGRATED PMC SPECIFICATIONS ........................................................ 1
1.2 PMC Program ................................................................................................ 2
1.3 BASIC COMMANDS...................................................................................... 3
1.4 Function Command ....................................................................................... 4
1.5 PMC ADDRESSES........................................................................................ 6
1.5.1 Symbols and Comments ...........................................................................................7
1.5.2 External I/O Device..................................................................................................7
1.5.3 Internal Relay ...........................................................................................................9
1.5.4 Nonvolatile Memory ..............................................................................................10
1.5.5 Data Table ..............................................................................................................11
1.5.6 Interface between PMC Program and Robot Program ...........................................14
1.5.7 System Control by PMC Program (System Interface) ...........................................15
1.5.8 PMC Setting Parameters (K17-K19)......................................................................19
1.5.9 PMC System Area (R9000-R9117)........................................................................19
1.5.10 Internal Relay Assignment .....................................................................................20
1.6 Standard PMC Program .............................................................................. 21
1.7 Save/Load PMC Program and PMC Parameters......................................... 21
2 SEQUENCE PROGRAM ....................................................................... 23
2.1 Execution Procedure of Sequence Program................................................ 23
2.2 Repetitive Operation .................................................................................... 24
2.3 Level 1 and Level 2...................................................................................... 24
2.4 PMC EXECUTION PROCESSING TIME .................................................... 25
2.5 Update Timing of Signals............................................................................. 25
2.6 INTERLOCKING.......................................................................................... 26
2.7 Sequence Program Structuring.................................................................... 27
2.7.1 Examples of Structured Programming ...................................................................27
2.7.1.1 Implementation Techniques............................................................................... 27
2.7.1.2 Applications....................................................................................................... 28
2.7.1.3 Specifications..................................................................................................... 30
2.7.2 Subprogramming and Nesting................................................................................30
2.7.2.1 Function ............................................................................................................. 30
2.7.2.2 Execution Method.............................................................................................. 31
2.7.2.3 Creating a Program ............................................................................................ 32
2.8 JMP Instructions with Label Specification.................................................... 34
2.8.1 Specifications .........................................................................................................34
2.8.2 Restrictions.............................................................................................................37

3 PROGRAMMING WITH FAPT LADDER-II ........................................... 43


3.1 Connection Between Robot Controller And Fapt Ladder-II.......................... 43
3.2 Creating a New PMC Program .................................................................... 45
3.3 Loading the Standard PMC Program........................................................... 47
3.4 Editting a PMC Program .............................................................................. 49
3.5 Compiling a PMC Program .......................................................................... 51
3.6 Transfer PMC program ................................................................................ 52
c-1
TABLE OF CONTENTS B-82614EN/02

3.7 Check PMC Program (On-line Monitor) ....................................................... 54


3.8 Run/Stop PMC............................................................................................. 57
3.9 Writing PMC Program to ROM .................................................................... 58
3.10 Modifying the PMC Program in Robot ......................................................... 59
3.11 Save/Load PMC Program and PMC Parameters......................................... 61
3.11.1 Saving LADDER.PMC Using FAPT LADDER-II................................................61
3.11.2 Loading LADDER.PMC Using FAPT LADDER-II..............................................63
3.11.3 Saving PARAM.PMC Using FAPT LADDER-II..................................................64
3.11.4 Loading PARAM.PMC by FAPT LADDER-II .....................................................65

4 FANUC LADDER-III for Robot PROGRAMMING ............................... 67


4.1 CONNECTING FANUC LADDER-III for Robot TO ROBOT
CONTROLLER ............................................................................................ 68
4.1.1 RS-232C Connection..............................................................................................68
4.1.2 Ethernet Connection ...............................................................................................70
4.2 CREATING PMC PROGRAM...................................................................... 72
4.3 IMPORTING STANDARD PMC PROGRAM ............................................... 73
4.4 EDITTING A PMC PROGRAM .................................................................... 75
4.5 COMPILING A PMC PROGRAM................................................................. 76
4.6 TRANSFERRING PMC PROGRAM ............................................................ 77
4.7 PMC PROGRAM MONITORING (ONLINE MONITOR) .............................. 81
4.8 RUNNING OR STOPPING PMC PROGRAM.............................................. 83
4.9 Writing Pmc Program to F-rom .................................................................... 83
4.10 MODIFYING THE PMC PROGRAM IN THE ROBOT CONTROLLER ........ 85
4.11 STORE/LOAD PMC PROGRAM AND PARAMETERS ............................... 88
4.11.1 Exporting LADDER.PMC using FANUC LADDER-III for Robot ......................88
4.11.2 Importing LADDER.PMC using FANUC LADDER-III for Robot ......................90
4.11.3 Loading PARAM.PMC using FANUC LADDER-III for Robot ...........................92
4.11.4 Storing PARAM.PMC by FANUC LADDER-III for Robot .................................96

5 TEACH PENDANT OPERATION........................................................ 100


5.1 PMC Menus ............................................................................................... 100
5.1.1 Byte Menu ............................................................................................................101
5.1.2 Bit Menu...............................................................................................................102
5.1.3 Timer Menu..........................................................................................................103
5.1.4 Counter Menu.......................................................................................................104
5.1.5 Data Table Control Data Menu ............................................................................105
5.1.6 Data Table Menu ..................................................................................................107
5.1.7 Parameters Menu ..................................................................................................108
5.1.8 Status Menu..........................................................................................................109
5.1.9 Title Menu ............................................................................................................109
5.1.10 Search ...................................................................................................................110
5.1.11 Run/Stop PMC .....................................................................................................111
5.1.12 Save STDLDR.PMC ............................................................................................112
5.1.13 Save LADDER.PMC and PARAM.PMC ............................................................112
5.2 FILE MENU OPERATIONS ....................................................................... 113
5.2.1 Save LADDER.PMC, PARAM.PMC ..................................................................115
5.2.2 Load LADDER.PMC, PARAM.PMC..................................................................116

6 BASIC COMMAND REFERENCE ...................................................... 119


6.1 RD ............................................................................................................. 119

c-2
B-82614EN/02 TABLE OF CONTENTS

6.2 RD. NOT.................................................................................................... 120


6.3 WRT .......................................................................................................... 121
6.4 WRT. NOT................................................................................................. 122
6.5 AND ........................................................................................................... 122
6.6 AND. NOT ................................................................................................. 123
6.7 OR ............................................................................................................. 123
6.8 OR. NOT.................................................................................................... 123
6.9 RD. STK .................................................................................................... 123
6.10 RD. NOT. STK ........................................................................................... 124
6.11 AND. STK .................................................................................................. 125
6.12 OR. STK .................................................................................................... 125
6.13 SET............................................................................................................ 126
6.14 RST ........................................................................................................... 127
7 FUNCTION COMMAND REFERENCE ............................................... 128
7.1 ADD (Addition)........................................................................................... 128
7.1.1 Function................................................................................................................128
7.1.2 Format ..................................................................................................................128
7.1.3 Control Conditions ...............................................................................................128
7.1.4 Data Format of Addend ........................................................................................129
7.1.5 Summand Address................................................................................................129
7.1.6 Addend (Address).................................................................................................129
7.1.7 Sum Output Address ............................................................................................129
7.1.8 Error Output .........................................................................................................129
7.2 ADDB (Binary Addition) ............................................................................. 129
7.2.1 Function................................................................................................................129
7.2.2 Format ..................................................................................................................129
7.2.3 Control Conditions ...............................................................................................129
7.2.4 Parameters ............................................................................................................130
7.2.5 Error Output (W1) ................................................................................................130
7.2.6 Operation Output Register (R9000) .....................................................................130
7.3 LOGICAL AND........................................................................................... 131
7.3.1 Function................................................................................................................131
7.3.2 Format ..................................................................................................................131
7.3.3 Control Conditions ...............................................................................................131
7.3.4 Parameters ............................................................................................................131
7.3.5 Operation ..............................................................................................................131
7.4 CALL (Conditional Subprogram Call)......................................................... 132
7.4.1 Function................................................................................................................132
7.4.2 Format ..................................................................................................................132
7.4.3 Control Conditions ...............................................................................................132
7.4.4 Parameters ............................................................................................................132
7.5 CALLU (Unconditional Subprogram Call) .................................................. 133
7.5.1 Function................................................................................................................133
7.5.2 Format ..................................................................................................................133
7.5.3 Parameters ............................................................................................................133
7.6 COD (Code Conversion)............................................................................ 133
7.6.1 Function................................................................................................................133
7.6.2 Format ..................................................................................................................134
7.6.3 Control Conditions ...............................................................................................135
7.6.4 Size of Table Data ................................................................................................135

c-3
TABLE OF CONTENTS B-82614EN/02

7.6.5 Conversion Input Data Address............................................................................135


7.6.6 Convert Data Output Address ..............................................................................135
7.6.7 Error Output (W1) ................................................................................................135
7.6.8 Conversion Data Table .........................................................................................136
7.7 CODB (Binary Code Conversion) .............................................................. 136
7.7.1 Function................................................................................................................136
7.7.2 Format ..................................................................................................................136
7.7.3 Control Conditions ...............................................................................................137
7.7.4 Parameters ............................................................................................................137
7.7.5 Conversion Data Table .........................................................................................137
7.7.6 Error Output (W1) ................................................................................................137
7.8 COIN (Coincidence Check) ....................................................................... 137
7.8.1 Function................................................................................................................137
7.8.2 Format ..................................................................................................................137
7.8.3 Control Conditions ...............................................................................................138
7.8.4 Input Data Format ................................................................................................138
7.8.5 Input Data .............................................................................................................138
7.8.6 Comparison Data Address....................................................................................138
7.8.7 Comparison Result Output ...................................................................................139
7.9 COM (Common Line Control) .................................................................... 139
7.9.1 Function................................................................................................................139
7.9.2 Format ..................................................................................................................139
7.9.3 Control Conditions ...............................................................................................139
7.9.4 Parameters ............................................................................................................140
7.9.5 Caution .................................................................................................................140
7.10 COME (Common Line Control End) .......................................................... 141
7.10.1 Function................................................................................................................141
7.10.2 Format ..................................................................................................................141
7.11 COMP (Comparison) ................................................................................. 141
7.11.1 Function................................................................................................................141
7.11.2 Format ..................................................................................................................141
7.11.3 Control Conditions ...............................................................................................142
7.11.4 Input Data Format ................................................................................................142
7.11.5 Parameter..............................................................................................................142
7.11.6 Comparison Data Address....................................................................................142
7.11.7 Comparison Result Output ...................................................................................143
7.12 COMPB (Comparison Between Binary Data) ............................................ 143
7.12.1 Function................................................................................................................143
7.12.2 Format ..................................................................................................................143
7.12.3 Control Conditions ...............................................................................................143
7.12.4 Parameters ............................................................................................................143
7.12.5 Operation Output Register (R9000) .....................................................................144
7.13 CTR (Counter) ........................................................................................... 144
7.13.1 Function................................................................................................................144
7.13.2 Format ..................................................................................................................145
7.13.3 Control Conditions ...............................................................................................145
7.13.4 Counter Number ...................................................................................................146
7.13.5 Countup Output (W1)...........................................................................................146
7.13.6 Examples of Using the Counter............................................................................146
7.14 CTRC (Counter)......................................................................................... 148
7.14.1 Functions ..............................................................................................................148
7.14.2 Format ..................................................................................................................149
7.14.3 Control Conditions ...............................................................................................149

c-4
B-82614EN/02 TABLE OF CONTENTS
7.14.4 Counter Preset Value Address..............................................................................150
7.14.5 Counter Register Address.....................................................................................150
7.14.6 Count-up Output (W1) .........................................................................................150
7.15 DCNV (Data Conversion) .......................................................................... 150
7.15.1 Function................................................................................................................150
7.15.2 Format ..................................................................................................................150
7.15.3 Control Conditions ...............................................................................................151
7.15.4 Error Output (W1) ................................................................................................151
7.16 DCNVB (Extended Data Conversion) ........................................................ 152
7.16.1 Function................................................................................................................152
7.16.2 Format ..................................................................................................................152
7.16.3 Control Conditions ...............................................................................................152
7.16.4 Parameters ............................................................................................................152
7.16.5 Error Output (W1) ................................................................................................153
7.16.6 Operation Output Register (R9000) .....................................................................153
7.17 DEC (Decode) ........................................................................................... 153
7.17.1 Function................................................................................................................153
7.17.2 Format ..................................................................................................................153
7.17.3 Control Condition.................................................................................................154
7.17.4 Code Signal Address ............................................................................................154
7.17.5 Decode Specification............................................................................................154
7.17.6 W1 (Decoding Result Output)..............................................................................154
7.18 DECB (Binary Decoding) ........................................................................... 155
7.18.1 Function (Fig.7.18.2 (a), (b))................................................................................155
7.18.2 Format ..................................................................................................................155
7.18.3 Control Conditions ...............................................................................................156
7.18.4 Parameters ............................................................................................................156
7.19 DIFD (Falling Edge Detection) ................................................................... 156
7.19.1 Function................................................................................................................156
7.19.2 Format ..................................................................................................................156
7.19.3 Control Conditions ...............................................................................................156
7.19.4 Parameters ............................................................................................................156
7.19.5 Operation ..............................................................................................................157
7.20 DIFU (Rising Edge Detection).................................................................... 157
7.20.1 Function................................................................................................................157
7.20.2 Format ..................................................................................................................157
7.20.3 Control Conditions ...............................................................................................157
7.20.4 Parameters ............................................................................................................157
7.20.5 Operation ..............................................................................................................158
7.21 DIV (Division)............................................................................................. 158
7.21.1 Function................................................................................................................158
7.21.2 Format ..................................................................................................................158
7.21.3 Control Conditions ...............................................................................................159
7.21.4 Divisor Data Format Designation.........................................................................159
7.21.5 Dividend Address .................................................................................................159
7.21.6 Divisor (Address) .................................................................................................159
7.21.7 Quotient Output Address......................................................................................159
7.21.8 Error Output .........................................................................................................159
7.22 DIVB (Binary Division) ............................................................................... 159
7.22.1 Function................................................................................................................159
7.22.2 Format ..................................................................................................................160
7.22.3 Control Conditions ...............................................................................................160
7.22.4 Parameters ............................................................................................................160

c-5
TABLE OF CONTENTS B-82614EN/02

7.22.5 Error Output (W1) ................................................................................................160


7.22.6 Operation Output Register (R9000) .....................................................................161
7.22.7 Remainder Output Address ..................................................................................161
7.23 DSCH (Data Search) ................................................................................. 161
7.23.1 Function................................................................................................................161
7.23.2 Format ..................................................................................................................161
7.23.3 Control Conditions ...............................................................................................162
7.23.4 Number of Data of the Data Table .......................................................................162
7.23.5 Data Table Head Address.....................................................................................163
7.23.6 Search Data Address.............................................................................................163
7.23.7 Search Result Output Address..............................................................................163
7.23.8 Search Data Presence/Absence Output.................................................................163
7.24 DSCHB (Binary Data Search).................................................................... 163
7.24.1 Function................................................................................................................163
7.24.2 Format ..................................................................................................................164
7.24.3 Control Conditions ...............................................................................................164
7.24.4 Parameter..............................................................................................................164
7.24.5 Search Result (W1) ..............................................................................................164
7.25 END (End of a Ladder Program)................................................................ 165
7.25.1 Function................................................................................................................165
7.25.2 Format ..................................................................................................................165
7.26 END1 (1st Level Sequence Program End) ................................................ 165
7.26.1 Function................................................................................................................165
7.26.2 Format ..................................................................................................................165
7.27 END2 (2nd Level sequence program End) ................................................ 165
7.27.1 Function................................................................................................................165
7.27.2 Format ..................................................................................................................166
7.28 EOR (Exclusive or) .................................................................................... 166
7.28.1 Function................................................................................................................166
7.28.2 Format ..................................................................................................................166
7.28.3 Control Conditions ...............................................................................................166
7.28.4 Parameters ............................................................................................................166
7.28.5 Operation ..............................................................................................................167
7.29 JMP (Jump) ............................................................................................... 167
7.29.1 Function................................................................................................................167
7.29.2 Format ..................................................................................................................168
7.29.3 Control Conditions ...............................................................................................168
7.29.4 Parameters ............................................................................................................168
7.29.5 Caution .................................................................................................................168
7.30 JMPB (Label Jump) ................................................................................... 169
7.30.1 Function................................................................................................................169
7.30.2 Format ..................................................................................................................170
7.30.3 Control Conditions (ACT)....................................................................................170
7.30.4 Parameters ............................................................................................................170
7.31 JMPC (Label Jump) ................................................................................... 170
7.31.1 Function................................................................................................................170
7.31.2 Format ..................................................................................................................171
7.31.3 Control Conditions (ACT)....................................................................................171
7.31.4 Parameters ............................................................................................................171
7.32 JMPE (Jump End)...................................................................................... 171
7.32.1 Function................................................................................................................171
7.32.2 Format ..................................................................................................................171
7.33 LBL (Label) ................................................................................................ 171
c-6
B-82614EN/02 TABLE OF CONTENTS
7.33.1 Function................................................................................................................171
7.33.2 Format ..................................................................................................................172
7.33.3 Parameters ............................................................................................................172
7.34 MOVB (Transfer of 1 Byte) ........................................................................ 172
7.34.1 Function................................................................................................................172
7.34.2 Format ..................................................................................................................172
7.34.3 Control Conditions ...............................................................................................173
7.35 MOVE (Logical Product Transfer).............................................................. 173
7.35.1 Function................................................................................................................173
7.35.2 Format ..................................................................................................................173
7.35.3 Execution Command ............................................................................................174
7.35.4 Example of Using the MOVE Instruction ............................................................174
7.36 MOVN (Transfer of an Arbitrary Number of Bytes) .................................... 174
7.36.1 Function................................................................................................................174
7.36.2 Format ..................................................................................................................175
7.36.3 Control Conditions ...............................................................................................175
7.36.4 Parameters ............................................................................................................175
7.37 MOVOR (Data Transfer After Logical Sum)............................................... 175
7.37.1 Function................................................................................................................175
7.37.2 Format ..................................................................................................................175
7.37.3 Control Conditions ...............................................................................................176
7.37.4 Parameters ............................................................................................................176
7.38 MOVW (Transfer of 2 Bytes) ..................................................................... 176
7.38.1 Function................................................................................................................176
7.38.2 Format ..................................................................................................................176
7.38.3 Control Conditions ...............................................................................................176
7.39 MUL (Multiplication) ................................................................................... 177
7.39.1 Function................................................................................................................177
7.39.2 Format ..................................................................................................................177
7.39.3 Control Conditions ...............................................................................................177
7.39.4 Data Format of Multiplier ....................................................................................178
7.39.5 Multiplicand Address ...........................................................................................178
7.39.6 Multiplier (Address) .............................................................................................178
7.39.7 Product Output Address .......................................................................................178
7.39.8 Error Output .........................................................................................................178
7.40 MULB (Binary Multiplication)...................................................................... 178
7.40.1 Function................................................................................................................178
7.40.2 Format ..................................................................................................................178
7.40.3 Control Conditions ...............................................................................................178
7.40.4 Parameters ............................................................................................................179
7.40.5 Error Output (W1) ................................................................................................179
7.40.6 Operation Output Register (R9000) .....................................................................179
7.41 NOT (Logical Not)...................................................................................... 179
7.41.1 Function................................................................................................................179
7.41.2 Format ..................................................................................................................180
7.41.3 Control Conditions ...............................................................................................180
7.41.4 Parameters ............................................................................................................180
7.41.5 Operation ..............................................................................................................180
7.42 NUME (Definition of Constant)................................................................... 181
7.42.1 Function................................................................................................................181
7.42.2 Format ..................................................................................................................181
7.42.3 Control Conditions ...............................................................................................181
7.42.4 Constant................................................................................................................181
c-7
TABLE OF CONTENTS B-82614EN/02

7.42.5 Constant Output Address......................................................................................181


7.43 NUMEB (Definition of Binary Constants) ................................................... 182
7.43.1 Function................................................................................................................182
7.43.2 Format ..................................................................................................................182
7.43.3 Control Conditions ...............................................................................................182
7.43.4 Parameters ............................................................................................................182
7.44 Logical OR ................................................................................................. 182
7.44.1 Function................................................................................................................182
7.44.2 Format ..................................................................................................................183
7.44.3 Control Conditions ...............................................................................................183
7.44.4 Parameters ............................................................................................................183
7.44.5 Operation ..............................................................................................................183
7.45 PARI (Parity Check)................................................................................... 184
7.45.1 Function................................................................................................................184
7.45.2 Format ..................................................................................................................184
7.45.3 Control Conditions ...............................................................................................184
7.45.4 Error Output (W1) ................................................................................................185
7.45.5 Example of Using the PARI Instruction...............................................................185
7.46 ROT (Rotation Control).............................................................................. 185
7.46.1 Function................................................................................................................185
7.46.2 Format ..................................................................................................................186
7.46.3 Control Conditions ...............................................................................................187
7.46.4 Rotor Indexing Number........................................................................................187
7.46.5 Current Position Address......................................................................................187
7.46.6 Goal Position Address ..........................................................................................187
7.46.7 Operation Result Output Address.........................................................................187
7.46.8 Rotating Direction Output (W1)...........................................................................187
7.47 ROTB (Binary Rotation Control) ................................................................ 188
7.47.1 Function................................................................................................................188
7.47.2 Format ..................................................................................................................188
7.47.3 Control Conditions ...............................................................................................189
7.47.4 Parameters ............................................................................................................189
7.47.5 Output for Rotational Direction (W1) ..................................................................189
7.47.6 Example of Using the ROTB Instruction .............................................................189
7.48 SFT (Shift Register) ................................................................................... 191
7.48.1 Function................................................................................................................191
7.48.2 Format ..................................................................................................................191
7.48.3 Control Conditions ...............................................................................................191
7.48.4 Parameters ............................................................................................................192
7.48.5 W1 ........................................................................................................................192
7.49 SP (Subprogram)....................................................................................... 192
7.49.1 Function................................................................................................................192
7.49.2 Format ..................................................................................................................192
7.49.3 Parameters ............................................................................................................193
7.50 SPE (End of a Subprogram) ...................................................................... 193
7.50.1 Function................................................................................................................193
7.50.2 Format ..................................................................................................................193
7.51 SUB (Subtraction)...................................................................................... 193
7.51.1 Function................................................................................................................193
7.51.2 Format ..................................................................................................................193
7.51.3 Control Conditions ...............................................................................................194
7.51.4 Reset .....................................................................................................................194
7.51.5 Execution Command ............................................................................................194
c-8
B-82614EN/02 TABLE OF CONTENTS
7.51.6 Data Format of Subtrahend ..................................................................................194
7.51.7 Minuend Address .................................................................................................195
7.51.8 Subtrahend (Address) ...........................................................................................195
7.51.9 Difference Output Address...................................................................................195
7.51.10 Error Output .........................................................................................................195
7.52 SUBB (Binary Subtraction) ........................................................................ 195
7.52.1 Function................................................................................................................195
7.52.2 Format ..................................................................................................................195
7.52.3 Control Conditions ...............................................................................................195
7.52.4 Parameters ............................................................................................................195
7.52.5 Error Output (W1) ................................................................................................196
7.52.6 Operation Output Register (R9000) .....................................................................196
7.53 TMR (Timer) .............................................................................................. 196
7.53.1 Function................................................................................................................196
7.53.2 Format ..................................................................................................................196
7.53.3 Control Condition.................................................................................................197
7.53.4 Timer Relay (TM{{) .........................................................................................197
7.53.5 Setting Timers ......................................................................................................197
7.53.6 Timer Accuracy ....................................................................................................197
7.53.7 Parameter..............................................................................................................198
7.54 TMRB (Fixed Timer) .................................................................................. 198
7.54.1 Function................................................................................................................198
7.54.2 Format ..................................................................................................................198
7.54.3 Control Conditions ...............................................................................................198
7.54.4 Timer Relay (TMB{{{) ...................................................................................198
7.54.5 Parameter..............................................................................................................198
7.54.6 Precision of the Timer ..........................................................................................199
7.55 TMRC (Timer)............................................................................................ 199
7.55.1 Function................................................................................................................199
7.55.2 Format ..................................................................................................................199
7.55.3 Control Condition.................................................................................................200
7.55.4 Timer Accuracy ....................................................................................................200
7.55.5 Timer Set Time Address.......................................................................................200
7.55.6 Timer Register Address........................................................................................200
7.55.7 Timer Relay (TM{{) .........................................................................................201
7.56 XMOV (Indexed Data Transfer) ................................................................. 201
7.56.1 Function................................................................................................................201
7.56.2 Format ..................................................................................................................201
7.56.3 Control Conditions ...............................................................................................202
7.56.4 Number of Data of the Data Table .......................................................................203
7.56.5 Data Table Head Address.....................................................................................203
7.56.6 Address Storing Input/Output Data ......................................................................203
7.56.7 Address Storing the Table Internal Number.........................................................203
7.56.8 Error Output .........................................................................................................203
7.57 XMOVB (Binary Index Modifier Data Transfer) .......................................... 203
7.57.1 Function................................................................................................................203
7.57.2 Format ..................................................................................................................205
7.57.3 Control Conditions ...............................................................................................205
7.57.4 Parameters ............................................................................................................205
7.57.5 Error Output (W1) ................................................................................................206

8 PMC ADDRESS CORRESPONDENCE.............................................. 207


8.1 X ................................................................................................................ 208
8.1.1 X0-X127 ↔ DI[1]-DI[1024] (General Digital Input) ..........................................208
c-9
TABLE OF CONTENTS B-82614EN/02

8.1.2 X1000-X1004 ↔ UI[1]-UI[40] (User Operator Panel Inputs).............................211


8.1.3 X1005-X1009 ↔ WI[1]-WI[40] (Weld Digital Inputs).......................................211
8.1.4 X1010-X1014 ↔ Wsti[1]-Wsti[40] (Wire Stick Inputs) .....................................212
8.1.5 X1015-X1019 ↔ LDI[1]-LDI[40] (Laser Digital Inputs) ...................................212
8.1.6 X1020-X1024 ↔ RI[1]-RI[40] (Robot Digital Inputs)........................................212
8.1.7 X1025-X1026 ↔ SI[1]-SI[16] (Standard Operator Panel Inputs) .......................213
8.2 Y ................................................................................................................ 213
8.2.1 Y0-Y127 ↔ DO[1]-DO[1024] (General Digital Output) ....................................213
8.2.2 Y1000-Y1004 ↔ UO[1]-UO[40] (User Operator Panel Outputs).......................216
8.2.3 Y1005-Y1009 ↔ WO[1]-WO[40] (Weld Digital Outputs) .................................216
8.2.4 Y1010-Y1014 ↔ WSTO[1]-WSTO[40] (Wire Stick Outputs) ...........................217
8.2.5 Y1015-Y1019 ↔ LDO[1]-LDO[40] (Laser Digital Outputs)..............................217
8.2.6 Y1020-Y1024 ↔ RO[1]-RO[40] (Robot Digital Outputs) ..................................217
8.2.7 Y1025-Y1026 ↔ SO[1]-SO[16] (SOP Outputs) .................................................218
8.3 F ................................................................................................................ 218
8.3.1 F0-F127 ↔ GI[1]-GI[64] (Group Inputs) ............................................................218
8.3.2 F128-F255 ↔ AI[1]-AI[64] (Analog Inputs).......................................................219
8.3.3 F1000-F1255 ........................................................................................................219
8.4 G................................................................................................................ 220
8.4.1 G0-G127 ↔ GO[1]-GO[64] (Group Outputs) .....................................................220
8.4.2 G128-G255 ↔ AO[1]-AO[64] (Analog Outputs)................................................221
8.4.3 G1000-G1255.......................................................................................................221
8.5 R ................................................................................................................ 222
8.5.1 R0-R1499 .............................................................................................................222
8.5.2 R9000-R9117 .......................................................................................................222
8.6 K ................................................................................................................ 222
8.6.1 K0-K19.................................................................................................................222
8.7 D ................................................................................................................ 223
8.7.1 D0-D2999.............................................................................................................223
8.8 T ................................................................................................................ 223
8.8.1 T0-T79..................................................................................................................223
8.9 C ................................................................................................................ 223
8.9.1 C0-C79 .................................................................................................................223

9 INTEGRATED PMC ERROR CODES................................................. 224

c-10
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

1 INTEGRATED PMC OVERVIEW


This chapter is an overview of the Integrated PMC.

PMC stands for Programmable Machine Control. The Integrated PMC is a method of executing Ladder
Logic on the Robot controller.

1.1 INTEGRATED PMC SPECIFICATIONS


Programming language Ladder
Number of Ladder Level 2
Scan time of First Level 8msec
Processing time of basic command R-J3iB
085μsec/step
R-30iA
0.025μsec/step
Program size
• Ladder 16384step (64KB)
• Symbol, comment 1 - 128KB
• Total 128KB
Command Basic command 14
Function command 57
Memory Allocated for
Description Notation Quantity
set fields
Internal relay (R) 1500 bytes 12000
Operation Output (R) 118 bytes 944
Relay (A) None None
Message request
Keep memory (T) 80 bytes 40
• Variable timer (C) 80 bytes 20
• Counter (K) 20 bytes 160
• Keep relay (D) 3000 bytes 24000
• Data table (P) None 512
Sub program (L) None 9999
Label 200 bytes 100
Fixed timer
I/O device DI/O 1024/1024
Integrated PMC can use all I/O AI/O 64/64
devices that robot controller can GI/O 64/64
use. But number of port that
Integrated PMC can use is
limited.
Device to save PMC program Flash ROM

-1-
1. INTEGRATED PMC OVERVIEW B-82614EN/02

1.2 PMC PROGRAM


The Integrated PMC provides high speed execution of a PMC written in ladder language.
FAPT LADDER-II for Robot or FANUC LADDER-III for Robot (we will call it PMC programmer) is the
programming tool used to edit the PMC program, on a PC.

Components of a PMC program


A PMC program consists of the following elements:
• PMC address
In PMC programs, signals are specified by the PMC address. I/O port names that the Robot controller
uses to specify signals (DI, DO, and so forth) are not used in PMC programs.
Refer to Section 1.5 "PMC Addresses" for details of PMC addressing.
• Basic commands
These basic commands are used to calculate bit operations at high speed.
Refer to Section 1.3 "Basic Commands" for details of basic commands.
• Function commands
Functions that are difficult to do with basic commands are supported by function commands. Function
commands take more processing time than basic commands.
Refer to Section 1.4 "Function Commands" for details of function commands.

Keep the operation result


The area where the operation result of a basic command is temporarily kept is called the stack register. The
stack register is composed of 1 bit + 8 bits, total 9 bits.

-2-
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

1.3 BASIC COMMANDS

Command Ladder diagram Function


RD Read the specified address and set the read value in ST0.

RD.NOT Read the specified address and set the inverse condition of the
read value in ST0.
WRT Set the result value (ST0) in the specified address.

WRT.NOT Set the inverse condition of the result value (ST0) to the
specified address.
AND Read the specified address, calculate the AND of the read
value with ST0 and set the result in ST0.
AND.NOT Read the specified address, calculate the AND of the inverse of
the read value with ST0 and set the result in ST0.
OR Read the specified address, calculate the OR of the read value
with ST0 and set the result in ST0.

OR.NOT Read the specified address, calculate the OR of the inverse of


the read value with ST0 and set the result in ST0.

RD.STK Shift stack to left, then read the specified address and set the
read value in ST0.

RD.NOT.STK Shift stack to left, then read the specified address and set the
inverse of the read value to ST0.

AND.STK Calculate the AND of ST1 with ST0, set the result in ST1 then
shift stack to right.

OR.STK Calculate the OR of ST1 with ST0, set the result in ST1 then
shift stack to right.

SET Read the specified address, calculate the OR of the read value
with ST0 then set the result to the specified address.
RST Read the specified address, calculate the AND of the read
value with the reversed value of ST0 then set the result to the
specified address.

Refer to Chapter 5 "Basic command reference" for details of every basic command.

Unavailable PMC addresses for basic commands

NOTE
PMC addresses F0-255 and G0-255 cannot be specified in basic commands.
Use MOVW(SUB44) to access these PMC addresses.

-3-
1. INTEGRATED PMC OVERVIEW B-82614EN/02

1.4 FUNCTION COMMAND

SUB Processing time (μSEC)


Command Function
number R-J3/R-J3iB R-30iA
END1 1 End of Level 1 310 250
END2 2 End of Level 2 310 250
TMR 3 Variable timer 32 20
TMRB 24 Fixed timer 33 17
TMRC 54 Variable timer (Timer value is set in any PMC address) 32 17
DEC 4 Decode 23 9
DECB 25 Binary decode 33 14
CTR 5 Counter 29 22
CTRC 55 Counter (Counter value is set in any PMC address) 23 15
ROT 6 Rotation 54 34
ROTB 26 Binary rotation 48 20
COD 7 Code conversion 49 24
CODB 27 Binary code conversion 45 17
MOVE 8 AND then move data 30 10
MOVOR 28 OR then move data 26 14
MOVB 43 Move one byte data 2 1
MOVW 44 Move two bytes data Neither F0-255 nor G0-255 is 2 1
specified 120 38
F0-255 or G0-255 is specified
MOVN 45 Move any byte data More than30 More than13
COM 9 Common line control 2 1
COME 29 End of common line control 2 1
JMP 10 Jump 28 10
JMPE 30 End of jump 0 0
JMPB 68 Jump to label 28 7
JMPC 73 Jump to label () 22 15
LBL 69 Label for JUMPB or JMPC 7 5
PARI 11 Check parity 23 19
DCNV 14 Data Conversion Binary→BCD 60 16
BCD→Binary 33 20
DCNVB 31 Extended data conversion Binary→BCD 143 23
BCD→Binary 43 25
COMP 15 Compare 30 22
COMPB 32 Binary compare 32 10
COIN 16 Check consistency 27 13
SFT 33 Bit shift 24 14
DSCH 17 Data search More than 58 More than 23
DSCHB 34 Binary data search More than 40 More than 17
XMOV 18 Indexed data search 42 22
XMOVB 35 Indexed binary data search 40 18
ADD 19 BCD addition 35 20
ADDB 36 Binary addition 37 15
SUB 20 BCD subtraction 36 21
SUBB 37 Binary subtraction 38 15
MUL 21 BCD multiplication 60 21
MULB 38 Binary multiplication 38 15
DIV 22 BCD division 74 22
DIVB 39 Binary division 40 17
NUME 23 Constant definition 21 8
-4-
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

SUB Processing time (μSEC)


Command Function
number R-J3/R-J3iB R-30iA
NUMEB 40 Binary constant definition 28 9
DIFU 57 Rising edge detection 30 12
DIFD 58 Falling edge detection 30 13
EOR 59 Exclusive OR 35 15
AND 60 AND 36 15
OR 61 OR 35 15
NOT 62 NOT 29 14
END 64 End of all programs 0 0
CALL 65 Call sub program with condition 25 42
CALLU 66 Call sub program without condition 25 44
SP 71 Sub program 0 0
SPE 72 End of sub program 15 15

Refer to Chapter 6 "Function command reference" for details of every function command.
The "Processing time" in the above list is used in Section 2.4, "Processing Time of PMC Execution".

Unavailable PMC addresses for function commands

NOTE
X area and Y area of the PMC address cannot be specified in function commands.
Use basic commands to access these PMC addresses.

NOTE
No function commands except MOVW(SUB44) can use PMC addresses F0-255
and G0-255. Use MOVW(SUB44) to access these PMC addresses.
If you specify F0-255 or G0-255 in MOVW (SUB44), you must specify even
addresses. If you specify an odd address of this area, the PMC program will
cause an error in the robot controller.

Unavailable function commands in Robot controller


The following function commands can be programmed by Robot controller, but they cannot be used in an
Robot control System. If a PMC program contains these commands, it will cause an error.

Command SUB Number


END3 48
DISP 49
DISPB 41
EXIN 42
PSGNL 50
PSGN2 63
AXCTL 53
WINDR 51
WINDW 52
FNC9X 9X
MMC3R 88
MMC3W 89
MMCWR 98
MMCWW 99

-5-
1. INTEGRATED PMC OVERVIEW B-82614EN/02

1.5 PMC ADDRESSES


In the Integrated PMC, PMC addresses are used to specify signals instead of the robot controller I/O port
name (DI, DO, and so forth). Every I/O port corresponds to a PMC address. PMC addresses are specified
by the following format:

Format of PMC addresses

The first character of a PMC address must have an alphabetic character which indicates the type of the PMC
address.
If "." and bit number are omitted, it indicates a Byte address.

Range of PMC address


The following is a list of PMC address types and the address range of each address type:

Type Description Range


X X0-127 Corresponds to DI[1-1024] X0-X127
X1000-1004 Corresponds to UI[1-40] X1000-X1039
X1005-1009 Corresponds to WI[1-40]
X1010-1014 Corresponds to WSTKI[1-40]
X1015-1019 Corresponds to LDI[1-40]
X1020-1024 Corresponds to RI[1-40]
X1025-1026 Corresponds to SI[0-15]
Y Y0-127 Corresponds to DO[1-1024] Y0-Y127
Y1000-1004 Corresponds to UO[1-40] Y1000-Y1039
Y1005-1009 Corresponds to WO[1-40]
Y1010-1014 Corresponds to WSTKO[1-40]
Y1015-1019 Corresponds to LDO[1-40]
Y1020-1024 Corresponds to RO[1-40]
Y1025-1026 Corresponds to SO[0-15]
F F0-127 Corresponds to GI[1-64] F0-F255
F128-255 Corresponds to AI[1-64] F1000-F1255
F1000-1255 System interface input
G G0-127 Corresponds to GO[1-64] G0-G255
G128-255 Corresponds to AO[1-64] G1000-G1255
G1000-1255 System interface output
R General internal relay R0-R1499
R9000-R9117
C Counter C0-C79
K Keep relay K0-K19
T Variable timer T0-T79
D Data Table D0-D2999
L Label number L1-L9999
P Sub-program number P1-P512

-6-
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

1.5.1 Symbols and Comments


You can define a symbol and comment for every PMC address.
Symbols and comments are editted with PMC programmer. Defined symbols and comments are displayed
with the online monitor of PMC programmer and PMC menus on the teach pendant.
When a symbol is defined, you can use the symbol instead of a PMC address when you edit the ladder.
You cannot edit symbols and comments with the teach pendant.

Bit address and Byte address


Symbols and comments are assigned to Bit addresses and Byte addresses separately.
For example, the symbol and the comment of X0.0 are different from X0.

Lost symbol and comment in R-J3


Part of symbols and comments are lost when a PMC program is loaded on to a robot controller.
LADDER.PMC does not contain the lost symbols and comments.
• Symbols and coil comments are kept, but relay (contacts and coils) comments and net (rung)
comments are lost.
• If the length of a symbol is more than 6 characters, the symbol is lost. In "Symbol & comment edit"
menu of PMC programmer, "*" is displayed on the next of the address where the symbol is not lost.
• Japanese characters are replaced with a space.

Storing PMC files


All LDA program files for the FANUC LADDER-III for Robot and All PMC program files for FAPT
LADDER-II for Robot should be kept in the source program directory. Some symbols and comments will
be lost if only LADDER.PMC is kept.
Refer to Section 1.7 "SAVE/LOAD PMC PROGRAM AND PMC PARAMETERS" for more information
about LADDER.PMC.

1.5.2 External I/O Device


The Integrated PMC does not need any special I/O devices. All I/O devices that the Robot controller can use
can be accessed by the Integrated PMC.
The Robot controller I/O ports (DI, DO, and so forth) correspond to PMC addresses.
The correspondence is always the same. For example, PMC address X0.0 is always DI[1].
Refer to Chapter 8 "PMC Address Correspondence" for details.
You can see the corresponding I/O ports in the bit menu of the PMC menus. It is displayed in the "Port
name" column of the PMC address.

Symbol of standard PMC program


The Standard PMC program has a symbol definition that is similar to the robot controller port names. If you
use the standard PMC program as a template for your PMC program, you can use this symbol definition.
Refer to Section 1.6 "STANDARD PMC PROGRAM" about standard PMC program.

Correspondence of PMC address to the robot controller I/O port


The correspondence of the PMC address to the robot controller port name and symbol of standard PMC
program is as follows:

-7-
1. INTEGRATED PMC OVERVIEW B-82614EN/02

Input (Read only) Output (Read / Write)


Controller Controller
Address Symbol Address Symbol
I/O port I/O port
X0.0 DI[1] DI1 Y0.0 DO[1] DO1
: : : : : :
X127.7 DI[1024] DI1024 Y127.7 DO[1024] DO1024
X1000.0 UI[1] UI1 Y1000.0 UO[1] UO1
: : : : : :
X1004.7 UI[40] UI40 Y1004.7 UO[40] UO40
X1005.0 WI[1] WI1 Y1005.0 WO[1] WO1
: : : : : :
X1009.7 WI[40] WI40 Y1009.7 WO[40] WO40
X1010.0 WSTKI[1] WSTI1 Y1010.0 WSTKO[1] WSTO1
: : : : : :
X1014.7 WSTKI[40] WSTI40 Y1014.7 WSTKO[40] WSTO40
X1015.0 LDI[1] LDI1 Y1015.0 LDO[1] LDO1
: : : : : :
X1019.7 LDI[40] LDI40 Y1019.7 LDO[40] LDO40
X1020.0 RI[1] RI1 Y1020.0 RO[1] RO1
: : : : : :
X1024.7 RI[40] RI40 Y1024.7 RO[40] RO40
X1025.0 SI[0] SI0 Y1025.0 SO[0] SO0
: : : : : :
X1026.7 SI[15] SI15 Y1026.7 SO[15] SO15
F0 GI[1] GI1 G0 GO[1] GO1
: : : : : :
F126 GI[64] GI64 G126 GO[64] GO64
F128 AI[1] AI1 G128 AO[1] AO1
: : : : : :
F254 AI[64] AI64 G254 AO[64] AO64
Conflict of output
CAUTION
Do not output to the same I/O port from both a PMC program and a robot
program. Otherwise, the value output by the robot program will be superseded by
the value output by the PMC program.

I/O assignment
NOTE
The assignment of I/O port names (DI, DO, and so forth) to I/O devices is set in
the I/O assignment menu on the teach pendant. This assignment also affects the
Integrated PMC. The "I/O module editting" menu of PMC programmer is not used
for the robot controller Integrated PMC.

Restriction for basic command and function command


NOTE
PMC addresses F0-255 and G0-255 can not be used with any basic commands
or any function commands except MOVW (SUB44). To access this area, use
MOVW (SUB44).
If you specify F0-255 or G0-255 in MOVW (SUB44), you must specify even
addresses. If you specify an odd address of this area, the PMC program will
cause an error in the robot controller.

-8-
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

NOTE
The X area and Y area can not be used with any function commands. To access
this area, use a basic command.

1.5.3 Internal Relay


The Integrated PMC has signals that are not connected to any external I/O device.
These are called internal relays. A PMC program can read and write to these internal relays.

Types of internal relays


There are the following types of internal relay.

Address Description
R General internal relay.
This relay can be specified in basic commands and function commands.
Value becomes 0 when power is cycled. Setting of power failure recovery does not affect this
area.
K Keep relay
This relay can be specified in basic commands and function commands.
K17-19 are used for PMC setting parameters
The value is kept even if the power is cycled. Setting of power failure recovery does not affect
this area.
D Data table
This area can be accessed as various data types that are defined in the Data Table Control
Data.
It can be specified in basic commands and function commands.
The value is kept even if the power is cycled. Setting power failure recovery does not affect
this area.
T Timer
This area is used for the timer value of TMR (SUB3).
You can read and set timer values in Timer menu.
The value is kept even if the power is cycled. Setting power failure recovery does not affect
this area.
C Counter
This area is used for preset data and current data in the function command CTR (SUB5).
You can read and set counter values in Counter menu.
The value is kept even if the power is cycled. Setting of power failure recovery does not affect
this area.
F1000-1255 System interface input
The PMC program can read the status of the robot controller from this area.
The PMC program can not set the area.
G1000-1255 System interface output
The PMC program can control the robot system with this area.
The value becomes initial value when power is cycled. Setting of power failure recovery does
not affect this area.

K, D, T and C areas are called nonvolatile memory. The value of these areas are kept even if the power is
cycled.

-9-
1. INTEGRATED PMC OVERVIEW B-82614EN/02

1.5.4 Nonvolatile Memory


Nonvolatile memory is considered nonvolatile if its contents are not erased when the power is turned off.
(1) Used for the timer
Time can be set and displayed from the PMC menu. The set time can be read or written by a sequence
program instruction.
(2) Used for the counter
This area is used to store the preset and cumulative values of the counter. Values can be set and
displayed from the PMC menu. These values can be read and written by a sequence program
instruction.
The data format is two bytes of BCD or binary, and the higher-order digits are entered at the smaller
address.
Whether counter is processed by BCD format or binary format is selected by a system parameter.
Example)PMC counter addresses are C0 and C1 and the set value is 1578.

To change low-order digits of the set value by a sequence program instruction with 1 byte processing,
specify C0 as the output address of the functional instruction parameters to enter new data.
(3) Keep relay
This memory is used as parameters, keep relays, etc. for sequence control. Setting and display are
possible from the PMC menu and sequence program instructions can be used for reading and writing.
(4) Data table
A sizable amount of numeric data (data table) can be used for sequence control by the PMC. See
section 1.5.5 for details.

- 10 -
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

Reading and writing of nonvolatile memory data


All the nonvolatile memory data can be read and written by the sequence program. The memory read and
written by the PMC sequence program is actually not a nonvolatile memory, but a nonvolatile memory
image (RAM) storing the same data as the nonvolatile memory. When the power supply is turned off, the
data in the nonvolatile memory image disappears. Immediately after the power is turned on, the nonvolatile
memory data is automatically transferred to the nonvolatile memory image. Before the power is turned off,
the data is correctly restored.
The nonvolatile memory data is automatically transferred to the nonvolatile memory when the controller is
turned off.
Rewriting of nonvolatile memory can also be done by rewriting optional addresses of the nonvolatile
memory image in an optional timing. The changed data will be automatically transferred to the nonvolatile
memory.
Therefore, there is not special processing necessary when the sequence program writes or reads nonvolatile
memory.

1.5.5 Data Table


(1) Introduction
PMC sequence control sometimes requires a sizable amount of numeric data (herein after referred to as
data table). If contents of such data table are free to set or to read, they can be used as various PMC
sequence control data.
Each table size can be set optionally in the memory for data table, and 1-, 2-, or 4-byte binary or BCD
format data can be used per each table, thus consigning a simple-to-use table.
Data in the data table can be set in the nonvolatile memory or displayed via the PMC menu.
Data set in the data table can also be easily read or written by the sequence program using function
instructions as data search (DSCHB), or index modification data transfer (XMOVB).
(2) Configuration of the PMC data table and notes on programming
(a) Configuration of the data table
PMC data table consists of table control data and data table. Table control data control the size
and data format (BCD or binary) of the tables.
This table control data must first be set from PMC menu before preparing data table. In the
sequence program, the table control data cannot be read or written. When the contents of the
nonvolatile memory are read or written to PARAM.PMC file, the table control data is read or
written together. Fig. 1.5.5 is a detailed configuration of the data table.
(b) Data table head address
If the data table starts from an odd address, for example, when a data table is created with an odd
number of one-byte data, the DSCHB instruction operates slower than when the data table starts
from an even address. It is recommended that the starting address of a data table be an even
number.

- 11 -
1. INTEGRATED PMC OVERVIEW B-82614EN/02

Fig.1.5.5 Detailed configuration of data table

(3) Table control data


The table control data controls a data table
If the table control data is not properly set, a data table described in Item (4) cannot be properly
created.
Referring to the description in Item (3), set the table control data, then create a data table.
Parameter of Data Table Control Data
Parameter Description
Top address The top address of this Data Table group.
Only D area address can be specified.
Number of elements The number of elements of this Data Table group
Accessing type Byte : Size of an element is 1 byte.
Word : Size of an element is 2 bytes.
Dword : Size of an element is 4 bytes.
Data type Dec : Decimal
Hex : Hexadecimal
BCD : BCD
Protection Off : The Data Table value can be changed
On : The Data Table value can not be changed

(4) Data table


Data table can be created within the range of the memory (D address) for the data table and separated
some groups. This number of groups is decided with the number of tables of table control data.
The maximum of the number of table groups is 100.

- 12 -
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

Each data table can be used in 1, 2 or 4 byte data. Table parameter of table control data decides
whether to use 1 or 2 byte data. Therefore, 1 table number is taken for a 1-byte data when table data is
1 byte; 2 byte data when table data is 2 bytes.
(5) Entering data in a data table
Specify a location number in the data table from the PMC menu, then enter the data. A number for
each location in the table is defined for each data table group.

NOTE
Reading and Writing of the data table is available from the sequence program.

(6) Default setting of Table Control Data.

The following Data table group is set by default.

Top address Number of data Accessing type Data type Protection


D0 1500 Word Dec Off

This Data Table group shows GO[10001-11500] that corresponds to D0-3000 as one Data Table element.

- 13 -
1. INTEGRATED PMC OVERVIEW B-82614EN/02

Uses of Data Table Control Data


Some function commands, for example DSCH (SUB17), use the Data Table as a table for setting data. If
the Data Table Control Data is set to the same data type used in these function commands, the Data Table
value can be easily set in the Data Table menu.

The setting of Data Table Control Data does not affect PMC execution.

1.5.6 Interface between PMC Program and Robot Program

Internal relays should be used to communicate between the PMC program and a Robot program.

Correspondence of R, K area to DO
The R area and K area correspond to DO[10001-] as follows. This correspondence is always the same.

Address Corresponded DO Address Corresponded DO


K0.0 DO[10001] R0.0 DO[11001]
K0.1 DO[10002] R0.1 DO[11002]
: : : :
K19.6 DO[10159] R1499.6 DO[22999]
K19.7 DO[10160] R1499.7 DO[23000]

For example, a robot program can read R0.0 as DO[11001]. If a robot program outputs to DO[11001], the
value is set to R0.0.

- 14 -
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

Correspondence of D area to GO
The PMC program and Robot program can exchange integer data. The D area corresponds to GO[10001-]
as follows. This correspondence is always the same

Lower byte Upper byte Corresponded GO


D0 D1 GO[1]
D2 D3 GO[2]
: : :
D2996 D2997 GO[1499]
D2998 D2999 GO[1500]

For example, a robot program can access D0 and D1 as GO[10001]. The data type of GO is 16 bits of an
unsigned integer. D0 is the lower byte of GO[10001] and D1 is the upper byte of GO[10001]. If a robot
program sets data to GO[11001], the value is set to D0 and D1.

How to see the correspondence


In the bit menu of PMC menus, the corresponding I/O port name is displayed in the "Port name" column of
the PMC address.

Conflict of output

CAUTION
Do not output to the same internal relay from both a PMC program and a robot
program. Otherwise, the value output by the robot program will be superseded by
the value output by the PMC program.

1.5.7 System Control by PMC Program (System Interface)

F1000-1255 and G1000-1255 are called the system interface. The PMC program can control the robot
system with the system interface. For example, the PMC program can execute a robot program.
Every address of the system interface has a specific function.

Function of F1000-F1255
The PMC program can read the status of the robot system from F1000-F1255
Outputs of the System Interface:

Address Name Function


F1000.0 CMDENB Same as CMDENBL in UOP
F1000.1 SYSRDY Same as SYSRDY in UOP
F1000.2 PRGRUN Same as PROGRUN in UOP
F1000.3 PAUSED Same as PAUSED in UOP
F1000.4 HELD Same as HELD in UOP
F1000.5 FAULT Same as FAULT in UOP
F1000.6 ATPRCH Same as ATPERCH in UOP
F1000.7 TPENBL Same as TPENBL in UOP
F1001.0 BATALM Same as BATALM in UOP
F1001.1 BUSY Same as BUSY in UOP
F1001.2 SNO1 Same as ACK1/SNO1 in UOP
F1001.3 SNO2 Same as ACK2/SNO2 in UOP
F1001.4 SNO3 Same as ACK3/SNO3 in UOP
F1001.5 SNO4 Same as ACK4/SNO4 in UOP
F1001.6 SNO5 Same as SNO5 in UOP
- 15 -
1. INTEGRATED PMC OVERVIEW B-82614EN/02

Address Name Function


F1001.7 SNO6 Same as SNO6 in UOP
F1002.0 SNO7 Same as SNO7 in UOP
F1002.1 SNO8 Same as SNO8 in UOP
F1002.2 SNACK Same as SNACK in UOP
F1002.3- Reserved
F1007.7
F1008.0 STEP This become 1 in single step mode
F1008.1 SYSRST When reset occurs, this becomes 1 during only one
scan.
Note: This also becomes 1 at the next scan
after G1000.4(RESET) turns on. If the PMC
program connects F1008.1(SYSRESET) to
G1000.4(RESET), a reset occurs forever.
F1008.2 TPESTP When the teach pendant E-STOP button is
pressed, this becomes 1.
This shows the teach pendant E-STOP button
status only. Timing is different from FAULT
(F1000.5).
F1008.3 DEADMN When the DEADMAN switch is pressed, this
becomes 1.
This shows the DEADMAN switch status only.
Timing is different from FAULT (F1000.5).
F1008.4 NO_UOP When UI is not assigned to any I/O device or I/O
device that is assigned to UI does not work, this
becomes 1.
F1008.5 UOPDSB When "Enable UI signals" in system configuration
menu is FALSE, this becomes 1.
F1008.6- Reserved
F1255.7

Function of G1000-G1255
The PMC program can control the robot system with G1000-G1255
Input to the System Interface:
Initial
Address Name Function
value
G1000.0 IMSTP 1 Same as IMSTP in UOP
G1000.1 HOLD 1 Same as HOLD in UOP
G1000.2 SFSPD 0 Same as SFSPD in UOP
G1000.3 CSTOPI 0 Same as CSTOPI in UOP
G1000.4 RESET 0 Same as RESET in UOP
G1000.5 START 0 Same as START in UOP
G1000.6 HOME 0 Same as HOME in UOP
G1000.7 ENBLE 0 Same as ENBLE in UOP
G1001.0 PNS1 1 Same as RSR1/PNS1 in UOP
G1001.1 PNS2 1 Same as RSR2/PNS2 in UOP
G1001.2 PNS3 1 Same as RSR3/PNS3 in UOP
G1001.3 PNS4 1 Same as RSR4/PNS4 in UOP
G1001.4 PNS5 1 Same as PNS5 in UOP
G1001.5 PNS6 1 Same as PNS6 in UOP
G1001.6 PNS7 1 Same as PNS7 in UOP
G1001.7 PNS8 1 Same as PNS8 in UOP
G1002.0 PNSTRB 0 Same as PNSTROBE in UOP
G1002.1 PSTART 0 Same as PRODSTART in UOP
G1002.2- 0 Reserved
G1007.7

- 16 -
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

Initial
Address Name Function
value
G1008.0- UALM1- 0 When a value of this area is 1, a
G1011.7 UALM32 corresponding user alarm occurs. For
example, user alarm 1 occurs when
G1008.0(UALM1) is 1.
If a reset occurs when this area is 1, the
user alarm occurs again, and the alarm
cannot be cleared.
G1012.0- 0 Reserved
G1255.7

The values of G1000-G1255 are always set to the initial value when the controller is turned on. Setting
power failure recovery does not affect the initial value. Signals that are not output by the PMC program will
always remain at the initial value. Specifically, all of PNS1-8 must be output in order to use PNS, or the
correct PNS number cannot be set.

Symbol of standard PMC program


In the Standard PMC program, the system interface name is defined as the symbol of the corresponding
PMC address. If the Standard PMC program is used as a template for a new PMC program, the system
interface symbols can be used directly in the program.

UOP and system interface


In a robot system that contains the Integrated PMC function, the User Operator Panel (UOP) does not work.
UI and UO are general I/O ports the same as DI/DO. The UOP function is moved to the system interface.

Ladder of PMC program


The standard PMC program has the following ladder. This ladder provides the normal connection between
the UOP and DI/DO, because the system interface signals are connected to the corresponding UI and UO by
this ladder program.

- 17 -
1. INTEGRATED PMC OVERVIEW B-82614EN/02

If UI and UO are normally used for UOP, this ladder program can be used as is.
The UOP function can be easily customized by modifying this ladder program. For example, UI[6]
(START) can be changed to detect the rising edge; the original UI [6] detects the falling edge.

- 18 -
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

1.5.8 PMC Setting Parameters (K17-K19)


K17-K19 of the keep relays are the PMC setting parameters. Every address of the PMC setting parameters
has a special function. The Integrated PMC function is controlled by the PMC setting parameters. The
value is retained when the controller is turned off, because the PMC setting parameters are part of the keep
relay.

DTBLDSP (Default: 0)
0: The Data Table Control Data can be changed in the Data Table Control Data menu.
The Data Table Control Data menu on the PMC programmer can be displayed.
1: The Data Table Control Data cannot be changed in the Data Table Control Data menu.
The Data Table Control Data menu on the PMC programmer cannot be displayed.
MEMINP (Default: 1)
0: The value in Byte menu and Bit menu in the PMC menus cannot be changed.
The value in "Signal status" on the PMC programmer cannot be changed.
1: The value in Byte menu and Bit menu in the PMC menus can be changed.
You can change The value in "Signal status" on the PMC programmer can be changed.
SELECTMDL (Default: 0)
0: The PMC program saved in FROM is loaded to RAM at power up.
1: The Standard PMC program is loaded to RAM at power up.
(This setting is changed to 0 automatically by "Backup program" on the PMC programmer or by
loading LADDER.PMC in file menu.)
AUTORUN (Default: 0)
0: PMC runs at power up automatically.
1: PMC does not run at power up automatically.
PROGRAM (Default: 1)
0: PMC programmer is not available. ("Load program", "Store program", "Backup program" and
"Run/Stop the program" are not available in PMC programmer.)
1: PMC programmer is available.
LADMASK (Default: 0)
0: Ladder monitor in PMC programmer can be displayed.
1: Ladder monitor in PMC programmer cannot be displayed.

NOTE
The area K18-19 is not used and should be left at 0.

1.5.9 PMC System Area (R9000-R9117)


R9000-R9117 of the internal relays are the PMC system area.
Every address of the PMC system area has a special function. For example, a PMC program can read
information from this area such as the result of an operation.
The PMC program cannot set the PMC system area.
1. R9000 has the result of the function command ADDB, SUBB, MULB, DIVB and COMPB.

- 19 -
1. INTEGRATED PMC OVERVIEW B-82614EN/02

2. R9002-R9005 has the remainder of function command DIVB.


3. R9091 has the following system timer.

1.5.10 Internal Relay Assignment


The R, K and D areas of the Internal relays can be accessed directly as DO[10001-] and GO[10001-].
However, in some cases only DI can be used (for example in the Override Select function). In other cases
the allowed index is less than 5 digits. In these cases, the PMC can communicate with the function by
reassigning the internal relay to a DI or DO.

Correspondence of internal relay to assignment


Internal relays correspond to rack, slot, and port number as follows. You can assign internal relays to DI/O,
GI/O and UI/O.
Internal relay Rack Slot Port number
K0.0 - K19.7 33 1 1 - 160
R0.0 - R1499.7 33 2 1 - 12000
D0.0 - D2999.7 33 3 1 - 24000
T0.0 - T79.7 33 4 1 - 640
C0.0 - C79.7 33 5 1 - 640
F1000.0 - F1003.7 33 6 1 - 32
G1000.0 - G1003.7 33 7 1 - 32

Internal relay assignment


If internal relays are assigned to I/O ports, the PMC program can access the internal relay with the
corresponding PMC address of the assigned I/O port.
For example, when R0.0 is assigned to DI[1], the PMC can access R0.0 as X0.0.
In this case, both DO[11001] and DI[1] correspond to R0.0
As shown in this example, the correspondence becomes complex when internal relays are assigned to I/O
ports.
For this reason, the assignment of internal relays to I/O ports is not recommended. Use DO[10001-] and
GO[10001-] to access internal relays with the robot controller functions wherever possible.

Simulation of assigned internal relay


In the above example, there is the difference between accessing R0.0 and accessing X0.0 from the PMC
program when DI[1] is simulated.
• When DI[1] is not simulated, R0.0 and X0.0 are the same.
• When DI[1] is simulated:
X0.0 corresponds to the simulated DI[1],
R0.0 always accesses the internal value of relay R0.0.
Because of this, if the PMC accesses R0.0 and the robot program accesses DI[1], you can set any value to
DI[1] when DI[1] is simulated. This allows you to ignore the output of the PMC program while testing for
the robot program.

- 20 -
B-82614EN/02 1. INTEGRATED PMC OVERVIEW

Simulation of DO[10001-], GO[10001-]


DO[10001-] and GO[10001-] can not be simulated.

1.6 STANDARD PMC PROGRAM


The Standard PMC program is the PMC program that is loaded in the robot controller by default.

Contents of Standard PMC program


The Standard PMC program has the following contents.
• The corresponding I/O port names and system interface names are defined as symbols of PMC
addresses. (Refer to Section 1.5.2, "External I/O Device" and Section 1.5.7, "System Control by PMC
Program (System Interface).
• The ladder program that uses UI and UO as normal UOP signals is written in the Level 1 program.
(Refer to Section 1.5.7 "System Control by PMC Program (System Interface).

Uses of Standard PMC program


PMC programs can easily be created by using the Standard PMC program as a template.
• The PMC program can use defined symbols that are similar to the robot controller I/O port names and
system interface names.
• If UI and UO are used as normal UOP signals, the Standard PMC program can be used as it is.
The UOP function is easy to modify the ladder program in the Standard PMC program.

Using the Standard PMC program as a template for a new PMC program
To use the Standard PMC program as a template for a new PMC program, do the following.
1. Save STDLDR.PMC to floppy disk or memory card using the PMC menus on the teach pendant.
Refer to Section 3.1.12, "Save STDLDR.PMC", for information on saving STDLDR.PMC.
2. Copy STDLDR.PMC to the hard disk of the PC where PMC programmer is installed. (STDLDR.PMC
can be used directly from the floppy disk, but it is better to copy it to hard disk because it might be used
frequently.)
3. Load STDLDR.PMC to PMC programmer just after creating new PMC program. Then decompile it.
Refer to Section 2.3, "Load Standard PMC program" for information on loading the Standard PMC
program.
After this operation, the Standard PMC program can be used.

1.7 SAVE/LOAD PMC PROGRAM AND PMC PARAMETERS


The PMC program and PMC parameters in the robot controller can be saved as files to an external file
device. PMC parameter is the generic name of internal relays and Data Table Control Data that are retained
when the controller is turned off.

The PMC program and PMC parameters can be recovered by loading the saved files.
The PMC program and PMC parameters can be copied by loading the files that are saved from another
robot.

FIle names and contents


File names and contents of the files.

- 21 -
1. INTEGRATED PMC OVERVIEW B-82614EN/02

File name Contents Condition to load


LADDER.PMC Title data Title of the program In Controlled start
Ladder Level 1, Level 2 and sub programs menu, or E-STOP on
Symbols The symbols that have more than 6 Teach Pendant or
characters are eliminated. Operator Panel is
Japanese characters are replaced pressed.
with spaces.
Coil comments Relay comments and net
comments are not saved.
Japanese characters are replaced
with spaces.
PARAM.PMC Value of internal relays that are retained at power off In Controlled start
K(Keep relay) menu or PMC is
D(Data Table) stopped.
T(Variable Timer)
C(Counter)
Data Table Control Data

Operation to save files


These files can be saved with the PMC menus or File menu on the teach pendant.
Refer to Section 5.2, "File Menu Operations" for information on saving files from the File menu.
Refer to Section 5.1.13, "Saving LADDER.PMC and PARAM.PMC" for information on saving files from
the PMC menus.

Operation to load file


These files can be loaded with the File menu on Teach Pendant. The "Condition to load" in the above list
must be satisfied to load the files.
Refer to Section 5.2, "File Menu Operations" for information on loading files from the File menu.

- 22 -
B-82614EN/02 2. SEQUENCE PROGRAM

2 SEQUENCE PROGRAM
The PMC sequence control is handled by the software and operates on principles different from a general
relay circuit. Therefore, the sequence control method must be fully understood in order to design the PMC
sequence.

2.1 EXECUTION PROCEDURE OF SEQUENCE PROGRAM


In a general relay sequence circuit, each relay operates at approximately the same time. In the figure below
for example, when relay A operates, 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 and
can be written as a ladder diagram. (programmed sequence shown below)

Fig.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 the PMC program.

Fig.2.1 (b) Circuit examples

(1) Relay circuit


Operations are the same in both Fig. 2.1 (b) (A) and (B). Turning on A push button (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.
- 23 -
2. SEQUENCE PROGRAM B-82614EN/02

2.2 REPETITIVE OPERATION


The ladder program is executed from the beginning to the end in the sequence written. When the ladder
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 program is called the sequence processing
time, which varies according to the control scale (the number of steps) and the size of the Level 1 sequence.
The shorter the process time is, the better the signal response becomes.

2.3 LEVEL 1 AND LEVEL 2


The Integrated PMC can execute two programs, Level 1 and Level 2, in parallel.

Mechanism of parallel execution


Level 1 and Level 2 are executed by the following mechanism:
(1) Level 1 is executed from the beginning every scan.
(2) When Level 1 is completed, Level 2 starts.
(3) When the total processing time of Level 1 and Level 2 exceeds the allowed processing time, Level 2
execution is paused and the robot controller processes other system operations (except PMC) until the
next scan is started.
(4) The paused Level 2 execution is continued when the execution of Level 1 of the next scan is
completed.
(5) When all of Level 2 has been executed, it will execute again from the beginning in the next scan after
Level 1 has completed.

How to choose Level 1 or Level 2


Use the following guidelines to determine when to program in Level 1 or level 2:
• Programs should typically be written in Level 2. Special PMC programs that need very quick response
should be written in Level 1.
• Level 1 programs cannot call a Sub program.
• If many function commands are required, they should be written in Level 2 because the processing
time of a function command varies with the ACT condition. The scan time of a Level 2 program is
tuned automatically according to the processing time.

Level 1 processing time is too long


If the processing time of a Level 1 program is too long to be completed in one scan, Level 1 program
execution will also be divided like Level 2. Level 1 programs can work correctly except the scan time of
Level 1 is not 8msec.
When level 1 programs are divided, they will work correctly, but the scan time will be longer than 8msec.

- 24 -
B-82614EN/02 2. SEQUENCE PROGRAM

2.4 PMC EXECUTION PROCESSING TIME


Processing time calculation
Processing time can be calculated by the following expression.
R-J3/R-J3iB
(Number of steps 0.085) + Total of processing time of
function commands (μsec)

R-30iA
(Number of steps 0.025) + Total of processing time of
function commands (μsec)

The processing time of every function command is specified in Section 1.4, "Function Commands".

How to shorten processing time


Function commands take approximately 350 more times to process than basic commands. To shorten
processing time, decrease the number of function commands.

Processing time of Level 1


The robot system processing requires 4msec every scan time (8msec). The PMC uses the remaining 4msec
(4000μsec) to execute all of Level 1 and Level 2.

If a Level 1 program takes more than 4000μsec, Level 1 program execution will
not be completed in one scan. Level 1 programs must not take more than 4000μsec.

Even if Level 1 takes less than 4000μsec, the processing time of a Level 2 program in one scan is reduced by
the processing time of Level 1. Level 1 should be kept as short as possible to allow time for a Level 2
program to run.

Scan time of Level 2


The number of divisions of a Level 2 program is calculated by the following expression.

Processing time of Level 2 (μs)/ (4000 - Processing


time of Level 1 (μs))

The scan time of Level 2 is 8 ms times the number of divisions of a Level 2 program.

2.5 UPDATE TIMING OF SIGNALS


Address value may be inconsistent
The value of external I/O devices (X and F areas) is updated asynchronously with PMC execution. The
value read at the beginning of the ladder program and the value read at the end of the ladder program might
be different. If a ladder program reads the same address in multiple locations, an internal relay should be
used to store the value of the external device.

- 25 -
2. SEQUENCE PROGRAM B-82614EN/02

The same situation occurs when a robot program changes an internal relay and the PMC program reads the
same internal relay or when Level 1 changes an internal relay and Level 2 reads the same internal relay. In
these cases, if the internal relay is read at multiple locations of the ladder program, the value of the internal
relay should be copied to another internal relay and the copied internal relay should be read in the ladder
program from that point forward.

Conditions when the value is inconsistent


The following list shows the conditions when the address value might be inconsistent. If a ladder program
must read the area specified as inconsistent in the following list at multiple locations of the same ladder
program, the value of the area should be copied to another internal relay, and the copied internal relay
should be read in the ladder program from that point forward.

Read by Read by
Address
Level 1 Level 2
External device input (X, F) Inconsistent Inconsistent
External The area set by Level 1 Consistent Inconsistent
device output The area set by Level 2 Consistent * Consistent
(Y, G) The area set by Robot Inconsistent Inconsistent
program
Internal relay The area set by Level 1 Consistent Inconsistent
(R, K, D) The area set by Level 2 Consistent * Consistent
The area set by Robot Inconsistent Inconsistent
program

Areas that are changed by a process other than the current ladder program are inconsistent. One exception
is that Level 1 can read an area set by Level 2 consistently. It is not necessary to copy the area to another
internal relay. (Items marked "*" in the above list.)

2.6 INTERLOCKING
Interlocking is necessary in the sequence program and is externally important in sequence control safety.
However, make sure to interlock with the end of the electric circuit in the machine tool magnetics cabinet.
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.

- 26 -
B-82614EN/02 2. SEQUENCE PROGRAM

2.7 SEQUENCE PROGRAM STRUCTURING


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.

2.7.1 Examples of Structured Programming

2.7.1.1 Implementation Techniques


Three major structured programming capabilities are supported.
(1) Subprogramming
A subprogram can consist of a Ladder sequence as the processing units.

(2) Nesting
Ladder subprograms created in 1 above are combined to structure a Ladder sequence.

(3) Conditional branch


The main program loops and check whether conditions are satisfied. If a condition is satisfied, the
corresponding subprogram is executed. If the condition is not satisfied, the subprogram is skipped.

- 27 -
2. SEQUENCE PROGRAM B-82614EN/02

2.7.1.2 Applications
(1) Example
Suppose that there are four major jobs.

(2) Program structure

(3) Program description

- 28 -
B-82614EN/02 2. SEQUENCE PROGRAM

- 29 -
2. SEQUENCE PROGRAM B-82614EN/02

2.7.1.3 Specifications
(1) Main program
The main program is the Ladder program consisting of the Level 1 and Level 2 ladder programs. One,
but only one, main program can be created. A subprogram cannot be called from the Level 1 ladder
program. Any number of subprograms however, can be called from the Level 2 ladder program. The
functional instructions JMP and COM must be completed within each main program or subprogram.
(2) Subprogram
A subprogram is a program called by the Level 2 ladder program. It is a program unit starting with the
functional instruction SP and ending with the functional instruction SPE. Up to 512 subprograms can
be created for one PMC.
(3) Nesting
A subprogram can call another subprogram. The maximum nesting depth is eight levels. Recursive
calls are not allowed.

2.7.2 Subprogramming and Nesting

2.7.2.1 Function
Conditional JUMP (or unconditional JUMP) is coded in the main program, and the name of a subprogram to
be executed is specified. In the subprogram, the name of the subprogram and a Ladder sequence to be
executed are coded.
When a subprogram is named Pn (program name), and this name is specified in conditional JUMP, the
subprogram is executed by calling it.
A symbol and comment can be added to Pn to assign a subroutine name.
In the example shown in Fig. 2.7.2.1, the main program calls three subprograms. These calls are all
conditional calls. Subprogram P1 is named SUBPRO. It calls subprogram PROCS1 unconditionally.

- 30 -
B-82614EN/02 2. SEQUENCE PROGRAM

Fig.2.7.2.1 Example of subprogramming and nesting

2.7.2.2 Execution Method


The main program is always active. Subprograms on the other hand, are active only when called by another
program.
In the following example, subprogram SUBPRO is called by signal A.

- 31 -
2. SEQUENCE PROGRAM B-82614EN/02

Flow of execution
a : Functional instruction CALL calls a subprogram in order to transfer control to the subprogram.
b : When the end of the subprogram is reached, control is returned to the main program.
c : When the end of the main program is reached, the management program performs Ladder program
postprocessing.

2.7.2.3 Creating a Program


Create subprograms in the same way as the Level 1 and Level 2 Ladder programs.
Example of creation

- 32 -
B-82614EN/02 2. SEQUENCE PROGRAM

Inhibit items
(1) Subprograms are nested.

- 33 -
2. SEQUENCE PROGRAM B-82614EN/02

(2) A subprogram is created within the Level 1, or Level 2 Ladder program.

2.8 JMP INSTRUCTIONS WITH LABEL SPECIFICATION

2.8.1 Specifications
(1) Relationship between JMPB/JMPC and LBL
(Forward and backward jumps to the same label are possible.)

CAUTION
The specifications allow backward jumps. A backward jump, however, might
result in an infinite loop or cause the execution time of the Level 1 Ladder program
to exceed 4 ms. Create a program carefully so an infinite loop does not occur.

CAUTION
Do not skip TMR, TMRB and TMRC by JMP, JMPE, JMPB, JMPC, and LBL. If
TMR, TMRB or TMRC are skipped, they might not work correctly. Turn off the
controller, then turn it on again to recover from this problem.

- 34 -
B-82614EN/02 2. SEQUENCE PROGRAM
(2) Same label
(A label can be used more than once as long as it is unique within the main program or each
subprogram.)

NOTE
As mentioned in (8) of Section 2.8, the same label must not exist in the Level 1
and Level 2 Ladder programs.

(3) Number of labels


Level 1 and Level 2 Ladder programs : Up to 256 labels
Subprogram : Up to 256 labels for each subprogram
Label number : L1 to L9999
(4) Relationship between JMP/JMPE and JMPB/JMPC
(JMPB and JMPC can be used with JMP and JMPE freely.)

- 35 -
2. SEQUENCE PROGRAM B-82614EN/02

(5) Relationship between CALL/CALLU and JMPB/JMPC


(JMPB and JMPC can be used with CALL and CALLU freely.)

- 36 -
B-82614EN/02 2. SEQUENCE PROGRAM
(6) Position of JMPC
(JMPC coded between COM and COME can cause a jump.)

2.8.2 Restrictions
(1) Jump destination of JMPB (1)
(A jump over END1 or END2 is inhibited.)

- 37 -
2. SEQUENCE PROGRAM B-82614EN/02

(2) Jump destination of JMPB (2)


(A jump must be performed within a subprogram.)

(3) Jump destination of JMPB (3)


(A jump over COM or COME is inhibited.)

- 38 -
B-82614EN/02 2. SEQUENCE PROGRAM
(4) Jump destination of JMPC (1)
(A jump to the first-level Ladder program is inhibited.)

(5) Jump destination of JMPC (2)


(A jump to a label between COM and COME is inhibited.)

- 39 -
2. SEQUENCE PROGRAM B-82614EN/02

(6) Jump destination of JMPC (3)


(Control must not be returned to a label that appears earlier than the instruction that has called the
subprogram.)

CAUTION
Do not create a Ladder program using the jump function to create an infinite loop.

- 40 -
B-82614EN/02 2. SEQUENCE PROGRAM
(7) LBL for JMPB (1)
(There is no LBL in the same subprogram.)

(8) LBL for JMPB (2)


(The same LBL is found in the Level 1 and Level 2 Ladder programs.)

- 41 -
2. SEQUENCE PROGRAM B-82614EN/02

(9) LBL for JMPC


(There is no LBL in the Level 2 Ladder program.)

- 42 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

3 PROGRAMMING WITH FAPT LADDER-II


FAPT LADDER-II is a programming tool for FANUC PMC ladder programs, that works in MS-DOS.

This chapter explains all operations from creating a new PMC program to executing it on the robot
controller.

NOTE
Use "FAPT LADDER-II for Robot" to program the robot controller Integrated
PMC.

3.1 CONNECTION BETWEEN ROBOT CONTROLLER AND


FAPT LADDER-II
The Online monitor function and the PMC program transfer function are available by connecting the robot
controller and FAPT LADDER-II via RS-232-C.

RS-232-C cable
Use the following RS-232-C cross cable.

Specification of robot side connector.


Connector : D-Sub25pin Male DBM-25P (ANSI/EIA - 232)
Housing : DB-C2-J9 (ANSI/EIA - 232)
Shielded cable is recommended.
Connect the robot side of the cable to the RS-232-C port on the robot operator panel.

Setting of serial port


To use the online function of FAPT LADDER-II, set up the robot serial port as follows:
(1) Press MENU on the teach pendant, and select "6 SETUP" in the displayed menu.

- 43 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(2) Press [TYPE], and select Port init.

(3) Move the cursor to 1 RS-232-C, and press , DETAIL. The RS-232-C port detail screen will be
displayed.

(4) Move the cursor to 1 Device, and press , [CHOICE].

(5) Select "PMC Programmer" in the displayed menu.

- 44 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II
(6) Press ENTER.

3.2 CREATING A NEW PMC PROGRAM


FAPT LADDER-II creates a directory for each PMC program. All of the necessary files for the PMC
program are created in this directory. The directory name is "source program name."
Use the following procedure to create a new PMC program.
(1) Select "Program selection" in the initial FAPT LADDER-II menu.

(2) Type the source program name as "Drive:\Source program name." If an existing program (directory
name) is specified, the specified program will be selected. If a new program (directory name) is
specified, the specified program will be created.

- 45 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(3) Press , EXEC or press . The following menu will be displayed. Select PMC-SB5/RB5 and
press . The initial menu will be displayed.

NOTE
The PMC type must be "PMC-SB5/RB5." If another PMC type is selected, the
created PMC program cannot be used in the robot controller.

NOTE
If you are using "FAPT LADDER-II for Robot", only "PMC-SB5/RB5" will be
displayed in this list.

- 46 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

3.3 LOADING THE STANDARD PMC PROGRAM


You can create a program easily by using the standard PMC program as the template for your PMC
program.
The robot controller can save the standard PMC program as STDLDR.PMC
To use the standard PMC program as the template for your PMC program, load STDLDR.PMC using the
following procedure just after creating a new PMC program.
Refer to Section 1.6, "Standard PMC program" for details of the standard PMC program.

Procedure to load STDLDR.PMC

NOTE
Contents of the selected program will be lost by this operation. Only do this just
after creating a new PMC program.

(1) Create a new PMC program according to Section 3.2, "Creating a New PMC Program".
(2) Press , I/O in the Off-Line menu of FAPT LADDER-II. The I/O menu will be displayed.
(3) Press , Handy File in the I/O menu.

(4) Press , READ(PROGRAMMER <- Handy file) key.

- 47 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(5) Type the directory path of STDLDR.PMC in the "Handy File file name" item. This could be a
directory on the hard drive, floppy drive, etc.

(6) Press , EXEC. STDLDR.PMC will be loaded.


(7) Press END to display the "I/O (FDCAS)" menu.
(8) Press END to display the "I/O" menu.
(9) Press END to display the Off-Line menu.
(10) Press DECOMPILE to display the Decompile menu.

(11) Press , EXEC. The loaded PMC program is decompiled.

(12) When decompile is completed, the message "Decompile completed" is displayed. You can now edit
the loaded PMC program.

- 48 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

3.4 EDITTING A PMC PROGRAM


FAPT LADDER-II is used to edit the PMC program.

NOTE
The robot controller Integrated PMC does not support the On-Line edit function.
PMC programs must be edited with the Off-Line Function. However, the robot
controller Integrated PMC does support PMC program transfer during PMC
program execution.

Procedure to edit a PMC program


(1) Select the program to edit, and select "Off-Line Function" in the Initial menu of FAPT LADDER-II.
The Off-Line menu will be displayed.

(2) Press , EDIT. The Edit menu will be displayed.

- 49 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(3) Press , LADDER DIAGRAM. The Program list will be displayed.

(4) Select LEVEL1 or LEVEL2 using the arrow keys, and press . The Ladder diagram of the
selected level will be displayed.

(5) Edit the ladder program.


(6) When you are finished editing the ladder program, press . A pop-up menu will be displayed.
Press , SAVE. The Ladder program will be saved and the program list will be displayed.

Procedure to Copy and Paste Program Section (to another program)


You can use FAPT LADDER-II to copy a program section to another PMC program by using the following
procedure.
(1) Press F10, command in the ladder editor.
(2) Place the cursor on first line to be copied, and press , COPY and select the copy area.
(3) Press , UNTIL.
(4) Press , TO-FIL. The dialog box is displayed as follows.

- 50 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

(5) Press , and , EXEC. File LATMP.#LA is created.


(6) Exit ladder editor and select the destination program.
(7) In the ladder edit screen, press , COMMAND.
(8) Move the cursor to the insert position, and press file. The dialog box is displayed as follows.

(9) Press , and , TO. "LATMP.#LA" is inserted above the cursor position.

3.5 COMPILING A PMC PROGRAM


You must compile a PMC program to execute it on the robot controller.

Procedure to compile a PMC program


(1) In the Off-Line menu, press , COMPILE. The Compile menu will be displayed.

- 51 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(2) Press , CONDNS. The PMC program is compiled. When compiling is completed without error,
"Compile completed" will be displayed. If an error occurs, modify the PMC program and compile
again.

NOTE
, CONDNS compiles in condensed mode. , EXEC compiles in normal
mode. Both modes are the same for PMC program execution. Condensed mode
generates a smaller PMC program than normal mode, so transfer time of
condensed mode is shorter than normal mode.

3.6 TRANSFER PMC PROGRAM


After the PMC program is edited and compiled by the Off-Line function of FAPT LADDER-II, there are
two ways to send the PMC program to the robot controller.
One way is the On-Line Function of FAPT-LADDER-II, and the other is by the LADDER.PMC file. This
chapter explains the On-Line Function transfer of the PMC program. The way to save LADDER.PMC is
explained in Section 3.11.1, "Saving LADDER.PMC Using FAPT LADDER-II."

Procedure to transfer a PMC program


(1) Connect the robot controller robot controller and FAPT LADDER-II via an RS-232-C cable according
to Section 3.1, "Connection between robot controller and FAPT LADDER-II."
(2) Select "On-Line (selected program)" in the Initial menu of FAPT LADDER-II. When communication
starts, the following dialog box will be displayed.

(3) Select Store, Store to PMC program memory. The PMC program is transferred from FAPT
LADDER-II to robot controller.
- 52 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

NOTE
The PMC program is transferred into RAM memory using the above procedure.
When controller power is cycled, the original PMC program is loaded back into
RAM memory, thus overwriting the PMC program that was recently transferred.
To keep the new PMC program after power is cycled, the program must be
transferred to ROM memory. To write the PMC program to ROM, refer to Section
3.9, "Writing PMC ProgramS to ROM".

If a PMC program is running during this procedure, the PMC program continues to run during transfer. The
executing PMC program is switched to the new program when the transfer is complete. With this procedure,
you can send a PMC program without stopping execution.

NOTE
When a PMC program is transferred during execution, the value of internal relays,
internal variables, and so forth are not initialized. This might cause unexpected
output. For example, DIFU turns on when the PMC program is switched. Be
careful when making large changes to the PMC program.

When transferring a program, if an error occurs, the following dialog box will be displayed on FAPT
LADDER-II.

In this case PMC is still executing the previous PMC program.


An error message is also displayed on the robot controller teach pendant. The teach pendant displays the
last error message. To read all error messages, display the alarm history screen with the following
procedure.

Procedure to check errors caused by PMC programs


(1) Press MENUS on the teach pendant. Select 4, ALARM. The Active alarm screen will be displayed.

- 53 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(2) Press , HIST. The alarm history screen is displayed.

NOTE
The PMC program error is a `warning', and it is not displayed in the active alarm
screen. Please check the Alarm History screen to see this error displayed.

In the Alarm History screen, the errors are listed in the order they occurred. The last alarm is on the top line.
Refer to Chapter 9, "Integrated PMC Error Codes" for details of all PMC errors.
When an alarm occurs during program transfer, the new PMC program can not run. If a previous PMC
program is running during PMC program transfer, the previous PMC program continues to run. The new
PMC program cannot be written to ROM until it is correctly transferred.
If a PMC program has more than 10 errors, the 11th and higher alarms are not displayed in the alarm history
screen and "PRIO-140 can't display all PMC errors" is displayed. The first ten alarms must
be corrected in order to see the remaining alarms.

3.7 CHECK PMC PROGRAM (ON-LINE MONITOR)


When the PMC program transfer is complete, the ladder monitor screen is displayed on FAPT LADDER-II.
In the ladder monitor screen, rungs and elements that are energized are displayed with bold lines.

Procedure to display parameters of function commands


The Ladder monitor can display the parameter values of Function Commands with the following
procedure.
(1) Press , SETTINGS, setting window will be displayed.

- 54 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

(2) Press twice.


(3) Press to check "Function Parameter Display option".
(4) Press .

Data type of displayed parameters


The data types of the displayed parameters is shown in the following table.

Number of Data type of displayed parameters


SUB
Command displayed
number 1 2 3 4 5 6
parameters
1 END1 0
2 END2 0
3 TMR 2 Dec Dec
4 DEC 1 BCD
5 CTR 2 Dec Dec
6 ROT 3 BCD BCD BCD
7 COD 2 BCD BCD
8 MOVE 2 HEX HEX
9 COM 0
10 JMP 0
11 PARI 1 Dec
14 DCNV 0
15 COMP 2 BCD BCD
16 COIN 2 BCD BCD
17 DSCH 3 BCD BCD BCD
18 XMOV 3 BCD BCD BCD
19 ADD 3 BCD BCD BCD
20 SUB 3 BCD BCD BCD
21 MUL 3 BCD BCD BCD
22 DIV 3 BCD BCD BCD
23 NUME 1 BCD
24 TMRB 1 Dec
25 DECB 2 Dec BCD
26 ROTB 4 Dec Dec Dec Dec
27 CODB 2 Dec Dec
28 MOVOR 3 HEX HEX HEX
29 COME 0
30 JMPE 0
31 DCNVB 0
- 55 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

Number of Data type of displayed parameters


SUB
Command displayed
number 1 2 3 4 5 6
parameters
32 COMPB 2 Dec Dec
33 SFT 1 HEX
34 DSCHB 4 Dec Dec Dec Dec
35 XMOVB 4 Dec Dec Dec Dec
36 ADDB 3 Dec Dec Dec
37 SUBB 3 Dec Dec Dec
38 MULB 3 Dec Dec Dec
39 DIVB 3 Dec Dec Dec
40 NUMEB 1 Dec
43 MOVB 2 Dec Dec
44 MOVW 2 Dec Dec
45 MOVN 2 Dec Dec
54 TMRC 2 Dec Dec
55 CTRC 2 Dec Dec
57 DIFU 0
58 DIFD 0
59 EOR 3 HEX HEX HEX
60 AND 3 HEX HEX HEX
61 OR 3 HEX HEX HEX
62 NOT 2 HEX HEX
64 END 0
65 CALL 0
66 CALLU 0
68 JMPB 0
69 LBL 0
71 SP 0
72 SPE 0
73 JMPC 0

NOTE
When data type is BCD, invalid values for BCD (10,11,12,13,14,15) are not
displayed correctly.

CAUTION
Do not page up or down rapidly if you use FAPT LADDER-II on Windows NT.
Otherwise, the Online Monitoring function might lose communication with the
controller.

Procedure to display signal status


You can see the value of any address with the following procedure.
(1) Press , in the ladder monitor of FAPT LADDER-II, and select "Signal Status" in the 2.
Diagnose pull down menu.

- 56 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

(2) The following signal status screen is displayed.

(3) Type the address to monitor by keyboard, and press , Search. Status of entered address is
displayed.
In the signal monitor screen, you can change the value of any address. Place the cursor on the bit address,
press , and the value of the bit is changed as 1, 0, 1.

3.8 RUN/STOP PMC


You can run and stop PMC with FAPT LADDER-II.

Procedure to run/stop PMC


(1) Press , on the ladder monitor of FAPT Ladder-II, and select "RUN/STOP the Program" in the
"2. Diagnose" pull down menu.

- 57 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(2) When the PMC program is running, the following dialog box is displayed. To stop the program, select
YES and press . The PMC program will stop.
If the PMC program is stopped, the message in the dialog box will be "RUN the program". Selecting
YES and pressing will run the program.

3.9 Writing PMC Program to ROM


The PMC program is stored in ROM on the robot controller. It is loaded to RAM on the robot controller
when the controller is turned on. The PMC program in RAM is executed.
When the PMC program is transferred by On-Line function of the FAPT LADDER-II, the PMC program in
RAM is changed, but the PMC program in ROM is not changed. If you cycle power in this situation, the
PMC program in ROM is reloaded to RAM, and is executed.
To change the PMC program in ROM, you need to backup the PMC program. This means writing the PMC
program in RAM to ROM. By PMC program backup, the PMC program in ROM is changed, and a new
PMC program is executed at the next power up.

NOTE
Before backing up the PMC program, press the E-STOP on the teach pendant or
Operator's panel, or the robot controller must be in Controlled start mode. If the
robot controller is not in this condition, a dialog box with "N:E-3019 F-ROM
undefined error code is displayed on FAPT LADDER-II, and "PRIO-142
Need E-STOP or CTRL start" is displayed on the robot controller teach
pendant.

Operation to write PMC program to ROM


Use the following procedure to back up the PMC program.
(1) Stop all teach pendant programs on the robot controller and press E-STOP on Teach Pendant or
Operator's panel. (or put the controller in Controlled start mode)
(2) Press , and select "Backup program" in the "3. I/O" pull down menu.

(3) The following dialog box will be displayed. Select "EXEC" and press ENTER. Program backup takes
about 10 seconds. Do not shut down power to the robot controller during program backup, otherwise
the PMC program might become corrupted and will need to be reloaded.

- 58 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

(4) When PMC program backup is completed, the following dialog box is displayed. Select CANCEL and
press .

NOTE
Rarely, "PRIO-145 Purging flash file, please wait" is displayed on the
robot controller teach pendant, and the dialog box with "N:E-3019 F-ROM
undefined error code is displayed on FAPT LADDER-II at this time. This
means that the robot controller system is arranging ROM data, and it takes a few
minutes. In this case, please wait until the message "PRIO-146 Flash file
purge is completed" is displayed on the robot controller teach pendant. Do
not shut down power during this process. After the purge is complete,
communication between the robot controller and FAPT LADDER-II will be lost.
Be sure to connect again.

3.10 MODIFYING THE PMC PROGRAM IN ROBOT


Use the following procedure to modify the PMC program running on the robot Controller if you do not have
a copy of the program on the FAPT LADDER II.
(1) Connect the robot Controller and FAPT LADDER-II according to Section 3.1, "Connection between
the robot controller and FAPT LADDER-II." Select "On-Line Function in the Initial menu of FAPT
LADDER-II. When communication starts, the PMC program is loaded from the robot Controller to
FAPT LADDER-II automatically.

NOTE
If you select "On-Line (selected program)" and do the following operation, the
selected program will be lost. You must select "On-Line function".

(2) Press , and select "Save program as…" in the "1. File" pull down menu.

- 59 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(3) The following dialog box will be displayed. Type the directory path of the new source program where
this PMC program will be saved.

NOTE
If the specified source program already exists, the specified source program will
be superceded.

(4) Press , and select "Off-Line Function in "1. File" pull down menu. The PMC program
will be decompiled automatically and the Off-Line menu will be displayed.

(5) Edit the PMC program using the Off-Line Function of FAPT LADDER-II.

(6) When PMC program modification is completed, compile the PMC program, and press
(ON-LINE FUNCTION) in the Off-Line menu. FAPT LADDER-II communicates with the robot
controller and the following dialog box is displayed.

- 60 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

(7) Select Store, "Store to PMC program memory." The PMC program is transferred to the robot
controller.
(8) Check the modified PMC program.
(9) Write the PMC program to ROM according to Section 3.9, "WRITING PMC PROGRAM TO ROM."

3.11 SAVE/LOAD PMC PROGRAM AND PMC PARAMETERS


The robot Controller can save the PMC program to a file named LADDER.PMC and the PMC parameters
to a file named PARAM.PMC.

FAPT LADDER-II also can save/load these files.


You can transfer a PMC program between the robot controller and FAPT LADDER-II without the online
connection using the LADDER.PMC file.

This chapter explains the procedure to load/save LADDER.PMC and PARAM.PMC using FAPT
LADDER.II.

3.11.1 Saving LADDER.PMC Using FAPT LADDER-II


FAPT LADDER-II can save LADDER.PMC directly. You can transfer a PMC program from FAPT
LADDER-II to the robot controller without connecting the robot controller and FAPT LADDER-II by
loading the LADDER.PMC that was saved by FAPT LADDER-II.

Procedure to save LADDER.PMC


(1) Select the PMC program to be saved on the FAPT LADDER-II, and compile this PMC program.
(2) Press , I/O in the Off-Line menu of FAPT LADDER-II. The I/O menu will be displayed.
(3) Press , Handy File in the I/O menu.

- 61 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

NOTE
The robot controller supports "Handy File" format only. Do not select any other
format.

"Handy File" is a file that can be loaded from a Floppy Disk Drive or Memory Card.
FDCAS stands for Floppy Drive Cassette, which is the same as "Handy File". The
"Memory Card" selection, in the "I/O" screen, is not used to create a loadable file
for the Memory Card.

(4) Press (WRITE(PROGRAMMER -> Handy file)) key.

(5) Type the directory path and file name of LADDER.PMC in the "Handy File file name" item. The file
name must be LADDER.PMC.
Example: C:\LADDER.PMC

(6) Press , EXEC. LADDER.PMC will be saved.

- 62 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

3.11.2 Loading LADDER.PMC Using FAPT LADDER-II


FAPT LADDER-II can load LADDER.PMC directly. You can transfer a PMC program from the robot
controller to FAPT LADDER-II without connecting the robot controller and FAPT LADDER-II by loading
the LADDER.PMC that was saved by the robot controller.

Procedure to load LADDER.PMC


(1) Create a new PMC program according to Section 3.2, "Creating a New PMC Program."
(2) Press , I/O in the Off-Line menu of FAPT LADDER-II. The I/O menu will be displayed.
(3) Press (Handy File) key in the I/O menu.

NOTE
The robot controller supports "Handy File" format only. Do not select any other
format.

(4) Press , READ(PROGRAMMER <- Handy file).

(5) Type the directory path and file name of LADDER.PMC in the "Handy File file name" item.
Example: C:\LADDER.PMC

- 63 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(6) Press , EXEC. LADDER.PMC will be loaded.

(7) Press , END to display the "I/O (FDCAS)" menu.

(8) Press , END to display the "I/O" menu.

(9) Press , END to display the Off-Line menu.

(10) Press , Decompile to display the Decompile menu.

(11) Press , EXEC. The loaded PMC program will be decompiled.

(12) When the decompile is complete, the message "Decompile normal end" will be displayed. You can
then edit the loaded PMC program.

3.11.3 Saving PARAM.PMC Using FAPT LADDER-II


FAPT LADDER-II can save PARAM.PMC using the online function.

NOTE
PARAM.PMC can not be saved when PMC is running. You must stop the PMC or
do a Controlled start, to save PARAM.PMC.

- 64 -
B-82614EN/02 3. PROGRAMMING WITH FAPT LADDER-II

Procedure to save PARAM.PMC


(1) Connect the robot controller and FAPT LADDER-II via RS-232-C according to Section 3.1,
"Connection between the robot controller and FAPT LADDER-II".
(2) Select On-Line Function" or "On-Line (selected program)" in initial menu of FAPT
LADDER-II. Communication will start.
(3) Press , on FAPT LADDER-II, and select "Save PMC parameter" from the file pull-down
menu.

(4) Type the directory path and file name of PARAM.PMC to save.
Example: C:\PARAM.PMC

(5) Select YES and press , PARAM.PMC will be saved

3.11.4 Loading PARAM.PMC by FAPT LADDER-II


The FAPT LADDER-II can load PARAM.PMC using the online function.

NOTE
PARAM.PMC can not be loaded when PMC is running. You must stop the PMC
or do a Controlled start, to load PARAM.PMC.

Procedure to load PARAM.PMC


(1) Connect the robot controller and FAPT LADDER-II via RS-232-C according to Section 3.1,
"Connection between the robot controller and FAPT LADDER-II."
(2) Select On-Line Function" or "On-Line (selected program)" in initial menu of FAPT
LADDER-II. Communication will start.
(3) Press on the FAPT LADDER-II, and select Restore PMC parameter" from the file
pull-down menu.

- 65 -
3. PROGRAMMING WITH FAPT LADDER-II B-82614EN/02

(4) Type the directory path and file name of PARAM.PMC to load.
Example: C:\PARAM.PMC

(5) Select YES and press , PARAM.PMC will be loaded.

- 66 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

4 FANUC LADDER-III for Robot


PROGRAMMING
FANUC LADDER-III for Robot is the programming software for developing sequence programs for
FANUC PMCs.

This software runs in the Microsoft® software Windows® operating system environment. This manual
does not cover basic Windows® operations. If you are a beginner to Windows®, read the Windows®
manual first to learn the basic operations.

This manual describes the programming items of FANUC LADDER –III for Robots with respect to the
ROBOT CONTROLLER. These items include how to create a new sequence program, how to transfer it to
the ROBOT CONTROLLER, how to execute it and how to write it into ROBOT CONTROLLER ROM.

NOTE
There is "FANUC LADDER-III" and "FANUC LADDER-III for Robot". Use
"FANUC LADDER-III for Robot" to program the Robot Integrated PMC.

Microsoft® and Windows® are registered trademarks of Microsoft Corporation in the United States of
America.

Some functions of FANUC LADDER-III for Robot are not supported by the robot controller.
The following is the list of menu items not supported.

menu items not supported


File
Importing/Exporting files
ROM Format File
User File
Diagnose
Signal Trace
Signal Analysis
Signal Status
A0
Sychronous input memory
PMC Parameter
Set Up
Signal Analys Start
Debug Func Start
Reject Language
Allow PMC Stop
Gray Scal Display
Trace Start
C Debugger Enable
C Mem Write Enable
Tool
Communication
Network Address

- 67 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

4.1 CONNECTING FANUC LADDER-III for Robot TO ROBOT


CONTROLLER
ROBOT CONTROLLER and FANUC LADDER-III for Robot is connected by RS-232-C or LAN cable to
exchange PMC program and parameters.

4.1.1 RS-232C Connection


Cable Choice
Use the following cable to connect ROBOT CONTROLLER and FANUC LADDER-III for Robot.

Specification of the connectors are as following:


• Connector D-Sub25pin male DBM-25P (ANSI/EIA-232)
• Housing DB-C2-J9 (ANSI/EIA-232)
• Shielding quality Entirely shielded cable is recommended.

Connect the D-Sub 25pin to the RS-232-C port in front side of ROBOT CONTROLLER operator panel.

Setting of Serial Port


Choose PMC programmer as port1 from Teach pendant before using FANUC LADDER-III for Robot
online.
(1) Press MENUS, select "6.SETUP".
MENUS
1 UTILITIES
2 TEST CYCLE
3 MANUAL FCTNS
4 ALARM
5 I/O
6 SETUP
7 FILE
8
9 USER
0 - NEXT -

- 68 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

(2) Press ([ TYPE ]), select "Port Init".

Port Init

[TYPE]

(3) Move the cursor to "Port 1" .Press (DETAIL).


The port1 detail screen will be displayed.

Port Init JOINT 100%


1/2
Connector Port Comment
1 FRS16 RS-232-C P2: [Host Comm ]
2 FD17 RS-232-C P3: [KCL/CRT ]

[ TYPE ] DETAIL

(4) Move the cursor to 1 Device, and press ([CHOICE]).

SETUP Port Init JOINT 100%


FRS16 RS-232-C P2:
1 Device [Host Comm ]
2 Speed (Baud rate) [9600 ]
3 Parity bit [None ]
4 Stop bit [1bit ]
5 Time out value (sec) [0 ]

[ TYPE ] LIST [CHOICE]

(5) Select "PMC Programmer" in the displayed menu.

JOINT 100%
1 Current position 5 HMI device
2 PMC programmer 6 RoboWeld EQ1
3 PPP 7 RoboWeld EQ2
4 Modem/PPP 8 -- NEXT --

1 Device [Host Comm ]

(6) Press ENTER.

SETUP Port Init JOINT 100%


FRS16 RS-232-C P2:
1 Device [PMC programmer ]
2 Speed (Baud rate) [9600 ]
3 Parity bit [None ]
4 Stop bit [2bit ]
5 Time out value (sec) [0 ]

[ TYPE ] LIST [CHOICE]

- 69 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(7) Move the cursor to 2 Speed (Baud rate), and press ([CHOICE]). Select the same speed as the
setting in FANUC LADDER-III for Robot. (Refer to "Help" on toolbar with FANUC LADDER-III for
Robot to learn the setup of the Speed (Baud rate).)

SETUP Port Init JOINT 100%


FRS16 RS-232-C P2:
1 Device [PMC programmer ]
2 Speed (Baud rate) [19200 ]
3 Parity bit [None ]
4 Stop bit [2bit ]
5 Time out value (sec) [0 ]

[ TYPE ] LIST [CHOICE]

4.1.2 Ethernet Connection


Setting for Ethernet communication
To use FANUC LADDER-III for Robot Online function with Ethernet communication, you must set the
Robot IP address in advance.
To set the Robot IP address, refer to "SETTING UP TCP/IP" in "Ethernet function OPERATOR’S
MANUAL (B-82974EN)"

Setting of Serial Port


If the "PMC programmer" is set as a serial port, remove PMC programmer from all ports on the Teach
pendant before using FANUC LADDER-III for Robot online.
(1) Press MENU, select "6.SETUP".
MENUS
1 UTILITIES
2 TEST CYCLE
3 MANUAL FCTNS
4 ALARM
5 I/O
6 SETUP
7 FILE
8
9 USER
0 - NEXT -

(2) Press ([ TYPE ]), select "Port Init".

Port Init

[TYPE]

(3) Move the cursor to the port that is set as [PMC programmer]. Press (DETAIL). The port detail
screen will be displayed.
(If "PMC programmer" is not set to any ports, you are finished in the "Port Init" setup screen.)

Port Init JOINT 100%


1/2
Connector Port Comment
1 FRS16 RS-232-C P2: [PMC programmer ]
2 FD17 RS-232-C P3: [KCL/CRT ]

[ TYPE ] DETAIL

- 70 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

(4) Move the cursor to 1 Device, and press ([CHOICE]).

SETUP Port Init JOINT 100%


FRS16 RS-232-C P2:
1 Device [PMC programmer ]
2 Speed (Baud rate) [19200 ]
3 Parity bit [None ]
4 Stop bit [2bit ]
5 Time out value (sec) [0 ]

[ TYPE ] LIST [CHOICE]

(5) Select an item other than "PMC Programmer" in the displayed menu (such as “No Use”).

JOINT 100%
1 Sensor 5 Maintenance Cons
2 Host Comm 6 Factory Terminal
3 No Use 7 TP Demo Device
4 KCL/CRT 8 -- NEXT --

1 Device [PMC Programmer ]

(6) Press ENTER.

SETUP Port Init JOINT 100%


FRS16 RS-232-C P2:
1 Device [No Use ]
2 Speed (Baud rate) [9600 ]
3 Parity bit [None ]
4 Stop bit [1bit ]
5 Time out value (sec) [0 ]

[ TYPE ] LIST [CHOICE]

- 71 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

4.2 CREATING PMC PROGRAM


In FANUC LADDER-III for Robot, the PMC program is stored as a .LAD file.
To create a new PMC program, perform the following procedure below.
(1) From FANUC LADDER-III for Robot screen, select [File]-[New Program]
The [New Program] screen appears.

(2) Enter the name of a program file you want to create. Specify "LAD" in the extension, and the extension
cab be omitted.
(3) Select RBT-SB5 as PMC model.
(4) Click <OK>, then the program is created and program list is displayed.

- 72 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

4.3 IMPORTING STANDARD PMC PROGRAM


Importing a Standard PMC program as a template makes programming easy.

Standard PMC program can be imported from ROBOT CONTROLLER as STDLDR.PMC file.

This section describes how to use a Standard PMC program as a template.


Follow the procedure described here after creating new program.

Refer to "1.6 STANDARD PMC PROGRAM" for the detailed information of Standard PMC program.

Procedure
NOTE
If the program has been edited, any change will be discarded. This procedure
should be performed just after a new program is created.

(1) Select [File]-[Import].

- 73 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(2) Select "Handy-file Format File" and click the <Next> button.

(3) Specify STDLDR.PMC by directory and file name.


(4) Click the <Finish> button. The message "Import completed" appears.

(5) Click the <OK> button. The following decompile screen appear.

- 74 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING
(6) To decompile, click the <YES> button. The [Decompile] screen appears.

(7) When decompile is finished, the decompile screen is closed.

(8) After this procedure, Standard PMC program is usable as a template.

4.4 EDITTING A PMC PROGRAM


PMC program editor is off-line function of FANUC LADDER-III for Robot.
Refer to "Help" on toolbar with FANUC LADDRE-III for Robot to learn the basic FANUC LADDER-III
for Robot operation.

NOTE
The robot controller Integrated PMC does not support the On-Line edit function.
PMC programs must be edited with the Off-Line Function. However, the robot
controller Integrated PMC does support PMC program transfer during PMC
program execution.

Procedure
(1) In the [Program List] screen, double click LEVEL1, LEVEL2, or subprograms, such as P0001. Edit
screen of selected program appears.

- 75 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(2) Edit ladder diagram.


(3) Select [File]-[Save] to save program.

4.5 COMPILING A PMC PROGRAM


You must compile a PMC program to execute it on the robot controller.

Procedure
(1) Select [Tool]-[Compile]. The [Compile] dialog appears.
(2) Click [Option] tab to set the complie options.

(3) Check "Condense" to compile in the Condensation mode.

- 76 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

(4) To start compilation, click the <Exec> button.


(5) During compilation, the processing state screen appears. When completed, the number of errors and
warnings appears.
(6) Click <Close> button and close the window after compile finished.

NOTE
When "Compiled in the Condensation mode" is checked, program is compiled by
condense mode. When not checked, program is compiled by normal mode.
Both modes are the same for PMC program execution. Condensed mode
generates a smaller PMC program than normal mode, so transfer time of
condensed mode is shorter than normal mode.

4.6 TRANSFERRING PMC PROGRAM


After the PMC program is edited and compiled by the On-Line function of FANUC LADDER-III for Robot,
there are two ways to send the PMC program to the robot controller. One way is the On-Line Function of
FANUC- LADDER-III for Robot, and the other is by the LADDER.PMC file. This chapter explains the
On-Line Function transfer of the PMC program. The way to save LADDER.PMC is explained in Section
4.11.1, "Exporting LADDER.PMC using FANUC LADDER-III for Robot."

Procedure
(1) Connect ROBOT CONTROLLER and FANUC LADDER-III for Robot by cable, according to "4.1
CONNECTING FANUC LADDER-III for Robot ".
(2) Select [Tool]-[Store to PMC].
(3) Select <I/O by MONIT-ONLINE function>, and then click the <Next> button. (Please go to 7. if
ROBOT CONTROLLER and FANUC LADDER-III for Robot are on communication.) The following
message appears.

(4) Click <Yes> button.


(5) The [Communication] screen appears. Then communication with ROBOT CONTROLLER is started.
- 77 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(6) The [Program transfer wizard Selection of loading/store] screen appears.

(7) Click the <Next> button. The [Program transfer wizard Selection of program] screen appears.

- 78 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

(8) Click the <Next> button. The [Program transfer wizard Configuration of processing] screen appears.

(9) Click the <Finish> button. Then, the [Transfer monitor] screen appears, and then the program is
transferred.

(10) After the process finished, the screen was closed.

NOTE
The PMC program is transferred into RAM memory using the above procedure.
When controller power is cycled, the original PMC program is loaded back into
RAM memory, thus overwriting the PMC program that was recently transferred.
To keep the new PMC program after power is cycled, the program must be
transferred to ROM memory. To write the PMC program to ROM, refer to Section
4.9, "Writing PMC ProgramS to F-ROM".

If a PMC program is running during this procedure, the PMC program continues to run during transfer. The
executing PMC program is switched to the new program when the transfer is complete. With this procedure,
you can send a PMC program without stopping execution.

NOTE
When a PMC program is transferred during execution, the value of internal relays,
internal variables, and so forth are not initialized. This might cause unexpected
output. For example, DIFU turns on when the PMC program is switched. Be
careful when making large changes to the PMC program.

When transferring a program, if an error occurs, the following dialog box will be displayed on FANUC
LADDER-III for Robot.
- 79 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

In this case PMC is still executing the previous PMC program. An error message is also displayed on the
robot controller teach pendant.
The teach pendant displays the last error message. To read all error message, display the alarm history
screen with the following procedure.

Procedure to check errors caused by PMC programs


(1) Press MENUS.

(2) Select "4. ALARM". The Active Alarm screen will be displayed.

(3) Press F3 in Active Alarm screen. The History Alarm screen will be displayed.

NOTE
The PMC program error is a `warning', and it is not displayed in the active alarm
screen. Please check the Alarm History screen to see this error displayed.

In the Alarm History screen, the errors are listed in the order they occurred. The last alarm is on the top line.
Refer to Chapter 9, "INTEGRATED PMC ERROR CODE" for details of all PMC errors. When an alarm
occurs during program transfer, the new PMC program can not run. If a previous PMC program is running
during PMC program transfer, the previous PMC program continues to run. The new PMC program cannot
be written to ROM until it is correctly transferred.
- 80 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING
If a PMC program has more than 10 errors, the 11th and higher alarms are not displayed in the alarm history
screen and "PRIO-140 can't display all PMC errors" is displayed. The first ten alarms must
be corrected in order to see the remaining alarms.

4.7 PMC PROGRAM MONITORING (ONLINE MONITOR)


LADDER MONITORING is online monitor function for the PMC program.
Refer to [Help]-[Diagnosis]-[Ladder Monitoring] on FANUC LADDER-III for Robot toolbar for detailed
information.

LADDER MONITOR

Signal Status Monitor

- 81 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

Function Instruction display Format


The data types of the displayed parameters is shown in the following table.

Number of Function instruction display format


SUB
Instruction parameters
number 1 2 3 4 5 6
displayed
1 END1 0
2 END2 0
3 TMR 2 Dec Dec
4 DEC 1 BCD
5 CTR 2 Dec Dec
6 ROT 3 BCD BCD BCD
7 COD 2 BCD BCD
8 MOVE 2 HEX HEX
9 COM 0
10 JMP 0
11 PARI 1 Dec
14 DCNV 0
15 COMP 2 BCD BCD
16 COIN 2 BCD BCD
17 DSCH 3 BCD BCD BCD
18 XMOV 3 BCD BCD BCD
19 ADD 3 BCD BCD BCD
20 SUB 3 BCD BCD BCD
21 MUL 3 BCD BCD BCD
22 DIV 3 BCD BCD BCD
23 NUME 1 BCD
24 TMRB 1 Dec
25 DECB 2 Dec BCD
26 ROTB 4 Dec Dec Dec Dec
27 CODB 2 Dec Dec
28 MOVOR 3 HEX HEX HEX
29 COME 0
30 JMPE 0
31 DCNVB 0
32 COMPB 2 Dec Dec
33 SFT 1 HEX
34 DSCHB 4 Dec Dec Dec Dec
35 XMOVB 4 Dec Dec Dec Dec
36 ADDB 3 Dec Dec Dec
37 SUBB 3 Dec Dec Dec
38 MULB 3 Dec Dec Dec
39 DIVB 3 Dec Dec Dec
40 NUMEB 1 Dec
43 MOVB 2 Dec Dec
44 MOVW 2 Dec Dec
45 MOVN 2 Dec Dec
54 TMRC 2 Dec Dec
55 CTRC 2 Dec Dec
57 DIFU 0
58 DIFD 0
59 EOR 3 HEX HEX HEX
60 AND 3 HEX HEX HEX
61 OR 3 HEX HEX HEX

- 82 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

Number of Function instruction display format


SUB
Instruction parameters
number 1 2 3 4 5 6
displayed
62 NOT 2 HEX HEX
64 END 0
65 CALL 0
66 CALLU 0
68 JMPB 0
69 LBL 0
71 SP 0
72 SPE 0
73 JMPC 0

NOTE
When data type is BCD, invalid values for BCD (10, 11, 12, 13, 14, 15) are not
displayed correctly.

4.8 RUNNING OR STOPPING PMC PROGRAM


This section describes how to execute and stop PMC program from FANUC LADDER-III for Robot.
Procedure
(1) Select [Tool]-[Program Run/Stop]. The message similar to the following appears.

(2) Click <Yes> button.


The PMC program will stop.

If PMC program is not running, the message "Are you sure to run the program ?" appears. Follow the same
procedure to run the program.

4.9 WRITING PMC PROGRAM TO F-ROM


The PMC program is stored in ROM on the robot controller. It is loaded to RAM on the robot controller
when the controller is turned on. The PMC program in RAM is executed.
When the PMC program is transferred by On-Line function of the FANUC LADDER-III for Robot, the
PMC program in RAM is changed, but the PMC program in ROM is not changed. If you cycle power in this
situation, the PMC program in ROM is reloaded to RAM, and is executed.
To change the PMC program in ROM, you need to backup the PMC program. This means writing the PMC
program in RAM to ROM. By PMC program backup, the PMC program in ROM is changed, and a new
PMC program is executed at the next power up.

- 83 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

NOTE
Before backing up the PMC program, press the E-STOP on the teach pendant or
Operator's panel, or the robot controller must be in Controlled start mode. If the
robot controller is not in this condition, a dialog box with "N:E-3007 "Flash ROM
Not EMG stop" error code" is displayed on FANUC LADDER-III for Robot,
and "PRIO-142 Need E-STOP or CTRL start" is displayed on the robot
controller teach pendant.

Procedure
(1) Make sure the TP program on ROBOT CONTROLLER program is stopped.
(2) Press EMERGENCY STOP on the operator panel or teach pendant. (When ROBOT CONTROLLER
is at a Controlled Start, step 2 is not required.)
(3) Select [Tool]-[Back Up] on FANUC LADDER-III for Robot. The following message appears.

(4) Click <OK>. Then Back Up starts. Don't turn off the ROBOT CONTROLLER during Back Up. The
following message is displayed when it finishes.

NOTE
Rarely, "PRIO-145 Purging flash file, please wait" is displayed on the
robot controller teach pendant, and the dialog box with "N:E-3007 "Flash ROM
Not EMG stop" code" is displayed on FANUC LADDER-II at this time. This
means that the robot controller system is arranging ROM data, and it takes a few
minutes. In this case, please wait until the message "PRIO-146 Flash file
purge is completed" is displayed on the robot controller teach pendant. Do
not shut down power during this process. After the purge is complete,
communication between the robot controller and FANUC LADDER-II will be lost.
Be sure to connect again.

- 84 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

4.10 MODIFYING THE PMC PROGRAM IN THE ROBOT


CONTROLLER
Use the following procedure to modify the PMC program running on the Robot Controller if you do not
have a copy of the program on the FANUC LADDER-III for Robot.
(1) According to "4.1 CONNECTING FANUC LADDER-III for Robot ", connect ROBOT
CONTROLLER and FANUC LADDER-III for Robot.
(2) According to "4.2 CREATING PMC", create new PMC program.
(3) Select [Tool]-[Load from PMC] to open the program. (If FANUC LADDER-III for Robot and
ROBOT CONTROLLER are on communication, go to step 8.)

(4) Click <Next> . The following message is displayed.

(5) Click <Yes>.

- 85 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(6) The [Communication] screen appears and the communication with ROBOT CONTROLLER starts.

(7) After communication is established, the [Program transfer wizard Selection of loading/store] screen
appears.

- 86 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING
(8) Click the<Next>. The following message is displayed.

(9) Click <Next>. The following message is displayed.

(10) Click <Finish>. Then the program is transferred.


(11) The [Transfer monitor] screen is displayed during program transfer.

- 87 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(12) When the load is finished, the following dialog is displayed.

(13) Click <Yes>. Then decompile starts.

(14) Edit PMC program Off-line.

4.11 STORE/LOAD PMC PROGRAM AND PARAMETERS


The robot Controller can save the PMC program to a file named LADDER.PMC and the PMC parameters
to a file named PARAM.PMC.

FANUC LADDER-III for Robot also can save/load these files.


You can transfer a PMC program between the robot controller and FANUC LADDER-III for Robot without
the online connection using the LADDER.PMC file.

This chapter explains the procedure to load/save LADDER.PMC and PARAM.PMC using FANUC
LADDER-III for Robot.

4.11.1 Exporting LADDER.PMC using FANUC LADDER-III for Robot


FANUC LADDER-III for Robot can export LADDER.PMC directly.
You can transfer a PMC program from FANUC LADDER-III for Robot to the robot controller without
connecting the robot controller and FANUC LADDER-III for Robot by reading the LADDER.PMC that
was exported by FANUC LADDER-III for Robot.
- 88 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

Procedure to export LADDER.PMC


(1) Compile the PMC program by FANUC LADDER-III for Robot.
(2) Select [File]-[Export].
(3) Choose "Handy File format" and click <Next>.

NOTE
The robot controller supports "HANDY FILE" format only. Do not select any other
format.
"HANDY FILE" is a file that can be loaded from a floppy disk or memory card.

(4) Specify directory and file to export. File name must be LADDER.PMC.

Example'C:\LADDER.PMC
(5) Click <Finish> to export LADDER.PMC.
- 89 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(6) When LADDER.PMC is exported, the following message is displayed.

(7) Click <OK>.

4.11.2 Importing LADDER.PMC using FANUC LADDER-III for Robot


FANUC LADDER-III for Robot can import LADDER.PMC directly.
You can transfer a PMC program from the robot controller to FANUC LADDER-III for Robot without
connecting the robot controller and FANUC LADDER-III for Robot by importing the LADDER.PMC that
was saved by the robot controller.

Procedure to import LADDER.PMC


(1) According to "4.2 CREATING PMC PROGRAM", create new PMC program.
(2) Select [File]-[Import].

(3) Select "Handy-file Format File".


(4) Click <Next>.

- 90 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING

(5) Specify LADDER.PMC or STDLDR.PMC to import by directory and file name.


(6) Click <Finish>. The following message appears.

(7) Click <OK>. The following message appears.

(8) Click <Yes>. The [Decompile] screen appears.

- 91 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(9) Edit the exported PMC program by Off-line function.

4.11.3 Loading PARAM.PMC using FANUC LADDER-III for Robot


PARAM.PMC can be transferred to floppy disk or hard disk of your computer by using the FANUC
LADDER-III for Robot On-line function.

Procedure
(1) According to "4.1 CONNECTING FANUC LADDER-III for Robot", connect ROBOT
CONTROLLER with FANUC LADDER-III for Robot by cable.
(2) Select [Tool]-[Load from PMC]. (If FANUC LADDER-III for Robot and ROBOT CONTROLLER
are on communication, go to step 8.)

(3) Select <I/O by MONIT-ONLINE function>.


(4) Click <Next>. The following message is displayed.

- 92 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING
(5) Click <Yes>.
(6) The [Communication] screen is displayed until communication with ROBOT CONTROLLER is
established.

(7) The following screen is displayed when communication is established.

- 93 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(8) Click the <Next> button. The following screen is displayed.


(9) Remove the check next to the "LADDER". Check the "PMC Parameter".
(10) Input directory and file name in the "Selection of" box below.

NOTE
File name must be PARAM.PMC. If the file has another, the ROBOT
CONTROLLER can not load it.

- 94 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING
(11) Click <Next>. The Program transfer wizard screen appears.

(12) Click <Finish> button.


(13) Then, the [Transfer monitor] screen appears, and then program is transferred.

NOTE
Stop PMC programs or perform controlled start to load PARAM.PMC when PMC
program is running. PARAM.PMC cannot be loaded during program execution.

The error message below is display if the PMC program is not stopped.

- 95 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

4.11.4 Storing PARAM.PMC by FANUC LADDER-III for Robot


PAPAM.PMC can be transferred from memory card or hard disk of your computer by FANUC
LADDER-III for Robot On-line function.

Procedure
(1) According to "4.1 CONNECTING FANUC LADDER-III for Robot ", connect ROBOT
CONTROLLER with FANUC LADDER-III for Robot by cable.
(2) Select [Tool]-[Store to PMC]. (If FANUC LADDER-III for Robot and ROBOT CONTROLLER are
on communication, go to step 8.)

(3) Select <I/O by MONIT-ONLINE function>


(4) Click <Next>. Then the following message appears.

(5) Click <Yes>.

- 96 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING
(6) The [Communication] screen is displayed.

(7) When the connection is established, the following screen appears.

- 97 -
4. FANUC LADDER-III for Robot PROGRAMMING B-82614EN/02

(8) Click <Next>. The following screen appears.

(9) Remove the check next to the Ladder, check PMC parameter. Input the file name to be stored in the
"Selection of" box below.

NOTE
File name must be PARAM.PMC. If the file has another name, the ROBOT
CONTROLLER can not load it.

- 98 -
B-82614EN/02 4. FANUC LADDER-III for Robot PROGRAMMING
(10) Click <Next>. The program transfer wizard screen appears.

(11) Click <Finish>. Then PMC program is transferred to RAM in ROBOT CONTROLLER.

(12) The [Transfer Monitor] is displayed during transfer.

NOTE
Stop PMC program or perform controlled start to load PARAM.PMC when PMC
program is running. PARAM.PMC cannot be loaded during program execution.

- 99 -
5. TEACH PENDANT OPERATION B-82614EN/02

5 TEACH PENDANT OPERATION


This chapter explains the PMC operations available on the Teach Pendant.

5.1 PMC MENUS


PMC menus have the following functions.
1. Display and set the PMC address (Bit menu, Byte menu)
2. Display and set the Timer value (Timer menu)
3. Display and set the Counter value (Counter menu)
4. Display and set the Data Table Control Data (Data Table control data menu)
5. Display and set the Data Table value (Data Table menu)
6. Display and set the PMC setting parameters (Parameters menu)
7. Display the PMC program size and scan time (Status menu)
8. Display the Title data (Title menu)
9. Search
10. Run PMC and the stop PMC.
11. Save Standard Ladder
12. Add Data Table Group
13. Delete Data Table Group

Procedure to display PMC menus


(1) Press MENU, and select 5 I/O in the displayed menu.

(2) Press , [TYPE], and select PMC.

- 100 -
B-82614EN/02 5. TEACH PENDANT OPERATION

Construction of PMC menus


PMC menus are made up of sub menus. You can choose between the sub menus by pressing ,
[DATA].

5.1.1 Byte Menu


The Byte menu displays the value, symbol and comment of the byte address.

Addr.
The Addr. column displays the byte address.

Symbol
The Symbol column displays the symbol of the byte address.

7, 6, 5, 4, 3, 2, 1, 0
The 7-0 columns display the value of every bit of the address.
When the cursor is on these columns, you can set the bit to 1 by pressing the key and to 0 by pressing
the key.

Hex
The Hex column displays the value of the byte address hexadecimal format.

- 101 -
5. TEACH PENDANT OPERATION B-82614EN/02

When the cursor is on this column, you can set a new value with the numeric keys and the key. To
enter the A-F characters, press or key to select a character and press to decide.

Dec
The Dec column displays the value of the byte address in decimal format.
When the cursor is on this column, you can set a new value with the numeric keys and the key.

Comment
The Comment line displays the coil comment of the byte address.

Display another address


To display another address, press and type the numeric part of the PMC address at the "Address:"
prompt.
To display the address that has different alphabetic part, press , [DATA] and select the alphabetic
character in the displayed menu.

Go to bit menu
To go to the bit menu press , BIT.

Conditions for changing value


You can change an address value whether the PMC is running or stopped.
You can not change a value when the "Change address value" item in the Parameters menu is DISABLED
(K17.4 is 0).

5.1.2 Bit Menu

The Bit menu displays the value, symbol and comment of bit addresses. The corresponding port name is
also displayed.

Address
The Address column displays bit address.

Symbol
The Symbol column displays symbol of the bit address.
- 102 -
B-82614EN/02 5. TEACH PENDANT OPERATION

Port name
The Port name column displays the corresponding I/O port name of the bit address. The System interface
name is also displayed in this column.
If an internal relay is assigned to an I/O port, the assigned I/O port name
is also displayed in this column.
If there are multiple corresponding I/O ports, they are displayed side by side. If the length is too long to
display, the last character becomes ">".
Example: "DO[10001],GO[1]-0,DO>"
In this case, you can scroll through the port names by pressing the key and the key.

Value
The "Value" column displays the value of the bit address.
When the cursor is on this column, you can set the bit to 1 by pressing the key to 0 by pressing the
key.

Comment
The Comment line displays the coil comment of the byte address.

Display another address


To display another address, press and type the numeric part of the PMC address at the "Address:"
prompt.
To display an address that begins with a different letter, press , [DATA] and select the alphabetic
character in the displayed menu.

Go to byte menu
To go to the byte menu, press , BYTE.

Conditions for changing value


You can change an address value whether the PMC is running or stopped.
You can not change a value when the Change address value item in the Parameters menu is DISABLED
(K17.4 is 0).

5.1.3 Timer Menu


The Timer menu displays and sets the timer value for the TMR (SUB3) function command TMR (SUB3).

- 103 -
5. TEACH PENDANT OPERATION B-82614EN/02

No.
The No. column displays the timer number. This number is specified in the TMR function command as the
"timer number" parameter.

Addr.
The Addr. column displays the corresponding PMC address. One timer uses two bytes of the T area.

Symbol
The Symbol column displays symbol of the byte address.

Data
The Data column displays the timer value in msec.

You can set a new value using the numeric keys and the key.
• Timers 1- 8 have a resolution of 48 msec.
• Timers 9- 40 have a resolution of 8 msec.
• If you enter a preset value that is not divisible by the resolution, the remainder is omitted.
Example: If you enter 60 for Timer No. 1, the value becomes 48.

Comment
The Comment column displays the coil comment of the byte address.

Condition for changing the value


You can not change a timer value when the PMC is running. You must stop the PMC to change the value.

5.1.4 Counter Menu


The Counter menu displays and sets the preset value and current value of the CTR (SUB5) function
command.

No.
The No. column displays the counter number. This number is specified in the CTR function commandas the
"counter number" parameter.

Addr.
The Addr. column displays the corresponding PMC address. One counter uses four bytes of the C area.

Symbol
The Symbol column displays symbol of the byte address.
- 104 -
B-82614EN/02 5. TEACH PENDANT OPERATION

Preset
The Preset column displays preset value of the counter.
You can set a new value using the numeric keys and the key.

Current
The Current column displays current value of the counter.
You can set a new value using the numeric keys and the key.

Comment
The Comment column displays coil comment of the byte address.

Condition for changing the value


You can not change preset value and current value when PMC is running. You must stop the PMC to
change the value.

5.1.5 Data Table Control Data Menu


The Data Table Control Data menu displays and sets the Data Table Control Data.

Grp
The Grp column displays the Data Table group number.

Address
The Address column displays the starting address of the Data Table group.
You can set a new value with the numeric keys and the key.

Number
The Number column displays the number of elements in the Data Table group.
You can set a new value with the numeric keys and key.

Access
The Access column displays the accessing mode of the Data Table group.
Byte: One element uses one byte of D area.
Word: One element uses two bytes of D area.
DWord: One element uses four bytes of D area.
To change the access mode, press the [CHOICE] key and select an item from the displayed menu.

- 105 -
5. TEACH PENDANT OPERATION B-82614EN/02

Type
The Type column displays the data type of the Data Table group.
Dec: Data is displayed as decimal format.
Hex: Data is displayed as hexadecimal format.
BCD: Data is displayed as BCD format.
To change the data type press , [CHOICE], and select an item from the displayed menu.

Protect
The Protect column displays the protection setting of the Data Table group.
Off: You can change the value of the Data Table group.
On: You can not change the value of the Data Table group.
To change the protection setting press , [CHOICE] and select an item from the displayed menu.

The protection setting is used only in the Data Table menu of the PMC menus and the Data Table monitor in
PMC programmer. You can change the value of the D area from the Byte menu or Bit menu even though
the protection setting is On.

To add a new Data Table group


Press , [FUNC]. The following menu is displayed.

Select Add group. A new Data table group is inserted under the current Data Table group.
The new Data Table group has the same setting as the current line.
The Data Table groups under the new Data Table group are moved down.

To delete a Data Table group


Select Delete group in the menu displayed by , [FUNC] to delete the current Data Table group.
The Data Table groups under the deleted Data Table group are moved up.

Conditions for changing value


You can not change Data Table Control Data when PMC is running. You must stop the PMC to change the
Data Table Control Data
You can not change Data Table Control Data when the "Protect data tbl ctl" item in the Parameters menu is
ENABLED (K17.7 is 1).

To go to the Data Table menu


To display the Data Table data of the current Data Table group, press (DETAIL) or .

- 106 -
B-82614EN/02 5. TEACH PENDANT OPERATION

5.1.6 Data Table Menu


The Data Table menu displays and sets the data of the Data Table for every Data Table Group.

Data table grp.


The selected Data Table group number is displayed in the upper line of the screen as Data table grp.1.

Protect
The Protection setting of the selected Data Table group is displayed in the upper line of the screen as
Protect:Off.
You can not change the protection setting in this menu.

No.
The No. column displays element number.

NOTE
The first element number is 1. The first number of data in Table of function
commands DSCH, DSCHB, XMOV and XMOVB is 0.
(Data number in Table) = (Element number) - 1

Addr.
The Addr. column displays the PMC address in the D area.

Symbol
The Symbol column displays the symbol of the byte address.

Data
The Data column displays the data of the element.
Data type is displayed in right side of "Data" header as "Data(Dec)".
Data is displayed in the selected Data type format.
You can set a new value with the numeric keys and the key.
When the data type is Hex, enter A-F characters by pressing the or keys to select the character
and pressing to decide.

Comment
The Comment column displays the coil comment of the byte address.

- 107 -
5. TEACH PENDANT OPERATION B-82614EN/02

To display the next Data Table group


To display the next Data Table group, press , NEXT.
When the last Data Table group is displayed, Data Table group 1 is displayed by pressing , NEXT.

To go to tje Data Table Control Data menu


To display Data Table Control Data menu, press , LIST or .

Conditions for changing data


You can not change the Data Table data when the PMC is running. You must stop the PMC to change data.
When the protection setting is On, you can not change the Data Table data even though PMC is stopped.

5.1.7 Parameters Menu


The Parameters menu displays and sets the PMC setting parameters.

Forbid ladder monitor


DISABLE : Ladder monitor in PMC programmer can be displayed.
ENABLE : Ladder monitor in PMC programmer can not be displayed.

Use Programmer
DISABLE : PMC programmer is not available. ("Load program", "Store program", "Backup program"
and "Run/Stop the program" are not available in PMC programmer.)
ENABLE : PMC programmer is available.

Stop PMC at startup


DISABLE : PMC runs at power up automatically.
ENABLE : PMC does not run at power up automatically.

Use standard ladder


DISABLE : The PMC program saved in ROM is loaded to RAM at power up.
ENABLE : The Standard PMC program is loaded to RAM at power up.
(This setting is changed to DISABLE automatically by "Backup program" in PMC
programmer or loading LADDER.PMC in the file menu.)

Change address value


DISABLE : You can not change values in the Byte menu and Bit menu of the PMC menus.
You can not change values in "Signal status" of the PMC programmer.

ENABLE : You can change values in the Byte menu and Bit menu of the PMC menus.

- 108 -
B-82614EN/02 5. TEACH PENDANT OPERATION
You can change values in "Signal status" of the PMC programmer.

Protect data tbl ctl


DISABLE : You can change Data Table Control Data in the Data Table Control Data menu.
The Data Table Control Data menu in PMC programmer can be displayed.
ENABLE : You can not change Data Table Control Data in the Data Table Control Data menu.
The Data Table Control Data menu in PMC programmer can not be displayed.

Conditions for changing setting


You can not change PMC setting parameters when the PMC is running. You must stop the PMC to change
setting parameters.

5.1.8 Status Menu


Status menu displays PMC program size and scan time.

Program size
The Program size area displays the number of steps in the PMC program. The number of steps of level 1,
level 2 and the total of level 1 and level 2 are displayed. "16384" in the right side of "Total" is the maximum
number of steps.

Scan time
The Scan time area displays the scan time of level 1 and level2. Current scan time, maximum scan time and
minimum scan time are displayed. Maximum scan time and minimum scan time are the maximum and
minimum since the last power up.

5.1.9 Title Menu


The Title menu displays title data of the PMC program.
Title data is edited with the PMC programmer.

- 109 -
5. TEACH PENDANT OPERATION B-82614EN/02

Corresponding title data


The following is the corresponding item in the title menu of PMC programmer for every line.

Corresponded item in FAPT FALLDER-II for Robot


Company MACHINE TOOL BUILDER NAME
Machine MACHINE TOOL NAME
PMC PMC & NC NAME
Program PMC PROGRAM NO
Edition EDITION NO
Drawing PROGRAM DRAWING NO
Date DATA OF PROGRAMMING
Author PROGRAM DESIGNED BY
Install ROM WRITTEN BY
Remarks REMARKS

5.1.10 Search
Search procedure
Use the following procedure to search for PMC addresses, symbols, comments and port names.
(1) Press , [FUNC]. The following menu is displayed.

(2) Select "1 Search", and type the search word at the "Address/Symbol/Port name:" prompt.

Search PMC address


To search for a PMC address, type the PMC address like "X1.0" or "X12".
If you type a bit address such as "X1.0", the bit menu is displayed, and the cursor points to the specified
address.
If you enter a byte address such as "X12", the byte menu is displayed, and the cursor points to the "Hex"
column of the specified address.

- 110 -
B-82614EN/02 5. TEACH PENDANT OPERATION

Search symbol and comment


To search for a symbol or comment, type the WORD contained in the symbol or comment. The WORD
means the characters between the beginning of the line and the end of the line or a space.
For example, if you type "ABC" to search, "ABC DEF" and "123 ABC 456" are detected, but "ABCDEF"
and "123ABC 456" are not detected.

Search port name


To search for a port name, type the port name such as "SDO[1]".
To search for group I/O or analog I/O, you can specify a bit number such as "GO[1]-3". If you do not
specify a bit number, bit 0 is returned.

Search system interface name


System interface names can be searched for as port names. For example, if you type "IMSTP" to search,
PMC address G1000.0 is displayed in the bit menu.

Found in multiple locations


If the searched word is found in multiple locations, the function key label is changed as follow.

Press NEXT to display next item.

Press PREV to display previous item.

Press CANCEL to cancel searching.

5.1.11 Run/Stop PMC


Display PMC execution status
PMC execution status is always displayed in upper line of all PMC menus.
PMC is running

PMC is stopped

Procedure to run/stop PMC


You can run or stop the PMC by the following operation.
(1) Press [FUNC], the following menu is displayed.

(2) Select 2 Run/Stop PMC,


- 111 -
5. TEACH PENDANT OPERATION B-82614EN/02

• When PMC is running, the prompt "Stop PMC program?" is displayed,


if you press (YES) key, then PMC is stopped.
• When PMC is stopped, the prompt "Run PMC program?" is displayed,
if you press (YES) key, then PMC is started.

5.1.12 Save STDLDR.PMC


STDLDR.PMC
When the PMC option is loaded on the robot controller, a standard ladder program is also loaded.
You can save the standard PMC program as the file STDLDR.PMC. It is a good idea to copy
STDLDR.PMC to the PC in which PMC programmer is installed, and use it as a template for your PMC
program.
Refer to Section 1.6 "Standard PMC program" for details of the standard PMC program.
Refer to Section 3.3 "Load standard PMC program" for information on how to use STDLDR.PMC.

Procedure to save STDLDR.PMC

NOTE
You must select an external file device in file menu before this procedure. Refer
to Section 5.2 Operation in File Menu" for information on how to select an external
file device.

(1) Press [FUNC] in PMC menus, the following menu is displayed.

(2) Select "3 Save STDLDR". The following prompt is displayed.

(3) Press YES. STDLDR.PMC is saved to the selected external file device.

5.1.13 Save LADDER.PMC and PARAM.PMC


You can save LADDER.PMC and PARAM.PMC in PMC menus.

Procedure to save LADDER.PMC and PARAM.PM

NOTE
You must select an external file device in file menu before this procedure. Refer
to Section 5.2, "Operation in File Menu," for information on how to select an
external file device.

(1) Press while in the PMC menus. The following menu is displayed.

- 112 -
B-82614EN/02 5. TEACH PENDANT OPERATION

(2) Select – NEXT – to display next page, and select SAVE.


LADDER.PMC and PARAM.PMC are saved to the selected external file device.

5.2 FILE MENU OPERATIONS


You can save and load LADDER.PMC and PARAM.PMC from the teach pendant FILE menu.
Refer to Section 1.7, "Save/Load PMC program and PMC Parameters," for details of LADDER.PMC and
PARAM.PMC.

Operation to display File menu


(1) Press , the following menu is displayed.

(2) Press , [TYPE], and select "File" in the displayed menu".

(3) The File menu is displayed.

- 113 -
5. TEACH PENDANT OPERATION B-82614EN/02

Select external file device


To operate on files in the File menu, you must select the target external file device.
The selected external file device is displayed in left side of upper line in
File menu.

Use the following procedure to select the external file device.


(1) Press [UTIL] key, the following menu is displayed.

(2) Select Set device, the following menu is displayed.

(3) Select external file device.

NOTE
If you select Floppy disk, you must set the serial port in Port Init menu before this
procedure.
If you use MS-DOS to format the floppy disk, the following setting is needed.

MS-DOS format floppy disk


There are two types of floppy formats that can be used by the robot controller, FANUC format and
MS-DOS format. To use the file both on a PC and the robot controller, you must use MS-DOS format.
To use MS-DOS format, set up the port as follows.
Setting of the robot controller Port Init menu

- 114 -
B-82614EN/02 5. TEACH PENDANT OPERATION

Setting of Handy File


Item Value
Protocol Robot
Speed 9600baud
Stop bit 1 bit
Parity bit None
Data code Receive ISO/EIA
Send ISO
Cannel RS-232-C
Subprogram None

5.2.1 Save LADDER.PMC, PARAM.PMC


Save LADDER.PMC and PARAM.PMC
You can save LADDER.PMC and PARAM.PMC individually with the following procedure.
(1) Press [BACKUP]on the File menu, the following menu is displayed.

(2) Select System files, the following message is displayed.

(3) Press , NO. Similar messages are displayed repeatedly. Select NO until LADDER.PMC or
PARAM.PMC is displayed.

(4) If LADDER.PMC or PARAM.PMC is displayed, press , YES.


(5) After LADDER.PMC and PARAM.PMC are saved, press , EXIT.

- 115 -
5. TEACH PENDANT OPERATION B-82614EN/02

All backup
The "All backup" function in the File menu can back up all files to recover the current system.
LADDER.PMC and PARAM.PMC are also saved with the "All backup" function.

NOTE
All files in the selected external file device are deleted by the following procedure.

(1) Press , [BACKUP] in File menu. The following menu is displayed.

(2) Select All of above. The following message is displayed.

(3) Press YES.

Save STDLDR.PMC
You can not save STDLDR.PMC from the File menu.

5.2.2 Load LADDER.PMC, PARAM.PMC


Load a selected file
(1) Press [DIR]. The following menu is displayed.

(2) Select "*.*". The file list is displayed.


(If there are many files, select "*.PMC" to display PMC files only.)

- 116 -
B-82614EN/02 5. TEACH PENDANT OPERATION

(3) Move the cursor on the file to load, and press , LOAD. The following message is displayed.

(4) Press , YES, the file is loaded.

Notes on loading LADDER.PMC


The teach pendant E-STOP button or operator panel E-STOP button must be pressed to load
LADDER.PMC, if the controller is not in controlled start mode.
If LADDER.PMC is loaded, the previous PMC program is lost.
The running PMC program is not changed by loading LADDER.PMC. To run the loaded PMC program,
you must turn the robot Controller on.

CAUTION
If "PRIO-145 Purging flash file, please wait" is displayed when you
are loading LADDER.PMC, the robot controller system is arranging ROM data,
and it takes about a few minutes. In this case, wait until the message "PRIO-146
Flash file purge is completed" is displayed on the robot controller teach
pendant. Do not shut down power during this processing. Otherwise, corruption
of memory could occur.

Notes on loading PARAM.PMC


If the controller is not in Controlled Start mode, the PMC program must be stopped to load PARAM.PMC.
If PARAM.PMC is loaded, the previous value of backed up internal relays is lost.

All restore
The "All restore" function in the File menu of the Controlled Start mode can load all files in the selected
external file device. LADDER.PMC and PARAM.PMC are also loaded by the "All restore" function.

NOTE
All robot programs and settings are lost by the following procedure. The
programs and settings become that of the files that are restored.

(1) Turn the robot controller off. Then press and hold and keys on teach pendant, and turn on
the robot controller. The following menu is displayed.

- 117 -
5. TEACH PENDANT OPERATION B-82614EN/02

(2) Select "Controlled start", and wait a moment. The following menu is displayed.

(3) Press MENU and select "File". The File menu is displayed.

(4) Press , [RESTOR]. The following menu is displayed.

(5) Select All of above. The following message is displayed.

(6) Press YES.

Load STDLDR.PMC
You can not load STDLDR.PMC. You must rename it to LADDER.PMC to load it.
To use the standard PMC program temporarily, set "Use standard ladder" item in the Parameters menu to
ENABLE, then turn off the controller, then turn it on again.

- 118 -
B-82614EN/02 6. BASIC COMMAND REFERENCE

6 BASIC COMMAND REFERENCE


6.1 RD
(1) Format

(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. 6.1 and entries in
the coding sheet of Table 6.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).

Fig.6.1 Ladder diagram

- 119 -
6. BASIC COMMAND REFERENCE B-82614EN/02

Table 6.1 Coding for Fig. 6.1


Coding sheet Status of operating result
Step Address
Instruction Bit No. Remarks ST2 ST1 ST0
Number No.
1 RD X10 . 1 A A
2 AND X2 . 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

6.2 RD. NOT


(1) Format

(2) Inverts the status of a signal at a specified address and sets it in ST0.
(3) Is used when beginning coding with contact B ( ). See the ladder diagram of Fig. 6.2 and entries in
the coding sheet of Table 6.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.

Fig.6.2 Ladder diagram

- 120 -
B-82614EN/02 6. BASIC COMMAND REFERENCE
Table 6.2 Coding for Fig. 6.2
Coding sheet Status of operating result
Step Address
Instruction Bit No. Remarks ST2 ST1 ST0
Number No.
1 RD. NOT R1 . 1 A A
2 AND . NOT R2 . 2 B A·B
3 AND . NOT R3 . 3 C A·B·C
4 WRT R210 . 1 W1 output A·B·C
5 RD. NOT R5 . 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

6.3 WRT
(1) Format

(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. 6.3 and Table 6.3.

Fig.6.3 Ladder diagram

Table 6.3 Coding for Fig. 6.3


Coding sheet Status of operating result
Step Address
Instruction Bit No. Remarks ST2 ST1 ST0
Number No.
1 RD R220 . 1 A A
2 OR X4 . 2 B A+B
3 AND R2 . 2 C (A+B)·C
4 WRT Y11 . 1 W1 output (A+B)·C
5 WRT Y14 . 6 W2 output (A+B)·C

- 121 -
6. BASIC COMMAND REFERENCE B-82614EN/02

6.4 WRT. NOT


(1) Format

(2) Inverts the results of logical operations, that is, the status of ST0 and outputs it to a specified address.
Fig. 6.4 and Table 6.4 show an example on using the WRT.NOT instruction.

Fig.6.4 Ladder diagram

Table 6.4 Coding for Fig. 6.4


Coding sheet Status of operating result
Step Address
Instruction Bit No. Remarks ST2 ST1 ST0
Number No.
1 RD R220 . 1 A A
2 OR X4 . 2 B A+B
3 AND R2 . 2 C (A+B)·C
4 WRT Y11 . 1 W1 output (A+B)·C
5 WRT. NOT Y14 . 6 W2 output (A+B)·C

6.5 AND
(1) Format

(2) Induces a logical product.


(3) See Fig. 6.1 and Table 6.1 for an example of using the AND instruction.

- 122 -
B-82614EN/02 6. BASIC COMMAND REFERENCE

6.6 AND. NOT


(1) Format

(2) Inverts the status of a signal at a specified address and induces a logical product.
(3) See Fig. 6.1 and Table 6.1 for an example of using the AND.NOT instruction.

6.7 OR
(1) Format

(2) Induces a logical sum.


(3) See Fig. 6.1 and Table 6.1 for an example of using the OR instruction.

6.8 OR. NOT


(1) Format

(2) Inverts the status of a signal at a specified address and induces a logical sum.
(3) See Fig. 6.1 and Table 6.1 for an example of using the OR.NOT instruction.

6.9 RD. STK


(1) Format

- 123 -
6. BASIC COMMAND REFERENCE B-82614EN/02

(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. 6.9 and Table 6.9 for an example of using the RD.STK instruction.

Fig.6.9 Ladder diagram

Table 6.9 Coding for Fig. 6.9


Coding sheet Status of operating result
Step Instructio Address
Bit No. Remarks ST2 ST1 ST0
Number n No.
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

6.10 RD. NOT. STK


(1) Format

(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. 6.10 and Table 6.10 for an example of using the RD.NOT.STK instruction.

- 124 -
B-82614EN/02 6. BASIC COMMAND REFERENCE

Fig.6.10 Ladder diagram

Table 6.10 Coding for Fig. 6.10


Coding sheet Status of operating result
Step Address
Instruction Bit No. Remarks ST2 ST1 ST0
Number No.
1 RD X1 . 0 A A
2 AND. NOT X1 . 1 B A·B
3 RD.NOT.S R1 . 4 C A·B C
TK
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 (A·B+C·D)·(E·F+G·H)
output
13
14

6.11 AND. STK


(1) Format

(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. 6.10 and Table 6.10 for an example of using the AND.STK instruction.

6.12 OR. STK


(1) Format

- 125 -
6. BASIC COMMAND REFERENCE B-82614EN/02

(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. 6.9 and Table 6.9 or Fig. 6.10 and Table 6.10 for examples of using the OR.STK instruction.

NOTE
In Table 6.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 6.9, because
coding OR.STK or AND.STK in succession is prone to cause an error.

6.13 SET
(1) Format

(2) The result STO of the logical operation is set to a specified address. The result is held until an RST is
issued.
(3) Refer to the figure below for an example of using the SET instruction.

Fig.6.13 Ladder diagram

Table 6.13 Coding for Fig. 6.13


Coding sheet Status of operating result
Step Address
Instruction Bit No. Remarks ST2 ST1 ST0
Number No.
1 RD R0 . 0 A A
2 OR X0 . 0 B A+B
Y0.0
3 SET Y0 . 0 - - (A+B)+C
output
- 126 -
B-82614EN/02 6. BASIC COMMAND REFERENCE
(4) Remarks
• The relation between COM and COME.
The operation of SET/RST in the section of COM/COME is as follows.
COM condition ON (ACT=1) : It operates usually.
COM condition OFF (ACT=0) : SET does not operate.

6.14 RST
(1) Format

(2) The result STO of the logical operation will reset the specified address.
(3) Refer to the figure below for an example of using the RST instruction.

Fig.6.14 Ladder diagram

Table 6.14 Coding for Fig. 6.14


Coding sheet Status of operating result
Step Address
Instruction Bit No. Remarks ST2 ST1 ST0
Number No.
1 RD R0 . 0 A A
2 OR X0 . 0 B A+B
3 Y0.0
SET Y0 . 0 - (A+B)+C
output

(4) Remarks
• The relation between COM and COME.
The operation of SET/RST in the section of COM/COME is as follows.
COM condition ON (ACT=1) : It operates usually.
COM condition OFF (ACT=0) : RST does not operate.

- 127 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7 FUNCTION COMMAND REFERENCE


This chapter explains the detail of all function commands.

7.1 ADD (ADDITION)

7.1.1 Function
Adds BCD two-or four-digit data.

7.1.2 Format
Fig.7.1.2 shows the expression format and Table 7.1.2 shows the coding format.

Fig.7.1.2 ADD instruction format

Table 7.1.2 ADD instruction coding


Coding sheet Memory status of control conditions
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . RST BYT RST
3 RD. STK . ACT BYT RST ACT
4 SUB 19 ADD instruction
5 (PRM) Addend format
6 (PRM) Summand address
7 (PRM) Addend (address)
8 (PRM) Sum output address
9 WRT Error output W1

7.1.3 Control Conditions


(a) Specify the number of digits of data.
BYT=0 : Data is BCD two digits long.
BYT=1 : Data is BCD four digits long.
(b) Reset
- 128 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE
RST=0 : Release reset.
RST=1 : Resets error output W1, that is, sets W1 to 0.
(c) Execution command
ACT=0 : The ADD instruction is not executed.
ACT=1 : The ADD instruction is executed.

7.1.4 Data Format of Addend


0: Specifies addend with a constant.
1: Specifies addend with an address.

7.1.5 Summand Address


Set the address storing the summand.

7.1.6 Addend (Address)


Addressing of the addend depends on 7.1.4.

7.1.7 Sum Output Address


Set the address to which the sum is to be output.

7.1.8 Error Output


If the sum exceeds the data size specified in 7.1.3-a), W1=1 is set to indicate an error.

7.2 ADDB (BINARY ADDITION)

7.2.1 Function
This instruction performs binary addition between 1-, 2-, and 4-byte data. In the operation result register
(R9000), operating data is set besides the numerical data representing the operation results. The required
number of bytes is necessary to store each augend, the added, and the operation output data.

7.2.2 Format

7.2.3 Control Conditions


(a) Reset (RST)
RST=0 : Release reset
- 129 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

RST=1 : Resets error output W1. In other words, makes W1=0.


(b) Command (ACT)
ACT=0 : Do not execute ADDB. W1 does not change now.
ACT=1 : Execute ADDB.

7.2.4 Parameters
(a) Format specification
Specifies data length (1,2, and 4 bytes) and the format for the addend (constant or address).

(b) Augend address


Address containing the augend.
(c) Addend data (address)
Specification in (a) determines the format of the addend.
(d) Result output address
Specifies the address to contain the result of operation.

7.2.5 Error Output (W1)


W1=0 : Operation correct
W1=1 : Operation incorrect
W1 goes on (W1=1) if the result of addition exceeds the specified data length.

7.2.6 Operation Output Register (R9000)


This register is set with data on operation. If register bit is on, they signify the following operation data:

- 130 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.3 LOGICAL AND

7.3.1 Function
The AND instruction ANDs the contents of address A with a constant (or the contents of address B), and
stores the result at address C.

7.3.2 Format

7.3.3 Control Conditions


(a) Input signal
ACT=0 : The AND instruction is not executed.
ACT=1 : The AND instruction is executed.

7.3.4 Parameters
(a) Format specification
Specify a data length (1, 2, or 4 bytes), and an input data format (constant or address specification).

(b) Address A
Input data to be combined in the AND operation. The data that is held starting at this address and has
the data length specified in format specification is treated as input data.
(c) Constant or address B
Input data to be combined in the AND operation. When address specification is selected in format
specification, the data that is held starting at this address and has the data length specified in format
specification is treated as input data.
(d) Address C
Address used to store the result of an AND operation. The result of an AND operation is stored
starting at this address, and has the data length specified in format specification.
7.3.5 Operation
When address A and address B hold the following data:

- 131 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

The result of the AND operation is as follows:

7.4 CALL (CONDITIONAL SUBPROGRAM CALL)

7.4.1 Function
The CALL functional instruction calls a subprogram. When a subprogram number is specified in CALL, a
jump occurs to the subprogram if a condition is satisfied.

7.4.2 Format

7.4.3 Control Conditions


(a) Input signal
ACT=0 : The CALL instruction is not executed.
ACT=1 : The CALL instruction is executed.

7.4.4 Parameters
(a) Subprogram number
Specifies the subprogram number of a subprogram to be called. The subprogram number must be
specified in the P address form.
Example : To call subprogram 1

- 132 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

NOTE
Be careful when using the CALL instruction with the COM, COME, JMP, or JMPE
functional instruction.

7.5 CALLU (UNCONDITIONAL SUBPROGRAM CALL)

7.5.1 Function
The CALLU functional instruction calls a subprogram. When a subprogram number is specified, a jump
occurs to the subprogram.

7.5.2 Format

7.5.3 Parameters
(a) Subprogram number
Specifies the subprogram number of a subprogram to be called. The subprogram number must be
specified in the P address form. A number from P1 to P512 can be specified.
Example : To call subprogram 1

7.6 COD (CODE CONVERSION)

7.6.1 Function
COD converts BCD codes into an arbitrary two- or four-digits BCD numbers. For code conversion shown
in Fig.7.6.1 the conversion input data address, conversion table, and convert data output address must be
provided.
Set a table address, in which the data to be retrieved from the conversion table is contained, to conversion
table input data address in a two-digits BCD number. The conversion table is entered in sequence with the
numbers to be retrieved in the two- or four-digits number. The conversion input data address number is
used to retrieve the contents of the conversion table. The number that is retrieved is output to the convert
data output address. As shown in Fig.7.6.1, when 3 is entered in the conversion input data address, the
contents 137 located at 3 in the conversion table is output to the convert data output address.

- 133 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.6.1 Code conversion diagram

7.6.2 Format
Fig.7.6.2 shows the format for the COD instruction and Table 7.6.2 shows the coding format.

Fig.7.6.2 COD instruction

- 134 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE
Table 7.6.2 Coding for Fig.7.6.2
Coding sheet Memory status of control condition
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . RST BYT RST
3 RD. STK . ACT BYT RST ACT
4 SUB 7 COD instruction
5 (PRM) Size of table data (1)
6 (PRM) Conversion input data address
(2)
7 (PRM) Convert data output address
(3)
8 (PRM) Convert data at table address 0
(4)
9 (PRM) Convert data at table address 1
(5)
10 : : :
11 WRT . Error output W1

7.6.3 Control Conditions


(a) Specify the data size.
BYT=0 : Specifies that the conversion table data is to be BCD two digits.
BYT=1 : Specifies that the conversion table data is to be BCD four digits.
(b) Error output reset
RST=0 : Disable reset
RST=1 : Sets error output W1 to 0 (resets).
(c) Execution command
ACT=0 : The COD instruction is not executed. W1 does not change.
ACT=1 : Executed.

7.6.4 Size of Table Data


A conversion table data address from 0 to 99 can be specified.
Specify n+1 as the size of table when n is the last table internal number.

7.6.5 Conversion Input Data Address


The conversion table address includes a table address in which converted data is loaded. Data in the
conversion table can be retrieved by specifying a conversion table address.
One byte (BCD 2-digit) is required for this conversion input data address.

7.6.6 Convert Data Output Address


The convert data output address is the address where the data stored in the table is to be output. The convert
data BCD two digits in size, requires only a 1-byte memory at the convert data output address.
Convert data BCD four digits in size, requires a 2-byte memory at the convert data output address.

7.6.7 Error Output (W1)


If an error occurs in the conversion input address during execution of the COD instruction, W1=1 to
indicate an error.
- 135 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

For example, W1=1 results if a number exceeding the table size specified in the sequence program is
specified as the conversion input address. When W1=1, it is desirable to effect an appropriate interlock,
such as having the error lamp on the machine tool operator's panel light or stopping axis feed.

7.6.8 Conversion Data Table


The size of the conversion data table is from 00 to 99.
The conversion data can be either BCD two digits or four digits, which is specified depends on the control
conditions

7.7 CODB (BINARY CODE CONVERSION)

7.7.1 Function
This instruction converts data in binary format to an optional binary format 1-byte, 2-byte, or 4-byte data.
Conversion input data address, conversion table, and conversion data output address are necessary for data
conversion; as shown in Fig.7.7.1.
Compared to the 7.6 "COD Function Instruction", this CODB function instruction handles numerical data
1-, 2- and 4-byte length binary format data, and the conversion table can be extended to maximum 256.

Fig.7.7.1 Code conversion diagram

7.7.2 Format
Fig.7.7.2 shows the expression format of CODB.

Fig.7.7.2 Expression format of CODB

- 136 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.7.3 Control Conditions


(a) Reset (RST)
RST=0 : Do not reset.
RST=1 : Reset error output W1 (W1=0).
(b) Activate command (ACT)
ACT=0 : Do not execute CODB instruction
ACT=1 : Execute CODB instruction.

7.7.4 Parameters
(a) Format designation
Designates binary numerical size in the conversion table.
1 : Numerical data is binary 1-byte data.
2 : Numerical data is binary 2-byte data.
4 : Numerical data is binary 4-byte data.
(b) Number of conversion table data
Designates size of conversion table. 256 (0 to 255) data can be made.
(c) Conversion input data address
Data in the conversion data table can be taken out by specifying the table number. The address
specifying the table number is called conversion input data address, and 1-byte memory is required
from the specified address.
(d) Conversion data output address
Address to output data stored in the specified table number is called conversion data output address.
Memory of the byte length specified in the format designation is necessary from the specified address.

7.7.5 Conversion Data Table


Size of the conversion data table is maximum 256 (from 0 to 255).
This conversion data table is programmed between the parameter conversion data output address of this
instruction and the error output (W1).

7.7.6 Error Output (W1)


If there are any abnormalities when executing the CODB instruction, W1=1 and error will be output.

7.8 COIN (COINCIDENCE CHECK)

7.8.1 Function
Checks whether the input value and comparison value coincide.
This instruction is available with BCD data.

7.8.2 Format
Fig.7.8.2 shows the expression format and Table 7.8.2 shows the coding format.

- 137 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.8.2 COIN instruction format

Table 7.8.2 COIN instruction coding


Coding sheet Memory status of control condition
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . ACT BYT ACT
3 SUB 16 COIN instruction
4 (PRM) Reference value
format
5 (PRM) Reference value
6 (PRM) Comparison value
address
7 WRT W1: Checking result W1
.
output

7.8.3 Control Conditions


(a) Specifies the data size.
BYT=0 : Process data (input value, and comparison values).
Each BCD is two digits long.
BYT=1 : Each BCD four digits long.
(b) Execution command
ACT=0 : The COIN instruction is not executed. W1 does not change.
ACT=1 : The COIN instruction is executed and the results is output to W1.

7.8.4 Input Data Format


0 : Specifies input data as a constant.
1 : Specifies input data as an address.

7.8.5 Input Data


The input data can be specified as either a constant or an address storing it. The selection is made by a
parameter of format designation.

7.8.6 Comparison Data Address


Specifies the address storing the comparison data.

- 138 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.8.7 Comparison Result Output


W1=0 : Input data ≠ Comparison data
W1=1 : Input data = Comparison data

7.9 COM (COMMON LINE CONTROL)

7.9.1 Function
The COM instruction controls the coils in a range up to a common line control end instruction (COME).
(See Fig.7.9.1) Specify 0 as the number of coils, and specify a range to be controlled using the common line
end instruction.
When the common line end instruction is not specified, the message COM FUNCTION MISSING is
displayed.

Fig.7.9.1 Function of COM

7.9.2 Format
Fig.7.9.2 shows the expression format of the functional instruction COM.

Fig.7.9.2 Expression Format of COM

7.9.3 Control Conditions


ACT = 0 : The coils in the specified range are unconditionally turned off (set to 0).
ACT = 1 : The same operation as when COM is not used is performed.

- 139 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.9.4 Parameters
(a) Specify 0. (Range specification only)

NOTE
1 COM instruction operation
Suppose the following Ladder diagram including a COM instruction exists:

Then, for the coil "OUTx," this Ladder diagram has the same effect as the
following Ladder diagram:

Therefore, the functional instructions in the range specified with a COM


instruction are processed, regardless of the setting of ACT of the COM
instruction. Note, however, that the coil for the execution of a functional
instruction is unconditionally set to 0 when COM ACT = 0.
2 In the range specified with a COM instruction, no additional COM instruction can
be specified.
3 As explained in the figures in Note 1, the coil for WRT.NOT in the range specified
with a COM instruction is unconditionally set to 1 when COM ACT = 0.

7.9.5 Caution
Do not create a program in which a combination of JMP and JMPE instructions are used to cause a jump to
and from a sequence between the COM and COME instructions; the ladder sequence might not be able to
operate normally after the jump.

- 140 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.10 COME (COMMON LINE CONTROL END)

7.10.1 Function
This instruction indicates the division in the region specification of the
common line control instruction (COM).
This instruction cannot be used alone. It must be used together with the COM instruction.

7.10.2 Format
Fig.7.10.2 shows the expression format of COME

Fig.7.10.2 Expression format of COME

7.11 COMP (COMPARISON)

7.11.1 Function
Compares input and comparison values.

7.11.2 Format
Fig.7.11.2 shows the expression format and Table 7.11.2 shows the coding format.

- 141 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.11.2 COMP instruction format

Table 7.11.2 COMP instruction coding


Coding sheet Memory status of control condition
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . ACT BYT ACT
3 SUB 15 COMP instruction
4 (PRM) Input data format
5 (PRM) Input data
6 (PRM) Comparison data
address
7 WRT W1: Comparison result W1
.
output

7.11.3 Control Conditions


(a) Specifies the data size.
BYT=0 : Process data (input value and comparison value) is BCD two digits long.
BYT=1 : Process data (input value and comparison value) is four digits long.
(b) Execution command
ACT=0 : The COMP instruction is not executed. W1 does not alter.
ACT=1 : The COMP instruction is executed and the result is output to W1.

7.11.4 Input Data Format


0: Specifies input data with a constant.
1: Specifies input data with an address
Not specify input data directly, but specify an address storing input data.

7.11.5 Parameter
The input data can be specified as either a constant or the address storing it. The selection is made by a
parameter of format specification.

7.11.6 Comparison Data Address


Specifies the address storing the comparison data.

- 142 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.11.7 Comparison Result Output


W1=0 : Input data > Comparison data
W1=1 : Input data ≤ Comparison data

7.12 COMPB (COMPARISON BETWEEN BINARY DATA)

7.12.1 Function
This instruction compares 1, 2, and 4-byte binary data with one another. Results of comparison are set in the
operation output register (R9000). Sufficient number of bytes are necessary in the memory to hold the input
data and comparison data.

7.12.2 Format
Fig.7.12.2 shows the expression format of COMPB.

Fig.7.12.2 Expression format of COMPB

7.12.3 Control Conditions


(a) Command (ACT)
ACT=0 : Do not execute COMPB.
ACT=1 : Execute COMPB.

7.12.4 Parameters
(a) Format specification
Specify data length (1,2, or 4 bytes) and format for the input data ('constants data' or 'address data').

(b) Input data (address)


Format for the input data is determined by the specification in a).
(c) Address of data to be compared
Indicates the address in which the comparison data is stored.
- 143 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.12.5 Operation Output Register (R9000)


The data involved in the operation are set in this register. This register is set with data on operation. If
register bit 1 is on, they indicate the following:

7.13 CTR (COUNTER)

7.13.1 Function
CTR is used as a counter. Counters are used for various purposes.
Numerical data such as preset values and count values can be used with either BCD format or binary format
by a system parameter.

NOTE
In BCD format, every four bits can be equal to 0-9. If the four bits equal A-F, the
value is incorrect for BCD format. When the CTR function is selected to use BCD
format, if the preset value or the current value of the CTR has an incorrect value,
the CTR function command does not work correctly.

This counter has the following functions to meet various applications.


(a) Preset counter
Outputs a signal when the preset count is reached. The number can be preset from the PMC screen, or
set in the sequence program.
(b) Ring counter
Upon reaching the preset count, returns to the initial value by issuing another count signal.
(c) Up/down counter
The count can be either up or down.
(d) Selection of initial value
Selects the initial value as either 0 or 1.
A combination of the preceding functions results in the ring counter below.

- 144 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

Such a counter permits the position of a rotor to be memorized.

7.13.2 Format
Fig.7.13.2 show the expression format and Table 7.13.2 show the coding format.

Fig.7.13.2 Format of CRT instruction

Table 7.13.2 Coding for Fig.7.13.2


Coding sheet Memory status of control condition
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . CN0 CN0
2 RD. STK . UPDOWN CN0 UPDOWN
3 RD. STK . RST CN0 UPDOWN RST
4 RD. STK . ACT CN0 UPDOWN RST ACT
5 SUB 5 CTR instruction CN0 UPDOWN RST ACT
6 (PRM) Counter number CN0 UPDOWN RST ACT
7 WRT . W1 output number CN0 UPDOWN RST W1

7.13.3 Control Conditions


(a) Specifies the initial value. (CN0)
CN0=0: Begins the value of the counter with 0.
0, 1, 2, 3 ····· n.
CN0=1: Begins the value of the counter with 1 (0 is not used).
1, 2, 3 ····· n.
(b) Specifies up or down counter.
- 145 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

UPDOWN=0:
Up counter. The counter begins with 0 when CN0=0; 1 when 1.
UPDOWN=1:
Down counter. The counter begins with the preset value.
(c) Reset (RST)
RST=0: Releases reset.
RST=1: Enables reset.
W1 becomes 0. The integrated value is reset to the initial value.

NOTE
Set RST to 1, only when reset is required.

(d) Count signal (ACT)

7.13.4 Counter Number


The preset value and cumulative value are two bytes counter.
These values are able to be set 1 to 20.

WARNING
If the counter number is duplicated, or falls outside the valid range, the operation
will be unpredictable.

7.13.5 Countup Output (W1)


When the count is up to a preset value, W1=1. The address of W1 can be determined arbitrarily.
When the counter reaches the set value, W1 is set to 1.
When the counter reaches 0 or 1, W1 is set to 1.

7.13.6 Examples of Using the Counter


[Example 1]
As a preset counter (See Fig.7.13.6 (a))
The number of workpieces to be machined is counted. When the number reaches the preset count, a signal
is output.
• L1 is a circuit to make logic 1.
• Since the count ranges from 0 to 9999, contact B of L1 is used for making CN0=0.
• Since it is to be up counter, contract B of L1 is used make UPDOWN=0.
• The reset signal of the counter uses input signal CRST.M.
• The count signal is M30X. M30X contains contact B of CUP to prevent counting past the preset
value, as long as reset is not enabled after the counter is indexed by one number.
- 146 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

Fig.7.13.6 (a) Ladder diagram for the counter, example 1

[Example 2]
Use of the counter to store the position of a rotor. (See Fig.7.13.6 (b))

Fig.7.13.6 (b) Ladder diagram for the counter, example 2

- 147 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.13.6 (c) Indexing for a rotor

Fig.7.13.6 (b) shows a ladder diagram for a counter to store the position of a rotor of Fig.7.13.6 (c).
(1) Control conditions
(a) Count start number
When a 12-angle rotor shown in Fig.7.13.6 (c) is used, the count starting number is 1. Contact A
of L1 is used for making CN0=1.
(b) Specify up and down
The signal REV changes according to the current direction of rotation. It becomes 0 for forward
rotation and 1 for reverse rotation. Thus, the counter is an up counter for forward rotation and a
down counter for reverse rotation.
(c) Reset
In this example, since W1 is not used, RST=0, and contact B of L1 is used.
(d) Count signal
The count signal POS turns on and off 12 times each time the rotor rotates once.
(2) Counter number and W1
In this example, the second counter is used. The result of W1 is not used, but its address must be
determined.
(3) Operation
(a) Setting the preset value
Since the rotor to be controlled is 12-angle as shown in Fig.7.13.6 (c), 12 must be preset in the
counter. It is set from the PMC screen.
(b) Setting the current value
When the power is turned on, the position of the rotor must be equated with the count on the
counter. The count is set via the PMC screen. Once a current value is set, then correct current
positions will be loaded to the counter every time.
(c) The POS signal turns on and off each time the rotor rotates.
The number of times of the POS signal turns on and off is counted by the counter, as below.
1, 2, 3, . . . 11, 12, 1, 2, . . .
for forward rotation
1, 12, 11, . . . 3, 2, 1, 12 . . .
for reverse rotation

7.14 CTRC (COUNTER)

7.14.1 Functions
The numeric data of this counter is binary. This counter has the following functions and can be used
according to the application:
(a) Preset counter
Preset the count value and if the count reaches this preset value, turn on the output.
- 148 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE
(b) Ring counter
This is the ring counter which is reset to the initial value when the count signal is input after the count
reaches the preset value.
(c) Up/down counter
This is the reversible counter to be used as both the up counter and down counter.
(d) Selection of the initial value
Either 0 or 1 can be selected as the initial value.

7.14.2 Format
Fig.7.14.2 and Table 7.14.2 show the expression format and the coding format, respectively.

Fig.7.14.2 CTRC expression format

Table 7.14.2 CRTC coding format


Step Address
Instruction Bit No. Remarks
Number No.
1 RD . CN0
2 RD.STK . UPDOWN
3 RD.STK . RST
4 RD.STK . ACT
5 SUB 55 CRTC command
6 (PRM) Counter preset address
7 (PRM) Counter register address
8 WRT . W1

7.14.3 Control Conditions


(a) Specifying the initial value (CN0)
CN0=0 : The count value starts with "0". 0, 1, 2, 3, . . . n
CN0=1 : The count value starts with "1". 1, 2, 3, . . . n
(b) Specifying up or down count (UPDOWN)
UPDOWN=0:
Up counter.
The initial value is "0" when CN0=0 or "1" when CN0=1.
UPDOWN=1:
Down counter. The initial value is the preset value.
(c) Reset (RST)
RST=0 : Reset cancelled.
RST=1 : Reset. W1 is reset to "0". The accumulated value is reset to the initial value.
(d) Count signal (ACT)
ACT=0 : The counter does not operate. W1 does not change.
- 149 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

ACT=1 : The counter operates at the rise of this signal.

7.14.4 Counter Preset Value Address


The first address of the counter preset value field is set.
The continuous 2-byte memory space from the first address is required for this field. Field D (Data Table)
is normally used.

The counter preset value is binary. Therefore, it ranges from 0 to 32767.

7.14.5 Counter Register Address


The first address of the counter register field is set.
The continuous 4-byte memory space from the first address is required for this field. Field D (Data Table)
is normally used.

NOTE
When field R (Register) is specified as the counter register address, the counter
starts with count value "0" after the controller is turned on.

7.14.6 Count-up Output (W1)


If the count value reaches the preset value, W1 is set to "1".
The W1 address can be determined freely by the programmer.

7.15 DCNV (DATA CONVERSION)

7.15.1 Function
Converts binary-code into BCD-code and vice versa.

7.15.2 Format
Fig.7.15.2 shows the expression format and Table 7.15.2 shows the coding format.

- 150 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

Fig.7.15.2 DCNV instruction format

Table 7.15.2 DCNV instruction coding


Coding sheet Memory status of control condition
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . CNV BYT CNV
3 RD. STK . RST BYT CNV RST
4 RD. STK . ACT BYT CNV RST ACT
5 SUB 14 DCNV instruction
6 (PRM) (1) Input data address
7 (PRM) (2) Conversion result output address
8 WRT . W1 error output W1

7.15.3 Control Conditions


(a) Specifies the data size.
BYT=0 : Process data in length of one byte (8 bits)
BYT=1 : Process data in length of two byte (16 bits)
(b) Specifies the type of conversion
CNV=0 : Converts binary-code into BCD-code.
CNV=1 : Converts BCD-code into binary-code.
(c) Reset
RST=0 : Disables reset.
RST=1 : Resets error output W1. That is, setting RST to 1 when W1, makes W1=0.
(d) Execution command
ACT=0 : Data is not converted. W1 does not alter.
ACT=1 : Data is converted.

7.15.4 Error Output (W1)


W1=0 : Normal
W1=1 : Conversion error
W1=1 if the input data which should be BCD data, is binary data, or if the data size (byte length) specified
in advance is exceeded when converting binary data into BCD data.

- 151 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.16 DCNVB (EXTENDED DATA CONVERSION)

7.16.1 Function
This instruction converts 1, 2, and 4-byte binary code into BCD code or vice versa. To execute this
instruction, you must preserve the necessary number of bytes in the memory for the conversion result output
data.

7.16.2 Format
Fig.7.16.2 shows the expression format of DCNVB

Fig.7.16.2 Expression format of DCNVB

7.16.3 Control Conditions


(a) Sign of the data to be converted (SIN)
This parameter is significant only when you are converting BCD data into binary coded data. It gives
the sign of the BCD data.
Note that though it is insignificant when you are converting binary into BCD data, you cannot omit it.
SIN=0 : Data (BCD code) to be input is positive.
SIN=1 : Data (BCD code) to be input is negative.
(b) Type of conversion (CNV)
CNV=0 : Convert binary data into BCD data
CNV=1 : Convert BCD data into binary data.
(c) Reset (RST)
RST=0 : Release reset
RST=1 : Reset error output W1. In other words, set W1=0.
(d) Execution command (ACT)
ACT=0 : Data is not converted. The value of W1 remains unchanged.
ACT=1 : Data is converted.

7.16.4 Parameters
(a) Format specification
Specify data length (1,2, or 4 bytes).
Use the first digit of the parameter to specify byte length.
1 : one byte

- 152 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE
2 : two bytes
4 : four bytes
(b) Input data address
Specify the address containing the input data address.
(c) Address for the conversion result output
Specify the address to output the data converted to BCD or binary format.

7.16.5 Error Output (W1)


W1=0 : Correct conversion
W1=1 : Abnormally
(The data to be converted is specified as BCD data but is found to be binary data, or the specified number of
bytes cannot contain (and hence an overflow occurs) the BCD data into which a binary data is converted.)

7.16.6 Operation Output Register (R9000)


This register is set with data on operation. If register bit 1 is on, they
signify the following.
For the positive/negative signs when binary data is converted into BCD data, see R9000.

7.17 DEC (DECODE)

7.17.1 Function
Outputs 1 when the two-digit BCD code signal is equal to a specified number, and 0 when not.

7.17.2 Format
Fig.7.17.2 and Table 7.17.2 show the expression format and Table 7.17.2 show the coding format.

Fig.7.17.2 Format of DEC

- 153 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Table 7.17.2 Coding of DEC


Step Address Bit
Instruction Remarks
Number Number Number
1 RD . ACT
2 DEC
3 (PRM)
4 WRT . W1, Decoding result output

7.17.3 Control Condition


ACT=0 : Turns the decoding result output off (W1).
ACT=1 : Performs decoding.
When the specified number is equal to the code signal, W1=1; when not, W1=0.

7.17.4 Code Signal Address


Specifies the address containing two-digit BCD code signals.

7.17.5 Decode Specification


There are two paths, the number and the number of digits.
Decode specification

(i) Number:
Specify the decode number.
Must always be decoded in two digits.
(ii) Number of digits:
01 : The high-order digit of two decimal digits is set to 0 and only the low-order digit is decoded.
10 : The low-order digit is set to 0 and only the high-order digit is decoded.
11 : Two decimal digits are decoded.

7.17.6 W1 (Decoding Result Output)


W1 is 1 when the status of the code signal at a specified address is equal to a specified number, 0 when not.
The address of W1 is determined by designer.

Fig.7.17.6 Ladder diagram using the DEC instruction

- 154 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE
Table 7.17.6 Coding for Fig.7.17.6
Coding sheet
Step Address Bit
Instruction Remarks
Number Number Number
1 RD R 7.0
2 AND R 1 .3
3 DEC R10
4 (PRM) 3011
5 WRT R228 . 1 M30X

7.18 DECB (BINARY DECODING)

7.18.1 Function (Fig.7.18.2 (a), (b))


DECB decodes one, two, or four-byte binary code data. When one of the specified eight consecutive
numbers matches the code data, a logical high value (value 1) is set in the output data bit which corresponds
to the specified number. When these numbers do not match, a logical low value (value 0) is set.
Of the eight contiguous numbers, specify the first number in the parameter of this function instruction.

7.18.2 Format

Fig.7.18.2 (a) Function of DECB

Fig.7.18.2 (b) Expression format of DECB

- 155 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.18.3 Control Conditions


(a) Command (ACT)
ACT=0 : Resets all the output data bits.
ACT=1 : Decodes data.
Results of processing is set in the output data address.

7.18.4 Parameters
(a) Format specification
Set the size of code data to the 1st digit of the parameter.
0001 : Code data is in binary format of 1 byte length
0002 : Code data is in binary format of 2 byte length
0004 : Code data is in binary format of 4 byte length
(b) Code data address
specifies an address at which code data is stored.
(c) Number specification decode designation
Specifies the first of the 8 continuous numbers to be decoded.
(d) Decode result address
Specifies an address where the decoded result shall be output.
A one-byte area is necessary in the memory for the output.

7.19 DIFD (FALLING EDGE DETECTION)

7.19.1 Function
The DIFD instruction sets the output signal to 1 for one scanning period on a falling edge of the input signal.

7.19.2 Format

7.19.3 Control Conditions


(a) Input signal
On a falling edge(1→0)of the input signal, the output signal is set to 1.
(b) Output signal
The output signal level remains at 1 for one scanning period of the ladder level where this functional
instruction is operating.

7.19.4 Parameters
(a) Falling edge number
Specify the values from 1 to 256.

- 156 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

WARNING
If the same number is used for another DIFD instruction or a DIFU instruction in
one ladder diagram, operation is not guaranteed.

7.19.5 Operation

7.20 DIFU (RISING EDGE DETECTION)

7.20.1 Function
The DIFU instruction sets the output signal to 1 for one scanning cycle on a rising edge of the input signal.

7.20.2 Format

7.20.3 Control Conditions


(a) Input signal
On a rising edge (0→1) of the input signal, the output signal is set to 1.
(b) Output signal
The output signal level remains at 1 for one scanning cycle of the ladder level where this functional
instruction is operating.

7.20.4 Parameters
(a) Rising edge number
Specify the values from 1 to 256.

CAUTION
If the same number is used for another DIFU instruction or a DIFD instruction in
one Ladder diagram, the operation is not guaranteed to work correctly.

- 157 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.20.5 Operation

7.21 DIV (DIVISION)

7.21.1 Function
Divides BCD two-or four-digit data. Remainders are discarded.

7.21.2 Format
Fig.7.21.2 shows the expression format and Table 7.21.2 shows the coding format.

Fig.7.21.2 DIV instruction format

Table 7.21.2 DIV instruction coding


Coding sheet Memory status of control conditions
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . RST BYT RST
3 RD. STK . ACT BYT RST ACT
4 SUB 22 DIV instruction
5 (PRM) Data format of divider
6 (PRM) Dividend address
7 (PRM) Divider (address)
8 (PRM) Quotient output
address
9 WRT . Error output W1

- 158 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.21.3 Control Conditions


(a) Specifies the number of digits of data.
BYT=0 : Data is BCD two digits long.
BYT=1 : Data is BCD four digits long.
(b) Reset
RST=0 : Releases reset.
RST=1 : Resets error output W1, that is, sets W1 to 0.
(c) Execution command
ACT=0 : The DIV instruction is not executed. W1 does not change.
ACT=1 : The DIV instruction is executed.

7.21.4 Divisor Data Format Designation


0: Specifies divisor data by constant.
1: Specifies divisor data by address.

7.21.5 Dividend Address


Sets the address storing the dividend.

7.21.6 Divisor (Address)


Addressing of the divisor depends on 7.21.4).

7.21.7 Quotient Output Address


Sets the address to which the quotient is output.

7.21.8 Error Output


W1=1 is set to indicate an error if the divider is 0.

7.22 DIVB (BINARY DIVISION)

7.22.1 Function
This instruction divides binary data items 1, 2, and 4 byte in length. In the operation result register (R9000),
operation data is set and the remainder is set to R9002 and so forth.
A required number of bytes is necessary to store the dividend, divisor, and the result (quotient).

- 159 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.22.2 Format

7.22.3 Control Conditions


(a) Reset (RST)
RST=0 : Release reset
RST=1 : Resets error output W1. In other words, makes W1=0.
(b) Command (ACT)
ACT=0 : Do not execute DIVB. W1 does not change now.
ACT=1 : Execute DIVB.

7.22.4 Parameters
(a) Format specification
Specifies data length (1, 2, and 4 bytes) and the format for the divisor (constant or address).

(b) Dividend address


Address containing the dividend
(c) Divisor data (address)
Specification in (a) determines the format of the divisor.
(d) Result output address
Specified the address to contain the result of operation.

7.22.5 Error Output (W1)


W1=0 : Operation correct
W1=1 : Operation incorrect
W1 goes on (W1=1) if the divisor is 0.

- 160 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.22.6 Operation Output Register (R9000)


This register is set with data on operation. If register bit 0 or 1 is on, they signify the following operation
data:

7.22.7 Remainder Output Address


Depending on its length, the remainder is stored in one or more of registers R9002 to R9005.

7.23 DSCH (DATA SEARCH)

7.23.1 Function
DSCH searches the data table for a specified data, outputs an address storing it counting from the beginning
of the data table. If the data cannot be found, an output is made accordingly.

Fig.7.23.1 DSCH data table

NOTE
The data table heading address specified in the parameter of this functional
instruction is 0 as table internal number.

7.23.2 Format
Fig.7.23.2 shows the expression format and Table 7.23.2 shows the coding format.

- 161 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.23.2 DSCH instruction format

Table 7.23.2 DSCH instruction coding


Coding sheet Memory status of control condition
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . RST BYT RST
3 RD. STK . ACT BYT RST ACT
4 SUB 17 DSCH instruction
5 (PRM) Number of data of the
data table
6 (PRM) Data table heading
address
7 (PRM) Search data address
8 (PRM) Search result output
address
9 WRT . Search data presence/ W1
absence output
address

7.23.3 Control Conditions


(a) Specify data size.
BYT=0 : Data stored in the data table, BCD two digits long.
BYT=1 : Data stored in the data table, BCD four digits long.
(b) Reset
RST=0 : Release reset
RST=1 : Enables a reset, that is, sets W1 to 0.
(c) Execution command
ACT=0 : The DSCH instruction is not executed. W1 does not change.
ACT=1 : The DSCH is executed, and the table internal number storing the desired data is output. If
the data cannot be found, W1=1.

7.23.4 Number of Data of the Data Table


Specifies the size of the data table. If the beginning of the data table is
0 and the end is n, n+1 is set as the number of data of the data table.

- 162 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.23.5 Data Table Head Address


Addresses that can be used in a data table are fixed. When preparing a data table, the addresses to be used
must be determined beforehand. Specify the head address of a data table here.

7.23.6 Search Data Address


Indicates the address of the data to be searched.

7.23.7 Search Result Output Address


If the data being searched for is found, the internal number of the table storing the data is output to this field.
This address field is called a search result output address field.
The search result output address field requires memory whose size is the number of bytes conforming to the
size of the data specified by BYT.

7.23.8 Search Data Presence/Absence Output


W1=0 : The data to be searched exists.
W1=1 : The data to be searched does not exist.

7.24 DSCHB (BINARY DATA SEARCH)

7.24.1 Function
Like the DSCH instruction, this function instruction instructs a data search in the data table.
There are two differences; the numerical data handled in this instruction are all in binary format; and
number of data (table capacity) in the data table can be specified by specifying the address, thus allowing
change in table capacity even after writing the sequence program in ROM.

Fig.7.24.1 DSCHB data table

- 163 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.24.2 Format

Fig.7.24.2 DSCHB instruction format

7.24.3 Control Conditions


(a) Reset (RST)
RST=0 : Release reset
RST=1 : Reset. W1="0".
(b) Activation command
ACT=0 : Do not execute the DSCHB instruction. W1 does not change.
ACT=1 : Execute DSCHB instruction. If the search data is found, table number where the data is
stored will be output. If the search data is not found, W1 becomes 1.

7.24.4 Parameter
(a) Format designation
Specifies data length. Specify byte length in the first digit of the parameter.
1 : 1-byte long data
2 : 2-byte long data
4 : 4-byte long data
(b) Storage address of number of data in data table
Specifies address in which number of data in the data table is set.
This address requires memory of number of byte according to the format designation.
Number of data in the table is n+1 (head number in the table is 0 and the last number is n).
(c) Data table head address
Sets head address of data table.
(d) Search data address
Address in which search data is set.
(e) Search result output address
After searching, if search data is found, the table number where the data is stored will be output. The
searched table number is output in this search result output address. This address requires memory of
number of byte according to the format designation.

7.24.5 Search Result (W1)


W1=0 : Search data found.
W1=1 : Search data not found.

- 164 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.25 END (END OF A LADDER PROGRAM)

7.25.1 Function
The END functional instruction designates the end of a ladder program. END must be placed at the end of
the ladder program.

7.25.2 Format

7.26 END1 (1ST LEVEL SEQUENCE PROGRAM END)

7.26.1 Function
Must be specifies once in a sequence program, either at the end of the Level 1 program, or at the beginning
of the Level 2 program when there is no Level 1 program.

7.26.2 Format
Fig. 7.26.2 shows the format of END1 and Table 7.26.2 shows the coding.

Fig.7.26.2 Format of END1

Table 7.26.2 Coding of END1


Coding sheet
Step Address Bit
Instruction Remarks
Number Number Number
SUB 1 End of 1st level

7.27 END2 (2ND LEVEL SEQUENCE PROGRAM END)

7.27.1 Function
Specify at the end of the Level 2 program.

- 165 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.27.2 Format
Fig.7.27.2 shows the expression format and Table 7.27.2 shows the coding format.

Fig.7.27.2 Format of END2

Table 7.27.2 Coding of END2


Coding sheet
Step Address Bit
Instruction Remarks
Number Number Number
2nd level sequence program
SUB 2
end

7.28 EOR (EXCLUSIVE OR)

7.28.1 Function
The EOR instruction exclusive-ORs the contents of address A with a constant (or the contents of address B),
and stores the result at address C.

7.28.2 Format

7.28.3 Control Conditions


(a) Input signal
ACT=0 : The EOR instruction is not executed.
ACT=1 : The EOR instruction is executed.

7.28.4 Parameters
(a) Format specification
Specifies a data length (1, 2, or 4 bytes), and an input data format (constant or address specification).

- 166 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

(b) Address A
Input data to be exclusive-ORed. The data that is held starting at this address and has the data length
specified in format specification is treated as input data.
(c) Constant or address B
Input data to be exclusive-ORed. When address specification is selected in format specification, the
data that is held starting at this address and has the data length specified in format specification is
treated as input data.
(d) Address C
Address used to store the result of an exclusive OR operation. The result of an exclusive OR operation
is stored starting at this address, and has the data length specified in format specification.

7.28.5 Operation
When address A and address B hold the following data:

The result of the exclusive OR operation is as follows:

7.29 JMP (JUMP)

7.29.1 Function
The JMP instruction causes a departure from the normal sequence to executing instructions. When a JMP
instruction is specified, processing jumps to a jump and instruction (JMPE) without executing the logical
instructions (including functional instructions) in the range delimited by a jump end instruction (JMPE).
(See Fig.7.29.1) Specify 0 as the number of coils, and specify a range to be skipped using the jump end
instruction.
When the jump end instruction is not specified, the message JUMP FUNCTION MISSING is displayed.

- 167 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.29.1 Function of JMP

7.29.2 Format
Fig.7.29.2 shows the expression format of the functional instruction JMP.

Fig.7.29.2 Expression format of JMP

7.29.3 Control Conditions


ACT=1 : The logical instructions (including functional instructions) in the specified range are skipped;
program execution proceeds to the next step.
ACT=0 : The same operation as when JMP is not used is performed.

7.29.4 Parameters
(a) Specify 0. (Range specification only)

NOTE
JMP instruction operation
When ACT = 1, processing jumps to a jump end instruction (JMPE); the logical
instructions (including functional instructions) in the specified jump range are not
executed. This instruction can reduce the Ladder execution period (scan time).

7.29.5 Caution
Do not create a program in which a combination of JMP and JMPE instructions is used to cause a jump to
and from a sequence between the COM and COME instructions; the ladder sequence may not be able to
operate normally after the jump.
- 168 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

Do not skip TMR, TMRB, and TMRC by JMP, JMPE, JMPB, JMPC, and LBL. If TMR, TMRB, or TMRC
are skipped, they might not work correctly after this. You need to cycle power to recover this situation.

7.30 JMPB (LABEL JUMP)

7.30.1 Function
The JMPB functional instruction transfers control to a Ladder immediately after the label set in a Ladder
program. The jump instruction can transfer control freely before and after the instruction within the
program unit (main program or subprogram) in which the instruction is coded.
As compared with the JMP functional instruction, JMPB has the following additional functions:
• More than one jump instruction can be coded for the same label.
• Jump instructions can be nested.

- 169 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.30.2 Format

7.30.3 Control Conditions (ACT)


ACT=0 : The next instruction after the JMPB instruction is executed.
ACT=1 : Control is transferred to the Ladder immediately after the specified label.

7.30.4 Parameters
(a) Label specification
Specifies the label of the jump destination. The label number must be specified in the L address form.
A value from L1 to L9999 can be specified.

NOTE
For the specifications of this instruction, see Section 2.8.2 "Restrictions".
When this instruction is used to jump back to a previous instruction, care must be
taken not to cause an infinite loop.

7.31 JMPC (LABEL JUMP)

7.31.1 Function
The JMPC functional instruction returns control from a subprogram to the main program. Be sure to code
the destination label in the main program. The specifications of this JMPC functional instruction are the
same as the JMPC functional instruction, except that JMPC always returns control to the main program.
• More than one jump instruction can be coded for the same label.

- 170 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.31.2 Format

7.31.3 Control Conditions (ACT)


ACT=0 : The instruction after the JMPC instruction is executed.
ACT=1 : Control is transferred to the Ladder after the specified label.

7.31.4 Parameters
(a) Label specification
Specifies the label of the jump destination. The label number must be specified in the L address form.
A number from L1 to L9999 can be specified.

NOTE
When this instruction is used to jump back to a previous instruction, care must be
taken not to cause an infinite loop.

7.32 JMPE (JUMP END)

7.32.1 Function
This instruction indicates the division in the region specification of the jump instruction (JMP).
It cannot be used alone. It must be used together with the JMP instruction.

7.32.2 Format

7.33 LBL (LABEL)

7.33.1 Function
The LBL functional instruction specifies a label in a Ladder program. It specifies the jump destination for
the JMPB and JMPC functional instructions. (See the JMPB and JMPC functional instructions.)

- 171 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.33.2 Format

7.33.3 Parameters
(a) Label specification
Specifies the jump destination for the JMPB and JMPC functional instructions. The label number
must be specified in the L address form. A label number from L1 to L9999 can be specified. A label
number can be used more than once as long as it is used in a different program unit (main program,
subprogram).

7.34 MOVB (TRANSFER OF 1 BYTE)

7.34.1 Function
The MOVB instruction transfers 1-byte data from a specified source address to a specified destination
address.

7.34.2 Format

Fig.7.34.2 MOVB instruction format

- 172 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.34.3 Control Conditions


(a) Execution specification
ACT=0 : No data is transferred.
ACT=1 : One-byte data is transferred.

7.35 MOVE (LOGICAL PRODUCT TRANSFER)

7.35.1 Function
The MOVE instruction ANDs logical multiplication data and input data, and outputs the results to a
specified address. Can also be used to remove unnecessary bits from an eight-bit signal in a specific address,
etc.
(Logical multiplication data) (Input data) to a specified address
The input data is one byte (eight bits).

7.35.2 Format
Fig.7.35.2 shows the expression format and Table 7.35.2 shows the coding format.

Fig.7.35.2 Move instruction format

Table 7.35.2 Coding for Fig.7.35.2


Coding sheet Memory status of control condition
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . ACT ACT
2 SUB 8 MOVE instruction
3 (PRM) High-order 4-bit logical
multiplication data (1)
4 (PRM) Low-order 4-bit logical
multiplication data (2)
5 (PRM) Input data address (3)
6 (PRM) Output data address (4)
- 173 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.35.3 Execution Command


ACT=0 : Move instruction not executed.
ACT=1 : Executed.

7.35.4 Example of Using the MOVE Instruction


If a code signal and another signal co-exist at address R35 compare the code signal and a code signal at
another address, the rest of signals in address R35 becomes an obstacle.
Thus, the MOVE instruction can be used to output only the code signal at address R35 address R210.

Fig.7.35.4 MOVE instruction ladder diagram

7.36 MOVN (TRANSFER OF AN ARBITRARY NUMBER OF


BYTES)

7.36.1 Function
The MOVN instruction transfers data consisting of an arbitrary number of bytes from a specified source
address to a specified destination address.

- 174 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.36.2 Format

7.36.3 Control Conditions


(a) Execution specification
ACT=0 : No data is transferred.
ACT=1 : A specified number of bytes are transferred.

7.36.4 Parameters
(a) Number of bytes to be transferred
Specify the number of bytes to be transferred. An odd number can also be specified. A number from
1 to 200 can be specified.

7.37 MOVOR (DATA TRANSFER AFTER LOGICAL SUM)

7.37.1 Function
This instruction ORs the input data and the logical sum data and transfers the result to the destination.

7.37.2 Format
Fig.7.37.2 shows the expression format of MOVOR.

Fig.7.37.2 Expression format of MOVOR

- 175 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.37.3 Control Conditions


(a) Command (ACT)
ACT=0: Do not execute MOVOR.
ACT=1: Execute MOVOR.

7.37.4 Parameters
(a) Input data address
Specifies the address for the input data.
(b) Logical sum data address
Specifies the address of the logical sum data with which to OR the transferred data.
(c) Output address
This is the address to contain the logical sum obtained. It is also possible to obtain the logical sum
(OR) of the input and the logical sum data and output the result in the logical sum data address. For this,
you must set the logical sum data address for the output address.

7.38 MOVW (TRANSFER OF 2 BYTES)

7.38.1 Function
Only MOVW can access group I/O and analog I/O (F0-255 and G0-255). The other function command and
all basic commands can not access to F0-255 and G0-255.

NOTE
When you specify F0-255 or G0-255 in MOVW, please specify an even address
of F0-255 or G0-255. If you specify an odd address of F0-255 or G0-255 in
MOVW, the PMC program causes error in R-J3.

If you specify F0 to 255 or G0 to 255 in MOVW, the processing time of MOVW is


increased.

7.38.2 Format

Fig.7.38.2 MOVB instruction format

7.38.3 Control Conditions


(a) Execution specification
ACT=0 : No data is transferred.
ACT=1 : Two-byte data is transferred.

- 176 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.39 MUL (MULTIPLICATION)

7.39.1 Function
Multiplies BCD two-or four-digit data. The product must also be BCD two-or four-digit data.

7.39.2 Format
Fig.7.39.2 shows the expression format and Table 7.39.2 shows the coding format.

Fig.7.39.2 MUL instruction format

Table 7.39.2 MUL instruction coding


Coding sheet Memory status of control conditions
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . RST BYT RST
3 RD. STK . ACT BYT RST ACT
4 SUB 21 MUL instruction
5 (PRM) Data format of
multiplier
6 (PRM) Multiplicand address
7 (PRM) Multiplier (address)
8 (PRM) Product output
address
9 WRT . Error output W1

7.39.3 Control Conditions


(a) Specify the number of digits of data.
BYT=0 : Data is BCD two digits long.
BYT=1 : Data is BCD four digits long.
(b) Reset
RST=0 : Releases reset.
RST=1 : Resets error output W1, that is, sets W1 to 0.
(c) Execution command
ACT=0 : The MUL instruction is not executed. W1 does not change.
- 177 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

ACT=1 : The MUL instruction is executed.

7.39.4 Data Format of Multiplier


0: Specifies the multiplier with a constant.
1: Specifies the multiplier with an address.

7.39.5 Multiplicand Address


Sets the address storing the multiplicand.

7.39.6 Multiplier (Address)


Addressing of the multiplier depends on the specification of multiplier.

7.39.7 Product Output Address


Set the address to which the product is output.

7.39.8 Error Output


W1=1 is set to indicate an error if the product exceeds the size specified
in 7.39.3-a).

7.40 MULB (BINARY MULTIPLICATION)

7.40.1 Function
This instruction multiplies 1-, 2-, and 4-byte binary data items. In the operation result register (R9000),
operation data is set besides the numerical data representing the operation.
A required number of bytes is necessary to store multiplicand, multiplier, and the result (product).

7.40.2 Format

7.40.3 Control Conditions


(a) Reset (RST)
RST=0 : Release reset
RST=1 : Resets error output W1. In other words, makes W1=0.
(b) Command (ACT)

- 178 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE
ACT=0: Do not execute MULB. W1 does not change now.
ACT=1: Execute MULB.

7.40.4 Parameters
(a) Format specification
Specifies data length (1, 2, and 4 bytes) and the format for the multiplier (constant or address).

(b) Multiplicand address


Address containing the multiplicand.
(c) Multiplier data (address or constant)
Specification in (a) determines the format of the multiplier.
(d) Result output address
Specifies the address to contain the result of operation.

7.40.5 Error Output (W1)


W1=0 : Operation correct
W1=1 : Operation incorrect
W1 goes on (W1=1) if the result of multiplication exceeds the specified data length.

7.40.6 Operation Output Register (R9000)


This register is set with data on operation. If the register bit is on, it signifies the following operation data:

7.41 NOT (LOGICAL NOT)

7.41.1 Function
The NOT instruction inverts each bit of the contents of address A, and stores the result at address B.

- 179 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.41.2 Format

7.41.3 Control Conditions


(a) Input signal
ACT=0 : The NOT instruction is not executed.
ACT=1 : The NOT instruction is executed.

7.41.4 Parameters
(a) Format specification
Specify a data length (1, 2, or 4 bytes).

(b) Address A
Input data to be inverted bit by bit. The data that is held starting at this address and has the data length
specified in format specification is treated as input data.
(c) Address B
Address used to output the result of a NOT operation. The result of a NOT operation is stored starting
at this address, and has the data length specified in format specification.

7.41.5 Operation
When address A holds the following data:

The result of the NOT operation is as follows:

- 180 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.42 NUME (DEFINITION OF CONSTANT)

7.42.1 Function
Defines BCD constants, when required. In this case, constants are defined with this instruction.

7.42.2 Format
Fig.7.42.2 shows the expression format and Table 7.42.2 shows the coding format.

Fig.7.42.2 NUME instruction format

Table 7.42.2 NUME instruction coding


Coding sheet Memory status of control conditions
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . ACT BYT ACT
3 SUB 23 NUME instruction
4 (PRM) Constant
5 (PRM) Constant output
address

7.42.3 Control Conditions


(a) Specify the number of digits of a constant.
BYT=0 : Constant is BCD two digits long.
BYT=1 : Constant is BCD four digits long.
(b) Execution command
ACT=0 : The NUME instruction is not executed.
ACT=1 : The NUME instruction is executed.

7.42.4 Constant
Sets the constant as the number of digits specified in Item (a) in Subsection 7.42.3.

7.42.5 Constant Output Address


Sets the address to which the constant defined in Subsection 7.42.4 is output.

- 181 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.43 NUMEB (DEFINITION OF BINARY CONSTANTS)

7.43.1 Function

This instruction defines 1, 2, or 4-bytes long binary constant. Data entered in decimal during programming
is converted into binary data during program execution. The binary data is stored in the specified memory
address(es).

7.43.2 Format

Fig.7.43.2 (a) NUMBER instruction format

7.43.3 Control Conditions


(a) Command (ACT)
ACT= 0 : Do not execute NUMEB.
ACT= 1 : Execute NUMEB.

7.43.4 Parameters
(a) Format specification
Specifies data length (1, 2, or 4 bytes).
Use the first parameter digit to specify byte length:
0001 : Binary data of 1 byte length
0002 : Binary data of 2 byte length
0004 : Binary data of 4 byte length
(b) Constant
Defined constants in decimal format. Set a constant data within the effective range for the byte length
which is set in "(a) Format specification".
(c) Constant output address
Specifies the address of the area for output of the binary data. The memory of the number of bytes
which is set in "(a) Format specification" is necessary.

7.44 LOGICAL OR

7.44.1 Function
The OR instruction ORs the contents of address A with a constant (or the contents of address B), and stores
the result at address C.

- 182 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.44.2 Format

7.44.3 Control Conditions


(a) Input signal
ACT=0 : The OR instruction is not executed.
ACT=1 : The OR instruction is executed.

7.44.4 Parameters
(a) Format specification
Specify a data length (1, 2, or 4 bytes), and an input data format (constant or address specification).

(b) Address A
Input data to be ORed. The data that is held starting at this address and has the data length specified in
format specification is treated as input data.
(c) Constant or address B
Input data to be ORed with. When address specification is selected in format specification, the data
that is held starting at this address and has the data length specified in format specification is treated as
input data.
(d) Address C
Address used to store the result of an OR operation. The result of an OR operation is stored starting at
this address, and has the data length specified in format specification.

7.44.5 Operation
When address A and address B hold the following data:

The result of the OR operation is as follows:

- 183 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.45 PARI (PARITY CHECK)

7.45.1 Function
This instruction checks the parity of code signals, and outputs an error if an abnormality is detected.
Specifies either an even- or odd-parity check.
Only one-byte (eight bits) of data can be checked.

7.45.2 Format
Fig.7.45.2 shows the expression format and Table 7.45.2 shows the coding format.

Fig.7.45.2 PARI instruction format

Table 7.45.2 PARI instruction coding


Coding sheet Memory status of control condition
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . ACT O.E
2 RD. STK . ACT O.E RST
3 RD. STK . ACT O.E RST ACT
4 SUB 11 PARI instruction
5 (PRM) Check data address
6 . Error output W1

7.45.3 Control Conditions


(a) Specify even or odd.
O.E=0 : Even-parity check
O.E=1 : Odd-parity check
(b) Reset
RST=0 : Disables reset.
RST=1 : Sets error output W1 to 0. That is, when a parity error occurs, setting RST to 1 results in
resetting.
- 184 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE
(c) Execution command
ACT=0 : Parity checks are not performed. W1 does not alter.
ACT=1 : Executes the PARI instruction, performing a parity check.

7.45.4 Error Output (W1)


If the results of executing the PARI instruction are abnormal, W1=1 and an error is posted. The W1 address
can be determined arbitrarily.

7.45.5 Example of Using the PARI Instruction


Fig.7.45.5 shows odd-parity checking of a code signal entered at address R036.

Fig.7.45.5 Ladder diagram for the PARI instruction

NOTE
For bits 0 to 7, bits other than those for the parity check must be 0.

7.46 ROT (ROTATION CONTROL)

7.46.1 Function
Controls rotors, such as the tool post, ATC, rotary table, etc., and is used for the following functions.
(a) Selection of the rotation direction via the shorter path
(b) Calculation of the number of steps between the current position and the goal position
(c) Calculation of the position one position before the goal or of the number of steps up to one position
before the goal

- 185 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.46.2 Format
Fig.7.46.2 shows the expression format and Table 7.46.2 shows the coding format.

Fig.7.46.2 ROT instruction format

Table 7.46.2 Coding for Fig.7.46.2


Coding sheet Status of operating result
Step Address
Instruction Bit No. Remarks ST5 ST4 ST3 ST2 ST1 ST0
Number No.
1 RD . RN0 RN0
2 RD. STK . BYT RN0 BYT
3 RD. STK . DIR RN0 BYT DIR
4 RD. STK . POS RN0 BYT DIR POS
5 RD. STK . INC RN0 BYT DIR POS INC
6 RD. STK . ACT RN0 BYT DIR POS INC ACT
7 SUB 6 ROT RN0 BYT DIR POS INC ACT
8 (PRM) Rotor indexing RN0 BYT DIR POS INC ACT
number
9 (PRM) Current position RN0 BYT DIR POS INC ACT
10 (PRM) Goal position RN0 BYT DIR POS INC ACT
address
11 (PRM) Calculating result RN0 BYT DIR POS INC ACT
output address
12 WRT . RN0 BYT DIR POS INC W1
13
14
15

- 186 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.46.3 Control Conditions


(a) Specify the starting number of the rotor.
RN0=0 : Begins the number of the position of the rotor with 0.
RN0=1 : Begins the number of the position of the rotor with 1.
(b) Specify the number of digits of the process data (position data).
BYT=0 : BCD two digits
BYT=1 : BCD four digits
(c) Select the rotation direction via the shorter path or not.
DIR=0 : No direction is selected. The direction of rotation is only forward.
DIR=1 : Selected. See (8) for details on the rotation direction.
(d) Specify the operating conditions.
POS=0 : Calculates the goal position.
POS=1 : Calculates the position one position before the goal position.
(e) Specify the position or the number of steps.
INC=0 : Calculates the number of the position. If the position one position before the goal position is
to be calculated, specify INC=0 and POS=1
INC=1 : Calculates the number of steps. If the difference between the current position and the goal
position is to be calculated, specify INC=1 and POS=0.
(f) Execution command
ACT=0 : The ROT instruction is not executed. W1 does not change.
ACT=1 : Executed. Normally, set ACT=0. If the operation results are required, set ACT=1.

7.46.4 Rotor Indexing Number


Specify the rotor indexing number.

7.46.5 Current Position Address


Specify the address storing the current position.

7.46.6 Goal Position Address


Specify the address storing the goal position (or command value).

7.46.7 Operation Result Output Address


Calculate the number of steps for the rotor to rotate, the number of steps up to the position one position
before, or the position before the goal. When the calculating result is to be used, always check that ACT=1.

7.46.8 Rotating Direction Output (W1)


The direction of rotation for control of rotation via the shorter path is output to W1. When W1=0, the
direction is forward (FOR) when 1, reverse (REV). The definition of FOR and REV is shown in Fig.7.46.8.
If the number given to the rotor is ascending, the rotation is FOR; if descending, REV. The address of W1
can be determined arbitrarily.
When, however, the result of W1 is to be used, always check that ACT=1.

- 187 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.46.8 Rotation direction

7.47 ROTB (BINARY ROTATION CONTROL)

7.47.1 Function
This instruction is used to control rotating elements including the tool post, ATC (Automatic Tool Changer),
rotary table, etc. In the ROT command a parameter indicating the number of rotating element indexing
positions is a fixed data in programming. For ROTB, however, you can specify an address for the number
of rotating element index positions, allowing change even after programming. The data handled are all in
the binary format. Otherwise, ROTB is coded in the same way as ROT.

7.47.2 Format
Fig.7.47.2 shows the expression format of ROTB

Fig.7.47.2 Expression format of ROTB

- 188 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.47.3 Control Conditions


The control conditions do not differ basically from those for ROT command. However, BYT has been
eliminated from ROTB (it forms part of the ROTB parameters).
For the reset, see ROT.

7.47.4 Parameters
(a) Format
Specifies data length (1, 2, or 4 bytes). Use the first digit of the parameter to specify the number of
bytes.
1 : 1 byte
2 : 2 bytes
4 : 4 bytes
All numerical data (number of indexed positions for the rotating elements, current address, etc.) are in
the binary format.
Therefore, they require the memory space specified by data length.
(b) Rotating element indexed position address
Specifies the address containing the number of rotary element positions to be indexed.
(c) Other parameters
For the functions and use of the other parameters, see Section 7.46, "Rotation Control."

7.47.5 Output for Rotational Direction (W1)


This is the same as the ROT command.

7.47.6 Example of Using the ROTB Instruction


Fig. 7.47 (b) illustrates a ladder diagram for a 12-position rotor to be controlled for rotation via the shorter
path and for deceleration at the position one position before the goal.
• The goal position is specified with 32B of binary code (address R26 to R29).
• The current position is entered with the binary code signal (address R41) from the machine tool.
• The result of calculating the position one position before the goal is output to address R230 (work
area).
• Operation starts with X7.3.
• The comparison check instruction (COMPB) is used to detect the deceleration and stop positions.

- 189 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.47.6 Example of a ladder diagram for the ROTB instruction

- 190 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.48 SFT (SHIFT REGISTER)

7.48.1 Function
This instruction shifts 2-byte (16-bit) data by a bit to the left or right.
Note that W1=1 when data "1" is shifted from the left extremity (bit 15) in left shift or from the right
extremity (bit 0) in right shift.

7.48.2 Format

7.48.3 Control Conditions


(a) Shift direction specification (DIR)
DIR=0 : Left shift
DIR=1 : Right shift
(b) Condition specification (CONT)
CONT=0:
On "1" bit shifts by one bit in the specified direction.
The condition of an adjacent bit (either right or left adjacent bit according to the specification of shift
direction DIR) is set to the original bit position of the on "1" bit.
Also, "0" is set to bit 0 after shifting in the left direction or set to hit 15 after shifting in the right
direction.
In case of leftward shift;

CONT=1:
Shift is the same as above, but 1s are set to shifted bits.

- 191 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

(c) Reset (RST)


The shifted out data (W1=1) is reset (W1=0).
RST=0 : W1 is not reset.
RST=1 : W1 is reset (W1=0).
(d) Actuation signal (ACT)
Shift processing is done when ACT=1. For shifting one bit only, execute an instruction when ACT=1,
and then, set ACT to 0 (ACT=0).

7.48.4 Parameters
(a) Shift data addresses
Sets shift data addresses. These designated addresses require a continuous 2-byte memory for shift
data.
Bit numbers are represented by bit 0 to 15 as shown below. When addresses are designated for
programming, an address number is attached every 8 bits, and the designable bit numbers are 0 to 7.

7.48.5 W1
W1=0 : "1" was not shifted out because of the shift operation.
W1=1 : "1" was shifted out because of the shift operation.

7.49 SP (SUBPROGRAM)

7.49.1 Function
The SP functional instruction is used to create a subprogram. A subprogram number is specified as a
subprogram name. SP is used with the SPE functional instruction to specify the subprogram range.

7.49.2 Format

- 192 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.49.3 Parameters
(a) Subprogram number
Specifies the subprogram number of a subprogram to be coded following this instruction. The
subprogram number must be specified by P1 to P512. The specified subprogram number must be
unique within the sequence program.
Example: When the subprogram number is set to 1

7.50 SPE (END OF A SUBPROGRAM)

7.50.1 Function
The SPE functional instruction is used to create a subprogram. SPE is used with the SP functional
instruction. It specifies the range of a subprogram. When this functional instruction has been executed,
control is returned to the functional instruction that called the subprogram.

7.50.2 Format

7.51 SUB (SUBTRACTION)

7.51.1 Function
This instruction subtracts BCD two-or four-digit data.

7.51.2 Format
Fig.7.51.2 shows the expression format and Table 7.51.2 shows the coding format.

- 193 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.51.2 SUB Instruction format

Table 7.51.2 SUB instruction format


Coding sheet Memory status of control conditions
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . RST BYT RST
3 RD. STK . ACT BYT RST ACT
4 SUB 20 SUB instruction
5 (PRM) Data format of
subtrahend
6 (PRM) Minuend address
7 (PRM) Subtrahend (address)
8 (PRM) Difference output
address
9 WRT . Error output W1

7.51.3 Control Conditions


(a) Specification of the number of digits of data.
BYT=0 : Data BCD two digits long
BYT=1 : Data BCD four digits long

7.51.4 Reset
RST=0 : Release reset.
RST=1 : Resets error output W1, that is, sets W1 to 0.

7.51.5 Execution Command


ACT=0 : The SUB instruction is not executed. W1 does not change.
ACT=1 : The SUB instruction is executed.

7.51.6 Data Format of Subtrahend


0: Specifies subtrahend with a constant.
1: Specifies subtrahend with an address.

- 194 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.51.7 Minuend Address


Set the address storing the minuend.

7.51.8 Subtrahend (Address)


Addressing of the subtrahend depends on the specification of subtrahend.

7.51.9 Difference Output Address


Sets the address to which the difference is output.

7.51.10 Error Output


W1 is set 1 to indicate an error if the difference is negative.

7.52 SUBB (BINARY SUBTRACTION)

7.52.1 Function
This instruction subtracts one data from another, both data being in the binary format of 1, 2 or 4 bytes.
In the operation result register (R9000), operation data is set besides the numerical data representing the
operation. A required number of bytes is necessary to store the subtrahend, minuend, and the result
(difference).

7.52.2 Format

7.52.3 Control Conditions


(a) Reset (RST)
RST=0 : Release reset
RST=1 : Resets error output W1. (Set W1 to 0.)
(b) Command (ACT)
ACT=0 : Do not execute SUBB. W1 does not change now.
ACT=1 : Execute SUBB.

7.52.4 Parameters
(a) Format specification
Specifies data length (1, 2, and 4 bytes) and the format for the subtrahend (constant or address).

- 195 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

(b) Minuend address


Address containing the minuend.
(c) Minuend data (address)
Specification in (a) determines the format of the minuend.
(d) Result output address
Specifies the address to contain the result of operation.

7.52.5 Error Output (W1)


W1=0 : Operation correct
W1=1 : Operation incorrect
W1 goes on (W1=1) if the result of subtraction exceeds the specified data length.

7.52.6 Operation Output Register (R9000)


This register is set with data on operation. If register bit is on, they signify the following operation data:

7.53 TMR (TIMER)

7.53.1 Function

This is an on-delay timer.


Since the timer time is set in non-volatile memory, it can be changed on the PMC screen without the ladder
having to be changed.

7.53.2 Format
Fig.7.53.4 (a) shows description format and Table 7.53.4 shows coding format.

- 196 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.53.3 Control Condition


ACT=0: Turns off the timer relay (TM ).
ACT=1: Initiates the timer.

7.53.4 Timer Relay (TM )


When the time preset is reached with ACT=1 as shown in Fig.7.53.4 (b), the timer relay turns on. You can
set the address of the timer relay.

Fig.7.53.4 (a) Format of TMR

Table 7.53.4 Coding of TMR


Step Address Bit
Instruction Remarks
Number Number Number
1 RD . ACT
2 TMR .
3 WRT . TM

Fig.7.53.4 (b) Operation of the timer

7.53.5 Setting Timers


The timer can be set via the PMC screen. The setting time is every 48 ms for timer number 1 to 8 and every
8 ms for timer number 9 to 40. A time less than 48 ms is discarded for 48ms timer and a time less than 8ms
is discarded for 8ms timer. For example, if 38 ms is set by the every 8ms, the remainder 6 (38=8×4+6) is
discarded, and only 32 ms is actually set.

7.53.6 Timer Accuracy


Type of timer Setting time Error
48 ms timer 48 ms to 1572.8 s -48 to 0 ms
8 ms timer 8 ms to 262.1 s -8 to 0 ms

Variation in time is caused only by the operation time of the Timer Instruction. For example, when a timer
instruction is used in the second level sequence part, the variation does not include the delay time (Max. 2nd
level sequence one cycle time) until the sequence actuates after the set time is reached.

- 197 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.53.7 Parameter
Set the timer number.

WARNING
If the timer number is duplicated, or falls outside the valid range, the operation will
be unpredictable.

7.54 TMRB (FIXED TIMER)

7.54.1 Function
This timer is used as a fixed on-delay timer.
Time present in this fixed timer is written to ROM together with the sequence program, so the timer time
once set cannot be changed unless the whole ROM is exchanged.

7.54.2 Format
The format is expressed as follows (Fig.7.54.2).

Fig.7.54.2 Format of TMRB

7.54.3 Control Conditions


ACT=0: Turns off timer relay
(TMB ).
ACT=1: Start timer.

7.54.4 Timer Relay (TMB )


As shown in Fig.7.54.4, timer relay is set ON after a certain time preset in the parameter of this instruction
pasts after ACT=1.
You can decide the address of the internal relay in the timer relay.

Fig.7.54.4 Timer operation

7.54.5 Parameter
(a) Timer number
Sets timer number (1 to 100) of the fixed timers.

- 198 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

WARNING
If the same timer number is used more than once or if a timer number out of the
valid range is used, the operation is unpredictable.
(b) Preset time (8 to 262,136 ms)
Processing is done every 8 ms in this fixed timer.
The preset time is therefore integral times of 8 ms and the remainder is omitted.
For example, when set 38 ms, 38=8 4+6, the remainder of 6 is omitted, and the preset time becomes 32
ms.
The range of the preset time is 8 to 262,136 ms.

7.54.6 Precision of the Timer


Time varies -8 to 0 ms from the setting time.
The varying time in this timer is caused only if the error occurred when the timer instruction performs the
operation process.
Errors caused by sequence program processing time (time of 1 cycle of the second level), etc. are not
included.

7.55 TMRC (TIMER)

7.55.1 Function
This is the on-delay timer.
A timer setting time is set at an arbitrary address. The selection of an address determines whether the timer
is a variable timer or fixed timer. No limit is imposed on the number of timers provided areas can be
allocated.

7.55.2 Format
Fig.7.55.2 and Table 7.55.2 show the expression format and the coding format, respectively.

Fig.7.55.2 TMRC expression format

Table 7.55.2 TMRC coding format


Step Address Bit
Instruction Remarks
Number Number Number
1 RD .
2 SUB 54 TMRC command
3 (PRM) Timer accuracy
4 (PRM) Timer set time address
5 (PRM) Timer register address
6 WRT . TM

- 199 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

7.55.3 Control Condition


ACT=0 : Turns off the timer relay
(TM ).
ACT=1 : Starts the timer.

7.55.4 Timer Accuracy


Timer precision Setting value Setting time Error
8 ms 0 1 to 262,136 -8 to 0 ms
48 ms 1 1 to 1,572,816 -48 to +0 ms
1 second (Note) 2 1 to 32,767 0 to +1 s
10 s (Note) 3 1 to 327,670 0 to +10 s
1 m (Note) 4 1 to 32,767 0 to +1 m

7.55.5 Timer Set Time Address


Sets the first address of the timer set time field.
The continuous 2-byte memory space is required for the timer set time field.
Field D is normally used as this field.

The timer set time is converted into the binary value in 8 ms (48 ms) units.
The timer set time is shown as follows:
8 ms 8 to 262,136 ms
48 ms 48 to 1,572,816 ms
1s 1 to 32,767s
10 s 1 to 327,670s
1m 1 to 32,767m

7.55.6 Timer Register Address


Set the start address of a timer register area.
A timer register area must be allocated to a continuous four-byte memory area starting from the set address.
Normally, the R area is used as a timer register area. This area should be used by the PMC system, and
therefore should not be used by the sequence program.

- 200 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.55.7 Timer Relay (TM )


As shown in Fig. 7.55.7, after ACT is set to 1, the timer relay is turned on once the time specified in this
command has elapsed.

Fig.7.55.7 Timer operation

7.56 XMOV (INDEXED DATA TRANSFER)

7.56.1 Function
Reads or rewrites the contents of the data table. Like the DSCH instruction, XMOV is only valid for data
tables which can be used by the PMC.

NOTE
The data table heading address specified here is table internal number 0.

Fig.7.56.1 Reading and writing of data

7.56.2 Format
Fig.7.56.2 shows the expression format and Table 7.56.2 shows the coding format.

- 201 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.56.2 XMOV instruction format

Table 7.56.2 XMOV instruction coding


Coding sheet Memory status of control conditions
Step Address
Instruction Bit No. Remarks ST3 ST2 ST1 ST0
Number No.
1 RD . BYT BYT
2 RD. STK . RW BYT RW
3 RD. STK . RST BYT RW RST
4 RD. STK . ACT BYT RW RST ACT
5 SUB 18 XMOV instruction
6 (PRM) Number of data of the data
table
7 (PRM) Data table heading
address
8 (PRM) Address storing input/output
data
9 (PRM) Address storing table internal
number
10 WRT . Error output W1

7.56.3 Control Conditions


(a) Specifies the number of digits of data.
BYT=0 : Data stored in the data table, BCD in two digits long.
BYT=1 : Data stored in the data table, BCD in four digits long.
(b) Specifies read or write
RW=0 : Data is read from the data table.
RW=1 : Data is write in the data table.
(c) Reset
RST=0 : Release reset.
RST=1 : Enables reset, that is, sets W1 to 0.
(d) Execution commands
ACT=0 : The XMOV instruction is not executed. W1 does not change.
ACT=1 : The XMOV instruction is executed.

- 202 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.56.4 Number of Data of the Data Table


Specifies the size of the data table. If the beginning of the data table is 0 and the end is n, n+1 is set as the
number of data of the data table.

7.56.5 Data Table Head Address


Addresses that can be used in a data table are fixed. When preparing a data table, the addresses to be used
must be determined beforehand, and the head address placed in that data table.

7.56.6 Address Storing Input/Output Data


The input/output data storage address is the address storing the specified data, and is external to the data
table. The contents of the data table is read or rewritten.
7.56.7 Address Storing the Table Internal Number
The table internal number storage address is the address storing the table internal number of the data to be
read or rewritten.
This address requires memory specified by the format designation (BYT).

7.56.8 Error Output


W1=0 : There is no error.
W1=1 : There is an error.
An error occurs if a table internal number exceeding the previously programmed number of the data table is
specified.

7.57 XMOVB (BINARY INDEX MODIFIER DATA TRANSFER)

7.57.1 Function
Like the XMOV instruction of Section 7.56, this function instruction instructs reading and rewriting of data
in the data table.
There are two differences; the numerical data handled in this instruction are all in binary format; and
number of data (table capacity) in the data table can be specified by specifying the address, thus allowing
change in table capacity even after writing the sequence program in the ROM.
(a) Read data from data table

- 203 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Fig.7.57.1 (a) Read data from data table

(b) Write data to data table

Fig.7.57.1 (b) Write data to data table

- 204 -
B-82614EN/02 7. FUNCTION COMMAND REFERENCE

7.57.2 Format

Fig.7.57.2 XMOVB instruction format

7.57.3 Control Conditions


(a) Read, write designation (RW)
RW=0 : Read data from data table.
RW=1 : Write data to data table.
(b) Reset (RST)
RST=0 : Reset release.
RST=1 : Reset. W1=0.
(c) Activation command (ACT)
ACT=0: Do not execute MOV instruction.
There is no change in W1.
ACT=1: Execute MOV instruction.

7.57.4 Parameters
(a) Format designation
Specifies data length. Specify byte length in the first digit of the parameter.
0001 : 1-byte long data
0002 : 2-byte long data
0004 : 4-byte long data
(b) Storage address of number of data table elements
Set to the memory at the byte length which sets the number of the data table elements in "(a) Format
specification" and sets the address to this parameter. The effective range of number of data table
elements is as follows with the byte length which set in "(a) Format specification".
1 byte length : 1 to 255
2 byte length : 1 to 32767
(Actually, set a value below the size of the D area.)
4 byte length : 1 to 99999999
(Actually, set a value below the size of the D area.)
(c) Data table head address
Sets head address in the data table.
The memory of (byte length) × (number of data table elements) which was set in "(a) Format
specification" and "(b) Storage address of number of data table elements" is necessary.
(d) Input/Output data storage address
In case of the reading, set the address of the memory which stores a reading result. In case of the
writing, set the address of the memory which stores a writing result. The memory with the byte length
which set in "(a) Format specification" is necessary.
(e) Index storage address

- 205 -
7. FUNCTION COMMAND REFERENCE B-82614EN/02

Set the address of the memory in which an index value is stored. The memory with the byte length set
in "(a) Format specification" is necessary. The effective range of number of data in index is as follows
according to the byte length set in "(A) Format specification".
Actually, set the value which is smaller than the value to set in "(b) Storage address of number of data
table elements" to the index.
When setting an index value above the value to set in "(b) Storage address of number of data table
elements", it causes an error output W1=1 in instruction execution.
1 byte length : 0 to 254
2 byte length : 0 to 32766
4 byte length : 0 to 99999998

7.57.5 Error Output (W1)


W1=0 : No error
W1=1 : Error found. In the case where the index value set in "(e) Index storage address" exceeds the
value set in "(b) Storage address of number of data table elements", it becomes W1=1. The
reading or writing of the data table isn't executed.

- 206 -
B-82614EN/02 8. PMC ADDRESS CORRESPONDENCE

8 PMC ADDRESS CORRESPONDENCE


This chapter explains the correspondence between the PMC address and the robot controller I/O port name.
It also explains the corresponding Rack, Slot and Start No. to assign internal relays to the robot controller
I/O port.

Type Usage Range Corresponded I/O port Assignment


X Input to PMC X0-X127 DI[1]-DI[1024] (General digital input)
X1000-X1004 UI[1]-UI[40] (User operator's panel
input)
X1005-X1009 WI[1]-WI[40] (Weld digital input)
X1010-X1014 WSTI[1]-WSTI[40] (Wire stick input)
X1015-X1019 LDI[1]-LDI[40] (Laser digital input)
X1020-X1024 RI[1]-RI[40] (Robot digital input)
X1025-X1026 SI[1]-SI[16] (Standard Operator's
panel output)
X1027-X1039 Not used
Y Output from PMC Y0-Y127 DO[1]-DO[1024] (General digital
output)
Y1000-Y1004 [1]-UO[40] (User operator's panel
output)
Y1005-Y1009 WO[1]-WO[40] (Weld digital output)
Y1010-Y1014 WSTO[1]-WSTO[40] (Wire stick
output)
Y1015-Y1019 LDO[1]-LDO[40] (Laser digital
output)
Y1020-Y1024 RO[1]-RO[40] (Robot digital output)
Y1025-Y1026 SO[1]-SO[16] (Standard operator's
panel output)
Y1027-Y1039 Not used
F Input to PMC F0-F127 GI[1]-GI[64] (Group input)
F128-F255 AI[1]-AI[64] (Analog input)
F1000-F1255 System interface input Rack 33 Slot 6
Start Port 1-32
G Output from PMC G0-G127 GO[1]-GO[64] (Group output)
G128-G255 AO[1]-AO[64] (Analog output)
G1000-G1255 System interface output Rack 33 Slot 7
Start Port 1-32
K Keep Relay K0-K19 DO[10001]-DO[10160] (General Rack 33 Slot 1
digital output) Start Port
1-160
R General internal relay R0-R1499 DO[11001]-DO[23000] (General Rack 33 Slot 2
digital output) Start Port
1-12000
R9000-R9117 Operation Output Relay (Ex. - ADDB,
SUBB, etc.)
D Data Table D0-D2999 GO[10001]-GO[11500] (Group Rack 33 Slot 3
output) Start Port
1-24000
T Variable Timer T0-T79 Timer #1 = T0 - T1, 2 Bytes per Rack 33 Slot 4
Timer. 2 Bytes = Timer Preset Start Port
1-640

- 207 -
8. PMC ADDRESS CORRESPONDENCE B-82614EN/02

Type Usage Range Corresponded I/O port Assignment


C Counter C0-C79 Counter #1 = C0 - C3, 4 Bytes per Rack 33 Slot 5
Counter, 1st - 2 Bytes = Counter Start Port
Preset, 2nd - 2 Bytes = Counter 1-640
Value
L Label number L1-L9999 Labels are used with Jump
commands
P Sub program number P1-P512

NOTE
Rack 33 is an internal rack. This does not correspond to any external devices.

8.1 X
The X area corresponds to the digital input ports of the robot controller.
The PMC uses this area to input information from external I/O devices.

NOTE
The X area can not be used in any function command. If you specify the X area in
a function command, the PMC program causes an error in the robot controller,
and the PMC program can not be started.
To use the X area in a function command, copy the value of this area to internal
relay by basic command, and use the internal relay in a function command.

8.1.1 X0-X127 ↔ DI[1]-DI[1024] (General Digital Input)


The correspondence of PMC address to DI index is shown below.

Xa.b ↔ DI[c]
a×8+b+1=c

(Example: X3.4, a=3, b=4, (3*8)+4+1=29, c=29, DI[29])

Correspondence between DI and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
X0 DI[8] DI[7] DI[6] DI[5] DI[4] DI[3] DI[2] DI[1]
X1 DI[16] DI[15] DI[14] DI[13] DI[12] DI[11] DI[10] DI[9]
X2 DI[24] DI[23] DI[22] DI[21] DI[20] DI[19] DI[18] DI[17]
X3 DI[32] DI[31] DI[30] DI[29] DI[28] DI[27] DI[26] DI[25]
X4 DI[40] DI[39] DI[38] DI[37] DI[36] DI[35] DI[34] DI[33]
X5 DI[48] DI[47] DI[46] DI[45] DI[44] DI[43] DI[42] DI[41]
X6 DI[56] DI[55] DI[54] DI[53] DI[52] DI[51] DI[50] DI[49]
X7 DI[64] DI[63] DI[62] DI[61] DI[60] DI[59] DI[58] DI[57]
X8 DI[72] DI[71] DI[70] DI[69] DI[68] DI[67] DI[66] DI[65]
X9 DI[80] DI[79] DI[78] DI[77] DI[76] DI[75] DI[74] DI[73]
X10 DI[88] DI[87] DI[86] DI[85] DI[84] DI[83] DI[82] DI[81]
X11 DI[96] DI[95] DI[94] DI[93] DI[92] DI[91] DI[90] DI[89]
X12 DI[104] DI[103] DI[102] DI[101] DI[100] DI[99] DI[98] DI[97]
X13 DI[112] DI[111] DI[110] DI[109] DI[108] DI[107] DI[106] DI[105]
X14 DI[120] DI[119] DI[118] DI[117] DI[116] DI[115] DI[114] DI[113]
X15 DI[128] DI[127] DI[126] DI[125] DI[124] DI[123] DI[122] DI[121]

- 208 -
B-82614EN/02 8. PMC ADDRESS CORRESPONDENCE

Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


X16 DI[136] DI[135] DI[134] DI[133] DI[132] DI[131] DI[130] DI[129]
X17 DI[144] DI[143] DI[142] DI[141] DI[140] DI[139] DI[138] DI[137]
X18 DI[152] DI[151] DI[150] DI[149] DI[148] DI[147] DI[146] DI[145]
X19 DI[160] DI[159] DI[158] DI[157] DI[156] DI[155] DI[154] DI[153]
X20 DI[168] DI[167] DI[166] DI[165] DI[164] DI[163] DI[162] DI[161]
X21 DI[176] DI[175] DI[174] DI[173] DI[172] DI[171] DI[170] DI[169]
X22 DI[184] DI[183] DI[182] DI[181] DI[180] DI[179] DI[178] DI[177]
X23 DI[192] DI[191] DI[190] DI[189] DI[188] DI[187] DI[186] DI[185]
X24 DI[200] DI[199] DI[198] DI[197] DI[196] DI[195] DI[194] DI[193]
X25 DI[208] DI[207] DI[206] DI[205] DI[204] DI[203] DI[202] DI[201]
X26 DI[216] DI[215] DI[214] DI[213] DI[212] DI[211] DI[210] DI[209]
X27 DI[224] DI[223] DI[222] DI[221] DI[220] DI[219] DI[218] DI[217]
X28 DI[232] DI[231] DI[230] DI[229] DI[228] DI[227] DI[226] DI[225]
X29 DI[240] DI[239] DI[238] DI[237] DI[236] DI[235] DI[234] DI[233]
X30 DI[248] DI[247] DI[246] DI[245] DI[244] DI[243] DI[242] DI[241]
X31 DI[256] DI[255] DI[254] DI[253] DI[252] DI[251] DI[250] DI[249]
X32 DI[264] DI[263] DI[262] DI[261] DI[260] DI[259] DI[258] DI[257]
X33 DI[272] DI[271] DI[270] DI[269] DI[268] DI[267] DI[266] DI[265]
X34 DI[280] DI[279] DI[278] DI[277] DI[276] DI[275] DI[274] DI[273]
X35 DI[288] DI[287] DI[286] DI[285] DI[284] DI[283] DI[282] DI[281]
X36 DI[296] DI[295] DI[294] DI[293] DI[292] DI[291] DI[290] DI[289]
X37 DI[304] DI[303] DI[302] DI[301] DI[300] DI[299] DI[298] DI[297]
X38 DI[312] DI[311] DI[310] DI[309] DI[308] DI[307] DI[306] DI[305]
X39 DI[320] DI[319] DI[318] DI[317] DI[316] DI[315] DI[314] DI[313]
X40 DI[328] DI[327] DI[326] DI[325] DI[324] DI[323] DI[322] DI[321]
X41 DI[336] DI[335] DI[334] DI[333] DI[332] DI[331] DI[330] DI[329]
X42 DI[344] DI[343] DI[342] DI[341] DI[340] DI[339] DI[338] DI[337]
X43 DI[352] DI[351] DI[350] DI[349] DI[348] DI[347] DI[346] DI[345]
X44 DI[360] DI[359] DI[358] DI[357] DI[356] DI[355] DI[354] DI[353]
X45 DI[368] DI[367] DI[366] DI[365] DI[364] DI[363] DI[362] DI[361]
X46 DI[376] DI[375] DI[374] DI[373] DI[372] DI[371] DI[370] DI[369]
X47 DI[384] DI[383] DI[382] DI[381] DI[380] DI[379] DI[378] DI[377]
X48 DI[392] DI[391] DI[390] DI[389] DI[388] DI[387] DI[386] DI[385]
X49 DI[400] DI[399] DI[398] DI[397] DI[396] DI[395] DI[394] DI[393]
X50 DI[408] DI[407] DI[406] DI[405] DI[404] DI[403] DI[402] DI[401]
X51 DI[416] DI[415] DI[414] DI[413] DI[412] DI[411] DI[410] DI[409]
X52 DI[424] DI[423] DI[422] DI[421] DI[420] DI[419] DI[418] DI[417]
X53 DI[432] DI[431] DI[430] DI[429] DI[428] DI[427] DI[426] DI[425]
X54 DI[440] DI[439] DI[438] DI[437] DI[436] DI[435] DI[434] DI[433]
X55 DI[448] DI[447] DI[446] DI[445] DI[444] DI[443] DI[442] DI[441]
X56 DI[456] DI[455] DI[454] DI[453] DI[452] DI[451] DI[450] DI[449]
X57 DI[464] DI[463] DI[462] DI[461] DI[460] DI[459] DI[458] DI[457]
X58 DI[472] DI[471] DI[470] DI[469] DI[468] DI[467] DI[466] DI[465]
X59 DI[480] DI[479] DI[478] DI[477] DI[476] DI[475] DI[474] DI[473]
X60 DI[488] DI[487] DI[486] DI[485] DI[484] DI[483] DI[482] DI[481]
X61 DI[496] DI[495] DI[494] DI[493] DI[492] DI[491] DI[490] DI[489]
X62 DI[504] DI[503] DI[502] DI[501] DI[500] DI[499] DI[498] DI[487]
X63 DI[512] DI[511] DI[510] DI[509] DI[508] DI[507] DI[506] DI[505]
X64 DI[520] DI[519] DI[518] DI[517] DI[516] DI[515] DI[514] DI[513]
X65 DI[528] DI[527] DI[526] DI[525] DI[524] DI[523] DI[522] DI[521]
X66 DI[536] DI[535] DI[534] DI[533] DI[532] DI[531] DI[530] DI[529]
X67 DI[544] DI[543] DI[542] DI[541] DI[540] DI[539] DI[538] DI[537]
X68 DI[552] DI[551] DI[550] DI[549] DI[548] DI[547] DI[546] DI[545]

- 209 -
8. PMC ADDRESS CORRESPONDENCE B-82614EN/02

Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


X69 DI[560] DI[559] DI[558] DI[557] DI[556] DI[555] DI[554] DI[553]
X70 DI[568] DI[567] DI[566] DI[565] DI[564] DI[563] DI[562] DI[561]
X71 DI[576] DI[575] DI[574] DI[573] DI[572] DI[571] DI[570] DI[569]
X72 DI[584] DI[583] DI[582] DI[581] DI[580] DI[579] DI[578] DI[577]
X73 DI[592] DI[591] DI[590] DI[589] DI[588] DI[587] DI[586] DI[585]
X74 DI[600] DI[599] DI[598] DI[597] DI[596] DI[595] DI[594] DI[593]
X75 DI[608] DI[607] DI[606] DI[605] DI[604] DI[603] DI[602] DI[601]
X76 DI[616] DI[615] DI[614] DI[613] DI[612] DI[611] DI[610] DI[609]
X77 DI[624] DI[623] DI[622] DI[621] DI[620] DI[619] DI[618] DI[617]
X78 DI[632] DI[631] DI[630] DI[629] DI[628] DI[627] DI[626] DI[625]
X79 DI[640] DI[639] DI[638] DI[637] DI[636] DI[635] DI[634] DI[633]
X80 DI[648] DI[647] DI[646] DI[645] DI[644] DI[643] DI[642] DI[641]
X81 DI[656] DI[655] DI[654] DI[653] DI[652] DI[651] DI[650] DI[649]
X82 DI[664] DI[663] DI[662] DI[661] DI[660] DI[659] DI[658] DI[657]
X83 DI[672] DI[671] DI[670] DI[669] DI[668] DI[667] DI[666] DI[665]
X84 DI[680] DI[679] DI[678] DI[677] DI[676] DI[675] DI[674] DI[673]
X85 DI[688] DI[687] DI[686] DI[685] DI[684] DI[683] DI[682] DI[681]
X86 DI[696] DI[695] DI[694] DI[693] DI[692] DI[691] DI[690] DI[689]
X87 DI[704] DI[703] DI[702] DI[701] DI[700] DI[699] DI[698] DI[697]
X88 DI[712] DI[711] DI[710] DI[709] DI[708] DI[707] DI[706] DI[705]
X89 DI[720] DI[719] DI[718] DI[717] DI[716] DI[715] DI[714] DI[713]
X90 DI[728] DI[727] DI[726] DI[725] DI[724] DI[723] DI[722] DI[721]
X91 DI[736] DI[735] DI[734] DI[733] DI[732] DI[731] DI[730] DI[729]
X92 DI[744] DI[743] DI[742] DI[741] DI[740] DI[739] DI[738] DI[737]
X93 DI[752] DI[751] DI[750] DI[749] DI[748] DI[747] DI[746] DI[745]
X94 DI[760] DI[759] DI[758] DI[757] DI[756] DI[755] DI[754] DI[753]
X95 DI[768] DI[767] DI[766] DI[765] DI[764] DI[763] DI[762] DI[761]
X96 DI[776] DI[775] DI[774] DI[773] DI[772] DI[771] DI[770] DI[769]
X97 DI[784] DI[783] DI[782] DI[781] DI[780] DI[779] DI[778] DI[777]
X98 DI[792] DI[791] DI[790] DI[789] DI[788] DI[787] DI[786] DI[785]
X99 DI[800] DI[799] DI[798] DI[797] DI[796] DI[795] DI[794] DI[793]
X100 DI[808] DI[807] DI[806] DI[805] DI[804] DI[803] DI[802] DI[801]
X101 DI[816] DI[815] DI[814] DI[813] DI[812] DI[811] DI[810] DI[809]
X102 DI[824] DI[823] DI[822] DI[821] DI[820] DI[819] DI[818] DI[817]
X103 DI[832] DI[831] DI[830] DI[829] DI[828] DI[827] DI[826] DI[825]
X104 DI[840] DI[839] DI[838] DI[837] DI[836] DI[835] DI[834] DI[833]
X105 DI[848] DI[847] DI[846] DI[845] DI[844] DI[843] DI[842] DI[841]
X106 DI[856] DI[855] DI[854] DI[853] DI[852] DI[851] DI[850] DI[849]
X107 DI[864] DI[863] DI[862] DI[861] DI[860] DI[859] DI[858] DI[857]
X108 DI[872] DI[871] DI[870] DI[869] DI[868] DI[867] DI[866] DI[865]
X109 DI[880] DI[879] DI[878] DI[877] DI[876] DI[875] DI[874] DI[873]
X110 DI[888] DI[887] DI[886] DI[885] DI[884] DI[883] DI[882] DI[881]
X111 DI[896] DI[895] DI[894] DI[893] DI[892] DI[891] DI[890] DI[889]
X112 DI[904] DI[903] DI[902] DI[901] DI[900] DI[899] DI[898] DI[897]
X113 DI[912] DI[911] DI[910] DI[909] DI[908] DI[907] DI[906] DI[905]
X114 DI[920] DI[919] DI[918] DI[917] DI[916] DI[915] DI[914] DI[913]
X115 DI[928] DI[927] DI[926] DI[925] DI[924] DI[923] DI[922] DI[921]
X116 DI[936] DI[935] DI[934] DI[933] DI[932] DI[931] DI[930] DI[929]
X117 DI[944] DI[943] DI[942] DI[941] DI[940] DI[939] DI[938] DI[937]
X118 DI[952] DI[951] DI[950] DI[949] DI[948] DI[947] DI[946] DI[945]
X119 DI[960] DI[959] DI[958] DI[957] DI[956] DI[955] DI[954] DI[953]
X120 DI[968] DI[967] DI[966] DI[965] DI[964] DI[963] DI[962] DI[961]
X121 DI[976] DI[975] DI[974] DI[973] DI[972] DI[971] DI[970] DI[969]

- 210 -
B-82614EN/02 8. PMC ADDRESS CORRESPONDENCE

Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


X122 DI[984] DI[983] DI[982] DI[981] DI[980] DI[979] DI[978] DI[977]
X123 DI[992] DI[991] DI[990] DI[989] DI[988] DI[987] DI[986] DI[985]
X124 DI[1000] DI[999] DI[998] DI[997] DI[996] DI[995] DI[994] DI[993]
X125 DI[1008] DI[1007] DI[1006] DI[1005] DI[1004] DI[1003] DI[1002] DI[1001]
X126 DI[1016] DI[1015] DI[1014] DI[1013] DI[1012] DI[1011] DI[1010] DI[1009]
X127 DI[1024] DI[1023] DI[1022] DI[1021] DI[1020] DI[1019] DI[1018] DI[1017]

8.1.2 X1000-X1004 ↔ UI[1]-UI[40] (User Operator Panel Inputs)


This area corresponds to UOP input ports. If the system has an integrated PMC, UI becomes general output
port as same as DI. Please use the system interface (G1000-G1255) to use the function of UOP.
However, do not use the system interface if a Standard PMC program is used to transfer system interface to
UOPs. The Standard PMC program is loaded with the PMC option. This program should be used for the
bases of all PMC programs that use external I/O devices for UOPs. Refer to Section 1.6, "Standard PMC
Program," for more details.
The correspondence of PMC address to UI index is the following.

Xa.b ↔ UI[c]
( a - 1000 ) × 8 + b + 1 = c

(Example: X1001.4, a=1001, b=4, (1001-1000)*8+4+1=13, c=13, UI[13])

Correspondence between UI and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
X1000 UI[8] UI[7] UI[6] UI[5] UI[4] UI[3] UI[2] UI[1]
X1001 UI[16] UI[15] UI[14] UI[13] UI[12] UI[11] UI[10] UI[9]
X1002 UI[24] UI[23] UI[22] UI[21] UI[20] UI[19] UI[18] UI[17]
X1003 UI[32] UI[31] UI[30] UI[29] UI[28] UI[27] UI[26] UI[25]
X1004 UI[40] UI[39] UI[38] UI[37] UI[36] UI[35] UI[34] UI[33]

8.1.3 X1005-X1009 ↔ WI[1]-WI[40] (Weld Digital Inputs)


The correspondence of the PMC address to the WI index is shown below.

Xa.b ↔ WI[c]
( a - 1005 ) × 8 + b + 1 = c

(Example: X1007.4, a=1007, b=4, (1007-1005)*8+4+1=21, c=21, WI[21])

Correspondence between WI and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
X1005 WI[8] WI[7] WI[6] WI[5] WI[4] WI[3] WI[2] WI[1]
X1006 WI[16] WI[15] WI[14] WI[13] WI[12] WI[11] WI[10] WI[9]
X1007 WI[24] WI[23] WI[22] WI[21] WI[20] WI[19] WI[18] WI[17]
X1008 WI[32] WI[31] WI[30] WI[29] WI[28] WI[27] WI[26] WI[25]
X1009 WI[40] WI[39] WI[38] WI[37] WI[36] WI[35] WI[34] WI[33]

- 211 -
8. PMC ADDRESS CORRESPONDENCE B-82614EN/02

8.1.4 X1010-X1014 ↔ Wsti[1]-Wsti[40] (Wire Stick Inputs)


The correspondence of the PMC address to the WSTI index is shown below.

Xa.b ↔ WSTI[c]
( a - 1010 ) × 8 + b + 1 = c

(Example: X1012.4, a=1012, b=4, (1012-1010)*8+4+1=21, c=21, WSTI[21])

Correspondence between WSTI and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
X1010 WSTI[8] WSTI[7] WSTI[6] WSTI[5] WSTI[4] WSTI[3] WSTI[2] WSTI[1]
X1011 WSTI[16] WSTI[15] WSTI[14] WSTI[13] WSTI[12] WSTI[11] WSTI[10] WSTI[9]
X1012 WSTI[24] WSTI[23] WSTI[22] WSTI[21] WSTI[20] WSTI[19] WSTI[18] WSTI[17]
X1013 WSTI[32] WSTI[31] WSTI[30] WSTI[29] WSTI[28] WSTI[27] WSTI[26] WSTI[25]
X1014 WSTI[40] WSTI[39] WSTI[38] WSTI[37] WSTI[36] WSTI[35] WSTI[34] WSTI[33]

8.1.5 X1015-X1019 ↔ LDI[1]-LDI[40] (Laser Digital Inputs)


The correspondence of the PMC address to the LDI index is shown below.

Xa.b ↔ LDI[c]
( a - 1015 ) × 8 + b + 1 = c

(Example: X1017.4, a=1017, b=4, (1017-1015)*8+4+1=21, c=21, LI[21])

Correspondence between LDI and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
X1015 LDI[8] LDI[7] LDI[6] LDI[5] LDI[4] LDI[3] LDI[2] LDI[1]
X1016 LDI[16] LDI[15] LDI[14] LDI[13] LDI[12] LDI[11] LDI[10] LDI[9]
X1017 LDI[24] LDI[23] LDI[22] LDI[21] LDI[20] LDI[19] LDI[18] LDI[17]
X1018 LDI[32] LDI[31] LDI[30] LDI[29] LDI[28] LDI[27] LDI[26] LDI[25]
X1019 LDI[40] LDI[39] LDI[38] LDI[37] LDI[36] LDI[35] LDI[34] LDI[33]

8.1.6 X1020-X1024 ↔ RI[1]-RI[40] (Robot Digital Inputs)


The correspondence of the PMC address to the RI index is shown below.

Xa.b ↔ RI[c]
( a - 1020 ) × 8 + b + 1 = c

(Example: X1020.4, a=1020, b=4, (1020-1020)*8+4+1=5, c=5, RI[5])

Correspondence between RI and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
X1020 RI[8] RI[7] RI[6] RI[5] RI[4] RI[3] RI[2] RI[1]
X1021 RI[16] RI[15] RI[14] RI[13] RI[12] RI[11] RI[10] RI[9]
X1022 RI[24] RI[23] RI[22] RI[21] RI[20] RI[19] RI[18] RI[17]
X1023 RI[32] RI[31] RI[30] RI[29] RI[28] RI[27] RI[26] RI[25]
X1024 RI[40] RI[39] RI[38] RI[37] RI[36] RI[35] RI[34] RI[33]

- 212 -
B-82614EN/02 8. PMC ADDRESS CORRESPONDENCE

8.1.7 X1025-X1026 ↔ SI[1]-SI[16] (Standard Operator Panel Inputs)


The correspondence of the PMC address to the SI index is shown below.

Xa.b ↔ SI[c]
( a - 1025 ) × 8 + b = c

(Example: X1025.4, a=1025, b=4, (1025-1025)*8+4=4, c=4, SI[4])

Correspondence between SI and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
X1025 SI[7] SI[6] SI[5] SI[4] SI[3] SI[2] SI[1] SI[0]
X1026 SI[15] SI[14] SI[13] SI[12] SI[11] SI[10] SI[9] SI[8]

8.2 Y
The Y area corresponds to the digital output ports of the robot controller. The PMC uses this area to output
information to external I/O devices.

NOTE
The Y area can not be used in any function command. If you specify Y area in a
function command, the PMC program causes an error in the controller, and the
PMC program can not be started.
To use the Y area in a function command, copy the value of this area to internal
relay by basic command, and use the internal relay in a function command.

8.2.1 Y0-Y127 ↔ DO[1]-DO[1024] (General Digital Output)


The correspondence of PMC address to DO index is shown below.

Ya.b ↔ DO[c]
a×8+b+1=c

(Example: Y3.4, a=3, b=4, (3*8)+4+1=29, c=29, DO[29])

Correspondence between DO and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Y0 DO[8] DO[7] DO[6] DO[5] DO[4] DO[3] DO[2] DO[1]
Y1 DO[16] DO[15] DO[14] DO[13] DO[12] DO[11] DO[10] DO[9]
Y2 DO[24] DO[23] DO[22] DO[21] DO[20] DO[19] DO[18] DO[17]
Y3 DO[32] DO[31] DO[30] DO[29] DO[28] DO[27] DO[26] DO[25]
Y4 DO[40] DO[39] DO[38] DO[37] DO[36] DO[35] DO[34] DO[33]
Y5 DO[48] DO[47] DO[46] DO[45] DO[44] DO[43] DO[42] DO[41]
Y6 DO[56] DO[55] DO[54] DO[53] DO[52] DO[51] DO[50] DO[49]
Y7 DO[64] DO[63] DO[62] DO[61] DO[60] DO[59] DO[58] DO[57]
Y8 DO[72] DO[71] DO[70] DO[69] DO[68] DO[67] DO[66] DO[65]
Y9 DO[80] DO[79] DO[78] DO[77] DO[76] DO[75] DO[74] DO[73]
Y10 DO[88] DO[87] DO[86] DO[85] DO[84] DO[83] DO[82] DO[81]
Y11 DO[96] DO[95] DO[94] DO[93] DO[92] DO[91] DO[90] DO[89]
Y12 DO[104] DO[103] DO[102] DO[101] DO[100] DO[99] DO[98] DO[97]
Y13 DO[112] DO[111] DO[110] DO[109] DO[108] DO[107] DO[106] DO[105]
- 213 -
8. PMC ADDRESS CORRESPONDENCE B-82614EN/02

Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


Y14 DO[120] DO[119] DO[118] DO[117] DO[116] DO[115] DO[114] DO[113]
Y15 DO[128] DO[127] DO[126] DO[125] DO[124] DO[123] DO[122] DO[121]
Y16 DO[136] DO[135] DO[134] DO[133] DO[132] DO[131] DO[130] DO[129]
Y17 DO[144] DO[143] DO[142] DO[141] DO[140] DO[139] DO[138] DO[137]
Y18 DO[152] DO[151] DO[150] DO[149] DO[148] DO[147] DO[146] DO[145]
Y19 DO[160] DO[159] DO[158] DO[157] DO[156] DO[155] DO[154] DO[153]
Y20 DO[168] DO[167] DO[166] DO[165] DO[164] DO[163] DO[162] DO[161]
Y21 DO[176] DO[175] DO[174] DO[173] DO[172] DO[171] DO[170] DO[169]
Y22 DO[184] DO[183] DO[182] DO[181] DO[180] DO[179] DO[178] DO[177]
Y23 DO[192] DO[191] DO[190] DO[189] DO[188] DO[187] DO[186] DO[185]
Y24 DO[200] DO[199] DO[198] DO[197] DO[196] DO[195] DO[194] DO[193]
Y25 DO[208] DO[207] DO[206] DO[205] DO[204] DO[203] DO[202] DO[201]
Y26 DO[216] DO[215] DO[214] DO[213] DO[212] DO[211] DO[210] DO[209]
Y27 DO[224] DO[223] DO[222] DO[221] DO[220] DO[219] DO[218] DO[217]
Y28 DO[232] DO[231] DO[230] DO[229] DO[228] DO[227] DO[226] DO[225]
Y29 DO[240] DO[239] DO[238] DO[237] DO[236] DO[235] DO[234] DO[233]
Y30 DO[248] DO[247] DO[246] DO[245] DO[244] DO[243] DO[242] DO[241]
Y31 DO[256] DO[255] DO[254] DO[253] DO[252] DO[251] DO[250] DO[249]
Y32 DO[264] DO[263] DO[262] DO[261] DO[260] DO[259] DO[258] DO[257]
Y33 DO[272] DO[271] DO[270] DO[269] DO[268] DO[267] DO[266] DO[265]
Y34 DO[280] DO[279] DO[278] DO[277] DO[276] DO[275] DO[274] DO[273]
Y35 DO[288] DO[287] DO[286] DO[285] DO[284] DO[283] DO[282] DO[281]
Y36 DO[296] DO[295] DO[294] DO[293] DO[292] DO[291] DO[290] DO[289]
Y37 DO[304] DO[303] DO[302] DO[301] DO[300] DO[299] DO[298] DO[297]
Y38 DO[312] DO[311] DO[310] DO[309] DO[308] DO[307] DO[306] DO[305]
Y39 DO[320] DO[319] DO[318] DO[317] DO[316] DO[315] DO[314] DO[313]
Y40 DO[328] DO[327] DO[326] DO[325] DO[324] DO[323] DO[322] DO[321]
Y41 DO[336] DO[335] DO[334] DO[333] DO[332] DO[331] DO[330] DO[329]
Y42 DO[344] DO[343] DO[342] DO[341] DO[340] DO[339] DO[338] DO[337]
Y43 DO[352] DO[351] DO[350] DO[349] DO[348] DO[347] DO[346] DO[345]
Y44 DO[360] DO[359] DO[358] DO[357] DO[356] DO[355] DO[354] DO[353]
Y45 DO[368] DO[367] DO[366] DO[365] DO[364] DO[363] DO[362] DO[361]
Y46 DO[376] DO[375] DO[374] DO[373] DO[372] DO[371] DO[370] DO[369]
Y47 DO[384] DO[383] DO[382] DO[381] DO[380] DO[379] DO[378] DO[377]
Y48 DO[392] DO[391] DO[390] DO[389] DO[388] DO[387] DO[386] DO[385]
Y49 DO[400] DO[399] DO[398] DO[397] DO[396] DO[395] DO[394] DO[393]
Y50 DO[408] DO[407] DO[406] DO[405] DO[404] DO[403] DO[402] DO[401]
Y51 DO[416] DO[415] DO[414] DO[413] DO[412] DO[411] DO[410] DO[409]
Y52 DO[424] DO[423] DO[422] DO[421] DO[420] DO[419] DO[418] DO[417]
Y53 DO[432] DO[431] DO[430] DO[429] DO[428] DO[427] DO[426] DO[425]
Y54 DO[440] DO[439] DO[438] DO[437] DO[436] DO[435] DO[434] DO[433]
Y55 DO[448] DO[447] DO[446] DO[445] DO[444] DO[443] DO[442] DO[441]
Y56 DO[456] DO[455] DO[454] DO[453] DO[452] DO[451] DO[450] DO[449]
Y57 DO[464] DO[463] DO[462] DO[461] DO[460] DO[459] DO[458] DO[457]
Y58 DO[472] DO[471] DO[470] DO[469] DO[468] DO[467] DO[466] DO[465]
Y59 DO[480] DO[479] DO[478] DO[477] DO[476] DO[475] DO[474] DO[473]
Y60 DO[488] DO[487] DO[486] DO[485] DO[484] DO[483] DO[482] DO[481]
Y61 DO[496] DO[495] DO[494] DO[493] DO[492] DO[491] DO[490] DO[489]
Y62 DO[504] DO[503] DO[502] DO[501] DO[500] DO[499] DO[498] DO[487]
Y63 DO[512] DO[511] DO[510] DO[509] DO[508] DO[507] DO[506] DO[505]
Y64 DO[520] DO[519] DO[518] DO[517] DO[516] DO[515] DO[514] DO[513]
Y65 DO[528] DO[527] DO[526] DO[525] DO[524] DO[523] DO[522] DO[521]
Y66 DO[536] DO[535] DO[534] DO[533] DO[532] DO[531] DO[530] DO[529]

- 214 -
B-82614EN/02 8. PMC ADDRESS CORRESPONDENCE

Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


Y67 DO[544] DO[543] DO[542] DO[541] DO[540] DO[539] DO[538] DO[537]
Y68 DO[552] DO[551] DO[550] DO[549] DO[548] DO[547] DO[546] DO[545]
Y69 DO[560] DO[559] DO[558] DO[557] DO[556] DO[555] DO[554] DO[553]
Y70 DO[568] DO[567] DO[566] DO[565] DO[564] DO[563] DO[562] DO[561]
Y71 DO[576] DO[575] DO[574] DO[573] DO[572] DO[571] DO[570] DO[569]
Y72 DO[584] DO[583] DO[582] DO[581] DO[580] DO[579] DO[578] DO[577]
Y73 DO[592] DO[591] DO[590] DO[589] DO[588] DO[587] DO[586] DO[585]
Y74 DO[600] DO[599] DO[598] DO[597] DO[596] DO[595] DO[594] DO[593]
Y75 DO[608] DO[607] DO[606] DO[605] DO[604] DO[603] DO[602] DO[601]
Y76 DO[616] DO[615] DO[614] DO[613] DO[612] DO[611] DO[610] DO[609]
Y77 DO[624] DO[623] DO[622] DO[621] DO[620] DO[619] DO[618] DO[617]
Y78 DO[632] DO[631] DO[630] DO[629] DO[628] DO[627] DO[626] DO[625]
Y79 DO[640] DO[639] DO[638] DO[637] DO[636] DO[635] DO[634] DO[633]
Y80 DO[648] DO[647] DO[646] DO[645] DO[644] DO[643] DO[642] DO[641]
Y81 DO[656] DO[655] DO[654] DO[653] DO[652] DO[651] DO[650] DO[649]
Y82 DO[664] DO[663] DO[662] DO[661] DO[660] DO[659] DO[658] DO[657]
Y83 DO[672] DO[671] DO[670] DO[669] DO[668] DO[667] DO[666] DO[665]
Y84 DO[680] DO[679] DO[678] DO[677] DO[676] DO[675] DO[674] DO[673]
Y85 DO[688] DO[687] DO[686] DO[685] DO[684] DO[683] DO[682] DO[681]
Y86 DO[696] DO[695] DO[694] DO[693] DO[692] DO[691] DO[690] DO[689]
Y87 DO[704] DO[703] DO[702] DO[701] DO[700] DO[699] DO[698] DO[697]
Y88 DO[712] DO[711] DO[710] DO[709] DO[708] DO[707] DO[706] DO[705]
Y89 DO[720] DO[719] DO[718] DO[717] DO[716] DO[715] DO[714] DO[713]
Y90 DO[728] DO[727] DO[726] DO[725] DO[724] DO[723] DO[722] DO[721]
Y91 DO[736] DO[735] DO[734] DO[733] DO[732] DO[731] DO[730] DO[729]
Y92 DO[744] DO[743] DO[742] DO[741] DO[740] DO[739] DO[738] DO[737]
Y93 DO[752] DO[751] DO[750] DO[749] DO[748] DO[747] DO[746] DO[745]
Y94 DO[760] DO[759] DO[758] DO[757] DO[756] DO[755] DO[754] DO[753]
Y95 DO[768] DO[767] DO[766] DO[765] DO[764] DO[763] DO[762] DO[761]
Y96 DO[776] DO[775] DO[774] DO[773] DO[772] DO[771] DO[770] DO[769]
Y97 DO[784] DO[783] DO[782] DO[781] DO[780] DO[779] DO[778] DO[777]
Y98 DO[792] DO[791] DO[790] DO[789] DO[788] DO[787] DO[786] DO[785]
Y99 DO[800] DO[799] DO[798] DO[797] DO[796] DO[795] DO[794] DO[793]
Y100 DO[808] DO[807] DO[806] DO[805] DO[804] DO[803] DO[802] DO[801]
Y101 DO[816] DO[815] DO[814] DO[813] DO[812] DO[811] DO[810] DO[809]
Y102 DO[824] DO[823] DO[822] DO[821] DO[820] DO[819] DO[818] DO[817]
Y103 DO[832] DO[831] DO[830] DO[829] DO[828] DO[827] DO[826] DO[825]
Y104 DO[840] DO[839] DO[838] DO[837] DO[836] DO[835] DO[834] DO[833]
Y105 DO[848] DO[847] DO[846] DO[845] DO[844] DO[843] DO[842] DO[841]
Y106 DO[856] DO[855] DO[854] DO[853] DO[852] DO[851] DO[850] DO[849]
Y107 DO[864] DO[863] DO[862] DO[861] DO[860] DO[859] DO[858] DO[857]
Y108 DO[872] DO[871] DO[870] DO[869] DO[868] DO[867] DO[866] DO[865]
Y109 DO[880] DO[879] DO[878] DO[877] DO[876] DO[875] DO[874] DO[873]
Y110 DO[888] DO[887] DO[886] DO[885] DO[884] DO[883] DO[882] DO[881]
Y111 DO[896] DO[895] DO[894] DO[893] DO[892] DO[891] DO[890] DO[889]
Y112 DO[904] DO[903] DO[902] DO[901] DO[900] DO[899] DO[898] DO[897]
Y113 DO[912] DO[911] DO[910] DO[909] DO[908] DO[907] DO[906] DO[905]
Y114 DO[920] DO[919] DO[918] DO[917] DO[916] DO[915] DO[914] DO[913]
Y115 DO[928] DO[927] DO[926] DO[925] DO[924] DO[923] DO[922] DO[921]
Y116 DO[936] DO[935] DO[934] DO[933] DO[932] DO[931] DO[930] DO[929]
Y117 DO[944] DO[943] DO[942] DO[941] DO[940] DO[939] DO[938] DO[937]
Y118 DO[952] DO[951] DO[950] DO[949] DO[948] DO[947] DO[946] DO[945]
Y119 DO[960] DO[959] DO[958] DO[957] DO[956] DO[955] DO[954] DO[953]

- 215 -
8. PMC ADDRESS CORRESPONDENCE B-82614EN/02

Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


Y120 DO[968] DO[967] DO[966] DO[965] DO[964] DO[963] DO[962] DO[961]
Y121 DO[976] DO[975] DO[974] DO[973] DO[972] DO[971] DO[970] DO[969]
Y122 DO[984] DO[983] DO[982] DO[981] DO[980] DO[979] DO[978] DO[977]
Y123 DO[992] DO[991] DO[990] DO[989] DO[988] DO[987] DO[986] DO[985]
Y124 DO[1000] DO[999] DO[998] DO[997] DO[996] DO[995] DO[994] DO[993]
Y125 DO[1008] DO[1007] DO[1006] DO[1005] DO[1004] DO[1003] DO[1002] DO[1001]
Y126 DO[1016] DO[1015] DO[1014] DO[1013] DO[1012] DO[1011] DO[1010] DO[1009]
Y127 DO[1024] DO[1023] DO[1022] DO[1021] DO[1020] DO[1019] DO[1018] DO[1017]

8.2.2 Y1000-Y1004 ↔ UO[1]-UO[40] (User Operator Panel Outputs)


This area is corresponds to UOP output ports. If the system has an integrated PMC, UO becomes general
output port as same as DO. Please use system interface (F1000-F1255) to use the function of UOP.
However, do not use the system interface if the Standard PMC program is used to transfer System Interface
to UOPs. The Standard PMC program is loaded with the PMC option. This program should be used for the
bases of all PMC programs that use external I/O devices for UOPs. Refer to Section 1.6, "Standard PMC
Program," for more details.
The correspondence of the PMC address to UO index is shown below.

Ya.b ↔ UO[c]
( a - 1000 ) × 8 + b + 1 = c

(Example: Y1001.4, a=1001, b=4, (1001-1000)*8+4+1=13, c=13, UO[13])

Correspondence between UO and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Y1000 UO[8] UO[7] UO[6] UO[5] UO[4] UO[3] UO[2] UO[1]
Y1001 UO[16] UO[15] UO[14] UO[13] UO[12] UO[11] UO[10] UO[9]
Y1002 UO[24] UO[23] UO[22] UO[21] UO[20] UO[19] UO[18] UO[17]
Y1003 UO[32] UO[31] UO[30] UO[29] UO[28] UO[27] UO[26] UO[25]
Y1004 UO[40] UO[39] UO[38] UO[37] UO[36] UO[35] UO[34] UO[33]

8.2.3 Y1005-Y1009 ↔ WO[1]-WO[40] (Weld Digital Outputs)


The correspondence of the PMC address to WO index is shown below.

Ya.b ↔ WO[c]
( a - 1005 ) × 8 + b + 1 = c

(Example: Y1007.4, a=1007, b=4, (1007-1005)*8+4+1=21, c=21, WO[21])

Correspondence between WO and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Y1005 WO[8] WO[7] WO[6] WO[5] WO[4] WO[3] WO[2] WO[1]
Y1006 WO[16] WO[15] WO[14] WO[13] WO[12] WO[11] WO[10] WO[9]
Y1007 WO[24] WO[23] WO[22] WO[21] WO[20] WO[19] WO[18] WO[17]
Y1008 WO[32] WO[31] WO[30] WO[29] WO[28] WO[27] WO[26] WO[25]
Y1009 WO[40] WO[39] WO[38] WO[37] WO[36] WO[35] WO[34] WO[33]

- 216 -
B-82614EN/02 8. PMC ADDRESS CORRESPONDENCE

8.2.4 Y1010-Y1014 ↔ WSTO[1]-WSTO[40] (Wire Stick Outputs)


The correspondence of the PMC address to WSTO index is shown below.

Ya.b WSTO[c]
( a - 1010 ) × 8 + b + 1 = c

(Example: Y1012.4, a=1012, b=4, (1012-1010)*8+4+1=21, c=21, WSTO[21])

Correspondence between WSTO and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Y1010 WSTO[8] WSTO[7] WSTO[6] WSTO[5] WSTO[4] WSTO[3] WSTO[2] WSTO[1]
Y1011 WSTO[16] WSTO[15] WSTO[14] WSTO[13] WSTO[12] WSTO[11] WSTO[10] WSTO[9]
Y1012 WSTO[24] WSTO[23] WSTO[22] WSTO[21] WSTO[20] WSTO[19] WSTO[18] WSTO[17]
Y1013 WSTO[32] WSTO[31] WSTO[30] WSTO[29] WSTO[28] WSTO[27] WSTO[26] WSTO[25]
Y1014 WSTO[40] WSTO[39] WSTO[38] WSTO[37] WSTO[36] WSTO[35] WSTO[34] WSTO[33]

8.2.5 Y1015-Y1019 ↔ LDO[1]-LDO[40] (Laser Digital Outputs)


The correspondence of the PMC address to LDO index is shown below.

Ya.b ↔ LDO[c]
( a - 1015 ) × 8 + b + 1 = c

(Example: Y1017.4, a=1017, b=4, (1017-1015)*8+4+1=21, c=21, LO[21])

Correspondence between LDO and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Y1015 LDO[8] LDO[7] LDO[6] LDO[5] LDO[4] LDO[3] LDO[2] LDO[1]
Y1016 LDO[16] LDO[15] LDO[14] LDO[13] LDO[12] LDO[11] LDO[10] LDO[9]
Y1017 LDO[24] LDO[23] LDO[22] LDO[21] LDO[20] LDO[19] LDO[18] LDO[17]
Y1018 LDO[32] LDO[31] LDO[30] LDO[29] LDO[28] LDO[27] LDO[26] LDO[25]
Y1019 LDO[40] LDO[39] LDO[38] LDO[37] LDO[36] LDO[35] LDO[34] LDO[33]

8.2.6 Y1020-Y1024 ↔ RO[1]-RO[40] (Robot Digital Outputs)


The correspondence of the PMC address to RO index is shown below.

Ya.b ↔ RO[c]
( a - 1020 ) × 8 + b + 1 = c

(Example: Y1020.4, a=1020, b=4, (1020-1020)*8+4+1=5, c=5, RO[5])

Correspondence between RO and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Y1020 RO[8] RO[7] RO[6] RO[5] RO[4] RO[3] RO[2] RO[1]
Y1021 RO[16] RO[15] RO[14] RO[13] RO[12] RO[11] RO[10] RO[9]
Y1022 RO[24] RO[23] RO[22] RO[21] RO[20] RO[19] RO[18] RO[17]
Y1023 RO[32] RO[31] RO[30] RO[29] RO[28] RO[27] RO[26] RO[25]
Y1024 RO[40] RO[39] RO[38] RO[37] RO[36] RO[35] RO[34] RO[33]

- 217 -
8. PMC ADDRESS CORRESPONDENCE B-82614EN/02

8.2.7 Y1025-Y1026 ↔ SO[1]-SO[16] (SOP Outputs)


The correspondence of the PMC address to SO index is shown below.

Ya.b ↔ SO[c]
( a - 1025 ) × 8 + b + 1 = c

(Example: Y1025.4, a=1025, b=4, (1025-1025)*8+4=4, c=4, SO[4])

Correspondence between SO and PMC address


Address Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Y1025 SO[7] SO[6] SO[5] SO[4] SO[3] SO[2] SO[1] SO[0]
Y1026 SO[15] SO[14] SO[13] SO[12] SO[11] SO[10] SO[9] SO[8]

8.3 F
The F0-127 area corresponds to the robot controller group input (GI), and the F128-255 area corresponds to
the analog input (AI). One port of GI and AI uses two bytes of the F area. An even address corresponds to
the upper byte, and an odd address corresponds to the lower byte.

NOTE
F0-255 can be used by the function command MOVW only. If the other function
command or any basic command uses F0-255, the PMC program causes an
error, and the PMC program can not be started.
You must specify an even address of the F0-255 area for the function command
MOVW. If you specify an odd address of F0-255 for the function command
MOVW, the PMC program causes an error.
To use the F0-255 area in a basic command or other function command, copy the
value of this area to the internal relay by using MOVW, and use the internal relay
in the basic command or the function command.

NOTE
The F1000-1255 area is for system interface input. See Section 8.3.3

8.3.1 F0-F127 ↔ GI[1]-GI[64] (Group Inputs)


The correspondence of the PMC address to the GI index is shown below.

Fa (Upper byte), Fb (Lower byte) ↔ GI[c]


a = (( c - 1 ) × 2 ) + 1
b=(c-1)×2

(Example: GI[26], c=26, (26-1)*2+1=51, a=51, F51(Upper byte)


GI[26], c=26, (26-1)*2=50, b=50, F50(Lower byte))

Correspondence between GI and PMC address


Upper Lower Upper Lower Upper Lower Upper Lower
GI[1] F1 F0 GI[2] F3 F2 GI[3] F5 F4 GI[4] F7 F6
GI[5] F9 F8 GI[6] F11 F10 GI[7] F13 F12 GI[8] F15 F14
GI[9] F17 F16 GI[10] F19 F18 GI[11] F21 F20 GI[12] F23 F22
- 218 -
B-82614EN/02 8. PMC ADDRESS CORRESPONDENCE

Upper Lower Upper Lower Upper Lower Upper Lower


GI[13] F25 F24 GI[14] F27 F26 GI[15] F29 F28 GI[16] F31 F30
GI[17] F33 F32 GI[18] F35 F34 GI[19] F37 F36 GI[20] F39 F38
GI[21] F41 F40 GI[22] F43 F42 GI[23] F45 F44 GI[24] F47 F46
GI[25] F49 F48 GI[26] F51 F50 GI[27] F53 F52 GI[28] F55 F54
GI[29] F57 F56 GI[30] F59 F58 GI[31] F61 F60 GI[32] F63 F62
GI[33] F65 F64 GI[34] F67 F66 GI[35] F69 F68 GI[36] F71 F70
GI[37] F73 F72 GI[38] F75 F74 GI[39] F77 F76 GI[40] F79 F78
GI[41] F81 F80 GI[42] F83 F82 GI[43] F85 F84 GI[44] F87 F86
GI[45] F89 F88 GI[46] F91 F90 GI[47] F93 F92 GI[48] F95 F94
GI[49] F97 F96 GI[50] F99 F98 GI[51] F101 F100 GI[52] F103 F102
GI[53] F105 F104 GI[54] F107 F106 GI[55] F109 F108 GI[56] F111 F110
GI[57] F113 F112 GI[58] F115 F114 GI[59] F117 F116 GI[60] F119 F118
GI[61] F121 F120 GI[62] F123 F122 GI[63] F125 F124 GI[64] F127 F126

8.3.2 F128-F255 ↔ AI[1]-AI[64] (Analog Inputs)


The correspondence of the PMC address to the AI index is shown below.

Fa (Upper byte), Fb (Lower byte) ↔ AI[c]


a = (( c - 1 ) × 2 ) + 129
b = (( c - 1 ) × 2 ) + 128

(Example: AI[26], c=26, ((26-1)*2)+129=179, a=179, F179(Upper byte)


AI[26], c=26, ((26-1)*2)+128=178, b=178, F178(Lower byte))

Correspondence between AI and PMC address


Upper Lower Upper Lower Upper Lower Upper Lower
AI[1] F129 F128 AI[2] F131 F130 AI[3] F133 F132 AI[4] F135 F134
AI[5] F137 F136 AI[6] F139 F138 AI[7] F141 F140 AI[8] F143 F142
AI[9] F145 F144 AI[10] F147 F146 AI[11] F149 F148 AI[12] F151 F150
AI[13] F153 F152 AI[14] F155 F154 AI[15] F157 F156 AI[16] F159 F158
AI[17] F161 F160 AI[18] F163 F162 AI[19] F165 F164 AI[20] F167 F166
AI[21] F169 F168 AI[22] F171 F170 AI[23] F173 F172 AI[24] F175 F174
AI[25] F177 F176 AI[26] F179 F178 AI[27] F181 F180 AI[28] F183 F182
AI[29] F185 F184 AI[30] F187 F186 AI[31] F189 F188 AI[32] F191 F190
AI[33] F193 F192 AI[34] F195 F194 AI[35] F197 F196 AI[36] F199 F198
AI[37] F201 F200 AI[38] F203 F202 AI[39] F205 F204 AI[40] F207 F206
AI[41] F209 F208 AI[42] F211 F210 AI[43] F213 F212 AI[44] F215 F214
AI[45] F217 F216 AI[46] F219 F218 AI[47] F221 F220 AI[48] F223 F222
AI[49] F225 F224 AI[50] F227 F226 AI[51] F229 F228 AI[52] F231 F230
AI[53] F233 F232 AI[54] F235 F234 AI[55] F237 F236 AI[56] F239 F238
AI[57] F241 F240 AI[58] F253 F242 AI[59] F245 F244 AI[60] F247 F246
AI[61] F249 F248 AI[62] F251 F250 AI[63] F253 F252 AI[64] F255 F254

8.3.3 F1000-F1255
This area is used to interface between the robot controller system and the PMC program. The PMC program
can read the robot controller system status by using this area.
Refer to Section 1.5.7, "System control by PMC program (System interface)" for details about the system
interface.
You can assign the F1000.0-F1003.7 area to DI, DO, GI, GO, UI and UO as rack 33, slot 6 start point 1-32.
The correspondence of the F area address and start point is shown below.
- 219 -
8. PMC ADDRESS CORRESPONDENCE B-82614EN/02

Fa.b ↔ Start point c


a×8+b+1=c

(Example: F1003.4, a=1003, b=4, (1003-1000)*8+4+1=29, c=29, Start port = 29)


F1004.0-F1255.7 area can not be assigned to any I/O port.

8.4 G
The G0-127 area corresponds to the robot controller group output (GO), and the G128-255 area
corresponds to the analog output (AO). One port of GO and AO uses two bytes of the G area. An even
address corresponds to the upper byte, and an odd address corresponds to the lower byte.

G0-255 can be used by the function command MOVW only. If the other function
command or any basic command uses G0-255, the PMC program causes an
error, and the PMC program can not be started.
You must specify an even address of the G0-255 area for the function command
MOVW. If you specify an odd address of G0-255 for the function command
MOVW, the PMC program causes an error.
To use the G0-255 area in a basic command or other function command, copy the
value of this area to the internal relay by using MOVW, and use the internal relay
in the basic command or other function command.

G1000-1255 area is system interface output.

8.4.1 G0-G127 ↔ GO[1]-GO[64] (Group Outputs)


The correspondence of the PMC address to the GO index is shown below.

Ga (Upper byte), Gb (Lower byte)


a = (( c - 1 ) × 2 ) + 1
b=(c-1)×2

(Example: GO[26], c=26, (26-1)*2+1=51, a=51, G51(Upper byte)


GO[26], c=26, (26-1)*2=50, b=50, G50(Lower byte))

Correspondence between GO and PMC address


Upper Lower Upper Lower Upper Lower Upper Lower
GO[1] G1 G0 GO[2] G3 G2 GO[3] G5 G4 GO[4] G7 G6
GO[5] G9 G8 GO[6] G11 G10 GO[7] G13 G12 GO[8] G15 G14
GO[9] G17 G16 GO[10] G19 G18 GO[11] G21 G20 GO[12] G23 G22
GO[13] G25 G24 GO[14] G27 G26 GO[15] G29 G28 GO[16] G31 G30
GO[17] G33 G32 GO[18] G35 G34 GO[19] G37 G36 GO[20] G39 G38
GO[21] G41 G40 GO[22] G43 G42 GO[23] G45 G44 GO[24] G47 G46
GO[25] G49 G48 GO[26] G51 G50 GO[27] G53 G52 GO[28] G55 G54
GO[29] G57 G56 GO[30] G59 G58 GO[31] G61 G60 GO[32] G63 G62
GO[33] G65 G64 GO[34] G67 G66 GO[35] G69 G68 GO[36] G71 G70
GO[37] G73 G72 GO[38] G75 G74 GO[39] G77 G76 GO[40] G79 G78
GO[41] G81 G80 GO[42] G83 G82 GO[43] G85 G84 GO[44] G87 G86
GO[45] G89 G88 GO[46] G91 G90 GO[47] G93 G92 GO[48] G95 G94
GO[49] G97 G96 GO[50] G99 G98 GO[51] G101 G100 GO[52] G103 G102

- 220 -
B-82614EN/02 8. PMC ADDRESS CORRESPONDENCE

Upper Lower Upper Lower Upper Lower Upper Lower


GO[53] G105 G104 GO[54] G107 G106 GO[55] G109 G108 GO[56] G111 G110
GO[57] G113 G112 GO[58] G115 G114 GO[59] G117 G116 GO[60] G119 G118
GO[61] G121 G120 GO[62] G123 G122 GO[63] G125 G124 GO[64] G127 G126

8.4.2 G128-G255 ↔ AO[1]-AO[64] (Analog Outputs)


The correspondence of the PMC address to the AO index is shown below.

Ga (Upper byte), Gb (Lower byte) ↔ AO[c]


a = (( c - 1 ) × 2 ) + 129
b = (( c - 1 ) × 2 ) + 128

(Example: AO[26], c=26, ((26-1)*2)+129=179, G179(Upper byte)


AO[26], c=26, ((26-1)*2)+128=178, G178(Lower byte))

Correspondence between AO and PMC address


Upper Lower Upper Lower Upper Lower Upper Lower
AO[1] G129 G128 AO[2] G131 G130 AO[3] G133 G132 AO[4] G135 G134
AO[5] G137 G136 AO[6] G139 G138 AO[7] G141 G140 AO[8] G143 G142
AO[9] G145 G144 AO[10] G147 G146 AO[11] G149 G148 AO[12] G151 G150
AO[13] G153 G152 AO[14] G155 G154 AO[15] G157 G156 AO[16] G159 G158
AO[17] G161 G160 AO[18] G163 G162 AO[19] G165 G164 AO[20] G167 G166
AO[21] G169 G168 AO[22] G171 G170 AO[23] G173 G172 AO[24] G175 G174
AO[25] G177 G176 AO[26] G179 G178 AO[27] G181 G180 AO[28] G183 G182
AO[29] G185 G184 AO[30] G187 G186 AO[31] G189 G188 AO[32] G191 G190
AO[33] G193 G192 AO[34] G195 G194 AO[35] G197 G196 AO[36] G199 G198
AO[37] G201 G200 AO[38] G203 G202 AO[39] G205 G204 AO[40] G207 G206
AO[41] G209 G208 AO[42] G211 G210 AO[43] G213 G212 AO[44] G215 G214
AO[45] G217 G216 AO[46] G219 G218 AO[47] G221 G220 AO[48] G223 G222
AO[49] G225 G224 AO[50] G227 G226 AO[51] G229 G228 AO[52] G231 G230
AO[53] G233 G232 AO[54] G235 G234 AO[55] G237 G236 AO[56] G239 G238
AO[57] G241 G240 AO[58] G253 G242 AO[59] G245 G244 AO[60] G247 G246
AO[61] G249 G248 AO[62] G251 G250 AO[63] G253 G252 AO[64] G255 G254

8.4.3 G1000-G1255
This area is used to interface between the robot controller system and the PMC program. The PMC program
can control the robot controller system by using this area.
Refer to Section 1.5.7 (null)"System control by PMC program (System interface)" for details about the
system interface.
You can assign the G1000.0-G1003.7 area to DI, DO, GI, GO, UI and UO as rack 33, slot 7 start point 1-32.
The correspondence of the G area address to start point is shown below.

Ga.b ↔ Start point c


a×8+b+1=c

(Example: G1003.4, a=1003, b=4, (1003-1000)*8+4+1=29, c=29, Start port = 29)


G1004.0-G1255.7 can not be assigned to I/O port.

- 221 -
8. PMC ADDRESS CORRESPONDENCE B-82614EN/02

8.5 R

8.5.1 R0-R1499
This area is the general internal relay. The value of the R area becomes 0 when the controller is turned off
whether the power failure recovery is enabled or disabled.
The R area is accessed at DO[11001]-DO[23000]. The correspondence of the R area address to the DO
index is shown below.

Ra.b ↔ DO[c]
a × 8 + b + 11001 = c

(Example: R3.4, a=3, b=4, 3*8+4+11001=11029, c=11029, DO[11029])


You can assign the R area to DI, DO, GI, GO, UI and UO as rack 33, slot 2 start point 1-12000. The
correspondence of the R area address to the start point is shown below.

Ra.b ↔ Start point c


a×8+b+1=c

(Example: R3.4, a=3, b=4, 3*8+4+1=29, c=29, Start port = 29)

8.5.2 R9000-R9117
This area is the PMC system area.
This area does not correspond to any I/O port, and this area can not be assigned to I/O port.

Refer to Section 1.5.9, "PMC system area" for details about the PMC system area.

8.6 K

8.6.1 K0-K19
This area is the keep relay. The value of the K area is kept when the controller is turned off whether power
failure recovery is enabled or disabled.
The K area is accessed at DO[10001]-DO[10160]. The correspondence of the K area address to the DO index
is shown below.

Ka.b ↔ DO[c]
a × 8 + b + 10001 = c

(Example: K3.4, a=3, b=4, 3*8+4+10001=10029, c=10029, DO[10029])


You can assign the K area to DI, DO, GI, GO, UI and UO as rack 33, slot 1 start point 1-160. The
correspondence of the K area address to the start point is shown below.

Ka.b ↔ Start point c


a×8+b+1=c

(Example: K3.4, a=3, b=4, 3*8+4+1=29, c=29, Start Port=29)


The K17-K19 area is the PMC setting parameters. Refer to Section 1.5.8, "PMC setting parameters" for
details about the PMC setting parameters.

- 222 -
B-82614EN/02 8. PMC ADDRESS CORRESPONDENCE

8.7 D

8.7.1 D0-D2999
The D area is the Data Table. The value of the D area is kept when the controller is turned off whether
power failure recovery is enabled or disabled.
The D area can be accessed as GO[10001]-GO[11500]. Every GO port corresponds to two bytes of the D
area. The correspondence of the D area address to the GO index is shown below.
Da (Upper byte), Db (Lower byte) GO[c]
a = (( c - 10001 ) × 2 ) + 1
b = (( c - 10001 ) × 2 )

(Example: GO[1003], c=1003, ((10013-10001)*2+1=25, a=25, D25 (Upper byte)


GO[10013], c=10013, ((10013-10001)*2=24, b=24, D24 (Lower byte))
You can assign the D area to DI, DO, GI, GO, UI and UO as rack 33, slot 3 start point 1-24000. The
correspondence of the D area address to the start point is shown below.

Da.b ↔ Start point c


a×8+b+1=c

(Example: D3.4, a=3, b=4, 3*8+4+1=29, c=29, Start port = 29)

8.8 T

8.8.1 T0-T79
The T area is for the timer data of the function command TMR(SUB3). The value of the T area is kept when
the controller is turned off whether power failure recovery is enabled or disabled.
You can read and set timer data in Timer menu, and you do not need to read and set the T area directly.
You can assign the T area to DI, DO, GI, GO, UI and UO as rack 33, slot 4 start point 1-640. The
correspondence of the T area address to the start point is shown below.
Ta.b ↔ Start point c
a×8+b+1=c

(Example: T3.4, a=3, b=4, 3*8+4+1=29, c=29, Start port = 29)

8.9 C

8.9.1 C0-C79
The C area is for the preset data and current data of the function command CTR(SUB5). The value of the C
area is kept when the controller is turned off whether power failure recovery is enabled or disabled.
You can read and set preset data and current data in the Counter menu, and you do not need to read and set
the C area directly.
You can assign the C area to DI, DO, GI, GO, UI and UO as rack 33, slot 5 start point 1-640. The
correspondence of the C area address to the start point is shown below.
Ca.b ↔ Start point c
a×8+b+1=c

(Example: c3.4, a=3, b=4, 3*8+4+1=29, c=29, Start port = 29)

- 223 -
9. INTEGRATED PMC ERROR CODES B-82614EN/02

9 INTEGRATED PMC ERROR CODES


PRIO-89 PAUSE.G PMC is not supported on this hardware
[Cause] PMC function is not supported on this main board.
[Remedy] Change main board or remove PMC function.
If you need clear this alarm, please turn off K17.2 (DO[10139]).
PMC does not run at power up, and this alarm does not occur until you run a PMC program.

PRIO-98 WARN PMC communication error


[Cause] Failed to PMC Ethernet communication.
[Remedy] Please back to square one.

PRIO-99 WARN Port initialization error


[Cause] The port is initialized at PMC programmer.
[Remedy] When use PMC Ethernet communication, disable PMC programmer in SETUP Port Init screen.

PRIO-121 WARN Stop PMC program


[Cause] You can not do this operation when a PMC program is running.
[Remedy] Stop PMC program execution.

PRIO-126 WARN No PMC program


[Cause] PMC program does not exist.
[Remedy] Download the PMC program.

PRIO-127 WARN PMC file load error


[Cause] PMC program format is incorrect.
[Remedy] Download the PMC program again.

PRIO-128 PAUSE.G T,C,K and D data may be lost


[Cause] The save of the keep relay (K), Timer (T), Counter (C) and Data table (D) failed at last power down. Current data might
be an old value.
PMC was not started at this power up, because it may be dangerous to run the PMC.
[Remedy] Change the Main board or PSU board and load the PARAM.PMC file.

PRIO-129 WARN SUBx is not supported


[Cause] Illegal function command is found in PMC program.
[Remedy] Check the PMC program.

NOTE
x in the above WARN stands for the function block number
(Example: DISP = 49)

PRIO-130 WARN PMC option is not installed


[Cause] Integrated PMC option (A05B-2400-J760) is not installed.
[Remedy] Install the Integrated PMC option.

PRIO-131 WARN PMC file name error


[Cause] 1. The file name must be LADDER.PMC or PARAM.PMC. The other file name is used for save or load.
2. Device name to access is too long.
[Remedy] 1. Change file name to LADDER.PMC for PMC program, PARAM.PMC for PMC parameter file.
2. Make device name string short.

PRIO-132 WARN PMC operation is locked


[Cause] The operation is locked by another function.
[Remedy] Try again later.

- 224 -
B-82614EN/02 9. INTEGRATED PMC ERROR CODES

PRIO-133 WARN PMC program size is too big


[Cause] Total number of steps in level 1 and level 2 is more than 16384 steps, or there are too many symbol and comment.
[Remedy] Check the PMC program step size, or remove the symbol and comment.

PRIO-134 WARN Invalid PMC addr x (x is stands for PMC address)


[Cause] Specified PMC address is not valid for PMC.
[Remedy] Check the address in the PMC program.

PRIO-136 WARN BYTE access to x


[Cause] X area and Y area of PMC address can not be used in function command.
[Remedy] Check the address in the PMC program. To access as BYTE, copy this bit data to internal relay (R) by basic command.

NOTE
x in the above WARN stands for the address number (Example:
R3.4)

PRIO-137 WARN BIT access to x


[Cause] F0.0 - F255.7 and G0.0 - G255.7 can not be used in basic command.
[Remedy] Check the address in the PMC program. Use the MOVW instruction to copy this data to the internal relay to access as
BIT data.

NOTE
x in the above WARN stands for the address number (Example:
R3.4)

PRIO-138 WARN x is used in SUBy


[Cause] Specified address can not be used in specified function command.
- F0.0 - F255.7 and G0.0-G255.7 can not be used except MOVW.
- Odd byte address of F0.0 - F255.7 and G0.0 - G255.7 can not be used in MOVW.
[Remedy] Use the MOVW instruction to copy this data to the internal relay to access as BIT data.

NOTE
x in the above WARN stands for the address number (Example: F3).
SUBy in the above WARN stands for the function block number
(Example: DISP = 49, SUB 49)

PRIO-139 WARN Invalid CNC addr x(hex) (x stands for the CNC address)
[Cause] Specified CNC address is invalid.
[Remedy] Check the PMC type of FAPT LADDER II.

PRIO-140 WARN Can't display all PMC errors


[Cause] There are more than 10 errors in PMC program therefore, error display is stopped. There may be more errors.
[Remedy] Check the other PMC errors. (Fix displayed 10 errors, and try again.)

PRIO-141 WARN Invalid PMC program


[Cause] PMC program data is invalid.
[Remedy] Check the PMC program, and load again.

PRIO-142 WARN Need E-STOP or CTRL start


[Cause] To write PMC program to flash file, E-STOP must be pressed or start mode is controlled start.
[Remedy] Press the E-STOP button or perform a Controlled start.

PRIO-143 PAUSE.G Writing PMC program to ROM


[Cause] You can not clear alarm status during writing PMC program to flash ROM.
[Remedy] Wait until writing of the PMC program is completed.
- 225 -
9. INTEGRATED PMC ERROR CODES B-82614EN/02

PRIO-144 PAUSE.G Failed to run PMC program


[Cause] Failed to run PMC program because error occurs.
[Remedy] Refer to the previous error messages.

PRIO-145 PAUSE.G Purging flash file, please wait


[Cause] Purging flash file now. It takes a few minutes don't cut power until `Flash file purge is complete' is displayed.
[Remedy] None.

PRIO-146 WARN Flash file purge is completed


[Cause] Purge of flash file is completed.
[Remedy] None.

- 226 -
B-82614EN/02 INDEX

INDEX
Countup Output (W1) ..................................................146
<A> Count-up Output (W1) .................................................150
ADD (Addition) ...........................................................128 Creating a New PMC Program.......................................45
ADDB (Binary Addition).............................................129 Creating a Program ........................................................32
Addend (Address) ........................................................129 CREATING PMC PROGRAM......................................72
Address Storing Input/Output Data ..............................203 CTR (Counter) .............................................................144
Address Storing the Table Internal Number.................203 CTRC (Counter)...........................................................148
AND.............................................................................122 Current Position Address .............................................187
AND. NOT...................................................................123
AND. STK ...................................................................125 <D>
Applications ...................................................................28 D 223
D0-D2999 ....................................................................223
<B> Data Format of Addend................................................129
BASIC COMMAND REFERENCE ............................119 Data Format of Multiplier ............................................178
BASIC COMMANDS......................................................3 Data Format of Subtrahend ..........................................194
Bit Menu ......................................................................102 Data Table......................................................................11
Byte Menu....................................................................101 Data Table Control Data Menu ....................................105
Data Table Head Address...................................... 163,203
<C> Data Table Menu..........................................................107
C 223 DCNV (Data Conversion)............................................150
C0-C79 .........................................................................223 DCNVB (Extended Data Conversion) .........................152
CALL (Conditional Subprogram Call).........................132 DEC (Decode)..............................................................153
CALLU (Unconditional Subprogram Call)..................133 DECB (Binary Decoding) ............................................155
Caution..................................................................140,168 Decode Specification ...................................................154
Check PMC Program (On-line Monitor)........................54 DIFD (Falling Edge Detection)....................................156
COD (Code Conversion)..............................................133 Difference Output Address ..........................................195
CODB (Binary Code Conversion) ...............................136 DIFU (Rising Edge Detection).....................................157
Code Signal Address ....................................................154 DIV (Division) .............................................................158
COIN (Coincidence Check) .........................................137 DIVB (Binary Division)...............................................159
COM (Common Line Control).....................................139 Dividend Address.........................................................159
COME (Common Line Control End) ...........................141 Divisor (Address).........................................................159
COMP (Comparison) ...................................................141 Divisor Data Format Designation ................................159
Comparison Data Address.....................................138,142 DSCH (Data Search) ....................................................161
Comparison Result Output ....................................139,143 DSCHB (Binary Data Search) .....................................163
COMPB (Comparison Between Binary Data)..............143
Compiling a PMC Program.......................................51,76 <E>
CONNECTING FANUC LADDER-III for Robot Editting a PMC Program...........................................49,75
TO ROBOT CONTROLLER .....................................68 END (End of a Ladder Program) .................................165
Connection Between Robot Controller And Fapt END1 (1st Level Sequence Program End)...................165
Ladder-II.....................................................................43 END2 (2nd Level sequence program End) ..................165
Constant .......................................................................181 EOR (Exclusive or)......................................................166
Constant Output Address .............................................181 Error Output ..................................... 129,159,178,195,203
Control Condition...........................................154,197,200 Error Output (W1)........................... 130,135,137,151,153,
Control Conditions ..... 128,129,131,132,135,137,138,139, 160,179,185,196,206
142,143,145,149,151,152,156,157,159,160,162,1 Ethernet Connection.......................................................70
64,166,168,173,175,176,177,178,180,181,182, Example of Using the MOVE Instruction ....................174
183,184,187,189,191,194,195,198,202,205 Example of Using the PARI Instruction.......................185
Control Conditions (ACT) ....................................170,171 Example of Using the ROTB Instruction .....................189
Conversion Data Table..........................................136,137 Examples of Structured Programming ...........................27
Conversion Input Data Address ...................................135 Examples of Using the Counter ...................................146
Convert Data Output Address ......................................135 Execution Command............................................. 174,194
Counter Menu ..............................................................104 Execution Method ..........................................................31
Counter Number...........................................................146 Execution Procedure of Sequence Program ...................23
Counter Preset Value Address......................................150 Exporting LADDER.PMC using FANUC
Counter Register Address.............................................150 LADDER-III for Robot ..............................................88

i-1
INDEX B-82614EN/02

External I/O Device..........................................................7 <L>


LBL (Label) .................................................................171
<F> Level 1 and Level 2........................................................24
F 218 Load LADDER.PMC, PARAM.PMC..........................116
F0-F127 ↔ GI[1]-GI[64] (Group Inputs) ....................218 Loading LADDER.PMC Using FAPT
F1000-F1255 ................................................................219 LADDER-II................................................................63
F128-F255 ↔ AI[1]-AI[64] (Analog Inputs)...............219 Loading PARAM.PMC by FAPT LADDER-II .............65
FANUC LADDER-III for Robot Loading PARAM.PMC using FANUC
PROGRAMMING......................................................67 LADDER-III for Robot ..............................................92
FILE MENU OPERATIONS .......................................113 Loading the Standard PMC Program .............................47
Format ................. 128,129,131,132,133,134,136,137,139, LOGICAL AND ..........................................................131
141,143,145,149,150,152,153,155,156,157,158,1 Logical OR...................................................................182
60,161,164,165,166,168,170,171,172,173,175,
176,177,178,180,181,182,183,184,186,188,19 <M>
1,192,193,195,196,198,199,201,205 Minuend Address .........................................................195
Function ................ 30,128,129,131,132,133,136,137,139, Modifying the PMC Program in Robot..........................59
141,143,144,150,152,153,156,157,158,159,161,1 MODIFYING THE PMC PROGRAM IN THE
63,165,166,167,169,170,171,172,173,174,175, ROBOT CONTROLLER ...........................................85
176,177,178,179,181,182,184,185,188,191,19 MOVB (Transfer of 1 Byte).........................................172
2,193,195,196,198,199,201,203 MOVE (Logical Product Transfer) ..............................173
Function (Fig.7.18.2 (a), (b))........................................155 MOVN (Transfer of an Arbitrary Number of
Function Command ..........................................................4 Bytes) .......................................................................174
FUNCTION COMMAND REFERENCE....................128 MOVOR (Data Transfer After Logical Sum) ..............175
Functions......................................................................148 MOVW (Transfer of 2 Bytes) ......................................176
MUL (Multiplication) ..................................................177
<G> MULB (Binary Multiplication)....................................178
G 220 Multiplicand Address...................................................178
G0-G127 ↔ GO[1]-GO[64] (Group Outputs) .............220 Multiplier (Address).....................................................178
G1000-G1255...............................................................221
G128-G255 ↔ AO[1]-AO[64] (Analog Outputs)........221 <N>
Goal Position Address..................................................187 Nonvolatile Memory ......................................................10
NOT (Logical Not).......................................................179
<I> Number of Data of the Data Table ........................ 162,203
Implementation Techniques ...........................................27 NUME (Definition of Constant) ..................................181
Importing LADDER.PMC using FANUC NUMEB (Definition of Binary Constants) ..................182
LADDER-III for Robot ..............................................90
IMPORTING STANDARD PMC PROGRAM .............73 <O>
Input Data.....................................................................138 Operation .................................. 131,157,158,167,180,183
Input Data Format .................................................138,142 Operation Output Register (R9000) ....... 130,144,153,161,
INTEGRATED PMC ERROR CODES .......................224 179,196
INTEGRATED PMC OVERVIEW .................................1 Operation Result Output Address ................................187
INTEGRATED PMC SPECIFICATIONS.......................1 OR................................................................................123
Interface between PMC Program and Robot OR. NOT......................................................................123
Program ......................................................................14 OR. STK ......................................................................125
INTERLOCKING ..........................................................26 Output for Rotational Direction (W1) ..........................189
Internal Relay...................................................................9
Internal Relay Assignment .............................................20 <P>
Parameter ....................................................... 142,164,198
<J> Parameters.....130,131,132,133,137,140,143,152,156,157,
JMP (Jump) ..................................................................167 160,166,168,170,171,172,175,176,179,180,182,1
JMP Instructions with Label Specification.....................34 83,189,192,193,195,205
JMPB (Label Jump) .....................................................169 Parameters Menu..........................................................108
JMPC (Label Jump) .....................................................170 PARI (Parity Check) ....................................................184
JMPE (Jump End) ........................................................171 PMC ADDRESS CORRESPONDENCE.....................207
PMC ADDRESSES .........................................................6
<K> PMC EXECUTION PROCESSING TIME....................25
K 222 PMC Menus .................................................................100
K0-K19 ........................................................................222 PMC Program ..................................................................2

i-2
B-82614EN/02 INDEX
PMC PROGRAM MONITORING (ONLINE STORE/LOAD PMC PROGRAM AND
MONITOR) ................................................................81 PARAMETERS .........................................................88
PMC Setting Parameters (K17-K19)..............................19 Storing PARAM.PMC by FANUC LADDER-III
PMC System Area (R9000-R9117)................................19 for Robot ....................................................................96
Precision of the Timer ..................................................199 SUB (Subtraction)........................................................193
Product Output Address ...............................................178 SUBB (Binary Subtraction) .........................................195
PROGRAMMING WITH FAPT LADDER-II...............43 Subprogramming and Nesting........................................30
Subtrahend (Address)...................................................195
<Q> Sum Output Address ....................................................129
Quotient Output Address..............................................159 Summand Address .......................................................129
Symbols and Comments...................................................7
<R> System Control by PMC Program (System
R 222 Interface) ....................................................................15
R0-R1499 .....................................................................222
R9000-R9117 ...............................................................222 <T>
RD ................................................................................119 T 223
RD. NOT......................................................................120 T0-T79 .........................................................................223
RD. NOT. STK ............................................................124 TEACH PENDANT OPERATION .............................100
RD. STK ......................................................................123 Timer Accuracy .................................................... 197,200
Remainder Output Address ..........................................161 Timer Menu .................................................................103
Repetitive Operation ......................................................24 Timer Register Address................................................200
Reset.............................................................................194 Timer Relay (TMB{{{)...........................................198
Restrictions.....................................................................37 Timer Relay (TM{{).......................................... 197,201
ROT (Rotation Control) ...............................................185 Timer Set Time Address ..............................................200
Rotating Direction Output (W1)...................................187 Title Menu....................................................................109
ROTB (Binary Rotation Control).................................188 TMR (Timer) ...............................................................196
Rotor Indexing Number ...............................................187 TMRB (Fixed Timer)...................................................198
RS-232C Connection .....................................................68 TMRC (Timer).............................................................199
RST ..............................................................................127 Transfer PMC program ..................................................52
Run/Stop PMC ........................................................57,111 TRANSFERRING PMC PROGRAM............................77
RUNNING OR STOPPING PMC PROGRAM .............83
<U>
<S> Update Timing of Signals ..............................................25
SAFETY........................................................................s-1
Save LADDER.PMC and PARAM.PMC ....................112 <W>
Save LADDER.PMC, PARAM.PMC ..........................115 W1................................................................................192
Save STDLDR.PMC ....................................................112 W1 (Decoding Result Output)......................................154
Save/Load PMC Program and PMC Parameters .......21,61 Writing Pmc Program to F-rom .....................................83
Saving LADDER.PMC Using FAPT Writing PMC Program to ROM .....................................58
LADDER-II................................................................61 WRT.............................................................................121
Saving PARAM.PMC Using FAPT LADDER-II ..........64 WRT. NOT ..................................................................122
Search...........................................................................110
Search Data Address ....................................................163 <X>
Search Data Presence/Absence Output ........................163 X 208
Search Result (W1) ......................................................164 X0-X127 ↔ DI[1]-DI[1024] (General Digital
Search Result Output Address......................................163 Input) ........................................................................208
SEQUENCE PROGRAM ..............................................23 X1000-X1004 ↔ UI[1]-UI[40] (User Operator
Sequence Program Structuring.......................................27 Panel Inputs).............................................................211
SET ..............................................................................126 X1005-X1009 ↔ WI[1]-WI[40] (Weld Digital
Setting Timers ..............................................................197 Inputs) ......................................................................211
SFT (Shift Register) .....................................................191 X1010-X1014 ↔ Wsti[1]-Wsti[40] (Wire Stick
Size of Table Data........................................................135 Inputs) ......................................................................212
SP (Subprogram) ..........................................................192 X1015-X1019 ↔ LDI[1]-LDI[40] (Laser Digital
SPE (End of a Subprogram) .........................................193 Inputs) ......................................................................212
Specifications ............................................................30,34 X1020-X1024 ↔ RI[1]-RI[40] (Robot Digital
Standard PMC Program .................................................21 Inputs) ......................................................................212
Status Menu..................................................................109 X1025-X1026 ↔ SI[1]-SI[16] (Standard
Operator Panel Inputs)..............................................213

i-3
INDEX B-82614EN/02

XMOV (Indexed Data Transfer) ..................................201


XMOVB (Binary Index Modifier Data Transfer) ........203

<Y>
Y 213
Y0-Y127 ↔ DO[1]-DO[1024] (General Digital
Output) .....................................................................213
Y1000-Y1004 ↔ UO[1]-UO[40] (User Operator
Panel Outputs) ..........................................................216
Y1005-Y1009 ↔ WO[1]-WO[40] (Weld Digital
Outputs)....................................................................216
Y1010-Y1014 ↔ WSTO[1]-WSTO[40] (Wire
Stick Outputs)...........................................................217
Y1015-Y1019 ↔ LDO[1]-LDO[40] (Laser
Digital Outputs)........................................................217
Y1020-Y1024 ↔ RO[1]-RO[40] (Robot Digital
Outputs)....................................................................217
Y1025-Y1026 ↔ SO[1]-SO[16] (SOP Outputs)..........218

i-4
Revision Record

FANUC Robot series R-30iA CONTROLLER Integrated PMC OPERATOR'S MANUAL (B-82614EN)

02 Aug.2010 Add Ethernet communication function.

01 Mar.,2007

Edition Date Contents Edition Date Contents


B-82614EN/02

* B - 8 2 6 1 4 E N / 0 2 *

You might also like