Download as pdf or txt
Download as pdf or txt
You are on page 1of 224

PLCNpCROGRAMMING MANUAL

r
RUNNING RUN HImil V
;
G40 G49 G80 ;
G91 G30 YO ZO M05 ;
N1 T09 M06 ;

UNIVERSAL INCREMENT G/M CODE


X 49. 042 X 0. 000 GOO G80 r
Y 111. 296 Y 0. 000 G17 G98 ,J
Z 6. 638 Z 0, 000 G90 G52 tir
G67
G94
T NO :T0000 ACT S:S 0 G21
—n llliH

YASKAWA SIE-C843-13.1
FOREWORD

The Programmable Logic Controller (hereafter refereed to as PLC) for YASNAC J300 series
NC functions as the interface between the YASNAC NC and a machine tool to execute se¬
quence control specific to the machine tools simply and efficiently by software.

For the edition of PLC sequence, a personal computer can be used. This feature allows of¬
fline mode programming. The created programs can be checked by using the sequence de¬
bugging board (model: JANCD-JCP02-3, name: JXSD) installed in the NC after transmit¬
ting the programs to the NC. This feature allows efficient program development.

PLC sequence can be edited in online mode. The online mode editing can be executed by
using the standard hardware without requiring the JXSD board, permitting simple modifica¬
tions to the PLC sequence which is already in operation. It is of course possible to develop
a sequence program without using a personal computer.

This manual explains the PLC instructions, program debugging methods, the procedure used
for writing the programs to flash ROM, etc. so that a series of operation from PLC program
development to writing the program to flash PROM can be performed smoothly.
5?

CONTENTS
FOREWORD

1 SYSTEM CONFIGURATION
1.1 SYSTEM CONFIGURATION OF YASNAC
J300 PLC SYSTEM 1-2

2 SEQUENCE PROGRAM DEVELOPMENT PROCEDURE


2.1 SEQUENCE PROGRAM DEVELOPMENT 2-2

3 PLC PROGRAM SPECIFICATIONS


3.1 BASIC SPECIFICATIONS 3-2

3.2 PROGRAM FUNCTIONS 3-3

3.3 INPUT/OUTPUT SPECIFICATIONS 3-4

4 SEQUENCE CONTROL METHOD


4.1 DIFFERENCES IN OPERATION 4-2

4.2 LEVEL AND OPERATION OF SEQUENCE PROGRAM 4-3

4.3 RELATIONSHIP BETWEEN THE LADDER STOP


COUNT AND THE SEQUENCE TASK 4-6

4.4 SEQUENCE PROGRAM MEMORY CAPACITY


AND MEMORY CONFIGURATION 4-7

5 ADDRESS NUMBERS AND ADDRESS MAP


5.1 ADDRESS MAP 5-2

5.2 ADDRESS MAP AND DISPLAY SYMBOLS 5-3

6 PLC INSTRUCTIONS
6.1 BASICS OF PLC INSTRUCTIONS 6-2

6.2 TYPES AND LIST OF INSTRUCTIONS 6-3


6.3 RELAY INSTRUCTIONS 6-8

6.4 TIMER INSTRUCTIONS 6-15

6.5 REGISTER INSTRUCTIONS 6-17

6.6 CONTROL INSTRUCTIONS 6-41

6.7 MACRO INSTRUCTIONS 6-44

7 JXSD OFFLINE SYSTEM


7.1 OUTLINE OF THE JXSD OFFLINE SYSTEM 7-2
7.1.1 Operating Environment 7-2
7.1.2 Execution Files 7-2
7.1.3 Outline of the Execution Files 7-2
7.1.4 Ladder Program Development Procedure 7-3

7.2 SOURCE FILE 7-6


7.2.1 Source File Format 7-6

7.3 COMPILER 7-18


7.3.1 7Compiler Operation . 7-18
7.3.2 Compiler Error List ... 7-19
7.3.3 Compiler Check Items 7-19

7.4 LINKER 7-21


7.4.1 Object Data and Linker Processing ,7-21
7.4.2 Linker Operation .7-22
7.4.3 Linker Output File 7-23

7.5 REMOTE CONTROLLER OPERATION .. 7-24


7.5.1 Connecting the JXSD to PLC 7-24
7.5.2 Starting the Remote Controller 7-25
7.5.3 Description of Screen Display Information ... 7-26
7.5.4 Operation of Remote Controller 7-28

7.6 LIST OF ERROR MESSAGES AND WARNING


MESSAGES 7-33
7.6.1 Error Messages .. . 7-33
7.6.2 Warning Messages 7-33

ii
8 ONLINE EDITING
8.1 OUTLINE OF ONLINE EDITING 8-2
8.1.1 Creating a Sequence Program Newly 8-2
8.1.2 Creating a Sequence Program by Modifying the Existing
Sequence Program 8-3

8.2 FUNCTION TREE AND DISPLAY SCREENS 8-4


8.2.1 Function Tree 8-4
8.2.2 Ladder Display Screen . 8-5

8.3 LADDER DISPLAY FUNCTION 8-6


8.3.1 BT/TOP (Bottom/Top) Functionÿ 8-6
8.3.2 SYM DIS (Symbol Display) Function 8-6
8.3.3 NET SEL (Net Selection) Function 8-7
8.3.4 GO/STP (Run/Stop) Function 8-8

8.4 NET EDITING FUNCTION 8-10


8.4.1 Selection of Edit Mode 8-11
8.4.2 Keys Used for Editing the Ladder 8-15
8.4.3 Inputting Contacts 8-19
8.4.4 Inputting Vertical and Horizontal Lines 8-22
8.4.5 Inputting Register Instructions 8-23
8.4.6 Canceling the Net Edit Function 8-34
8.4.7 Exiting the Edit Function 8-34

8.5 TABLE EDIT FUNCTION 8-38


8.5.1 Editing the Data in the Conversion Table 8-39
8.5.2 Editing the Data in the Message Table 8-40
8.5.3 Editing the Data in the Symbol Table 8-41

8.6 INPUT/OUTPUT FUNCTION 8-43


8.6.1 Downloading the Sequence Program 8-43
8.6.2 Uploading the Sequence Program 8-45

8.7 SEQ STS (SEQUENCE STATUS) FUNCTION 8-47


8.7.1 Display of Sequence Status 8-47
8.7.2 INITl (Initialization) Function 8-48

8.8 LIST OF MESSAGES 8-51


8.8.1 List of Messages 8-51
8.8.2 List of Warning Messages 8-52
8.8.3 List of Alarm Messages 8-52

Hi
9 DOWNLOADING AND UPLOADING LADDER PROGRAM
9.1 DOWNLOADING LADDER PROGRAM
(PC CARD FLASH ROM) 9-2

9.2 UPLOADING LADDER PROGRAM


(FLASH ROM PC CARD) 9-4

1 r
SYSTEM CONFIGURATION

Chapter 1 describes the system configuration of YASNAC


J300 PLC system.

1.1 SYSTEM CONFIGURATION OF YASNAC


J300 PLC SYSTEM 1 -2

1 -1
1.1 SYSTEM CONFIGURATION OF YASNAC J300 PLC SYSTEM

NC operation panel

Printer

f ft
ooa aoo °am\)
Input/output signal display

ik A

if
tP
NC unit
Personal computer

z
/PLC boa Serialcommunication
(with offline system software package)

1
i

i
JANCD-
JCP02-L2 To send the ladder from a A -PCMCIA card
r
persona) computer, JCP02-3
(JXSD) is necessary.

YENET 1200
! l
PC card (Toshiba)
TH6SS160051AAA
I/O unit

(JANCD-
FC810) To send the ladder to the flash ROM,
a PC card is necessary.

Fig. 1.1

1 -2
2
SEQUENCE PROGRAM DEVELOPMENT
PROCEDURE r
Chapter 2 describes the procedure of sequence program
development - offline and online mode operation.

2.1 SEQUENCE PROGRAM


DEVELOPMENT 2-2

2-1
2.1 SEQUENCE PROGRAM DEVELOPMENT
Processing on the Desk Processing at Personal Computer Processing at NC Unit

Determiningthe numberof I/O points


T
Creating the I/O signal allocation
table
I
Creating the sequence ladder

1
Completion of list of I/Os

'f

Programming

I
Compile and link (object coding)
Turning the power ON with SW
setat“4’on JCP01-2

NO
YES Serial
communication
T
Without errors? Writing the binary file to the
CMOS memory
JCP02-3 (JXSD)
YES Necessary £
Saving the binary file to PC card Debugging and on-line editing

JCP02-3 (JXSD)
Not necessary NO
Complete?

YES
Transferring the ladder to PC
card
Text file and binary file
I
Turning the power OFF
- ON with SW1 ON on JCP01-1
I
Transferring the binary file
from PC card to flash ROM
T
Turning the power OFF -+ ON by
turning “1” of 1SW on JCP01

OK NG
Finalcheck
PC card
jr
Storing the sequence ladder

Fig. 2.1

2-2
3
PLC PROGRAM SPECIFICATIONS

Chapter 3 describes the specifications of PLC programs.

¥
3.1 BASIC SPECIFICATIONS 3-2

3.2 PROGRAM FUNCTIONS 3-3

3.3 INPUT/OUTPUT SPECIFICATIONS .... 3 - 4

3-1
3.1 BASIC SPECIFICATIONS

The basic specifications of PLC programs are indicated below.

Control method Scanning method

Processing time 0.5 fis/step (approximate value)

High-speed processing scan time 4 ms

Low-speed processing scan time 4 ms x n

Note: Value ”n” is determined by the high-speed processing capacity and total program capacity.
Program memory capacity
Basic 256K bytes

1 Program

Table symbol
128K bytes
128K bytes
Note: 128K bytes are equivalent to approximately 32K steps of basic instructions.

Instructions
Basic instruction 61 kinds
Macro instruction 22 kinds

3-2
3.2 PROGRAM FUNCTIONS

3.2 PROGRAM FUNCTIONS

Internal relays 11960 points


Registers 1495 registers (8 bits/register)
Timers 188 timers (5 types)

8 msec to 2.4 sec 40 timers


50 msec to 12.75 sec 60 timers

100 msec to 25.5 sec 60 timers


1 sec to 255 sec 20 timers

1 min to 255 min 8 timers


Sequence parameters
Keep relays
Battery back-up memory
100 sets (8 bits/set)
7200 points

2900 sets
l
& 1. Internal relays and registers occupy the same addresses and the addresses used for
internal relays cannot be used for registers. Similarly, the addresses used for regis¬
ters cannot be used for internal relays.

2. Keep relays and battery back-up memory occupy the same addresses, and the ad¬
dresses used for keep relays cannot be used for battery back-up memory. Similarly,
the addresses used for battery back-up memoiy cannot be used for keep relays. Note
that the keep registers (#8000 to #9999) cannot be used for the keep relays.

3-3
3.3 INPUT/OUTPUT SPECIFICATIONS

General-purpose input/output ports are installed on the I/O module (JANCD-FC810,


FC860, FC861) and the JSP board (JSP02) in the NC operation panel.

The number of I/O points on each module is indicated below.

Number of Input Number of Output


Module JANCD- Remark
Points Points

FC810, FC860 112 96

FC861 64 56 For machine operation panel

JSP02 64 56

An input/output port is incorporated in the control board (JSP02) in the NC operation


panel. Therefore, if modules FC810/FC860 are added, addition of a maximum of 4
boards (max. input: 512 points; max. output: 440 points) is possible, and if module
FC861 is added, addition of a maximum of 9 boards (max. input: 640 points, max.
input: 560 points) is possible.

3-4
4
SEQUENCE CONTROL METHOD

Chapter 4 describes the sequence control method.


Sequence control by PLC is executed sequentially by the soft¬
ware, which differs from the ordinary control by relay circuits
in which processing is executed simultaneously. Due to this
characteristic, the sequence control by PLC results in consid¬
erably different operation from ordinary relay circuit proces¬
sing. When developing programs, this must be completely
understood.
f
4.1 DIFFERENCES IN OPERATION 4-2

4.2 LEVEL AND OPERATION


OF SEQUENCE PROGRAM 4-3

4.3 RELATIONSHIP BETWEEN


THE LADDER STOP COUNT
AND THE SEQUENCE TASK 4-6

4.4 SEQUENCE PROGRAM MEMORY


CAPACITY AND MEMORY
CONFIGURATION 4-7

!'

4-1
4.1 DIFFERENCES IN OPERATION

There are two types of operation modes in the sequence control - relay sequence and PLC
sequence.

(1) Relay Sequence

All devices are processed simultaneously.

(2) PLC Sequence

Devices are processed sequentially and the ladderis executed repeatedly in a fixedperi¬
od. This period is called the scan time.

(Scan time example: 4 msec X n times)

#10001
© #11001

1
A B


#10001 #11001 #11002

Fig. 4.1

The PLC sequence ladder given above operates in the following sequence. The opera¬
tion is not processed simultaneously.

© The status of contact A is read.

© The read status is output to internal relay B.

© The status of contact A is read.

© AND operation is executed between the status of contact A and the status of NC
contact of relay B.

© The result of AND operation is output to internal relay D.

As the result of sequential processing, internal relay D is never turned ON.

However, if the same ladder is executed in the relay sequence, relay D is momentarily
turned ON (one-shot operation).

As discussed above, programming must always be carried out taking into consideration
that processing by the PLC is executed sequentially.

4-2
4.2 LEVEL AND OPERATION OF SEQUENCE PROGRAM

4.2 LEVEL AND OPERATION OF SEQUENCE PROGRAM

Length of time necessary for the execution of one cycle of a sequence program is called the
scan time. The scan time of this model of PLC is indicated below.

•High-speed processing scan time: 4 msec


•Low-speed processing scan time: 4 msec X n
This means, with this PLC, the sequence program can be processed by dividing it into a high¬
speed processing part and low-speed processing part. Therefore, the sequence program must
be written in the format indicated below.

LD#
:
High-speedprocessing part
:
\
6TH1, Endinstruction ot high-speed processing

Low-speed processing part


;
sm End instruction of sequence program

Fig. 4.2

As indicated above, the sequence program that requires high-speed processing should be en¬
tered first and the sequence program for which low-speed processing is acceptable should
¥
be entered after that.

(3) Operation Time Chart

The operation time chart of a sequence program is indicated below.

NC I/O i i i i

- i=i-i=L 1

r-i r-i
4=L
High-speed processing ladder i — I I I I
Low-speed processing ladder n
Service task

(
{
/ Processing for: \
User’s message display \
I/O signal display | 4 ms : |
V Backgroundprocessing
J
Fig. 4.3

4-3
(a) High-speed processing sequence program
The high-speed processing sequence program, from the beginning of the sequence pro¬
gram up to the RTH instruction, is executed once every 4 msec or less as shown in the
time chart above.

During the processing of the high-speed sequence program, the input status remains un¬
changed.

(b) Low-speed processing sequence program


The low-speed processing sequence program entered following the RTH instruction is
divided into “n” sections and one of these sections is executed in the remaining time
in each 4-msec interval. That is, the low-speed processing sequence program is
executed once in “4 msec X n”.

As seen above, value “n” will be smaller as the total program capacity and the high¬
speed processing program capacity are smaller.

Since the low-speed processing sequence program is executed in several sections, the
input status will be changed during its execution. Therefore, the precautions indicated
in item (3) below must always be observed.

1 (c) Reading the input state


At the beginning of the 4-msec interval, the status of all inputs is read into the PLC col¬
lectively.

(d) Outputting the output status


At the beginning of the4-msec intervals, the previous output status is output collective¬
ly.

(4) Precautions on High-speed Processing Sequence Program

The high-speed processing sequence program treats only the portion where high-speed
response is required, such as counting the contact ON/OFF.

Therefore, this should be limited only to the requisite program. The capacity must be
less than 1000 steps when converted into the contact instructions.

(5) Precautions on Low-speed Processing Sequence Program

(T) Scan time of the low-speed processing sequence program is influenced by the total
capacity of the sequence program. It is calculated by “4 msec x n”.
The sequence program size that can be processed in a 4-msec interval is approxi¬
mately 3000 steps in contact instructions. This size is the total of high-speed pro¬
cessing sequence program and low- speed processing sequence program.

4-4
4.2 LEVEL AND OPERATION OF SEQUENCE PROGRAM

© Since the low-speed processing sequence program is executed in several sections,


the status of inputs will be changed during the execution of the program. There¬
fore, the inputs that are used for the execution of the low-speed processing se¬
quence program shouldbe taken into theinternal relays at the start of the low-speed
processing sequence program, and for the execution of the low-speed processing
sequence program, the contacts of the relays where the inputs have been received
should be used as the input signals.

High-speedprocessing sequence program

. ieed
Low-speed processing sequence program ogram
should be taken into the internal
relays.

Fig. 4.4

By creating the program in this manner, one cycle of the low-speed processing se¬
quence program can be executed under the same input signal status.

(D If the results of the high-speed processing sequence program are output to thelow-
speed processing sequence program, the same consideration must be given to the
creation of the program.
F
© The signals that should not be output until one cycle of the low-speed processing
program is executed should not be directly output to the PLC address used for ex¬
ternal outputs. Such signals should first be input to the internal relays and they
should be connected to the external output addresses at the end of the low-speed
processing sequence program.

RTH

— Write
• the outputs that should be
execution of one cycle of the
output externally after the
low-speed processing sequence
programatthis part

Fig. 4.5

4-5
4.3 RELATIONSHIP BETWEEN THE LADDER STOP COUNT AND THE
SEQUENCE TASK

The service task includes the following:

•User’s message display processing


•I/O signal display processing
•Background processing
•Others
The task operates during the period, from the completion of one scan of the low-speed pro¬
cessing sequence program and until the start of the next scan.

The ladder stop count (the number of times the low-speed processing ladder should be
stopped) should be set based on the load during the processing of the service task.

Recommended value: 1

4-6
4.4SEQUENCE PROGRAM MEMORY CAPACITY AND MEMORY CONFIGURATION

4.4 SEQUENCE PROGRAM MEMORY CAPACITY AND MEMORY


CONFIGURATION

The sequence program is finally written to the flash memory (ROM).

The program memory of this PLC can be divided into the areas indicated below.

Controllable

High-speedProcessing Program
128K bytes

Low-speed Processing Program

>
Data Table

Message Table
128K bytes

Fig. 4.6

Generally, relay instructions occupy 3 to 7 bytes and other instructions 1 to 25 bytes. Assum¬
¥
ing that one instruction occupies an average of 4 bytes, 128K byte memory area is equivalent
to 32K steps (128K/4 = 32 K).

4-7
5
ADDRESS NUMBERS AND ADDRESS MAP

Chapter 5 describes the address numbers and address map.

5.1 ADDRESS MAP 5-2

5.2 ADDRESS MAP AND DISPLAY


SYMBOLS 5-3

5-1
5.1 ADDRESS MAP

When creating a sequence program, input/output signals of PLC, internal relays, timers, bat¬
tery back-up memory and other devices in the PLC are all designated by an address number
(four-digit number following #) and a bit number (bit 0 to bit 7).
#
T - Bit number (0 to 7)
- Address number
a) Name of eight points of a signal
b) Name of one-byte (eight bits) data

(1) Designation of I/O signals, Internal Relays, and Other Devices (One-bit De¬
vice)

The devices which have one-bit information are designated by a five-digit number (ad¬
dress number + bit number) following “#” as indicated below.

Device Designation

1 I/O signals #
2 Internal relays T Bit number

i 3 Keeprelays Address number

In this case, the address number has the same meaning as a) explained above, and it can
be considered to be the name assigned collectively to eight points of a signal.

(2) Designation of the Registers, Timers, and Other Devices (One-byte Devices)

The devices which have one-byte (eight bits) information are designated by the address
number. In this case, the address number has the same meaning as b) explained above,
and it can be considered to be the name assigned to one-byte data.

Device Designation
4 Registers
#
5 Timers
6 Sequencerparameters Address number

7 Keep memory

Note: With some types of instructions, designation of “#1500”, for example, specifies two bytes of “#1500” and “#1501”.
Example: PUSH #1500

5-2
5.2 ADDRESS MAP AND DISPLAY SYMBOLS

5.2 ADDRESS MAP AND DISPLAY SYMBOLS

The address map and the relationship with external devices are shown below.

Standard Main NC Section PLC Section i/O Section Machine


Output (4) <1) Input
(Example) (Ex.)
NC outputs! Machin# inputs

K>- #3000 #1000 -Wh


MEM
Input
die
NC inputs
•#1063
(21
Machine outputs
Output
LS

Hi¬ I #1100
If
#3500
te) Batteryÿbeck-up
t - #3699 I -#1163 SOL
memory 0)
pm7000
Jjm7099
-
——- *s
Sequencer
parameters
pm7000
8' Internal relays
end registers
#1200
(10) (11) •#2994
#7100
-#7999 l
sJ Keep -#1399
memory
#9999 | #7100 | #1700
I -#9999 I -#1799

(1) Addresses of Input Signals from the Machine (#1000 to #1063)

For the signals input from the machine operation panel and electric control panel, such
as those of pushbutton switches and limit switches, addresses #1000 to #1063 are as¬
signed. The correspondence between the address and the input signal shouldbe deter¬
mined by the machine tool builder.

© One bit of address (#1000s) corresponds to one point of input signals.

© Address number andbit number are determined depending on the pin number and
the connector number of the I/O board where the input signal is connected.

Example:
2 _1 0

#1000,
64-36 54-21 54-5 54-35 54-20 54-34 54-19 54-33

II Pin No. 10
Connector No. 01
Enter the input signal name.

© The input signals of #1000s are expressed by the following symbols.

#10000
;
m-
#10DOO
(NO contact) (NC contact)

5-3
(2) Addresses of Output Signals to the Machine (#1100 to #1163)

For the signals output to the machine operation panel and electric control panel, such
as the signals of lamps and solenoids, addresses #1100to#1163are assigned. The cor¬
respondence between the address andthe output signal should bedetermined by the ma¬
chine tool builder.

© One bit of address (#1100s) corresponds to one point of output signals.

© Address number and bit number are determined depending on the pin number and
the connector number of the I/O board where the output signal is connected.

Example:
,- Bit No.
#1100 7 fi 5 3 2 Q

/I51-5 I
51-6 51-7 151-8 £1-41 lsi -27151-26151-25
Pin No. 10
Connector No. 08
Enter the output signal name.

(D The output signals of #1100s are expressed by the following symbols.

J #nonn

(3) Addresses of Input Signals from the NC’s Main Section (#3500 to #3799)
11DDO
#•
(NO contact)
#naoo
(NC contact)

For the signals input from the NC main section, in other words, the signals output from
the NC main section to the PLC, such as M-BCD signal, addresses #3500 to #3799 are
assigned.

The correspondence between the signal name and the address is determined by the NC
and cannot be changed.

© One bit of address (#3500 to #3799) corresponds to one point of input signals.

Example:
Bit No.

7 6 3 4 3 2 0
#3520 | MA7 | MA6 [ MA5 | MA4 | MA3 | MA2 | MA1 | MAO |
First M code output

5-4
5.2 ADDRESS MAP AND DISPLAY SYMBOLS

(D The input signals of #3500 to #3799 are expressed by the following symbols.
(a) if- (b)
#3nnnn #3nncn

(4) Addresses of Output Signals to the NC Main Section (#3000 to #3159)

For the signals output from the PLC to the NC main section, such as EDIT and MEM
mode selection signals, addresses #3000 to #3159 are assigned.

The correspondence between the signal name and the address is determined by the NC
and cannot be changed.

(T) One bit of address (#3000 to #3159) corresponds to one point of output signals.

Example:
Bit No.

7 € 5 4 3 2 1 0
#3000 | EDT | MEM | MDI j TP j STP | H | JOG [ RT |
Edit Memory Manual Tape Step Handle Jog Rapid

(D The output signals of #3000 to #3159 are expressed by the following symbols.

Output to the NC : -Q—


#3onnn
E
#3DODD #3nonn

5-5
(5) Addresses of Internal Relays (#1200 to #2994; excluding #1300 to #1399 and
#1700 to #1799)

For the internal relays that can be used only in the PLC to create a sequence program,
addresses #1200 to #2994 (excluding #1300 to #1399 and #1700 to #1799) are as¬
signed.

© One bit of address of #1400s, for example, corresponds to one piece of internal
relay.
Example of I/O list:

Bit No.

7 6 5 4 3 2 0
#1400 [ I 1 1 ]
Enter an interna) relay name.

© The number of usable internal relays is indicated below.


500 bytes X 8 bits = 4000 relays

i (3) The internal relay and its contact are expressed by the following symbol.

Internal relay : -- —#140DD

#14DOO #140DD
(NO contact) (NC contact)

There are no limits to the number of contacts (NO and NC contacts) as long as the
program capacity is not exceeded.

© The addresses used for registers cannot be used for internal relays.

5-6
5.2 ADDRESS MAP AND DISPLAY SYMBOLS

(6) Addresses of Registers (#1200 to #2994; excluding #1300 to #1399 and


#1700 to #1799)

For the general-purpose one-byte (eight bits) register, addresses #1200 to #2994 (ex¬
cluding #1300 to #1399 and #1700 to #1799) are assigned.

These registers are used for register instructions and workpiece address for macro
instructions.

® One address number corresponds to a one-byte register.


Example of I/O list:

#1500

#1501 [
Enter a register name.

® The number of usable registers is in the range from #1200 to #2994 (excludes
#1300 to #1399 and #1700 to #1799).
(D For the registers, the address number itself is used as the symbol in a ladder.
See the examples below.

#isnn }
Register instruction (example: INR)

#15DD

t Macro instruction (example: PUSH)

® The addresses used for internal relays cannot be used for registers.

5-7
(7) Addresses of Timers (#1300 to #1399 and #1700 to #1799)

For the timers, addresses #1300 to #1399 and #1700 to #1799 are assigned.

© One address number corresponds to a timer.


Example of I/O list:

#1700

#1701

Entera timer name. Enter a setting value.

© The number of available timers and timer setting units are indicated below.
Table 5.1
Address No. TtmerType Number of Timers
#1700 to #1709, #1760 to #1769
1 = 8 msec 40
#1300 to #1309, #1360 to #1369

J #1710 to #1729, #1790 to #1799


#1310 to #1329, #1390 to #1399
#1730 to #1749, #1780 to #1789
#1330 to #1349, #1380 to #1389
#1750 to #1759
1 =0.1 sec

1 = 50 msec
60

60

1 = 1 sec 20
#1350 to #1359
#1770 to #1773
1 = 1 min 8
#1370 to #1373

© An example of a timer symbol is indicated below.

(Example)

-0D- -L #170D ODH


Do-
Timer instruction Timersettingvalue
(2 types) (hexadecimal)

5-8
5.2 ADDRESS MAP AND DISPLAY SYMBOLS

{8) Battery Back-up Memory (pm7000 to pm7099, #7100 to #9999)

For the memory to which addresses of #7000s are assigned, such memory is called the
“battery back-up memory”. The data saved to this type of memory are therefore re¬
tained even when the power is turned OFF.

In the PLC sequence ladder program, only the image data at the PLC side can be han¬
dled. It is not possible to handle (read and write) the source data in the NC mainsection.

The battery back-up memory data are classified into the following three types.

•Sequencer parameters: pm7000 to pm7099


•Keep relays: #7100 to #7999
•Keep memory: #7100 to #9999

Standard NC Main Section PLC Section

Battery back-up memory


I
(Image)
Sequencer
pm 7000 parameters
to pm 7000
pm 7099 to pm 7099

#7100

to

#9999
Keep relays
#7100 to #7999
Keep memory
#7100 to #9999
E
(a) Transferring the sequencer parameter data to the PLC
The sequencer parameter data are transferred from the NC main section to the PLC in
the following case in addition to the time when the power is turned ON.

If even one item of sequencer parameter data is changedby parameter write operation,
the entire sequencer parameter data are transferred collectively.

In a sequence program, it is allowed only to read the sequencer parameter data. Do not
attempt to change the data.

fi

5-9
(b) Transferring the data in the keep relay and keep memory data to the NC
Image data saved in the keep relays and the keep memory in the PLC change continu¬
ously since the data are read and written as the sequence program is executed. There¬
fore, it is necessary to transfer the latest image data in the PLC to the battery back-up
memory in the NC main section as the source data. This data transfer is called the auto¬
matic data transfer.

While the power is ON, the data in #7100 to #9999 are collectively transferred from
the PLC to the NC.

(9) Addresses of Sequencer Parameters (pm7000 to pm7099)

For the sequencer parameters, addresses pm7000 to pm7099 are assigned. The data set
for sequencer parameters can be changed by using the normal parameter write opera¬
tion.

When using the data of these parameters in a sequence parameter, the following two
methods are available.

•To use as one-bit data


•To use as one-byte data

A (a) Using as one-bit data


Example of I/O list:

Sit No.

7 6 5 4 3 2 i 0
pm7000 [ 1.1 I I I I I
Entarsignal name.

The symbol used in the ladder is indicated below.

if
pm70DDD pm 70000
Data “1* = Open
Data T = Closed
Data “0” = Open Data “0* = Closed

5-10
5.2 ADDRESS MAP AND DISPLAY SYMBOLS

(b) Using as one-byte data


Example of I/O list:

pm7000 1 ]
pm7001 ) ]
t Enter parameter data name.

In this case, the address number itself is used as the symbol.

See the example below where a parameter is used with a timer instruction.

[HI-TT #1770, pm 7
Variable timer
pD-O-l setting by
instruction a parameter

(10) Addresses of Keep Relays (#7100 to #7999)

For the keep relays that can be used in the PLC, address #7100 to #7999 are assigned.

0 One bit corresponds to one piece of keep relay.


Example of I/O list:
k
Bit No.
f
7 6 5 4 3 2 0
#7101 [
f
- Enter keep relay name.

© The number of usable keep relays is indicated below.


900 bytes x 8 bits = 7200 relays

© Keep relays and contacts are expressed by the following symbol.

Keep relay :
#71DOO '

#71DDO #71DDD
(a) (b)

5-11
(11) Addresses of Keep Memory (#7100 to #9999)

For the one-byte keep memory where the data can be retained after power OFF, address¬
es #7100 to #9999 are assigned. With the exception that the keep memory can retain
the saved data, it can be used in the same maimer as with the registers.

Therefore, the keep memory can be used as the object of register instructions or auxilia¬
ry data of macro instructions.

When writing a sequence program for random type ATC memory, a keep memory must
be used.

0 For one-byte (8 bits) keep memory, address number #7100 or above is assigned.

Example of I/O list:

#7105 ]
#7106

tr
i
Enter keep memory name.

0 The number of usable keep memory is:

2900 in the range from #7100 to #9999

0 For the keep memory, the address number itself is used as the symbol.
See the example below.

HH MOV 1 #1500, #7100


H
MOV: Contentsof register #1500 are transferred
to keep memory #71

5-12
5.2 ADDRESS MAP AND DISPLAY SYMBOLS

0 For the devices that have one-byte or larger information, a four-digit address num¬
ber is assigned.
Although the data are basically of one-byte construction, the data can be handled
as two-byte or four-byte data by the setting for the parameter.

In the case of two- or four-byte data, the address is specified as a one-byte unit ad¬
dress; the address of the least significant byte is used as the address for two- or four-
byte data.

Byte Word

#7200 #7200

#7201

#7202 #7202

#7203

Word start number setting parameter pm3430


Double-word start number setting parameter: pm3431
Setting range: 8000 to 9999

E
pm3430<pm3431

Byte Word Double-word

#8200 #8200 #8200

#8201

#8202 #8202

#8203

(12) Writing the Initial Values for Keep Relays and Keep Memory

When keep relays and keep memory are used in a sequence program, it is necessary to
set the initial values for these devices before running the program.

Set the initial values following the procedure indicted below.

© Set the system number switch in the NC unit to “1” and turn the power ON.

© Press the [MAINT] process key and the [SEQPRM] function soft-key.

© Move the cursor to the required keep memory number.


Use the page keys and the cursor up/down keys, or press the cursor up/down keys
after keying in the keep memory number.

5-13
0 Press the [INSRT] key or the cursor right key.
[INSRT] key: The cursor moves to the decimal number column.

Cursor right key: The cursor moves to the bit data column.

® Move the cursor to the bit for which the data should be changed and press the
[WRITE] key.

Each time the [WRITE] key is pressed, ON/OFF status of the specified bit is
changed.

Data entry by numeric keys is possible only when the cursor is moved to the deci¬
mal number column.

Example: Writing a decimal number for bit data


Key Operation Bit 7 6 5 4 3 2 1 0 Decimal Number
[0] [WRITE] 00000000 0

[8] [WRITE] 00001000 8

[2] [5] [5] [WRITE] 11111111 255

i PARAMETER
#7100 7
0
0
6
0
0
MNT
5
0
0
4
0
0
3:2
0 0
0 0
O***** N00000
1
0
0
0
0
0
0
8
1 1 1 1 255
1
0
0
1
0
0
i0 1
1
0
0 0
0 0
0
0
0
0
0

00000000 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
00000000 0
00000000 0
0 :OFF 1 : ON
STP LSK
| PARM~| DIAGN. TIME T
I PARM I ISETTINGI ISEOPRÿ I P»ERRI I I (71

0 Repeat steps @ and © to write the initial values for the necessary addresses.
@ Return the system number switch to “0”.

5-14
ea
6
PLC INSTRUCTIONS

Chapter 6 describes the PLC instructions. The PLC can use


61 types of basic instructions and 11 types of macro instruc¬
tions. Explanation is given for the functions and display sym¬
bols. The list of coded instructions is also given.

6.1 BASICS OF PLC INSTRUCTIONS 6-2

6.2 TYPES AND LIST OF


INSTRUCTIONS .... 6-3

6.3 RELAY INSTRUCTIONS 6-8

6.4 TIMER INSTRUCTIONS 6-15

6.5 REGISTER INSTRUCTIONS 6-17


6.6 CONTROL INSTRUCTIONS 6-41

6.7 MACRO INSTRUCTIONS 6-44

i
\

6-1
6.1 BASICS OF PLC INSTRUCTIONS

(13) Registers Saving the Intermediate Results during Logical Operation

The PLC has registers where theintermediate results of logical operation in a sequence
program are saved. Configuration of these registers is “1bit + 16 bits”.

_Stack register (16 bits) _


The result of operation presently executed is saved (0 or 1).

I
|~RR][STO|ST1 [ ST2 1 ST3 1 ST4|sT5| 516ÿ1STISISTHIST-ISI
“O'
Contact status — V_> V_>
/U KJ \J KJ KJ KJ KJ W

L AND-STR, OR-STR instruction, etc.

STR.STR-NOT instruction, etc.

(14) Result Register (RR)

This is a one-bit register where the result of presently executed operation is set.

Setting the status (0 or 1) of contact to RR by using the LD instruction and outputting


the contents of RR to the relay address by using the OUT instruction are possible.

It is also possible to shift the contents of RR to the stack register by one bit or to shift
the contents of the stack register to RR by one bit after the completion of operation by
using the STR or AND-STR instruction.

(15) Stack register (STO to ST15)

i When executing a long logical operation, it is possible to save the intermediate result
to the stack register by up to 16 bits.

The STR and STR-NOT instructions move the data in RR to STO and, sequentially, the
data in the stack registers to the right by one bit.

The AND-STR and OR-STR instructions execute the operation between the data in
STO and RR, set the result to RR and shift the data in stack register to the left by one
bit. After the execution of these instructions, “0” is set for ST15. Both the number of
STR and STR-NOT instructions, and the number of AND-STR and OR-STR instruc¬
tions must be the same during the execution of a series of logical operations. Otherwise,
an error occurs. In other words, the number of data saving times to the stack register
and the number of data fetching times from the stack register must be the same.

6-2
6.2 TYPES AND UST OF INSTRUCTIONS

6.2 TYPES AND LIST OF INSTRUCTIONS

(1) Types of Instructions

With the PLC, the following types of instructions are provided.

(a) Basic instructions

Relay instruction: 13 types


Register instruction: 37 types
Total 61 types
Timer instruction: 2 types
Control instruction: 9 types

(b) Macro instructions

Macro instruction: 22 types


Auxiliary instruction: 5 types

(2) List of Relay Instructions

The list of relay instructions is indicated below.

No. Instruction Description RR after Operation


1 LD Reads the signal status (0, 1) and sets it to RR. 0
Reads the inversion of signal status (0, 1) and sets it to RR.
2

3
LD-NOT

AND
Executes AND between the contact and RR, and sets the *0
result to RR. (Logical product)
Executes AND between the inversion of signal status and
4 AND-NOT 0

t
RR, and sets the result to RR. (Reverse logical product)

Executes OR between the contact and RR, and sets the result
5 OR
toRR. (Logical sum)
0
Executes OR between the inversion of signal status and RR,
6 OR-NOT
and sets the result to RR. (Reverse logical sum)
0

7 XOR Sets “not-coincide” between the signal and RR to RR. 0


8 XNR Sets “coincide” between the signal and RR to RR. 0
Enters the content of RR to the stack register and executes
9 STR
the LD instruction. 0
Enters the content of RR to the stack register and executes
10 STR-NOT
the LD-NOT instruction. 0
Executes AND between RR and the stack register and sets
11 AND-STR $
the result to RR.
Executes OR between RR and the stack register and sets the
12

13
OR-STR

OUT
result to RR.
Writes the result of operation (RR) to the relay (address).
*
Note: Symbol in the column of “RR after Operation”
0 The content of RR changes before and after the operation of an instruction.
— The content of RR does not change before or after the operation of an instruction.

6-3
(3) List of Timer Instructions

The List of timer instructions is indicated below.

No. Instruction Description RR after Operation


1 TIM Timer processing (fixed timer) time up = 1

2 TMR Timer processing (variable timer) time up = 1

(4) List of Register Instructions

The list of register instructions is indicated below.

No. Instruction Description RR after Operation


1 INR Adds “+1” to the register content.
2 OCR Adds “-1” to the register content.
3 CLR Clears the content of the register.
4 CMR Inverts the content of the register.

5 ADI Adds a numeric value to the content of the register.


6 SBI Subtracts a numeric value from the content of the register.
AND operation between a numeric value and the content of
7 ANI
the register.

i
OR operation between a numeric value and the content of
8 ORI
the register.
XOR operation between a numeric value and the content of
9 XRI
theregister.
Coincidence between a numeric value and the content of the
10 DEC
register
Coincidence between a numeric value and the content of the
11 COI
register
12 CMP Compares a numeric value to the content of the register.
13 CPI Compares a numeric value to the content of the register.
14 MVI Loads a numeric value to the register.
Executes addition between register R1 and register R2 and
15 ADD
stores the result to R2.

Executes subtraction between registerRland register R2


16 SUB
and stores the result to R2.
Executes AND between register R1 and register R2 and
17 ANR
stores the result to R2.

Executes OR between register R1 and register R2 and stores


18 ORR
the result to R2.

6-4
6.2 TYPES AND LIST OF INSTRUCTIONS

No. Instruction Description RR after Operation


Executes XOR between registers R1 and R2 and stores the
19 XRR
result to R2.
Executes comparison between registers R1 and R2 and
20 CPR
stores the result to RR.
0
Executes comparison between registers R1 and R2 and
21 COR
stores the “coincide” result to RR.
0
22 MOV Transfers the content of the register R1 to register R2.
Executes AND between a numeric value and the content of
23 DST
the register 1 and transfers the result to register R2.
24 DIN Extracts data.
25 ADC Executes double-length addition. $
Executes additionbetween double-lengthregister (WR2)
26 ADDW and double-length register (WR1) and stores the result to
WR2.
Subtracts the content of double-length register (WR 1) from
27 SUBW the content of double-length register (WR2) and stores the
result to WR2.
Multiplies the content of double-length register (WR1) and RR is set to “1”
28 MULW the content of double-length register (WR2) and stores the when overflow
result to WR2. occurs.
Divides content of double-length register (WR1) by the con¬
29 DIVW tent of double-length register (WR2) and stores the result to 0
WR2.
30
31
32
33
INRW
DCRW
CLRW
CMRW
Adds “+I” to the content of the double-length register.
Adds “-1” to the content of the double-lengthregister.
Clears the content of the double-length register to “0”.
Inverts the content of the double-length register.
l
Executes comparison between double-length register R1 and
34 CORW double-lengthregister R2 and stores the “coincide” result to 0
RR.
Executes comparison between double-length register R1 and
35 CPRW
double-length register R2 and stores the result to RR. 0
36 MVIW Loads a numeric value to the double-length register.
Executes AND between the content of double-lengthregister
37 DSTW (WR1) and a numeric value and transfers the result to
double-lengthregister (WR2).

6-5
(5) List of Control Instructions

The list of control instructions is indicated below.


No. Instruction Description RR after Operation
1 NOP No operation
2 MCR Start of master control relay
3 END End of master control relay
4 RET End of sequence program
5 RTI Executes the RET instruction if “RR = 1”.
6 SET Sets “1” to RR. 1
7 RTH End of high-speedprocessing sequence program
8 JMP Executes jump to the location indicated by ADR.
Indicates the location of destination of jump indicated by
9 ADR
JMP.

(6) List of Macro Instructions

The list of macro instructions is indicated below.

No. Instruction Description RR after Operation


1 SUBP003 Detects the rising edge of the signal. 0

J 2
3
4

5
SUBP004
SUBP005
SUBP006
SUBP007
Detects the falling edge of the signal.
Counter
Rotation (for the control of rotating object)
Code conversion
0
0
0
0
6 SUBP009 Pattemclear 0
7 SUBP011 Parity check 0
8 SUBPOM Data conversion (binary t* BCD) 0
9 SUBP017 Data search 0
10 SUBP018 Index data transfer 0
11 SUBP023 Message display (option) 0
12 SUBP025 Binary decode processing 0
13 SUBP027 Binary code conversion 0
14 SUBP031 Expansion data transfer 0
15 SUBP032 Binary conversion 0
16 SUBP034 Binary data search 0
17 SUBP035 Binary index modifier data transfer 0

6-6
6.2 TYPES AND USTOF INSTRUCTIONS

No. Instruction Description RR after Operation


18 SUBP036 Binary addition 0
19 SUBP037 Binary subtraction 0
20 SUBP038 Binary multiplication 0
21 SUBP039 Binary division 0
22 SUBP040 Binary constant definition 0

(7) List of Auxiliary Instructions

The list of auxiliary instructions is indicated below.

No. Instruction Description RR after Operation


1 IPSH Designation of a numeric value used by SUBP instruction
Designation of the address of a register used by SUBP
2 APSH
instruction
Designation of the address of a register used by SUBP
3 PUSH
instruction
Designation of the table number of a PC table used by SUBP
4 TPSH
instruction
5 IPSHD Designation of the data used by SUBP instruction

6-7
6.3 RELAY INSTRUCTIONS

The relay instructions are described below.

(1) LD (Load) RR after operation: RR $

(D Format LD #XXXXX

Internal signal name Example: #10100


#14312
(D Reads the signal status (1 or 0) and sets it to RR.
(D Normally, the instruction is used for NO contact.

i—
1 DAQ-
#10010
B

#14123 oH
#30080 I
LD #10010
AND #14123
OUT #30080

(2) LD-NOT (Load Not) RR after operation: RR 0


(T) Format LD-NOT #X X X X X

IT Internal signal name Example: #10100


#14312
(D Reads the signal status (1 or 0) and sets it to RR.

A
(D Normally, the instruction is used for NC contact.

UHJ- B

' #10010 #14123 #11012 1


LD-NOT #10010
AND -NOT #14123
OUT #11012

6-8
- 6.3 RELAY INSTRUCTIONS

(3) AND RR after operation: RR 0

© Format AND #XXXXX

- Internal signal name


© Executes AND between the contact and RR and sets the result to RR (logical prod¬
uct).

1 #10012
0~
#14352 #14132 #14040
LD #10012
AND #14352
AND #14132
OUT #14040

(4) AND-NOT RR after operation: RR 0


© Format AND-NOT #XXXXX

- Internal signal name


© Executes AND between the inverted contact and RR and sets the result to RR (in¬
verted logical product).

=#—+F —
—m —#14352
#10012 #14132
LD-NOT
O" |
#14040 1
#10012
AND-NOT #14352
AND-NOT #14132
OUT #14040
it

6-9
(5) OR RR after operation: RR 0

(D Format OR #X X X X X
I Internal signal name
(2) Executes OR between the contact and RR and sets the result to RR (logical sum).

-t-DO
#10012 rtSio
#14352

#14132
LD #10012
OR #14352
OR #14132
OUT #14040

(6) OR-NOT RR after operation: RR 0

(D Format OR-NOT #XXXXX


I Internal signal name

(2) Executes OR between the inverted contact and RR and sets the result to RR (in¬

1 verted logical sum).

-r&fr
#10012
ft
—O
#14040

#14352
ft
#14132
LD-NOT #10012
OR-NOT #14352
OR-NOT #14132
OUT #14040

6-10
6.3 RELAY INSTRUCTIONS

(7) XOR (Exclusive OR) RR after operation: RR 0

CD Format XOR #X X X X X
; L

Internal signal name

© Sets “not agree” between contact and RR to RR.

A B C
A B C A B C
—r—OD-H
#10012 #14352
O— — —QD—*—II- —O—
-—#140401 #10012 #14352 #14040
»*
0 0 01
1 o
0 1 1
1
4W II
1 1
#10012 #14352
LD #10012 LD #10012
AND -NOT #14352
STR-NOT #10012
AND #14352
“l
>
XOR #14352
OUT #14040
i

OR - STR
OUT #14040

(8) XNR (Exclusive NR) RR after operation: RR $

© Format XNR #XXXXX


ii

Internal signal name

® Sets “agree” between contact and RR to BR.

-rOO
A B
II
#10012 #14352 #14040

#10012*14352
O
C
— = —00— —II—v
A

#10012*14352
B
••
C
"O—
#14040
A B
0 0 1
1 0 0
0 1 0
1 1 1
I
LD #10012
(ÿ LD ' #10012
AND #14352 =1 XNR #14352
STR-NOT #10012 OUT #14040
AND -NOT #14352
OR STR -
OUT #14040

II
!
I

’I

l
:

6-11
(9) STR (Store) RR after operation: RR 0
(T) Format STR #XXXXX

Internal signal name

(2) Sets the contents of RR to stack and executes the LD instruction.

RR STO ST1 ST2 ST15

Up to 16 stacks can be used.

(D Normally, the instruction is used for NO contact.


A C E
TOD
#10012
00
#10013
o
#14041

II
#14001 #14002

LD #10012
OR #14001
STR #10013
OR #14002
AND STR -
OUT #14041

(10) STR-NOT (Store NOT) RR after operation: RR $

i (T) Format STR-NOT #XXXXX

- Internal signal name


© Sets the contents of RR to stack and executes the LD-NOT instruction.

A c E
—fQfi
#10012
M
#10013
o
#14041

4 D

’ #14001
LD-NOT
OR -NOT
#14002
#10012
#14001
STR-NOT #10013
OR -NOT #14002
AND -STR
OUT #14041

6-12
6.3 RELAY INSTRUCTIONS
I

(11) AND-STR (AND Store) RR after operation: RR 0

© Format AND-STR
(D Executes AND between RR and stack (STO) and sets the result to RR. Stacks shift
to the left by one.

RR STO ST1 ST2 ST15


“0”

AND
A C E
-pOO
#10012
— #10013
o
#14041
B D
O
#14001 #14002
LD #10012 i
OR #14001
STR-NOT #10013
OR -NOT #14002
AND -STR
OUT #14041

(12) OR-STR (OR Store) RR after operation: RR 0

© Format OR-STR

© Executes OR between RR and stack (STO) and sets the result to RR. Stacks shift
to the left by one.

—pfl Q-
A

#10012
B

#14001
o
E

#14041
l
C D
H3 D
#10013 #14002

LD #10012 'I
AND #14001
STR #10013
AND #14002
OR-STR 1

OUT #14041

6-13
(13) OUT RR after operation: RR —
® Format OUT #XXXXX

Internal signal name

© Writes the result of operation (RR) to the relay.

f-0&
I #10012
B

#14001
C
o—
#14041

LD #10012
AND #14001
OUT #14041

6-14
6.4 TIMER INSTRUCTIONS

6.4 TIMER INSTRUCTIONS


The timer instructions are described below.

(1) TIM (Fixed Timer) RR = 1 at time-up


© Format TTM #xm, XXH

- Timer setting (hexagonal)


-#1700s
© The timer instruction counts the length of time while the ST contact is ON (RR =
1), and turns the TM ON at the preset time.

While the ST contact is OFF (RR = 0), the instruction sets the TM OFF and resets
the timer.

© Setting range is from 0 to 255 in decimal. However, the setting must be made in
hexadecimal.
If the setting is “255”, the timer does not count up.
@ The following five types of timers can be used.

Address No. Timer Type Number of Timers


#1700 to #1709, #1760 to #1769
1 = 8 msec 40
#1300 to #1309, #1360 to #1369
#1710 to #1729, #1790 to #1799
1 =0.1 sec 60
#1310 to #1329, #1390 to #1399
#1730 to #1749, #1780 to #1789
1 = 50 msec 60
#1330 to #1349, #1380 to #1389
#1750 to #1759
1 = 1 sec 20
#1350 to #1359
#1770 to #1773
1 = 1 min 8
#1370 to #1373

•Accuracy of timers depends on the basic unit value.


With a timer of #1770, for example, setting of “2” sets the count-up time in the
range of 61 to 120 seconds since the setting unit of this timer is “1 = 1 minute”.

-
•To use the timers of #1300 to #1399, the compiler of Ver. 3.5 or higher is necessary.
[fl5-1 TIM|
#10012

LD #10012
#1705, 03H

TIM #1705, 03H


OUT #14041
vb-4
#14041 I

Do not use the same address for both a fixed timer and a variable timer. If used, correct
operation cannot be guaranteed.

6-15
(2) TMR (Variable Timer) RR = 1 at time-up

® Format TMR #xm, #xxxx


u Sequencer parameter
address: pra7000s
#1700s

(D The timer instruction counts the length of time while the ST contact is ON (RR =
1), and turns the TM ON at the preset time.

While the ST contact is OFF (RR = 0), the instruction sets the TM OFF and resets
the timer.

® Setting range is from 0 to 255 in decimal. However, the setting must be made in
hexadecimal.
If the setting is “255”, the timer does not count up.

® Write the timer value from the NC keyboard by following the parameter writing
procedure. In this case, the timer value can be written in a decimal value.
(s) Five types of timers can be used as with the TIM instruction.

}—00—«
I #10012
#1705, #7042
KH
i LD #10012
TMR #1705, #7042
OUT #14041

6-16
6.5 REGISTER INSTRUCTIONS

6.5 REGISTER INSTRUCTIONS

The register instructions are described below.

(1) INR (Increment Register) RR after operation: RR —

(J) Format INR #XXXX


(D The instruction adds “+1” to the content of the register when the ST contact is ON
(RR =1). If the ST contact is OFF (RR = 0), addition is not executed.

(D An ST contact must be entered before the INR instruction.


® The instruction adds “+1” to the content of the register in intervals of “4 x n” msec
while the ST contact is ON.

© There is no function to detect overflow. If a timer counts to FFH, it returns to OH.

© The following examples show when the register of #1500s is used.

ST
-DO- INR #1505
#10012 --
LD #10012
INR #1505

INR #1505 The register instructions


are described below.

(2) DCR (Decrement Register) RR after operation: RR —

© Format DCR #XXXXX


'i

- Register
J
t
© The instruction adds “-1” to the content of the register when the ST contact is ON
(RR =1). If the ST contact is OFF (RR = 0), addition is not executed.

® An ST contact must be entered before the DCR instruction.


i

® The instruction adds “-1” to the content of the register in intervals of “4 x n” msec
while the ST contact is ON. J •l
ST
-00- DCR #1505
#10012 --
LD #10012 ;
DCR #1505

© There is no function to detect underflow. If a timer counts to OH, it returns to FFH.

6-17
(3) CLR (Clear) RR after operation: RR —

© Format CLR #XXXXX


T Register

© The instruction clears the content of the register to “0” when the ST contact is ON
(RR = 1). If the ST contact is OFF (RR = 0), the content of the register is not
cleared.
The RR content remains unchanged before and after the execution of the CLR
instruction.
© An ST contact must be entered before the CLR instruction.
@ Theinstructionclears the content of the register to “0” in intervals of “4 X n” msec
while the ST contact is ON.

j—00—-
I
[CLR[
#10012
#1505

LD #10012
CLR #1505

(4) CMR (Complement Register) RR after operation: RR —

© Format CMR #XXXXX


I
J ©
Register
The instruction reverses the content of the register when the ST contact is ON(RR
= 1). If the ST contact is OFF (RR = 0), the instructiondoes not reverse the content
of the register.
The RR content remains unchanged before and after the execution of the CMR
instruction.

© An ST contact must be entered before the CMR instruction.


© The instruction reverses the content of the register in intervals of “4 n” msec while
the ST contact is ON.

1I—?l—-
[cmr[
#14001
#1505

LD #14001
CMR #1505

6-18
6.5 REGISTER INSTRUCTIONS

(5) ADI (Add Immediate) RR after operation: RR —

© Format ADI #X X X X, XXH


L_ Numeric value (hexadecimal)
Register

(D The instruction adds the specified numeric value to the content of the register and
stores the result to the register when the ST contact is ON (RR =1). If the ST con¬
tact is OFF (RR = 0), the instruction is not executed.

The RR remains unchanged before and after the execution of the ADI instruction.
(D An ST contact must be entered before the ADI instruction.
0 The ADI instruction is executed in intervals of “4 x n” msec while the ST contact
is ON.

00-1 ADI I #1505,10H |


-#10012
LD #10012
ADI #1505, 10H

® There is no function to detect overflow. Make sure that the result will not exceed
FFH.
(6) SBI (Subtract Immediate)

0 Format SBI #XXXX,


RR after operation: RR

XXH
I

Numeric value (hexadecimal)


l
i
Register

© The instruction subtracts the specified numeric value from the content of the regis¬
ter and stores the result to the register when the ST contact is ON (RR =1). If the
ST contact is OFF (RR = 0), the instruction is not executed.
f
The RR content remains unchanged before and after the execution of the SBI
instruction.

© An ST contact must be entered before the SBI instruction.

6-19
0 The SBI instruction is executed in intervals of “4 x n” msec while the ST contact
is ON.

K-_
I
D
#10012

LD
SBI #1505,20H

#10012
SBI #1505,20H

0 There is no function to detect underflow. Make sure that “numeric value contents
of register”.
(7) ANI (AND Immediate) RR after operation: RR —
® Format ANI #X X X X, X XH

-Numeric value (hexadecimal)


-Register
® The instruction executes AND between the specified numeric value and the con¬
tent of the register and stores the result to the register when the ST contact is ON
(RR = 1). If the ST contact is OFF (RR = 0), the instruction is not executed.

The RR content remains unchanged before and after the execution of the ANI
instruction.

® An ST contact must be entered before the ANI instruction.

i 0 The ANI instruction is executed in intervals of “4 X n” msec while the ST contact


is ON.

IJ
—SB—
#10012
'
ANI #1505,551-1 \
LD #10012
ANI #1505, 55H

D7 D6 D5 D4 D3 D2 D1 DO
Register 0 0 1 1 0 0 1 1

Numeric Value 0 1 0 , 1 0 1 0 1

Result 0 0 0 1 0 0 0 1

6-20
6.5 REGISTER INSTRUCTIONS

(8) ORl (OR Immediate) RR after operation: RR


.

(D Format ORI #X X X X, XXH

Numeric value (hexadecimal)


Register
© The instruction executes OR between the specified numeric value and the content
of the register and stores the result to the register when the ST contact is ON (RR
= 1). If the ST contact is OFF (RR = 0), the instruction is not executed.
The RR content remains unchanged before and after the execution of the ORI
instruction.

(D An ST contact must be entered before the ORI instruction.


© The ORI instmction is executed in intervals of “4 x n” msec while the ST contact
is ON.

I 00
ST
- ORI
I -
#10012
#1505, 55H

LD #10012
ORI #1505, 55H .

D7 D6 D5 D4 D3 D2 D1 DO
Register
Numeric Value
Result
0
0
0
0
1
1
1
0
1
1

1
1
0
0
0
o
1
1
1
0
1
I
1
1
L
1

6-21
:
(9) XRI (XOR Immediate)

© Format XRI #XXXX, X XH

- Numeric value (hexadecimal)


-Register
© The instruction executes XOR betweenthe specified numeric value andthe content
of the register and stores the result to the register when the ST contact is ON (RR
= 1). If the ST contact is OFF (RR = 0), the instruction is not executed.
The RR content remains unchanged before and after the execution of the XRI
instruction.

® An ST contact must be entered before the XRI instruction.

® The XRI instruction is executed in intervals of “4 X n” msec while the ST contact


is ON.

ST
-00- XRI #1505, 5SH
#10012
LD #10012
XRI #1505,55H

D7 D6 D5 D4 D3 D2 D1 DO

J
Register 0 0 1 1 0 0 1 1
Numeric Value 0 1 0 1 0 1 0 1

Result 0 1 1 0 0 1 1 0

6-22
6.5 REGISTER INSTRUCTIONS

(10) DEC (Decode) RR after operation: RR 0

® Format DEC #xm, XXH


I Numeric value (hexadecimal)
Register and contact set
(D The instruction compares the numeric value to the eight-bit data of the register or
contact set and sets “1” to RR (RR = 1) if the result of comparison is “coincide”.
This instruction is executed independent of RR at the input side.
(D It is not allowed to enter a contact before the DEC instruction. If a contact must
be entered, use the COI instruction.

® The DEC instruction is executed in intervals of “4 X n” msec.

#1505,1OH j—O--
-|1 DEcf1
-- #14020
DEC #1505,1OH
OUT #14020

(11) COI (Coincide Immediate) RR after operation: RR 0


(T) Format CO! #XX XX, XXH

-Numeric value (hexadecimal)


-Register and contact set
(2) When the ST contact is ON (RR = 1), the instruction compares the numeric value I
to the eight-bit data of the register or contact set and sets “1” to RR (RR = 1) if the
result of comparison is “coincide”.

If the ST contact is OFF (RR = 0), the instruction is not executed. RR remains un¬
changed.

(D An ST contact must be entered before the COI instruction.


(4) The COI instruction is executed in intervals of “4 X n” msec while the ST contact
t
is ON.

KH
ST
- COI
l
#14016
#3500,1OH

LD #14016
COI #3500,1OH
OUT #14010

6-23
(12) CMP (Compare) RR after operation: RR 0

0 Format CMP #XXXX, XXH


TL Numeric value (hexadecimal)
Register and contact set
0 The instruction compares the numeric value to the eight-bit data of the register or
contact set and sets “1" or “0” depending on the result of comparison.

Register (contact) § Numeric value: RR = 1


Register (contact) < Numeric value: RR = 0

This instruction is executed independent of RR at the input side.

0 It is not allowed to enter a contact before the CMP instruction. If a contact must
be entered, use the CPI instruction.

0 The CMP instruction is executed in intervals of “4 x n” msec.


#49510 = 10H
-|CMP| #3510, 10H -+Z1 =ON
#49510 <10H
-Z1 = OFF
CMP #3510,1OH
OUT #14500

6-24
6.5 REGISTER INSTRUCTIONS

(13) CPI (Compare Immediate) RR after operation: RR 0

(D Fprrnat CPI #XXXX, •


XXH
T Numeric value (hexadecimal)
Register and contact set
© When the ST contact is ON (RR = 1), the instruction compares the numeric value
to the eight-bit data of the register or contact set and sets “1” to RR (RR = 1) if
“Register (contact) = Numeric value”.
If the ST contact is OFF (RR = 0), the instruction is not executed. RR remains un¬
changed.

(D An ST contact must be entered before the CPI instruction.


® The CPI instruction is executed in intervals of “4 x n” msec while the ST contact
is ON.

|I—II—|-|
#14002
CPI #3510,1OH K>—II
#14500
LD #14002
CPI #3510,1OH
OUT #14500

(14) MVI (Move Immediate) RR after operation: RR


i

(T) Format MVI #XXXXi
;
X XH

T Numeric value (hexadecimal)


Register
L
© The function transfers the numeric value to the register when the ST contact is ON
(RR = 1). If the ST contact is OFF (RR = 0), the instruction is not executed.

® An ST contact must be entered before the MVI instruction.


II
® The MVIinstruction is executed in intervals of “4 x n” msec while the ST contact
is ON. j

ST
1
|- MVI | #1505, 15H
#14002
LD #14002 '!
MVI #1505, 15H J

6-25
(15) ADD (Add Register) RR after operation: RR —.
© Format ADD #XXXX, #XXXX

U Register to be operated (R2)


Operating register (Rl)
© The function executes addition between the content in the register R2 and the con¬
tent in register R1 when the SR contact is ON (RR = 1) and stores theresult to regis¬
ter R2.

The content in register Rl remains unchanged and the status of RR also remains
unchanged.
If the ST contact is OFF (RR = 0), the instruction is not executed.

. © An ST contact must be entered before the ADD instruction.


@ The ADD instruction is executed in intervals of “4 X n” msec while the ST contact
is ON.

ST
ADP| #1501,#1502 r
#14012
LD #14012
ADD #1501, #1502

© There is no function to detect overflow. Make sure that the result will not exceed

B 255 (FFH).
(16) SUB (Sub Register)

©
RR after operation: RR —

The SUB instruction is basically the same as the ADD instruction with the excep¬
tion that the SUB instruction executes subtraction.


(R2 - Rl > R2)

© There is no function to detect underflow. Make sure that the following is always
satisfied: Rl R2
(17) ANR (AND Register) RR after operation: RR —
© The ANR instruction is basically the same as the ADD instruction with the excep¬
tion that the ANR instruction executes AND operation.
(R2 AND Rl R2)

6-26
6.5 REGISTER INSTRUCTIONS

(18) ORR (OR Register) RR after operation: RR —


(T) The ORR instruction is basically the same as the ADD instruction with the excep¬
tion that the ORR instruction executes OR operation.
(R2 OR R1 -4 R2)

(19) XRR (XOR Register) RR after operation: RR —


(D The XOR instructionis basically the same as the ADD instruction with the excep¬
tion that the XOR instruction executes XOR operation.
(R2 XOR R1 -4 R2)

(20) CPR (Compare Register) RR after operation: RR —

(T) Format CPR #xxxx, #xxxx

L Register or contact set (R2)


Register or contact set (Rl)

© The instruction executes comparison between Rl and R2 when the ST contact is


ON (RR = 1), and sets “0” or “1” to Z1 according to the result of comparison.
Rl <R2Z1 =0
Rl § R2 Z1 = 1

®
If the ST contact is OFF (RR = 0), the CPR instruction is not executed. The content
of RR remains at “0”.

After the execution of the CPR instruction, the contents of Rl and R2 remain un¬
L
changed.
!

® An ST contact must be entered before the CPR instruction.

© The CPR instruction is executed in intervals of “4 x n” msec while the ST contact


is ON. i

'j

ff—-
—#14012 IcprI #1501. #1502 H£-
| #14123
LD #14012 #1501 < #1502 .. Z1 is cleared.
CPR #1501, #1502 #1501 £ #1502 .. Z1 is set.
OUT #14123

6-27
(21) COR (Coincide Register) RR after operation: RR $

© Format COR #X X X X, #XXX X

L Register or contact set (R2)


Register or contact set (Rl)
(2) The instruction executes comparison between Rl and R2 when the ST contact is
ON (RR = 1), and sets “0” or “1” to Z1 according to the result of comparison.
Rl = R2 Zl = l
Rl R2 Z1 =0
*
If the ST contact is OFF (RR = 0), the COR instruction is not executed. The content
of RR remains unchanged.

(5) After the execution of the COR instruction, the contents of Rl and R2 remain un¬
changed.

® An ST contact must be entered before the COR instruction.


(D The COR instruction is executed in intervals of “4 x n” msec while the ST contact
is ON.
_ _ Z1
ST
—II--
-
—O-
#14012
| |
COB #1501, #1502
|

#14123

J LD #14012
COR #1501, #1502
OUT #14123

(22) MOV (Move Register)


#1501 = #1502
#1501
*
...
Z1 is set
#1502... Z1 is cleared.

RR after operation: RR —

© Format MOV #XXXX, #XXXX

U Register (R2)
Register (Rl)

© The function transfers the content of the register Rl to register R2 when the ST
contact is ON (RR = 1).

The content of the register Rl remains unchanged before and after the execution
of the instruction.

If the ST contact is OFF (RR = 0), the MOV instruction is not executed.

© An ST contact must be entered before the MOV instruction.

6-28
6.5 REGISTER INSTRUCTIONS

© The MOV instruction is executed in intervals of “4 x n” msec while the ST contact


is ON.
ST
-II-Lovl #1501, #1502 f

#14012
LD
' '
#14012
'
MOV #1501,#1502

(23) DST (Data Store) RR after operation: RR —

© Format DST #XXXX, #XXXX, XXH

Numeric value
(hexadecimal)
Register (R2)
Register (Rl)

© The instruction executes AND between the content of the register Rl and the nu¬
meric value when the ST contact is ON (RR = 1), and stores the result to register
R2.
The content of the register Rl remains unchanged before and after the execution
of the instruction.

If the ST contact is OFF (RR = 0), the DST instruction is not executed.

ST
I-
#14012
LD
DST #1501, #1502, OFH
#14012
DST #1501, #1502, OFH
- L
D7 D6 D5 D4 D3 D2 D1 DO

RegisterRl B B B B B B B B

Numeric Value 0 0 0 0 1 1 1 1
Register R2 0 0 ;0 0 B B B B

B: “0” or “1"
1

© An ST contact must be entered before the DST instruction.

© The DST instruction is executed in intervals of “4 X n” msec while the ST contact


is ON.

6-29
(24) DIN (Data Insert) RR after operation: RR —
0 Format DIN #XXXX, #XXXX, XXH

Numeric value
(hexadecimal)
Register (R2)
Register (Rl)

@ The instruction executes AND betweenRl and thenumeric value, andbetween R2


and the complement of the numeric value, then OR between the results when the
ST contact is ON (RR =1) and stores the result of OR to R2. (Extraction of the
data)

If the ST contact is OFF (RR = 0), the DIN instruction is not executed.

0 An ST contact must be entered before the DIN instruction.

0 The DIN instructionis executed in intervals of “4 X n” msec while the ST contact


is ON.

I—ff—[ssrr
-
I #14012
#1501, #1502, OFH [--
LD #14012
DIN #1501, #1502, OFH

J Rl
R2
D7
A
B
D6
A
B
D5
A
B
D4
A
B
D3
A
B
D2
A
B
D1
A
B
DO
A
B

n 0 0 0 0 1 I 1 1
Result B B B B A A A A

A, B: “0” or “1”

6-30
6.5 REGISTER INSTRUCTIONS

(25) ADC (Add with Carry) RR after operation: RR 0

© Format ADC #XXX X, #XXXX

U Register or contact set (R2)


Register or contact set (Rl)
© The instruction executes additionbetween the contents in registers Rl and R2, and
the content of RR and stores the result to register R2. If carry occurs “1” is set to
RR.
i
© The ADC instructionis executed in intervals of “4 X n” msec while the ST contact
is ON.

© To execute the ADC instruction, the content of RR must be “0”.

lADCl#1501,#1502 }-|
ADC l#1500, #1503 H
1 #10012 r
LD-NOT #10012
ADC #1501,#1502
ADC #1500, #1503

| #1503 | #1502

#1500 J ' I *1501

+) 0
[ #1503 | | #1502 ~]
L
'i

6-31
(26) ADDW (ADD Word Register) RR after operation: RR —
© Format ADDW #XXXX, #X X X X

t Low side of double-length


register (WR2)
Low side of double-length
register (WR1)

© The instruction executes addition between the contents of double-length register


(WR2) and double-lengthregister (WR1) when the ST contact is ON (RR =1) and
stores the result to double-length register (WR2).

(WR1) + (WR2) -» (WR2)

If the ST contact is OFF (RR = 0), the ADDW instruction is not executed.

© An ST contact must be entered before the ADDW instruction.

@ The ADDW instruction is executed in intervals of “4 x n” msec while the ST con¬


tact is ON.

| —HH—-
1
|ADDW|
#14012
#1500, #1502
H
LD #14012

i
ADDW #1500, #1502

<Description>
(WR2)
[content of #1503| Content of #1502 I
(WR1J
+) [content of *1500 1 Corilenl ol H500 1

| #1503 #1502
(WR2)

© There is no function to detect overflow. Make sure that the result will not exceed
FFFFH.

6-32
;

6.5 REGISTER INSTRUCTIONS

(27) SUBW (SUB Word Register) RR after operation: RR —


® Format SUBW #X X X X , #X X X X

T Low side of double-length


register (WR2)
Low side of double-length
register (WR1)

(D The instruction executes subtraction between the contents of double-length regis¬


ter (WR2) and double-length register (WR1) when the ST contact is ON (RR =1)
and stores the result to double-length register (WR2).
(WR2) - (WR1) —» (WR2)
If the ST contact is OFF (RR = 0), the SUBW instruction is not executed.

(|) An ST contact must be entered before the SUBW instruction.


® The SUBW instruction is executed in intervals of “4 x n” msec while the ST con¬
tact is ON.

|
!
j|
#14012
LD
|SUBWj
-
#14012
L
#1500, #1502
H
t
SUBW #1500, #1502

1
<Description>
(WR2)
Icontent of #1503; Contort of *1502 1
(WR1)
-) ]con1«mot»150li Contont qf #1500 j

I #1503 #1502 |
(WR2)

® There is no function to detect underflow. Make sure that the following is always
satisfied: WR1 £ WR2 t|

j
j

6-33
(28) MULW (MUL Word Register) RR after operation: RR 0

(T) Format MULW #XXXX, #X X X X

L Low side of double-length


register (WR2)
— Register (Rl)

(D The instruction executes multiplication of the contents of double-length register


(WR2) and the register (Rl) when the ST contact is ON (RR = 1) and stores the
result to double-length register (WR2).
(WR1) X (R2) -4 (WR2)

If the ST contact is OFF (RR = 0), the MULW instruction is not executed.

d) An ST contact must be entered before the MULW instruction.


G) The MULW instruction is executed in intervals of “4 X n” msec while the ST con¬
tact is ON.

(D If overflow occurs, in other words, if the result exceeds FFFH, “1” is set to RR (RR
= 1).
The lower one word is stored to the register.

i |—5h-jMULWj #1500, #1502


I #14012 --
LD #14012
MULW #1500, #1502
H
<Description>
(WR2)
[content of *15031 Content of «15(g|
(R1)
X) [content of *150o|

l #1503 #1502
(WR2)

6-34
6.5 REGISTER INSTRUCTIONS

(29) DIVW (DIV Word Register) RR after operation: RR —

0 Format DIVW #x X X X,
l #X X X X

L Low side of double-length


register (WR2)
t
Register (Rl)

(2) The instruction executes division between the contents of double-length register
(WR2) and register (Rl) when the ST contact is ON (RR = 1) and stores the result
to double-length register (WR2).

The content of Rl remains unchanged before and after the execution of the instruc¬
tion. :

(WRl) H- (R2) (WR2)

If the ST contact is OFF (RR = 0), the DIVW instruction is not executed.

(D An ST contact must be entered before the DIVW instruction.

0 The DIVW instruction is executed in intervals of “4 x n” msec while the ST con¬


tact is ON.

|—Hh—IdivwI-#1500, #1502
H
I #14012
LD
-
#14012
DIVW #1500, #1502

<Description>
(WR2)
k
| Content of *1503 Content ol »1S02 1
(R1)
| Coniait of »1SOo]

| #1503 I #1502 ]
(WR2) ;|

® The instruction is not executed if the: content of Rl is “0”.


i.

6-35
(30) INRW (Increment Word Register) RR after operation: RR —
© Format INRW # xxxx

Low side of double-length register

© The instruction adds “+1” to the content of the double-length register when the ST
contact is ON (RR = 1).

© An ST contact must be entered before the INRW instruction.

© The INRW instruction is executed in intervals of “4 X n” msec while the ST con¬


tact is ON.

II-ff—-
I'NRwj
'
#14012 L
#1500

LD #14012
INRW #1500

© There is no function to detect overflow. If the result of operation exceeds FFH, it


returns to OH.

(31) DCRW (Decrement Word Register) RR after operation: RR —

© The DCRW instruction is basically the same as the INRW instruction with the ex¬
ception that the DCRW instruction adds “-1”.

i © There is no function to detect underflow. If the result of operation exceeds OH, it


returns to FFFH.

(32) CLRW (Clear Word Register) RR after operation: RR —

© The CLRW instruction is basically the same as the INRW instruction with the ex¬
ception that the CLRW instruction clears the content of the double-length register
to “0”.

(33) CMRW (Complement Word Register) RR after operation: RR —

© The CMRW instructionis basically the same as the INRW instruction with the ex¬
ception that the CMRW instruction reverses the content of the double-lengthregis¬
ter.

• 6-36
6.5 REGISTER INSTRUCTIONS

•i

(34) CORW (Coincide Word Register) . RR after operation: RR 0


® Format CORW #xx xx, #x xxx
UDouble-length register
(WR2)
Double-length register
(WR1)

© The instruction executes comparison between WR1 and WR2 when the ST contact
is ON (RR = 1), and sets “0” or ‘T’.to Z1 according to the result of comparison.
WR1 = WR2Z1 = 1
WR1 WR2 Z1 =0
*
If the ST contact is OFF (RR = 0), the CORW instruction is not executed. The con¬
tent of RR remains unchanged.

(D After the execution of the CORW instruction, the contents of WR1 and WR2 re¬
main unchanged.
@ An ST contact must be entered before the CORW instruction.
(1) The CORW instruction is executed in intervals of “4 X n” msec while the ST con¬
tact is ON.

k
ST Z1
CORW #1500, #1502
#14012 #14123
LD #14012 #1500 = #1502 ....
Z1 is set
CORW #1500, #1502 #1500 #1502 . ... Z1 iscleared.
OUT #14123 . *

I
]
ii

i
.

<i
i

6-37
(35) CPRW (Compare Word Register) RR after operation: RR 0
(J) Format CPRW #XXXX, #XXXX

U Double-length register
(WR2)
Double-length register
(WR1)

(D The instruction executes comparison between WR1 and WR2 when the ST contact
is ON (RR = 1), and sets “0” or “1” to Z1 according to the result of comparison.
WR1 < WR2Z1 =0
WR1 S WR2 Zl = 1

If the ST contact is OFF (RR = 0), the CPRW instruction is not executed. The con¬
tent of RR remains unchanged.

(D After the execution of the CPR instruction, the contents of WR1 and WR2 remain
unchanged.

© An ST contact must be entered before the CPRW instruction.


(D The CPRW instruction is executed in intervals of “4 x n” msec while the ST con¬
tact is ON.

i LD.
CPRW

#14012
[#1500,#1502~f—Q-

CPRW #1500, #1502


OUT #14123
#14123 I
#1500 < #1502
#1500 g #1502
.... Z1 is set
.... Z1 is cleared.

-'6-38
6.5 REGISTER INSTRUCTIONS

(36) MVIW (Move Immediate Word Register) RR after operation: RR —


© Format MVIW #XXXX, XX XXH

Numeric value
(low side)
Numeric value
(high side)
Double-length
register

(D The instruction transfers the numeric value to the register when the ST contact is
ON (RR = 1).
If the ST contact is OFF (RR = 0), the MVTW instruction is not executed.

© An ST contact must be entered before the MVIW instruction.

© The MVIW instruction is executed in intervals of “4 x n” msec while the ST con¬


tact is ON.

ST
MVIW #1500,20FFH
#14012
LD #14012
MVIW #1500,20FFE

I
:i
'I
il

<

6-39
(37) DSTW (Data Store Word Register) RR after operation: RR —

(J) Format DSTW ixxxx, #X X X X, XXXX

t Numeric value
Register (WR2)
Register (WR1)

® The instruction executes AND between the content of WR1 and the numeric value
when the ST contact is ON (RR = 1) and stores the result to WR2. The content
of the register (WR1) remains unchanged before and after the execution of the
instruction.

-
If the ST contact is OFF (RR = 0), the DSTW instruction is not executed.

ST
—| (- 1jDSTW11 #1500, #1502, OFOFH
#14012
LD
-- #14012
H
DSTW #1500, #1502, OFOFH

(X) An ST contact must be entered before the DSTW instruction.


0 The DSTW instructionis executed in intervals of “4 X n” msec while the ST con¬
tact is ON.

J D5
D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D4 D3 D2 D1 DO

Register WR1 B B B B B B B B B B B B B B B B
Numeric Value 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
Register WRl 0 0 0 0 B B B B 0 0 0 0 B B B B

B: “0” of “1”

6-40
6.6 CONTROL INSTRUCTIONS

!>

6.6 CONTROL INSTRUCTIONS

The control instructions are described below.

(1) NOP (No Operation) RR after operation: RR —


!
© Format NOR
© No operation is executed and the program advances to the next step.
The content of RR remains unchangedbefore and after the execution of theinstruc¬
tion.

(2) MCR (Master Control) RR after operation: RR —


© Format MCR

© The instruction executes the sequence ladder when the both XI and X2 contacts
are ON (RR = 1). i

If the XI or/and X2 contacts are OFF (RR = 0), the ladder is executed to END in
the state of “RR = 0”.

*1
- -IMCRI—
#14001 #14002
Z1
X3
#14003
X4
#1$10 — -O-
X1 X2 X3
= HHHl II
X4
Z1

Z2
#14004 #14011
X5 Z3
#14005
6—
#14012

LD

MCR
LD

LD
#14001
AND #14002
#14003
OUT #14010
#14004
<Description>
If X1 and X2 conlacts are OFF, “0* is output to the
internal relays Z1, Z2, and Z3.
I
OUT #14011
LD #14005
OUT #14012
END

® It is possible to enter another MCR instruction between theMCR and END instruc¬
tions (max. 7 levels).

® When a timer instruction is included in the MCR instruction, the timer is cleared
when the MCR instruction is OFF. |
|
© Even if the self-holding circuit is formed between the MCR and END instructions,
the circuit output is OFF when the MCR instruction is OFF.

6-41
.
(3) END (Master Control End) RR after operation: RR —

® Format END

© The instruction indicates the end of the MCR instruction.


(4) RET (Return) RR after operation: RR —
© Format RET

® The RET instruction indicates the end of a sequence program.


(5) RTI (Return Indirect) RR after operation: RR —
® Format RTI

© The instruction executes the RET instruction when the ST contact is ON.
If the ST contact is OFF, the ladder of the next step is executed.

ST
-ih
#14011
1 RTI h
LD #14011
RTI

(6) SET (Set Result Register) RR after operation: RR —

i © Format SET
@ The instruction forcibly sets “1” for “RR”.
(7) RTH (Return High Sequence) RR after operation: RR —

® Format RTH

© The instruction indicates the end of a high-speed processing sequence program.

6-42
6.6 CONTROL INSTRUCTIONS

(8) JMP (Jump) RR after operation: RR —

© Format JMP XXX

I Label number of jump destination

© The instruction executes jump to the ADR012 when the ST contact is ON (RR =
1).

If the ST contact is OFF (RR = 0), the ladder of the next step is executed.

ST
If JMP012
#14000

-f ADR 012 = | -
LD #14000
JMP 012

© With the JMP instruction, the states of output coils up to ADR are retained when

I
RR =1.
With the MCR instruction, however, the output coil state is not retained.

(9) ADR (Address) RR after operation: RR —


1
© Format ADR XXX

Label number
i
© The instruction indicates the destination of jump called up by the JMP instruction.

© The JMP and ADR instructions are always used in pairs. Thelabelnumbers speci¬
fied by the JMP and ADR instructions given in a pair must be the same.
I

6-43 :
6.7 MACRO INSTRUCTIONS

There are several machine control sequences that cannot be programmed easily if only basic
instructions (relay instructions, register instruction, etc.) are used. The macro instructions
are provided to simplify programming such sequences.

Macro instructions are written in the following format.


SUBP XXX

Macro instruction number


(1) SUBP 003 (UP: Detecting rising edge of a signal)

(a) Function
The instruction detects the rising edge of a signal.
(b) Format

Working area address


-|APSH| #1500

UP
R1 Output of signal rise detection
3P
#14000
#11000
SUBP 003

Contact to be detected
APSH #1500. Working area address
LD #14000 Contact to be detected
SUBP 003 .. .

i
UP instruction
.
OUT #11000 .. Output of signal rise detection

(c) Control conditions


(D Working area address (APSH #X X X X )
Designate an address that is not used by other instructions. Prepare one byte for
one SUBP 003.

© Contact to be detected (ACT) and output of signal rise detection (Rl)

ACT = 0: -Rising edge of a signal is not detected; Rl = 0



ACT = 1: Rl value changes “0” -*•“1” “0” at the detection of the rising edge.

- :_n__n_
-
!

n_n
i

© If “ACT = 1” when the power is turned ON, it is regarded as the rise.

6-44
6.7 MACRO INSTRUCTIONS

(2) SUBP 004 (DOWN: Detecting falling edge of a signal)

(a) Function
The instruction detects the falling edge of a signal.

(b) Format

Working area address


APSH | #1500

DOWN
ACT

#14000
-5='
#11000
Output of signal fall detection

SUBP 004

Contact to be detected
APSH #1500. Working area address
LD #14000 Contact to be detected
SUBP 004 . .. DOWN instruction
OUT #11000 Output of signal fall detection

(c) Control conditions


© Working area address (APSH # X X X X )
Designate an address that is not used by other instructions. One byte is necessary

L
for one SUBP 004.

© Contact to be detected (ACT) and output of signal fall detection (Rl)


ACT = 1: Falling edge of a signal is not detected; Rl = 0
— —
ACT = 0: Rl value changes “0” “1” “0” at the detection of the falling edge.
•I
*r
ACT .ÿ-THLr I ’i

R1
:n“O’
i

n
© Even if “ACT = 0” when the power is turned ON, it is not regarded as the falling
edge.
<'

6-45 .1
(3) SUBP 005 (COUNTER)

(a) Function
The counter can be used for the following purposes to control machine tool operation
as indicated below according to the applications.

(T) Ring counter


The counter is a ring counter. Accordingly, the counter value returns to the initial
value if a count signal is input after counting up to the preset value.

(2) Preset counter


The count-up signal is output when the count value reaches the preset value.

© Up/down counter
The counter can be used for both up and down counters.

(b) Format

Preset value
] IPSH [ OFH

Counteraddress
#1500 \

A Control conditions
CNO _
"#14000
UfiOOWN-
~j APSH | #1510

CTR

Ri
Working area ad¬
dress

#14001 Count-up output


mi #11000
#14902
#14003
SUBP 005

IPSH OFH . Preset value


APSH #1500 Counter address
APSH #1510 Working area address
LD #14000 . .. CNO
STR #14001 . .:. UPDOWN '
STR #14002... RST
STR #14003... ACT
SUBP 005 Counter instruction
OUT #11000 ... Count-up output

6-46
6.7 MACRO INSTRUCTIONS

(c) Control conditions


© Designation of preset value (IPSH XX)
Designate the preset value directly.

To designate a variable value, use the PUSH instruction instead of the IPSH
instruction. If the PUSH instructionis used, the contents of the designated address
i
are used as the preset value.

Example: PUSH #1550

With the designation indicated above, two bytes of #1550 and #1551 are used.
Even if only one byte is used, #1551, must not be used for other instructions.

© Designation of counter address (APSH # X X X X )


Designate the counter address.
If “APSH #1500” is designated, continuous two bytes (#1500 and #1501) are used
for the counter address.

© Designation of working area address (APSH # X X X X )


Designate an address that is not used by other instructions. One byte is necessary
for one SUBP 005.

£
If two or more SUBP 005 instructions are used, it is necessary to designate an ad¬
dress for each SUBP 005 instruction.

@ Designation of initial value (CNO) *


CNO = 0: Counting begins with “0”. (0, 1, 2, n)
CNO = 1: Counting begins with “1”. (1, 2, 3, n)

© Designation of up/down counter (UPDOWN)


i
1
UPDOWN = 0: Up counter
The initial value is “0” with CNO = 0.
The initial value is “1” with CNO
;i
= 1.

UPDOWN = 1: Down counter


The initial value is the preset value.
i|

6-47
G) Reset (RST)
RST = 0: Reset released
RST=1: Reset
R1 is cleared to “0”.
Counted value is reset to the initial value.

© Count signal (ACT)


ACT = 0: The counter does not operate. Contents of R1 remain unchanged.
ACT = 1: Counts at the rising edge (“0” -+ “1”).

If the content of the counter is greater than the preset value, the counter operates
in the following manner.

UP counter: The value returns to the initial value at the first ACT signal.
DOWN counter: The value is reduced at each input of ACT until the count value
is reduced to the preset value. After that the counter operates as
’ a normal counter.

“1"
ACT
*0"
xi_n_
COUNT COUNT

i © Count-up output (Rl)


Up counter: ‘T” is set for Rl upon counting up to the preset value.
Down counter: “1” is set for Rl according to the following condition.
CNO = 0 .'
. Upon counting down to “0”
CNO = 1 .
.:
. Upon counting down to “1”

6-48
!

6.7 MACRO INSTRUCTIONS

J
4

{4) SUBP 006 (ROTATION)


!
(a) Function
This instructionisused to control rotating units such as turrets, ATCs, and rotary tables.
It has the following functions:
1
•Determination for shorter-path when determining the direction of rotation
•Calculationof the number of steps between the present position and the target posi¬
tion
•Calculation of the position one step before the target position or the number of
steps to the position one step before the target position

(b) Format I

Calculation resultaddress
APSHi #1510

Target position address


APSH #1520
Present position address
APSH #1530

Number of positioning points in one turn


IPSH 10H
Control conditions
RNO ROT
#14000
IP
#14001
DIR
#14002
-o
R1
l
__
#11000
#14003
INC
#14004
ACT
i
SUBP 006 1
#14005
t[
4
APSH #1510
APSH #1520 — TCalculation result address
arget position address
APSH #1530 Present position address
IPSH 10H Number of rotating unit positioning points
LD #14000 ... Position number; from “O’ or from *1’
STR #14001 ... Position data; 1 byte or 2 bytes

......
STR #14002 .. . Direction of rotation; fixed or shorter path
STR #14003 ... Target position or position 1 step before the target position
STR #14004... Position number or the number of steps
STR #14005... Execution (
SUBP 006 ROT instruction
OUT #11000 ... Output of direction of rotation

:i
i

6-49
(c) Control conditions
® Designation of calculation result storing addresses (APSH # X X X X )
The ROT instructioncalculates thenumber of steps the rotating unit should rotate,
the number of steps of the position one step before the target position, or the posi¬
tion one step before the target position. The result of calculation is stored in the
designated address.

© Designation of target position address (APSH # X X X X )


Designate the address where the target position is stored: for example, the address
where the T command is output from die NC.

® Designation of the present position address (APSH #X X X X)


Designate the address where the present position data are stored: for example, the
address of the counter where the position of the rotating unit is stored.

© Designation of the initial value of the position number of the rotating unit (RNO)
RNO = 0: Position number of the rotating unit begins with “0”.
RNO = 1: Position number of the rotating unit begins with “1”.

© Designation of the number of bytes of the position data (BYT)


BYT = 0: Binary 1 byte

i
BYT = 1: Binary 2 bytes

® Designation of whether or not shorter-path rotation direction is determined (DIR)


DIR = 0: Determination is not made.
Rotation direction is only the FOR direction.
DIR = 1: Determination is made.

® Designation of operation conditions (POS)


POS = 0: The number of steps to the target position is calculated.
POS = 1: The.position or the number of steps to the position which is one
position or one step before the target position.

© Designation of the position number or the number of steps (INC)


INC = 0: The position number is calculated.
INC = 1: The number of steps is calculated.

6-50
6.7 MACRO INSTRUCTIONS

.1

•j

® Execution command (ACT)


ACT = 0: ROT instruction is not executed.
R1 is not influenced.
ACT = 1: ROT instruction is executed.
(Not by the rising edge of the signal.)

© Output of rotation direction (Rl)


R1 = 0: The rotation direction is '‘forward”.
Rl = 1: The rotadon direction is ‘‘reverse”.

The direction in which the number increases in


FOR (forward) direction
reference to theindex position.

The direction in which the number decreases in


REV (reverse) direction
reference to the index position.

4 6
,5 7, 5
3,

6 8 4
2\REV FOR/. FOR REV/
i 1 3
1
8 2
A A
Index Position Index Position

•If the number of steps to the position one step before the target position is calcu¬
lated while the present position is equal to the target position (POS = 1, INC = 1),
the result of calculation is “0”.
J
k
I

ti
1

6-51
(5) SUBP 007 (CODE CONVERT)

(a) Function
This instruction converts the data by using the conversion table created on the PLC
table._
DATA TABLE
Stan address
Conversion standard data address
No. in Table Data _
Conversion

xxxx 0_
#xxxx [ I] _L
2
3 3A
4_

Conversion data o
#xxxx jjtoutaddre
n

® BYT = 0
If “3” is specified for the conversion standard data address as shown above, the
instruction stores the “third data” from the start of the table to the conversion data
output address.
The start of the table is Oth.

® BYT = 1

i In this case, the size of the conversiondata table shouldbe an evennumber of bytes.

DATA TABLE
Stan address No. in Table
xxxx BYT-1 BYT-0 Data
Conversion
Conversion standard data address
0 0.
iXXXX I 31
1
2. 3A
1
3_ 4B
2
Conversion data output address,
#xxxx
El n-1

n Hil
_Q_

6-52
J
6.7 MACRO INSTRUCTIONS
i

J
t

(b) Format

Number of conversion
IPSH 14H data items
Conversion standard
APSH #1500 data address
Conversion data output
APSH #1510 address
Control conditions < The number of PLC table
TPSH #9000 containing the conversion
data
BYT
n COD
#14000
911
#14001
<5
#14010
fii iRpnn7
#14002

PLC Table
9000
No. in Table Data _
Conversion

__
0 20H
1 30H
2

17 1AH
18 2BH
19 3CH

IPSH 14H Size of conversion data table (number of bytes)


APSH #1500 Conversion standard data address

I.
APSH #1510 Conversion data output address
TPSH #9000 PLC table number containing the conversion data
LD #14000 ... Data in the data table; 1 byte, 2 bytes
STR #14001 ... Reset
STR #14002... Execution
SUBP 007 COD instruction
OUT #14010... Erroroutput
-20H
-30H
-40H
.i

:
> Conversion data table ,
—12BH
1AH
?
-3CH .1

'!

'!

H
6-53
(c) Control conditions
(D Designation of the number of conversion data items (BPSH XX)

Designate the size of the conversion data table by the number of bytes. The maxi¬
mum size is 256 bytes.

@ Designation of the conversion standard data address (APSH # X X X X )


The data in the conversion data table can be read out by designating the number
in the table.
Designate the number in the table.

© Designation of the conversion data output address (APSH #X X X X )


Designate the address where the data, stored at the number in the table which is
specified in item 2 above, should be output.
If “BYT = 1”, the upper byte data are output to the address next to the designated
address.

© Designation of the conversion data table (TPSH X X X X)


The size of table differs depending on the PLC table number.
•9000 to 9007: Max. 256 bytes
•9008 to 9023: Max. 128 bytes
©
1
Designation of the data size (BYT)
Designate the size of the data in the conversion data table.
BYT = 0: 1 byte
BYT = 1: 2 bytes

© Reset (RST)
Designate whether or not the error output coil R1 is reset.
RST = 0: Not reset
RST=1: Reset

© Execution command (ACT)


ACT = 0: The COD instruction is not executed. R1 remains unchanged.
ACT = 1: The COD instruction is executed.

® Error output (Rl)


If an error occurs during the execution of the COD instruction (a numeric value
greater than the size of the table is set), “1” is set for “Rl” (Rl = 1) indicating the
occurrence of an error.

6-54
6.7 MACRO INSTRUCTIONS

{6) SUBP 009 (PATTERN CLEAR) i

t
(a) Function
The instruction writes the same numeric value repeatedly by the designated number of
bytes beginning with the designated address.

Write pattern I 00 L x
* * XJ 00

Number of bytes by which


_ _. 00
00
(0
the same number is written 1 20 I > 20 BYTES
repeatedly
00
1 oo
,1
00
00

(b) Format

Write pattern
IPSH OH
Number of bytes by which
the same number is written
IPSH 14H repeatedly
Control conditions ‘ Start address
APSI- #1500 for writing

IPSH
IPSH
LD
14H
ACT

OH .
II
#14000

APSH #1500
#14000...
SUBP #009
OUT #14010...
__ PCLR

SUBP 009

Write pattern
;
1
#14010
Output of completion of write

Number of bytes by which the same number is written repeatedly


Start address for writing
Execution
PCLR command
Output of completion of write
I.
il

5
6-55
(c) Control conditions
(J) Designation of the write pattern (IPSH X X)
Designate the pattern to be written.
To designate a variable pattern, use the PUSH instruction to designate the address
instead of using the IPSH instruction.

0 Designation of the number of bytes by which the same numberis written repeated¬
ly (IPSH XX)
Designate the number of bytes to clear the pattern.

® Designation of the start address of writing (APSH # X X X X )


Designate the start address of writing.
Pattern clear is executed beginning with this address by the designated number of
bytes.

(f) Execution command (ACT)


ACT = 0: The PCLR instruction is executed.
ACT = 1: The PCLR instruction is not executed.

0 Output of completion of write (Rl)

i
R1 = 0: Writing not completed
Rl = 1: Writing completed

6-56
6.7 MACRO INSTRUCTIONS

(7) SUBP 011 (PARITY CHECK)

(a) Function
The instruction executes parity check (even parity or odd parity) for the data to be
checked (1-byte data).
If an error is detected, an error output is given.

(b) Format

Check data address


APSH| #1500

OE PARI
Control conditions
#ÿ0
#UM1
R1

#14010
SUBP 011
#14002
APSH #1500 .... Check dataaddress
LD #14000 Designation of parity scheme (even/odd)
STR #14001 ... Reset
STR #14002 .. . Executioncommand
SUBP 011 PARI instruction
OUT #14010... Erroroutput ;l

(c) Control conditions


® Designation of check data address (APSH # X X X X )
Designate the address where the data to be checked are stored.
Parity check is made for 1 byte (8 bits) of data.

(|) Designation of parity scheme (OE) !:

OE = 0: Even parity check ;!


OE = 1: Odd parity check

(D Reset (RST)
RST = 0: Error output R1 is not reset.
RST = 1: Error output R1 is reset.

@ Execution command (ACT)


ACT = 0: The PARI instruction is not executed. R1 remains unchanged.
ACT = 1: The PARI instruction is executed.

(D Error output (Rl) i


If the result of parity check does not meet the designated parity scheme, “1” is set
for “Rl” (Rl ~ 1). ;
!

6-57
(8) SUBP 014 (DATA CONVERT)

(a) Function
The instruction converts the binary data to the BCD data and the BCD data to the binary
data.

(b) Format

Input data address


APSH| #1510 |-
Output data address
] APSH| #1510

Control conditons 3d
#14000
DCNV

-W-
#14001
R1

#14010
#14002
SUBP 014
#14003

APSH #1500 ... . Conversion data address


APSH #1510. Converted data storing address
LD #14000 1-byte or 2-byte processing
STR #14001 BCD -+ BIN or BIN -*•BCD
STR #14002... Reset
STR #14003... Execution

i
SUBP 014 DCNV instruction
OUT . #14010... Erroroutput

(c) Control conditions


(T) Designation of the conversion data address (APSH # X X X X )
Designate the address where the data to be converted are stored.

If “BYT = 1”, continuous two bytes are used.

(D Designation of the converted data address


Designate the address where the result of conversion is stored.

If “BYT = 1”, continuous two bytes are used.

(5) Designation of the number of bytes (BYT)


BYT = 0: The data to be processed are 1-byte data.
BYT = 1: The data to be processed are 2-byte data.

6-58
}

6.7 MACRO INSTRUCTIONS

© Designation of the conversion type (CNV)


CNV = 0: Conversion of binary data to BCD data
CNV = 1: Conversion of BCD data to binary data

© Reset (RST)
RST = 0: Error output R1 is not reset.
RST = 1: Error output R1 is reset. 1
?
© Execution command (ACT)

ACT = 0: The DCNV instruction is not executed.


ACT = 1: The DCNV instruction is executed.

® Error output (Rl)


R1 = 0: Normal
Rl = 1: Error
(An attempt is made to convert the binary data when “CNV = 1”, or the
byte length is exceeded when “CNV = 0”.)

(9) SUBP 017 (DATA SEARCH) ;

(a) Function
The instruction executes search in the table for the data identical to the input data and
stores the address where the identical data are found by the relative address from the
start of the table. If the identical data are not found, an error is output.
;|

1} No. in Tahlfi
BYT = 0: Data
BYT-1 BYT-0

__
Input data address
0 IL
#x x x x I 3A I 1
_2
Output data address 1 3 3A
#x x x x I 3 I 2 A 4C
5_ 30
il
3
BYT = 1: n-3
Input data address n-1 n-2
#x x x x

Output dataaddress
a n
n-1
_n_

#X X X X I ?. J

Note 1: When “BYT = 1”, the size of the table must be an even number of bytes.
2: If the data to be searched exist at mote than one place, the data found first is regarded as the objective data.
3: The data address to be stored is in units of bytes if “BYT = 0” or in units of words if “BYT = 1".

6-59
(b) Format

Data table size (the number of bytes)


-j IPSH | 20H
Start address of the data table
-| APSH| #1500
Input data address
——| APSH| #1510
Controlconditions Output dataaddress
APSH #1520

DSCH
#14000
Error output
#Uÿ1 SUBP017
#14010
#14002

IPSH 20H ... Data table size (the number of bytes)


APSH #1500. The start address of the data table
APSH #1510. Search data address
APSH #1520. Search result storing address
LD #14000 1-byte or 2-byte processing
STR #14001 . .. Reset
STR #14002... Execution
SUBP 017...... DSCH command
OUT #14010 ... Error output

(c) Control conditions


®
i
Designation of the data table size (the number of bytes) (IPSH X X X X)
Designate the size of the data table by the number of bytes.

(D Designation of the start address of the data table (APSH #X X X X )


Designate the start address of the data table.

The data table can be created at any place.

(D Designation of the input data address (APSH #X X X X )


Designate the address where the data to be searched are stored.

® Designation of the output data address (APSH #X X X X )


When the specified data are found (R1 = 0), the number in the table where the found
data are stored is output. Designate the address where that number is stored.

6-60
6.7 MACRO INSTRUCTIONS

'!

© Designation of the data size (BYT) ;


BYT = 0: The data stored in the data table are 1-byte data.
BYT = 1: The data stored in the data table are 2-byte data.

© Execution command (ACT)


ACT = 0: The DSCH instruction is executed.
ACT = 1: The DSCH instruction is not executed.
;

© Reset (RST)

RST = 0: Error output R1 is not reset.


RST = 1: Error output R1 is reset.

© Error output (Rl)


|
Rl = 0: The search data are found. i
Rl = 1: The search data are not found.

(10) SUBP 018 (INDEX DATA MOVE)


!
\
(a) Function
The instruction reads the data from the data table or rewrites the data in the data table.

© Reading i

To read the contents by designating “3” (the number in the table).

No. in Table Data


I
Address storing the number in the table
#x x x x I 3 I
J 0
1
2
3 10
Address storing the I/O data
(output data, in this case)
#x x x x I 10 I

n-1
if H

6-61
© Rewriting
To rewrite the contents by designating “3” (the number in the table).

: No. in Table Data


Address storing the number in the table 0
#x x x x: [ 3 I 1
2
3 30
Address storing the I/O data
(input data, in this case)
#x x x x I 30
_I 4

n-1
n

(b) Format

Data table size (the number of bytes)


IPSH 20H
Start address of the data table
APSH #1500
I/O data storing address
APSH #1510
Control conditions Address storing the number in the table
APSH #1520

BYT XMOV
tt

i #14000

__
-M R1
#14001
o
#14010
Error output

#14002
SUBP018
#14003

IPSH Data table size (the number of bytes)


20H
APSH #1500 The start address of the data table
APSH #1510 Address storing the I/O data
APSH #1520 Address storing the number in the table
LD #14000 ...
1 -byte or 2-byte processing
STR #14001... Read or rewrite
STR #14002... Reset
STR #14003... Execution
SUSP 018. XMOV command
OUT #14010... Erroroutput

6-62
6.7 MACRO INSTRUCTIONS
I

(c) Control conditions


(D Designation of the data table size (number of bytes) (IPSH XX)

Designate the size of the data table by the number of bytes.

© Designation of the start address of the data table (APSH # X X X X )


Designate the start address of the data table.
1

The data table can be created any place.

© Designation of the address storing the I/O data (APSH # X X X X )


RW = 0: The address where the output data are stored.
RW = 1: The address where the input data are stored.

© Designation of the address storing the number in the table (APSH #X X X X )


The data to be read or rewritten are designated by the number in the table. Desig¬
nate the address where this number is stored.

© Designation of the data size (BYT) [


BYT = 0: The data stored in the data table are 1-byte data.
BYT = 1: The data stored in the data table are 2-byte data.
[
®
L
Designation of read/write processing (RW)
RW = 0: Data are read from the data table.
RW = 1: Data in the data table are rewritten.

© Reset (RST)
1
RST = 0: Error output R1 is not reset.
RST = 1: Error output R1 is reset, i

® Execution command (ACT)


-I
ACT = 0: The XMOV instruction is executed.
ACT = 1: The XMOV instruction is not executed.

® Error output (Rl)


R1 = 0: Normal
Rl = 1: Error
The address specified for storing the number in the table is outside the
allowable range. (Data table size is exceeded.)

6-63
(11) SUBP 023 (MESSAGE DISPLAY) ;

(a) Function
The instruction displays the message on the screen.

38 Characters (erh)

[f
0****N????
T
E
£ 3.
3. 2
2 ©

% Display area of PLC message


o

5 6
8
i
LSK ALM

® The maximum number of characters per line is 38 characters.

Number Maximum Quantity


#9024 to #9323 38 words 300 Message table

© If more than 14 message display requests are given for one display screen, 14 lines
of messages are displayed in order of priority (lower bit given highest priority).

i © The message to be displayed or cleared can be selected by setting “0” or “1” to the
corresponding bit. “1” for the message to be displayed and “0” for the message
to be cleared.

The correspondence is indicated below.

7 6 5. 4 3 2 1 0 #1500
Display request
15 14 13 12 11 10 9 8 #1501

Display status
{ 7
15
6
14
5
13
4
12
3
11
2
10
1
9
0
8
#1502
#1503
23 22 21 20 19. 18 17 16 #1504
Display request
31 30 29 28 27 26 25 24 #1505
23 22 21 20 19 18 17 16 #1506
Display status
31 30 29 28 27 26 25 24 #1507

Note 1: If “1” is set for the bit where no message is stored, blank spaces are displayed.
2: This instructionis used to display messages on the screen. It cannot be used to place the NC in the alarm state (1-block
stop, stop after deceleration, immediate stop).

3: Do not write the data to #1502, #1503, #1506, and #1507, or output the data from these addresses by using the OUT
instruction.

6-64
6.7 MACRO INSTRUCTIONS

© The PLC system has two display screens for display of messages and they are con¬
trolled by the DISP (SUBP 023) instruction.
Therefore,if the DISPinstruction is specified more than one time for the same mes¬
sage display screen, the display processing is executed more than one time in one
scan and the messages cannot be given correctly. (Messages will be written over.)
'i
Even if the DISP instruction is specified more than one time, it will not cause a
problem when only one DISP instruction is processed in one scan by designating
a JMP or other appropriate instructions.

(b) Format
•!
Message control address
] APSH #1500 [ÿ
Size of message control address
IPSH 1
Display screen number
IPSH 1
Start address of the PLC table
TPSH #9216 containing the messages

DISP
t

SUBP 023

Table Address uispayÿ Message


#9216
#9217
#15000 SPINDLE ALARM
#15001 ;M06 ERROR
l
__ __
#9218 #15002 TAPPING ERROR
#9219 #150031

#9229 j
#15015 UNUSABLE S-CODE
#9230 #150161 UNUSABLE M-CODE
#9231 #150171 PARAMETER ERROR
APSH #1500 Message control address
IPSH 1H Size of message control address
IPSH 1H Display screen number
TPSH #9216 Start address of the PLC table containing the messages
SUBP 023 DISP instruction ,i

i|
.I

6-65 i
(c) Control conditions
© Designation of the message control address (APSH # X X X X )
Designate the start address of theaddresses that request the message.

© Designation of the size of message control address (IPSH XX)


Designate the size of the message control address by the number of bytes.

Example: APSH #1500


EPSH 1H

With the designation indicated above, contiguous four bytes starting from #1500
are used.
If “IPSH 2H” is designated instead of “IPSH 1H”, contiguous eight bytes starting
from #1500 are used.

Note: If “IPSH 1H” is designated, a maximum of 16 kinds of messages is used.

© Designation of the display screen number (IPSH X)


Designate the display page number to be used.
A total of two pages (No. 1 andNo. 2) can be used for both the high-speed proces¬
sing and low-speed processing sequence programs.

J © Designation of the start address of the PLC table containing the messages (TPSH
XXXX)

6-66
6.7 MACRO INSTRUCTIONS

•I

(d) Example of the application of the DISP instruction


When the contact of AL1 to AL4 is turned ON, the message corresponding to the ON
bit is displayed on the screen and the machine operation stops after deceleration.
i

The display is cleared when the reset signal is input.


(
\

AL1 .1

w #i]

. Display request

j$E
#14003
#1

#1
RST
1-rjCLRW #1500 Display reset
#35181

-fcLRwj #1504

ERR
|CMP | #1500,01 K>-
#3018
Stop after deceleration

-|APSH| #1500 [
\ IPSH | 1

-f IPSH | 1

-|TPSH| #9086

DISP '
l
SUSP 023

(e) Selection of the USER MESSAGE screen


On the USER MESSAGE screen, the message sent from the PLC is displayed.

© Press the [COMMON] process soft-key.

© Press the [ALM] job soft-key.j


<D Press the FUNCTION SELECT key!

® User’s messages are displayed from the 1st to the 14th line.
For the display of user’s messages, two pages exist. To change the display page
between No. 1 and No. 2 pages, use the page keys.
!

6-67
(12) SUBP 025 (Binary Decoding)

(a) Function
The instruction executes decoding of binary data (1 byte or 2 bytes length).

In this decoding, the code data are convertedintobits and written to the designated area.

#bbbb
d1d0
#aaaa d15d14
Designated Oto 15
nnnn decodetable 16 to 31
32 to 47
Turning ON bit “n' 48 to 63
I
1008 to 1023
#9999

(b) Format
APSH #aaaa Code data area
APSH #bbbb Start address of the decode table
IPSH g •- Max. decode number
LD #cccc.c Selection of byte or word
0 = Byte
STR #eeee.e Reset
STR #ffff.f Execution
SUBP 025

A OUT #dddd.d

Byte (#cccc.c)
= 0: Code data
= 1: Code data
Error output

... 0 to 255
... 0 to 1023
•Decode table start number
•Max. decode number: 1 to 1023

6-68
•!

'!
<c) Control conditions |

® Designation of the data code area (APSH XX)


Designate the address of the code to be decoded.
f
Two bytes are used.

(2) Designation of the start address of the decode table (APSH X X X X )


Designate the start address of the table to be decoded.

(D Maximum decode number (IPSH XX XX)

Designate the maximum number of the decode bits.


5

@ Designation of the size of the data in the decode area (LD XX)
LD = 0: The size of the data in the conversion table is 1 byte.
LD = 1: The size of the data in the conversion table is 2 bytes.

(D Reset (RST) 'ÿ

RST = 0: Error output R1 is not reset.


RST = 1: Error output R1 is reset. ,

© Execution command (ACT)


ACT = 0: The binary decode instruction is executed. R1 remains unchanged.
ACT = 1: The binary decode instruction is not executed.

© Error output (Rl)


R1 = 0: Normal
Rl = 1: Error
A numeric value greater than the table size is set.

6-69
(d) Example, of ladder
APSH #aaaa Code data area
APSH . #bbbb Start address of the decode table
IPSH #gggg Max. decode number
LD #cccc.c Selection of byte or word
0 = Byte
STR #eeee.e Reset
STR #ffif.f Execution
SUBP 025
OUT #dddd.d Error output

#aaaa

#bbbb

#9999

-if
#ccccc #ddddd

-H
#eeeee
SUBP025

-1 \
#f ff ff

6-70
(13) SUBP 027 (Binary Code Conversion)

(a) Function
The instruction converts the data by using the conversion table created on the PLC
table.

From the contents of data “0” to “n” (= “m”) of the conversion standard data address,
the data in the “m”th line from the start of the table data are read and output to the con¬
version data output address. '
For the type of output data, selection is possible from byte, word, and double-word.

The relationship between the number in the table and the table is as indicated below
according to the data length.

Double-word Word Byte Table


0
0
,1
0
2
1
3
1 2 .1 4

(b) Format
IPSH
n

a
n

!
n

Size of the conversion table (number of bytes)


I
APSH #bbbb Conversion standard data address
APSH #CCCC Conversion data output address
TPSH #9ddd Table number of the conversion data
IPSH e e = 0: Byte
1: Word j
2: Double-word
LD #ffif.f Reset
STR #gggg-g Execution
SUBP 027 1
OUT #hhhh.h Error output '(

.!

J
!|

6-71
i
(c) Control conditions
Q Designation of the size of the conversion data table (IPSH XX)
Designate the size of the conversion data table by the number of bytes.
The maximum size is 256 bytes.

® Designation of the conversion standard data table address (APSH X X X X )


The data in the conversion data table can be read by designating the number in the
table.
Designate this number in the table.

0 Designation of the conversion data output address (APSH X X X X )


Designate the address where the data stored at the number in the table designated
in item © above are output.

0 Designation of the number of conversion table (TPSH X XXX)


The size of the table differs depending on the PLC number.
9000 to 9007: Max. 256 bytes
9008 to 9023: Max. 128 bytes

0 Designation of the size of the data in conversion table (IPSH XX)


e = 1: 1 byte

A ®
e = 2:
e = 3:
2 bytes
4 bytes

Reset (RST)

RST = 0: Error output R1 is not reset.


RST = 1: Error output R1 is reset.

© Execution command (ACT)


ACT a* 0: The binary code conversion instruction is executed.
R1 remains unchanged.
ACT = 1: The binary code conversion instruction is not executed.

0 Error output (Rl)


R1 = 0: Normal
Rl = 1: Error
A numeric value greater than the table size is set.

6-72
'1

i
,1

(d) Example of ladder


•:
IPSH a Size of the conversion table (number of bytes)
APSH #bbbb Conversion standard data address
APSH #cccc Conversion data output address
TPSH #9ddd Table number of the conversion data
EPSH e = 0: Byte 1
.1
= 1: Word
= 2: Double-word
LD #fflf.f Reset
STR #gggg-g Execution
SUBP 027
OUT #hhhh.h Error output -I

#bbbb

#cccc
•l

#9ddd

#93993
SUBP027
#hhhhh
I
'
I
l|
'

f
II
i|
.
ii
4
1
’i

<r

6-73 :
(14) SUBP 031 (Double-word Data Convert)

(a) Function
The instruction converts the binary data to BCD data and the BCD data to binary data.

(b) Format
APSH #aaaa Conversion data address
APSH #bbbb Converted data address
LD #cccc.c = 1:4 bytes
= 0: Skip
STR #dddd.d BCD -4 BIN or BIN -4 BCD
STR #eeee.e Reset
STR Execution
SUBP 031
OUT #gggg.g Error output

(c) Control conditions


© Designation of the conversion data address (APSH X X X X )
Designate the address where the data to be converted are stored.
Both the binary and BCD data use 4 bytes.
The sign of the BCD data is set at the most significant bit position.

A
Therefore, the expression of anumeric value within the range of ± 9999999 is pos¬
sible.

© Designation of the converted data address


Designate the address where the result of conversion is stored.
Both the binary and BCD data use 4 bytes.

® Designation of the number of bytes


LD = 0: No conversion

® Designation of the conversion type


STR = 0: Conversion of binary data to BCD data
STR = 1: Conversion of BCD data to binary data

® Reset (RST)
RST = 0: Error output R1 is not reset.
RST = 1: Error output R1 is reset.

6-74
:!

© Execution command (ACT) 1

ACT = 0: The double-word data conversion instruction is not executed.


ACT = 1: The double- word data conversion instruction is executed.

© Error output (Rl)


R1 = 0: Normal •i

Rl = 1: Error

(d) Example of ladder


APSH #aaaa Conversion data address
APSH #bbbb Converted data address
LD #cccc.c = 1:4 bytes
= 0: Skip
STR
STR
#dddd.d
#eeee.e
BCD —» BIN or BIN > BCD
Reset

STR Execution
SUBP 031
OUT #gggg-g Error output

#aaaa

#bbbb

HI
#ccccc

#ddddd
SUBP031 i

•I
#99999
l
HI-
#eeeee

Hl- i

rl
:!

;l

6-75
(15) SUBP 032 (Binary Comparison)

(a) Function
The instruction executes comparison of the 1-, 2-, or 4-byte lengthbinary data and out¬
puts the result of comparison. Both the input data and the data for comparison must
be the data of the specified length.

(b) Format
APSH #aaaa Input data address
APSH #bbbb Comparison data address
APSH #hhhh Comparison result output address
IPSH n = 0: 1 byte
= 1:2 bytes
= 2: 4 bytes
LD #ffff.f Execution command
SUBP 032

(c) Control conditions „


(D Designation of the input data address (APSH XX XX)
Designate the address where the data to be compared are stored.

© Designation of the comparison data address


Designate the address where the comparison data are stored.

A (D Designation of the size of the data


= 6:
= 1:
1 byte
2 bytes
= 2: 4 bytes

@ Execution command (ACT)


ACT = 0: The binary data comparison instruction is not executed.
ACT = 1: The binary data comparison instruction is executed.

© Result of comparison
#hhhh
dO = 1 aaaa = bbbb
dl = 1 aaaa > bbbb
d2 = 1 aaaa < bbbb

6-76
!!

i!
1

J
i

(d) Example of ladder !


APSH #aaaa Input data address
APSH #bbbb Comparison data address
APSH #hhhh Comparison result output address
IPSH n = 0: 1 byte %
= 1:2 bytes ;
= 2: 4 bytes
LD Execution command
SUBP 032
S
i

t
#aaaa

#bbbb

#hhhh

HI
SUBP032

I
i

i
(

<
\
5
i!
ii

1
:

6-77
1
(16) SUBP 034 (Binary Data Search)

(a) Function
The instruction executessearch in the table for the data identical to the input data and
stores the address where the identical data are found by the relative address from the
start of the table. If the identical data are not found, an error is output.

The relationship between the numbers in the data table and the designated table is as
indicated below according to the data length.

Double-word Word Byte Table


0
0
1
0
2
1
3
1 2 4

n n n

(b) Format
IPSH a '
The size of the data table (number of bytes)

J
APSH #bbbb Start address of the data table
APSH #hhhh Search data address
APSH #cccc Search result storing address
Ipsh e = 0: Byte
= 1: Word
= 2: Double-word
LD #fHF.f Reset
STR #gggg-g Execution
SUBP 034
OUT #hhhh.h Error output

6-78
(c) Control conditions
© Designation of the size of the data table (number of bytes) (IPSH X X )
Designate the size of the data table by the number of bytes.
'!
© Designation of the start address of the data table ( APSH X X X X )
Designate the start address of the data table.
The data table can be created at any place.

® Designation of the input data address (APSH X X X X)


If

Designate the address where the data to be searched are stored.

@ Designation of the output data address (APSH #X X X X )


When the specified data are found (R1= 0), the number in the table where the found
data are stored is output. Designate the address where that number is stored.

© Designation of the data size (IPSH XX)

= 0: The data stored in the data table are 1-byte data.


= 1: The data stored in the data table are 2-byte data.
= 2: The data stored in the data table are 4-byte data.

© Reset (RST)

-
RST 0; Error output R1 is not reset.
RST = 1: Error output R1 is reset.

© Execution command (ACT) 1

ACT = 0: The binary-data searchinstruction isexecuted. R1remains unchanged.


ACT = 1: The binary-data search instruction is not executed.

© Error output (Rl)


Rl = 0: The search data are found. j
Rl =: 1: The search data are not found.

6-79
(d) Example of ladder
IPSH . a The size of the data table (number of bytes)
APSH #bbbb Start address of the data table
APSH #hhhh Search data address
APSH #cccc Search result storing address
Ipsh e = 0: Byte
= 1: Word
= 2: Double-word
LD #ffff.f Reset
STR #gggg-g Execution
SUBP 034
OUT #hhhh.h Error output

#bbbb

#hhhh

#cccc

i HI
f ffff

HI
#

#99999
SUBP034
#hhhhh

6-80
(17) SUBP 035 (Binary Index Modifier Data Transfer)
'

(a) Function
The instruction reads the data from the data table or rewrites the data in the data table.

For the output data, selection is possible'ffom byte, word, and double-word.

The relationship between the numbers in the data table and the designated table is as
indicated below according to the data length.

Double-word Word Byte Table


0
0
1
0
2
1
3
1 2 4 4

•i •

n n , n

(b) Format
IPSH a The size of the data table (number of bytes)

k
APSH #bbbb Start address of the data table
APSH #iiii I/O data storing address
APSH #cccc Address storing the number in the table
IPSH e = 0: Byte \
= 1: Word
= 2: Double-word
;i
LD Reset
STR #dddd.d Read or rewrite
STR #gggg.g Execution
SUBP 035
OUT #hhhh.h Error output

6-81
(c) Control conditions
© Designation of the size of the data table (number of bytes) (IPSH XX)
Designate the size of the data table by the number of bytes.

© Designation of the start address of the data table (APSH X X X X )


Designate the start address of the data table.
The data table can be created at any place.

© Designation of the address storing the I/O data (APSH X X X X )


Designate the address where the data to be searched are stored.

© Designation of the address storing the number in the table (APSH X X X X )


The data to be read or rewritten are designated by the number in the table. Desig¬
nate the address where this number is stored.

© Designation of the data size (IPSH XX)

= 0: The data stored in the data table are 1-byte data.


= 1: The data stored in the data table are 2-byte data.
= 2: The data stored in the data table are 4-byte data.

© Designation of read/write processing

J ©
= 0: Data are read from the data table.
= 1: Data in the data table are rewritten.

Reset (RST)
RST = 0: Error output Rl is not reset.
RST = 1: Error output Rl is reset.

© Execution command (ACT)


ACT = 0: The binary-index modifier data transfer instruction is executed.
Rl remains unchanged.
ACT = 1: The binary-index modifier data transfer instruction is not executed.

6-82
(D Error output (Rl)
If an error occurs when this instruction is executed, “1” is set for “Rl” (Rl = 1)
to indicate the occurrence of an error.

An error occurs in the following cases:

•A numeric value greater than the size of the data table is set.
•The size of the data table is not a multiple of the designated data size.
Example: Data size = Byte 1 X N bytes
Word 2 X N bytes
Double-word 4 X N bytes

(d) Example of ladder


EPSH a The size of the data table (number of bytes)
APSH #bbbb Start address of the data table
APSH #iiii I/O data storing address
APSH #cccc Address storing the number in the table
IPSH e = 0: Byte i

= 1: Word
= 2: Double-word
LD Reset
STR #dddd.d Read or rewrite
STR #gggg-g Execution
SUBP 035
OUT #hhhh.h Error output

#bbbb

#iiii

#cccc

#f f f ff #hhhhh
SUBP035
#ddddd

#ggggg

6-83
(18) SUBP 036 (Binary-data Addition)

(a) Function -
The result of operation is set to the registers: the numeric value of operation result is
set to the register designated by the operation result output address and the sign in¬
formation to #2999.

(b) Format
APSH #aaaa Augend data address
APSH(ipshd) #bbbb Addend data address
APSH #cccc Operation result output address
IPSH n Operation type
LD #dddd.d Reset
STR #eeee.e Execution
SUBP 036
OUT Error output

(c) Control conditions


(T) Designation of the augend data address
Designate the address where the augend data are stored.

(D Designation of the addend data address


Designate the address where the addend data are stored.

J (D Designation of the operation result output address


Designate the address where the result of operation is output.
The address is stored as 4-byte data. .

© Designation of the type of operation


Designate the data length and the data type of augend/addend.
1st digit: =0: 1 byte
= 1:- 2 bytes
= 2: 4 bytes'
2nd digit: = 0: Constant data
= 1: Address data

-6-84
© Execution command (ACT)
ACT = 0: The binary-data addition,instruction is executed.
R1 remains unchanged.
ACT = 1: The binary-data addition instruction is not executed.

© Error output
= 0: Normal
= 1: Error

© #2999
Operation status is written.

dO = 1: 0
dl = 1: Negative
d5 = 1: Overflow

(19) SUBP 037 (Binary-data Subtraction):

(a) Function
The instruction executes subtraction of the 1-, 2-, or 4-byte binary data.

The result of operation is set to the registers: the numeric value of operation result is
set to the register designated by the operation result output address and the sign in¬

t
formation to #2999.

(b) Format
APSH #aaaa Minuend data address
APSH(ipshd) #bbbb Subtrahend data address
APSH #cccc Operation result output address
IPSH n Operation type
LD #dddd.d Reset
STR #eeee.e Execution
SUBP 037
OUT #ffff.f Error output

(c) Control conditions


© Designation of the minuend data address
Designate the address where the minuend data are stored.

© Designation of the subtrahend data address


Designate the address where the subtrahend data are stored.
It is also possible to subtract the designated data.

6-85
© Designation of the operation result output address
Designate the address where the result of operation is output.
The address is stored as 4-byte data.

@ Designation of the type of operation


Designate the data length and the data type of minuend/subtrahend.

1st digit: =0: 1 byte


= 1: 2 bytes
= 2: 4 bytes
2nd digit: = 0: Constant data
= 1: Address data

© Execution command (ACT)


ACT = 0: The binary-data subtraction instruction is executed.
R1 remains unchanged.
ACT = 1: The binary-data subtraction instruction is not executed.

© Error output

= 0: Normal
= 1: Error

i © #2999
Operation status is written.

d0= 1: 0
dl = 1: Negative
d5 = 1: Overflow

6-86
;

{20) SUBP 038 (Binary-data Multiplication)

(a) Function
The instruction executes multiplication of 1-, 2-, or 4-byte binary data.

The result of operation is set to the registers: the numeric value of operation result is
set to the register designated by the operation result output address and the sign in¬
formation to #2999. •i

(b) Format j
APSH #aaaa Multiplicand data address
APSH(ipshd) #bbbb Multiplier data address
APSH #cccc Operation result output address
IPSH n Operation type
LD #dddd.d Reset
STR #eeee.e Execution
SUBP 038
OUT #ffif.f Error output

(c) Control conditions


® Designation of the multiplicand data address
Designate the address where the multiplicand data are stored.
(2) Designation of the multiplier data address

Designate the address where the multiplier data are stored.


(|) Designation of the operation result output address
Designate the address where the result of operation is output.
II
I
The address is stored as 4-byte data.-

® Designation of the type of operation


i
Designate the data length and the data type of multiplicand/multiplier.
!
1st digit: =0: 1 byte
= 1: 2 bytes
= 2: 4 bytes
2nd digit: = 0: Constant data
= 1 Address data
(|) Execution command (ACT)
ACT = 0: The binary-data multiplication instruction is executed.
R1 remains unchanged.
ACT = 1: The binary-data multiplication instruction is not executed.

6-87
© Error output

= 0: Normal
= 1'. Error

© #2999
Operation status is written.

dO = 1: 0
dl = 1: Negative
d5 = 1: Overflow

(21) SUBP 039 (Binary-data Division)

(a) Function
The instruction executes division of 1-, 2-, or 4-byte binary data.

The result of operation is set to the registers: the numeric value of operation result is
set to the register designated by the operation result output address and the sign in¬
formation to #2999.

(b) Format
APSH #aaaa Dividend data address
APSH (ipshd) #bbbb Divisor data address

A APSH
IPSH
LD
STR
SUBP
#eccc
n
#dddd.d
#eeee.e
039
Operation result output address
Operation type
Reset
Execution

OUT #ffff.f Error output

6-88
(c) Control conditions
(J) Designation of the dividend data address
Designate the address where the dividend data are stored.

(2) Designation of the divisor data address


Designate the address where the divisor data are stored.

(D Designation of the operation result output address


Designate the address where the result of operation is output.
The address is stored as 4-byte data.

® Designation of the type of operation


Designate the data length and the data type of dividend/divisor.

1st digit: =0: 1 byte


= 1: 2 bytes
'
= 2: 4 bytes
2nd digit: = 0: Constant data
=1 Address data

(5) Execution command (ACT)

©
ACT = 0: The binary-data division instruction is executed.
R1 remains unchanged. !
ACT = 1: The binary -data division instruction is not executed.

Error output
I
= 0: Normal
= 1: Error

(D #2999
Operation status is written.

d0= 1: 0
dl = 1: Negative
d5 = 1: Overflow
Division by “0” causes overflow.

1
J

6-89
(d) Example of ladder
APSH #aaaa Augend data address
APSH • #bbbb Addend data address
APSH #cccc Operation result output address
EPSH n '
Operation type
LD #dddd.d “

. STR . #eeee.e Execution


SUBP 036 to 040 .
OUT Error output

#bbbb

,#cccc

HI
#ddddd
SUBP034
HI-
#eeeee
I
SUBP039

6-90
1

(22) SUBP 040 (Binary Constant Definition)

(a) Function
!
The instruction defines 1-, 2-, or 4-byte data.
Set a constant (decimal) to the constant output address by the specified number of bytes
in the binary number.

(b) Format :
APSH #aaaa Output address
IPSHD 12345 Setting data .
EPSH n Byte length I
LD #bbbb.b Execution j
SUBP 40

(c) Control conditions !


(T) Designation of the constant output address
|
Designate the address where the data are output in binary format.
i
© Designation of setting data
Set the constant in decimal.
Data length must be within the specified byte length. The range of setting data is

l
±999999999.

© Designation of byte length


= 0: 1 byte
1
= 1:2 bytes
= 2: 4 bytes

® Execution command (ACT)


ACT = 0: The binary constant definition instruction is executed.
R1 remains unchanged. ;
ACT = 1: The binary constant definition instruction is not executed.
'i

!i
!

6-91
(d) Example of ladder
APSH #aaaa Output address
IPSHD. b Setting data
IPSH n Byte length
. LD fbbbb.b Execution
SUBP 40

#aaaa

-1 \
#bbbbb
SUBP040

6-92
(23) Auxiliary Instruction of Macro Instruction

(a) IPSH (Immediate Pus) RR after operation: RR —


© Format IPSH XXX XH
L
—:!Numeric value (Hexadecimal)
© Directly designate the numeric value which is used by SUBP.
(b) APSH (Address Pus) RR after operation: RR —
© Format APSH #x X X X

—: Register
1

(D Designate the address of the register to be used by SUBP.


(c) PUSH (Push) RR after operation: RR
1

© Format PUSH #X XXX

U Register
© Designate the address where the numeric value to be used by SUBP is stored.
(d) TPSH (Table Push) RR after operation: RR —
© Format TPSH #XXXX

©
—- Table number
Designate the table number of the PLC table which is used by SUBP.
(e) IPSHD RR after operation: RR —
l
© Format IPSHD XXXX

n Constant
© Directly designate the numeric value' which is used by SUBP 036 to 040.

6-93
>•

r 4

w
<

t
i

i
*
T

\ 4

r
*

i
7
JXSD OFFLINE SYSTEM
!

Chapter 7 describes the JXSD offline system.


I

'

7.1 OUTLINE OF THE JXSD OFFLINE


SYSTEM 7-2
,t
7.2 SOURCE FILE 7-6

s
7.3 COMPILER 7-18
J

7.4 LINKER 7-21

7.5 REMOTE CONTROLLER


OPERATION ...‘ 7-24

7.6 LIST OF ERROR MESSAGES


AND WARNING MESSAGES . 7-33 t

7-1
7.1 OUTLINE OF THE JXSD OFFLINE SYSTEM

The JXSD offline system is used to create the sequence ladder by using the compiler, linker,
anddownload tools among the utilities provided for the development of PLC sequence pro¬
grams. These tools run on the MS-DOS.

7.1.1 Operating Environment

Hardware: IBM PC compatibles


OS: MS-DOS Ver. 6.2 or above
Memory: 400K bytes minimum

7.1.2 Execution Files

The JXSD offline systems consists of the following software packages.

•JXLCOMP.EXE Ladder language compiler


•JXLLINK.EXE Linker
•JXPCCOM.EXE JXSD remote controller

7.1.3 Outline of the Execution Files

(1) Ladder Language Compiler

The compiler compiles the source file, coded using the ladder language, to generate the
object file.

The processing objective data by the compiler is indicated below.

•Version No.
•High-speed scan ladder program
•Low-speed scan ladder program
•Low-speed ladder stop count

1 •Conversion data table


•Message data table
•Symbol data
(2) Linker
'
' ,

The linker generates the binary file in the executable format from the object file which
is output by the compiler.

(3) JXSD Remote Controller

By connecting the PLC and the IBM PC compatible personal computer with the
RS-232C interface, the JXSD remote controller executes the following processing.

•Display of the PLC’s ladder execution status


•Downloading the binary file to the PLC (PC —» PLC)
•Execution/stop control of the ladder

7-2
7.1 OUTLINE OFTHE JXSD OFFUNE SYSTEM

7.1.4 Ladder Program Development Procedure

The following chart shows the procedure for developing the ladder program.

•i
Editor Creating the source file

XXXXX.SRC Completion of the source file

Compiler Compiles the source file by JXLCOMP.


ii
XXXXX.OBJ Completion of the object file

XXXXX.OBJ
Object flies already completed
V
1
Linker Generates the file in the executable format by JXLLINK.
!

’.BIN
.i

!
Remote Controller Flash ROM boot
[JCPCCOM] [Boot mode]

I
Downloading to the PLC

1 To flash ROM

t
Checking the ladder by
executing It

I
If correction Is necessary

7-3
/

/
© Create the source file in the ladder language.
Any editor that can create a DOS file can be used for creating the source file in the
ladder language. - ’

Create the.source file by using an appropriate editor.

For details of the ladder language format, refer to the explanation on the compiler.

YELADDER.SRC

***********************************
YELADDER.SRC
* .
*************************** ********
VERSION JXSD LADDER
LOWSTOPCOUNT1 ; Low-speed scan ladder program stop count

HIGHSEQUENCE ; High-speed scan ladder program


INCLUDE LAD.HI
'
ENDP

LOWSEQUENCE ; Low-speed scan ladder program


INCLUDE LAD.L01
INCLUDE LAD.L02
INCLUDE LAD.L03
ENDP

CONVERSION '
; Conversion data
INCLUDE CONV.DAT
ENDP

MASSAGE Message data

j INCLUDE MESSAGE.DAT
ENDP
SYMBOL
INCLUDESYMBOL.DAT
; Symbol data

ENDP

(2) Compile the created or modified source file.


Generate the object file by using the JXLCOMR

For the operation procedure, refer to the explanation on the compiler.

7-4
;

7.1 OUTLINE OF THE JXSD OFFLINE SYSTEM

(D By consolidating the object files into a single file, generate the executable file.
Use the JXLLINK to generate the executable file.
I!
For the operation procedure, refer to the explanation on the linker.

This link processing is always necessary even if only one object file has been gen¬
erated. .

The executable file (*.BIN) generated by the linker is the binary file having the
same configuration as the file written to the PLC’s flash ROM.

© Download the executable file (*.BIN) to the PLC.


Connect the Personal Computer to the JXSD with an RS-232C cable and start the
JXPCCOM. Use the object download function of the JXPCCOM to download the
generated executable files to the PLC.

For the operation procedure of the JXPCCOM, refer to the explanation on the re¬
mote controller.

© Execute and check the ladder. !i


After downloading the ladder, execute it to check the contents.

* the error by returning to step (T) above.


If an error is found in the ladder, correct
i
To reduce this debugging time,it is recommended to divide the source file into sev¬
eral files so that the compiling time can be reduced.

© Boot the sequence ladder to the flash ROM.


After finishing debugging, boot the correct sequence ladder by using the NC boot
mode.

7-5
7.2 SOURCE FILE

The format of the source file input to the compiler is described below.

7.2.1 'Source File Format

(1) Definition of Character Codes

•All data including the comments and character data must be ASCII.
Although upper case and lower case characters can be used, they are not distin¬
guished for the internal processing. When entering characters in ladder programs,
pay attention to this point:

•Note that all characters are processed in upper case characters.


(2) Definition of Numeric Values

•Decimal number 9,1234


•Hexadecimal number 1234H, 0abl2H, OFFH (note)
•Characters aBc, a, Z
•Contact/ladder table number #1000, #10012, #9024

- Note: Place “0” at the beginning of a hexadecimal number which begins with A to F.

(3) Pseudo Instructions .

The following characters are processed as pseudo instructions. These pseudo instruc¬
tions can be used only once in one source file.

•version
•lowsequence
•message
•include
•highsequence

i
-
•lowstopcount
•endp
•conversion
(4) Definition of Version Number

For one object file where high-speed scan ladder, low-speed scan ladder, tables and
symbols are consolidated, one version number is assigned.

7-6
7.2 SOURCE RLE

(5) Nesting in the Source File

The source file of a ladder program will usually be a very large file and editing is not
:
a simple task.
!

In compilation, the included file function allows the several divided files to be compiled
in one file.
i

[Main][High-speed scan sequence] [Low-speed scan sequence 1] [Low-speed scan sequence 2]


LADDER.SRC LAD.HI i;
;

High-speed
INCLUDE LAD.HI scan sequence’
INCLUDE LAD.LO

LAD.LO

Low-speed scan LAD.L02


sequence 1

INCLUDE LAD.L02 Low-speed scan


sequence 2
:

Fig. 7.1
•As illustrated above, nesting of the files is possible up to two levels.
•Pseudo instructions for the start and end of a high-speed scan/low-speed scan lad¬
der (HIGHSEQUENCE, LOWSEQUENCE, ENDP) must always be written in a
main file.

7-7
(a) Main file
The format of a source file is described below using this as an example.

YELADDER.SRC (main file)

***********************************
YELADDER.SRC
*

I**********************************

© VERSION JXSD LADDER

LOWSTOPCOUNT2 - ; Low-speed scan ladder program stop count


. ® HIGHSEQUENCE ; High-speed scan ladder program
© INCLUDE LAD.Hi .
(D ENDP
LOWSEQUENCE ; Low-speed scan ladder program
INCLUDE LAD.L01
INCLUDE -LAD.L02
INCLUDE LAD.L03
ENDP

CONVERSION ; Conversion data


INCLUDE CONV.DAT
ENDP

MASSAGE ; Message data


INCLUDEMESSAGE.DAT
ENDP
® SYMBOL ; Symbol data
INCLUDE SYMBOL.DAT
ENDP

1 Fig. 7.2

1) Source file name

Source file name can be assigned as required by using an extension of “.SRC”.

.SRC

2) Source file format

•There are no restrictions on start position, the number of lines and the number of
columns for entering the pseudo instructions, sequence program, and data.
•Characters appearing after in a line are regarded as a comment.

7-8
7.2 SOURCE FILE

3) Pseudo instructions •

® VERSION

•Set a version number. j


•A version number should be set in up to 20 characters using the following format.
•VERSION AAAAAAAAAAAAAAAAAAAAA
•If no entry is made, spaces occupy 20 columns.
© LOWSTOPCOUNT
•Set the low-speed scan ladder sequence processing stop count.
0: The compiler sets “1”.
1 to 127: Stop count (4 msec per count)
•If no entry is made, the default value of “1” is set.
©

.....
fflGHSEQUENCE
'i
•This indicates the start of a high-speed scan ladder sequence.
•An object file is generated as a high-speed scan ladder up to the ENDP instruction.
•Format: fflGHSEQUENCE ENDP
•If no entry is made, a high-speed scan ladder is not generated.
•This pseudo instruction must always be written in a main file.
@ INCLUDE
•This instruction calls up the files to-be included.
•Format: INCLUDE B : LAD.L01 j
T •>
File name of the file to be included
Drive number of the device where the file
to be included is stored

©
•Entry of a path name preceding the file name of an included file is possible.

ENDP
INCLUDE B:\LPROG\LOW\LWL01 t
•This indicates the end of a high-speed scan ladder sequence, low-speed scan ladder
sequence, conversion data, and message data.
•Format: ENDP f
•This pseudo instruction must always be written in a main file.
® LOWSEQUENCE
•This indicates the start of a low-speed scan ladder sequence.
•An object file is generated as a low-speed scan ladder up to the ENDP instruction.
•Format: LOWSEQUENCE ENDP
•If no entry is made, a low-speed scan ladder is not generated.
•This pseudo instruction must always be written in a main file.

7-9
(D CONVERSION

•Format: CONVERSION .....


•.This instruction generates the object file as the conversion data in the table.
ENDP
•If no entry is made, it is regarded as there being no message data.
® MESSAGE

•This instruction indicates the start of setting of message data in the ladder table.
•The instruction generates the object file regarding the data up to ENDP as the mes¬
sage data.
•Format: MESSAGE .)... ENDP
•If no entry is made, it is regarded as there being no message data.
® SYMBOL . : '
. -

•This defines the names for individual coils.


•Definition is possible in up to 8 characters.


played. -
Registration
•Format:
(b) Included files
.....
•In the display of ladder, the first 5 characters of the specified symbol name are dis¬
capacity of the symbol names is 5000.
SYMBOL ENDP -

Files shown in ® to 0 below are examples of high-speed scan ladder, low-speed scan
ladder, conversion data, and message data that are included in the main file (YELAD-
DER.SRC).Pseudo instructions such as HIGHSEQUENCE, LOWSEQUENCE,
CONVERSION, MESSAGE, SYMBOL and ENDP must not be written in the source
files (i) to (7). They must be written in a main file.

1
® LAD.HI

***********************************
High Speed Ladder
***********************************
LD #10000
OUT #11000

RTH
7.2 SOURCE RLE

I
i

(D LAD.L01 1
1

********** *************************
Low Speed Ladder (Lead) *
*
***********************************
LOWSEQUENCE it
LD #14000
INR #1500

OUT #11010
1

® LAD.L02 !

***********************************
Low Speed Ladder2 (Intermediate) *
*«******«»********************•*•••*
LD #14056
DST #1552, #1532,OFFH

OUT #14033

© LAD.L03

***********************************
Low Speed Ladder3 (End)
* *
***********************************
LD #10012 i

OUT #14500

L
[
OUT #14010
RET

© CONV.DAT

***********************************
Conversion Table Data
* *
***********************************
N9000 OH, 1H, 2H, 3H,4H,5H,6H;7H

N9023 OFAH, OFBH, OFCH, OFDH, OFEH, OFFH


1

.1
7-11 :
© MESSAGE.DAT

. ***********************************
Message Data *
.***********************************

N9024 ’SPINDLEALARM’

N9323 TROUBLE IN EXTERNAL DEVICE’

© SYMBOL.DAT

******** ***************************
Symbol Name
* *
***********************************
#10000 JOG •
; Jog

#79990 . OIL ; Coolant

7-12
7.2 SOURCE FILE

i!

(c) Source files


0 High-speed scan ladder, low-speed scan ladder source files
•Write the sequence source ladder programs which should be processed at high- or
low-speed.
•Although there are no restrictions on start position, thenumber of lines or the num¬
ber of columns for entering characters, at least one space must be placed between
an instruction and address.

0 Conversion data source file

•Write the conversion table which is used by macro instruction SUBP007.


•Although there areno restrictions on the data start line or column, at least one space
must be placed between the table number and data.
•A table number must begin with “N”.
•Delimiter is used between data.
•The table numbers that can be used are indicated below.
#9000 to #9007: 256 bytes
#9008 to #9023: 128 bytes
•In normal format, data are stored in the ladder table as byte data.
N9000 1.2, 3,4. 5

N9000[0] 1

HI 2

[2] 3.

[3] 4

[4] 5

i
•To store word data, place an underscore preceding the numeric values.
N9000 _1._2.J3
t
N9000[0]
1
Ml

[21

[3]

[4]
3
[5]

:
i
7-13
•To store double-word data, place two underscores preceding the numeric values.
N9000 _ _2
1,

N9000[0]

[11
1
[2]

[3]

[41
'
[5]
2
[6]

[71

•Entry of the data should be only the necessary data.


If the number of data to be converted is specified as “5” using the SUBP007
instruction (N9000 ’1, 2, 3, 4, 5’). entry of 5 data is necessary, and it is not neces¬
sary to enter 256 data.
Omission of entry is treated as OH.

(D Message data source file


•Write the message data to be used by the macro instruction SUBP023.
•The message data must be within 40 characters.
•The message data must be enclosed by “”\
•Although there are no restrictions on the data start line or column, at least one space

1
must be placed between the table number and
•A table number must begin with “N”.
•The allowable range of the table numbers is indicated below:
#9024 to #9323: 40 words
#9024: ’Spindle error occurred’

7-14
7.2 SOURCE FILE

(d) Recommended source file format ii


The explanation has been given using examples in which source files are consolidated
in one file using the include function. In practical programming steps, the source file
is created in several sections to reduce ladder execution/check cycle time. By creating
the source files in several sections, necessary correction should be made only for the
source file which is involved with errors, thus compiling time can be reduced.

Examples of source file division are indicated below.

KANKYOU.SRC

EnvironmentSetting
**************** ****** ************ *
VERSION JXSD LADDER

LOWSTOPCOUNT1

LAKDHI.SRC

High Speed Ladder

HIGHSEQUENCE
LD #14000
INR

OUT #11010
ENDP

LADLOW1.SRC '[

*
***********************************
LowSpeed Ladder (Lead) *
t
LOWSEQUENCE
LD #14000
INR

OUT #11010
i
ENDP

'I

7-15
LADL0W2.SRC

***********************************
* Low SpeedLadder2 (Intermediate) *
***********************************
LOWSEQUENCE
LD #14056
DST #1530, 1532, OF F H

OUT #14033
ENDP .

LADLOW3.SRC r

***********************************
Low Speed Laddet3 (End)
* *
***********************************
LOWSEQUENCE
LD #10012
OUT #14500

OUT #1410
RET
ENDP _ _ /

CONV.SRC

***********************************
Conversion Table Data
* *
***********************************
CONVERSION

i N9000

N9023
ENDP.
OH, 1H, 2H, 3H, 4H , 5H, 6H, 7H

OFAH, 0FBH, 0FCH, 0FDH, 0FEH, 0FFH

MESSAGE.SRC

***********************************
Message Data
* *
***********************************
MESSAGE
N9024 ’SPINDLEALARM’

N9323 TROUBLE IN EXTERNAL DEVICE’


ENDP

7-16
7.2 SOURCE FILE

5
!l
!l

SYMBOL.SRC

; ********************9**************
.* Symbol Name
*
. ****9*999*9 9* **999**99*9**99
*******
SYMBOL i

N10000 JOG ; Jog

N19990 OIL ; Coolant


t
ENDP
1
I
j

i
V

*!

J
I
.! .

7-17

I
7.3 COMPILER

7.3.1 Compiler Operation

By executing the JXLCOMP instruction, the source file which has been created or edited is
- compiled to generate the object file.

(1) Starting the JXLCOMP

The JXLCOMP is started by the following procedure.

JXLCOMP file-1 [.SRC]


[file-2 [.OBJ]]
[file-3 [.ERR]] [ENTER]

(2) Description of Parameters

file-1: Source file name (input)


file-2: Object file name (output)
file-3: Error file name (output)
Entry for the items in [ ] can be omitted.

•If the entry is omitted for file-2 and file-3, a default file name is set.
•If only “JXLCOMP” is input, the guide messages for inputting the parameters are
displayed.
•Example: JXLCOMP B : LADTEST [ENTER]
The LADTEST.SRC file is input and compiled. If an error occurs, LAD-
TEST.ERR file is created. When the source is compiled without errors, LAD-
TEST.OBJ file is output.
•When the include function is used, compilation is required only for the main file.
The files included in the main file are compiled automatically.

7-18
7.3 COMPILER

;i

7.3.2 Compiler Error List i


I
If an error-occurs during compilation, the compiler outputs the error list file having the exten¬
sion of “.ERR” with the same main file name as the input file.

It is also possible to designate the file name of the error list file at the start of the JXLCOMP.
In this case, the error list is output in the designated file name.

The compiler error information is stored to the error list file.

If the file has the same name as the error list file name, the existing file is deleted when the
error list file is generated.

Error list file:


LAD.HI 40 Illegal characters are used
LAD.L01 33 Invalldoperator
LAD.LQ1 Insufficientnumberof operands
46
Error message
Errorline number
Error file name

7.3.3 Compiler Check Items :

The compiler checks the source file for the format whether it is written in the processing per¬
mitted format. In addition to this check, it also checks the following items.

(1) Instruction Check


i;
CD Operand code check [

©
Permitted: LD, LD-NOT, AND
Not permitted: ABS, XOR-NOT ... j

Operand number check


...

j
t
Permitted: DEC #1001, OFFH ... j
Not permitted: DEC #1001 ...

© Operand address designation range check


Permitted: LD #10001 ... |
Not permitted: LD #10 ...
© Operand constant designation range check
Permitted: MV1 #1405, 55H
Not permitted: MV1 #1405, OFFFFH

7-19
(2) The number of Setting Characters

For thecharacters to be set to the ladder table, the compiler checks the number of charac¬
ters whether it is within the upper and lower limits.

(3) Output Contact Check

•The compiler checks the output addresses of the OUT instruction whether they are
all unique;.
•It also checks the output contact addresses whether they are within the specified
range.

(4) Check on MCR/END and Nest Level

The compiler checks the correspondence between MCR and END, and also the nesting
level.

(5) Timer Check

•The compiler checks the range of registers used for timers.


•It also checks the interference in the addresses of the timers (#1700s and #1300s).
(6) Label Check

•The compiler checks the ADR label names for overlapped definition.
•The correspondence between the JMP and ADR is also checked.
(7) STR and AND-STR Check

J
The compiler checks the correspondence between the STR (STR-NOT) and AND-STR
(OR-STR). '

(8) SUBP Calling Sequence Check

•The compiler checks the correspondence between the SUBP and PUSH (APSH,
TPSH, IPSHD). •
•It also checks the.correspondence between the SUBP and STR.
(9) Existence Check for RTH and RET

The compiler checks the RTH and RET for the following:

•Only one RTH exists.


•Either RET or RTI exists.

7-20
7.4 LINKER

7.4 LINKER

The linker reads the object files in the order in which they are designated in the link module
designation file and maps the data contained in these files in the executable format that is
the same format as in the flash ROM.

7.4.1 Object Data and Linker Processing

Linker processing for the data contained in the object files is described below.

(1) High-speed Scan Ladder Data {HIGHSEQUENCE Data)

* Execution order of the high-speed scan ladder is determined in the order of link
object.
If the object data are divided into multiple objects, they are stored additionally
starting from the first address of the ladder storage area in the order of link object.
•If the high-speed scan ladder data appear after the low-speed scan ladder data, it
causes an error.
•The linker executes the max. check for the ladder storage area.
•An error occurs if there is no RTH.
•The linker checks the ADR label names for overlapped definition.
(2) Low-speed Scan Ladder Data (LOWSEQUENCE Data)

•Execution order of the low-speed scan ladder is determined in the order of link ob¬
ject. '
If the object data are divided into multiple objects, they are stored additionally
starting from the first address of the ladder storage area in the order of link object.
•The linker executes the max. check for the ladder storage area.
•An error occurs if there is neither RET nor RTI.
•The linker checks the ADR label names for overlapped definition.
(3) Conversion Table Data (CONVERSION Setting Data)
‘ 'j
•The designated message data are stored to the address (N9000 to N9023) corre¬
sponding to the variable number. I
•An error occurs if the same variable' data exist in more than one object file.
I
(4) Message Table Data

•The designated message data are stored to the address (N9024 to N9323) corre¬
sponding to the variable number. ?
•An error occurs if the same variablejdata exist in more than one object file.

(t

7-21 '!
(5) Version Number Data (VERSION Setting Data)

•The linker stores the version number data to the designated address.
•An error occurs if a version number is defined in more than one object file.
(6) Low-speed Scan Ladder Stop Count (LOWSTOPCOUNT Setting Data)

•The linker stores the low-speed scan ladder stop count to the designated address.
•An error occurs if the low-speed scan ladder stop count is defined in more than one
object file.’ * •' -
7.4.2 Linker Operation

The linker generates the link binary file from the object file output from the compiler by us¬
ing the JXLLINK instruction.

(1) Link Module File

It is necessary to create the link module file before starting the JXLLINK. The object
files to be linked are designated by this file.

(a) Link module file name


FELE1.LNK

File name can be assigned as required. However, the extension must be “.LNK”.

(b) Link module file format


•Designate all object files to be linked as indicated below.

J •There are no restrictions on the start line/column for the entry of characters. (The

maximum number of characters per line is 80 including the path name.)
Designation of the link module file must be made in one line, within 80 characters
including path name. -
•The high-speed and low-speed scan ladders are executed in the order they are des¬
ignated in this file.

YELAD.LNK ‘

KANKYOU.OBJ
LADHI.OBJ
LADL0W1.OBJ
LADL0W2.0BJ
LADL0W3.0BJ
MESSAGE.OBJ
DATA.OBJ
SYMBOL.OBJ

7-22
7.4 UNKER

(2) Starting the JXLLINK

JXLLINK HLE1.LNK [FILE2] [ENTER]

•Description of parameters: i[
FTLE1: Link module designation file name (input)
FILE2: Binary file name (output)
Entry for the items in [ ] can be omitted.
If the entry is omitted for F1LE2, the same file name as FILE1 is assigned.
(!

•If only “JXLLINK” is input, the guide messages for inputting the parameters is dis¬
played.

7.4.3 Linker Output File

The result of link by the execution of “JXLLINK” is generated in one output file.

Example: JXLLINK YELAD.LNK[ENTER]

Output file
YELAD.BEN Ladder execution file

i!

7-23
7.5 REMOTE CONTROLLER OPERATION

By using the JXPCCOM, communication between the personal computer and PLC is pos¬
sible.

7.5.1 Connecting the JXSD to PLC .

Connect the CN3 port in the JXSD to the standard RS-232C port in the PLC. It is not neces¬
sary to use the SWITCH command to set the communication parameters; they are automati¬
cally set at the start up of the JXPCCOM.

Connection between Personal Computer and JXSD (CN3):

Personal JXSD (CN3)


Computer
TXD TXD
RXD RXD

RTS RTS
CTS . CTS
DSR DSR

DTR DTR

7-24
7.5 REMOTE CONTROLLER OPERATION

i.

7.5.2 Starting the Remote Controller

JXPCCOM [ENTER]
By the entry as indicated above, the start-up screen is displayed and the JXPCCOM waits
for the key entry. i

(1) PLC Status Display Area


ROM STATUS: VERSION NUMBER:
RAM STATUS: VERSION NUMBER:
LADDER RUN STATE:
. NUMBER OF
EXPANSION SYMBOLS:

r
.!

(2) Operation Guide Display Area

r
i
(3) Message Display Area

(4) Function Keys

OBJ BITMIM END RUN


DOWN
[CLR! STOP

Fig. 7.3

I

t
II

'i

7-25
7.5.3 Description of Screen Display Information

(1) PLC Status Display Area

In this area, the status of PLC is displayed at the start-up of JXPCCOM and at the
completion of operation.

© ROM STATUS.
VALID: Ladder program exists in the flash ROM.
INVALID: Ladder program does not exist in the flash ROM.

© RAM STATUS
VALID: Ladder program exists in the RAM area used for editing.
INVALID: Ladder program does not exist in the RAM area used for editing.

(D VERSION NUMBER -
The versionnumber of the stored data is displayed only when the contents of edit¬
ing RAM are correct.

® LADDER RUN STATE


STOP: Ladder program is stopped.
RUN: Ladder program is run.

© NUMBER OF EXPANSION SYMBOLS


The number of expansion symbol cases stored in the ladder edit RAM area.

i (2) Operation Guide Display Area

Guide messages for key entry are displayed when key operation becomes necessary due
to pressing a function key.

(3) Message Display Area

The results of operation having been conducted according to the guide messages are
displayed.

7-26
7.5 REMOTECONTROLLER OPERATION

'!
•J

(4) Function Keys

The function keys are used to select the operation.

® OBJ TRANSFER
.i
The operation mode enters the downloading of the ladder object files to the PLC.
-
© BITMEM CLR
The bit memory is cleared to “0”. '

® END : *i

The operation quits the PCCOM. li. .


® EDIT
The operation mode enters the ladder edit mode.

© RUN STOP J
The operation mode enters the mode for switching run/stop of the ladder.

ir

7-27
4
7.5.4 Operation of Remote Controller

(1) Downloading the Object Files

Use the procedure indicated below to download the object files.

(D Press the [OBJ DOWN] function-key.


The following screen is displayed.

ROM STATUS: Mounted VERSION NUMBER: JXSD Ladder 1


RAM STATUS: Valid VERSION NUMBER: JXSD Udder 2
LADDER RUN STATE: Stopped NUMBER OF
EXPANSION SYMBOLS: 0

:
Input Binary File Name

Name:

- Execute with [ENTER] (Cancel with [ESC])

(4) Function Keys


OBJ
DOWN
ROM END RUN
STOP

>-28
'!
7.5 REMOTE CONTROLLER OPERATION

© Designate the file name of the object file to be downloaded.


The file which has been output by the linker can be designated.

Example: B : LADTEST.BIN a

It is not allowed to omit the extension “.BIN” in the designation of a file name.
Press the [ESC] key to return the screen to the start-up screen.

ROM Status: Mounted Version Number: JXSD Ladder 1


RAM Status: Valid VersionNumber JXSD Ladder 2
if Number oi
Ladder Run State: Stopped Expansion Symbols: 0

Select the write data

LadderProgram
LadderTabte
Symbol Table

Select and specify [SPACE] with the cursor keys [t] and []].
Execute with [ENTER] and cancel with [ESC],
Function Keys
OBJ RUN
DOWN,
R •i
END
STOP

© Designate the data to be downloaded.


Move the cursor to the data to be downloaded by using the cursor up/down keys
and press the space bar. j •
The data displayed in highlighted characters are downloaded.
Selection by the space bar is toggle.!
i,
The data actually downloaded in response to the selection of the data name on the
screen are indicated below. !
t
•Ladder Program Specification
New/old ladder classification
Low-speed scan ladder stop count \
High-speed scan ladder
Low- speed scan ladder
Conversion ladder
Label ladder
Version number
•Ladder Table Specification
Conversion table
Message table
•Symbol Table Specification

7-29
® In the first downloading operation, all of the data that are used for the operation
must be transmitted. If conversion data and message data are used, it is necessary
to transmit the ladder table in addition to the ladder program.

The operation procedure to be followed when transmitting the ladder table in addi¬
tion to the ladder program is indicated below.

Move the cursor to “Ladder Program”


(The “Ladder Program” will be highlighted.)

1
Move the cursor to “Ladder Table”.

i
Press the space bar.
(Both the “Ladder Program” and “Ladder Table” are highlighted.)

1
Press the [ENTER] key.
(Download starts. The following message appears in the message display area.
“SENDING OBJECT’)

1
Downloading is complete if the following message is displayed.
“ENDED NORMALLY”

© If the ladder is modified after it has been downloaded, only the modified data re¬
quire downloading.

J
If the contents of the ladder program are modified while the conversion data and
the message data remain unchanged, only the ladder program should be down¬
loaded and it is not necessary to download the ladder table.

© After the completion of downloading, RAM Status information and the informa¬
tion of Number of Expansion Symbols will be changed.

7-30
•I
7.5 REMOTE CONTROLLER OPERATION

(2) Run/Stop of Ladder

By pressing the [RUN STOP] function key, operation starts. If this function key is
pressed after the execution of the ladder has started, it is stopped. Conversely, when
it is pressed while the ladder execution is stopped, it starts.

After the execution, the Ladder Run State information is changed.

The procedure to run the ladder while the ladder stop status is indicated below.

® Press the [RUN STOP] function-key.


The following screen is displayed.

ROM STATUS: Mounted VERSION NUMBER: JXSD Ladder 1


RAM STATUS: Valid VERSION NUMBER: JXSD Ladder 2
LADDER RUN STATE: Stopped NUMBER OF
EXPANSION SYMBOLS: 0

Run ladder

Run with [ENTER] (Cancel with


[ESC])

OBJ
F
t
DOWN

!l
© Press the [ENTER] key.
\
Operation is complete if “ENDED NORMALLY” is displayed in the message dis¬
play area. The Ladder Run State information changes from “Stopped” to “Run”.

The screen returns to the start-up screen when the [ESC] key is pressed.

7-31
(3) Clearing the Bit Memory

The operation starts in response to pressing the [BITMEM CLR] function-key. After
the execution,' the bits of the I/O signals and the internal relays are cleared to “CT.The
operation procedure is indicated below.

© Press the [BITMEM CLR] function-key.


The following screen is displayed.

ROM STATUS: Mounted VERSION NUMBER: JXSD Ladder 1


RAM STATUS: Valid VERSION NUMBER: JXSDLadder2
LADDER RUN STATE: Stopped NUMBER OF
EXPANSION SYMBOLS: 0

Clear bit memory to 0.

Execute with [ENTERKCancel with [ESC]) -

OBJ END RUN


DOWN
R STOP

© Press the [ENTER] key.

J
Operation is complete if “ENDED NORMALLY” is displayed in the message dis¬
play area.


7-32
7.6 UST OF ERROR MESSAGES AND WARNING MESSAGES

7.6 LIST OF ERROR MESSAGES AND WARNING MESSAGES


7.6.1 Error Messages
l-line characters over
Illegal character is used.
Over the nest of source-file.
Illegal character is used instead of pseudo-instruction.
A pseudo-instruction is used duplicatedly.
’ENDP’ cannot be found.
Characters of a word is too long.
*
Invalid operator.
Object-file memory size over.
Operand of an instruction is not enough.
Operand-address is not correct.
Operand-byte-data is not correct.
Operand-word-data is not correct.
Label define error.
SUBP number is not correct.
Label define error.
Total number of defmed-label exceeds 256.
Stop-count-setting-range is not correct.
Table-number define error.
Table-number-setting-range is not correct.
Character data define error.
Character data range define error.
Character data lines over.
Variable number error.
Out instruction address range over.
Timer-register range error.
Number of MCR & END is unmatch.
Byte data define error.
Word data define error.
Data range define error.
Number of Operands are too large, or Include valid characters.
Nest of MCR over.
There is no version number character.
Duplicatedly define of label-characters.
JUMP & CALL are used too much.
Duplicatedly use of variable number.
Stop-count of low-speed-scan must be defined.
]
:
t
Symbol-case-number exceed 6500.
SUBP calling sequence error.
Number of SUBP & PUSH is unmatch.
Nest of STR over. i
Number of stack instruction by STR is not correct.
SUBP parameter error.
Operand double word data error.
Nesting filr open error.
7.6.2 Warning Messages
Output contact of OUT-instruction is defined duplicatedly.
Symbol-case-number exceed 5000.

7-33
t

*
i

* *

» /

»
1

*
i

i
8
ONLINE EDITING

Chapter 8 describes online editing operation.

8.1 OUTLINE OF ONLINE EDITING . 8-2


I

8.2 FUNCTION TREE AND DISPLAY


SCREENS 8-4

8.3 LADDER DISPLAY FUNCTION 8-6

8.4 NET EDITING FUNCTION 8-10

8.5 TABLE EDIT FUNCTION 8-38


8.6 INPUT/OUTPUT FUNCTION ... 8-43
'
1
8.7 SEQ STS (SEQUENCE STATUS)
FUNCTION.....!.., 8-47

8.8 LIST OF MESSAGES 8-51


k
i
|l

8-1
8.1 OUTLINE OF ONLINE EDITING

It is possible to edit the sequence ladder directly at the NC operation panel instead of using
a personal computer. Sequence ladder edit operation procedure differs slightly depending
on whether the sequence ladder is newly created or the sequence ladder is created based on
the existing sequence ladder.

8.1.1 Creating a Sequence Program Newly

The sequence program development flow chart for newly creating a sequence program is de¬
scribed below. ,
| After setting 2SW on JCP01 to*4”.tumthepowerON.

|
I
Press the [INITI] function soft-key. ]
~T
| Cany out editing operation.

I
Error?
YES

j NO
| Select the run mode tor the sequence program.

I
Error?
YES

|NO
I Run and check the sequence program.
r YES
{ Bugs?
I
NO .
| Completion of sequence program creation

The following processing is executed when the (MITT] function soft-key is pressed.

© '
“TEST’ is set for “VERSION”.

© “3” is set for “LOW-SPEED STOP COUNT’.

© Sequence area is cleared and the following program is inserted automatically from

i
the beginning.

•HIGHSEQUENCE
•RTH
•ENDP
•LOWSEQUENCE
•RET
•ENDP

© The message data area is cleared.

© The conversion data area is cleared.

© The symbol data area is cleared.


8-2
;
8.1 OUTUNE OF ONLINE EDITING

8.1.2 Creating a Sequence Program by Modifying the Existing Sequence Program

The operation steps to be followed when creating a sequence program by modifying the ex¬
isting sequence program are described below.

After setting 2SW on JCP01 to “4", turn the powerON.

1
Carry out editing operation.

YES
Error?
!>
I NO
Select the run mode for the sequence program.

<: YES
\ Error? )
I NO
I Run and check the sequence program.

YES
( Bugs? )
I NO
Completion of sequence program creation

'!
)

I!
i
I
.•

8-3
8.2 FUNCTION TREE AND DISPLAY SCREENS

8.2.1 Function Tree


The tree of functions called by selecting the ladder job are indicated below.

Conditions for Calling Up


Function Display
the Function
F1 LADDER F1 LADDER F1 BT/TOP
" In sequence program
Alwaysdisplayed
— F2 SYMDSP debug mode

— F3 NETSEL

— F4
— F5 GO/STP

— F2 NETEDT

— 'F2 "ÿ

If
— F4
— F5
— F3 TBLEDT ,F1 CNVTBL

— F2 MSGTBL

— F3 SYMTBL
While the JPXCCOM
While the JPXCCOM is
— F4 not connected.
is not connected with
sequence program
stopped.
— F5
— F4
— F2 .

— F3
A — F4
— F5
— F5 SEQSTS F1

— F2 INIT!

F3

— F4
F5

8-4
8.2 FUNCTION TREE AND DISPLAY SCREENS

it

8.2.2 Ladder Display Screen i


;

An example of the ladder display screen is shown in Fig. 8.1.


1
Displays the net number of the ladder at the top line in the presently displayed ladder.
/ Displays the number of selected nets.
Displays the sequence pro¬
LADDER
NET-NO.: 1
MNT
I SEL COUNT: Ol
/ O***** NOOOOO
<DSP> <STOP>
gram execution status (run/
stop). _
AAAAA -j Displays the symbol name of #10000. [
~ O Displays the selected mode:
#10000. I, #11001 DSP (display)
CHG (change)
Displays the status of contact.
INS (insert) _
#10001 Displays attribute when the contact is ON.
I
BBBBB
II MV1 | #700 | 30H [ ” 0“ > | Displays 5 lines of ladder ]
#10002 ' #11002

#10003
CC
??c
#10004
O
#11003

MEM ‘ STP LSK


PARAM IN/OUT IN/OUT DATA LADDER
LADDER NETEDT TBLEDT SEQSTS l
Displays a maximum of 13 points of contacts.

Fig. 8.1 Ladder Display Screen

if
. ii
II

i
i
'i

f.

8-5
8.3 LADDER DISPLAY FUNCTION

The ladder display function displays the sequence program stored in the NC in ladder form."
One line of ladder can contain a maximum of 13 contacts; the maximum number of contacts
that can be displayed in a sequence ladder is 100. There are no limits on the number of lines
as long as the maximum number of contacts is within the limit.

Each instruction indicated in Table 8.1 is counted to have the specified number of contacts.

Table 8.1 List of Instructions That Have Multiple Number of Contacts


Number of Number of Number of
Instruction Instruction Instruction
Contacts Contacts Contacts
INR 2 ANR 3 CMRW - 2
DCR 2 ORR 3 CORW 3
CLR 2 XRR '
3 CPRW 3
CMR 2 CPR 3 . MVTW 3
ADI 3 COR 3 DSTW 3 ‘

SBI 3 MOV 3 JMP 2


ANI 3 DST 3 ADR - 2_ •

ORI 3 DIN 4 IPSH 2


XRI 3 ADC 3. APSH 2

DEC . 3 ADDW . 3 . PUSH .2


'
COI - 3 SUBW 3 TPSH 2
CMP '
3 MULW 3 IPSHD 3
CPI 3 DIVW 3 TMR 3
MVI 3 INRW 2 TIM 3
ADD 3 DCRW 2 SUBP 3
SUB 3 CLRW 2

8.3.1 BT/TOP (Bottom/Top) Function

The function searches and displays the top line or the bottom line of the sequence ladder.

A 8.3.2
This key is a toggle.

SYM DIS (Symbol Display) Function

This function displays the symbol name of the contact which is set by the symbol pseudo
instruction “SYMBOL”.

This key is a toggle - each time the key is pressed, the symbol display is given and cleared.

8-6
8.3 LADDER DISPLAY FUNCTION

8.3.3 NET SEL (Net Selection) Function

The function displays only the selected nets. This function is used when the nets to be refer¬
enced are separated from each other so that displaying them on one display page is impossi¬
ble. ::

This function is executed in the following procedure.

0 On the sequence ladder display screen, press the [WR] key when the net number
to be selected is displayed.
'}

© The selection symbol (see Fig. 8.2) is displayed and the net is set in the selected
status.

Selection is possible for up to ten nets. If an attempt is made to select the net ex¬
ceeding this limit, a warning message is displayed.
“SELECTION OVER”
© Press the [NET SEL] function soft-key.

© While the selected nets are collected, the message “COLLECTING” is displayed.
After the completion of net selection, the ladder of the collected nets is displayed
and the message is cleared.

© Press the [NET SEL] function soft-key once again, and the screen returns to the
normal sequence ladder display screen.

tfl> The selected status of the nets is cleared when the power is turned OFF.

LADDER MNT O***** NOOOOO


NET-NO.: 1 SEL COUNT: 1 » <DSP> <STOP>

i if
#10000
i #11001

I
Selection symbol I
#10001

If MV1 #700 30H


#10002 5 #11002
'I
#10003 V

If
#10000 #11003

MEM it STP LSK


PARAM IN/OUT IN/OUT DATA LADDER
BT/TOP SYMDSP pjNETSEL • GO/STP

Fig. 8.2

8-7
8.3.4 GO/STP (Run/Stop) Function
By using the [GO/STP] function soft-key, the sequence program execution (run, stop) can
be controlled.
At the start of sequence program execution, correctness of the sequence program is checked.
During this check, the message “LADDER CHECKING” is displayed. If an error is found
during this check, the sequence program cannot be executed even if the [GO/STP] function
soft-key is depressed. The content of the error found during the check is displayed by the
corresponding warning message.
Note that the [GO/STP] function soft-key is not valid while the NC is running.
After the start of the sequence program; message <EXEC> is displayed on the screen.

PLC processing flow at the start of sequence program execution

Checking the correctness

I
< Error?

NO

Calculating the total sum


\ YES '

f
Start of sequence program execution Sequence program execution stop

LAODER MNT O***** NOOOOO


NET-NO.: 1 SEL COUNT: 0 <DSP> <STOP>

#10000
| #11001

#10001

A #10002

#10003
j
MV1 | #700 | 30H
#11002

H
#10000 #11003

MEM
LADDER CHECKING 1 STP LSK
PARAM 1N/OUT IN/OUT DATA LADDER
BT/TOP SYMDSP NETSEL GO/STP

Fig. 8.3

8-8
8.3 LADDER DISPLAY FUNCTION

'i

(1) Checking the Correctness of Sequence Program

Before the execution of the sequence program, its correctness is checked.

Table 8.2 Sequence Program Correctness Check


No. Check Items Description
1 JMP - ADR correspondence check There must be an ADR entry corresponding to JMP
instruction.
Warning message: A pair of JMP and ADR designation must exist within
NO JMP-ADR the program of the same processing type (high-speed
scanor low-speed scan).
2 SUBP calling up sequence check The order and argument of the following are checked:
APSH, TPSH, IPSH,IPSHD, and PUSH
Wamingmessage: The third argument of SUBP023 must be either “1” or
SUBP CALL ERROR T-
i
If an error is found in the correctness check, the sequence program is not executed.

When the execution status shifts from “stop” to “run”, the total sum value is created in
addition to the correctness check. The total sum value can be confirmed by the SEQ
information function.

li

:
I

fc

8-9
8.4 NET EDITING FUNCTION

When the [NETEDT] function soft-key is pressed after placing the sequence program in the
stop status, the pop-up menu showing the net edit items is displayed as shown in Fig. 8.8.

The objective of the net edit function is the net number (NET-NO) displayed at the upper left
part in the screen. The net number indicates the net presently displayed on the screen.

LADDER MNT O***** NOOOOO


NET-NO.: 1 SEL COUNT: 0 <DSP> <STOP>

#10000

#10001.
I CHG
INS
DEL
, #11001

#10002

#10003
I •
#11002

#10004 #11003

MEM STP LSK


PARAM DIAGN IN/OUT DATA CLAPPER
LADDER NETEDT TBLEDT SEQSTS

Fig. 8.4 Net Edit Function Screen

1. During the execution of a sequence program, if the objective of editing is either the
RTH or RET instruction, editing (change, insert, delete) is not allowed. If the [NET
EDT] function soft-key is depressed during the execution of a sequence program,
the following warning message is displayed.
“LADDER CHECKING”
2. The contact status is not displayed during net editing.

8-10
8.4 NET EDITING FUNCTION

8.4.1 Selection of Edit Mode

When selecting an edit item, either a net edit key or an action key on the NC operation panel
can be used.

(1) Selecting the Edit Mode by Net Edit.Key

Select the net edit mode from the menu items in the pop-up menu.

Net edit items:


CHG (change): This mode is used to change the net.
INS (insert): This mode is used to insert a new net.
DEL (delete): This mode is used to delete an existing net.

(2) Selecting the Edit Mode by Action Key on the NC Operation Panel
*
Selection of an edit mode is possible without displaying the pop-up menu screen. To
clear the pop-up menu from the screen, press the [NET EDT] ftinction soft-key once
again.

Without using the pop-up menu, changeÿ insert, and delete modes can be selected by
using the action keys on the NC operation panel.

[ALT] key: This selects the change mode.


[INS] key: This selects the insert mode.
[ERASE] key: This selects the delete mode.

8-11
(3) Description of the Edit Modes

(a) Change mode


In this mode, a selected net can be changed. When the change modeis selected, change
is possible for one selected net. If the change mode is selected while the net number
“1” is displayed on the screen (NET-NO: 1) as in Fig. 8.4, the screen displays only the
ladder of net number “1” as shown inFig. 8.5. The shaded block in this screen indicates
the edit cursor (blinking). When the change mode screen is displayed first, the cursor
appears at the contact displayed in the upper left area and the mode indication changes
to<CHG>.

LADDER MNT . O**'***. NOOOOO


NET-NO.: 1 SEL COUNT: 0 <DSP> <STOP>
m 11 _____ The cursor
moves

SrJ IS *11001
area.

a
#IOOC:
M

MEM STP LSK


PARAM DIAGN . IN/OUT DATA LADDER

Fig. 8.5

8-12
8.4 NET EDITING FUNCTION

(b) Insert mode


J

In this mode, a new net is inserted preceding the selected net. When the insert mode
is selected, the edit screen is opened for insertion operation. Since anew net is inserted,
the opened screen does not show the ladder and the mode indication changes to <INS>.

LADDER MNT O***** N00000


NET-NO.: 1 SEL COUNT: 0 <DSP> <STOP>

MEM STP LSK


PARAM DIAGN IN/OUT DATA LADDER

Fig. 8.6
5.

8-13
<c) Delete mode
In this mode, the selected net is deleted. At the mode display area, <DEL> is displayed.
The “DELETING” is displayed.
Figs. 8.7 and 8.8 show the delete mode screens before and after the deletion of a net.
Upon completion of deletion, the new ladder chart is displayed with the following mes¬
sage displayed.
"DELETION COMPLETED”
Operation for deletion:
Select the contact to be deleted by moving the cursor onto it, select DEL pop-up menu
and press the [WR] key. This deletes the selected contact.

LADDER MNT O***** NOOOOO


NET-NO.: 1 SEL COUNT: 0 <DSP> <STOP>

If
#10000 CHG #11001
INS
#10001 mmm
I!
#10002' #11002

#10003

u
#10004 #11003
DELETION COMPLETED
MEM STP LSK
PARAM DIAGN IN/OUT DATA LADDER
LADDER NETEDT TBLEDT . SEQSTS

Fig. 8.7 Delete Mode Screen (Before Deletion)

8-14
8.4 NET EDITING FUNCTION

LADDER
NET-NO.: 1

Ibn
#10002
MNT
SEL COUNT: 0
O
----
<DSP>
NOOOOO
<S70P>

#11001

#10001

II—I
#10002 #11002

#10003

#10006 #11003

MEM STP LSK


PARAM DIAGN IN/OUT DATA LADDER
LADDER NETEDT TBLEDT SEQSTS

Fig. 8.8 Ladder Display Screen (After Deletion)

8.4.2 Keys Used for Editing the Ladder

The net edit screen is displayed when either the insert or the delete mode is selected. On the
net edit screen, editing is possible for one net.

A contact instruction can be input by using a function soft-key. The same restrictions as ap¬
plied for displaying the ladder are also applied for editing the ladder: a maximum of 13 con¬
tacts in one line, no limitations on the number of lines in the vertical direction, and the maxi¬
mum of 100 contacts. If the number of contacts exceeds 100, the following warning message
is displayed.
“CONTACT OVER”
If the number of contacts exceeds the limit, reduce the number by dividing the net into two
or more nets or some other appropriate method and create a net again.

Register instructions other than contacts can be input in the conversational mode by entering
the first character of the instruction. To input contacts and register instructions, move the
cursor to the position where the input is possible. If an attempt is made to input them at a
position where input is not possible, the following warning message is displayed. In this
t
case, move the cursor to the position where die input is permitted and input them again.
“INPUT ERROR”
In the net edit mode (change or insert), the following function soft-keys are provided as the
secondary function soft-keys.
] I HE- I l -o- 1 1 — I [ ]
F1 F2 F3 t F4 F5

8 - 15
The functions of the keys are indicated below.

(1) Cursor Keys

© Cursor up key: Moves the cursor up by one line.


If the cursor is in the top line in the net, the cursor does not
move even if the cursor up key is pressed.
© Cursor down key: Moves the cursor down by one line.
If the cursor is in one line below the bottomline in the net,
the cursor does not move even if the cursor up key is
pressed.
© Cursor right key: Moves the cursor right to the next device.
If the cursor right key is pressed when the cursor is at the
right hand end position, the cursor moves to the left hand
end position.
© Cursor left key: Moves the cursor left to the next device.
If the cursor left key is pressed when the cursor is at the left
hand end position, the cursor moves to the right hand end
position.

A y

8-16
J
8.4 NET EDITING FUNCTION

(2) Function Soft-keys

® —H— : Replaces theblock where the cursor is positioned with the NO con¬
tact.
If this key is pressed when the cursor is positioned on the block
whichincludes a register instruction, the remaining block is deleted
as indicated below.
-1 ADD | #7000 | #7002 -
|
© —j/(— : Replaces theblock where the cursor is positioned with the NC con¬
tact.
If this key is pressed when the cursor is positioned on the block
which includes a register instruction, the remainingblock is deleted
as indicated below.
-1 ADD j #7000 | #7002 Hf-
© —O— : Replaces the block where the cursor is positioned with the OUT
coil.
If this key is pressed when the cursor is positioned on the block
whichincludes a register instruction, the remaining block is deleted
as indicated below.
Note: An OUT coil can be input only at the 13th contact. If it is
input at any other position, an error occurs and “INPUT ER¬
ROR” message is displayed.
-1 ADD | #7000 | #7002 ~[-
® - : Replaces theblock where the cursor is positioned with a horizontal
line “ -”.
If this key is pressed when the cursor is positioned on the block
whichincludes a register instruction, the remaining blockis deleted
as indicated below.

-1 ADD | #7000 j #7002 ~\-


If this key is pressed when the cursor is positioned on the block of

ADD j #7000

the horizontal line “ - ”, the horizontal line is deleted.
| ’! #7002
~
-
I
J

8-17
© : Draws a vertical line on the block where the cursor is positioned and
also on the block above this block.
How the vertical line is drawn is explained below:
If a vertical line does not exist in the upper right of the cursor, a ver¬
tical line is drawn.

HH 3
If a vertical line exists in the upper right of the cursor, the vertical
line is deleted.
-HH • —\[
HH
Display method of a vertical line varies depending on the cursor
position and the information of thelines drawnabove andbelow the
cursor.
For details, refer to 8.4.4, “Inputting Vertical and Horizontal
Lines”.

(3) Other Key

© ERASE: Deletes the instruction on which the cursor is positioned.

8-18
8.4 NET EDITING FUNCTION

8.4.3 Inputting Contacts • i


*:
(1) Inputting Contacts
I
© When a function soft-key representing a contact is pressed, the message asking the
input of the contact (switch) number is displayed as shown in Fig. 8.9.
:

NETEDT MEM O***** N00000


NET-NO.: 1 SEL COUNT: 0 <INS> <STOP>

il

INPUT SWITCH NUMBER


MEM ! STP LSK
PARAM DIAGN IN/OUT DATA LADDER.

Fig. 8.9 Contact Input Screen

© Input the contact number.


(D The relationship between the contact instruction and the registers that can be input
is indicated below.

: #1000 to #1063, #3500 to #3699, #7000 to #7999


1/
:
'
t
#1400 to #1699, #1800 to #2999
—ft—
:
#3000 to #3159, #7000 to #7999, #1100 to #1163
#1200 to #1299, #1400 to #1699, #1800 to #2999
J
If a contact number which does not correspond to the designated contact instruc¬
tion is input, an error occurs and the following warning message is displayed.
L
“INPUT ERROR”
If this warning message is displayed, check the contact number again and input the
correct one.

8-19
(2) Example of Contact Input

(T) When any of function soft-keys f1,f2, or f3 is pressed, the screen gives the message
requiring the input of the contact number. Key-iri a contact number and press the
;
[WR] key.to input the contact number.

When inputting a contact number, it is riot necessary to input “#”.


Examples:
10000 [WR]: Correct input
#10000 [WR]: Incorrect input (input error)
(2) When a contact number is input correctly, the highlighted function soft-key returns
to the normal display.
To cancel the input during key operation, press the [RST] key.

NET EDT MEM o* NOOOOO


NET-NO.: 1 SEL COUNT: 0 <INS>**** <STOP>

. MEM [ ;
INPUT SWITCH NUMBER ]
10000. STP LSK
PARAM DIAGN IN/OUT DATA LADDER
3E
Fig. 8.10 Contact Input Screen

J “

• 8-20
1

8.4 NET EDITING FUNCTION

(3) By the key operation of [1][0][0][0][0][WR], the LD instruction is input and the
contact number is input correctly. The cursor position is not changed before or af¬
ter the input of the LD instruction.

NET EDT MEM ’ O***** N00000


NET-NO.: 1 SEL COUNT: 0 <INS> <STOP>

#10000

MEM INPUT SWITCH NUMBER


STP LSK
PARAM DIAGN IN/OUT DATA -

Fig. 8.11 Screen Display after Inputting LD Instruction {#10000)

8-21
8.4.4 Inputting Vertical and Horizontal Lines

By using the- function soft-keys [ - ] or [ ], a vertical line or a horizontal line can


be input at the cursor position.

When inputting a vertical line, the content of line display varies depending on the cursor
position and the instructions existing around the cursor. How the vertical line is input is
shown below.

After the correct input of the vertical or horizontal line, the input instruction is reflected to
the ladder chart. The cursor position is not changed before or after the input of the vertical/
horizontal line.

The example of the screen below shows the vertical line input operation.

Since a horizontal line'does not exist in the upper right of the cursor, the verticalline is drawn
upward.

NET EDT MNT O***** Nooooo


NET-NO.: 1 SEL COUNT: 0 <INS> <STOP>

—| |-j MV1 | #7000 | 30H |-


#10000
Cursor position

MEM-
STP . LSK

A
PARAM DIAGN IN/OUT DATA LADDER
3E -o-

Fig. 8.12 Drawing a Vertical Line

8-22
ti

8.4 NET EDITING FUNCTION

8.4.5 Inputting Register Instructions

By keying in the first letter of a register instruction, pop-up menu for the selection of the reg¬
ister instruction appears on the screen.

(1) items Given in Pop-up Menu

The items displayed in the pop-up menu are indicated in Table 8.3. In response to the
character keyed-in to the key buffer area, the corresponding list of register instructions
is displayed in the pop-up menu. Select the required instruction by moving the cursor
on it and press the [WR] key. The required register instruction can be written in this
manner.

Table 8.3 List of Register Instructions Displayed in Pop-up Menu


Keyed-in
Corresponding Register Instructions Displayed in Pop-up Menu Quantity
Character
A ANI, ADI, ADD, ANR, ADC, ADDW, ADR, APSH 8
CLR, CMR, COI, CMP, CPI, CPR, CIR, CLRW, CMRW, CORW,
C 11
CPRW
D DCR, DEC, DST, DIN, DIVW, DSTW, DCRW 7
I INR,INRW, IPSH, IPSHD 4
M MVI, MOV, MULW, MVIW, MCR 5
SUB, SBI, SUBW, SET, SUBP3, SUBP4, SUBP5, SUBP6, SUBP7,
SUBP9, SUBP11, SUBP14, SUBP17, SUBP18, SUBP23, SUBP25,
S 26
SUBP27, SUBP31, SUBP32, SUBP34, SUBP35, SUBP36, SUBP37,
SUBP38, SUBP39, SUBP40 ;
T TIM, TMR, TPSH 3
O ORR, ORI 2
X XRI, XRR, XOR, XNR 4
l;

8-23
(2) Contents of Pop-up Menu

The pop-up menu displayed in response to the keyed-in character is indicated below.
In the pop-up menu, it is not possible to move the cursor to the empty area.

[A] [C] [D] .ra [M]


ANI CLR OCR INR MV1
ADI CMR DEC INRW MOV
ADD COI DST IPSH MULW
ANR CMP DIN IPSHD MVLW
ADC CPI DIVW MCR
ADDW CPR DSTW
ADR COR DCRW
APSH CLRW -

CMRW
'
CORW
CPRW

IS] . m [O] [X]


SUB SUBP23 TIM ORR XRI
SBI SUBP25 TMR ORI XRR
SUBW, SUBP27 TPSH XOR
SET SUBP31 XNR
i SUBP3 SUBP32
SUBP4 SUBP34
SUBP5 SUBP35
SUBP6 SUBP36
SUBP7 SUBP37

A SUBP9
SUBP11
SUBP14
SUBP17
SUBP17
SUBP38
SUBP39
SUBP40

SUBP18

8-24
(
:
8.4 NET EDITING FUNCTION

If the following characters are keyed-in, the pop-up menu is not displayed but the corre¬
sponding instruction is input.

N: NOP
E: END
J: JMP
P: PUSH
i'
R: RTI

(3) Register Instruction Inputting Procedure

® Key-in the first character of the register instruction to be input.


The pop-up menu screen is displayed.

(D Move the cursor to the required register instruction and press the [WR] key.
When the register instruction is input, the next pop-up menu screen is displayed
for the input of the necessary operand. Input the contact number, register number,
or numeric value.

Note that it is not necessary to input “#” when inputting a register number.

® Press the [INS] key to insert the input register to the ladder.

i1

8-25
(4). Example of Input - MVI Instruction

The operation and screen display are explained below using the input of MVI instruc¬
tion as an example.

(J) Key-in “M” to the key buffer area. .


The pop-up menu showing five instructions beginning with “M” is displayed. The
character “M” which has been keyed-in is not displayed in the key buffer display
area.

To cancel the pop-up menu, press the [RST] keyÿ

NETEDT MNT O***** N00000


NET-NO.: 1 SEL COUNT: 0 <INS> <STOP>

MVI
MOV
#10000 MULW
MVIN
MCR

MEM
STP LSK
PARAM DIAGN IN/OUT DATA LADDER

Fig. 8.13 Pop-up Menu Screen after Keying-in “M”

8-26
8.4 NET EDITING FUNCTION

© The MVI instruction format is displayed in the pop-up screen when “M” is input.

Select the instruction to be input from the pop-up menu by moving the cursor onto
it and then input the numbers by using the keyboard.
The screen given below is an example of a screen when the MVI instruction is se¬
lected. If another instruction is, selected, the pop-up screen meeting the input
instruction is displayed. ti

After inputting the operand, depress the [INS] key to insert the input instruction
to the ladder. If the operand has been input correctly, the input instruction is in¬
serted to the ladder and displayed in the manner as shown in Fig. 8.20. However,
if the operand has not been input correctly, the following warning message is dis¬
played.
“INPUT ERROR”
The system enters the state where the input of operands is waited for.
To cancel this operand input waiting status, depress the [RST] key.

NETEDT MNT O***** NOOOOO


NET-NO.; 1 SEL COUNT: 0 <INS> <STOP>

MVI
MOV
#10000 MULW
MVIN
MCR

j MVI #[7000].[30]H

MEM
STP LSK
PARAM DIAGN IN/OUT DATA LADDER
l
Fig. 8.14 MVI Instruction Input Screen

8-27
© Press the [INS] key.
The input instruction is inserted to the ladder in the manner as shown in Fig. 8.15.
The cursor position remains unchangedbefore or after the input of theMVIinstruc¬
tion.
NETEDT '
MNT ; O***** N00000
NET-NO.: 1 SEL COUNT: 0 . <INS> <STOP>

-HI—iÿigKfTogo.ÿpQHlh
#10000

MEM
STP LSK
PARAM DIAGN IN/OUT DATA LADDER

Fig. 8.15 Ladder Display after Inputting MVI Instruction

8-28
8.4 NET EDITING FUNCTION

•>
i

(5) Operand Input Pop-up Box Screen

(a) Types of operand input pop-up boxes


Depending on the input register instruction, the corresponding operand input pop-up
box appears on the screen.

For the operands, check is made whether or not the input is allowed.

© JMP [1] JMP, ADR


© n>SH[7000] tPSH, IPSHD, SUBP
© INRW N [7000] INR, DCR, CLR, CMR, INRW, DCRW,
CLRW, APSH, PUSH, XOR, XNR
® INRW N [9023] TPSH
© CPI # [7000], # [ ]H TMR, ADI, SBI, ANI, ORI, XRI, DEC,
COI, CMP, CPI, MVI
© ADDW# [7000], #[ ] TIM, ADD, SUB, ANR, ORR, XRR, CPR,
COR, MOV, ADC, ADDW, SUBP, MULW,
DIVW, CORW, CPRW, MVIW
© DIN # [7000], # [7000], [ ]H DST, DIN, DSTW

(b) Registers that can be input \


The registers that can be input in the operand input pop-up box for the individual regis¬
ter instructions are indicated in Table 8.4.

If a register outside the allowable range is input, the following warning message is dis¬
played.
'

“INPUT ERROR”

Table 8.4 Range of Registers that can be Input for Individual Register Instructions
i

Register Instruction Input Permitted Registers Range Group


TIM
TMR
TPSH

Other instructions
#1300 to #1399, #1700 to #1799
#1300 to #1399, #1700 to #1799
N9000 to N9323 1

#1000 to #1063, #1100 to #1163, #1200 to #1299


#1400 to #2999, #3000 to #3159, #3500 to #3699
B

C
A

I
:
,

, 8-29
(c) input range
With each register instruction, the input range is determined for individual operands.
If a value outside the allowable range is input, the following warning message is dis¬
played.
“INPUT ERROR”
The ranges of registers and reals that can be input for individual registers are indicated
in Table 8.5.

8-30
8.4 NET EDITING FUNCTION

Table 8.5 Range of Registers and Reals of Register Instructions


No. 1 Operand Check Range | No. 2 Operand Check Range
Instruction No. 3 Operand Check Range
(A, B, C = Range Group in Table 8.5)
TtM A 0-FFH
TMR A C
INR C
DCR C
CLR C
CMR C
ADI C 0-FFH
SBI C 0-FFH
ANI C 0-FFH
ORI C 0-FFH
XRI C 0-FFH
DEC C 0-FFH
COI • C 1 0-FFH
CMP C 0-FFH
CPI c 0-FFH
MVI C : 0-FFH
ADD C C
SUB C c
ANR C C
ORR C i C
XRR C C
CPR C C
COR C C
MOV C C
DST C C 0-FFH
DIN C C 0-FFH
ADC C C
ADDW C c
SUBW C c
MILW C c
DIVW c c
INRW C
DCRW C
CLRW C
CMRW c
CORW C
XOR C
XNR C !

I
CPRW c I_C
MVIW c ’10- FFFFH
DSTW C c 0- FFFFH
JMP Numeric value of 1 to 256
ADR Numeric value of 1 to 256
IPSH 0- FFFFH
APSH C
PUSH C
TPSH B
IPSHD -999999999 to 999999999
(I
5, 6. 7, 9, 11, 14, 17, 18,23,31,
SUBP 32, 34, 35, 36, 37, 38, 39

8-31
(d) Operand input procedure (decimal, hexadecimal)
In the operand input pop-up box, a real can be input in either decimal or hexadecimal.
If “IT’ is entered after entering a real, it is regarded as a hexadecimal number.

Examples: 64H_ Regarded as “100”


64. Regarded as “64” ,

(6) Moving the Cursor on the Register and SUBP Instructions

There are cases in whichthe cursor movement is not allowed when the register or SUBP
instruction is on the edit screen.

The cursor movement on the register or SUBP instruction is executed in the following
manner.

Table 8.6
Cursor Position Description on Cursor Display Position
When the cursor is positioned in the area within a
PUSH | #7000 |-
,. frame, cursor movement is possible only within the
instruction display area.

IPUSHD | 9999999 -1 PUSH | #7000 f


If the cursor up key is pressed,
the cursor moves to the posi¬
MOV | #7000 | #7100 tion as indicatedbelow.

#10001 miwaz
-1 DSTW | #7000 | #7100 -
| 10H | Cursor position

SUBP??

#10001 #10002

8-32
8.4 NET EDITING FUNCTION

(7) Patterns that does not Allow Register Instruction

Input of a register instruction is not allowed in the positions indicated below.

NETEDT MNT O***** NOOOOO


NET-NO.: 1 SEL COUNT: 0 <INS> <STOP>

O
#10000 #10000 1- #11001

#10000

If the number of contacts that can be input is two, the


registerinstruction that can be input is the one that has
up to two blocks. If a register instruction that uses
morethanthree contact is input, the warning message
of “Input error" is displayed.

MEM
i
STP LSK
PARAM IN/OUT DATA LADDER
DIAGN
HF t
Fig. 8.16 S

j!

!|

'i
fl

i;
i| I
•!

8-33
8.4.6 Canceling the Net Edit Function

It is possible to cancel (quit) the contents of net edit during editing. Key-in “Q” and press
the [WR] key.

8.4.7 Exiting the Edit Function

(1) Operation Procedure

(D Press a process, job, or function soft-key other than [NET EDT) to exit the net edit
function.
--"I {

When exiting the net edit function, the NC executes the check on the following six
items.

(D Check 1: Checking the connection status in one net


The NC checks whether all lines are connected. If the edit has been finished with
an open line remaining as shown below, the “NOT CONNECTED” error occurs.
Example 1: Net is not connected.

NET EDT MNT O*****- NOOOOO


NET-NO.: 1 SEL COUNT: 0 <INS> <STOP>

MV1 | #700 | 30H [


#10000
#11001

#10001

1 MEM

PARAM DIAGN IN/OUT DATA


STP
LADDER
LSK

Fig. 8.17 Line Disconnection Error

. 8-34
8.4 NET EDITING FUNCTION
)

Example 2: In the case of the ladder shown in Fig. 8.18, the ladder is not one net
and therefore connection error occurs.

NETEDT MNT O***** NOOOOO


NET-NO.: 1 SEL COUNT: 0 <INS> <STOP>

—| -
| j MV1 | #700 | 30H [
#10000 #11001

!
#10001

\
I

MEM
STP LSK
PARAM DIAGN IN/OUT DATA LADDER

;
Fig. 8.18 Incorrect Net (More than One Ladder)

(D Check 2: Start instruction check

The NC checks whether any of the instructions indicated below is designated at


the start of a net. If not, the “START INST ERR” is displayed.

CMP, DEC, PUSH, ADR, SET, RET, END, POP, IPSH, NOP, LD, LD-NOT,
TPSH, APSH, SUBP23, IPSHD
'

;i
@ Check 3: Double-instruction check
r
The NC checks that no instruction is designated with any of the following instruc¬
tions. If designated, the “DOUBLE INST ERR” is displayed.
END, RET, RTH, IPSH, APSH, PUSH, TPSH, ADR, IPSHD

(D Check 4: Single-instruction check


i;
;[
l
The NC checks whether some instruction is designated with any of the following
instructions. If not designated, the “SINGLE INST ERR” is displayed.
TIM, TMR, INR, DCR, CLR, CMR, ADI, SBI, ANI, ORI, XRI, DEC, COL,
CMP, CPI, MVI, ADD, SUB, ANR, ORR, XRR, CPR, COR,MOV, DST, DIN,
ADC, ADDW, SUBW, MULW, DIVW, INRW, DCRW, CLRW, CMRW,
CORW, CPRW, MVIW, DSTW, MCR, RTI, JMP

8-35
© Check-5: Analysis possibility check
The NC checks if the edited net can be converted into a sequence program. If con¬
version is not possible, the “INVALID NET’ is displayed.

© Check 6: Sequence program size check


The NC checks that a sequence program is within the allowable size.
The maximum size of a sequence program is 131,055 bytes which are approxi¬
mately 32,700 steps (1 step = 4 bytes). If the size of the sequence exceeds 131,055
bytes, the “SIZE OVER” is displayed.

© After the completion of the check indicated above, the screen changes.
During net check, the “NET CHECKING” is displayed on the screen as shown in
Fig. 8.19.

NETEDT _ MNT 0**+** NOOOOO


NET-NO.: 1 SEL COUNT: 0 <INS> <STOP>

-| MV1 | #700 . I 30H > #11002


#10000

NET CHECKING
MEM
STP LSK
PARAM DtAGN IN/OUT DATA LADDER -
LADDER NETEDT, | TBLEDT SEQSTS

1 Fig. 8.19 Screen during Net Check

8-36
8.4 NET EDITING FUNCTION

(2) Warning Messages

If an error is found in net check, a corresponding warning message is displayed.

Table 8.7
Warning Message Description Corrective Action
NOT CONNECTED The net has not been completed. Check the created or edited net and con¬
nect the line.

SIZE OVER The size of sequence exceeds the allow¬ Review the program and delete several
able limit. codes.
START INST ERR An instruction that must be placed at the Designate an instruction that must be
beginning of a net is not designated. placed at the beginning of a net.
SINGLE INST ERR An instruction that must be designated in a Refer to the PLC instruction manual and
net with another instruction is designated make corrections.
without other instruction.
DOUBLE INST ERR In one net, some instruction is designated Delete an instruction that is designated
with an instruction that must be designated with the instruction that must be desig¬
in a net without another instruction. nated in a net without other instruction.

(3) Forced stop of net check

If the power is turned OFF during net check, the information might not be updated en¬
tirely. Therefore, the sequence is automatically initialized (booting from flash ROM
to CMOS) when the power is turned ON next.

Edit the sequence again.

.!ii

I
il
I

S-
II
;

8-37
;i
8.5 TABLE EDIT FUNCTION

The table data editor is provided to edit the table data.

The data of the following three tables can be edited.

•Message table
•Conversion table
•Symbol table

-•

8-38
8.5 TABLE EDIT FUNCTION

8.5.1 Editing the Data in the Conversion Table . !


1
The conversion data that have been set by using the pseudo instruction “CONVERSION”
can be edited.
.
The data canbeedited inunits of bytes. The data for which word or double-word designation

__
has been made in the conversion table of the source program are also displayed in units of
words in this screen. i

Conversion data are set in hexadecimal. ,


3
The conversion data numbers are indicated below:
N9000 - N9007 256 bytes
N9008-N9023 . 128 bytes
“FFH” is displayed for undefined conversion data.

Theconversion data number changes by pressing the page key. (N9000 -*ÿ N9001)
Datadisplay area: The cursormoves tothis area when the [INS] key is pressed.

TBLEDT MNT ri O***** NOOOOO


<STOP>

N9000 , 00 01 02 03 04 05 06 07
10 11 12 13 14 15 16 17
08
18
09
19 1A
0A OB OC OD OE OF
1B 1C 1D 1E
.
1F •
; 20 21 22 23 24 25 26 27
.
1
30 31 32 33 34 35 36 37
40 41 42 43 44 45 46 .47
28
38
48
29
39
49
2A
3A
4A
2B 2C 2D 2E
3B 3C 3D 3E
4B 4C 40 4E
2F ‘
3F ,
4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 1

; 60 61 62 63 64 65 66 ,67
. 70 71 72 73 74 75 76 77
• 80 81 82 83 84 85 86 87
68
78
88
69 6A
79 7A
89 8A
6B 6C 6D 6E
7B 7C 7D 7E
8B 8C 8D 8E
7F
8F
.
6F ]

' 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F ’
, A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF !
B0 B1 B2 B3 B4 B5 B6.B7 B8 B9 BA BB BC BD BE BF.
• CO C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF 1
; DO D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF ;
, EO El E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF ;
• FO F1 F2 F3 F4 F5 F6 .F7 F8 F9 FA FB FC FD FE FF •
MEM
STP LSK

I
PARAM DIAGN IN/OUT DATA LADDER
CNVTBL MSGTBL SYMTBL

Fig. 8.20 Conversion Data

The conversion data editing procedure is explained below.


|
(D After displaying the conversion data page of the required conversion data number,
press the [INS] key.
The cursor appears on the first byte position in the data display area.

8-39
© Move the cursor to the data to be changed. Key-in the required numeric value and
press the [WR] key.
Example: [4][2][WR]

© Press the [INS] key.

8.5.2 Editing the Data in the Message Table

The message data that have been set by using the pseudo instruction “MESSAGE” can be
edited.
Up to 40 characters can be input as message data.
Fig. 8.21 shows the message data edit screen.
The message data number is indicated below:

#9024 to #9323

TBLEDT MNT O***** NOOOOO


<STOP>

#9024
SPINDLEALARM ..
#9025 -
TOOL SET OK
#9026
0123456789123456789012345678901234567890
#9027

#9028
:

MEM
STP LSK

A
PARAM DIAGN IN/OUT DATA PjADDER.
i-
CNVTBL MSGTBL SYMTBL

Fig. 8.21 Message Data Edit Screen

The message data editing procedure is explained below.

'
© Move the cursor to the message data number of the message that should be
changed.

© Key-in the required message and press the [WR] key.

8-40
8.5 TABLE EDIT FUNCTION

8.5.3 Editing the Data in the Symbol Table

The symbol name that has been set by using” the pseudo instruction “SYMBOL” can be
edited.
As a symbol name, a character-string of up to five characters can be set for one contact. Reg¬
istration of a symbol is not possible in the byte register.
When registering symbol names, there must be no blank in the contact number area. If there
is a blank, it is regarded as the end of registration and the symbol data registered after the
blank, if any, is not output in text output operation.

Serial symbol number area: Up to 5000 numbers are displayed.


Therefore, up to 5000 symbol names can be registered.
Contactnumberarea: Thecontactnumbersforwhichsymbolnamesaredefinedare
displayed. The numbers must be five-digit numbers.
The cursor can be moved in this area.
Symbol name area: Symbol names are displayed corresponding to
thecontactnumbers. Symbol names shouldbe
set in up to five characters. The cursor can be
moved in this area.

TBLEDT MNT O***: c* NOOOOO


•' <STOP>

S0001 #3000 RAPID


S0002 #3000 JOG
S0003 #3000 HNDL
S0004 #3000 STP
S0005 #3000 TAPE
S0006 #3000 MDI
S0007 #3000 MEM
S0008 #3000 EDIT
S0009 Nothing is displayed when
S0010 !. symbol name is not defined.

MEM
STP LSK
PARAM
CNVTBL

Fig. 8.22
DIAGN
MSGTBL
IN/OUT
SYMTBL

Symbol Name Edit Screen


DATA
'L
LADDER '

8-41
The symbol name editing procedure is explained below.

(T) Move the cursor to the contact number area and input the contact number to be set.
The maximum serial number is 5000.

® Move the cursor to the symbol name area and input the symbol name. A symbol
name should be input in a maximum of five characters.

.
1 When inputting a register number, it is not necessary to input “#”.
2. For a register number, only a numeric value is allowed. If a character other than a
numeric value is input “INPUT ERROR” is displayed.
3. A symbol name is a character-string of up to five characters. If a character-string
longer than five characters is input, “INPUT ERROR” is displayed.

8-42
8.6 INPUT/OUTPUTFUNCTION

8.6 INPUT/OUTPUT FUNCTION

The I/O function uploads the created sequence to a PC card and downloads the sequence
stored in a PC card to the NC.

8.6.1 Downloading the Sequence Program


!
The procedure used for downloading the sequence program (execution module *.BIN)
stored in the PC card to the NC is explained below.

© Save the sequence execution module to be downloaded to the PC card.

© Select the maintenance job and select the “SEQUENCE DATA” by the IN/OUT
PARM function. See Fig. 8.23.
(D Select the sequence execution module to be downloaded from the list of files in
the PC card. See Fig. 8.24.

If a file other than a sequence file is selected, the following warning message is
displayed.
“FILE DATA ERR”

© Press the [WR] key.

© The following message starts blinking and download starts.


“INPUTTING”

© Upon completion of downloading, the following message is displayed.


“INPUT COMPLETED”

IN/OUT PARM MNT O***** NOOOOO


INPUT <STOP>

ALL PARAMETER -- SETTING


PARAMETER
SEQ. PRM& KEEP MEM
PITCH ERROR PRM.

OFFSET
TOOL LIFE
MACRO COMMON
OPTIONAL PARAMETER
•SEQUENCE DATA
fc
EDT ;

; STP LSK
DIAGN IN/OUT
|
PARAM
INPUT | | OUTPUT | EDIT | IN/OUT | | OSRCH | I
,
Fig. 8.23 IN/OUT PARM Function Screen

8-43
IN/OUT PARM MNT O***** NOOOOO
PC CARD DIR (A: WASNAC)
<DIR> XXXXXX09 BIN
<DIR> . XXXXXX10BIN
DIRECT01 <DIR> XXXXXX11 BIN
. DIRECT02 <DIR> XXXXXX12BIN
XXXXXX01 BIN XXXXXX13BIN
. XXXXXX02 BIN XXXXXX14BIN
XXXXXX03 BIN XXXXXX15 BIN
XXXXXX04 BIN XXXXXX16 BIN
i
XXXXXX05BIN -XXXXXX17BIN
. XXXXXX06BIN XXXXXX18BIN
XXXXXX07BIN XXXXXX19BIN
XXXXXX08 BIN XXXXXX20BIN
REMAINING 3,123,456 BYTES

EDT
STP LSK
PARAM DIAGN IN/OUT I
INPUT OUTPUT EDIT . IN/OUT OSRCH l i
Fig. 8.24 PC Card File Directory Screen

zr

J i

8-44
8.6 INPUT/OUTPUT FUNCTION

8.6.2 Uploading the Sequence Program


It is possible to upload a sequence program from the NC to a PC card. The file format of
the upload file can be selected from the execution module format (the same format as in
downloading) and the text format.
Text format: The ladder sequence program (object file) in the NC is reversely converted
to the state before compilation.

The sequence program consisting of multiple modules which are linked is output in one file.
If such a file is compiled, the object file capacity exceeded could occur (one object file is
greater than 64K.). In this case, dividethe sequence program into two or more files and create
the execution module by using the JXSD offline system software package.
The procedure used for uploading the sequence program stored in the NC is explained below.

© Prepare a PC card having sufficient free area.


i1

(D Select the maintenance job and select the “SEQUENCE DATA (TEXT)” or ’’SE¬
QUENCE DATA (BIN)” by the IN/OUT PARM function. See Fig. 8.25.
© Key-in the sequence execution module name to be uploaded. See Fig. 8.26.

© Press the [WR] key.

© The following message starts blinking and upload starts.


“OUTPUTTING”
© Upon completion of uploading, the following message is displayed.
“OUTPUT COMPLETED”

IN/OUT PARM MNT O***** N00000


OUTPUT <STOP>
"i
ALL PARAMETER SETTING
PARAMETER
- SEQ.PRM& KEEP MEM
- PITCH ERROR PRM.
- OPTIONAL PARAMETER
OFFSET •SEQUENCE DATA (TEXT)
TOOL LIFE SEQUENCE DATA (BIN)
MACRO-COMMON

EDT
STP LSK
PARAM DIAGN IN/OUT
| INPUT | | OUTPUT | EDIT | IN/OUT | | OSRCH 1
Fig. 8.25 IN/OUT PARM Function Screen

8-45

IN/OUT PARM MNT O***** N00000
SEQ OUT (TEXT) *

PC NAME:
— V

EDT
STP LSK
PARAM DIAGN IN/OUT
| INPUT - | | OUTPUT | EDIT | IN/OUT 1| OSRCH ]

Fig. 8.26 Sequence Execution Module Name Input Screen

© If the file having the same name as the file to be uploaded already exists in the PC
card, the following message is displayed.
“OVERWRITE? (Y/N)”
Press [Y] to overwrite. If the existing file must not be overwritten, press [N].

Warning Related with PC Card


There are cases that input/output using a PC card is not possible due to defective PC
card, writing error, or other problems. If input is not possible, the relevant warning
message is displayed.
“DEVICE NOT READY!”: A PC card is not installed.

A “FORMAT ERROR!”:
“ACCESS ERROR!”:

“PC CARD FULL!”


The PC card is not formatted.
Read/write is attempted while a file in the PC card is
input/output.
PC card free area is insufficient.

8-46
8.7 SEQ STS (SEQUENCE STATUS) FUNCTION

8.7 SEQ STS (SEQUENCE STATUS) FUNCTION

8.7.1 Display of Sequence Status

On the SEQ STS screen, sequence memory status and sequence scan speed can be displayed.
It is also possible to change the set values.
i
•;
The SEQ STS screen is shown below.

SEQ STS MNT O***** N00000


<STOP>

SEQUENCE STATUS
SEQ FREE 12000 BYTE
TOTAL SUM AAAA H
L SCAN TIM 32 MS

SET VALUE
VERSION TEST
STOP CNT 2

EDT
NEWTEST_ STP LSK
PARAM DIAGN IN/OUT S'lIADDERa
LADDER NETEDT TBLEDT SEQSTS

Fig. 8.27
(1) SEQ FREE
The size of the free area for storing sequence programs is displayed.

(2) TOTAL SUM


Total value of the data stored in the CMOS area, including sequence programs and
tables, is displayed.

(3) L SCAN TIM


The time required to execute a low-speed
a multiple of 4 msec.
1 pass time
High-speed scan
sequence program
(msec)

n
'scan sequence program once is displayed in

n n n
t
Low-speed scan
sequence program _r~lJ
. LTLJJ
i
Time
o 4 6 iz
H
1 pass time of low-speed scan
sequence program (12 msec)

8-47
(4) VERSION

The version name of the sequence designated by the pseudo instruction “VERSION”
isdisplayed.
The sequence version can be changed'while the sequence is stopped.

The version name can be set in up to eight characters. If more than eight characters are
_ input, an error occurs and the following message is displayed.
TT'

“INPUT ERROR” •>


7
(5) STOP CNT .

The stop count designated' by the pseudo instruction “LOWSTOPCOUNT’ is dis¬


played. "

The STOP CNT can be changed while the sequence is stopped.

Setting range is from 1 to 20; if a numeric value outside this range is set, an error occurs
and the following message is displayed.
“INPUT ERROR” ' '

8.7.2 INITI (Initialization) Function

The function initializes the sequence programs in the NC. The table related data is also
cleaired.

When the [INITI] function soft-key is pressed, the PLC manager executes the following pro¬
cessing.'

•Sets “TEST’ for VERSION.


. •Sets “3” for “LOW-SPEED STOP COUNT’.
•Clears the sequence program area and inserts the following programs from the be¬

A ginning.
. HIGHSEQUENCE,
RTH,
ENDP,
LOWSEQUENCE,
. :

- -
RET,
ENDP,
•Clears the message data area. ~
•Clears the conversion data area.
•Clears the symbol data area.

8-48
8.7 SEQ STS (SEQUENCE STATUS) FUNCTION

© Press the [INHI] function soft-key.


The following message is displayed.
“INITIALIZE SEQ.? (Y/N)”

SEC STS MNT O***** NOOOOO


<STOP>

SEQUENCE STATUS
SEQ FREE «! 12000 BYTE
\
TOTAL SUM AAAA H
LSCAN TIM 32 MS

SET VALUE
VERSION TEST
STOP CNT 2

INITIALIZE SEQ.? (Y/N)


MEM
STP LSK
PARAM DIAGN IN/OUT LADDER
INIT t
Fig. 8.28 Sequence Initialization Screen

i
l

i.
I

8 -49

r_•
(D Press [Y] and [Enter] keys.
The sequence programs in the NC are initialized and the following screen is dis¬
played.

SEC STS '


MNT O***** N00000
<STOP>

SEQUENCE STATUS
SEQ FREE 12798 BYTE
TOTAL SUM ???? H
L SCAN TIM 12 MS

SET VALUE
VERSION TEST
STOP CNT 3

MEM
STP LSK
PARAM DIAGN IN/OUT RlÿDPERg
INIT'

Fig. 8.29 Sequence Initialization Screen (After Initialization)

\ I /
\
POINT) 1. Initialization operation initializes all data being edited.
2. Before executing initialization, make sure that the data can be initialized.

8-50
8.8 UST OF MESSAGES

8.8 LIST OF MESSAGES

Messages displayed during online editing are given in Tables 8.8, 8.9, and 8.10.

8.8.1 List of Messages

Table 8.8 List of Messages


Message Description
COLLECTING The nets are being selected. ;
DELETING The net is being deleted. :>

DELETIONCOMPLETED Net deletion has been completed.


NET CHECKING Entire sequence program is being checked during the execution of a sequence program.
INPUTTING Sequence program data are being input from a PC card.
INPUT COMPLETED Inputting of sequence program data has been completed correctly.
OUTPUTTING Sequence program data are being output to a PC card.
OUTPUTCOMPLETED Outputting of sequence program data has been completed correctly.
SEARCHING Search processing is being executed on the ladder screen.
INPUT CONTACT NUM- The message requesting the input of a contact number when the contact function is se¬
BER lected. i

OVERWRITE? (Y/N) When outputting a file to a PC card, the same file name as the one already existing in the
PC card is designated.
INITIALIZE SEQ.? (Y/N) This message is displayed when the [INTTI] function soft-key is pressed.

:iL
a

*
l

8-51
8.8.2 List of Warning Messages

Table 8.9 List of Warning Messages


Message Description
SELECTION OVER In net selection, more than 10 nets are selected. .
INPUT ERROR Error in data input
CONTACT OVER More than 100 contacts are set in one net.
DEVICE NOT READY PC card is not set.
'i'V" FORMAT ERROR! PC card is not formatted.
ACCESS ERROR! PC card read/write error
PC CARD FULL! PC card free area is insufficient for writing the data.
NO JMP-ADR ADR instruction is not designated corresponding to JMP.
NO START INST An instruction that must be designated at the beginning of a ladder is not desig¬
nated.
'
NOT CONNECTED Line connection is incomplete.
SUBP FORMAT . Format error in the SUBP instruction
ERROR
EXECUTING An invalid functionis selected during sequence execution.
DOUBLE INST ERR An instruction which must not be designated with another instruction is desig¬
nated in a net.
SINGLEINST ERR An instruction which must be designated with another instruction is designated
without other instruction in a net. _
SIZE OVER The size of sequence exceeds the allowable limit.
FILE DATA ERROR The data input to the PC card are not the sequence file for JX.
DOUBLE LABEL There is more than one label for JMP instruction.
INVALID NET A net which cannot be analyzed is edited.

8.8.3 List of Alarm Messages

Table 8.10 List of Alarm Messages


Message Description
BACKUP THE After editing the sequence program, the system has been started with the system number
SEQUENCEPROGRAM switch set ar “0" or “A” without backing up the sequence program.
PLC CMOSERROR The CMOS (hardware) in the JCP02 has been destroyed.
RESETTINGHAS BEEN Since the sequence data in the JCP02 have been destroyed, the contents in flash ROM
MADE! have been transferred to the CMOS. _

8-52
•I
9
DOWNLOADING AND UPLOADING
LADDER PROGRAM

Chapter 9 describes the procedure for downloading and


uploading the ladder program using flash ROM.

•;

fi.
9.1 DOWNLOADING'LADDER PROGRAM
(PC CARD -> FLASH ROM) 9-2

9.2 UPLOADING LADDER PROGRAM


(FLASH ROM PC CARD) 9-4

l
l
it
I!

!
I
9-1
9.1 DOWNLOADING LADDER PROGRAM (PC CARD •-> FLASH ROM)

The procedure for downloading the sequence program from PC card to flash ROM is indi¬
cated below.

(D Tum ON the SW1 on the JCP01 board.

swi

TMl SW2

(2) Turn ON the power.


(5) Insert a PC card to CN03 (CARD) in the JCP01 board.
@ The following screen is displayed.

SYSTEM LOAD

< MODULE NAME TOTAL FILE > < MODULE NAME TOTAL FILE >

MAIN OPTION
SH COM NONE COMU.BIN
SYSTEM NONE SHSYS.BIN ACGC NONE ACGC.BIN
APL
LANG
. NONE SHAPL.BIN
NONE SHLAN.BIN USER _
*| PLC LADDER] NONE
DRAW NONE SHDRW.BIN
PLC NONE PLC.BIN ACGC APL NONE
INT NONE INT.BIN ACGC FILE NONE Message
MOT NONE MOTION.BIN CLANG APL NONE display area
AXIS NONE AXIS.BIN

MAIN OPTION USER DOWN LOAD UP LOAD

(D Move the cursor to “PLC LADDER” of USER by using the cursor up/down keys
and press the [WR] key.
(?) The symbol appears to the left of “PLC LADDER” and the cursor moves to
the file name input area.
(7) The message “INPUT FILE NAME” appears.

1 © Input the file name of the ladder program.

9-2
9.1 DOWNLOADING LADDER PROGRAM (PC CARD -4 FLASH ROM)

© Press the [DOWN LOAD] function soft-key.


The following message is displayed.

“TRANSFERRING” .

@) After the completion of transmission, the following message is displayed.


“COMPLETED”

(fi) Return SW1 to OFF and turn OFF the power.

I
9-3
9.2 UPLOADING LADDER PROGRAM (FLASH ROM -> PC CARD)

The procedure for uploading the sequence program from flash ROM to PC card is indicated
below..
(D Carry out steps Lto.8 described in section 9.1.
(2) Press the [UP LOAD] function soft-key.
The following message is displayed.
“TRANSFERRING”

(5) After the completion of transmission, the following message is displayed.


“COMPLETED”

© Return SW1 to OFF and turn OFF the power.

i
9-4
:
YASNAC J300
PLC PROGRAMMING MANUAL
TOKYO OFFICE New Pier Takesiba South Tower, 1-16-1, Kaigan, Mmatoku. Tokyo 105 Japan
Phone 81 3 5402 4511 Fax 81-3-5402-4580
YASKAWA ELECTRIC AMERICA, INC.
Chicago-Corporate Headquarters 2942 MacArthur Bivd Northbrook. IL 60062-2028. U.S A
Phone 1 847 291-2340 Fax 1-847 498-2430
Chicago-Technical Center 3160 MacArthur Blvd. Northbrook, IL 60062-1917, USA.
Phone 1-847-291-0411 Fax 1-847-291-1018
MOTOMAN INC.
805 Liberty Lane West Carrollton, OH 45449. USA
Phone 1-513-847-6200 Fax 1-513 847-6277
YASKAWA ELETRICO DO BRASIL COMERCIO LTDA.
Avenida Brigadeiro Faria Lima 1664-5‘CJ 504/511. Sao Paulo. Brazil
Phone 55-11-815-7723 Fax 55-11-870 3849
YASKAWA ELECTRIC EUROPE GmbH
Ann Kronberger Hang 2, 65824 Schwaibach. Germany
Phone 49-6196 569-300 Fax 49-6196-888-301
Motoman Robotics AB
Box 504 S38525 Torsas. Sweden
Phone 46-486-10575 Fax 46-486-41410
Motoman Robotec GmbH
Kammerfeldstra/?e 1. 85391 AHershausen Germany
Phone 49-8166-900 Fax 49-8166-9039
YASKAWA ELECTRIC UK LTD,
3 Drum Mains Park Orchardton Woods Cumbernauld. Scotland, G68 9LD U K
Phone 44 1236-735000 Fax 44-1236-458182
YASKAWA ELECTRIC KOREA CORPORATION
Paik Nam Bldg 901 188-3, 1-Ga Euljiro. Joong-Gu Seoul. Korea
Phone 82-2-776-7844 Fax 82 2-753-2639
YASKAWA ELECTRIC (SINGAPORE) PTE. LTD.
151 Lorong Chuan, #04-01. New Tech Park Singapore 556741. Singapore
Phone 65 282 3003 Fax 65-289-3003
YATEC ENGINEERING CORPORATION
Shen Hsiang Tang Sung Chiang Building 10F 146 Sung Chiang Road. Taipei. Taiwan
Phone 886 2 563 0010 Fax 886 2-567-4677
BEIJING OFFICE Room No 301 Office Building of Beijing International Club. 21 Jianguomenwai Avenue Beijing 100020. China
Phone 86-10 532 1850 Fax 86-10 532-1851
SHANGHAI OFFICE Room No. 8B Wan Zhong Bunding 1303 Yan An Road (West). Shanghai 200050, China
Phone 86-21-6212-1015 Fax 86-21-6212-1326
YASKAWA JASON (HK) COMPANY LIMITED
Rm29l6. Hong Kong Plaza. 186-191 Connaught Road West. Hong Kong
Phone 852-2858 3220 Fax 852 2547-5773
TAIPEI OFFICE Shen Hsiang Tang Sung Chiang Building 10F 146 Sung Chiang Road. Taipei, Taiwan
Pnone 886-2-563-0010 Fax 886-2-567 4677

YASKAWA ELECTRIC CORPORATION

V
YASKAWA

NOTICE: To enable ongoing product modifications and improvements,


specifications are subject to change without notice.
SIE-C843-13.1
© Printed in Japan August 1996 96-3 1.5 <3>

You might also like