0% found this document useful (0 votes)
112 views

N700-Programing 1 Manual

Uploaded by

Andre Costa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views

N700-Programing 1 Manual

Uploaded by

Andre Costa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 317

FARA PLC

N70α, N700, N7000


PROGRAMING
User's Manual
CONTENTS

Chapter 1. Data Memory(Operand)

Chapter 2. System Register


Chapter 3. INSTRUCTIONS
3-1. Programming Procedure ..............................................................................91
3-2. Basic operation of instruction ...............................................................92
3-3. High level instruction ............................................................................93
3-3-1. Configuration of High level instruction .........................................93
3-3-2. Scan Execution type (F) and Pulse Execution type(P)
instruction..........................................................................................93
3-3-3. Consecutive Execution of High level instruction. ...........................94
3-3-4. Over flow and Underflow ....................................................................94
3-3-5. Index register (IX, IY) ....................................................................95
3-3-6. Operation error .................................................................................96
3-3-7. Constants (K, H, M )...........................................................................97
3-4. Table of Operands .....................................................................................99
3-5. Description of Instruction ......................................................................101
1. Basic Instruction ....................................................................................103
2. High level instruction ............................................................................148

1. Basic Instruction
Basic Sequence Instruction
ST Start ..........................................................................................103
ST/ Start not ...................................................................................103
OT Out .............................................................................................103
OR OR ...............................................................................................104
OR/ OR not ........................................................................................104
AN And .............................................................................................105
AN/ And/.............................................................................................105
/ Not .............................................................................................106
ANS AND Stack ...................................................................................107
ORS OR Stack .....................................................................................107
PSHS Push Stack .................................................................................108
RDS Read Stack .................................................................................108
POPS Pop Stack ...................................................................................108
KP Keep ...........................................................................................109
NOP No operation ..............................................................................110
DF Leading edge differential ........................................................111
DF/ Trailing edge differential .......................................................111

Basic Function Instructions


TM Timer ....................................................................................113
CT Counter .................................................................................115
F118(UDC) Up/ Down Counter ..................................................................116
SR Shift Register .....................................................................118
F119(LRSR) Left/ Right shift register .................................................120
Control Instructions
MC Mater control relay ..........................................................................122
MCE Mater control relay End ....................................................................122
JP-LBL Jump-Label .........................................................................................124
LOOP-LBL Loop-Label...........................................................................................126
BRK Break ..................................................................................................128
ED End .....................................................................................................129
CNDE Control End ........................................................................................130
NSTP Next Step ...........................................................................................131
SSTP Start Step ..........................................................................................131
CSTP Clear Step ..........................................................................................131
STPE Step End .............................................................................................131
CALL Subroutine call .................................................................................137
SUB Subroutine .........................................................................................137
RET Return ................................................................................................137
INT Interrupt ...........................................................................................139
IRET Interrupt return ...............................................................................139
ICTL Interrupt control ..............................................................................140

2. High level Instruction


Data Transfer Instructions

F0( MV ) P0( PMV ) 16-bit data Move ...........................................148


F1( DMV ) P1( PDMV ) 32-bit data Move ...........................................150
F2( MV/ ) P2( PMV/ ) 16-bit data Invert and move .........................152
F3( DMV/ ) P3( PDMV/ ) 32-bit data Invert and move .........................154
F5( BTM ) P5( PBTM ) Bit data Move ................................................156
F6( DGT ) P6( PDGT ) Digit data Move .............................................159
F10( BKMV ) Pl0( PBKMV ) Block Move .....................................................161
F11( COPY ) P11( PCOPY ) Block Copy .....................................................163
F15( XCH ) Pl5( PXCH ) 16-bit data Exchange ....................................165
FI6( DXCH ) PI6( PDXCH ) 32-bit data Exchange ....................................167
F17( SWAP ) P17( PSWAP ) High /low bytes Exchange .............................169
BIN Arithmetic Instructions
F20( + ) P20( P+ ) 16-bit data [D+S -> D] ...................................172
F21( D+ ) P20( PD+ ) 32-bit data [D+1,D) + (S+1,S)
-> (D+1, D)] .................174
F22( + ) P22( P+ ) 16-bit data [S1+S2 -> D] ................................176
F23( D+ ) P23( PD+ ) 32-bit data [S1+1, S1) + (S2+1, S2)
-> (D+1, D)] .................178
F25( - ) P25( P- ) 16-bit data [D-S -> D] ...................................180
F26( D- ) P26( PD- ) 32-bit data [D+1,D) - (S+1,S)
-> (D+1, D)] ..................182
F27( - ) P27( P- ) 16-bit data [S1-S2 -> D] ................................184
F28( D- ) P23( PD- ) 32-bit data [S1+1, S1) - (S2+1, S2)
-> (D+1, D)] ....................186
F30( * ) P30( P* ) 16-bit data [S1x S2 -> (D+1,D)] ....................188
F31( D* ) P31( PD* ) 32-bit data [S1+1, S1) x (S2+1, S2)
-> (D+1, D)] ....................190
F32( % ) P32( P% ) 16-bit data [S1/S2 -> D....(DT9015)] ............192
F33( D% ) P23( PD% ) 32-bit data [S1+1, S1) / (S2+1, S2)
-> (D+1,D)] (DT9016, DT90150] ...............194
F35( +1 ) P35( P+1 ) 16-bit increnent [D+1 -> D] .........................196
F36(D+1 ) P36( PD+1 ) 32-bit increnent [D+1,D) + 1
-> (D+1, D)] .................198
F37( -1 ) P37( P-1 ) 16-bit decrenent [D-1 -> D] ..........................200
F38(D-1 ) P38( PD-1 ) 32-bit decrenent [D+1,D) - 1
-> (D+1, D)] .....................202
F160(DSQR) P160(PDSQR) 32-bit data square root [ ( S + 1, S )
-> (D+1, D)] .....................204

BCD Arithmetic Instructions


F40( B+ ) P40( PB+ ) 4-digit BCD [D+S -> D] ..................................208
F41( BD+ ) P41( PDB+ ) 8-digit BCD [D+1,D) + (S+1,S)
-> (D+1, D)] ......................210
F42( B+ ) P42( PD+ ) 4-digit BCD [S1+S2 -> D] ................................212
F43( DB+ ) P43( PDB+ ) 8-digit BCD [S1+1, S1) + (S2+1, S2)
-> (D+1, D)]........................214
F45( B- ) P45( PB- ) 4-digit BCD [D-S -> D] ....................................216
F46( DB- ) P46( PDB- ) 8-digit BCD [D+1,D) - (S+1,S)
-> (D+1, D)] ......................218
F47( B- ) P47( PB- ) 4-digit BCD [S1-S2 -> D] ................................220

F48( DB- ) P43( PDB- ) 8-digit BCD [S1+1, S1) - (S2+1, S2)
-> (D+1, D)] ......................222

F50( B* ) P50( PB* ) 4-digit BCD [S1x S2 -> (D+1,D)] ....................224

F51( DB* ) P51( PDB* ) 8-digit BCD [S1+1, S1) x (S2+1, S2)
-> (D+1, D)] ......................226

F52( B% ) P52( PB% ) 4-digit BCD [S1/S2 -> D....(DT9015)]..............228

F53( DB% ) P53( PDB% ) 8-digit BCD [S1+1, S1) / (S2+1, S2)
-> (D+1,D)] (DT9016, DT90150] .................230
F55( B+1 ) P55( PB+1 ) 4-digit BCD increnent [D+1 ->D] ...................232
F56(DB+1 ) P56( PDB+1 ) 8-digit BCD increment [D+1,D) + 1
-> (D+1, D)] ......................234
F57( B-1 ) P57( PB-1 ) 4-digit BCD decrenent [D-1 ->D] ...................236
F58(DB-1 ) P58( PDB-1 ) 8-digit BCD decrenent [D+1,D) - 1
-> (D+1, D) ........................238
Data Comparision Instructions

F60( CMP ) P60( PCMP ) 16-bit data Compare ........................................242


F61( DCMP ) P61( PDCMP ) 32-bit data Compare ........................................244
F62( WIN ) P62( PWIN ) 16-bit data range compare ..............................246
F63( DWIN ) P63( PDWIN ) 32-bit data range compare ..............................248

Logic Operation Instructions

F65( WAN ) P65( PWAN ) 16-bit data AND ...............................................252


F66( WOR ) P66( PWOR ) 16-bit data OR .................................................254
F67( XOR ) P67( PXOR ) 16-bit data Exclusive OR ................................256
F68( XNR ) P68( PXNR ) 16-bit data Exclusive NOR ..............................258

DATA Conversion Instructions

F80( BCD) P80( PBCD ) 16-bit data -> 4-digit BCD ......................262
F81( BIN ) P81( PBIN ) 4-digit BCD -> 16bit data ...........................264
F82( DBCD ) P82( PDBCD ) 32-bit data -> 8-digit BCD ......................266
F83( DBIN ) P83( PDBIN ) 8-digit BCD -> 32bit data ...........................268
F84( INV ) P84( PINV ) 16 bit data Invert .......................................270
F85( NEG ) P86( PNEG ) 16 bit data Two's complement ......................272
F86( DNEG ) P86( PDNEG ) 32 bit data Two's complement ......................274
F87( ABS ) P87( PABS ) 16 bit data Absolute ...................................276
F88( DABS ) P88( PDABS ) 32 bit data Absolute ...................................278
F89( EXT ) P89( PEXT ) 16 bit data Sign extension .........................280
F90( DECO ) P90( PDECO ) Decode ...........................................................282
F91( SEGT ) P91( PSEGT ) 16 bit data 7-segment decode ......................285
F92( ENCO ) P92( PENCO ) Encode ...........................................................287
F93( UNIT ) P93( PUNIT ) 16 bit data Combine .....................................290
F94(DIST ) P94( PDIST ) 16 bit data Distribute ................................292
F95( ASC ) P95( PASC ) Character -> ASCII code ..............................294
F96( SRC ) P96( PSRC ) Table data Search ........................................296

Data shift Instructions

F100( SHR ) P100( PSHR ) 16-bit data Right shift ..............................300


F101( SHL ) P101( PSHL ) 16-bit data Left shift ................................302
F105( BSR ) P105( PBSR ) 16-bit data 1-digit right shift .................304
F106( BSL ) P106( PBSL ) 16-bit data 1-digit left shift ...................306
F110( WSHR ) P110( PWSHR) Block 1-word right shift ...........................308
F111( WSHL ) P111( PWSHL) Block 1-word left shift ...........................310
F112( WBSR ) P112( PWBSR) Block 1-digit right shift .........................312
F113( WBSL ) P113( PWBSL) Block 1-digit left shift .........................314
FIFO (First-in First-out) Instruction

F115( FIFT ) P115( PFIFT ) FIFO buffer Define .......................................318


F116( FIFR ) P116( PFIFR ) Data read from FIFO buffer ..........................318
F116( FIFW ) P117( PFIFW ) Data write into FIFO buffer ........................318

Data rotate Instructions

F120( ROR ) P120( PROR ) 16-bit data Right rotate ..............................324


F121( ROL ) P121( PROL ) 16-bit data Left rotate ................................326
F122( RCR ) P122( PRCR ) 16-bit data Right rotate with carry flag ...328
F123( RCL ) P123( PRCL ) 16-bit data Left rotate with carry flag ...330

Bin Manipulation instructions

F130( BTS ) P130( PBTS ) 16-bit data Bit set ......................................334


F131( BTR ) P131( PBTR ) 16-bit data Bit reset ...................................336
F132( BTI ) P132( PBTI ) 16-bit data Bit invert .................................338
F133( BTT ) P133( PBTT ) 16-bit data Bit test ....................................340
F135( BCU ) P135( PBCU ) 16-bit data Total 1's number .......................342
F136( DBCU ) P135( PDBCU ) 32-bit data Total 1's number .......................344

Special instructions

F140( STC ) P140( PSTC ) Carry flag (R9009) Set ................................348


F141( CLC ) P141( PCLC ) Carry flag (R9009) Reset .............................349
F142( WDT ) P142( PWDT ) Watch dog timer Update ..............................350
F143( IORF ) P143( PIORF ) Patial I/O Update ........................................351
F145( SEND ) P145( PSEND ) Link data Send ...............................................351
F146( RECV ) P146( PRECV ) Link data Receive. .........................................354
F147( PR ) Print out .......................................................356
F148( ERR ) P148( PERR ) Self-diagnostic error Set ...........................358
F149( MSG ) P149( PMSG ) Message display .............................................359
F150( READ ) P150( PREAD ) Data read from advanced units ......................360
F151( WRT ) P151( PWRT ) Data write into advanced units ....................361
F152( RMRD ) P152( PRMRD ) Data read from the slave station .................362
F153( RMWT) P153( PRMWT ) Data write into the slave station ...............364
F154( MCAL ) P154( PMCAL ) Machine language call ...................................367
F155( SMPL ) P155( PSMPL ) Sampling Start ...............................................368
F156( STRG ) P156( PSTRG ) Sampling Stop ...............................................368
Appendix 1. Programming Unit (Handy loader)
1-1. The feature of Handy loader......................................................................372
1-2. Parts Names ...............................................................................................373
1-3. Operation Keys ..........................................................................................374
1-4. Table of Instruction ................................................................................380
1-5. Dimension of Handy loader ........................................................................387

Appendix 2. Program Operating with Handy loader


2-1. Program reading ........................................................................................390
2-2. Program editing ........................................................................................391
2-3. Program changing .......................................................................................396
2-4. Program inserting .....................................................................................399
2-5. Program deleting .......................................................................................401
2-6. Program searching .....................................................................................404

Appendix 3. The OP function of Handy loader


OP-0 Clears Program Area and Hold Areas ....................................................411

OP-1 Deletes all NOP instructions in the program .....................................412


OP-2 Monitors and changes EV area of Timer /Counter ................................413
OP-3 Monitors and changes SVarea of Timer /Counter ..................................414
OP-7 Monitors relays (1 to 4 points) .........................................................415
OP-8 Monitors and changes 1 word data (register values) .........................417
OP-9 Totally checks a program .....................................................................418
OP-10 Turns ON/OFF (set/reset) relays forcedly. (only PROG. Mode) ..........419
OP-11 Turns ON/OFF (set/reset) relays forcedly. (only RUN. Mode) ............420
OP-12 Monitors and changes 2 word data (register values) .........................421
OP-14 Editing in the RUN Mode. ....................................................................423
OP-20 Sets and Monitors the Link Unit number (01∼63) ............................424
OP-21 Sets and Monitors the Link Loop number (01∼03) ............................426
OP-30 remote operation ( PROG. Mode -> RUN Mode) ......................................427
OP-31 remote operation ( RUN Mode -> PROG. Mode) ....................................428
OP-32 Read of PLC Mode .................................................................................429
OP-40 Registers and Reads registered state in the TEST RUN .....................430
OP-41 Operation of TEST RUN .......................................................................431
OP-50 Monitors/ Sets Ssystem register values .............................................432
OP-51 Initializes Ssystem register values ..................................................433
OP-52 Allocates I/O Map (Current PLC I/O ) ................................................434
OP-60 Reads, Writes, Changes, Deletes of COMMENT ......................................435
OP-61 Totally deletes COMMENT ....................................................................436
OP-62 Deletes innecessary parts in the COMMENT area ...............................437
OP-90 Transfers a program from ROM to internal RAM ...................................438
OP-110 Displays the self-diagnostic error codes .........................................439
OP-111 Clears MSG instruction messages ........................................................440
Appendix 4. Error and Troubleshooting
in the Handy loader ..................................................441
4-1. ERROR in the program edit .......................................................................442
4-1-1. ERROR in the program edit instruction .........................................442
4-1-2. ERROR in the OP-9 or OP-30
ERROR in the TEST RUN .......................................................................443
4-1-3. Communication ERROR of High level instruction. ...........................444
4-1-4. ERROR in the operating of Handy loader ...........................................447
4-2. Self-diagnostic display and operaton table ...........................................448

Appendix 5. Ascii Code ...........................................................................451

-9-
Chapter 1
Data Memory(Operand)
1-1. Data Memory(Operands)

Number
Names of Operand of points Data No. Functions

X External input relay 2,048 Bit 0∼127F A total of 2,048 I/0 points can be used.
Any external output relay ( Y ) which is not
used as an external output can be assigned
Y External output relay 2,048 Bit 0∼127F as an internal relay.

R Internal relay 1,568 Bit 0∼97F Relay which can be used only in the
PLC
Relay for the transfer of data used in the
L Link relay 2,048 Bit 0∼127F PLC Link. Any link relay ( L ) which is
not used for the link can be assigned as
an internal relay.

R Special relay 176 Bit 9000 ∼ An internal relay having a specific


910F application.

T/ C Timer / Counter 256 Bit 0∼255 Timer / counter contact.

Data memory which can be used in the


DT Data register 2,048 Wor 0∼2047 PLC. Uses one word ( 16-bit ) units.
d
As extension of the data register,
FL File register 22,525 Wor 0∼222524 the sequence program area can be
d used. Uses one word
units.
Data memory for the transfer of data
Ld Link register 256 Wor 0∼255
used in the PLC Link.
d

DT Special data register 256 Wor 0∼255 Data register having a specific
d application.

Timer /Counter 256 Wor 0∼255 Data memory in which the Preset ( Set
SV Set value area
d ) value of timer / counter is stored.

Timer /Counter 256 Wor 0∼255 Data memory in which the Elapsed
EV Elapsed value area
d value of timer / counter is stored.

IX Index register 2 Wor IX, IY Data memory enable to indirect


IY addressing
d

Notes :

These are the maximum values which can be used when the sequence program area is set to
2k steps (minimum).

The lowest digit for X, Y, R and L is in hexadecimal and the second and higher digits are
in decimal to enable both bit and word processing.
All other numbers are in decimal.
■ Bit No. and Word No.
Correspondence between bit No. and word No.

Place a" W" before the relay symbol to address a relay ( which can be addressed in bit units ) in word units.

Example 1 : For Y

Y 5 7 D W 5 7
Y
Bit No. in hexadecimal 0 to F

Word No. in decimal 0 0 to 9

Example 2 : For WX7 which consists of 16 X contacts (X70 ∼ X7F )

X7 X7 X7D X7C X7 X7 X79 X78 X77 X76 X75 X74 X73 X72 X71 X70

WX7 F E B A

Bit No.(Decimal + Hexadecimal) Word No. (Decimal)

X0 to XF WX0
X10 to X1F WX1
External input relay
X1260 to X126F WX126
X1270 to X127F WX127

Y0 to YF WY0
Y10 to Y1F WY1
External output relay
Y1260 to Y126F WY126
Y1270 to Y127F WY127

R0 to RF WR0
R10 to R1F WR1
Internal Relay
Y960 to Y96F WR96
Y970 to Y97F WR97

R9000 to R900F WR900


R9010 to R901F WR901
Special Relay
R9090 to R909F WR909
R9100 to R910F WR910

L0 to LF WL0
L10 to L1F WL1
Link relay
L1260 to L126F WL126
L1270 to L127F WL127
1. External I/0 Relays ( X, Y )
The external I/0 relays exchange data with the external I/0 units.

External Input Relay ( X )

This relay feeds signals to the PLC from an external device ( e.g. limit switch,
photoelectric sensor ).

There is no limit on the number of times it can be used in a program.

LS6 X6

PB10
XA

LS13
XC

External Input Device PLC Program

External Output Relay ( Y )

This relay outputs the operation result of the PLC and activates an external device such as a
solenoid or display unit.

There is no limit on the number of times it can be used as a contact in a program.


However, its use in an out instruction ( OUT ) can be set in system register to either multiple use
disable or multiple use enable. ( System register No. 20 → 0 : stop, 1 : run )

External output relays ( Y ) in the area in which the Input Unit is installed and in the area in
which the unit is not installed can be both used as internal relays.
However, this case is not of the hold type.

LS6 Motor 5 X6 Y25


( )
PB10
XA

LS13 Sol. Valve6


XC Y26
( )

External Output Device PLC Program

Remark :

Both external input relays ( X ) and external output relays ( Y ) can be handled as WX and WY in
1-word units. (Data can be processed in 1-bit units when X and Y are specified and in 16-bit units
when WX and WY are specified.)
2. Internal Relay ( R )
The internal relay(R) does not provide an external output and can be used only within the PLC.

There is no limit on the number of times it can be used as a contact in a program.


However, its use in an out instruction ( OUT ) can be set in system register to either
multiple use disable or multiple use enable. ( System register No.20 → 0: stop, 1: run )

Start of hold area is specified in System register No.7.


( Range WR 0 to WR 98 can be specified in 1-word units.
When K98 is specified as the hold area in system register
( No. 7, the entire area is set to the non-hold.)

R0

Non-hold area
R59F

60 WR60 ∼ R600

Hold area
R97F

Remark :

The internal relay ( R ) can be handled as WR in 1-word units.


( Data can be processed in 1-bit units when R is specified and in 16-bit units when WR is
specified. )
3. Timer/ Counter ( T/ C )
Handled as timer/ counter contacts(relays).

Assigning timer/ counter and hold/ non-hold area is performed in system registers.

0

Specify the start No. of the counter Timer area
in System register No. 5. 199
(It can be specified in 1-point units within the
range 0 to 256. 200 200
If K256 is specified, all area become timers.) Counter area ∫

255
default value

0
Specify the start No. of the hold type ∫
Non-hold area
in System register No. 6. 199
( It can be specified in 1-point
units within the range 0 to 256. 200 200
if K256 is specified, the entire Hold area ∫
area will be the non-hold type. )
255

default value

Note :

The timer/counter ( T/C ) contacts cannot be handled in 1-word unit.


It is recommended that the start No. of the counters use the same start No. as the hold area.

■ Timer/counter Preset ( Set ) value area ( SV )


This area stores the Preset ( Set ) value of the timer/counter for the program. ( 1-word )
This area is written with the Preset ( Set ) value for the program when the PLC is switched to the RUN mode.

Unused areas are filled with 0.


This area can be rewritten by the program during the RUN mode.
This also allows operation by changing the Preset ( Set ) value of the timer/ counter.
Furthermore, this area can also be rewritten by a peripheral device.
However, this area will be rewritten with the default value in the program if the mode is first set to PROG. and
then to RUN.

■ Timer/counter Count ( Elapsed ) value area ( EV )


This area stores the Count ( Elapsed ) value of the timer/ counter. ( 1-word )

This area can also be rewritten.


The Count ( Elapsed ) value of the timer/counter in operation can be changed and the operation lengthened or
shortened.
[1] Timer processing method
1) The timer instruction ( TM ) copies the Preset ( Set ) value in the program to the Preset ( Set )
value area (SVn ) of the corresponding timer number when the power is turned ON with the mode
selector switch set to the RUN mode or when the mode selector switch is switched from the PROG.
mode to the RUN mode.
Then, in the RUN mode, the value from the Preset ( Set ) value area ( SVn ) is transferred to the
Count( Elapsed ) value area ( EVn ) when the timer operating trigger tums ON.

2) The next scan continues and when the operating trigger tums ON, the Count ( Elapsed ) time of the
previous scan is subtracted from the Count ( Elapsed ) value area ( EVn ) arid the result is placed
back into the Count( Elapsed ) value area ( EVn ).
If the result is 0 or negative, the timer times out, the timer contact turns ON and the Count
( Elapsed ) value area is set to O.

3) If the trigger turns OFF while the timer is in the timing operation or has timed out, the Count
( Elapsed ) value area is set to 0 and the timer contact tums OFF.

4) Since the timer instruction ( TM ) subtracts the elapsed time of the previous scan from the Count
(Elapsed) value area ( EVn ) when the trigger tums ON, be sure to execute it once during each scan.
If the timer instruction ( TM ) is not executed ( e.g. due to a jump instruction ) during a scan, the
Count ( Elapsed ) value will not be decremented.
( During this period, the timer's Count ( Elapsed ) value will remain unchanged. )

5) The Preset ( Set ) value area ( SVn ) and Count ( Elapsed ) value area ( EVn ) can be read from
and written to as desired.
[2] Timer accuracy
1) The period from when the trigger of the timer instruction (TM ) tums ON to the point when the timer times out,
time accuracy is:

Input delay : + 1 scan time


Output delay : + I scan time (The error generated is the total + 2 scan times.)

Further, an error is generated because of the difference in the base time.

TM-R (0.01 s) Error due to base time ( 2.5 ms unit ) : - 2.5ms


TM-X (0.I s) Error due to base time ( 25 ms unit ) : - 25ms
TM-Y (1.0 s) Error due to base time ( 250 ms unit ) : - 250ms

2) The results are summarized in the table below.

Type of Timer Accuracy

TM - R ( 0.01 s) - 2.5 ms to + 2-scan time

TM - X ( 0.1 s) - 25 ms to + 2-scan time

TM - Y ( 1.0 s) - 250ms to + 2-scan time


4. Data registers ( DT : DT0 to DT2047 )

Data registers represent data memory that can be used within the PLC.

Data registers are configured as word units

They can also be handled in two-word units.


In this case, the specified register number becomes the low order

When Dn is specified : Dn + 1 Dn

High order word Low order word

Assignment of the hold/ non-hold type area is performed in the System register.

Start of hold area is specified in System 0


0
register No. 8. ( Range 0 to 2048 can be
specified in 1-word units.
If system register No. 8 is set to 2048,
all of the data registers will be the Hold
non-hold type. ) default value
Area

2047

5. File registers ( FL : FL0 to FL22525 )

The file registers are for data register expansion and use the user program area.
They are used in the same manner as data registers.
The start of the hold area can be specified in 1 -word units in system register No. 9.

File registers are configured as word units

They can also be handled in two-word units.


In this case, the specified register number becomes the low order

When FLn is specified : FLn + 1 FLn

High order word Low order word


6. Link relay ( L )

Description
The link relay is for the PLC Link and cannot be used as an external output.

The range of memory used for the link register, the starting address of the send area, the number of
words in the send area, and the starting address of the hold area can be specified using the System
register.

Specify the settings above separately for Link Loop 0 and Link Loop 1.
The size of the area for each is fixed at 1,024 points.
7. Link register (Ld)

Description
The link register is a data register for the PLC link and cannot be used as an external output.

The range of memory used for the link register, the starting address of the send area, the number of
words in the send area, and the starting address of the hold area can be specified using the System
register.

Specify the settings above separately for Link Loop 0 and Link Loop 1.
The size of area for each is fixed at 128 words.
8. Special relays ( R : R9000 to R910F )

Description
These are special relays which have specific applications.

These special relays cannot be used for output. Use them only as contacts.

WORD NO. NUMBER ITEM DESCRIPTION

Normal : ON, Error :OFF


R9000 Self diagnosis error
The outcome of self diagnosis is set on DT9000

R9001 Voltage dip *1 The times of voltage dips are set on DT9001.

R9002 Fuse blow The fuse blown slots are set on DT9002, DT9003.

R9003 Advanced unit error The error slots are set on. DT9006,DT9007.

R9004 I/O verify error The verify error slots are set on DT9010, DT9011.

R9005 Battery error Error :ON Restored :OFF

Error : ON *2
R9006 Battery error holding
Once a battery error is found, that is held even after restoring.

HOLD.
R9007 Operation error flag
The error address is set on DT9017.
WR900 NEWEST.
R9008 Operation error flag
The error address is set on DT9018

Sets when an operation overflow or an underflow occurs,


R9009 Carry flag
or by a shift instruction.

R900A >flag ON when the compared result is larger.

ON when the compared results are equal or the operated


R900B = flag
result is 0.

R900C <flag ON when the compared result is smaller.

Auxiliary timer Turns ON when the set value is decreased and


R900D
instruction (F137) reaches 0. Turns OFF when it is being decreased or cleared.

R900E Unused

R900F Unused

*1. When a voltage dip less than 10millisec. occurs, the PLC continues to run. When
more than 20millisec., it stops and its output becomes OFF. When from 10 to 20
millisec., the operation is decided by the condition.

*2. To turn off the battery error holding relay, turn off the power or initialize it.

Notes :

1. When a voltage dip less than 10ms. occurs, The PLC continues to run.
When more than 20ms, it stops and its output becomes OFF. When from 10 to 20ms, the
operation is decided by the condition.
2. To turn off the battery error holding relay, turn off the power or initialize it.
WORD NO. NUMBER ITEM DESCRIPTION

R9010 Normally ON Normally ON relay

R9011 Normally OFF Normally OFF relay

R9012 Scan pulse Alternate between ON and OFF at each scan.

Turns ON only at the first scan of the program run and


R9013 Initial pulse (ON)
turns OFF after the second scan.

Turns OFF only at the first scan of the program run and
R9014 Initial pulse (OFF)
turns ON after the second scan.

Step initial pulse With SSTP instruction, turns ON only at the first scan
R9015
(ON) of a job run.

R9016 Unused

WR901 R9017 Unused

R9018 0.01sec. clock pulse 0.01sec. period clock pulse

R9019 0.02sec. clock pulse 0.02sec. period clock pulse

R901A 0.1sec. clock pulse 0.1sec. period clock pulse

R901B 0.2sec. clock pulse 0.2sec. period clock pulse

R901C 1sec. clock pulse 1sec. period clock pulse

R901D 2sec. clock pulse 2sec. period clock pulse

R901E 1min. clock pulse 1min. period clock pulse

R901F Unused
WORD NO. NUMBER ITEM DESCRIPTION

R9020 RUN mode flag RUN mode : ON, PROG mode : OFF

R9021 Test mode flag Test run mode : ON, Run mode : OFF

Break flag Turns ON during BRK instruction or when an instruction is


R9022
(while break :ON) executed.

Turns ON when BRK instruction is enabled in TEST RUN


R9023 Break enable flag
mode.

Output refresh flag in Turns ON when output refresh is specified in TEST RUN
R9024
TEST RUN mode.

Single instruction
R9025 Turns ON when single instruction execution is specified.
execution flag

R9026 Message flag Turns ON when MSG is executed.

Turns ON when RUN/PROG mode remote switching is


R9027 EXT (remote) flag
enabled.
WR902
R9028 Break cancellation flag Turns ON when break cancellation is specified.

Turns ON during forcing ON/OFF on Iput/Output/TM/CT,


R9029 Forced flag
etc.

External interrupt
R902A Turns ON when external interrupts are enabled.
EIflag

R902B Interrupt error flag Turns ON when an interrupt error occurs.

Sampling by instructions : 0 (OFF)


R902C Sample point flag
Sampling by fixed time interrupts :1 (ON)

R902D Sample trace end Turns ON when trace ends (stops).

R902E Sampling trigger flag Turns ON when trace trigger occurs.

R902F Sampling EI Turns ON when sampling operation start is specified.


WORD NO. NUMBER ITEM DESCRIPTION
SEND/RECV instruction 0 : Not executable (executing)
R9030
executable flag 1 : Executable
SEND/RECV instruction end 0 : Normal end
R9031
flag 1 : Abnormal end →Error code DT9039
Print instruction executable 0 : Not executing
R9033
flag 1 : Executing
WR903 Turns ON during editing/inserting/deleting a program
R9034 Editing in RUN mode flag
in RUN mode.
RMRD and RMWT 0 : Not executable (executing)
R9035
instruction executable flag 1 : Executable
RMRD and RMWT 0 : Normal end
R9036
instruction end flag 1 : Abnormal end →Error code DT9036

WORD NO. NUMBER ITEM DESCRIPTION


Turns ON when a link/link set error occurs in Link
R9050 Link error (Link 1)
Loop1.
Turns ON when a link/link set error occurs in Link
R9051 Link error (Link 2)
Loop2.
Turns ON when a link/link set error occurs in Link
R9052 Link error (Link 3)
Loop3.
Remote error Turns ON when a transmission/set error occurs at
R9058
(Master Unit 1) Remote Master Unit NO.1.
Remote error Turns ON when a transmission/set error occurs at
R9059
(Master Unit 2) Remote Master Unit NO.2.
Remote error Turns ON when a transmission/set error occurs at
WR905 R905A
(Master Unit 3) Remote Master Unit NO.3.
Remote error Turns ON when a transmission/set error occurs at
R905B
(Master Unit 4) Remote Master Unit No.4.

R905C

R905D

R906E

R905F
WORD
NUMBER ITEM DESCRIPTION
NO.
Unit No.1 Normal transmission : ON,
R9060
error or stop : OFF
Unit No. 2 Normal transmission :ON,
R9061
error or stop : OFF
Unit No.3 Normal transmission :NO,
R9062
error or stop : OFF
Unit No. 4 Normal transmission :ON,
R9063
error or stop : OFF
Unit No. 5 Normal transmission : ON,
R9064
error or stop : OFF
Unit No. 6 Normal transmission : ON,
R9065
error or stop : OFF
Unit No. 7 Normal transmission : ON,
R9066
error or stop : OFF

R9067
Transmission Unit No. 8 Normal transmission : ON,
Assurance Relay for error or stop : OFF
WR906 Unit No. 9 Normal transmission : ON,
R9068 PLC LINK 0
error or stop : OFF
Unit No. 10 Normal transmission : ON,
R9069
error or stop : OFF
Unit No. 11 Normal transmission : ON,
R906A
error or stop : OFF
Unit No. 12 Normal transmission : ON,
R906B
error or stop : OFF
Unit No. 13 Normal transmission : ON,
R906C
error or stop : OFF
Unit No. 14 Normal transmission : ON,
R906D
error or stop : OFF
Unit No. 15 Normal transmission : ON,
R906E
error or stop : OFF
Unit No. 16 Normal transmission : ON,
R906F
error or stop : OFF
WORD
NUMBER ITEM DESCRIPTION
NO.

R9070 Unit No.1 RUN mode : ON, PROG mode : OFF

R9071 Unit No.2 RUN mode :ON, PROG mode : OFF

R9072 Unit No.3 RUN mode : ON, PROG mode : OFF

R9073 Unit No.4 RUN mode : ON, PROG mode : OFF

R9074 Unit No.5 RUN mode : ON, PROG mode : OFF

R9075 Unit No.6 RUN mode : ON, PROG mode : OFF

R9076 Unit No.7 RUN mode : ON, PROG mode : OFF

R9077 Operation Mode Unit No.8 RUN mode : ON, PROG mode : OFF
WR907 Relay for PLC
R9078 LINK 0 Unit No.9 RUN mode : ON, PROG mode : OFF

R9079 Unit No.10 RUN mode : ON, PROG mode : OFF

R907A Unit No.11 RUN mode : ON, PROG mode : OFF

R907B Unit No.12 RUN mode : ON, PROG mode : OFF

R907C Unit No.13 RUN mode : ON, PROG mode : OFF

R907D Unit No.14 RUN mode : ON, PROG mode : OFF

R907E Unit No.15 RUN mode : ON, PROG mode : OFF

R907F Unit No.16 RUN mode : ON, PROG mode : OFF


WORD
NUMBER ITEM DESCRIPTION
NO.
Unit No.1 Normal transmission : ON,
R9080
error or stop : OFF
Unit No. 2 Normal transmission :ON,
R9081
error or stop : OFF
Unit No.3 Normal transmission :ON,
R9082
error or stop : OFF
Unit No. 4 Normal transmission :ON,
R9083
error or stop : OFF
Unit No. 5 Normal transmission : ON,
R9084
error or stop : OFF
Unit No. 6 Normal transmission : ON,
R9085
error or stop : OFF
Unit No. 7 Normal transmission : ON,
R9086
error or stop : OFF
Unit No. 8 Normal transmission : ON,
R9087 Transmission
error or stop : OFF
WR908 Assurance Relay for
Unit No. 9 Normal transmission : ON,
R9088 PLC LINK 1 error or stop : OFF
Unit No. 10 Normal transmission : ON,
R9089
error or stop : OFF
Unit No. 11 Normal transmission : ON,
R908A
error or stop : OFF
Unit No. 12 Normal transmission : ON,
R908B
error or stop : OFF
Unit No. 13 Normal transmission : ON,
R908C
error or stop : OFF
Unit No. 14 Normal transmission : ON,
R908D
error or stop : OFF
Unit No. 15 Normal transmission : ON,
R908E
error or stop : OFF
Unit No. 16 Normal transmission : ON,
R908F
error or stop : OFF
WORD
NUMBER ITEM DESCRIPTION
NO.

R9090 Unit No.1 RUN mode : ON, PROG mode : OFF

R9091 Unit No. 2 RUN mode :ON, PROG mode : OFF

R9092 Unit No.3 RUN mode : ON, PROG mode : OFF

R9093 Unit No. 4 RUN mode : ON, PROG mode : OFF

R9094 Unit No. 5 RUN mode : ON, PROG mode : OFF

R9095 Unit No. 6 RUN mode : ON, PROG mode : OFF

R9096 Operation Mode Unit No. 7 RUN mode : ON, PROG mode : OFF
Relay for PLC
R9097 LINK 1 Unit No. 8 RUN mode : ON, PROG mode : OFF
WR909
R9098 Unit No. 9 RUN mode : ON, PROG mode : OFF

R9099 Unit No. 10 RUN mode : ON, PROG mode : OFF

R909A Unit No. 11 RUN mode : ON, PROG mode : OFF

R909B Unit No. 12 RUN mode : ON, PROG mode : OFF

R909C Unit No. 13 RUN mode : ON, PROG mode : OFF

R909D Unit No. 14 RUN mode : ON, PROG mode : OFF

R909E Unit No. 15 RUN mode : ON, PROG mode : OFF

R909F Unit No. 16 RUN mode : ON, PROG mode : OFF


9. Special data registers ( DT : DT9000 to DT9255 )
The special data registers are data registers which have specific purposes.

Data cannot be written to special data registers except for the step ladder condition display ( DT9060 to DT9122 )

Note :
The special data registers ( DT9060 to DT9122 ) can be written with the FPST-software or Handy loader
.
Using this function. the step ladder programs can be forced ON or OFF optionally.
However, the values cannot be changed w th h gh leve nstructions [e.g. move instruction ( MV ) ]

NUMBER NAME DESCRIPTION

DT9000 Self-diagnosis Keeps the result of self-diagnosis.

DT9001 voltage dip times *1 Keeps voltage dip times.

Bit 0 ∼ Bit 15 1 : Error


DT9002 Fuse blow unit
→Slot 0 →Slot 15 0 : Normal
Bit 0 ∼ Bit 15 1 : Error
DT9003 Fuse blow unit
→Slot 16 →Slot 31 0 : Normal

DT9004 Unused

DT9005 Unused

Abnormal advanced Bit 0 ∼ Bit 15 1 : Error


DT9006
unit →Slot 0 →Slot 15 0 : Normal
Abnormal advanced Bit 0 ∼ Bit 15 1 : Error
DT9007
unit →Slot 16 →Slot 31 0 : Normal
DT9008 Unused
DT9009 Unused
Bit 0 ∼ Bit 15 1 : Error
DT9010 Verify error unit
→Slot 0 →Slot 15 0 : Normal
Bit 0 ∼ Bit 15 1 : Error
DT9011 Verify error unit
→Slot 16 →Slot 31 0 : Normal

DT9012 Unused

DT9013 Unused

Operation auxiliary
DT9014 Used by BSR, BSL instructions.
register
Operation expansion
DT9015 Remainder of 16-bit division.
register (0)
Operation expansion Remainder of 32-bit division. Use with
DT9016
register (1) expansion register (0).
Operation error Hold. Keeps the latest address where an
DT9017
address operation error occurs.
Operation error
DT9018 Newest. Keeps the latest address where an operation error occurs.
address
Increments by one every 2.5millisec. You can know time by
DT9019 2.5msec. RING counter subtracting the previlus value from current value and dividing the
difference by 2.5.
NUMBER NAME DESCRIPTION
Keeps the maximum program address of the program area size
DT9020 Program max. value
of SYSTEM REGISTER SETTING.
File register max.
DT9021 Keeps the maximum no. of the file register.
value
Current value : Shows the current value of scan time.
DT9022 Scan time ex.) within 5millisec. when the display is K50,
and within 12.5millisec. when K125

DT9023 Scan time Minimum value : Keeps the minimum value of the scan time.

DT9024 Scan time Maximum value : Keeps the maximum value of the scan time.

Set with ICTL instruction.


Interrupt unit masked
DT9025 Bit 0 ∼ Bit 15 0: Masked state
state
→Input 0 →Input 15 1: EI
Masked state of Set with ICTL instruction.
DT9026 Advanced unit which Bit 0 ∼ Bit 7 0: Masked state
generates interrupts. →Input 0 →Input 7 1: EI
Time interrupt Set with ICTL instruction.
DT9027
interval 0 : Masked state , E1 : K1∼3000 (x 10msec.)
Sets with MONITORING DYNAMIC TIMING in FPST.
DT9028 Sample trace interval
0∼3000 (x 10millisec.)

DT9029 Break address Keeps Break address in TEST RUN.

DT9030 Message 0 Keeps the content of MSG instruction.

DT9031 Message 1 Keeps the content of MSG intruction.

DT9032 Message 2 Keeps the content of MSG intruction.

DT9033 Message 3 Keeps the content of MSG intruction.

DT9034 Message 4 Keeps the content of MSG intruction.

DT9035 Message 5 Keeps the content of MSGT intruction.

RMRD and RMWT


DT9036
instruction
Work 1 for search
DT9037 Keeps the number of searched instructions.
instruciton
Work 2 for search
DT9038 Keeps the relative address of the date agreed first.
instruction
Keeps the end code of the data SEND/RECV.
DT9039 SEND/RECV end code
0 = Normal
NUMBER NAME DESCRIPTION
Running: 1 Bit 0 ∼ Bit 15
DT9060
Waiting: 0 →Step 0 →Step 15
Running: 1 Bit 0 ∼ Bit 15
DT9061
Waiting: 0 →Step 16 →Step 31
Running: 1 Bit 0 ∼ Bit 15
DT9062
Waiting: 0 →Step 32 →Step 47
Running: 1 Bit 0 ∼ Bit 15
DT9063
Waiting: 0 →Step 48 →Step 63
Running: 1 Bit 0 ∼ Bit 15
DT9064
Waiting: 0 →Step 64 →Step 79
Running: 1 Bit 0 ∼ Bit 15
DT9065
Waiting: 0 →Step 80 →Step 95
Running: 1 Bit 0 ∼ Bit 15
DT9066
Waiting: 0 →Step 96 →Step 111
Running: 1 Bit 0 ∼ Bit 15
DT9067
Waiting: 0 →Step 112 →Step 127
Running: 1 Bit 0 ∼ Bit 15
DT9068
Waiting: 0 →Step 128 →Step 143
Running: 1 Bit 0 ∼ Bit 15
DT9069
Process Display Waiting: 0 →Step 144 →Step 159

DT9070
during Operation Running: 1 Bit 0 ∼ Bit 15
Waiting: 0 →Step 160 →Step 175
Running: 1 Bit 0 ∼ Bit 15
DT9071
Waiting: 0 →Step 176 →Step 191
Running: 1 Bit 0 ∼ Bit 15
DT9072
Waiting: 0 →Step 192 →Step 207
Running: 1 Bit 0 ∼ Bit 15
DT9073
Waiting: 0 →Step 208 →Step 223
Running: 1 Bit 0 ∼ Bit 15
DT9074
Waiting: 0 →Step 224 →Step 239
Running: 1 Bit 0 ∼ Bit 15
DT9075
Waiting: 0 →Step 240 →Step 255
Running: 1 Bit 0 ∼ Bit 15
DT9076
Waiting: 0 →Step 256 →Step 271
Running: 1 Bit 0 ∼ Bit 15
DT9077
Waiting: 0 →Step 272 →Step 287
Running: 1 Bit 0 ∼ Bit 15
DT9078
Waiting: 0 →Step 288 →Step 303
DT9079 Running: 1 Bit 0 ∼ Bit 15
Waiting: 0 →Step 304 →Step 319
NUMBER NAME DESCRIPTION
Running: 1 Bit 0 ∼ Bit 15
DT9080
Waiting: 0 →Step 320 →Step 335
Running: 1 Bit 0 ∼ Bit 15
DT9081
Waiting: 0 →Step 336 →Step 351
Running: 1 Bit 0 ∼ Bit 15
DT9082
Waiting: 0 →Step 352 →Step 367
Running: 1 Bit 0 ∼ Bit 15
DT9083
Waiting: 0 →Step 368 →Step 383
Running: 1 Bit 0 ∼ Bit 15
DT9084
Waiting: 0 →Step 384 →Step 399
Running: 1 Bit 0 ∼ Bit 15
DT9085
Waiting: 0 →Step 400 →Step 415
Running: 1 Bit 0 ∼ Bit 15
DT9086
Waiting: 0 →Step 416 →Step 431
Running: 1 Bit 0 ∼ Bit 15
DT9087
Waiting: 0 →Step 432 →Step 447
Running: 1 Bit 0 ∼ Bit 15
DT9088
Waiting: 0 →Step 448 →Step 463
Running: 1 Bit 0 ∼ Bit 15
DT9089
Process display Waiting: 0 →Step 464 →Step 479

DT9090
during operation Running: 1 Bit 0 ∼ Bit 15
Waiting: 0 →Step 480 →Step 495
Running: 1 Bit 0 ∼ Bit 15
DT9091
Waiting: 0 →Step 496 →Step 511
Running: 1 Bit 0 ∼ Bit 15
DT9092
Waiting: 0 →Step 512 →Step 527
Running: 1 Bit 0 ∼ Bit 15
DT9093
Waiting: 0 →Step 528 →Step 543
Running: 1 Bit 0 ∼ Bit 15
DT9094
Waiting: 0 →Step 544 →Step 559
Running: 1 Bit 0 ∼ Bit 15
DT9095
Waiting: 0 →Step 560 →Step 575
Running: 1 Bit 0 ∼ Bit 15
DT9096
Waiting: 0 →Step 576 →Step 591
Running: 1 Bit 0 ∼ Bit 15
DT9097
Waiting: 0 →Step 592 →Step 607
Running: 1 Bit 0 ∼ Bit 15
DT9098
Waiting: 0 →Step 608 →Step 623
DT9099 Running: 1 Bit 0 ∼ Bit 15
Waiting: 0 →Step 624 →Step 639
NUMBER NAME DESCRIPTION
Running: 1 Bit 0 ∼ Bit 15
DT9080
Waiting: 0 →Step 320 →Step 335
Running: 1 Bit 0 ∼ Bit 15
DT9081
Waiting: 0 →Step 336 →Step 351
Running: 1 Bit 0 ∼ Bit 15
DT9082
Waiting: 0 →Step 352 →Step 367
Running: 1 Bit 0 ∼ Bit 15
DT9083
Waiting: 0 →Step 368 →Step 383
Running: 1 Bit 0 ∼ Bit 15
DT9084
Waiting: 0 →Step 384 →Step 399
Running: 1 Bit 0 ∼ Bit 15
DT9085
Waiting: 0 →Step 400 →Step 415
Running: 1 Bit 0 ∼ Bit 15
DT9086
Waiting: 0 →Step 416 →Step 431
Running: 1 Bit 0 ∼ Bit 15
DT9087
Waiting: 0 →Step 432 →Step 447
Running: 1 Bit 0 ∼ Bit 15
DT9088
Waiting: 0 →Step 448 →Step 463
Running: 1 Bit 0 ∼ Bit 15
DT9089
Process Display Waiting: 0 →Step 464 →Step 479

DT9090
during Operation Running: 1 Bit 0 ∼ Bit 15
Waiting: 0 →Step 480 →Step 495
Running: 1 Bit 0 ∼ Bit 15
DT9091
Waiting: 0 →Step 496 →Step 511
Running: 1 Bit 0 ∼ Bit 15
DT9092
Waiting: 0 →Step 512 →Step 527
Running: 1 Bit 0 ∼ Bit 15
DT9093
Waiting: 0 →Step 528 →Step 543
Running: 1 Bit 0 ∼ Bit 15
DT9094
Waiting: 0 →Step 544 →Step 559
Running: 1 Bit 0 ∼ Bit 15
DT9095
Waiting: 0 →Step 560 →Step 575
Running: 1 Bit 0 ∼ Bit 15
DT9096
Waiting: 0 →Step 576 →Step 591
Running: 1 Bit 0 ∼ Bit 15
DT9097
Waiting: 0 →Step 592 →Step 607
Running: 1 Bit 0 ∼ Bit 15
DT9098
Waiting: 0 →Step 608 →Step 623
DT9099 Running: 1 Bit 0 ∼ Bit 15
Waiting: 0 →Step 624 →Step 639
NUMBER NAME DESCRIPTION
Running: 1 Bit 0 ∼ Bit 15
DT9100
Waiting: 0 →Step 640 →Step 655
Running: 1 Bit 0 ∼ Bit 15
DT9101
Waiting: 0 →Step 656 →Step 671
Running: 1 Bit 0 ∼ Bit 15
DT9102
Waiting: 0 →Step 672 →Step 687
Running: 1 Bit 0 ∼ Bit 15
DT9103
Waiting: 0 →Step 688 →Step 703
Running: 1 Bit 0 ∼ Bit 15
DT9104
Waiting: 0 →Step 704 →Step 719
Running: 1 Bit 0 ∼ Bit 15
DT9105
Waiting: 0 →Step 720 →Step 735
Running: 1 Bit 0 ∼ Bit 15
DT9106
Waiting: 0 →Step 736 →Step 751
Running: 1 Bit 0 ∼ Bit 15
DT9107
Waiting: 0 →Step 752 →Step 767
Running: 1 Bit 0 ∼ Bit 15
DT9108
Waiting: 0 →Step 768 →Step 783
Running: 1 Bit 0 ∼ Bit 15
DT9109
Process Display Waiting: 0 →Step 784 →Step 799

DT9110
during Operation Running: 1 Bit 0 ∼ Bit 15
Waiting: 0 →Step 800 →Step 815
Running: 1 Bit 0 ∼ Bit 15
DT9111
Waiting: 0 →Step 816 →Step 831
Running: 1 Bit 0 ∼ Bit 15
DT9112
Waiting: 0 →Step 832 →Step 847
Running: 1 Bit 0 ∼ Bit 15
DT9113
Waiting: 0 →Step 848 →Step 863
Running: 1 Bit 0 ∼ Bit 15
DT9114
Waiting: 0 →Step 864 →Step 879
Running: 1 Bit 0 ∼ Bit 15
DT9115
Waiting: 0 →Step 880 →Step 895
Running: 1 Bit 0 ∼ Bit 15
DT9116
Waiting: 0 →Step 896 →Step 911
Running: 1 Bit 0 ∼ Bit 15
DT9117
Waiting: 0 →Step 912 →Step 927
Running: 1 Bit 0 ∼ Bit 15
DT9118
Waiting: 0 →Step 928 →Step 943
DT9119 Running: 1 Bit 0 ∼ Bit 15
Waiting: 0 →Step 944 →Step 959
NUMBER NAME DESCRIPTION
Running: 1 Bit 0 ∼ Bit 15
DT9120
Waiting: 0 →Step 960 →Step 975
Process Display Running: 1 Bit 0 ∼ Bit 15
DT9121
during Operation Waiting: 0 →Step 976 →Step 991
Running: 1 Bit 0 ∼ Bit 15
DT9122
Waiting: 0 →Step 992 →Step 999

DT9123 Unused

DT9124 Unused

DT9125 Unused

DT9126 Unused

High order:master 2 Stores the added value


DT9127 Low order: master 1 at every Remote I/O
Times of Remote I/O service execution.
service High order:master 2 Stores the added value
DT9128 Loworder : master 1 at every Remote I/O
service execution.

DT9129 Unused

DT9130 Unused

Confirmation of High order:00H/01H : display selection (1)/(2)


DT9131 Remote I/O error Low order :00H/03H : display master selection
slave [selection] (master 1∼4)
Confirmation of
Remote I/O error Bit 0 ∼ Bit 15 0: normal
DT9132 slave [display 1] →Slave No. 1 →Slave No. 16 1: error
(1) Error slave No.
(current)
(2) I/O attribute Bit 0 ∼ Bit 15 0: normal
DT9133
change →Slave No. 1 →Slave No. 32 1: error
Confirmation of
Remote I/O error Bit 0 ∼ Bit 15 0: normal
DT9134
slave [display 2] →Slave No. 1 →Slave No. 16 1: error
(1) Error slave No.
(accumulative) Bit 0 ∼ Bit 15 0: normal
DT9135
(2) Vlotage dip →Slave No. 1 →Slave No. 32 1: error
Bit 0 ∼ Bit 7 :master 1 0:normal 1:error
Bit 8 ∼ Bit 15 :master 2 As to each bit, see
DT9136
Remote I/O system
Error code of technical manual.
Remote I/O Bit 0 ∼ Bit 7 :master 3 0:normal 1:error
Bit 8 ∼ Bit 15 :master 4 As to each bit, see
DT9137
Remote I/O system
technical manual.

DT9138 Unused

DT9139
Unused
NUMBER NAME DESCRIPTION
RING counter
DT9140

Receiving interval for PLC Link 0, Current value


DT9141
(× 2.5msec.)
Receiving interval for PLC Link 0, Minimum value
DT9142
(× 2.5msec.)
Receiving interval for PLC Link 0, Maximum value
DT9143
(× 2.5msec.)
DT9144 Sending times for PLC Link 0, RING counter
Sending interval for PLC Link 0, Current value
DT9145
(× 2.5msec.)
Sending interval for PLC Link 0, Maximum value
DT9146
(× 2.5msce.)
Sending interval for PLC Link 0, Maximum value
DT9147
(× 2.5msec.)
DT9148 Receiving times for PLC Link 1, RING counter
Receiving interval for PLC Link 1, Current value
DT9149
(× 2.5msec.)
Receiving interval for PLC Link 1, Minimum value
DT9150 PLC link status
(× 2.5msec.)
Receiving interval for PLC Link 1, Maximum value
DT9151
(× 2.5msec.)
Sending times for PLC Link 1, RING counter
DT9152

Sending interval for PLC Link 1, Current value


DT9153
(× 2.5msec)
Sending interval for PLC Link 1, Minimum value
DT9154
(× 2.5msec)
Sending interval for PLC Link 1, Maximum value
DT9155
(× 2.5msec)
System use, PLC Link 0, work for receiving interval measurement
DT9156

System use, PLC Link 0, work for sending interval measurement


DT9157

System use, PLC Link 1, work for receiving interval measurement


DT9158

DT9159
System use, PLC Link 1, work for sending interval measurement
NUMBER NAME DESCRIPTION
Link Unit No.
DT9160 Keeps Unit No. of Link Loop 1.
(Link 1)
DT9161 Error flag Keeps error flag of Link Loop 1.
Link Unit No.
DT9162 Keeps Unit No. of Link Loop 2.
(Link 2)
DT9163 Error flag Keeps error flag of Link Loop 2.
Link Unit No.
DT9164 Keeps Unit No. of Link Loop 3.
(Link 3)
Keeps error flag of Link Loop 3.
DT9165 Error flag

DT9166 Unused

DT9167 Unused

DT9168 Unused

DT9169 Unused

DT9170 PLC Link duplicate Unit No.

DT9171 Result of optical transmission, in TEST mode

DT9172 Times of lost tokens

DT9173 (Times of duplicate tokens)

DT9174 Times of no signal status

DT9175
Link 1 status Times of synchronization errors

DT9176 Send NACK

DT9177 Send NACK

DT9178 Send WACK

DT9179
Send WACK
NUMBER NAME DESCRIPTION

DT9180 Send answer

DT9181 Send answer

DT9182 Undefined command

DT9183 Times of parity errors

DT9184 End code receiving error

DT9185 Format error

DT9186 NOT support

DT9187 Self diagnosis result

DT9188 Times of loop changing

DT9189 Times of link error


Link 1 status
DT9190 Times of main route break

DT9191 Times of sub route break

DT9192 Loop reconstructing

DT9193 Loop Run mode

DT9194 Loop input status

DT9195 Unused

DT9196 Unused

DT9197 Unused

DT9198 Unused

DT9199 Unused
NUMBER NAME DESCRIPTION

DT9200 PLC Link duplicate Unit No.

DT9201 Result of optical transmission, TEST mode

DT9202 Times of lost tokens

DT9203 (Times of duplicate tokens)

DT9204 Times of no signal states

DT9205 Times of synchronization errors

DT9206 Send NACK

DT9207 Send NACK

DT9208 Send WACK

DT9209 Send WACK


Link 2 status
DT9210 Send answer

DT9211 Send answer

DT9212 Undefined command

DT9213 Times of parity errors

DT9214 End code receiving error

DT9215 Format error

DT9216 NOT support

DT9217 Self diagnosis result

DT9218 Times of loop changing

DT9219 Times of Link error


NUMBER NAME DESCRIPTION

DT9220 Times of main route break

DT9221 Times of sub route break

DT9222 Link 2 status Reconstructing loop

DT9223 Loop run mode

DT9224 Loop input status

DT9225 Unused

DT9226 Unused

DT9227 Unused

DT9228 Unused

DT9229 Unused

DT9230 PLC Link duplicated Unit No.

DT9231 Result of optical transmission, TEST mode

DT9232 Times of lost tokens

DT9233 (Times of duplicate tokens)

DT9234 Times of no signal states


Link 3 status
DT9235 Times of synchronization errors

DT9236 Send NACK

DT9237 Send NACK

DT9238 Send WACK

DT9239 Send WACK


NUMBER NAME DESCRIPTION

DT9240 Send answer

DT9241 Send answer

DT9242 Undefined command

DT9243 Times of parity errors

DT9244 End code receiving error

DT9245 Format error

DT9246 NOT support

DT9247 Link 3 status Self diagnosis result

DT9248 Times of loop changing

DT9249 Times of link error

DT9250 Times of main route break

DT9251 Times of sub route break

DT9252 Reconstructing loop

DT9253 Loop run mode

DT9254 Loop input status

DT9255 Unused
Chapter 2
System Register
2-1. System Register
Various PLC settings, such as memory area allocations or wait time, are stored in the System registers.
Set them to match your operating environment.
Check or change the system register settings using an Handy loader[the operational
instruction 50 ( OP 50 ) ] or the FPST-software's function.
The system register settings can be changed only when the CPU is in the program mode.

1. Memory Allocation
Set the size of the program area and file register area and configure the memory area to
match the operating environment.
The size of the memory area differs according to the CPU.

Address Default
No. Description Value Settable range

Sequence program area size setting N-700, N-7000 : 2∼16K Words


0 8
(includes system registers )( see note ) ( One word corresponds to one
step. )

Machine language program area size N70, N700, N7000 : 2∼14K


1 0
setting Words

Comment area size 3


2 Use default value "3".

3 Unused

4 Unused

Notes :

Set the sequence program area and machine language program area so that their
combined
total does not exceed 16 k words for the N70, N700, N7000 PLC.
2. Internal I/O Setting

Allocate the area or set the hold conditions for the various contacts and data.
Refer to 「2-6. Operands」.

Address Default
No. Description Value Settable range

Counter start No. setting 0∼256


5 200
( see note 1 ) (1-point unit setting) (see note 3. )

Timer/Counter hold area start No. 0∼256


6 200
setting ( see note 1 ) (1-point unit setting) (see note 3. )

0∼98
7 Internal relay hold area start No. 60
( word unit setting )
setting ( see notes 2 and 3 )

0∼2,048
8 Data register hold area start No. setting 0
( word unit setting )
( see notes 2 and 3 )

0∼22,525
9 File register hold area start No. setting 0
( word unit setting )
( see notes 2 and 3 )
0∼64
10 Link relay hold area setting for 0
PLC Link 0 ( word unit setting )
( see notes 2 and 3 )

64∼128
11 Link relay hold area setting for 64
PLC Link 1 ( word unit setting )
( see notes 2 and 3 )

0∼128
12 Link register hold area setting for 0
PLC Link 0 ( word unit setting )
( see notes 2 and 3 )

128∼256
13 Link register hold area setting for 128
PLC Link 1 ( word unit setting )
( see notes 2 and 3 )

14 Step ladder hold/ non-hold setting 1 0 : Hold 1 : Non-hold

15 Output hold/ non-hold setting 0 0 : Non-hold 1 : Hold

16 Unused

17 Unused

18 Unused

19 Unused

Notes :
1. Although system register Nos. 5 and 6 can be set to different numbers, it is recommended that
they should be set to the same number.
[ The Preset ( Set ) value area ( SV ) and Count ( Elapsed ) value area ( EV ) also will be set
to the hold type or non-hold type according to the setting of system register No. 6. ]
3. In order to make all of the area non-hold ( or a timer area ). set the range to one number
larger than the actual range.
2. For the hold and non-hold setting, the area after the set word No. is of the hold type and the area
before it is of the non-hold type.
3. Run Mode During an Error
Set the operation of the PLC in the event an error occurs during a run.
The default value has been set so that the PLC will stop when an error occurs.

Address Default
No. Description Value Settable range

20 Duplicate out 0 0: Disable, 1: Enable

21 Output unit fuse blow 0 0: Stop , 1: Continue

22 Advanced unit error 0 0: Stop , 1: Continue

23 1/0 verify error 0 0: Stop , 1: Continue

24 Watchdog timer time out by 0 0: Stop , 1: Continue


operation jam ( see note )

25 Unused

26 Operation error 0 0: Stop , 1: Continue

27 Remote I/0 slave link error 0 0: Stop , 1: Continue

28 I/0 error in Remote I/0 slave station 0 0: Stop , 1: Continue

29 Unused

Notes :
Set the scan check watchdog timer with system register No. 30.
The scan check watchdog timer function is available only in the N70, N700, N7000 PLC.
4. Wait Time Setting
Set the wait time for the time-out error detection of the various operations.
The relationship between the Preset ( Set ) value and set time is given below.
No. 30 to 32 : Set time ( ms ) = Preset ( Set ) value x 2.5 [ Preset ( Set ) value in decimal ]
No. 33 : Set time (μs ) = Preset ( Set ) value x 2.0 [ Preset ( Set ) value in decimal ]

Address Default
No. Description Value Settable range

30 Watchdog timer time out time setting 120 4 ∼256 ( 10ms to 640ms /
( see note 1. ) default : 300ms )

31 Time setting for managing multiple 2600 4 ∼32,760 ( 10ms to 81,9s /


frames ( see note 2. ) default : 6.5s ) ( see note 5. )

32 Time for SENT/ RECV, RMRD, RMWT 800 4 ∼32,760 ( 10ms to 81,9s /
( see note 3. ) default : 2.0s ) ( see note 5. )

33 Assignment time of block change in the 5000 1,000 ∼65,535


RUN mode ( see note 4. ) ( 2,000 ∼131.070μs /
default: 10ms)

Notes :
1. The scan check watchdog timer function is available only in the N70, N700 , N7000 PLC.
2. Setting for the delimiter processing wait time.
3. Setting for the time-out time for data transfer with the advanced unit connected
to the Slave Unit. PLC or computer connected to the Link Unit.
4. Setting for the scan time when modifying multiple instructions at once in the RUN mode.
5. Normally. use the default setting.
6. PLC Link Setting
Set the communication condition for PLC link 0 and PLC link 1.
Also set the link range and send area for the link relay(L) and link register(Ld).

Setting for PLC Link 0

Address Default
No. Description Value Settable range

40 Link relay area(L) setting 0 0 ∼64 Words (0 ∼1,024 points)

41 Link register area(Ld) setting 0 0 ∼128 Words

42 Link relay send Start word No. 0 0 ∼63


area setting
43 (L) Size of send words 0 0 ∼64 Words

44 Link register send Start word No. 0 0 ∼127


area setting
45 (Ld) Size of send words 0 0 ∼127 Words

46 Unused

47 Unused

48 Unused

49 Unused

Setting for PLC Link 1

Address Default
No. Description Value Settable range

50 Link relay area(L) setting 0 0 ∼64 Words (0 ∼1,024 points)

51 Link register area(Ld) setting 0 0 ∼128 Words

52 Link relay send Start word No. 64 64 ∼127


area setting
53 (L) Size of send words 0 0 ∼64 Words

54 Link register send Start word No. 128 128 ∼255


area setting
55 (Ld) Size of send words 0 0 ∼127 Words

56 Unused

57 Unused

58 Unused

59 Unused
Chapter 3.
INSTRUCTIONS
3-1. Programming Procedure ..............................................................................91
3-2. Basic operation of instruction ....................................................................92
3-3. High level instruction ..................................................................................93
3-3-1. Configuration of High level instruction .............................................93
3-3-2. Scan Execution type (F) and Pulse Execution type(P)
instruction...............................................................................................93
3-3-3. Consecutive Execution of High level instruction. .............................94
3-3-4. Over flow and Underflow ...................................................................94
3-3-5. Index register (IX, IY) ........................................................................95
3-3-6. Operation error .....................................................................................96
3-3-7. Constants (K, H, M )...........................................................................97
3-4. Table of Operands .......................................................................................99
3-5. Description of Instruction ..........................................................................101
1. Basic Instruction .........................................................................................103
2. High level instruction .................................................................................148
3-1. Programming Procedure
Be sure to check the following items before turning ON the power for the first time.
Is the ROM / RAM specification correct ?
Is the battery connector connected ?

Programming start

Set the Mode selector


switch to PROG. mode

Turn ON PLC

NO Create the
new Program

YES

Delete old Program


in the memory

Set starting address of


Prograrm

Write program

NO Write
completed ?

Correct syntax errors


YES

Check for Error found


syntax errors

NO Errors

Programming end
3-2. Basic Operation of Instruction
The instruction words can be divided into two types.

1-step instruction : 1-step instructions where one instruction is described in one step
Multiple-step instruction : Multiple-step instructions where one instruction is described in multiple steps

Instructions are broadly classified as follows.

Sequence basic instructions : perform logical operations in bit units and can perform equivalent
operations with relay sequence circuit.
Basic function instructions : Timer / Counter, a shift register instruction, etc.
Control instructions : master control, jump, steps ladder, subroutine, etc.
High level instructions : transfer instructions, BIN arithmetic operation, BCD arithmetic operation,
translation instructions and special instructions.

Check the following when entering a new program or modifying an existing program :

1. Is the PLCwhich is the target of operation by the peripheral device ( Handy loader , FPST software ) the same
as the Programmable Controller (PC) which is to input and modify a program ?
[ The remote programming function enables programs to be created and modified for all PLC in a link loop. ]
The Link Unit No. and link loop No. can be checked by the peripheral device ( Handy loadetr OP20 and
OP21, FPST-software : System register ).

2. Is the PLC, which is used to input and modify a program, RAM-based ?


Check the memory select switch of inside of CPU.
( OFF : RAM operation, ON : ROM operation )

3. If comments are to be provided for contacts, is the comment function installed in the PLC ?
The CPUs with the comment function are the CPL5221 for the N-7000 , N-700 PLC.

4. Is the PLC in PROG. mode ?


Set the CPU mode selector switch to PROG. mode.

With the N-7000 , N-700 PLC., a sub program such as an interrupt program or subroutine
program can be programmed separately from the main program.
Programs the sub program after the main program.
Also be sure to enter the end instruction ( ED ) in the last step of the main program.

Main program

( E D )

Sub program
(interrupt
program,
subroutine, etc. )
3-3. High Level Instruction

3-3-1. Configuration of High Level Instruction

In high level instructions, some instructions function both in 16-bit and 32-bit equally.
"D"( double words ) is placed before the name of 16-bit instructions ( Boolean ) for the 32-bit instructions.

Example : FO MV 16-bit move


F1 DMV 32-bit move

High level instructions specify the processing object. This object is called operand.

Example : [ FO MV S , D ]

Destination data area (Data area)


(Abbreviation of destination)

Source data area (Constant value or data area)


(Abbreviation of source)

Instruction (Boolean)

No. of instruction (Function No.)

[ F27 (-) S1 , S2 , D ]

Destination data area (Memory)

Source data area No2.(Constant value or data area)

Source data area No1.(Constant value or data area)

Instruction (Boolean)

No. of instruction (Function No.)

Note : When you operate in 32-bit, the lower 16-bit should be specified.

3-3-2. Scan Execution Type(F) and Pulse Execution Type(P) Instructions

There are two types of high level instructions :the scan execution type and the pulse execution
type which executes only the leading edge scan of the trigger

The pulse execution type are effective in shortening programs and execution time ( scan time ) when the
differential instruction (DF) is needed as a trigger of the high level instruction.
3-3-3. Consecutive Execution of High Level Instructions

Consecutive use of high level instructions

The high level instructions can be executed faster by using them in a consecutive execution format (
high level instruction --> high level instruction --> basic instruction ) instead of in a single execution
format ( high level instruction --> basic instruction --> high level instruction --> ).
Therefore, it is recommended that a number of high level instructions be used consecutively.
However, it is not possible to use scan execution type and pulse execution type instructions consecutively.

The high level instructions cannot be executed properly without a trigger.


However, operation is possible without triggers only when the high level instructions are programmed
consecutively with one trigger.

Example
X0
[FO MV. WRO, WRl]

[F22 (+) DT0, DT1, WR5]

[F11 COPY WR6, WY3, WY7


]

In the program example above, the second and third instructions are operated using the trigger ( X0 )
of the first F0( MV ) instruction. ( The triggers shown by the dotted lines are not required. )

3-3-4. Overflow and Underflow

In the instructions, the word ( 16-bit ) data or the double-word ( 32-bit ) data is treated. Sometimes the
operation result may exceed the maximum or go below the minimum in the range of 16-bit or 32-bit
data. They are called "overflow" and "underflow".
When "overflow" or "underflow" occurs, the carry flag ( R9009 )tums ON.

Binary operation ( 16-bit or 32-bit )

The result becomes negative minimum value if it is over positive maximum value ( overflow ).
The result becomes positive maximum value if it is under negative minimum value (underflow).
BCD operation ( 4-digit or 8-digit )

You can positive value only.


When the result is over the maximum value by one, it becomes the minimum value( overflow ).
When the result is under the mainium value by one, it becomes the maximum value( underflows)

3-3-5. Index Registers (IX, IY)

There are two ihdex registers ( IX and IY, each 16-bit available ).

The index register can be used as a address modifier for WX ( word input ), WY ( word
output ), WR ( word internal relay ), WL ( word link relay ), SV ( timer/counter set value area
), EV ( Timer/ Counter elapsed value area ), DT ( data register ), FL ( file register ) and
K ( decimal )/ H( hexadecimal ).
The index register, like the data register, can be used as an operand for high level instructions.
When used as an operand for 32-bit instructions. IX and IY are used as a set.
( IX : lower 16-bit, IY : higher 16-bit )

IX IY Therefore, specify IX as an operand for


32-bit instructions.
(It can be used as a modifier.)
Higher 16-bit Lower 16-bit

Example
Used as address modifier

X0
[FO MV. IXDT10, DT20]

In the example above, the memory contents of address DT (10 + n) will be transferred to
DT2O. The source data address is modified from the DTI0 by "n" with
the index register ( IX ). ( The "n" is the contents of IX )
Used as register

X0
[F1 DMV. DT10, IX ]

The content of DTI1, DT1O is transferred to IY, IX.


At this time, IY cannot be specified for the second operand since DMV is a 32-bit transfer instruction.

Notes :
You cannot add address modifier to the index registers. (IXIX, IXIY, IYIX, IYIY are impossible.)
If the index register is used as an address modifier, be sure each modified area does not exceed the
limit. If the limit is exceeded, the error flag turns ON.

3-3-6. Operation Errors

When operation error occurs at the high level instruction, the operation of the high level instruction
is stopped. At the same time, operation error flag R9007 and R9008 turn ON and the error code
(K45) is set at DT9000, and then ERROR LED lights.
The condition at the error can be selected ( operation stop / continue ) according to the setting of
the system register No. 26.
The error condition ( LED, R9008, DT9000 etc ) cannot be cleared until the power supply is once
turned OFF.

Operation errors
1) Address modifier ERROR : when the area modified by the index register exceeds the limit.
2) BCD data ERROR : when data except for BCD data is processed while BCD operation executes.
3) Parameter ERROR : when specified data is outside the range of instructions which need to
specify control data
4) Over area EEEOR : when the instructions execute in blocks and the target exceeds the range
of memory (see Note)

Notes :
Over area ERROR :
Do not specify last address of a memory area ( DT, FL, WY, WR, etc.) as a destination
for an instruction treating 32 or more bits length.
If the error of this kind occurs, the following probrems will occur.
( The data that will be destroyed is the maximum of 3 words. )

If the WL area is exceeded, the contact area for the Timer / Counter will be destroyed.
If the WY area is exceeded, the area for the input (X) wil! be destroyed.
Care should be taken when an input is begun at slot 0.
If the EV [ Count ( Elapsed ) value ] area is exceeded, the SV [ Preset ( Set ) value ] area
for the Timer / Counter will be destroyed.
If the LD ( Link data register ) area is exceeded, the start of the DT ( Data register ) will be
destroyed.
Although no area will be affected even if the WR ( Word internal relay ), DT ( Data register )
or FL( File register ) area is exceeded, the range of each area should not be exceeded.
3-3-7. Constants ( K, H, M )

(1) Decimal Constants ( K )

Decimal constants includes 16-bit and 32-bit constants.


Range of number when you use 16-bit constants : K-32768 ∼ K32767
Range of number when you use 32-bit constants : K-2147483648 ∼ K2147483647

You can use 16-bit constants in a 16-bit processing high level instruction and 32-bit
constants in a 32-bit processing high level instruction.

These decimal constants (K) can be set in the program by the Handy loader or the FPST-
software. However, the decimal constants (K) are stored into the PLC after they are translated into
binary data with sign.
In loading, they also are translated into decimal digits by a peripheral device.

Correspondence between decimal constants (K) and binary data with sign.

16-bit decimal constants 16-bit hexadecimal constants


K 32767 H 7FFF (Positive maximum value)

K10 H A

K1 H 1
KO H O
K-1 H FFFF

K-I0 H FFF6

K-32768 H 8000 (Negative minimum value)

32-bit decimal constants 32-bit hexadecimal constants

K 2147483647 H 7FFFFFFF

K1024 H 400

K1 H 1
KO H O
K-1 H FFFFFFFF

K-I024 H FFFFFC00

K-2147483648 H 80000000

Operation in the PLC is designed with binary data as a basis, so use a binary operation
instruction if possible.

Range of numbers that can be handled when a decimal constant is used as an operand of
Timer / Counter instructions.
KI ∼ K32767
(2) Hexadecimal Constants (H)

The hexadecimal constants (H) specify data divided per 4-bit as 1-digit of hexadecimal
digits. The hexadecimal constants (H) include 16-bit constants and 32-bit constants.
Range of number when you use 16-bit constants : HO ∼ HFFFF (4 digits)
Range of number when you use 32-bit constants: HO ∼ HFFFFFFFF (8 digits)

A hexadecimal constant can also be used as an operand for high level instruction.
A hexadecimal constant is also used as logic operations or inputting BCD data for BCD operations.

(3) BCD Constants ( H )

BCD constants includes 16-bit BCD constants and 32-bit BCD constants.
Setting of BCD data is performed with H constants. H constants are specified by data
devided per 4-bit with the same symbol as hexadecimal constants.
Range of number when you use 16-bit constants : HO ∼ H9999 (4 digits)
Range of number when you use 32-bit constants : HO ∼ H99999999 (8 digits)

You cannot use negative numbers in BCD constants.


BCD constants can be specified by BCD operation instruction, comparative instruction, BCD to BIN
translation instruction, etc.

Notes :
Use K constants when numbers are compared with the elapsed value of the Timer /
Counter.
If K constants are specified with BCD operation instruction, BCD error occurs.

(4) Character Constants ( M )

Character constants consist of 12 characters of ASCII codes data.


Instructions which you can use character constants are F 95 ( ASC ) ( character --> ASCII code )
instruction and F149 ( MSG ) ( Message display ) instruction.

Usable character constants on the N-7000 , N-700 PLC are shown below.

Programming Tool Usable character constants

FPST-software Letters A to Z, space, numerals, symbols (except %)

Notes :
The character "K", "H" or "M" preceding the constant represent decimal, hexadecimal
numbers, and character respectively.
3-4. Table of Operands

(1) Separated by processing unit


(2) Separated by function
3-5. Description of Instructions
1. Basic Instructions
Basic Sequence Instruction
ST Start ..........................................................................................103
ST/ Start not ...................................................................................103
OT Out .............................................................................................103
OR OR ...............................................................................................104
OR/ OR not ........................................................................................104
AN And .............................................................................................105
AN/ And/.............................................................................................105
/ Not .............................................................................................106
ANS AND Stack ...................................................................................107
ORS OR Stack .....................................................................................107
PSHS Push Stack .................................................................................108
RDS Read Stack .................................................................................108
POPS Pop Stack ...................................................................................108
KP Keep ...........................................................................................109
NOP No operation ..............................................................................110
DF Leading edge differential ........................................................111
DF/ Trailing edge differential ......................................................111

Basic Function Instructions


TM Timer ....................................................................................113
CT Counter .................................................................................115
F118(UDC) Up/ Down Counter ..................................................................116
SR Shift Register .....................................................................118
F119(LRSR) Left/ Right shift register .................................................120

Control Instructions
MC Mater control relay ..............................................................122
MCE Mater control relay End .......................................................122
JP-LBL Jump-Label .............................................................................124
LOOP-LBL Loop-Label...............................................................................126
BRK Break .....................................................................................128
ED End ........................................................................................129
CNDE Control End ...........................................................................130
NSTP Next Step ...............................................................................131
SSTP Start Step .............................................................................131
CSTP Clear Step .............................................................................131
STPE Step End ................................................................................131
CALL Subroutine call .....................................................................137
SUB Subroutine .............................................................................137
RET Return ....................................................................................137
INT Interrupt ..............................................................................139
IRET Interrupt return ...................................................................139
ICTL Interrupt control .................................................................140
ST START

ST/ START not

OT OUT

Outline ST : Begins a logic operation with a Form A ( normally open ) contact


ST/ : Begins a logic operation with a Form B ( normally closed ) contact
OT : Outputs the operated result.
Program
Address Command
example X0 Y30
0 〔 〕 0 ST X 0
X1 Y31 1 OT Y 30
2 〔 〕 2 ST X 1
3 OT Y 31

■ Operands
Bit operands
INSTRUCTION Steps
X Y R L T C
ST 1
OT 1
ST / 1
: Available

Description ■ ST, ST /
∙ Use the start instruction ( ST ) instead of the start not
(ST/) when Form B ( normally closed ) contact is used
for the external input device such as emergency stop
input.

X0 Y30
〔 〕

■ OT
Special relays ( R9000 to R901F ) can not be used as outputs.
Specify the send area or the area unused by the link function when the link relay of
station itself are used.
(If the link relays of another station are used, the data of the station will be over
written)
Duplicate use of same No. designation in the out ( OT ) and keep ( KP ) instruction
are prohibited.

NOTE :
lf the "DUPLICATE OUT" is set to "ENABLE" in system register, the error
dose not occur with the error check function (FPST Software ; SRCH ERROR
ADRS, Handy Loader : OP9) and the state of larger address No. has priority.
OR OR

OR/ OR not

Outline OR : Connects a Form A ( normally open ) contact in parallel.


OR / : Connects a Form B ( normally closed ) contact in parallel.

Program X0 Y30 Address Command


example
0 〔 〕
0 ST X 0
X1 1 OR X 1
1 2 OR/ X 2
X2 3 OT Y 30
2

■ Operands
Bit operands
INSTRUCTION Steps
X Y R L T C

OR, OR/ 1
: Available

Description ■ OR
The OR instruction ( OR ) can be used consecutively.

X0
Address Boolean
(Address0) 0 ST X
X1 0
1 OR X
(Address1)
1
X2 2 OR X
2
(Address2)

■ OR /
The OR not instruction (OR./) can also be used consecutively.

X0
Address Boolean
(Address0) 0 ST X
X1 0
1 OR/ X
(Address1)
1
X2 2 OR/ X
2
(Address2)
AN AND

AN/ AND not

Outline AN : Connects a Form A ( normally open ) contact in series.


AN/ : Connects a Form B ( normally closed ) contact in series.

Program
Address Command
example
X0 X1 X2 Y30
0 ST X 0
〔 〕 1 AN X 1
2 AN/ X 2
3 OT Y 30

■ Operands
Bit operands
INSTRUCTION Steps
X Y R L T C

AN, AN/ 1

: Available

Description ■ AN
∙The AND instruction (AN ) can be used consecutively.

Address Boolean
X0 X1 X2
0 ST X 0
(Address0) (Addressl) (Address2) 1 AN X 1
2 AN X 2

■ AN/
∙The AND not instruction (AN/) can also be used consecutively.

Address Boolean
X0 X1 X2
0 ST X 0
(Address0) (Addressl) (Address2) 1 AN/ X 1
2 AN/ X 2

Examples
The AND instruction(AN) can also be used to program in the following example.

Address Boolean
X0 Y30
0 ST X 0
〔 〕
(Address1) 1 OT Y 30
(Address0)

X1 Y31 2 AN X 1
〔 〕 3 OT Y 31
(Address2) (Address3)
/ not Steps : 1

Outline Inverts the operated condition.

Program X0 Y1F Address Command


example
0 〔 〕
0 ST X 0
X1 1 OR X 1
1 2 OR X 2
X2 3 /
2 4 OT Y
1F

Description The Not instruction ( NOT ) inverts the result of the operated condition.
ANS ٛ ND Stack

ORS OR Stack Steps : 1

Outline ANS : Connects instruction blocks in series.


ORS : Connects instruction blocks in parallel.

Program X0 X2 Y20 Address Command


example
0 〔 〕
0 ST X 0
X1 X3 1 OR X
2 1
3 ST X 2
X4 X5 Y21 4 OR X
6 〔 〕 5 3
6 ANS
X6 X7 7 OT Y
8 20
9 ST X 4
10 AN X
11 5
ST X 6
AN X
Description ■ ANS 7
ORS
Use AND stack instruction (ANS) to group OT Y
blocks in series. 21
X0 X2 Y20
A block begins with the start 〔 〕
instruction(ST). (Address0) (Address2) (Address

X1 X3 5)

(Address1) (Address3)

Block Block

(Address4)
■ ORS
Use OR stack instruction (ORS) to group
blocks inparallel.
A block begins whh the start X0 X2 Y21
instruction(ST). 〔 〕
(Address0) (Address1) (Address
5)

X1 X3

(Address2) (Address3)
Block
(Address4)

NOTE :
STK : Abbreviation of stack
The AND stack instruction (ANS) and OR stack instruction(ORS) takes the last
block of the entered instructions, combines it with the instructions which
were formed into the previous block, and forms a blocks as one group.
Block : Denotes a group of steps.
A section of program from the start instruction (ST) to the next start
instruction (ST),or until the out instruction (OT) comprises a block.
PSHS Push Stack

RDS Read Stack

POPS Pop Stack Steps : 1

Outline PSHS : Stores the operated condition before this instruction.


RDS : Reads the operated condition stored by the push stack
instruction ( PSHS ).
POPS: Reads and resets the operated condition stored by the push
stack instruction ( PSHS )

Program X0 X2 Y40 Address Command


example
0 〔 〕 0 ST X 0
X1 Y41 1 PSHS
2 AN X 2
〔 〕 3 OT Y 40
4 RDS
X2 Y42 5 AN X 1
〔 〕 6 OT Y 41
7 POPS
8 AN/ X 2
9 OT Y 42

Description ■ PSHS PSHS


(Address1)
Stores the operated condition before this X0 X2 Y40
instruction.( XO in the instruction above. )
〔 〕
(Address0) (Address2) (Address
3)
■ RDS RDS

Reads the operated condition stored by the (Address4)


push X1 Y41
stack instruction (PSHS) and, using itz 〔 〕
contents. (Address5) (Address
continues operation from the next step. 6)

POPS
■ POPS
(Address7)
X2 Y42
Reads the operated condition stored by the
push 〔 〕
stack instruction (PSHS)and, using its (Address8) (Address
contents, 9)
continues operation from the next step
Also clears the operated condition stored by
the
push stack instruction ( PSHS )

NOTE :

Read stack instruction (RDS) can be used any number of times.


KP Keep

Outline Turns ON/ OFF and keeps the output condition.

Program X0 Address Command


example
0 KP Y 0 ST X 0
50 1 ST X 1
X1 2 KP Y 50

■ Operands
Bit operands
INSTRUCTION Steps
X Y R L T C

KP 1
: Available

Description In the program example above, in the trigger XI turns OFF, output Y50 turns ON when
the leading edge of the trigger X0 is detected.
Furthermore. if a leading edge of the trigger K1 is detected, output Y50 turns OFF.
( Once the keep relay is turned ON. its ON state is rnaintained until a leading edge
of the trigger X1 is detected regardless of the ON or OFF states of the trigger X0)

Set trigger : X0

Reset trigger : X1

Output : Y50

If the set trigger and reset trigger turn ON simultaneously, the reset trigger has priority.
The keep relay maintains its state even during operation of the master control.
The output state is reset when the reset input turns ON.
The state of keep instruction ( KP ) is reset when switching from the RUN to PROG.
mode or turning OFF the power.
Use the hold-type internal relay if you want to keep the output state also when
switching from the RUN to PROG, mode or turning OFF the power.
Special relays can not be used as keep relays.
Specify the send area or the area unused by the link function when the link relays
of station itself are used.
( 1f the link relays of another station are used, the data of the station will be over
written. )
Duplicate use of same No. designation in the keep ( KP ) and out ( OT ) instructions
is prohibited.

NOTE :
lf the "DUPLICATE OUT" is set to "ENABLE" in system register, the error
dose not occur with the error check function (FPST Software ; SRCH ERROR
ADRS, Handy Loader : OP9) and the state of larger address No. has priority.
NOP Not operation Steps : 1

Outline Not operation

Program X0 X1 X2 Y25 Address Command


example
0 〔 〕
0 ST X 0
1 AND X 1
2 NOP
3 AND X 2
4 OT Y 25

Description This instruction does not affect the operation.


To delete the not operation instruction ( NOP ) after editing in PROG. mode, use
the
programming tools ( FPST-Software : DELETE ALL NOP, Handy Loader : OP1 ).

Examples
Deletion of an instruction :
To delete a certain instruction, overwrite it with a not operation instruction (
NOP ).
The instruction is deleted without affecting subsequence addresses.
Adjustment of addresses :
To move the starting point of a program block from address 999 to address
1000,
insert a not operation instruction ( NOP ) to address 999.
This moves the starting point to address 1000.
DF Leading edge differential

DF/ Trailing edge differential Steps : 1

Outline DF : Turns ON the contact only when the leading edge of the trigger
is detected.
DF/ : Turns ON the contact only when the trailing edge of the trigger
is detected.

Program
X0 Y40 Address Command
example
0 ( DF ) 〔 〕 0 ST X 0
X0 Y41 1 DF
2 OT Y 40
( DF /) 〔 〕 3 ST X 0
4 DF/
5 OT Y 41

Description In the program example above, the leading edge differential instruction ( DF ) executes
and tums ON output Y40 only for one scan duration when the tngger X0 changes from
the OFF to ON state.
The trailing edge differential instruction (DF/) executes and turns ON output Y41 only
for one scan duration when the trigger X0 changes from the ON to OFF state.
The program above operates as shown below.

trigger: X0

Output : Y40
→ ←
1 scan
Output : Y41
→ ←
1 scan

In the program shown at the right, when trigger X9 tums ON, the differential output is
active only for one scan.
Output Y35 does not turn ON even if XA subsequently turns ON or OFF.

X9 XA Y35
( DF ) 〔 〕
(Address (Address (Address (Address
0) 1) 2) 3)

There is no limit on the number of times the leading edge ( DF ) and trailing edge
(DF/) differential instructions can be used.
The differential output detects only changes in conditions after the mode is set to the
RUN mode.
The differential output is not active while the hold-type relay is ON or while the trigger is
ON from the first RUN scan.
The leading edge differential instruction ( DF ) is executed comparing the current condition
with the previously executed condition.
Even if the trigger for the leading edge differential instruction ( DF ) turns ON at the first
scan [ OFF for the trailing edge differential instruction ( DF /) ], no output is performed
since there is no previous value.
Furthermore, when it becomes re-executable after the master control relay ( MC ) or jump
( JP ) instruction, the previously executed condition is compared.

Examples
If the same input is specified as the trigger of X
the differential instruction and that of the master 0
control relay (MC) or jump (JP) instruction, ( MC 0)
the output (both leading edge and trailing edge)
is not produced. X Y35
0 ( DF ) 〔 〕
In the programs shown at the right. the leading
edge differential instruction (DF) will not be ( MCE 0)
executed at the leading edge of the trigger X0.

When outputting the result of trigger X0,


execute the leading edge differential instruction X
(DF) outside the master control relay (MC) or 0 ( JP 0)
jump (JP) and the label (LBL) instructions.
X Y35
0 ( DF ) 〔 〕
( LBL 0)
TM Timer Steps : 3

Outline Sets the ON-delay timer

Program Address Command


example TM X 267
X0 0 ST X 0
20 1 TM X 20
0
2 K 267
∼ ∼
∼ T20 X1 Y39 ∼ 45 ST T 20
45 〔 〕 46 AN X 1
47 OT Y 39

Description Selection of the time unit


① TM R : Sets the ON-delay timer for 0.01s unit {, 0 to 327.67s )
② TM X : Sets the ON-delay timer for 0. Is unit ( 0 to 3,276.7s )
③ TM Y : Sets the ON-delay timer for I.0s unit ( 0 to 32,767s )

Preset ( Set ) time


The formula of the Preset ( Set ) time is ;
[ the time unit ] x [ K constant ]
0 to 32,767 ( K constant ) can be set as Preset ( Set ) value.
Only the K constant is available for the timer instruciton ( TM ).

Up to 256 timer instructions ( TM ) are available.


However, as the number of the timer instruction ( TM ) is shared with that
of
counter instruction ( CT ), set the start No. of the counter instruction ( CT )
throuth the system regtster.
The default value of the sharing is;
- Timer instruction ( TM ) ; 0 to 199
- Counter instruction ( CT ); 200 to 255

Examples
TM X 20 K267 (0.1s x 267 = 26.7s)
The circuit above operates as shown below.

X0

X1

Y3
9
26.7s

The Timer ( TM R-n, TM X-n, TM Y-n )


TM R 29
instruction cannot be started directly from the Y25
bus. 29 〔 〕
When programming the timer, be sure to add a
trigger to the previous step. (X) No Good
The execution time of 0.01s and 0. Is timers ( TM R and TM X ) is 2μs and that
of 1sec timers ( TM Y ) is 40μs
The Preset (Set) value can be changed also in the RUN mode.

Timer operation
The timer instruction (TM) is a Down type preset timer.
The area used for the instruction are ;
Preset (Set) value area : SV n
Count (Elapsed) value area : EV n
n = timer instruction number

When the mode is set to the RUN mode, the Preset (Set) value is transferred to
the "SV n"
When the trigger of the timer instruction (TM) turns ON. the Preset (Set) value
is transferred to the "EV n" from the "SV n".
During the timing operation. the time is subtracted from the "EV n".
The scan time is also subtracted from the "EV n" in the next scan.
The timer contact turns ON. when the "EV n" becomes 0.

NOTE :

Since the timing operation is executed during the program execution,


make programs so that the timer instruction (TM) is executed once in one scan.
[ Be sure that the timer instruction (TM) is executed once in one scan when using
the interrupt (INT), jump (JP), loop (LOOP) instructions and others ]

Since the Preset (Set) value (SV) and the Count (Elapsed) value (EV) areas
from 0 to 255 will be occupied with the timer (TM) and counter (CT) instructions
automatically, pay attention n'ot to specify the area in conflict with the timer (TM)
and counter (CT) instructions when using them as the operands other instructions.
CT Counter Steps : 3

Outline Sets the Preset (Set) counter ( DOWN counter ).

Program X1 Address Command


example
0 CT 205
0 ST X 1
X0 100 1 ST X 0
1 2 CT 205
K 100
∼ ∼
∼ C205 X2 Y40 ∼
36 〔 〕 36 ST C
37 205
38 AN X 2
OT Y 40
Description Preset ( Set ) value
I to 32767 ( K constant ) can be set as Preset (Set) value.

Up to 256 counter instructions (CT) are available.


However, as the number of the counter instruction (CT) is shared with that of timer
instruction (TM), set the start No. of the counter instruction (CT) through the
system register setting.
The default value of the sharing is ;
① Timer instruction (TM) ; 0 to 199
② Counter instruction (CT) ; 200 to 255

When programming the counter instruction ( CT ), be sure to program the count


and reset inputs.
① Count trigger: one count at the leading edge of this signal
(trigger XI in the example above)
② Reset trigger: the condition is reset when this signal is ON
(trigger XO in the example above)

NOTE :
When the trailing edge of the reset trigger and the leading edge of the count
trigger are detected simultaneously, the reset trigger has priority.

The execution time of the counter instruciton (CT) is 2μs.


The Preset (Set) value can be changed also in the RUN mode.

Counter operation
The counter instruction (CT) is a DOWN type preset counter.
The area used for the instruction are ;
① Preset ( Set ) value area ; SV n
② Count ( Elapsed ) value area ; EV n
n = counter instruction number
When the mode is set to the RUN mode. the Preset(Set) value is transferred to
the "SV n". When the trailing edge of reset input is detected, the Preset(Set)
value is transferred to the "EV n" from the "SV n".
When the leading edge of count input is detected, the count value is subtracted from
the "EV n". The counter contact turns ON, when the "EV n" becomes 0.

NOTE :
Since the Preset(Set) value (SV) and the Count(Elapsed) value (EV)
areas from 0 to 255 will be occupied with the timer(TM) and counter(CT)
instructions automatically, pay attention not to specify the area in conflict
with the timer (TM)and counter (CT) instructions when using other instructions.

F118 (UDC), F37 and F38 instructions can also be used as counter instructions.
F118 Up / Down Counter Steps : 5

Outline Sets the UP /DOWN counter.

Basic style UP /DOWN trigger


of instruction
F118 UDC
Count trigger
S
Reset trigger D

S Preset(Set) value or area for Preset(Set)

D Area for Count ( Elapsed ) value

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description Preset (Set) value


I to 32767 ( K constant ) can be set as Preset (Set) value.

When programming the UP/ DOWN counter instruction (UDC). be sure to


progFam the
directive. count and reset inputs,
① Directive trigger : DOWN counting when the trigger is OFF state.
UP counting when the trigger is ON state.
( trigger X10 in the example before )
② Count trigger : adds or subtracts one count at the leading edge of this
signal. ( trigger X11 in the example before )
③ Reset trigger : the condition is reset when this signal is ON.
(trigger X12 in the example before )

Reset trigger
(D)←0
50(D) 50(S)

Count trigger
5 4 4 4 4 4 4 4 4 4 5
0 9 8 7 6 5 6 7 8 9 0

UP /DOWN trigger
DOWN UP

Subtraction Addition

NOTE :
When the trailing edge of the reset trigger and the leading edge of the count
trigger are detected simultaneously, the reset trigger has priority.
The flag ( special relay ) can be used as the counter contact.
Regarding flag explanation, refer to the "Flag condition" below.

NOTE :

Since the area for Count( Elapsed )value of the instruction is the hold-type,the
Count( Elapsed ) value is not reset when the power is supplied. If you need to
program the counter with reset at the power up, use the special relay ( R9013 ).

[The R9013 turns ON only for one scan duration when the Programmable Logic
Controller(PLC) is RUN mode.]

■ Flag condition
= flag ( R900B ) : Tums ON for an instant when the Count (Elapsed) value becomes 0.

Carry flag (R9009) : Tums ON for an instant, when the Count (Elapsed) value of the
counter becomes outside the countable range.

NOTE :
When using the special relays ( R900B and R9009 ) as flags of this instruction, be
sure to program the flags at the address right after the instruction.
Even if the same special relay is used also in the other part of the program. the
result of this instruction can be picked up using the internal relay.

Program Address Command


example X10
30 F118 UDC 30 ST X 10
31 ST X 11
X11 ST X 12
WR 0 32
31 33 F 118 (UDC )
X12 DT 0 WR 0
DT 0
32 38 ST R 9010
R9010 39 F 60 (CMP )
38 K 50
[F60 , CMP K 50, DT 0 ] DT 0
R900B R50 44 ST R 900B
44 〔 〕 45 OT R 50

Operation :
The Count ( Elapsed ) value is stored to the DT0.
The special relay R9010 is nom~ally ON relay.
With the compare instruction [ F60 ( CMP ) ], the value stored in the DT0 and K constant
are compared and the result of the comparison can be judged with the special relays
( R9009 to R900C ).
In the example, R900B becomes ON when the value in the DT0 is 50.

NOTE :
Regarding the expalanation of the compare instruction [F60 (CMP)], refer to
"F60 (CMP) 16-bit data Compare".
SR Shift register (left shift) Steps : 1

Outline Shifts one bit of 16-bit data to the left.

Basic style Data input


of instruction
SR WR n
Shift trigger
(D)
Reset trigger

D 16-bit data area (one bit shifted out to the left)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Shifts one bit of the specified data area to the left.

When programming the shift register instruction (SR), be sure to program the data
input, shift and reset triggers.
① Data input : specifies the 11'0 state of new shift-in data
- new shift-in data 1 ; when the input is ON
0 ; when the input is OFF
② Shift trigger : shifts one bit to the Left when the leading edge of the trigger.
③ Reset trigger : tums all the bits of the data area to 0 when the trigger is ON.

The execution time of the shift register instruction (SR) is 2μs.

NOTE :

The area available for this instruction is only the word internal realy (WR)

If the specified area is set as the hold type. the data in the data area are
not reset (become "0") when the mode is set to the RUN mode. If it is needed
to reset the data. turn ON the trigger of the reset trigger before use.

F119 ( LRSR ), F100 ( SHR ), F101 (SHL). F120 ( ROR ), F121 ( ROL ), F122
( RCR ) and F123 ( RCL ) can also be used as shift register instructions.
Program Address Command
example X0
0 SR WR 0 ST X 0
X1 3 1 ST X 1
2 ST X 2
3 SR WR
X2 3

In the example above, 16 internal relays (R30 to R3F) are the shift register operation
field. The bit data of trigger X1 is shifted to the left bit by bit.

R
WR3
3F 3E 3D 3C 3B 3A 39 38 37 36 35 34 33 32 31 30
Data 0 0 0 1 1 0 0 1 0 0 1 1 1 0 0 0

Data trigger 1

R
WR3
3F 3E 3D 3C 3B 3A 39 38 37 36 35 34 33 32 31 30
Data 0 0 1 1 0 0 1 0 0 1 1 1 0 0 0 1

Data trigger 1

R
WR3
3F 3E 3D 3C 3B 3A 39 38 37 36 35 34 33 32 31 30
Data 0 1 1 0 0 1 0 0 1 1 1 0 0 0 1 1

NOTE :
Regarding the expalanation of the compare instruction [F60 ( CMP )], refer to
"F60 ( CMP ) 16-bit data Compare".
F118(LRSR) Left / right shift register Steps : 5

Outline Sets the UP /DOWN counter.

Basic style Left/ right trigger


of instruction
F119 LRSR
Data Input

D1
Shift trigger
D2
Reset trigger

D1 Start 16-bit area ( one bit shined to the left/ right )

D2 Last 16-bit area ( one bit shined to the left/ right )

■ Operands

Preset (Set) Word Operands Constant


Index
value modifier
WX WY WR WL SV EV DT Ld FL IX IY K H

D1

D2
: Available

Description Shifts one bit of the specified data area range to the left / right.
When programming the left / right shift register instruciton ( LRSR ), be sure to
program the left / right, data, shift and reset triggem.
① Left /right trigger : specifies the direction of the shift-out
ON ; shifting out to the left
OFF; shifting out to the right

② Data input : specifies the 1/0 state of new shift-in data


new shift-in data 1 ; when the input is ON
0 ; when the input is OFF
③ Shift trigger : shifts one bit to the left when the leading edge of
the trigger.
④ Reset trigger : turns all the bits of the data area range (from D1 to
D2) to 0 when the trigger is ON.
Specify DI and D2 as they are in the same type data area and be sure to set the
data area numbers as the D I ≤ D2.

The data of the shift-out bit is moved out to the carry flag.

NOTE :
If the specified area is set as hold type, the data in the data area are not reset
(become "0") when the mode is set to the RUN mode. If it is needed to reset all
the data, turns, ON the trigger of the reset trigger using the special relay (R9013)
ON the trigger of the reset trigger using the special relay ( R9013 ).
[The R9013 turns ON only for one scan duration when the Programmable Logic
Controller(PLC) is set to RUN mode.]

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the specified number of
"the start 16-bit data area ( D1 )" is larger than that of "the last
16-bit data area ( D2 )". (Turns ON when D1 > D2)
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) :Turns ON for an instant when the specified number of "the start
16-bit data area ( D1 )" is larger than that of "the last 16-bit data
area ( D2 )". (Turns ON when D1 > D2)
The error address is transferred in the DT9018.

Carry flag ( R9009 ) Turns ON for an instant when the bit shifted-out is recognized
as "1".
:

NOTE :
When using the special relays ( R9O08 and R9009 ) as flags of this instruction, be
sure to program the flag at the address right after the instruction.
Even if the special relay (R9008 and R9009) are used also in the other part of the
program, the result of this instruction can be picked up using the internal relays

The special relay ( R9007 ) also detects the error of other instructions.
If the error of the instructions with the flag ( R9007 ) is detected. the error
detected in the first place has priority.

Program Address Command


example X10
3 F119 30 ST X 10
0 X11 31 ST X 11
LRSR
DT 0 32 ST X 12
X12 33 ST X 13
DT 9 34 F 119 (LRSR)
DT 0
X13 DT 9
MC Master Control Relay

MCE Master Control Relay End Steps : 2

ٛ utline Executes the program between the master control relay (MC) and master
control relay end (MCE) instructions when the trigger turns ON.

Program Address Command


example X1
0 ( MC 1) 0 ST X 0
X2 Y30 1 MC 1
2 〔 〕 2 ST X 2
3 OT Y
X3 Y31 4 30ST X 3
4 〔 〕 5 OT Y 31
6 MCE 1
6 ( MCE 1)

Description Up to 64 sets ( 0 to 63 ) of instruction sets available.


The instruction set executes the program between the master control relay (MC) and
and maste rcontrol relay end (MCE) instpactions while the trigger X1 is in ON state.
The I/O state between the instruction set when the trigger is in OFF state.

Program Condition

Keep instruction ( KP ) Holds the state at the time just before the trigger turns OFF.

Out instruction ( OT ) All OFF

Timer instruction (TM) Reset

Counter instruction Holds Count ( Elapsed ) value at the time just before the
CT, UDC ) trigger turns OFF

Differential instructions
Holds the state at the time just before the trigger turns OFF.
DF, DF/)
Other instructions Not executed

The program example above performs


the same operation as the relay
circuit below. The timing chart X
is as shown at the right. A
X
B
XA XB Y3A X
〔 〕 C
XC Y3B
Y3A
〔 〕
Y3B
Another instruction set [master control relay (MC) and
MC 1
master control re!ay end (MCE)] can be programmed
between one master control instruction set as shown
at the right. This construction is called "NESTING".
MC 2

MCE 2

MCE 1

NOTE :

The program cannot be executed in the following condition ;


The trigger of the master control relay instruction (MC)is missing.
There are two or more master control instruction sets with same number.
The order of the master control relay (MC) and master control relay end (MCE)
instructions are reversed.
One of the master control instruction set is missing.

lt is recommended that the differential instructions (DF, DF/) are programmed


outside the master control instruction set.
When the differential instructions are programmed between the master control
instruction set, be sure to taking the following condition into consideration ;

The differential instruction memorizes and keeps its trigger state ( ON or OFF )
at the time just before the trigger of the master control relay instruction (MC)
turns OFF while the master control relay instruction (M ) is in OFF state.
When the trigger of the master control relay instruction (MC) turns ON, the
differential instruction is executed comparing its trigger condition at the first
scan with its memorized tirgger condition.

X X
0 ( MC 2 0
X ) Y25
1 ( DF ) 〔 〕 X
1
( MCE 2
Y2
)
5
Change in X1 during this
interval are ignored

If the same trigger is used for the master control relay (MC) and differential
instructions, the differential instructions cannot be used. Use the differential
instructions outside the master control instruction set.
JP Jump
2
Steps
LBL Label 1

Outline Jumps steps to the specified label with the same number when the
trigger turns ON.

Program
X Address Command
example
40 1 ( JP 1) 40 ST X 1
41 JP 1

50 ( LBL 1) 50 LBL 1

Description Up to 256 ( 0 to 255 )instruction sets available.


Two or more jump instructions (JP) with the same numbering can be specified in
the program.. However, two or more label instnjctions (LBL) with same numbering
can not be specified.

NOTE :

The label structions (LBL) are specified as destinations of the jump (JP),
loop (LOOP)instructions within the numbering range of 0 to 255.

The jump instpaction (JP) jumps all the instructions between the jump instruciton
(JP) and label instruction (LBL) with the same numbering when the trigger
turns ON, When the jump instruction (JP) is executed, the execution time of
the skipped instructions is not included in the scan time.

The 1/0 state between the instruction set when the trigger ts in ON state.

Program Condition

Keep instruction ( KP )
Timer instruction (TM)
Holds the condition state at the time just before the
Counter instruction trigger
( CT, UDC ) turns ON .
Shift register instruction [ including Count (Elapsed) value ]
( SR, LRSR )

Differential instructions Memorizes the trigger condition of the differential


instruction
DF, DF/)
at the time lust before the trigger of the jump instruction
(JP) turns ON.
The differential instructions are not executed.
Other instructions Not executed
Another instruction set [jump instruction (JP) and
JP 0
label instruction (LBL)] can be programmed between
one instruction set as shown at the right.
This construction is called "NESTING".
JP 1

LBL 1

LBL 0

NOTE :

The program cannot be executed in the following condition ;


The trigger of the jump instruction (JP) is missing.
There are two or more label instructions with same number.
One of the jump instruction set is missing.
The jump from the normal scan area to the address outside the end instruction(ED)
The jump from the subroutine or interrupt program area to the normal scan area.
The jump from outside the step ladder program area to the step ladder program area.
The jump from the step ladder program area to outside the step ladder program area.

lt is recommended that the differential instructions (DF, DF/) are programmed


outside the master control instruction set.
When the differential instructions are programmed between the jump instruction set,
be sure to taking the following condition into consideration ;

The differential instruction memorizes and keeps its trigger state (ON or OFF) at
the time just before the trigger of the jump instruction (JP) turns ON while the
trigger of the jump instruction (JP) is in ON state.
When the trigger of the jump instruction (JP) turns OFF, the differential
instruction is executed comparing its trigger condition at the first scan with its
memorized tirgger condition.

X X
0 ( JP 0 ) 0
X Y25
1 ( DF ) 〔 〕 X
1
( LBL 0
Y2
)
5
Change in X1 during this
interval are ignored

The label instruction (LBL) can be programmed at the smaller number address
than the jump instruction (JP). However, if the scan time becomes longer than the
specified duration [System check : 640ms (N-7000 / N-700 PLC), Scan check :
10ms
to 640ms (N-7000 / N-700 PLC )] the error occurs. Be sure that the end (ED) or
conditional end(CNDE)is executed within the specified duration.
LOOP Loop
4
LBL Label Steps
1

Outline Jumps steps to the specified label with the same number and repeats
the same operation until the set value in the data area becomes "0".

Basic style
of instruction
[ LOOP n , S ]

S Preset(Set) value or area for Preset(Set)

■ Operands
Word Operands Constant
Preset Index
(Set) WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
value
S

: Available
Description Up to 256 ( 0 to 255 ) instruction sets available.

NOTE :
The label instructions (LBL) are specified as destinations of the jump(JP)

The loop instruction (LOOP) jumps all the instructions between the loop (LOOP)
and label (LBL) instructions with the same numbering.
Each time this instruction is executed, one is decreased froin the value in the data
area. This repeats the same operation until the set value in the data area becomes
"0" while the trigger is in ON state.

NOTE :
If the set value in the data area is "0" from the beginning, this instruction
is not executed (ignored)

The label instruction (LBL) can be programmed at the smaller or larger number
address than the loop instruction (LOOP). However. if the scan time becomes
longer than the specified duration [System check : 640ms (N-7000 /N-700 PLC),
Scan check : 10ms to 640ms (N-7000 /N-700 PLC)], the error occurs.
Be sure that the end (ED) or conditional end (CNDE) is executed within the
specified duration.

■ Flag condition

Error flag (R9007) : Turns ON and keeps the ON state when the specified value
in
the data area becomes less than "0". ( when the MSB of the
specified data area becomes "1".)
The efforaddress is transferred in the DT9017 and held.
Error flag (R9008) : Tums ON for an instant when the specified value in the
data
area becomes less than "0".
(when the MSB of the specified data area becomes "1" )
The error address is transferred in the DT9018.
NOTE :

The special relay ( R9007 ) also detects the error of other instructions.
If the error of the instructions with the flag ( R9007 ) is detected, the error etected in the first
place has priority.

When using the special relay( R9008 ) as flag of this instruction, be sure to
program the flag at the address right after the instruction.
Even if the special relay ( R9008 ) is used also in the other part of the program,
the result of this instruction can be picked up using the internal relay.

Program
example Address Command
10 ( LBL 1) 10 LBL 1

20 ST X 1
20 [ LOOP 1 , DT 0 21 LOOP 1
DT 0
]
BRK Break Steps : 1

ٛ utline Stops the execution during the test run mode.

Program
example Address Command
X0 Y40
0 ( BRK ) 〔 〕 0 ST X 0
1 BRK
2 OT Y 40

Description Stops the execution at the address of this instruction during the TEST RUN mode
when the trigger X0 turns ON.

Once this instruction is executed, the program halts.


To continue the program, the mode in the TEST RUN ( continuous run / step run ) should
be selected.

In the step RUN mode, the program is executed instruction per instruction regardless of
the instructions and in the countinuous RUN mode, the program is executed until it is
stopped by the next break instruction (BRK) or end instruciton (ED).

NOTE :

The test run mode is executed. when the mode selector switch is set to RUN mode
with setting the INITIALIZE/ TEST switch to the TEST mode.

If the mode selector switch is set to the PROG. mode at the break condition
[while the break instruction ( BRK ) is being executed] and if the mode
selector is set[ again to the RUN mode without changing the test run condition registered
before, the program halts at the '0" address.

If the break disable condition is selected, this instruction can not be


executed and is treated like as NOP instruction.

In the normal RUN mode. the break instruction (BRK)is treated as NOP
instruction(NOP).
ED End Steps : 1

Outline Indicates the end of main program.

Program
X1 X2 R10 Address Command
example
0 ( ) 0 ST X 1
1 AN/ X
2 2OT R 10
R0 R1 R2 Y30
85 ( )
85 ST R 0
89 ( ED ) 86 AN/ R
87 1AN/ R
88 2OT Y 30
89 ED

Description Indicates the end of the main progmara (normal scan).


Place any subroutine programs and interrupt programs after the end instruction (ED).
This instruction separates the program area into the normal scan area and the
subroutine and interrupt program area.

Example :

Sequence program

Conditional end
instruction (CNDE) Normal scan← Use the Conditional end instruction ( CNDE )
area
if end processing is necessary within the
Sequence program main program ( normal scan ).

End instruction (ED)

Subroutine program Subroutine ← Use the end instruction ( ED ) at the end


of the program ( normal scan).
Interrupt program Interrupt
program ← Place subroutine and interrupt programs
after the end instruction ( ED ).
CNDE Conditional end Steps : 1

Outline Ends the scan when the trigger turns ON.

Program
X1 R7 R50 Address Command
example
0 ( ) 0 ST X 1
1 AN/ R
2 7OT R 50
R9 X2 Y31
60 ( ) 60 ST R 9
61 AN/ X
X3 62 2OT Y 31
63 ( CNDE ) 63 ST X 3
64 CNDE

Description The instruction ends the program (the scan) at the address of the instruction
when the trigger X3 is in ON state.

Two or more conditional end instructions (CNDE) can be programmed.

Sequence Control returns to the start of the


program program when the XO turns ON.

X0
( CNDE )

Sequence
program

( ED )

NOTE :

The conditional end instruction ( CNDE ) should be programmed in the main


program (normal scan)area.
NSTP Next step

SSTP Start step

CSTP Clear step

STPE Step end Steps : 3

Outline NSTP : Opens the process of the step ladder and reset the process
including the instruciton itself.
SSTP : Indicates the start of step ladder process.
CSTP : Resets the specified process.
STPE : Ends the step ladder area and returns to the normal scan
area.

Basic style
of instruction Trigger
2 ( NSTP n1 )
0
2 ( NSTP n1 )
4 Output
2 ( ) Process n1
7 Trigger R9015
2 ( NSTP n2 )
8
3 ( SSTP n2 )
3
Process n2
Trigger
12 ( CSTP n40)
0
12 ( STPE )
4

n1, n2, n40 Number of step ladder process.

Description ■ Step ladder basic construction


( explanation using the program example above )

1. NSTP n1 ( n1 : 0 to 999 ) : next step instruction


Opens the step ladder process (n1) when the leading edge of its trigger is detected.

2. SSTP n1 ( n1 : 0 to 999 ) : start step instruction


This indicates the start of a step ladder process.
The process of the start step instruction (SSTP n1) is closed at the address
before the start step instruction (SSTP n2) with the nearest larger address
number.

3. NSTP n2 ( n2 : 0 to 999 ) : next step instruction


Opens the next process [the start step instruction (SSTP) with the same process
number (n2) ] and resets the process including this instruction
[process n1 ( the program from address "14" to address "22" ) ].
4. CSTP n40 ( n40 : 0 to 999): clear step instruction
Resets the process (n40) specified by the clear step iilstcuction (CSTP)
This instruction is used to reset the process without the next step instruction.
(e.g. the last process, parallel branch process etc. )

5. STPE : step end instruction


Ends the step ladder area and returns to the normal scan area.

■ Step ladder syntax

① SSTP
The process is specified as :
∙the program from the start step instruction to the address just before the next
start step instruction
∙the program from the start step instruction to the address just before the step
end instruction (STPE).
The out instruction (OT) can be programmed at the next address of the start
step instruction (SSTP).
The process number can be specified in the range of 0 to 999.
The instruciton with the same process number can not be used.

② NSTP
This instruction is executed only for one scan when the leading edge of the
trigger
is detected.
This instruction can also be programmed outside the step ladder area.
The process number can be specified in the range of 0 to 999.
NOTE :

At the first scan in the RUN mode


Like as differential instructions, it recognizes the leading edge of the its
tngger comparing the present condition with the condition of the scan before.
Therefore, the next step instruction (NSTP) can not be executed if its
trigger is in ON state from the first scan in the RUN mode.

In the process
The next step instruction can not be executed if the trigger has been in ON
state before the process including the instruction is executed.
To execute the next step instruction in this case, use the special relay
(R9015) as shown in the program example.
(The R9015 is the special relay that turns ON only for one scan at the first
scan of the process including this relay.)

When the next step instruction (NSTP) is executed, it proceeds to the next
step during the same scan. However, the reset operation is executed in the
next scan.

③ CSTP
This instruction can also be programmed outside the step ladder
area.
The process number can be specified in the range of 0 to 999.
④ STPE
Two or more step end instructions (STPE) can not be used.
■ Others
The instructions that can not be programrned in the step ladder area [from the
first start step instruction (SSTP) to the step end instruction (STPE) ] are;
jump ( JP ), label ( LBL ), loop ( LOOP ),
master control relay [ MC ), master control relay end ( NICE ),
conditional end ( CNDE ), end ( ED ), subroutine call ( CALL, ),
subroutine enlrv ( SUB ), return ( RET ), interrupt ( INT ),
interrupt return ( IRET ) and other control type instructions
There is no restriction regarding the order of the process numbering.
The I/0 state between the instruction set when the process is reset;
The step ladder program cannot be programmed in the subroutine or the interrupt
program.

Program Condition

Keep instruction (KP) Holds the state at the time just before the trigger turns OFF.

Timer instruction (TM) All OFF

Counter instruction RESET


( CT, UDC )
Shift register instruction Holds Count ( Elapsed ) value at the time just before
( SR, LRSR ) the trigger turns OFF

Memorizes the trigger condition of the differential instruction


Differential instructions
at the time lust before the trigger of the process tunrs OFF.
DF, OF/) The differential instructions are not executed.

Other instructions Not executed

To reset all the step ladder area, use the master control instruction set.
When the Forced. ON/ OFF operation is performed while the process is in OFF state,
The output is not changed before the process is executed again.
The state of the processes are transferTed into the special data registers
(DT9060 to DT9122).
■ Application examples
The sequence control, selection branch control of a process and the parrallel
branch merge control of a process can be easily realized.

1) Sequence control

Process 10 can be reactivated at final process 12 using NSTP 10.


2. High Level Instructions

Data Transfer Instructions


F0( MV ) P0( PMV ) 16-bit data Move ...........................................148
F1( DMV ) P1( PDMV ) 32-bit data Move ...........................................150
F2( MV/ ) P2( PMV/ ) 16-bit data Invert and move .........................152
F3( DMV/ ) P3( PDMV/ ) 32-bit data Invert and move .........................154
F5( BTM ) P5( PBTM ) Bit data Move ................................................156
F6( DGT ) P6( PDGT ) Digit data Move .............................................159
F10( BKMV ) Pl0( PBKMV ) Block Move .....................................................161
F11( COPY ) P11( PCOPY ) Block Copy .....................................................163
F15( XCH ) Pl5( PXCH ) 16-bit data Exchange ....................................165
FI6( DXCH ) PI6( PDXCH ) 32-bit data Exchange ....................................167
F17( SWAP ) P17( PSWAP ) High /low bytes Exchange .............................169
F0 (MV)
16 Bit data Move
P0 (PMV) Steps : 5

Outline Copies the specified 16-bit data to another area.


( P0 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F0 MV , S , D ]

S Constant value or 16-bit data ( source )

D 16-bit area ( destination )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
D
: Available

Description The 16-bit data or constant value specified by S is copied to the area specified
by
D when the trigger tums ON.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 20 ST X 0
[ F0 MV ,WX 5 , WR 1 ] 21 F 0 ( M V )
WX 5
WR 1

In the example above, the contents of WX5 are copied to WR1 when the X0
turns ON.
Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WX5 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1

X0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1
F1 (DMV)
32 Bit data Move
P1 (PDMV) Steps : 7

Outline Copies the specified 32-bit data to another area.


( P1 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F1 DMV , S , D
]

S Constant value or lower 16-bit area of 32-bit data ( source )

D lower 16-bit area of 32-bit data ( destination )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
D
: Available

Description The 32-bit data or constant value is copied to the specified area as follows when
the
trigger tums ON :
Source Trigger turns ON Destination
1.When specifying 32-bit data
S : Lower 16-bit D : Lower 16-bit
S+1 : Higher 16-bit D+1 : Higher 16-bit

2.When specifying constant value

S : K ( decimal ) or
H ( hexadecimal ) constant

Note :
When processing 32-bit data, the higher 16-bit areas ( S+1, D+1 ) are automatic
-ally decided if the lower 16-bit areas ( S, D ) are specified.
S (lower) = WR0 D (lower) = LD1
S+1( higher )= WRl, D+1 ( higher )= LD2

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F1 DMV ,WR 8 , DT 4 11 F 1 ( DMV )
] WR 8
DT 4

In the example above, the contents of WR8 and WR9 are copied to DT4 and DT5
when
the X0 turns ON.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR9 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 WR8 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1

higher 16-bit area lower 16-bit area


X0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

DT5 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 DT4 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1

higher 16-bit area lower 16-bit area


F2 (MV/)
16 Bit data Invert and Move
P2 (PMV/) Steps : 5

Outline Inverts the specified 16-bit data and write the inverted result to
another area.
( P2 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F2 MV/ , S , D ]

S Constant value or 16-bit data to be inverted ( source )

D 16-bit area ( destination )

■ Operands

Preset (Set) Word Operands Constant


Index
value modifier
WX WY WR WL SV EV DT Ld FL IX IY K H

S
D
: Available

Description The 16-bit data or constant value specified by S is inverted and written into the
area specified by D when the trigger tums ON.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 30 ST X 0
30 [ F2 MV/ , WX 2 , WY4 ] 21 F 2 ( M V / )
WX 2
WY 4

In the example above, the contents of WX2 are inverted and written into WY4
when the X0 turns ON.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WX2 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1

X0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WY4 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0
F3 (DMV/)
32 Bit data Invert and move
P3 (PDMV/) Steps : 7

Outline Inverts the specified 32-bit data and write the inverted result to
another area.
( P3 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F3 DMV/ , S , D ]

S Constant value or lower 16-bit area of 32-bit data to be inverted( source )

D lower 16-bit area of 32-bit data ( destination )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
D
: Available

Description The 32-bit data or constant value is inverted and written to the specified area as
follows when the trigger tums ON :

Source Trigger turns ON Destination

1.When specifying 32-bit data


S : Lower 16-bit D : Lower 16-bit
S+1 : Higher 16-bit D+1 : Higher 16-bit

2.When specifying constant value


S : K ( decimal ) or
H ( hexadecimal ) constant

Note :
When processing 32-bit data, the higher 16-bit areas ( S+1, D+1 ) are
automatically decided if the lower 16-bit areas ( S, D ) are specified.
S (Lower) = WXO D (Lower) = WR6
S+1(Higher)= WXl, D+1 (higher)= WR7

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.
Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F3 DMV/ ,WX 3 , WY 7 ]
11 F 3 ( DMV/ )
WX 3
WY 7

In the example above, the contents of WX3 and WX4 are inverted and written into
WY7 and WY8 when the X0 turns ON.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WX4 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 WX3 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1

higher 16-bit area lower 16-bit area


X0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WY8 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 WY7 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0

higher 16-bit area lower 16-bit area


F5 (BTM)
16 Bit data Move
P5 (PBTM) Steps : 7

Outline Copies a bit of the specified 16-bit data to one of another 16-bit data area.
( P5 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F5 BTM , S , n , D ]

S Constant value or 16-bit data ( source )

n Constant value or 16-bit data (specified source and destination bit No.)

D 16-bit area ( destination )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description One bit of lu-bit data or constant value specified by S is copied to a bit of 16-bit
area specified by D when the trigger turns ON.

The "n" specifies the bit No. as follows ;


Bit No. 0 to 3 : source bit No. ( H0 to HF )
Bit No. 8 to 11 : destination bit No. ( H0 to HF )
( The bits from 4 to 7 and 12 to 15 are invalid, )

Specifications of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n

Source bit No. (HO to HF)

Destination bit No. (HO to HF)


■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X0 30 ST X 0
30 [ F5 BTM , WR 0 , LD 1 , WY 31 F 5 ( BTM )
WR 0
2 ] LD 1
WY 2

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

Ld 1 ∙∙∙∙ 1 1 0 0 ∙∙∙∙ 0 1 0 0

Source(WR0) bit No. : bit 4


Destination(WY2) bit No. : bit12

In the example above, Ld1 is set so that bit 4 of WR0 is copied to bit 12 of WY2
when the X0 turns ON as follows :

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR0 1 1 0 1 0 0 1 1 0 0 0 0 1 1 1 1 WY2 0 1 1 1 1 0 1 0 1 0 1 0 1 0 0 1

BIT 4 BIT 12

X0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR0 1 1 0 1 0 0 1 1 0 0 0 0 1 1 1 1 WY2 0 1 1 0 1 0 1 0 1 0 1 0 1 0 0 1

COPY
F6 (DGT)
Digit data Move
P6 (PDGT) Steps : 7

ٛ utline Copies the digits of the specified 16-bit data to the digits of
another 16-bit data area
( P6 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F6 DGT , S , n , D ]

S Constant value or 16-bit data ( source )

n Constant value or 16-bit data


(specified source and destination digit No. and number of digits)

D 16-bit area ( destination )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
n

D
: Available

Description The digits of 16-bit data or constant value specified by S are copied to the digits
of 16-bit area specified by D when the trigger turns ON.
The copy of multiple digits is also possible.
See following page for multiple digits copy.
One digit means 4-bit unit.
The " n " specifies the bit No. as follows ;
Bit No. 0 and 1 : source digit No. ( H0 to H3 )
Bit No. 4 and 5 : number of digits to be copied ( H0 to H3 )
Bit No. 8 and 9 : destination digit No. ( H0 to H3 )
(The bits 2, 3, 6, 7 and 10 through 15 are invalid.)

00 : Copies 1-digit
Number of digits to be copied 01 : Copies 2-digit(1byte)
(H0 to H3 ) 10 : Copies 3-digit
11 : Copies 4-digit(2byte)

Bit 15∙∙ 12 11∙ 9 8 7 ∙ 5 4 3 ∙ 1 0

Source bit No. ( H0 to HF )


Destination bit No. ( H0 to HF )

※ The digit No. is specified as shown below.


00 : Digit No.1
01 : Digit No.2
10 : Digit No.3
11 : Digit No.4
MSB LSB
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X0 10 ST X 0
10 [ F6 DGT , WR 0 , WX 1 , WY 11 F 6 ( DGT )
WR 0
2 ] WX 1
WY 2

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WX 1 ∙∙∙∙ 0 0 1 1 ∙∙∙∙ 0 0 0 1

Source(WR0) digit No. : digit 1


Destination(WY2) digit No. : digit 3

In the example above, WX1 is set so that digit 1 of WR0 is copied to digit 3 of
WY2when the X0 turns ON as follows :

Digit 3 2 1 0 Digit 3 2 1 0

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR0 0 1 0 1 0 0 1 0 0 1 0 0 1 1 1 1 WY2 0 1 1 1 0 1 1 0 0 0 1 0 1 0 0 1

X0 : ON

Digit 3 2 1 0 Digit 3 2 1 0

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR0 0 1 0 1 0 0 1 0 0 1 0 0 1 1 1 1 WY2 0 1 0 0 0 1 1 0 0 0 1 0 1 0 0 1

The digits not specified


remain unchanged.
COPY
■ Example of multiple digits copy

n : H 0010 n : H 0210 n : H 0012


Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0
n 0 0 0 1 0 0 n 1 0 1 0 0 0 n 0 0 0 1 1 0

S : S : S :

D : D : D :

n : H 0212 n : H 0030 n : H 0130


Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0
n 1 0 0 1 1 0 n 0 0 1 1 0 0 n 0 1 1 1 0 0

S : S : S :

D : D : D :

n : H 0230 n : H 0232
Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0
n 1 0 1 1 0 0 n 1 0 1 1 1 0

S : S :

D : D :
F10 (BKMV)
Block Move
P10 (PBKMV Steps : 7

Outline Copies the data block to the specified area.


( P10 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F10 BKMV , S1 , S2 , D ]

S1 Starting area ( Source )

S2 Last area ( Source )

D Starting area ( Destination )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description The block specified by SI and S2 is copied to the block starting from the area
specified by D when the trigger tums ON.
The SI and S2 should be ;
∙in the same operand
∙S1 ≤ S2
In case that S1, S2 and D is in the same data area ;
S1 = D : Data will be re-copied to the same data
area.
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
① when the area specified using the index modifier exceeds the
limit.
② when SI > S2.
③ when the data block to be copied exceeds the limit of the
area
for destination.
The error address is transferred in the DT9017 and held,
Error flag ( R9008 ) : Turns ON for an instant.
① when the area specified using the index modifier exceeds the
limit.
② when SI > S2.
③ when the data block to be copied exceeds the limit of the
area
for destination.
Note : The error address is transferred in the DT9018.
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

R0 10 ST R 0
10 [ F10 BKMV, WX 0 , WX 3 , WY 5 ] 11 F 10 ( BKMV )
WX 0
WX 3
WY 5

In the example above, the data block of from WX0 to WX3 are copied to the
block
starting from WY5 when the R0 turns ON.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0


WX0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0

WX1 1 1 0 1 1 1 1 0 0 1 0 1 1 0 0 1

WX2 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 1

WX3 1 1 0 1 1 1 1 0 1 0 0 1 1 1 1 0

R0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0


WY5 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0

WY6 1 1 0 1 1 1 1 0 0 1 0 1 1 0 0 1

WY7 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 1

WY8 1 1 0 1 1 1 1 0 1 0 0 1 1 1 1 0
F11 (COPY)
Block Copy
P11 (PCOPY Steps : 7

Outline Copies the specified 16-bit data to the block with one or more 16-
bit area.
( P11 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F11 COPY , S , D1 , D2 ]

S Constant value or 16-bit data ( Source )

D1 Starting area ( Destination )

D2 Last area ( Destination )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
D1

D2
: Available

Description The 16-bit data or constant value specified by S is copied to the block specified by
D1 and D2 when the trigger tums ON.
The DI and D2 should be ;
∙in the same operand
∙Dl ≤ D2

COPY D1
S Repeatedly
copy
D2

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
① when the area specified using the index modifier exceeds the
limit.
② when DI > D2.
The error address is transferred in the DT9017 and held,

Error flag ( R9008 ) : Turns ON for an instant.


① when the area specified using the index modifier exceeds the
limit.
② when DI > D2.
The error address is transferred in the DT9018.
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

R0 10 ST R 0
10 [ F11 COPY, WX 0 , WY 6 , WY 9 ] 11 F 11 ( COPY )
WX 0
WY 6
WY 9

In the example above, the data of WX0 are copied to the block starting from WY6
to
WY9 when the R0 turns ON.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0


WX0 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0

R0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0


WY6 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0
WY7 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0
WY8 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0

WY9 1 0 0 1 1 1 1 0 0 0 0 1 1 1 0 0
F15 (XCH)
16 Bit data Exchange
P15 (PXCH) Steps : 5

Outline Exchanges two 16-bit data.


( P15 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F15 XCH , D1 , D2 ]

D1 16-bit data to be exchanged

D2 16-bit data to be exchanged

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D1

D2
: Available

Description The content of 16-bit data specified by D1 and D2 are exchanged when the
trigger tums ON.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 20 ST X 0
20 [ F15 XCH , WR 5 , WR 6 ] 21 F 15 ( XCH )
WR 5
WR 6

In the example above, the contents of WR5 and WR6 are exchanged when the
X0 turns ON.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR5 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 1

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR6 1 0 1 1 1 1 1 1 1 0 0 1 1 0 1 0

X0 : ON Exchange

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR5 1 0 1 1 1 1 1 1 1 0 0 1 1 0 1 0

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR6 1 0 0 1 1 0 1 1 1 0 1 1 1 0 1 1
F16 (DXCH)
32 Bit data Exchange
P16 (PDXCH Steps : 5

Outline Exchanges two 32-bit data.


( P16 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F16 DXCH , D1 , D2 ]

D1 Lower 16-bit area or 32-bit data to be exchanged

D2 Lower 16-bit area or 32-bit data to be exchanged

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D1
D2
: Available

Description The content of 32-bit data are exchanged as folows when the trigger tums ON ;

32-bit data specified by D1 32-bit data specified by D2

Trigger turns ON
D1 : lower 16-bit D1 : lower 16-bit
D1+1: higher 16-bit D1+1: higher 16-bit

Note :
When processing 32-bit data, the higher 16-bit areas ( D1+1, D2+1 ) are
automatically decided if the lower 16-bit areas (D1, D2 ) are specified.
D1 ( lower) = WRO D2 (lower) = DT0
D1+1( higher ) = WRl, D2+1 ( higher )= DT1

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

R0 20 ST R 0
20 [ F16 DXCH , WR 5 , DT 0 21 F 16 ( DXCH )
] WR 5
DT 0

In the example above, two 32-bit data [ (WR5, WR6 ) ] and [ (DT0, DT1) ] are
exchanged when the R0 turns ON.

(WR5, WR6 -> DT0, DT1 ) and ( DT0, DT1 -> WR5, WR6)

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR6 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 WR5 1 0 0 1 1 0 0 1 1 1 1 1 0 0 1 1

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

DT1 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 0 DT0 1 1 1 1 1 1 0 1 1 0 1 0 1 1 1 0

R0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0
WR6 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 0 WR5 1 1 1 1 1 1 0 1 1 0 1 0 1 1 1 0

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0
DT1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 DT0 1 0 0 1 1 0 0 1 1 1 1 1 0 0 1 1
F17 (SWAP)
High /Low bytee Exchange
P17 (PSWAP) Steps : 3

ٛ utline Exchanges high and low order bytes of the specified 16-bit data.
( P17 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F17 SWAP , D ]

D 16-bit data to be exchanged the high and low order bytes

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description One byte means 8-bit.

The high order one byte ( higher 8-bit ) and low order one byte ( lower 8-bit )
of
16-bit data specified by D are exchanged when the trigger tums ON.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F17 SWAP , WY 1 ] 11 F 17 ( SWAP )
WY 1

In the example above, high and low order bytes of the 16-bit data WY1 are exchanged
when the X0 turns ON as follows :

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WY 1 1 1 0 1 1 1 0 0 1 0 0 0 0 1 0 0

X0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WY 1 1 0 0 0 0 1 0 0 1 1 0 1 1 1 0 0
BIN Arithmetic Instructions

F20( + ) P20( P+ ) 16-bit data [D+S -> D] ...................................172


F21( D+ ) P20( PD+ ) 32-bit data [D+1,D) + (S+1,S)
-> (D+1, D)] .................174
F22( + ) P22( P+ ) 16-bit data [S1+S2 -> D] ................................176
F23( D+ ) P23( PD+ ) 32-bit data [S1+1, S1) + (S2+1, S2)
-> (D+1, D)] .................178
F25( - ) P25( P- ) 16-bit data [D-S -> D] ...................................180
F26( D- ) P26( PD- ) 32-bit data [D+1,D) - (S+1,S)
-> (D+1, D)] ..................182
F27( - ) P27( P- ) 16-bit data [S1-S2 -> D] ................................184
F28( D- ) P23( PD- ) 32-bit data [S1+1, S1) - (S2+1, S2)
-> (D+1, D)] ....................186
F30( * ) P30( P* ) 16-bit data [S1x S2 -> (D+1,D)] ....................188
F31( D* ) P31( PD* ) 32-bit data [S1+1, S1) x (S2+1, S2)
-> (D+1, D)] ....................190
F32( % ) P32( P% ) 16-bit data [S1/S2 -> D....(DT9015)] ............192
F33( D% ) P23( PD% ) 32-bit data [S1+1, S1) / (S2+1, S2)
-> (D+1,D)] (DT9016, DT90150] ...............194
F35( +1 ) P35( P+1 ) 16-bit increnent [D+1 -> D] .........................196
F36(D+1 ) P36( PD+1 ) 32-bit increnent [D+1,D) + 1
-> (D+1, D)] .................198
F37( -1 ) P37( P-1 ) 16-bit decrenent [D-1 -> D] .........................200
F38(D-1 ) P38( PD-1 ) 32-bit decrenent [D+1,D) - 1
-> (D+1, D)] ....................202
F160(DSQR) P160(PDSQR) 32-bit data square root [ ( S + 1, S )
-> (D+1, D)] ....................204

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F20 (+) 16 Bit data
P20 (P+) [D + S -> D]
Steps : 5

Outline Adds two 16-bit data and stores the result into the augend area.
( P20 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F20 + , S , D ]

S Constant value or 16-bit area (for addend)

D 16-bit area (for augend and result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description The 16-bit data or constant value specified by S and the 16-bit data specified by D
are added together as follows when the trigger tums ON.
The added result is stored into D ( area for augend )

Augend data Addend data Result


Trigger turns ON
D + S D

Note :

When this instruction is used, the area for augend ( D ) is overwritten by the
addedresult. If you want to avoid the overwrite, we recommend you the use of
F22 / P22 instructions instead of F20 / P20 instructions.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceed the range of 16-bit data (overflow and underflow)
※ Range of 16-bit data : K-32768 to K32767
Note : H8000 to H7FFF

Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

R0 10 ST R 0
10 [ F20 + , WR 5 , WR 6 ] 11 F 20 ( + )
WR 5
WR 6

In the example above, the contents of WR5 ( K1234 ) and WR6 ( K5678 ) are added
together when the R0 tums ON.

The added result ( K6912 ) is stored into WR6.

WR 5
K 1234

+
WR 6
K 5678

R0 : ON

WR 6
K 6912
F21 (D+) 32 Bit data
P21 (PD+) [(D+1,D) + (S+1,S) -> (D+1,D)]
Steps : 7

Outline Adds two 32-bit data and stores the result into the augend area.
( P21 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F21 D+ , S , D ]

S Constant value or 16-bit area of 32-bit data (for addend)

D Low 16-bit area of 32-bit data (for augend and result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description The 32-bit data or constant value specified by S and the 32-bit data specified by D
are added together as follows when the trigger tums ON.
The added result is stored into D+1 and D.

Augend data Addend data Result


Trigger turns ON
D : Lower 16-bit S : Lower 16-bit D : Lower 16-bit
D+1: Higher 16-bit + S+1: Higher 16-bit D+1: Higher 16-bit
(Constant value available)

Note :
When processing 32-bit data, the higher 16-bit areas ( S+1, D+1 ) are
automatically decided if the lower 16-bit areas ( S, D ) are specified.
S (lower) = WR0 D (lower) = DT1
S+1(higher) = WR1, D+1 (higher) = DT2

Note :

When this instruction is used, the area for augend ( D+1, D ) is overwritten
by the addedresult. If you want to avoid the overwrite, we recommend you the
use of F23/ P23 instructions instead of F21/ P21 instructions.
■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceeds the range of 32-bit data (overflow and underflow)

※ Range of 32-bit data : K-2147483648 to K2147483647


H80000000 to H7FFFFFFF

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X20 10 ST X 20
10 [ F21 D+ , DT 0 , WR 0 ] 11 F 21 ( D+ )
DT 0
WR 0

In the example above, the contents of WR1 and WR0 ( K080877102 ) and the contents
of DT1 and DT0 ( K226501428 ) are added together when the X20 turns ON.

The added result ( K307378530 ) is stored into WR1 and WR0.

WR 1 WR 0
K 080877102

+
DT 1 DT 0
K 226501428

X20 : ON

WR 1 WR 0
K 307378530
F22 (+) 16 Bit data
P22 (P+) [S1 + S2 -> D]
Steps : 7

Outline Adds two 16-bit data and stores the result into the specified area.
( P22 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F22 + , S1 , S2 , D ]

S1 Constant value or 16-bit area (for augend)

S2 Constant value or 16-bit area (for addend)

D 16-bit area (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description The 16-bit data or constant value specified by S1 and the 16-bit data or constant
value specified by S2 are added together as follows when the trigger tums ON.

The added result is stored into D.

Augend data Addend data Result


Trigger turns ON
S1 + S2 D

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceed the range of 16-bit data (overflow and underflow)
※ Range of 16-bit data : K-32768 to K32767
H8000 to H7FFF
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F22 + , WR 5 , WR 6 , 11 F 22 ( + )
DT100 ] WR 5
WR 6
DT 100

In the example above, the contents of WR5 ( K1234 ) and WR6 ( K5678 ) are added
together when the X0 tums ON.
The added result ( K6912 ) is stored into DT100.

WR 5
K 1234

+
WR 6
K 5678

X0 : ON

DT100
K 6912
F23 (D+) 32 Bit data
P23 (PD+) [(S1 + 1, S1) + (S2 +1,S2) -> (D+1,D)]
Steps :11

Outline Adds two 32-bit data and stores the result into the specified area.
( P23 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F23 D+ , S1 , S2 , D ]

S1 Constant value or lower 16-bit area of 32-bit data (for augend)

S2 Constant value or lower 16-bit area of 32-bit data (for addend)

D Lower 16-bit area of 32-bit data (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description The 32-bit data or constant value specified by S1 and S2 are added together as
follows when the trigger tums ON.
The added result is stored into D+1 and D.

Augend data Addend data Result


Trigger turns ON
S1 : Lower 16-bit S2 : Lower 16-bit D : Lower 16-bit
S1+1: Higher 16-bit + S2+1: Higher 16-bit D+1: Higher 16-bit
(Constant value available) (Constant value available)

Note :
When processing 32-bit data, the higher 16-bit areas ( S1+1, S2+1, D+1 ) are
automatically decided if the lower 16-bit areas ( S1, S2, D ) are specified.
S1 (lower) = DT0 S2 (lower) = WR1 D (lower) = WY1
S1+1 (higher) = DT1, S2+1 (higher) = WR2, D+1 (higher) = WY2
■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceeds the range of 32-bit data (overflow and
underflow)
※ Range of 32-bit data : K-2147483648 to K2147483647
H80000000 to H7FFFFFFF

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X20 10 ST X
10 [ F23 D+ , DT 0 , WR 1, WY 11 20
1 ] F 23 ( D+ )
DT 0
WR 1
WY 1
In the example above, the contents of DT1 and DT0 ( K226500306 ) and the contents
of WR2 and WR1 ( K080877102 ) are added together when the X20 turns ON.

The added result ( K307377408 ) is stored into WY2 and WY1.

DT 1 DT 0
K 226500306

+
WR 2 WR 1
K 080877102

X20 : ON

WY 2 WY 1
K 307377408
F25 (-) 16 Bit data
P25 (P-) [D - S -> D]
Steps : 5

Outline Subtracts two 16-bit data from the minuend and stores the result into the
minuend area.
( P25 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F25 - , S , D ]

S Constant value or 16-bit area (for subtrahend)

D 16-bit area (for minuend and result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
D
: Available

Description Subtracts the 16-bit data or constant value specified by S from the 16-bit data
specified by D are as follows when the trigger tums ON.
The subtracted result is stored into D ( minuend area )

Augend data Addend data Result


Trigger turns ON
D - S D

Note :

When this instruction is used, the area for minuend ( D ) is overwritten by the
subtracted result. If you want to avoid the overwrite, we recommend you the use
of F27 / P27 instructions instead of F25 / P25 instructions.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceed the range of 16-bit data (overflow and underflow)
※ Range of 16-bit data : K-32768 to K32767
H8000 to H7FFF
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

R0 10 ST R
10 [ F25 - , WR 5 , WR 6 ] 11 0
F 25 ( - )
WR 5
WR 6

In the example above, subtracts the contents of WR5 ( K7890 ) and WR6 ( K9876 )
when the R0 tums ON.
The asubtracted result ( K1986 ) is stored into WR6.(minuend area)

WR 6
K 9876

-
WR 5
K 7890

R0 : ON

WR 6
K 1986
F26 (D-) 32 Bit data
P26 (PD-) [(D+1,D) - (S+1,S) -> (D+1,D)]
Steps : 7

Outline Subtracts the 32-bit data from the minuend and stores the result into the
minuend area.
( P26 : executed only when the leading edge of the trigger is detected. )
Basic style
of instruction Trigge
r [ F26 D- , S , D ]

S Constant value or lower 16-bit area of 32-bit data (for subtrahend)

D Lower 16-bit area of 32-bit data (for minuend and result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description Subtracts the 32-bit data or constant value specified by S from the 32-bit data
specified by D as follows when the trigger tums ON.
The subtracted result is stored into D+1 and D.(minuend area)

Minuend data Sbbtrahend data Result


Trigger turns ON
D : Lower 16-bit S : Lower 16-bit D : Lower 16-bit
D+1: Higher 16-bit - S+1: Higher 16-bit D+1: Higher 16-bit
(Constant value available)

Note :

When processing 32-bit data, the higher 16-bit areas ( D+1, S+1 ) are
automatically decided if the lower 16-bit areas ( D, S ) are specified.
D (lower) = WR0 S (lower) = DT1
D+1( higher )= WRl, S+1 ( higher )= DT2

Note :

When this instruction is used, the area for minuend ( D+1, D ) is overwritten
by the subtracted result. If you want to avoid the overwrite, we recommend you
the use of F28/ P28 instructions instead of F26/ P26 instructions.
■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceeds the range of 32-bit data (overflow and
underflow)
※ Range of 32-bit data : K-2147483648 to K2147483647
H80000000 to H7FFFFFFF
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X20 40 ST X 20
40 [ F26 D- , DT 0 , WR 0 ] 41 F 26 ( D- )
DT 0
WR 0

In the example above, subtracted the contents of DT1 and DT0 ( K080877102 ) from
the contents of WR1 and WR0 ( K647238968 ) when the X20 turns ON.
The subtracted result ( K566361866 ) is stored into WRI and WR0.

WR WR
1 K 647238968 0

-
DT 1 DT 0
K 080877102

X20 : ON

WR WR
1 K 566361866 0
F27 (-) 16 Bit data
P27 (P-) [S1 - S2 -> D]
Steps : 7

ٛ utline Subtracts the 16-bit data from the minuend and stores the result into the
specified area.
( P27 : executed only when the leading edge of the trigger is detected. )
Basic style
of instruction Trigger
[ F27 - , S1 , S2 , D ]

S1 Constant value or 16-bit area (for minuend)

S2 Constant value or 16-bit area (for subtrahend)

D 16-bit area (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Subtracts the 16-bit data or constant value specified by S2 from the 16-bit data or
constant value specified by S1 as follows when the trigger tums ON.
The subtracted result is stored into D.

Minuend data Subtrahend data Result


Trigger turns ON
S1 - S2 D

■ Flag condition
Error flag ( R9007 : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
) The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 : Turns ON for an instant when the calculated result
exceed the range of 16-bit data (overflow and underflow)
) ※ Range of 16-bit data : K-32768 to K32767
H8000 to H7FFF

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F27 - , WR 9 , WR 8 , 11 F 27 ( - )
DT105 ] WR 9
WR 8
DT 105

In the example above, subtracts the contents of WR8 ( K3333 ) from the contents
WR9 ( K5555 ) when the X0 tums ON.
The subtracted result ( K2222 ) is stored into DT105.

WR 9
K 5555

-
WR 8
K 3333

X0 : ON

DT105
K 2222
F28 (D-) 32 Bit data

P28 (PD-) [(S1 +1, S1) - (S2 +1, S2) -> (D+1, D)]
Steps :11

Outline Subtracts the 32-bit data from the minuend and stores the result into the
specified area.
( P28 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F28 D- , S1 , S2 , D ]

S1 Constant value or lower 16-bit area of 32-bit data (for minuend)

S2 Constant value or lower 16-bit area of 32-bit data (for subtrahend)

D Lower 16-bit area of 32-bit data (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Subtracts the 32-bit data or constant value specified by S2 from the 32-bit data or
constant value specified by S1 as follows when the trigger tums ON.
The subtracted result is stored into D+1 and D.

Minuend data Subtrahend data Result


Trigger turns ON
S1 : Lower 16-bit S2 : Lower 16-bit D : Lower 16-bit
S1+1: Higher 16-bit - S2+1: Higher 16-bit D+1: Higher 16-bit
(Constant value available) (Constant value available)

Note :
When processing 32-bit data, the higher 16-bit areas ( S1+1, S2+1, D+1 ) are
automatically decided if the lower 16-bit areas ( S1, S2, D ) are specified.
S1 (lower) = DT0 S2 (lower) = WR1 D (lower) = WY1
S1+1 (higher) = DTl, S2+1 (higher) = WR2, D+1 (higher) = WY2
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceed the range of 32-bit data (overflow and underflow)
※ Range of 32-bit data : K-2147483648 to K2147483647
H80000000 to H7FFFFFFF
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X20 10 ST X 20
10 [ F28 D- , DT 0 , WR 1, WY 11 F 28 ( D- )
1 ] DT 0
WR 1
WY 1

In the example above, subtracts the contents of DT1 and DT0 ( K080877102 )
from the
contents
The of WR2
subtracted resultand WR1 ( K566297810
( K-485420708 ) are
) is stored into added
WY2 together when the X20
and WY1.
turns ON.

DT 1 DT 0
K 080877102

-
WR WR
2 K 566297810 1

X20 : ON

WY WY
2 K -485420708 1
F30 (*) 16 Bit data
P30 (P*) [S1 x S2 -> (D+1, D)]
Steps :7

Outline Multiples two 16-bit data and stores the result into the specified 32-bit area.
( P30 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F30 * , S1 , S2 , D ]

S1 Constant value or 16-bit area (for multiplicand)

S2 Constant value or 16-bit area (for multiplier)

D Lower 16-bit area of 32-bit data (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Multiples the 16-bit data or constant value specified by S1 and the 16-bit data or
constant value specified by S2 as follows when the trigger tums ON.
The multiplied result is stored into D+1 and D (32-bit area).

Note :
The multipled result is stored into the 32-bit area.
The higher 16-bit area ( D+1 ) is automatically when the lower 16-bit area (D)
is specified.
D (lower) = WR6
D+1 (higher) = WR7

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

R0 10 ST R 0
10 [ F30 * , WX 0 , WX 1 , WR 5 ] 11 F 30 ( * )
WX 0
WX 1
WR 5

In the example above, multiplies the contents of WX0 ( K1010 ) and the contents of
WX1 ( K1234 ) when the R0 tums ON.
The multiplied result ( K1246340) is stored into WR6 and WR5.

WX 0

K 1010

X
WX 1

K 1234

R0 : ON

WR 6 WR 5
K 1246340
F31 (D*) 32 Bit data
P31 (PD*) [(S1 +1, S1) X (S2 +1, S2) -> (D+3, D+2, D+1, D)]
Steps :11

Outline Multiplies two 32-bit data and stores the result into the specified 64-bit area.
( P31 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F31 D* , S1 , S2 , D ]

S1 Constant value or lower 16-bit area of 32-bit data (for multiplicand)

S2 Constant value or lower 16-bit area of 32-bit data (for multiplier)

D Lower 16-bit area of 64-bit data (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Multiplies the 32-bit data or constant value specified by S1 and one specified by S2
when the trigger tums ON.
The multiplied result is stored into D+3, D+2, D+1 and D. (64-bit
area)

Note :
When processing 32-bit data, the higher 16-bit areas ( S1+1, S2+1) are
automatically decided if the lower 16-bit areas ( S1, S2 ) are specified.
S1 (lower) = DT0 S2 (lower) = WR1
S1+1 (higher) = DTl, S2+1 (higher) = WR2
The multipled result is stored into the 64-bit area.
The areas ( D+3 ,D+2, D+1 ) other than the lowest 16-bit area(D) are
automatically decided when the lowest 16-bit area is specified.
e.g. D = DT10
D+1 = DT11
D+2 = DT12
D+3 = DT13
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 10 ST R 0
10 [ F31 D* , WX 0 , WX 2 , DT 0 ] 11 F 31 ( D* )
WX 0
WX 2
DT 0

In the example above, multiplies the contents of WX0 and WX1( K1638411) and the
contents of WX2 and WX3 ( K458761 ) when the R0 tums ON.
The multiplied result (K751639068771) is stored into DT3, DT2,DT1 and DT0.

WX 1 WX 0
K 1638411

X
WX 3 WX 2
K 458761

R0 : ON

DT 3 DT 2 DT 1 DT 0
K 751639068771
F32 (%) 16 Bit data
P32 (P%) [S1 / S2 -> D...(DT9015)]
Steps : 7

Outline Devides the 16-bit data by the devisor and stores the result and remainder
in to the specified area.
( P32 : executed only when the leading edge of the trigger is detected. )
Basic style
of instruction Trigger
[ F32 % , S1 , S2 , D ]

S1 Constant value or 16-bit area (for devidend)

S2 Constant value or 16-bit area (for devisor)

D 16-bit area (for quotient)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description The 16-bit data or constant value specified by S1 is devided by the 16-bit data or
constant value specified by S2 when the trigger tums ON.
The quotient is stored into D and remainder is stored into the special data
register
(DT9015).
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the constant value or 16-bit data for devisor
specified by S2 is 0.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the constant value or 16-bit data for devisor
specified by S2 is 0.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when negative minimum value.
(K-32768 or H8000 is devided by -1(K-1 or HFFFF)

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F32 % , DT 0 , DT 1 , WR 0 11 F 32 ( % )
] DT 0
DT 1
WR 0

In the example above, devides the contents of DT0 ( K1138 ) by the contents of
DT1 ( K35 ) when the X0 tums ON.
The quotient (K32) is stored into WR0 and remainder (K5) is stored into the special data
register (DT9015).

DT 0
K 1138

DT 1
K 35

X0 : ON

WR 0
Quoient
K 32

DT9015
Remainder
K 5
F33 (D%) 32 Bit data
[(S1 +1, S1) / (S2 +1, S2) ->
P33 (PD%) (D+1, D)...DT9016, DT9015] Steps :11

Outline Devides the 32-bit data by the devisor and stores the result and remainder
into the specified area.
( P33 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F33 D% , S1 , S2 , D ]

S1 Constant value or lower 16-bit area of 32-bit data (for devidend)

S2 Constant value or lower 16-bit area of 32-bit data (for devisor)

D Lower 16-bit area of 32-bit data (for quoient)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1

S2

D
: Available

Description The 32-bit data or constant value specified by S1 is devided by the 32-bit data or
constant value specified by S2 when the trigger tums ON.
The quoient is stored into D+1 and D and the remainder is stored into the special
data registers (DT9016) and (DT9015).

Note :
When processing 32-bit data, the higher 16-bit areas ( S1+1, S2+1, D+1 ) are
automatically decided if the lower 16-bit areas ( S1, S2, D ) are specified.
S1 (lower) = DT0 S2 (lower) = WR1 D (lower) = WY1
S1+1 (higher) = DTl, S2+1 (higher) = WR2, D+1 (higher) = WY2
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the constant value or 16-bit data for devisor
specified by S2 is 0.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the constant value or 16-bit data for devisor
specified by S2 is 0.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when negative minimum value.
(K-2147483648 or H80000000) is devided by -1 (K-1 or
H7FFFFFFF)
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X0 10
ST X
10 [ F33 D% , DT 0 , DT 10 , WR 0 011
] F 33 ( D% )
DT 0
DT 10
WR 0
In the example above, devides the contents of DT1 and DT0 ( K16908416) by the
contents of DT11 and DT10( K589828 ) when the X0 tums ON.
The quotient (K28) is stored into WR1 and WR0 and remainder (K393232) is stored into the
special data register (DT9016 and DT9015).

DT 1 DT 0
K 16908416

DT 11 DT 10
K 589828

X0 : ON

WR 1 WR 0
Quoient
K 28

DT9016 DT9015
Remainder
K 393232
F35 (+1) 16 Bit data increment
P35 (P+1) [D+1 -> D]
Steps : 3

Outline Adds 1 to the 16-bit data and stores the result into the augend area.
( P35 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F35 +1 , D ]

D 16-bit area to be increased by 1

■ Operands
Word Operands Constant
Preset Index
(Set) WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
value
D
: Available

Description Add 1 to the 16-bit data specified by D when the trigger tums ON.
The added result is stored into D.

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceeds the maximum value of 16-bit data (overflows)
※ Range of 16-bit data : K-32768 to K32767

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F35 +1, WR 0 ] 11 F 35 ( +1 )
WR 0

In the example above, adds 1 to the contents of WR0 ( K1) when the X0 tums ON.
The added result ( K2 ) is stored into WR0.

WR 0
K 1

X0 : ON

WR 0
K 2
F36 (D+1) 32 Bit data increment
P36 (PD+1) [(D+1, D) +1 -> (D+1,D)]
Steps : 3

Outline Adds 1 to the 32-bit data and stores the result into the augend area.
( P36 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F36 D+1 , D ]

D 32-bit area to be increased by 1

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Add 1 to the 32-bit data specified by D when the trigger tums ON.
The added result is stored into D+1, D.

Note :
When processing 32-bit data, the higher 16-bit area ( D+1 ) is automatically
decided if the lower 16-bit area(D) is specified.
D (lower) = WR6
D+1 (higher) = WR7

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceed the maximum value of 32-bit data (overflows)
※ Range of 32-bit data : K-2147483648 to K2147483647

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F36 D+1, WR 0 ] 11 F 36 ( D+1 )
WR 0

In the example above, adds 1 to the contents of WR1 and WR0 ( K10 ) when the X0
tums ON.
The added result ( K2 ) is stored into WR1 and WR0.

WR 1 WR 0
K 10

X0 : ON

WR 1 WR 0
K 11
F37 (-1) 16 Bit data decrement
P37 (P-1) [D-1 -> D]
Steps : 3

Outline Substracts 1 from the 16-bit data and stores the result into the minuend area.
( P37 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F37 -1 , D ]

D 16-bit area to be decreased by 1

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Substracts 1 from the 16-bit data specified by D when the trigger tums ON.
The substracted result is stored into D.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
becomes below the mimimum value of 16-bit data overflow)
※ Range of 16-bit data : K-32768 to K32767

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F37 -1, WR 0 ] 11 F 37 ( -1 )
WR 0

In the example above, substracts 1 from the contents of WR0 ( K100) when the
X0
tumssubstracted
The ON. result ( K99) is stored into WR0.

WR 0
K 100

X0 : ON

WR 0
K 99
F38 (D-1) 32 Bit data decrement
P38 (PD-1) [(D+1, D) -1 -> (D+1,D)]
Steps : 3

Outline Subtracts 1 from the 32-bit data and stores the result into the minuend area.
( P38 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F38 D-1 , D ]

D Lower 16-bit area of 32-bit data to be decreased by 1

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Subtracts 1 from the 32-bit data specified by D when the trigger tums ON.
The subtracted result is stored into D+1, D.

Note :
When processing 32-bit data, the higher 16-bit area ( D+1 ) is automatically
decided if the lower 16-bit area(D) is specified.
D (lower) = WR6
D+1 (higher) = WR7

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
becomes below the minimum value of 32-bit data
(underflows)
※ Range of 32-bit data : K-2147483648 to K2147483647

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X
10 [ F38 D-1, WR 0 ] 11 0
F 38 ( D-1 )
WR 0

In the example above, subtracts 1 from the contents of WR1 and WR0 ( K100000)
when the X0 tums ON.
The subtracted result ( K99999 ) is stored into WR1 and WR0.

WR 1 WR 0
K 100000

X0 : ON

WR 1 WR 0
K 99999
F160 (DSQR) 32 Bit data square root
[ ( S + 1 , S ->
) (D+1,D) ]
P160 (PDSQR) Steps : 7

Outline Finds the square root of the 32-bit data and stores the specified 32-bit area.
(P160 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F160 DSQR , S , D ]

Constant value or lower 16-bit area of 32-bit data(for data to be


S calculated)

D 16-bit area (for augend and result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
D
: Available

Description The square root of the 32-bit data or constant value specified by S is calculated
when the trigger tums ON.
The result(square root) is stored into D+1, D.
※ The figures of the first decimal place and below are disregarded.

Note :
When processing 32-bit data, the higher 16-bit area ( S1+1, D+1 ) is
automatically decided if the lower 16-bit area(S, D) is specified.
S (lower) = WR6 D (lower) = DT0
S+1 (higher) = WR7, D+1 (higher) = DT1

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the constant value or 32-bit data specified by
S is negative value.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the constant value or 32-bit data specified by
S is negative value.
The error address is transferred in the DT9018.
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X
10 [ F160 DQSR, DT 0, WY 0 ] 11 0
F 160 (
DQSR)
DT 0
WY 0
In the example above, the square root of DT1 and DT0 ( K246813) is calculated
when the X0 tums ON.
The square root( K496 ) is stored into WY1 and WY0.

DT 1 DT 0
K 246813

X0 : ON

WY 1 WY 0
K 496
BCD Arithmetic Instructions
F40( B+ ) P40( PB+ ) 4-digit BCD [D+S -> D] ..................................208
F41( BD+ ) P41( PDB+ ) 8-digit BCD [D+1,D) + (S+1,S)
-> (D+1, D)] ......................210
F42( B+ ) P42( PD+ ) 4-digit BCD [S1+S2 -> D] ................................212
F43( DB+ ) P43( PDB+ ) 8-digit BCD [S1+1, S1) + (S2+1, S2)
-> (D+1, D)]........................214
F45( B- ) P45( PB- ) 4-digit BCD [D-S -> D] ....................................216

F46( DB- ) P46( PDB- ) 8-digit BCD [D+1,D) - (S+1,S)


-> (D+1, D)] ......................218

F47( B- ) P47( PB- ) 4-digit BCD [S1-S2 -> D] ................................220

F48( DB- ) P43( PDB- ) 8-digit BCD [S1+1, S1) - (S2+1, S2)
-> (D+1, D)] ......................222

F50( B* ) P50( PB* ) 4-digit BCD [S1x S2 -> (D+1,D)] ....................224

F51( DB* ) P51( PDB* ) 8-digit BCD [S1+1, S1) x (S2+1, S2)
-> (D+1, D)] ......................226

F52( B% ) P52( PB% ) 4-digit BCD [S1/S2 -> D....(DT9015)]..............228

F53( DB% ) P53( PDB% ) 8-digit BCD [S1+1, S1) / (S2+1, S2)
-> (D+1,D)] (DT9016, DT90150] .................230
F55( B+1 ) P55( PB+1 ) 4-digit BCD increnent [D+1 ->D] ...................232

F56(DB+1 ) P56( PDB+1 ) 8-digit BCD increment [D+1,D) + 1


-> (D+1, D)] ......................234

F57( B-1 ) P57( PB-1 ) 4-digit BCD decrenent [D-1 ->D] ...................236
F58(DB-1 ) P58( PDB-1 ) 8-digit BCD decrenent [D+1,D) - 1
-> (D+1, D) ........................238

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F40 (B+) 4-digit BCD
P40 (PB+) [D + S -> D]
Steps : 5

Outline Adds two 4-digit BCD data and stores the result into the augend area.
( P40 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F40 B+ , S , D ]

S Constant value or 4-digit area of BCD

D 4-digit area of BCD (for augend and result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
D
: Available

Description The 4-digit BCD data or constant value specified by S and the 4-digit BCD data
specified by D are added together as follows when the trigger tums ON.
The added result is stored into D ( area for augend )

Augend data Addend data Result


Trigger turns ON
D + S D

Note :

When this instruction is used, the area for augend ( D ) is overwritten by the
addedresult. If you want to avoid the overwrite, we recommend you the use of
F42 / P42 instructions instead of F40 / P40 instructions.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .
Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceeds the maximum value of 4-digit BCD data.(overflows)
※ Range of 4-digit BCD data : H0 to H9999

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 10 ST R
10 [ F40 B+ , WR 5 , WR 6 ] 11 0
F 40 ( B+ )
WR 5
WR 6

In the example above, the contents of WR5 ( H1111 ) and WR6 ( H2222 ) are added
together when the R0 tums ON.
The added result ( H3333 ) is stored into WR6.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 6
2 2 2 2

+
WR 5
1 1 1 1

R0 : ON

WR 6
3 3 3 3
F41 (DB+) 8 digit BCD
P41 (PDB+) [(D+1,D) + (S+1,S) -> (D+1,D)]
Steps : 7

Outline Adds two 8-digit BCD data and stores the result into the augend area.
( P41 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F41 DB+ , S , D ]

S Constant value or 4-digit area of 8-digit BCD data (for addend)

D Low 4-digit area of 8-digit BCD data (for augend

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description The 8-digit BCD data or constant value specified by S and the 8-digit BCD data
specified by D are added together as follows when the trigger tums ON.

The added result is stored into D+1 and D.

Augend data Addend data Result


Trigger turns ON
D : Lower 4-digit S : Lower 4-digit D : Lower 4-digit
D+1: Higher 4-digit + S+1: Higher 4-digit D+1: Higher 4-digit
(Constant value available)

Note :
When processing 8-digit BCD data, the higher 4-digit areas ( S+1, D+1 ) are
automatically decided if the lower 4-digit areas ( S, D ) are specified.
S (lower) = WR0 D (lower) = DT1
S+1( higher )= WRl, D+1 ( higher )= DT2

Note :

When this instruction is used, the area for augend ( D+1, D ) is overwritten
by the addedresult. If you want to avoid the overwrite, we recommend you the
use of F43/ P43 instructions instead of F41/ P41 instructions.
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceeds the maximum value of 8-digit BCD data.(overflows)
※ Range of 8-digit BCD data : H0 to H99999999

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X20 10 ST X 20
10 [ F41 DB+ , DT 0 , WR 0 ] 11 F 41 ( DB+ )
DT 0
WR 0

In the example above, the contents of WR1 and WR0 ( H12345678 ) and the contents
of DT1 and DT0 ( H98765432 ) are added together when the X20 turns ON.
The added result ( H11111110 ) is stored into WRI and WR0.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 1 WR 0
1 2 3 4 5 6 7 8

+
DT 1 DT 0
9 8 7 6 5 4 3 2

X20 : ON

WR 1 WR 0
1 1 1 1 1 1 1 0
F42 (B+) 4-digit BCD
P42 (PB+) [S1 + S2 -> D]
Steps : 7

Outline Adds two 4-digit BCD data and stores the result into the specified area.
( P42 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F42 B+ , S1 , S2 , D ]

S1 Constant value or 4-digit area of BCD (for augend)

S2 Constant value or 4-digit area of BCD (for addend)

D 4-digit area of BCD (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

The 4-digit BCD data or constant value specified by S1 and the 4-digit BCD data or
Description
constant value specified by S2 are added together as follows when the trigger tums
ON. added result is stored into D.
The

Augend data Addend data Result


Trigger turns ON
S1 + S2 D

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .
Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceeds the maximum value of 4-digit BCD data.(onerflows)
※ Range of 4-digit BCD data : H0 to H9999

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X10 10 ST X 10
10 [ F42 B+ , DT 0 , DT 1 , WY2 11 F 42 ( B+ )
] DT 0
DT 1
WY 2

In the example above, the contents of DT0 ( H1111 ) and DT1 ( H2222 ) are added
together when the X10 tums ON.
The added result ( H3333 ) is stored into WY2.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 0
1 1 1 1

+
DT 1
2 2 2 2

X10 : ON

WY 2
3 3 3 3
F43 (DB+) 8-digit BCD
P43 (PDB+) [(S1 + 1, S1) + (S2 +1,S2) -> (D+1,D)]
Steps :11

Outline Adds two 8-digit BCD data and stores the result into the specified area.
( P43 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F43 DB+ , S1 , S2 , D ]

S1 Constant value or lower 4-digit area of 8-digit BCD data (for augend)
S2 Constant value or lower 4-digit area of 8-digit BCD data (for addend)

D Lower 4-digit area of 8-digit BCD data (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description The 8-digit BCD data or constant value specified by S1 and 8-digit BCD data or
constant value specified by S2 are added together as follows when the trigger tums
ON.
The added result is stored into D+1 and D.

Augend data Addend data Result


Trigger turns ON
S : Lower 4-digit S2 : Lower 4-digit D : Lower 4-digit
S1+1: Higher 4-digit + S2+1: Higher 4-digit D+1: Higher 4-digit
(Constant value available) (Constant value available)

Note :
When processing 8-digit BCD data, the higher 4-digit areas ( S1+1, S2+1, D+1 ) are
automatically decided if the lower 4-digit areas ( S1, S2, D ) are specified.
S1 (lower) = DT0 S2 (lower) = WR1 D (lower) = WY1
S1+1 (higher) = DTl, S2+1 (higher) = WR2, D+1 (higher) = WY2
■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceeds the maximum value of 8-digit BCD data.(overflows)
※ Range of 8-digit BCD data : H0 to H99999999
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X20 10 ST X
10 [ F43 DB+ , DT 0 , WR 0 , WY 3] 11 20
F 43 ( DB+ )
DT 0
WR 0
WY 3
In the example above, the contents of DT1 and DT0 ( H12345678 ) and the contents
of WRI and WR0 ( H11111111 ) are added together when the X20 turns ON.
The added result ( H23456789 ) is stored into WY4 and WY3.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 1 DT 0
1 2 3 4 5 6 7 8

+
WR 1 WR 0
1 1 1 1 1 1 1 1

X20 : ON

WY 4 WY 3
2 3 4 5 6 7 8 9
F45 (B-) 4-digit BCD
P45 (PB-) [D - S -> D]
Steps : 5

Outline Subtracts two 4-digit BCD data from the minuend and stores the result into
theminuend area.
( P45 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F45 B- , S , D ]

S Constant value or 4-digit area of BCD (for subtrahend)

D 4-digit area of BCD (for minuend and result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description Subtracts the 4-digit BCD data or constant value specified by S from the 4-digit BCD
data specified by D are as follows when the trigger tums ON.
The subtracted result is stored into D ( minuend area )

Augend data Addend data Result


Trigger turns ON
D - S D

Note :
When this instruction is used, the area for minuend ( D ) is overwritten by the
subtracted result. If you want to avoid the overwrite, we recommend you the use
of F47 / P47 instructions instead of F45 / P45 instructions.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .
Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
becomes below the minimum value of 4-digit BCD data.
(underflows)

※ Range of 4-digit BCD data : H0 to H9999

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 10 ST R 0
10 [ F45 B- , WR 5 , WR 6 ] 11 F 45 ( B- )
WR 5
WR 6

In the example above, subtracts the contents of WR5 ( H1111 ) from the contents of
WR6 ( H2222 ) when the R0 tums ON.
The subtracted result ( H1111 ) is stored into WR6.(mnuend area)

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 6
2 2 2 2

-
WR 5
1 1 1 1

R0 : ON

WR 6
1 1 1 1
F46 (DB-) 8-digit BCD

P46 (PDB-) [(D+1,D) - (S+1,S) -> (D+1,D)]


Steps : 7

Outline Subtracts the 8-digit BCD data from the minuend and stores the result into
the minuend area.
(P46 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F46 DB- , S , D ]

S Constant value or lower 4-digit area of 8-digit BCD data


(for subtrahend)

D Lower 4-digit area of 8-digit BCD data (for minuend and result)

■ Operands
Word Operands Constant
Preset Index
(Set) WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
value
S
D
: Available

Description Subtracts the 8-digit BCD data or constant value specified by S from the 8-digit BCD
data specified by D as follows when the trigger tums ON.

The subtracted result is stored into D+1 and D.(minuend area)

Minuend data Sbbtrahend data Result


Trigger turns ON
D : Lower 4-digit S : Lower 4-digit D : Lower 4-digit
D+1: Higher 4-digit - S+1: Higher 4-digit D+1: Higher 4-digit

Note :
When processing 8-digit BCD data, the higher 4-digit areas ( D+1, S+1 ) are
automatically decided if the lower 4-digit areas ( D, S ) are specified.
D (lower) = WR0 S (lower) = DT1
D+1( higher )= WRl, S+1 ( higher )= DT2

Note :

When this instruction is used, the area for minuend ( D+1, D ) is overwritten
by the subtracted result. If you want to avoid the overwrite, we recommend you
the use of F48/ P48 instructions instead of F46/ P46 instructions.
■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
becomes below the minimum value of 8-digit BCD data.
(underflows)
※ Range of 8-digit BCD data : H0 to H99999999

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X20 40 ST X 20
40 [ F46 DB- , DT 0 , WR 0 ] 41 F 46 ( DB- )
DT 0
WR 0

In the example above, subtracted the contents of DT1 and DT0 ( H111111111 ) from
the contents of WR1 and WR0 ( H87654321 ) when the X20 turns ON.
The subtracted result ( H76543210 ) is stored into WRI and WR0.(minuend area)

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 1 WR 0
8 7 6 5 4 3 2 1

-
DT 1 DT 0
1 1 1 1 1 1 1 1

X20 : ON

WR 1 WR 0
7 6 5 4 3 2 1 0
F47 (B-) 4-digit BCD
P47 (PB-) [S1 - S2 -> D]
Steps : 7

Outline Subtracts the 4-digit BCD data from the minuend and stores the result into
the specified area.
( P47 : executed only when the leading edge of the trigger is detected. )
Basic style
of instruction Trigger
[ F47 B- , S1 , S2 , D ]

S1 Constant value or 4-digit area of BCD (for minuend)

S2 Constant value or 4-digit area of BCD (for subtrahend)

D 4-digit area of BCD (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1

S2

D
: Available

Description Subtracts the 4-digit BCD data or constant value specified by S2 from the 4-digit
BCD data or constant value specified by S1 as follows when the trigger tums ON.
The subtracted result is stored into D.

Minuend data Subtrahend data Result


Trigger turns ON
S1 - S2 D

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .
Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
becomes below the minimum value of 4-digit BCD data.
(underflows)

※ Range of 4-digit BCD data : H0 to H9999


Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 10 ST R
10 [ F47 B- , WR 5 , WR 6 , WY 11 0
3 ] F 47 ( B- )
WR 5
WR 6
WY 3
In the example above, subtracts the contents of WR6 ( H2222 ) from the contents of
WR5 ( H5678 ) when the R0 tums ON.
The subtracted result ( H3456 ) is stored into WY3.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 5
5 6 7 8

-
WR 6
2 2 2 2

R0 : ON

WY 3
3 4 5 6
F48 (DB-) 8-digit BCD
P48 (PDB-) [(S1 + 1, S1) - (S2 +1,S2) -> (D+1,D)]
Steps :11

ٛ utline Subtracts the 8-digit BCD data from the minuend and stores the result into
the specified area.
( P48 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F48 DB- , S1 , S2 , D ]

S1 Constant value or lower 4-digit area of 8-digit BCD data (for minuend)
S2 Constant value or lower 4-digit area of 8-digit BCD data (for addend)

D Lower 4-digit area of 8-digit BCD data (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Subtracts the 8-digit BCD data or constant value specified by S2 from the 8-digit
BCD data or constant value specified by S1 as follows when the trigger tums ON.

The subtrscted result is stored into D+1 and D.

Minuend data Sbbtrahend data Result


Trigger turns ON
S : Lower 4-digit S2 : Lower 4-digit D : Lower 4-digit
S1+1: Higher 4-digit - S2+1: Higher 4-digit D+1: Higher 4-digit
(Constant value available) (Constant value available)

Note :
When processing 8-digit BCD data, the higher 4-digit areas ( S1+1, S2+1, D+1 ) are
automatically decided if the lower 4-digit areas ( S1, S2, D ) are specified.
S1 (lower) = DT0 S2 (lower) = WR1 D (lower) = WY1
S1+1 (higher) = DTl, S2+1 (higher) = WR2, D+1 (higher) = WY2
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
becomes below the minimum value of 8-digit BCD data.
(underflows)
※ Range of 8-digit BCD data : H0 to H99999999
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R10 10 ST R 10
10 [ F48 DB- , WX 0 , WX3 , DT50] 11 F 48 ( DB- )
WX 0
WX 3
DT 50

In the example above, subtracts the contents of WX4 and WX3 ( H11111111 ) from
the contents of WX1 and WX0 ( H88888888 ) when the R10 turns ON.
The subtracted result ( H77777777 ) is stored into DT51 and DT50.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WX 1 WX 0
8 8 8 8 8 8 8 8

-
WX 4 WX 3
1 1 1 1 1 1 1 1

R10 : ON

DT 51 DT 50
7 7 7 7 7 7 7 7
F50 (B*) 4-digit BCD
P50 (PB*) [S1 x S2 -> (D+1, D)]
Steps :7

Outline Multiples two 4-digit BCD data and stores the result into the specified
8-digit BCD area.
( P50 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F50 * , S1 , S2 , D ]

S1 Constant value or 4-digit area of BCD (for multiplicand)

S2 Constant value or 4-digit area of BCD (for multiplier)

D Lower 4-digit area of 4-digi BCD data (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Multiples the 4-digit BCD data or constant value specified by S1 and the 4-digit BCD
data or constant value specified by S2 as follows when the trigger tums ON.
The multiplied result is stored into D+1 and D (32-bit area).

Note :
The multipled result is stored into the 8-digit area.
The higher 4-digit area ( D+1 ) is automatically when the lower 4-digit area(D)
is specified.
D (lower) = WR6
D+1 (higher) = WR7

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.
= flag ( R900B ) : Turns ON for an instant when the calculated result is
recognized as "0" .
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X0 10 ST X 0
10 [ F50 B* , WR 0 , WR 1, DT 100] 11 F 50 ( B* )
WR 0
WR 0
DT 100

In the example above, multiplies the contents of WR0 ( H1111 ) and the contents of
WR1 ( H1122 ) when the X0 tums ON.

The multiplied result ( H01246542 ) is stored into DT101 and DT100.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 0
1 1 1 1

x
WR 1
1 1 2 2

X0 : ON

DT 101 DT 100
0 1 2 4 6 5 4 2
F51 (DB*) 8-digit BCD
P51 (PDB*) [(S1 +1, S1) X (S2 +1, S2) -> (D+3, D+2, D+1, D)]
Steps :11

Outline Multiplies two 8-digit BCD data and stores the result into the specified
16-digit BCD area.
( P51 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F51 DB* , S1 , S2 , D ]

S1 Constant value or lower 4-digit area of 8-digit BCD data (for multiplicand)

S2 Constant value or lower 4-digit area of 8-digit BCD data (for multiplier)

D Lower 4-digit area of 16-digit BCD data (for result)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Multiplies the 8-digit BCD data or constant value specified by S1 and one specified
by S2 when the trigger tums ON.
The multiplied result is stored into D+3, D+2, D1 and D.(16-digit
area)
Note :
When processing 8-digit BCD data, the higher 4-digit areas ( S1+1, S2+1) are
automatically decided if the lower 4-digit areas ( S1, S2 ) are specified.
S1 (lower) = DT0 S2 (lower) = WR1
S1+1 (higher) = DTl, S2+1 (higher) = WR2

The multipled result is stored into the 16-digit area.


The areas ( D+3 ,D+2, D+1 ) other than the lowest 16-bit area(D) are
automatically decided when the lowest 4-digit area is specified.
e.g. D = DT100
D+1 = DT101
D+2 = DT102
D+3 = DT103
■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X0 10 ST X 0
10 [ F51 DB* , DT 0 , DT 2, DT 11 F 51 ( DB* )
200] DT 0
DT 2
DT 200

In the example above, multiplies the contents of DT1 and DT0( H01966100 ) and the
contents of DT3 and DT2( H03279840 ) when the X0 tums ON.
The multiplied result ( H0006442595124000 ) is stored into DT203, DT202,DT201
and DT200

DT 1 DT 0
0 1 9 6 6 1 0 0

x
DT 3 DT 2
0 3 2 7 9 8 4 0

X0 : ON

DT 203 DT 202 DT 201 DT 200


0 0 0 6 4 4 2 5 9 5 1 2 4 0 0 0
F52 (B%) 4-digit BCD
P52 (PB%) [S1 / S2 -> D...(DT9015)]
Steps : 7

Outline Devides the 4-digit BCD data by the devisor and stores the result and
remainder in to the specified area.
( P52 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F52 B% , S1 , S2 , D ]

S1 Constant value or 4-digit area of BCD (for devidend)

S2 Constant value or 4-digit area of BCD (for devisor)

D 4-digit area (for quotient)

■ Operands
Word Operands Constant
Preset Index
(Set) WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
value
S1
S2

D
: Available

Description The 4-digit BCD data or constant value specified by S1 is devided by the 4-digit
BCD data or constant value specified by S2 when the trigger tums ON.
The quotient is stored into D and remainder is stored into the special data register
(DT9015).

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
∙ when the constant value or 4-digit BCD data for
devisor specified by S2 is 0.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
∙ when the constant value or 4-digit BCD data for
devisor specified by S2 is 0.
The error address is transferred in the DT9018

= flag ( R900B ) : Turns ON for an instant when the calculated result


(quoient) is recognized as "0" .
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F52 B% , DT 0 , DT 1 , WR 0 11 F 52 ( B% )
] DT 0
DT 1
WR 0

In the example above, devides the contents of DT0 ( H1156 ) by the contents of
DT1 ( H0292 ) when the X0 tums ON.
The quotient ( H0003 ) is stored into WR0 and the remainder ( H0280 ) is stored into the
special data register (DT9015).

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 0
1 1 5 6

DT 1
0 2 9 2

X0 : ON

WR 0
Quoient
0 0 0 3

DT 9015
Remainder
0 2 8 0
F53 (DB%) 8-digit BCD
[(S1 +1, S1) / (S2 +1, S2) ->
P53 (PDB%) (D+1, D)...DT9016, DT9015] Steps :11

Outline Devides the 8-digit BCD data by the devisor and stores the result and
remainder into the specified area.
( P53 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F53 DB% , S1 , S2 , D ]

S1 Constant value or lower 4-digit area of 8-digit BCD data (for devidend)

S2 Constant value or lower 4-digit area of 8-digit BCD data (for devisor )

D Lower 4-digit area of 8-digit BCD data (for quoient)

■ Operands
Word Operands Constant
Preset Index
(Set) WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
value
S1
S2

D
: Available

Description The 8-digit BCD data or constant value specified by S1 is devided by 8-digit BCD
data or constant value specified by S2 when the trigger tums ON.
The quoient is stored into D+1 and D and the remainder is stored into the special
data registers (DT9016) and (DT9015).

Note :
When processing 8-digit BCD data, the higher 4-digit areas ( S1+1, S2+1, D+1 )
are automatically decided if the lower 4-digit areas (S1, S2, D) are specified.
S1 (lower) = DT0 S2 (lower) = WR1 D (lower) = WY1
S1+1 (higher) = DTl, S2+1 (higher) = WR2, D+1 (higher) = WY2
■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
∙ when the constant value or 4-digit BCD data for
devisor specified by S2 is 0.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
∙ when the constant value or 4-digit BCD data for
devisor specified by S2 is 0.
The error address is transferred in the DT9018

= flag ( R900B ) : Turns ON for an instant when the calculated result


(quoient) is recognized as "0" .
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X0 10 ST X 0
10 [ F53 DB% , DT 0 , DT 2 , WR 11 F 53 ( DB% )
0 ] DT 0
DT 2
WR 0

In the example above, devides the contents of DT1 and DT0 ( H12851156 ) by the
contents of DT3 and DT2 ( H00000020 ) when the X0 tums ON.
The quotient ( H00642557 ) is stored into WR1 and WR0 and the remainder
( H00000016 ) is stored into the special data register (DT9016 and DT9015).

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 1 DT 0
1 2 8 5 1 1 5 6

DT 3 DT 2
0 0 0 0 0 0 2 0

X0 : ON

WR 1 WR 0
Quoient
0 0 6 4 2 5 5 7

DT 9016 DT 9015
Remainder
0 0 0 0 0 0 1 6
F55 (B+1) 4-digit BCD increment
P55 (PB+1) [D+1 -> D]
Steps : 3

Outline Adds 1 to the 4-digit BCD data and stores the result into the augend area.
( P55 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F55 B+1 , D ]

D 4-digit area of BCD to be increased by 1

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Add 1 to the 4-digit BCD data specified by D when the trigger tums ON.
The added result is stored into D.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceed the maximum value of 4-digit BCD data.(cverflows)
※ Range of 4-digit BCD data : H0 to H9999

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X
10 [ F55 B+1, WR 0 ] 11 0
F 55 ( B+1 )
WR 0

In the example above, adds 1 to the contents of WR0 ( H1111 ) when the X0 tums
ON.
The added result ( H1112 ) is stored into WR0.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 0
1 1 1 1

X0 : ON

WR 0
1 1 1 2
F56 (DB+1) 8-digit BCD increment
P56 (PDB+1) [(D+1, D) +1 -> (D+1,D)] Steps : 3

Outline Adds 1 to the 8-digit BCD data and stores the result into the augend area.
( P56 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F36 DB+1 , D ]

D Lower 4-digit area of 8-digit BCD data to be increased by 1

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Add 1 to the 8-digit BCD data specified by D when the trigger tums ON.
The added result is stored into D+1, D.

Note :
When processing 8-digit BCD data, the higher 4-digit area ( D+1 ) is
automatically decided if the lower 4-digit area(D) is specified.
D (lower) = WR6
D+1 (higher) = WR7

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
exceed the maximum value of 8-digit BCD data.(cverflows)
※ Range of 8-digit BCD data : H0 to H99999999
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F56 DB+1, WR 0 ] 11 F 56 ( DB+1 )
WR 0

In the example above, adds 1 to the contents of WR1 and WR0 ( H11111130 ) when
the X0 tums ON.
The added result ( H11111131 ) is stored into WR1 and WR0.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 1 WR 0
1 1 1 1 1 1 3 0

X0 : ON

WR 1 WR 0
1 1 1 1 1 1 3 1
F57 (B-1) 4-digit BCD decrement
P57 (PB-1) [D-1 -> D] Steps : 3

Outline Substracts 1 from the 4-digit BCD data and stores the result into the
minuend area.
( P57 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F57 B-1 , D ]

D 16-bit area to be decreased by 1

■ Operands
Word Operands Constant
Preset Index
(Set) WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
value
D
: Available

Description Substracts 1 from the 4-digit BCD data specified by D when the trigger tums ON.
The substracted result is stored into D.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
becomes below the minimum value of 4-digit BCD data.
(Underflows)
※ Range of 4-digit BCD data : H0 to H9999

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X
10 [ F57 B-1, WR 0 ] 11 0
F 57 ( B-1 )
WR 0

In the example above, substracts 1 from the contents of WR0 ( H1104) when the X0
tums ON.
The substracted result ( H1103 ) is stored into WR0.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 0
1 1 0 4

X0 : ON

WR 0
1 1 0 3
F58 (DB-1) 8-digit BCD decrement
P58 (PDB-1) [(D+1, D) -1 -> (D+1,D)] Steps : 3

Outline Subtracts 1 from the 8-digit BCD data and stores the result into the
minuend area.
( P58 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F58 DB-1 , D ]

D Lower 4-digit area of 8-digit BCD data to be decreased by 1

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Subtracts 1 from the 8-digit BCD data specified by D when the trigger tums ON.
The subtracted result is stored into D+1, D.

Note :
When processing 8-digit BCD data, the higher 4-digit area ( D+1 ) is
utomatically decided if the lower 16-bit area(D) is specified.
D (lower) = WR6
D+1 (higher) = WR7

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the data is not BCD data.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0" .

Carry flag ( R9009 ) : Turns ON for an instant when the calculated result
becomes below the minimum value of 8-digit BCD data.
(Underflows)
※ Range of 8-digit BCD data : H0 to H99999999
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F58 DB-1, WR 3 ] 11 F 58 ( DB-1 )
WR 3

In the example above, subtracts 1 from the contents of WR4 and WR3 ( H66665553 )
when the X0 tums ON.
The subtracted result ( H66665552 ) is stored into WR4 and WR3.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 4 WR 3
6 6 6 6 5 5 5 3

X0 : ON

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 4 WR 3
6 6 6 6 5 5 5 2
Data Comparision Instructions

F60( CMP ) P60( PCMP ) 16-bit data Compare ........................................242


F61( DCMP ) P61( PDCMP ) 32-bit data Compare ........................................244
F62( WIN ) P62( PWIN ) 16-bit data range compare ..............................246
F63( DWIN ) P63( PDWIN ) 32-bit data range compare ..............................248

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F60 (CMP)
16 Bit data Compare
P60 (PCMP) Steps : 5

Outline Compares one 16-bit data with another one.


( P60 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F60 CMP , S1 , S2 ]

S1 Constant value or 16-bit area to be compared

S2 Constant value or 16-bit area to be compared

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1

S2
: Available

Description Compares the 16-bit data specified by S1 with one specified by S2 when the
trigger tums ON.

■ Compared result
The compared result is sytored into the special relay (R900A , R900B , R900C).

Special relay
Comparision
DATA between R900A R900B R900C R9009
S1 and S2 ( >flag ) ( =flag ) ( <flag ) (Carry flag)

S1 < S2 0 0 1 ↕
16-bit data
S1 = S2 0 1 0 0
with sign
S1 > S2 1 0 0 ↕
S1 < S2 ↕ 0 ↕ 1
16-bit data
S1 = S2 0 1 0 0
without sign
S1 > S2 ↕ 0 ↕ 0

"0" : means OFF , "1" : means ON , "↕" : means flag changes to ON or OFF by conditions.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.
Program
example Address Command

R0 20 ST R 0
20 [ F60 CMP , WX 2 , EV 201 ] 21 F 60 ( CMP )
R0 R900A Y40 WX 2
26 ( ) EV 201
26 ST R 0
R0 R900B Y41 27 AN R 900A
29 ( ) 28 OT Y 40
R0 R900C Y42 29 ST R 0
32 ( ) 30 AN R 900B
31 OT Y 41
32 ST R 0
33 AN R 900C
34 OT Y 42

In the example above, compares the Count (Elapsed) value of Timer /Counter " EV201"
with value of WX2 when the R0 turns ON.
① When the value of WX2 is greater than the Count ( Elapsed ) value of Timer /
Counter "EV201" output Y40 turns ON.
( Turns ON when WX2 > EV201 )
② When the value of WX2 and the Count ( Elapsed ) value of Timer / Counter
"EV201" are equal, output Y41 turns ON.
( Turns ON when WX2 = EV201 )
③ When the value of WX2 is less than the Count ( Elapsed ) value of Timer /
Counter "EV201" output Y42 turns ON.
( Turns ON when WX2 < EV201 )

Notes :

When using the special relays ( R9009, R900A, R900B and R900C ) as the flags
of the compared result. be sure to program them at the address right after the
Instruction and do not forget to program the same trigger as the instruction* to get
the accurate comparision result.
* If the special relays are programmed also In the other parts of the program,
the trigger prevents the result of the other instruction from affecting them.
If you program the F60 (CMP) instruction using the special relay 「R9010」 (ON
all the time ), the same trigger as the Instruction need not be programmed as
shown below.

R9010
20 [ F60 CMP , WX 2 , EV 201 ]
R900A Y40
26 ( )
R900B Y41
28 ( )
R900C Y42
32 ( )
F61 (DCMP)
32 Bit data Compare
P61 Steps : 9

(PDCMP)
Outline Compares one 32-bit data with another one.
( P61 : executed only when the leading edge of the trigger is detected. )
Basic style
of instruction Trigger
[ F61 DCMP , S1 , S2 ]

S1 Constant value or lower 16-bit area of 32-bit data to be compared

S2 Constant value or lower 16-bit area of 32-bit data to be compared

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1

S2
: Available

Description Compares the 32-bit data or constant value specified by S1 with one specified by
S2 when the trigger tums ON.

Note :
When processing 32-bit data, the higher 16-bit areas ( S+1, S2+1 ) are
automatically decided if the lower 16-bit areas ( S1, S2 ) are specified.

■ Compared result
The compared result is sytored into the special relay (R900A , R900B , R900C).

Special relay
Comparision
DATA between R900A R900B R900C R9009
S1 and S2 ( >flag ) ( =flag ) ( <flag ) (Carry flag)

S1 < S2 0 0 1 ↕
32-bit data
S1 = S2 0 1 0 0
with sign
S1 > S2 1 0 0 ↕
S1 < S2 ↕ 0 ↕ 1
32-bit data
S1 = S2 0 1 0 0
without sign
S1 > S2 ↕ 0 ↕ 0
"0" : means OFF , "1" : means ON , "↕" : means flag changes to ON or OFF by conditions.
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Program
example Address Command

R0 20 ST R 0
20 [ F61 DCMP , WX 0 , DT 0 ] 21 F 61 ( DCMP )
WX 0
R0 R900A Y50
DT 0
30 ( ) 30 ST R 0
R0 R900B Y51 31 AN R 900A
33 32 OT Y 50
( )
33 ST R 0
R0 R900C Y52 34 AN R 900B
36 ( ) 35 OT Y 51
36 ST R 0
37 AN R 900C
38 OT Y 52

In the example above, compares the 32-bit data(WX0, WX1) with the 32-bit data(DT1
, DT0) when the R0 turns ON.
The compared result is stored into the special relay (R9009, R900A, to R900C ).
① When the value of 「WX0 and WX1」is greater than the value of 「DT0 and
DT1」 output Y50 turns ON.
( Turns ON when WX1, WX0 > DT1, DT0 )
② When the value of 「WX0 and WX1」and the value of 「DT0 and DT1」are
equal, output Y51 turns ON.
( Turns ON when WX1, WX0 = DT1, DT0 )
③ When the value of 「WX0 and WX1」is less than the value of「DT0 and DT1」
output Y52 turns ON.
( Turns ON when WX1, WX0 < DT1, DT0 )

Notes :
When using the special relays ( R9009, R900A, R900B and R900C ) as the flags
of the compared result. be sure to program them at the address right after the
Instruction and do not forget to program the same trigger as the instruction* to get
the accurate comparison result.
* If the special relays are programmed also In the other parts of the program,
the trigger prevents the result of the other instruction from affecting them.
If you program the F61 (DCMP) instruction ualng the special relay「R9010」(ON
all the time ), the same trigger as the Insruction need not be programmed as
shown below.

R9010
20 [ F61 DCMP , WX 0 , DT 0 ]
R900A Y50
30 ( )
R900B Y51
32 ( )
R900C Y52
34 ( )
F62 (WIN) 16 Bit data range
Compare
P62 (PWIN) Steps : 7

Outline Compares one 16-bit data with the range specified by two other 16-bit data.
( P62 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F62 WIN , S1 , S2, S3 ]

S1 Constant value or 16-bit area to be compared

S2 Constant value or 16-bit area for lower limit

S3 Constant value or 16-bit area for upper limit

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

S3
: Available

Description Compares the 16-bit data or constant value with sign specified by S1 with the
range specified by S2 ( lower limit 16-bit data or constant value with sign ) and S3
( upper limit 16-bit data or constant value with sign ) when the trigger tums ON.
Since the BCD data is also treated as 16-bit data with sign, we recommend you the
use of the BCD data within the range of H0 to H7999 to avoid confusion.

■ Compared result
The compared result is sytored into the special relay (R900A , R900B , R900C).

Comparision
Special relay
between
R900A R900B R900C
S1, S2 and S3
( >flag ) ( =flag ) ( <flag )

S1 < S2 0 0 1

S2 ≤S1≤S3 0 1 0
S1 > S3 1 0 0
"0" : means OFF , "1" : means ON

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when S2 > S3.
The error address is transferred in the DT9017 and held
Error flag ( R9008 ) : Turns ON for an instant.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when S2 > S3.
The error address is transferred in the DT9018.

Program
example Address Command

R0 20 ST R 0
20 [ F62 WIN , WX 0 , DT 0 , WR 21 F 62 ( WIN )
R0 5] R900A Y50 WX 0
DT 0
28 ( ) WR 5
R0 R900B Y51 28 ST R 0
31 29 AN R 900A
( )
30 OT Y 50
R0 R900C Y52 31 ST R 0
34 ( ) 32 AN R 900B
33 OT Y 51
34 ST R 0
35 AN R 900C
36 OT Y 52
In the example above, compares the 16-bit data with sign specified by 「WX0」with
the range of 「DT0」(lower limit 16-bit data with sign ) to 「WR5」(upper limit 16-bit
data with sign ) when the R0 turns ON.
The compared result is stored into the special relay( R900A, to R900C ).
① When the value of 「WX0 」is greater than the value of 「WR5」, output Y50
turns ON.
( Turns ON when WX0 > WR5 )
② When the value of 「WX0 」is equal and greater than the value of 「DT0」
and one is equal and less than value of 「WR5」, output Y51 turns ON.
( Turns ON when DT0 ≤ WX0 ≤ WR5 )
③ When the value of 「WX0」is less than the value of「DT0」, output Y52 turns
ON.
( Turns ON when WX0 < DT0 )

Notes :
When using the special relays ( R900A, R900B and R900C ) as the flags of the
compared result. be sure to program them at the address right after the Instruction
and do not forget to program the same trigger as the instruction* to get the
accurate comparision result.
* If the special relays are programmed also In the other parts of the program,
the trigger prevents the result of the other instruction from affecting them.
If you program the F62 (WIN) instruction ualng the special relay 「R9010」(ON
all the time ), the same trigger as the Instruction need not be programmed as
shown below.

R9010
20 [ F62 WIN , WX 0 , DT 0 , WR
R900A 5] Y50
28 ( )
R900B Y51
30 ( )
R900C Y52
32 ( )
F63 (DWIN) 32 Bit data range
Compare
P63 (PDWIN) Steps :13

Outline Compares one 32-bit data with the range specified by two other 32-bit data.
( P63 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F63 DWIN , S1 , S2, S3 ]

S1 Constant value or lower 16-bit area of 32-bit data to be compared

S2 Constant value or lower 16-bit area of 32-bit data for lower limit

S3 Constant value or lower 16-bit area of 32-bit data for upper limit

■ Operands
Word Operands Constant
Preset Index
(Set) WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
value
S1

S2

S3
: Available

Description Compares the 32-bit data or constant value with sign specified by S1 with the
range specified by S2 ( lower limit 32-bit data or constant value with sign ) and S3
( upper limit 32-bit data or constant value with sign ) when the trigger tums ON.

Note :
When processing 32-bit data, the higher 16-bit areas ( S+1, S2+1, S3+1 ) are
automatically decided if the lower 16-bit areas ( S1, S2, S3 ) are specified.

Since the BCD data is also treated as 32-bit data with sign, we recommend you the
use of the BCD data within the range of H0 to H79999999 to avoid confusion.

■ Compared result
The compared result is sytored into the special relay (R900A to R900C).

Comparision
Special relay
between
R900A R900B R900C
S1, S2 and S3
( >flag ) ( =flag ) ( <flag )

S1 < S2 0 0 1

S2 ≤S1≤S3 0 1 0
S1 > S3 1 0 0
"0" : means OFF , "1" : means ON
■ Flag condition
Error flag ( R9007) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when (S2+1, S2) > (S3+1, S3)
The error address is transferred in the DT9017.
Error flag ( R9008 ) : Turns ON for an instant.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when (S2+1, S2) > (S3+1, S3).
The error address is transferred in the DT9018.

Program
example Address Command

R0 20 ST R
20 [ F63 DWIN , WX 0 , DT 0 , 21 0
R0 WRR900A
5] Y50 F 63 ( DWIN
)
34 ( ) WX 0
R0 R900B Y51 34 DT 0
37 35 WR 5
( )
36 ST R 0
R0 R900C Y52 37 AN R
40 ( ) 38 900A
39 OT Y 50
40 ST R 0
41 AN R
42 900B
OT Y 51
In the example above, compares the 32-bit data with sign specified byST「WX1,R WX0」0
with the range of 「DT1 , DT0」 to 「WR6, WR5」 when the R0 turns AN ON. R
The compared result is stored into the special relay( R900A, to R900C900C
).
① When the value of 「WX1, WX0 」is greater than the value ofOT 「WR6,Y WR5」,
52
output Y50 turns ON.
[ Turns ON when (WX1, WX0) > (WR6, WR5 ) ]
② When the value of 「WX1, WX0 」is equal and greater than the value of
「DT1, DT0」 and one is equal and less than value of 「WR6, WR5」, output
Y51 turns ON.
[ Turns ON when (DT1, DT0) ≤ (WX1, WX0) ≤ (WR6, WR5 ) ]
③ When the value of 「WX1, WX0」is less than the value of「DT1, DT0」,
output Y52 turns ON.
[ Turns ON when (WX1, WX0) < (DT1, DT0 ) ]

Notes :
When using the special relays ( R900A, R900B and R900C ) as the flags of the
compared result. be sure to program them at the address right after the Instruction
and do not forget to program the same trigger as the instruction* to get the
accurate comparisin result.
* If the special relays are programmed also In the other parts of the program,
the trigger prevents the result of the other instruction from affecting them.
If you program the F63 (DWIN) instruction using the special relay 「R9010」 (ON
all the time ), the same trigger as the Instruction need not be programmed as
shown below.

R9010
20 [ F63 DWIN , WX 0 , DT 0 ,
R900A WR 5] Y50
34 ( )
R900B Y51
36 ( )
R900C Y52
38 ( )
Logic Operation Instructions

F65( WAN ) P65( PWAN ) 16-bit data AND ...............................................252


F66( WOR ) P66( PWOR ) 16-bit data OR .................................................254
F67( XOR ) P67( PXOR ) 16-bit data Exclusive OR ................................256
F68( XNR ) P68( PXNR ) 16-bit data Exclusive NOR ..............................258

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F65 (WAN) 16 Bit data

P65 (PWAN) AND Steps : 7

Outline Executes AND operation of each bit in two 16-bit data.


( P65 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F66 WAN , S1 , S2, D ]

S1 Constant value or 16-bit area to be executed AND operation

S2 Constant value or 16-bit area to be executed AND operation

D 16-bit area to be stored AND operation result

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Executed AND operation of each bit 16-bit data or in constant value specified by S1
and S2 when the trigger tums ON :
The AND operated result is stored into D.

In this instruction, the conception of AND operation shown below.

S1 S2 D
0 0 0
0 1 0
1 0 0
1 1 1

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0".

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X
10 [ F65 WAN , WR 0 , WR 1 , WY 11 0
5] F 65 ( WAN )
WR 0
WR 1
WY 5
In the example above, executes AND operation of each bin in 16-bit data 「WR0」and
「WR1」 when the X0 turns ON.
The AND operated result is stored into 「WY5」.
You can use this instruction to turn OFF the certain bits of 16-bit data as follows.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0

WR1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 1

X0 : ON

WY5 0 1 0 1 1 0 0 1 0 0 0 0 1 0 1 0

lower 16-bit area


higher 16-bit area
F66 (WOR) 16 Bit data
P66 (PWOR) OR Steps : 7

Outline Executes OR operation of each bit in two 16-bit data.


( P66 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F66 WOR , S1 , S2, D ]

S1 Constant value or 16-bit area to be executed OR operation

S2 Constant value or 16-bit area to be executed OR operation

D 16-bit area to be stored OR operation result

■ Operands
Word Operands Constant
Preset Index
(Set) WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
value
S1
S2

D
: Available

Description Executed OR operation of each bit 16-bit data or in constant value specified by S1
and S2 when the trigger tums ON :
The OR operated result is stored into D.

In this instruction, the conception of OR operation shown below.

S1 S2 D
0 0 0
0 1 1
1 0 1
1 1 1

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0".
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X
10 [ F66 WOR , WR 0 , WR 1 , WY 11 0
5] F 66 ( WOR )
WR 0
WR 1
WY 5
In the example above, executes OR operation of each bin in 16-bit data 「WR0」and
「WR1」 when the X0 turns ON.
The OR operated result is stored into 「WY5」.
You can use this instruction to turn ON the certain bits of 16-bit data as follows.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0

WR1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 1

X0 : ON

WY5 1 1 1 1 1 0 1 1 0 0 1 0 1 1 1 1
F67 (XOR) 16 Bit data
Exclusive OR
P67 (PXOR) Steps : 7

Outline Executes exclusive OR operation of each bit in two 16-bit data.


( P67 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F67 XOR , S1 , S2, D ]

S1 Constant value or 16-bit area to be executed exclusive OR operation

S2 Constant value or 16-bit area to be executed exclusive OR operation

D 16-bit area to be stored exclusive OR operation result

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Executed exclusive OR operation of each bit 16-bit data or in constant value specified
by S1 and S2 when the trigger tums ON :
The exclusive OR operated result is stored into D.

In this instruction, the conception of exclusive OR operation shown below.

S1 S2 D
0 0 0
0 1 1
1 0 1
1 1 0

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0".

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F67 XOR , WR 0 , WR 1 , WY 11 F 67 ( XOR )
5] WR 0
WR 1
WY 5

In the example above, executes exclusive OR operation of each bin in 16-bit data
「WR0」and 「WR1」 when the X0 turns ON.
The exclusive OR operated result is stored into 「WY5」.
You can use this instruction to check how many bits in two 16-bit data same.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0

WR1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 1

X0 : ON

WY5 1 0 1 0 0 0 1 0 0 0 1 0 0 1 0 1
F68 (XNR) 16 Bit data
Exclusive NOR
P68 (PXNR) Steps : 7

Outline Executes exclusive NOR operation of each bit in two 16-bit data.
( P68 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F68 XNR , S1 , S2, D ]

S1 Constant value or 16-bit area to be executed exclusive NOR operation

S2 Constant value or 16-bit area to be executed exclusive NOR operation

D 16-bit area to be stored exclusive NOR operation result

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S1
S2

D
: Available

Description Executed exclusive NOR operation of each bit 16-bit data or in constant value
specified by S1 and S2 when the trigger tums ON :
The exclusive OR operated result is stored into D.

In this instruction, the conception of exclusive NOR operation shown below.

S1 S2 D
0 0 1
0 1 0
1 0 0
1 1 1

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

= flag ( R900B ) : Turns ON for an instant when the calculated result is


recognized as "0".
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F68 XNR , WR 0 , WR 1 , WY 11 F 68 ( XNR )
5] WR 0
WR 1
WY 5

In the example above, executes exclusive NOR operation of each bin in 16-bit data
「WR0」and 「WR1」 when the X0 turns ON.
The exclusive NOR operated result is stored into 「WY5」.
You can use this instruction to check how many bits in two 16-bit data same.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WR0 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 0

WR1 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 1

X0 : ON

WY5 0 1 0 1 1 1 0 1 1 1 0 1 1 0 1 0
DATA Conversion Instructions
F80( BCD) P80( PBCD ) 16-bit data -> 4-digit BCD ......................262
F81( BIN ) P81( PBIN ) 4-digit BCD -> 16bit data ...........................264
F82( DBCD ) P82( PDBCD ) 32-bit data -> 8-digit BCD ......................266
F83( DBIN ) P83( PDBIN ) 8-digit BCD -> 32bit data ...........................268
F84( INV ) P84( PINV ) 16 bit data Invert .......................................270
F85( NEG ) P86( PNEG ) 16 bit data Two's complement ......................272
F86( DNEG ) P86( PDNEG ) 32 bit data Two's complement ......................274
F87( ABS ) P87( PABS ) 16 bit data Absolute ...................................276
F88( DABS ) P88( PDABS ) 32 bit data Absolute ...................................278
F89( EXT ) P89( PEXT ) 16 bit data Sign extension .........................280
F90( DECO ) P90( PDECO ) Decode ...........................................................282
F91( SEGT ) P91( PSEGT ) 16 bit data 7-segment decode ......................285
F92( ENCO ) P92( PENCO ) Encode ...........................................................287
F93( UNIT ) P93( PUNIT ) 16 bit data Combine .....................................290
F94(DIST ) P94( PDIST ) 16 bit data Distribute ................................292
F95( ASC ) P95( PASC ) Character -> ASCII code ..............................294
F96( SRC ) P96( PSRC ) Table data Search ........................................296

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F80 (BCD)
16-bit binary data -> 4-digit BCD
P80 (PBCD) Steps : 5

Outline Converts the 16-bit binary data 4-digit BCD data.


( P80 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F80 BCD , S , D ]

S Constant value or 16-bit area (source)

D 4-digit area of BCD (destination)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description Converts the 16-bit binary by specified by S to 4-digit BCD data when the trigger
tums ON.
The converted data is stored into D.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the 16-bit binary data exceeds K9999(decimal)
or H270F(Hexadecimal).
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the 16-bit binary data exceeds K9999(decimal)
or H270F(Hexadecimal).
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F80 BCD , WR 5 , WR 6 ] 11 F 80 ( BCD )
WR 5
WR 6

In the example above, converts the contents of WR5 [ K9883 (decimal) ] to the
4-digit BCD data when the X0 tums ON.

The converted data [ H9883 (BCD) ] is stored into WR6.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 5
K9883 decimal
0 0 1 0 0 1 1 0 1 0 0 1 1 0 1 1

X0 : ON

WR 6
9 8 8 3 BCD data
1 0 0 1 1 0 0 0 1 0 0 0 0 0 1 1
F81 (BIN)
4-digit BCD -> 16-bit binary data
P81 (PBIN) Steps : 5

Outline Converts the 4-digit BCD data to 16-bit binary data.


( P81 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F81 BIN , S , D ]

S Constant value or 4-digit area of BCD (source)

D 16-bit area (destination)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
D
: Available

Description Converts the 4-digit BCD data by specified S to 16-bit binary data when the trigger
tums ON.
The converted data is stored into D.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the BCD data exceeds H9999(BCD).
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the BCD data exceeds H9999(BCD).
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X
10 [ F81 BIN , WR 5 , WR 6 ] 11 0
F 81 ( BIN )
WR 5
WR 6

In the example above, converts the contents of WR5 [ H7269 (BCD) ] to the 16-bit
data when the X0 tums ON.
The converted data [ K7269 (decimal) ] is stored into WR6.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 5
7 2 6 9 BCD data
0 1 1 1 0 0 1 0 0 1 1 0 1 0 0 1

X0 : ON

WR 6
K7269 decimal
0 0 0 1 1 1 0 0 0 1 1 0 0 1 0 1
F82 (DBCD)
32-bit binary data -> 8-digit BCD
P82 (PDBCD) Steps : 7

Outline Converts the 32-bit binary data 8-digit BCD data.


( P82 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F82 DBCD , S , D ]

S Constant value or lower 16-bit area or 32-bit binary data (source)

D Lower 4-digit area of 8-digit BCD data (destination)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description Converts the 32-bit binary by specified by S to 8-digit BCD data when the trigger
tums ON.
The converted data is stored into D+1, D.

Note :
When processing 32-bit(8-digit BCD) data, the higher 16-bit(4-digit) areas [( S+1), (D+
1)] is automatically decided if the lower 16-bit(4-digit) areas [ S(D)] is specified.

■ Flag condition
Error flag ( R9007 : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
) exceeds the limit.
∙ when the 32-bit binary data exceeds K99999999
(decimal) or H5F5E0FF(Hexadecimal).
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the 32-bit binary data exceeds K99999999
(decimal) or H5F5E0FF(Hexadecimal).
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F82 DBCD , WR 5 , WR 7 ] 11 F 82 ( DBCD )
WR 5
WR 7

In the example above, converts the contents of WR6 and WR5 [ K72811730 (decimal) ]
to the 8-digit BCD data when the X0 tums ON.
The converted data [ H72811730 (BCD) ] is stored into WR8 and WR7.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 6 WR 5
K72811730
0 0 0 0 0 1 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0

decimal
X0 : ON

WR 8 WR 7
7 2 8 1 1 7 3 0
0 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 0 1 1 0 0 0 0

BCD
data
F83 (DBIN)
8-digit BCD -> 32-bit binary data
P83 (PDBIN) Steps : 7

Outline Converts the 8-digit BCD data to 32-bit binary data.


( P83 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F83 DBIN , S , D ]

S Constant value or lower 4-digit area of 8-digit BCD data (source)

D Lower 16-bit area of 32-bit binary data (destination)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S

D
: Available

Description Converts the 8-digit BCD data by S to 32-bit binary data when the trigger tums ON.

The converted data is stored into D+1, D.

Note :
When processing 8-digit BCD(32-bit) data, the higher 4-digit(16-bit) areas [( S+1), (D+
1) ] is automatically decided if the lower 4-digit(16-bit) areas [ S(D) ] is specified.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙ when the area specified using the index modifier
exceeds the limit.
∙ when the BCD data exceeds K99999999(BCD).
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙ when the area specified using the index modifier
exceeds the limit.
∙ when the BCD data exceeds K99999999(BCD).
The error address is transferred in the DT9018.
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F83 DBIN , WR 5 , WR 7 ] 11 F 83 ( DBIN )
WR 5
WR 7

In the example above, converts the contents of WR6 and WR5 [ H56781234
(BCD) ] to tthe 32-bit binary data when the X0 tums ON.
The converted data [ K56781234 (decimal)] is stored into WR8 and WR7.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR 6 WR 5
5 6 7 8 1 2 3 4
0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0

BCD
X0 : ON
data

WR 8 WR 7
K56781234
0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 1 0

decimal
F84 (INV)
16-bit data Invert
P84 (PINV) Steps : 3

Outline Inverts the 16-bit data.


( P84 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F84 INV , D ]

D 16-bit area to be inverted

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Inverts the contents (0 or 1) of 16-bit data when the trigger tums ON.
The inverted result is stored into the D.
This instruction is useful to control an external device of negative logic.

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F84 INV , DT 0 ] 11 F 84 ( INV )
DT 0

In the example above, inverts the contents of DT0 ( 0011 1110 1010 0101 ) when the
X0 tums ON.
The inverted result ( 1100 0001 0101 1010 ) is stored into DT0.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 0
H3EA5 Hexadecimal
0 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1

X0 : ON

DT 0
HC15A Hexadecimal
1 1 0 0 0 0 0 1 0 1 0 1 1 0 1 0
F85 (NEG) 16-bit data
P85 (PNEG) Two's complement Steps : 3

Outline Gets two's complement of 16-bit data


( P85 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F85 NEG , D ]

D 16-bit area

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Get' two's complement of 16-bit data specified by D when the trigger tums ON.
The two's complement of 16-bit data is stored into the D.
This instruction is useful to invert the sign bits aof 16-bit data.
※ The two's complement is obtained by inverting all the bits and adding 1 to the
inverted result.

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F85 NEG , DT 0 ] 11 F 85 ( NEG )
DT 0

In the example above, gets two's complement of DT0 [ K19897 (decimal) ] when the
X0 tums ON.
The two's complement [K-19897 (decimal)] is stored into DT0.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 0
K19897 decimal
0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1

X0 : ON

DT 0
K-19897 decimal
1 0 1 1 0 0 1 0 0 1 0 0 0 1 1 1
F86 (DNEG) 32-bit data
P86 (PDNEG) Two's complement
Steps : 3

Outline Gets two's complement of 32-bit data


( P86 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F86 DNEG , D ]

D Lower 16-bit areas of 32-bit data

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Get' two's complement of 32-bit data specified by D when the trigger tums ON.
The two's complement of 32-bit data is stored into the D+1, D.

Note :
When processing 32-bit data, the higher 16-bit ( D+1), is automatically decided if the lower
16-bit (D) is specified.

This instruction is useful to invert the sign bits aof 32-bit data.
※ The two's complement is obtained by inverting all the bits and adding 1 to the
inverted result.

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F86 DNEG , DT 0 ] 11 F 86 ( DNEG )
DT 0

In the example above, gets two's complement of DT1 and DT0 [K13039254031
(decimal
)] when the X0 tums ON.
The two's complement of DT1 and DT0 [ K13039254031 (decimal) ] is stored into
DT1 and DT0.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 1 DT 0
K1303925403
0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 1 1

BCD
X0 : ON
data

DT 1 DT 0
K-1303925403
1 0 1 1 0 0 1 0 0 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 1

decimal
F87 (ABS) 16-bit data
P87 (PABS) Absolute
Steps : 3

Outline Gets absolute value 16-bit data.


( P87 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F87 ABS , D ]

D 16-bit area

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Gets absolute value of 16-bit data specified by D when the trigger tums ON.
The absolute value of 16-bit data is stored into the D.

This instruction is useful to operate the data whose sign(+ /-) may vary.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the area specified using the index modifier
exceeds the limit.
∙when the 16-bit data is "K-32768(decimal)" or "H8000
(Hexadecimal)"
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when the 16-bit data is "K-32768(decimal)" or "H8000
(Hexadecimal)"
The error address is transferred in the DT9018.

Carry flag ( R9009 ) : Turns ON for an instant when the 16-bit data is "K-1
(decimal) to K-32767(decimal)" or "HFFFF(Hexadecimal) to
H8001(Hexadecimal)".

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 50 ST X 0
50 [ F87 ABS , DT 0 ] 51 F 87 ( ABS )
DT 0

In the example above, gets absolute value of DT0 [ K-12871 (decimal) ] when the X0
tums ON.
The absolute value [ K12871 (decimal) ]is stored into DT0.

Sign bit (0 : positive, 1 : negative )

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 0
K-12871 decimal
1 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1

X0 : ON

DT 0
K12871 decimal
0 0 1 1 0 0 1 0 0 1 0 0 0 1 1 1
F88 (DABS) 32-bit data
P88 (PDABS) Absolute
Steps : 3

Outline Gets absolute value 32-bit data.


( P88 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F88 DABS , D ]

D Lower 16-bit area of 32-bit data

■ Operands
Word Operands Constant
Preset Index
(Set) WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
value
D
: Available

Description Gets absolute value of 32-bit data specified by D when the trigger tums ON.
The absolute value of 32-bit data is stored into the D+1, D.

This instruction is useful to operate the data whose sign(+ /-) may vary.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the area specified using the index modifier
exceeds the limit.
∙when the 32-bit data is "K-2147483647(decimal)" or
"H80000000 (Hexadecimal)"
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when the 32-bit data is "K-2147483647(decimal)" or
"H80000000 (Hexadecimal)"
The error address is transferred in the DT9018.

Carry flag ( R9009 ) : Turns ON for an instant when the 32-bit data is "K-1
(decimal) to K-2147483647(decimal)" or "HFFFF
(Hexadecimal) to H80000001(Hexadecimal)".

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F88 DABS , DT 0 ] 11 F 88 ( DABS )
DT 0

In the example above, gets absolute value of DT1 and DT0 [K-843458245 (decimal)]
when the X0 tums ON.
The absolute value [ K843458245 (decimal) ] is stored into DT1 and DT0.

Sign bit (0 : positive, 1 : negative )

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 1 DT 0
K-843458245
1 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 1 1

decimal
X0 : ON

DT 1 DT 0
K843458245
0 0 1 1 0 0 1 0 0 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 1

decimal
F89 (EXT) 16-bit data
P89 (PEXT) Sign extension
Steps : 3

Outline Copies the sign bit of the specified 16-bit data to all the bits of the 16-bit
area with one higher area No.
( P89 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F89 EXT , D ]

D 16-bit data to be extended

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
D
: Available

Description Copies the sign bit of the 16-bit data specified by D to all tje bits of D+1 when the
trigger tums ON.

The 16-bit data can be converted to the 32-bit data using this instruction.

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F89 EXT , DT 0 ] 11 F 89 ( EXT )
DT 0

In the example above, copies the sign bit of 16-bit data specified by DT0 to all the
bits of DT1 when the X0 tums ON.
The result as 32-bit data is stored into DT1 and DT0.

Sign bit (0 : positive, 1 : negative )

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 0
K-12871
1 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1

decimal

X0 : ON

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 1 DT 0
K-12871
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1

extended 16-bit data decimal


F90 (DECO)
Decode
P90 (PDECO) Steps : 7

Outline Decodes the specified data.


( P90 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F90 DECO , S , n , D ]

S Constant value or 16-bit area to be decoded

Constant value or 16-bit area to be specify the conditions of this


n instruction

D Setting 16-bit area (for decoded data )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S
n

D
: Available

Description Decodes the constant value or 16-bit data specified by S according to the contents of
the "n" when the trigger tums ON.
The result is stored into the area specified by D.
The "n" specifies ;
Bit No. 0 to 3 : number of bits to be decoded
Bit No. 8 to 11 : start bit No. to be decoded
(The bits No. 4 through No. 12 through No. 15 are invalid. )

Specifications of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n

nL : Number of bits to be decoded(1 to 8)

nH : Start bit No. to be decoded(0 to 15)

This instruction is useful to change the operation of externaldevice by


numerical data.
■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙when the area specified using the index modifier
exceeds the limit.
∙when the "nL" (number of bits to be decoded) becomes
outside the range of 1 to 8.
∙when the "nH" (start bit No.to be decoded) becomes
outside the range of 1 to 16.
∙when the last data area for the result exceeds the
limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when the "nL" (number of bits to be decoded) becomes
outside the range of 1 to 8.
∙when the "nH" (start bit No.to be decoded) becomes
outside the range of 1 to 16.
∙when the last data area for the result exceeds the
limit.
The error address is transferred in the DT9018.
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 50 ST R 0
50 [ F90 DEC0 ,WX0 , DT0 , WR5 ] 51 F 90 ( DECO )
WX 0
DT 0
WR 5

Decodes the contents of WX0 accoding to the contents of DT0.


The decoded result is stored into WR5.
Contents of "DT0" .

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


Decodes the 4 bits from bit No.4 of data
DT - - - - 0 1 0 0 - - - - 0 1 0 0
0

nL : Number of bits to be decoded(nL) :4bits

nH : Start bit No. to be decoded(nH) bit No.4

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 4 bits from bit No.4 to No.7 are
WX0 - - - - - - - - 0 1 1 1 - - - - decoded (0111 = K7)

R0 : ON

When the R0 turns ON, the bit No. 7


WR5 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 (0111) of WR5 turns ON.
Specification of nL

Number of bits to Occupied data area for Valid bits in the area for
be decoded(nL) the result the result
1 1-word 2-bit *

2 1-word 4-bit *
3 1-word 8-bit *
4 1-word 16-bit
5 2-word 32-bit
6 4-word 64-bit
7 8-word 128-bit
8 16-word 256-bit
* Invalid bits in the occupied data area for the result are set to "0".

Example :
In tje case of decoding the 4-bit data (conditions ; nL=4, nH=0), the 16-bit data for
the decoded result is shown below.

Data to be decoded Decoded result


[Binary(decimal)] 15 ∙∙12 11 ∙∙ 8 7 ∙∙ 4
Bit 3 ∙∙ 0
0000(K0) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0001(K1) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
0001(K2) 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
00011K3) 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0100(K4) 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
0101(K5) 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
0110(K6) 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
0111(K7) 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
1000(K8) 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
1001(K9) 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
1010(K10) 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
1011(K11) 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
1100(K12) 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
1101(K13) 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
1110(K14) 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1111(K15) 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
F91 (SEGT) 16-bit data
7-segment decode
P91 (PSEGT) Steps : 5

Outline Converts 16-bit data to 4-digit data for 7-segment indication.


( P91 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F91 SEGT , S , D ]

Constant value or 16-bit area to be converted to the 7-segment


S indication

D 16-bit area (destination)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld IX IY K H modifier
FL
S
D
: Available

Description Converts the constant value or 16-bit data specified by S to 4-digit data for
7-segment indication when the trigger tums ON.
The converted data is stored into D+1, D.

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙when the area specified using the index modifier
exceeds the limit.
∙when the last data area for the result exceeds the
limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when the last data area for the result exceeds the
limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

X0 10 ST X 0
10 [ F91 SEGT , DT 0 , WY 4 ] 11 F 91 ( SEGT )
DT 0
WY 4

In the example above, converts the contents of DT0[ H159F (Hexadecimal) ] to 4-digit
data for 7-segment indication.
The converted data is stored into WY5 and WY4.

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT 0
H159F Hexadecimal
0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 1

X0 : ON

15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WY 5 WY 4
1 5 9 F
0 0 0 0 0 1 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 1

7-segment
7-segment convertion table indication
F92 (ENCO)
Encode
P92 (PENCO) Steps : 7

Outline Encodes the specified data.


( P92 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F92 ENCO , S , n , D ]

S Starting 16-bit area to be encoded

Constant value or 16-bit area to be specify the conditions of this


n
instruction

D 16-bit area (for encoded data )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D
: Available

Encodes the contents of specified number of bits starting from the bit No.0 in the area
Description specified by S according to the contents of the "n" when the trigger tums ON.
The result is stored into the area specified by D starting from the specified bit No.
The "n" specifies ;
Bit No. 0 to 3 : specifies the number of bits to be encoded
(specifies the factorial of "2")
Bit No. 8 to 11 : start bit No. in the area for the result
(The bits No. 4 through No. 7 and No.12 to No.15 are invalid. )

Specifications of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n

nL : Number of bits (2nLbits) to be encoded.


(1 to 8)
※ e.g. : Specify the "nL" as K4
(0100) when 16-bit are
nH : Start bit No. encoded.
(0to15) in the area for the result

Note :
Invalid bits in the specified area for the result are set to "0".
When two or more bits are in ON state in the area to be encoded, the highest bit
has the priority.
■ Flag condition
Error flag ( R9007 : Turns ON and keeps the ON state.
) ∙when the area specified using the index modifier
exceeds the limit.
nL
∙when the "nL" [number of bits( 2 ) to be encoded]
becomes outside the range of 1 to 8.
∙when the sum of the "nL" and "nH" becomes outside
the range of 1 to 16.
∙when the data to be encoded is 0.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
nL
∙when the "nL" [number of bits( 2 ) to be encoded]
becomes outside the range of 1 to 8.
∙when the sum of the "nL" and "nH" becomes outside
the range of 1 to 16.
∙when the data to be encoded is 0.
The error address is transferred in the DT9018.
Note :

Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 50 ST R 0
51 F 92 ( ENCO )
50 [ F92 ENCO ,WX0 , DT0 , WX 0
WR5 ] DT 0
WR 5

Encodes the contents of 26 (64) bits specified by WX0 accoding to the contents of
DT0.
The result is stored into the start bit No.(nH) of WR5.
Contents of "DT0" .

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT - - - - 0 0 0 0 - - - - 0 1 1 0
0
Number of bits to be encoded(nL) :
2nL = 26 = 64(bits)
Start bit No. in WR5(nH) : Bit No.0

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0
WX1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 WX0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
WX3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 WX2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The 59th bit of 64-bit data "WX0" turns ON
when R0 turns ON. The decoded result
R0 : ON "K59(decimal)" is stored into WR5,

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR5 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 K59 (decimal)
Specification of nL

Number of nL Number of bit to be


encoded

1 2-bit

2 4-bit
3 8-bit (1 byte)
4 16-bit (1 word)
5 32-bit (2 words)
6 64-bit (4 words)
7 128-bit (8 words)
8 256-bit(16 words)

Example :
In case of encoding the 16-bit data (conditions ; nL=4, nH=0), the encoded result is
shown below.

Data to ecode Encoded result


15 ∙∙12 11 ∙∙ 8 7 ∙∙ 4 [Binary(decimal)]
Bit 3 ∙∙ 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0000(K0)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0001(K1)
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0001(K2)
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 00011K3)
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0100(K4)
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0101(K5)
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0110(K6)
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0111(K7)
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1000(K8)
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1001(K9)
0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1010(K10)
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1011(K11)
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1100(K12)
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1101(K13)
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1110(K14)
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1111(K15)
F93 (UNIT)
16-bit data
P93 (PUNIT) Combine Steps : 7

Outline Combines lower 4 bits of 16-bit data (up to 4 data) and stores the resuilt
as 16-bit data.
( P93 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F93 UNIT , S , n , D ]

S Starting 16-bit area to be combined

n Number of data to be combined (1 to 4)

D 16-bit area (for combined result )

■ Operands

Preset (Set) Word Operands Constant


Index
value modifier
WX WY WR WL SV EV DT Ld FL IX IY K H

S
n

D
: Available

Description Combines lower 4 bits of 16-bit data (number of 16-bit data defines by "n".) specified
by S.
The combined data is stored into the area specified by D.
The number of combined data can be specified by "n" from 1 to 4.
※ When 0 is specified by "n", this instruction is not execute.

■ Operation of combination

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


S Digit 1
S+ Digit 2 ※ The bits No. 4 to
n(1to4)) No.15 of each data
1
S+ Digit 3 area are invalid
2
S+ Digit 4
3

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


D Digit 4 Digit 3 Digit 2 Digit 1
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the area specified using the index modifier
exceeds the limit.
∙when the "n" [number of combined data) becomes 5 or
more.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when the "n" [number of combined data) becomes 5 or
more.
The error address is transferred in the DT9018.

Program
example Address Command

R0 50 ST R 0
51 F 93 ( UNIT )
50 [ F93 UNIT, WX1 , K 4 , WR5 ]
WX 1
K 4
WR 5

In the example above, combine lower 4 bits WX1 to WX4 when the R0 turns ON.
The combined data is stored into WR5.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WX1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
WX2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 Number of combined data : 4
WX3 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1
WX4 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0

R0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR5 1 0 1 0 0 1 0 1 0 0 0 0 0 1 0 0
F94 (DIST)
16-bit data
P94 (PDIST) Distribute Steps : 7

Outline Divides 16-bit data by 4-bit units and stores each 4-bit into the lower 4-bit
of the specified 16-bit data.
( P94 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F94 DIST , S , n , D ]

S Starting 16-bit area to be Divided

n Number of destination areas (1 to 4)

D Starting 16-bit area (for result )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S
n

D
: Available

Description Divides the 16-bit data specified by S into 4 (4-bit units) and distributes them to the
lower 4-bit (bit No. 0 to No.3) of each area by D when the trigger turns ON.
The number of destination areas can be specified by "n" from 1 to 4.
※ When 0 is specified by "n", this instruction is not execute.

■ Operation of division

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


S Digit 4 Digit 3 Digit 2 Digit 1

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


D Digit 1
※ The bits No. 4
D+ Digit 2 through No.15 of
n(1to4))
each data are 0.
1
D+ Digit 3
2
D+ Digit 4
3
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the area specified using the index modifier
exceeds the limit.
∙when the "n" [number of destination areas) becomes 5
or more.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when the "n" [number of destination areas) becomes 5
or more.
The error address is transferred in the DT9018.
Note :
Refer to 「4-7. SPECIAL RELAYS( R :R9000 TO R901F )」 , for future information
of error flag.

Program
example Address Command

R0 50 ST R 0
51 F 94 ( DIST )
50 [ F94 DIST , WX0 , K 4 , WX 0
WY5 ] K 4
WY 5

In the example above, divides 16-bit data of WX0 by 4-bit units when the R0 turns
ON.
The combined data is stored into WY5.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WX0 1 1 1 0 0 1 0 1 0 0 0 1 0 1 0 0

R0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WY5 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
WT6 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1
Number of division data : 4
WY7 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1
WY8 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 0
F95 (ASC)
Character -> ASCII code
P95 (PASC) Steps :15

Outline Converts characters into the ASCII code.


(P95 : executed only when the leading edge of the trigger is detected. )
※ ASCII : American Standards Code for Information Interchange .

Basic style
of instruction Trigger
[ F95 ASC , S , D ]

S Characters ( Max. 12 characters )

D Starting 16-bit area of 6-word ASCII code area

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY M modifier

D
: Available

Description Converts the characters specified by S into the ASCII code when the trigger turns
ON.
The converted ASCII code data is stored into the 6-word data area starting from D.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the last area for
the ASCII code exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the last area for the
ASCII code exceeds the limit.
The error address is transferred in the DT9018.
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 60 ST R 0
61 F 96 ( ASC )
60 [ F95 ASC ,M ABC1230 DEF9, DT 0]
M ABC1230
DEF9
DT 0

Converts the character constants [ M ABC1230 DEF9 (Character) ] into the ASCII
code
when the R0 turns ON.
The convered ASCII code data is stored into DT5 to DT0.
M ABC1230 DEF9 character constants (M)

R0 : ON

DT 0 H 42 (B) H 41 (A)

DT 1 H 31 (1) H 43 (C)

DT 2 H 33 (3) H 32 (2)

DT 3 H 20 ( ) H 30 (0)

DT 4 H 45 (E) H 44 (D)

DT 5 H 39 (9) H 46 (F)

higher byte lower byte

* ASCII CODE

b8

b7 0 0 0 0 1 1 1 1

b6 0 0 1 1 0 0 1 1

b5 0 1 0 1 0 1 0 1

b8 b7 b6 b5 b4 b3 b2 b1 C 0 1 2 3 4 5 6 7
R
0 0 0 0 0 NUL DEL SPAC 0 @ P ` p
E
0 0 0 1 1 SOH DC1 ! 1 A Q a q

0 0 1 0 2 STX DC2 “ 2 B R b r

0 0 1 1 3 ETX DC3 # 3 C S c s

0 1 0 0 4 EOT DC4 $ 4 D T d t

0 1 0 1 5 ENQ NAK % 5 E U e u

0 1 1 0 6 ACK SYN & 6 F V f v

0 1 1 1 7 BEL ETB ' 7 G W g w

1 0 0 0 8 BS CAN ( 8 H X h x

1 0 0 1 9 HT EM ) 9 I Y i y

1 0 1 0 A LF SUB * : J Z j z

1 0 1 1 B VT ESC + ; K 〔 k {

1 1 0 0 C FF FS ‘ < L ₩ l |

1 1 0 1 D CR GS - = M 〕 m }

1 1 1 0 E SO RS . > N ∧ n ~

1 1 1 1 F SI US / ? O _ o DEL
F96 (SRC) Table data
Search
P96 (PSRC) Steps : 7

Outline Searchs the specified 16-bit data from the specified block.
( P96 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F96 SRC , S1, S2 , S3 ]

S1 16-bit area ( for search data )

S2 Starting 16-bit area ( for search table )

S3 Last 16-bit area ( for search table )

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S1
S2

S3
: Available

Description Searchs the 16-bit data specified by S1 from the block specified by the areas from S2
(starting area) through S3 ( last area ) when the trigger turns ON.
The number of found data is transferred in the special data register "DT9037".
The position of the first found data from the starting 16-bit area ( S2=0 ) is
ransferred in the special data register "DT9038".
※ Be sure to set S2 ≤ S3 .

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the area specified using the index modifier
exceeds the limit.
∙when S2 ≥ S3.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when S2 ≥ S3.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X0 20 ST X
21 0
20 [ F96 SRC ,DT 0 , WR 0 , WR20]
F 98 ( SRC )
DT 0
WR 0
WR 20
In the example above, searches the contents of DT0 from the block from
WR0(starting
area) through WR20 (last area) when the X0 turns ON.
The number of found data is transferred in DT9037.
The position of the first found data from WR0 (WR0=0) is transferred in DT9038.

15 ∙∙∙∙∙∙∙∙ ∙∙∙∙∙∙∙0
WR0 1 0 1 0 0 0 1 1 0 0 1 1 1 1 0 1 0

∙ ∙ ∙
∙ ∙ ∙
∙ ∙ ∙
∙ ∙ ∙
∙ ∙ ∙ Searching
∙ ∙ ∙
∙ ∙ ∙∙
∙ ∙ 19
WR20 0 1 1 0 1 1 1 0 0 1 1 1 0 0 0 0

DT903 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 Number of found data


7
DT9038 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 Relative position
Data shift Instructions
F100( SHR ) P100( PSHR ) 16-bit data Right shift ..............................300
F101( SHL ) P101( PSHL ) 16-bit data Left shift ................................302
F105( BSR ) P105( PBSR ) 16-bit data 1-digit right shift .................304
F106( BSL ) P106( PBSL ) 16-bit data 1-digit left shift ...................306
F110( WSHR ) P110( PWSHR) Block 1-word right shift ...........................308
F111( WSHL ) P111( PWSHL) Block 1-word left shift ...........................310
F112( WBSR ) P112( PWBSR) Block 1-digit right shift .........................312
F113( WBSL ) P113( PWBSL) Block 1-digit left shift .........................314

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F100 (SHR) 16-bit data

P100 (PSHR) Right shift Steps : 5

Outline Shift the specified number of bits to the right in the 16-bit data.
(P100 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F100 SHR , D , n ]

S 16-bit area (n bits shifted to the right)

n Number of bits to be shifted

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Shift "n" bits (number of bits defines by "n".) to the right in the 16-bit data specified
by D when the trigger turns ON.
The data of significant bits "n" as shown below :

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n

Number of shift bits : K0 to K255 (decimal)

When n bits are shifted to the right, n bits starting from the bit No.15 are filled with
0 (The shift-in data = 0)
The data (0 or 1) of bit No. n-1 is shifted out to the carry flag (special relay
R9009)

Operation of right shift


bit No.n-1
bit No.n-1
shift data 15∙∙ ∙ ∙∙∙∙ ∙∙∙∙ ∙ ∙ ∙0
"0"

n bits Shifts n bits to the right Carry flag


■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Carry flag ( R9009 ) : Turns ON for an instant when the bit No. n-1 is recogn-
-ized as "1".

Note :
Refer to 「4-7. SPECIAL RELAYS( R :R9000 TO R901F )」 , for future information
of error flag.

Program
example Address Command

R0 10 ST R 0
11 F 100 ( SHR )
10 [ F100 SHR , DT 5 , H 4 ]
DT 5
H 4

In the example above, shifts 4 bits to the right in the contents of DT5 (101001101100
1011) when the R0 turns ON.
The DT5 becomes (0000101001101100) .
The bit data of bit No.3 is shifted out to the carry flag.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT5 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1
Shift-out
R0 : ON

DT5 0 0 0 0 1 0 1 0 0 1 1 0 1 1 0 0 to carry fag


[Carry flag(R9009)turns ON.
F101 (SHL) 16-bit data

P101 (PSHL) Left shift Steps : 5

Outline Shift the specified number of bits to the left in the 16-bit data.
(P101 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F101 SHL , D , n ]

D 16-bit area (n bits shifted to the left)

n Number of bits to be shifted

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Shift "n" bits (number of bits defines by "n".) to the left in the 16-bit data specified
by D when the trigger turns ON.
The data of significant bits "n" as shown below :

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n : n

Significant data : K0 to K255 (decimal)

When n bits are shifted to the left, n bits starting from the bit No.0 are filled with
0 (The shift-in data = 0)
The data (0 or 1) of bit No. 16-n is shifted out to the carry flag (special relay R9009)

Operation of right shift : D

bit No.15-(n-1)

15∙ ∙∙ ∙∙∙∙ ∙∙∙∙ ∙∙ ∙ 0 shift in data


D : "0"

Carry flag Shifts n bits to the left


■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Carry flag ( R9009 ) : Turns ON for an instant when the bit No.16-n is recogn-
-ized as "1".

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 10 ST R 0
11 F 101 ( SHL )
10 [ F101 SHL , DT 5 , K 4 ]
DT 5
K 4

In the example above, shifts 4 bits to the left in the contents of DT5 (101001101100
1011) when the R0 turns ON.
The DT5 becomes (0110110010110000) .
The bit data of bit No.12 is shifted out to the carry flag.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT5 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 1

Shift-out R0 : ON

to carry fag DT5 0 1 1 0 1 1 0 0 1 0 1 1 0 0 0 0


F105 (BSR) 16-bit data

P105 (PBSR) 1-digit right shift Steps : 3

Outline Shift one digit (4 bits) of the specified 16-bit data to the right.
(P105 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F105 BSR , D ]

D 16-bit area [ one digit (4 bits) shifted to the right

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D
: Available

Description Shift one digit (4 bits) of the area specified by D to the right when the trigger turns
ON.
The shift-out 1 digit (bit No. 0 to 3) is shifted in the special data register DT9014 to
the left.
When 1 digit is shifted to the right, 1 digit data from bit No.12 to No.15 becomes 0.
[ The shift-in data = "0000 (H0)" ]

This instruction is useful when the hexadecimal or BCD data is treated.

Operation of right shift

15 ∙∙ 12 15 ∙∙ 12 15 ∙∙ 12 15 ∙∙ 12
Shift-in Digit 4 Digit 3 Digit 2 Digit 1

DT9014 : 0 0 0

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

R0 10 ST R 0
11 F 105 ( BSR )
10 [ F105 BSR , WY 3 ]
WY 3

In the example above, shifts the one digit of WY3 (Digit 1 to 4) to the right when
R0 turns ON.
The contents of Digit 1 is shifted in the bit 0 to 3 of DT9014.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WY3 Digit 4 Digit 3 Digit 2 Digit 1

R0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WY3 0 Digit 4 Digit 3 Digit 2

DT9014 0 0 0 Digit 1
F106 (BSL) 16-bit data

P106 (PBSL) 1-digit left shift


Steps : 3

Outline Shift one digit (4 bits) of the specified 16-bit data to the left.
(P106 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F106 BSL , D ]

D 16-bit area [ one digit (4 bits) shifted to the left

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D
: Available

Description Shift one digit (4 bits) of the area specified by D to the left when the trigger turns
ON.
The shift-out 1 digit (bit No. 0 to 3) is shifted in the special data register DT9014 to
the left.
When 1 digit is shifted to the left, 1 digit data from bit No.12 to No.15 becomes 0.
[ The shift-in data = "0000 (H0)" ]

This instruction is useful when the hexadecimal or BCD data is treated.

Operation of left shift

15 ∙∙ 12 15 ∙∙ 12 15 ∙∙ 12 15 ∙∙ 12
Digit 4 Digit 3 Digit 2 Digit 1 Shift-in data
"0000 (H0)"

DT9014 : 0 0 0

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

R0 10 ST R 0
11 F 106 ( BSL )
10 [ F106 BSL , WY 3 ]
WY 3

In the example above, shifts the one digit of WY3 (Digit 1 to 4) to the left when
R0 turns ON.
The contents of Digit 4 is shifted in the bit 0 to 3 of DT9014.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WY3 Digit 4 Digit 3 Digit 2 Digit 1

R0 : ON

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0

WY3 Digit 3 Digit 2 Digit 1 0

DT9014 0 0 0 Digit 4
F110 (WSHR) Block

P110 (PWSHR) 1-word right shift Steps : 5

Outline Shifts on word (16-bit) of the specified block to the right.


(P110 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F110 WSHR , D1, D2 ]

D1 Starting 16-bit area [one word (16 bits) shifted to the right]

D2 Last 16-bit area [ one word (16 bits) shifted to the right ]

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D1

D2
: Available

Description Shifts one word (16 bits) of the block specified by D1 and D2 to the right when the
trigger turns ON.
The shift-out word is deleted.
The shift-in word is "0".

The D1 and D2 should be ;


- in the same operand
- D1 ≤ D2

Operation of right shift

Specified block : D2 - D1 + 1 (word)

D2 D2 - 1 D1 + 2 D1 + 1 D1
Before execution

Trigger : ON

shift out

After execution 0

shift in "0"
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the area specified using the index modifier
exceeds the limit.
∙when D1≥D2
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when D1≥D2
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 50 ST R 0
51 F 110( WSHR )
50 [ F110 WSHR , DT 0 , DT 5 ]
DT 0
DT 5

In the example above, shifts the one word (16 bits) of the block from DT0 though
DT5
to the right when the R0 turns ON.
The shift-out word "H0232" is deleted.

Specifird block : 6 words

DT5 DT4 DT3 DT2 DT1 DT0

H001 H021 H001 H021 H003 H023


0 0 2 2 0 2
R0 : ON
shift-out

H000 H001 H021 H001 H021 H003


0 0 0 2 2 0
F111 (WSHL) Block

P111 (PWSHL) 1-word left shift Steps : 5

Outline Shifts on word (16-bit) of the specified block to the left.


(P111 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F111 WSHL , D1, D2 ]

D1 Starting 16-bit area [one word (16 bits) shifted to the left]

D2 Last 16-bit area [ one word (16 bits) shifted to the left ]

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D1

D2
: Available

Description Shifts one word (16 bits) of the block specified by D1 and D2 to the left when the
trigger turns ON.
The shift-out word is deleted.
The shift-in word is "0".

The D1 and D2 should be ;


- in the same operand
- D1 ≤ D2

Operation of left shift

Specified block : D2 - D1 + 1 (words)

D2 D2 - 1 D1 + 2 D1 + 1 D1
Before execution

Trigger : ON

shift out

After execution 0

shift in "0"
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the area specified using the index modifier
exceeds the limit.
∙when D1≥D2
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when D1≥D2
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

X0 20 ST X
21 0
20 [ F111 WSHL , DT 0 , DT 5 ]
F 111( WSHL
)
DT 0
DT 5
In the example above, shifts the one word (16 bits) of the block from DT0 though DT5
to the left when the X0 turns ON.
The shift-out word "H0010" is deleted.

Specifird block : 6 words

DT5 DT4 DT3 DT2 DT1 DT0

H001 H021 H001 H021 H003 H023


0 0 2 2 0 2

Shift-out
X0 : ON
H000 H001 H021 H001 H021 H003
0 0 0 2 2 0
F112 (WBSR) Block

P112 (PWBSR) 1-digit right shift Steps : 5

Outline Shifts on digit (4-bit) of the specified block to the right.


(P112 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F112 WBSR , D1, D2 ]

D1 Starting 16-bit area [one digit (4 bits) shifted to the right]

D2 Last 16-bit area [ one digit (4 bits) shifted to the right]

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D1

D2
: Available

Description Shifts one digit (4 bits) of the block specified by D1 and D2 to the right when the
trigger turns ON.
The shift-out digit is deleted.
The shift-in digit is "0".
The D1 and D2 should be ;
- in the same operand
- D1 ≤ D2

Operation of right shift

Specified block : 4 X (D2-D1+1) (digit)

D2 D1 + 1 D1
Before execution

Trigger : ON Shift out

After execution 0

shift in "0"
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the area specified using the index modifier
exceeds the limit.
∙when D1≥D2
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when D1≥D2
The error address is transferred in the DT9018.
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 50 ST R 0
51 F 112( WBSR )
50 [ F112 WBSR , DT 0 , DT 10 ]
DT 0
DT 10

In the example above, shifts the one digit (4 bits) of the block from DT0 though DT10
to the right when the R0 turns ON.
The shift-out digit "2" is deleted.

Specified block : 44 digit

DT10 DT9 DT1 DT0

0 2 1 2 0 0 3 0 0 2 3 2

R0 : ON shift-out

0 0 2 1 1 0 0 3 0 0 2 3
F113 WBSL) Block

P113 (PWBSL) 1-digit left shift Steps : 5

Outline Shifts on digit (4-bit) of the specified block to the left.


(P113 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F113 WBSL , D1, D2 ]

D1 Starting 16-bit area [one digit (4 bits) shifted to the left]

D2 Last 16-bit area [ one digit (4 bits) shifted to the left]

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D1

D2
: Available

Description Shifts one digit (4 bits) of the block specified by D1 and D2 to the left when the
trigger turns ON.
The shift-out digit is deleted.
The shift-in digit is "0".
The D1 and D2 should be ;
- in the same operand
- D1 ≤ D2

Operation of left shift

Specified block : 4 X (D2-D1+1) (digit)

D2 D1 + 1 D1
Before execution

Trigger : ON
Shift out

After execution 0

shift in "0"
■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the area specified using the index modifier
exceeds the limit.
∙when D1≥D2
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant.


∙when the area specified using the index modifier
exceeds the limit.
∙when D1≥D2
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
example Address Command

R0 50 ST R 0
51 F 113( WBSL )
50 [ F113 WBSL , DT 0 , DT 10 ]
DT 0
DT 10

In the example above, shifts the one digit (4 bits) of the block from DT0 though DT10
to the left when the R0 turns ON.
The shift-out one digit "0" is deleted.

Specified block : 44 digit

DT10 DT9 DT1 DT0

0 2 1 2 0 0 3 0 0 2 3 2

shift-out R0 : ON

2 1 2 1 0 3 0 0 2 3 2 0
FIFO (First-in First-out) Instruction

F115( FIFT ) P115( PFIFT ) FIFO buffer Define .......................................318


F116( FIFR ) P116( PFIFR ) Data read from FIFO buffer ..........................318
F116( FIFW ) P117( PFIFW ) Data write into FIFO buffer ........................318

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F115 (FIFT) FIFO buffer
Define
P115 (PFIFT)
F116 (FIFR)
Data read from FIFO buffer
P116 (PFIFR)

F117 (FIFW)
Data write into FIFO buffer
P117 (PFIFW) Steps : 5

FIFO (First-in First-out) ; The order that data is written into, and read from, the the FIFO buffer.

Outline F115 (FIFT), P115 (PFIFT)


Defines the buffer of FIFO(First-in First-out) condition.
(P115 : executed only when the leading edge of the trigger is detected. )

F116 (FIFR), P116 (PFIFR)


Reads the data from the FIFO (First-in First-out) buffer and stores the
data into the special area.
(P115 : executed only when the leading edge of the trigger is detected. )
F117 (FIFW), P117 (PFIFW)
Writes the data into the FIFO (First-in First-out) buffer
(P117 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F115 FIFT , n , D1 ]
Trigger
[ F117 FIFW , S , D1 ]
Trigger
[ F116 FIFR , D1, D2 ]

n Memory size of FIFO buffer

D1 Starting 16-bit area of FIFO buffer

S 16-bit data to be written into FIFO buffer

D2 16-bit area to be read from FIFO buffer

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D1

D2

: Available
Procedure 1. Defines the area of FIFO buffer [ Instructions: F115 ( FIFT ), P115 ( PFIFT ) ]
and Specifies the starting area for FIFO buffer and the memory size of FIFO buffer.
description D1 : the starting 16-bit area of FIFO buffer
n : memory size of FIFO buffer

FIFO buffer construction


Bit 15∙∙12 11∙∙8 7 ∙∙4 3 ∙∙ 0

D1 n n : memory size of FIFO buffer ( 1 to 256

D1+ K )K : number of stored data ( 1 to n )


( need not to be specified )
1
D1+ PH PL PH : the position in the memory for the data the next
data is read from.
2
D1+ 0 [ "D1 +3" is regarded as '0". 0 to n-1 (Max. 255) ]
3 1 PL : the position in the memory for the data the next
data is written into.
[ "D1 +3" is regarded as '0". 0 to n-1 (Max. 255) ]

The memory size of FIFO buffer ( Max. 258 )

D1+3+(n-1) n-1

Notes :
"K" and "PL" are set to 0 when the instruction is executed.

2. Writes the data Into the FIFO buffer [ Instructions: F117 ( FIFW ), P117 (
PFIFW ) ]

Writes the data specified by S into the FIFO buffer specified by D1.
D1 : the starting 16-bit area of FIFO buffer
S : the constant value or 16-bit area the data to be written into the FIFO
buffer
is stored in.
Notes :
"K"and "PL" are increased by 1, each time one data is written into the FIFO buffer.

Write operation
Bit 15∙∙12 11∙∙8 7 ∙∙4 3 ∙∙ 0

D1 n
D1+1 K
D1+2 PH PL
Writes the data.
D1+3 0 S
1
2
3
FIFO IN data

D1+3+(n-1) n-1
3. Reads the data from the FIFO buffer [ Instructions: F116 ( FIFR ), P116 (PFIFR ) ]

Reads the data in the memory area starting from D1 and stores it into the area specified by
D2.
D1 : the starting 16-bit area of FIFO buffer
D2 : the 16-bit area the be read from FIFO buffer .
Notes :
"K" is deccreased by 1, each time the data is read from the memory of FIFO buffer.
"PH" is deccreased by 1, each time the data is read from the memory.

Read operation
Bit 15∙∙12 11∙∙8 7 ∙∙4 3 ∙∙ 0

D1 n
D1+1 K
D1+2 PH PL
Reads the data.
D1+3 0 D2
1
2
3
FIFO OUT direction

D1+3+(n-1) n-1

■ Flag condition
Error flag ( R9007 : Turns ON and keeps the ON state.
) [ F115 (FIFT) , P115 (PFIFT) ]
when the area specified using the index modifier exceeds the limit.
when "n" > 256.

when "n" = 0
when the last address of FIFO buffer exceed the limit.

[ F117 (FIFW) , P117 (PFIFW) ]


when the area specified using the index modifier exceeds the limit.
when "n" > 256.

when "n" = 0
when "K" > "n"
when "PL" > "n"
when "PL" > 256
when the last address of FIFO buffer exceed the limit.
[ F116 (FIFR) , P116 (PFIFR) ]
when the area specified using the index modifier exceeds the limit.
when "n" > 256.

when "n" = 0
when "K" > "n"
when "K" = 0
when "PH" > "n"
when "PL" > 256
when the last address of FIFO buffer exceed the limit.
The error address is transferred in the DT9017 and held.
Error flag ( R9008 ) : Turns ON for an instant.
[ F115 (FIFT) , P115 (PFIFT) ]
when the area specified using the index modifier exceeds the limit.
when "n" > 256.

when "n" = 0
when the last address of FIFO buffer exceed the limit.

[ F117 (FIFW) , P117 (PFIFW) ]


when the area specified using the index modifier exceeds the limit.
when "n" > 256.

when "n" = 0
when "K" > "n"
when "PL" > "n"
when "PL" > 256
when the last address of FIFO buffer exceed the limit.
[ F116 (FIFR) , P116 (PFIFR) ]
when the area specified using the index modifier exceeds the limit.
when "n" > 256.

when "n" = 0
when "K" > "n"
when "K" = 0
when "PH" > "n"
when "PL" > 256
when the last address of FIFO buffer exceed the limit.
The error address is transferred in the DT9017 and held.

Program
example Address Command
X0
10 [ F115 FIFT , K256 , DT 0 ] 10 ST X 0
11 F 115( FIFT )
X1 K 256
DT 0
16 [ F117 FIFW , WR 0 , DT 0 ] 16 ST X 1
17 F 117( FIFW )
X2 WR 0
DT 0
22 [ F116 FIFR , DT 0 , EV 0 ] 22 ST X 2
23 F 116( FIFR )
DT 0
EV 0

In the example above ;


1. Defines the data area of FIFO buffer DT0 and memory size of FIFO buffer as "K256"
when the X0 turns ON.
2. Writes the 16-bit data WR0 into the FIFO buffer DT0 when X1 turns ON.
3. Reads the data from the data area of FIFO buffer DT0 and stores the data into EV0
when the X2 turns ON.
Data rotate Instructions
F120( ROR ) P120( PROR ) 16-bit data Right rotate ..............................324
F121( ROL ) P121( PROL ) 16-bit data Left rotate ................................326
F122( RCR ) P122( PRCR ) 16-bit data Right rotate with carry flag ...328
F123( RCL ) P123( PRCL ) 16-bit data Left rotate with carry flag ...330

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F120 (ROR) 16-bit data
Right rotate
P120 (PROR) Steps : 5

Outline Rotate the specified number of bits without carry flag to the right in the 16-
bit data.
(P120 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F120 ROR , D , n ]

D 16-bit area (n bits rotated to the right)

n Number of bits to be rotateed

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Rotate "n" bits (number of bits defines by "n".) without carry flag to the right in
the
16-bit data specified by D when the trigger turns ON.

Specification of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n :
n

Invalid
Significant data : K0 to K255 (decimal) or
H00 to HFF(hexadecimal)

Notes :

the same operation is performed every 16-bits (rotation)


n = 16 : same operation as n = 0
n = 17 : same operation as n = 1

n = 32 : same operation as n = 0

n = 255 : same operation as n = 15


Operation of right shift

Shifts n bits to the right and the shift-out bits are shifted in from the left.
The data of bit No. n-1 is copied to the carry flag.

16-bit data specified by D

15 ∙∙ ∙ ∙∙∙∙ ∙∙∙∙ ∙ ∙ ∙0

D :
n bits n bits

Rotates n bits to the right

Carry flag
■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Carry flag ( R9009 ) : Turns ON for an instant when the bit No. n-1 is recogn-
-ized as "1".
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
Address Command
example
R0 10 ST R 0
11 F 120 ( ROR )
10 [ F120 ROR , DT 0 , K 4 ]
DT 0
K 4

In the example above, rotates 4 bits specified by K4 to the right in the 16-bit data
DT0 when the R0 turns ON.
The bit No.3 "0" is copieed to carry flag.

Number of bits without carry flag : K4 (decimal)

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


K 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0

R0 : ON

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0

Carry 0
F121 (ROL) 16-bit data
Left rotate
P121 (PROL) Steps : 5

Outline Rotate the specified number of bits without carry flag to the left in the 16-bit
data.
(P121 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F121 ROL , D , n ]

D 16-bit area (n bits rotated to the left)

n Number of bits to be rotateed

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Rotate "n" bits (number of bits defines by "n".) without carry flag to the left in the
16-bit data specified by D when the trigger turns ON.

Specification of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n :
n

Invalid
Significant data : K0 to K255 (decimal) or
H00 to HFF(hexadecimal)

Notes :

the same operation is performed every 16-bits (rotation)


n = 16 : same operation as n = 0
n = 17 : same operation as n = 1

n = 32 : same operation as n = 0

n = 255 : same operation as n = 15


Operation of right shift
Shifts n bits to the right and the shift-out bits are shifted in from the left.
The data of bit No. n-1 is copied to the carry flag.

16-bit data specified by D


15∙∙∙ ∙∙∙∙ ∙∙∙∙ ∙∙∙ 0
D :

n bits n bits

Rotates n bits to the left

Carry flag

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Carry flag ( R9009 ) : Turns ON for an instant when the bit No. 16-n is recogn
-nized as "1".
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
Address Command
example
R0 10 ST R 0
11 F 121 ( ROL )
10 [ F121 ROL , DT 0 , K 4 ]
DT 0
K 4

In the example above, rotates 4 bits specified by K4 to the left in the 16-bit data
DT0 when the R0 turns ON.
The bit No.12 "1" is copieed to carry flag.
Number of bits "K4 (decimal)" : 4 bits

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


K 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0

R0 : ON

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1

Carry 1
F122 (RCR) 16-bit data
Right rotate with carry flag
P122 (PRCR) Steps : 5

Outline Rotate the specified number of bits with carry flag to the right in the 16-bit
data.
(P122 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F122 RCR , D , n ]

D 16-bit area (n bits rotated to the right)

n Number of bits to be rotateed

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Rotate "n" bits (number of bits defines by "n".) with carry flag to the right in the
16-bit data specified by D when the trigger turns ON.

Specification of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n :
n

Invalid
Significant data : K0 to K255 (decimal) or
H00 to HFF(hexadecimal)

Notes :

the same operation is performed every 16-bits (rotation)


n = 17 : same operation as n = 0
n = 18 : same operation as n = 1

n = 34 : same operation as n = 0

n = 255 : same operation as n = 0


Operation of right shift

Shifts out n bits to the right and the counter of the carry flag and shift-out n-1 bits
are shifted in from the left.
The data of bit No. n-1 is copied to the carry flag.

16-bit data specified by D

15∙∙ ∙ ∙∙∙∙ ∙∙∙∙ ∙ ∙ ∙0


D :

n-1 bits n bits


Carry flag

Rotates n bits to the right

Carry flag

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Carry flag ( R9009 ) : Turns ON for an instant when the bit No. n-1 is recogn-
-ized as "1".
Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
Address Command
example
R0 10 ST R 0
11 F 122 ( RCR )
10 [ F122 RCR , DT 0 , K 4 ]
DT 0
K 4

In the example above, rotates 4 bits with carry flag specified by K4 to the right in
the 16-bit data DT0 when the R0 turns ON.
The bit No.3 "0" is moved to carry flag.

Number of bits "K4(decimal)" : 4 bits

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


K 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0

Carry 1
R0 : ON

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0

Carry 0
F123 (RCL) 16-bit data
Left rotate with carry flag
P123 (PRCL) Steps : 5

Outline Rotate the specified number of bits with carry flag to the left in the 16-bit
data.
(P123 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F123 RCL , D , n ]

D 16-bit area (n bits rotated to the left)

n Number of bits to be rotateed

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Rotate "n" bits (number of bits defines by "n".) with carry flag to the left in the
16-bit data specified by D when the trigger turns ON.

Specification of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n :
n

Invalid
Significant data : K0 to K255 (decimal) or
H00 to HFF(hexadecimal)

Notes :

the same operation is performed every 16-bits (rotation)


n = 17 : same operation as n = 0
n = 18 : same operation as n = 1

n = 34 : same operation as n = 0

n = 255 : same operation as n = 0


Operation of right shift

Shifts n bits to the right and the shift-out bits are shifted in from the left.
The data of bit No. n-1 is copied to the carry flag.

16-bit data specified by D


15∙∙∙ ∙∙∙∙ ∙∙∙∙ ∙∙∙ 0

D :
n bits n-1 bits

Carry flag

Rotates n bits to the left


Carry flag

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Carry flag ( R9009 ) : Turns ON for an instant when the bit No. 16-n is recog-
-nized as "1".

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.

Program
Address Command
example
R0 10 ST R 0
11 F 123 ( RCL )
10 [ F123 RCL , DT 0 , K 4 ]
DT 0
K 4

In the example above, rotates 4 bits with carry flag specified by K4 to the left in the
16-bit data DT0 when the R0 turns ON.
The bit No.12 "1" is moved to carry flag.

Number of bits "K4 (decimal)" : 4 bits

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


K 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0

Carry 0
R0 : ON

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1

Carry 1
Bin Manipulation instructions

F130( BTS ) P130( PBTS ) 16-bit data Bit set ......................................334


F131( BTR ) P131( PBTR ) 16-bit data Bit reset ...................................336
F132( BTI ) P132( PBTI ) 16-bit data Bit invert .................................338
F133( BTT ) P133( PBTT ) 16-bit data Bit test ....................................340
F135( BCU ) P135( PBCU ) 16-bit data Total 1's number .......................342
F136( DBCU ) P135( PDBCU ) 32-bit data Total 1's number .......................344

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F130 (BTS) 16-bit data
Bit set
P130 (PBTS) Steps : 5

Outline Sets the specified bit of 16-bit data.


(P130 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F130 BTS , D , n ]

D 16-bit area (The bit No. n is set to "1")

n Bit No. to be set

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Turns ON the bit No. "n" of 16-bit data specified by D when the trigger turns ON.

Specification of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n

Invalid
Significant data : K0 to K15 (decimal) or
H0 to HF(hexadecimal)

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
Address Command
example
R0 20 ST R 0
21 F 130 ( BTS )
20 [ F130 BTS , DT 0 , DT4 ] DT 0
DT 4

In the example above, turns ON the bit No. 7 of 16-bit data DT0 when the R0
turns ON.

Bit No. specified by DT4 : Bit No.7

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT4 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1

R0 : ON

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1

Bit No.7 to be set (Other bits are not be changed)


F131 (BTR) 16-bit data
Bit reset
P131 (PBTR) Steps : 5

Outline Resets the specified bit of 16-bit data.


(P131 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F131 BTR , D , n ]

D 16-bit area (The bit No. n is set to "0")

n Bit No. to be reset

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Turns OFF the bit No. "n" of 16-bit data specified by D when the trigger turns
ON.

Specification of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n

Invalid
Significant data : K0 to K15 (decimal) or
H0 to HF(hexadecimal)

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
Address Command
example
R0 20 ST R 0
21 F 131 ( BTR )
20 [ F131 BTR , DT 0 , DT4 ] DT 0
DT 4

In the example above, turns OFF the bit No. 7 of 16-bit data DT0 when the R0 turns
ON.

Bit No. specified by DT4 : Bit No.7

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


DT4 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0

R0 : ON

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 1 1

Bit No.7 to be reset (Other bits are not be changed)


F132 (BTI) 16-bit data
Bit Invert
P132 (PBTI) Steps : 5

Outline Inverts the specified bit of 16-bit data.


(P132 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F132 BTI , D , n ]

D 16-bit area (the bit No. n is invertd )

n Bit No. to be inverted

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Inverts the bit No. "n" of 16-bit data specified by D when the trigger turns ON.

Specification of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n

Invalid
Significant data : K0 to K15 (decimal) or
H0 to HF(hexadecimal)

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
Address Command
example
X0 20 ST X 0
21 F 132 ( BTI )
20 [ F132 BTI , DT 0 , WR0 ] DT 0
WR 0

In the example above, inverts the bit No. 7 of 16-bit data DT0 when the X0 turns
ON.

Bit No. specified by WR0 : Bit No.7

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0

X0 : ON

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0

Bit No.7 to be inverted (Other bits are not be changed)


F133 (BTT) 16-bit data
Bit test
P133 (PBTT) Steps : 5

Outline Checks the specified bit of 16-bit data.


(P133 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F133 BTT , D , n ]

D 16-bit area (the bit No. n is checked )

n Constant value or bit No. to be checked

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Checks the bit No. "n" of 16-bit data specified by D when the trigger turns ON.
The contents of checked result is stored into "= flag(R900B)".
※ Checked result :
When the checked bit is "0", = flag (R900B) turns ON(1).
When the checked bit is "1", = flag (R900B) turns OFF(0).

Specification of "n"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


n

Invalid
Significant data : K0 to K15 (decimal) or
H0 to HF(hexadecimal)

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
Address Command
example
X0 20 ST X 0
21 F 133 ( BTT )
20 [ F133 BTT , DT 0 , WR0 ] DT 0
WR 0

In the example above, Checks the bit No. 7 of 16-bit data DT0 when the X0
turns
ON.

Bit No. specified by WR0 : Bit No.7

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


WR0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


DT0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0

X0 : ON
Bit No.7 to be checked

= flag (R900B) ON (1)


F135 (BCU) 16-bit data
Total 1's number
P135 (PBCU) Steps : 5

Outline Counts 1's number of specified 16-bit data.


(P135 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F135 BCU , S , D ]

S Constant value or 16-bit area (1's number is counted)

D 16-bit area (1's number of S is stored into)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D
: Available

Description Counts 1's number of 16-bit data specified by S when the trigger turns ON.
The result (total of 1's numbers) is stored into the area specified by D.

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
Address Command
example
X0 20 ST X 0
21 F 135 ( BCU )
20 [ F135 BCU , WY 5 , WR0 ] WY 5
WR 0

In the example above, counts 1's numbers of WY5 [ H 0135 (hexadecimal) ] when the
X0 turns ON.
The counted result (total of 1's number) [ K5 (decimal) ] is stored into WR0.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0


0 1 3 5 H 0135(hexadecimal)
WY5
0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 1 Binary

X0 : ON

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


WR0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 Total of 1's number
"K5(decimal)
F136 (DBCU) 32-bit data
Total 1's number
P136 (PDBCU) Steps : 7

Outline Counts 1's number of specified 32-bit data.


(P136 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F136 BCU , S , D ]

S Constant value or lower 16-bit area of 32-bit data


(1's number is counted)

D 16-bit area (1's number of S is stored into)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D
: Available

Description Counts 1's number of 32-bit data specified by S+1 and S when the trigger turns
ON.
The result (total of 1's numbers) is stored into the 16-bit area specified by D.
Note :
When processing 32-bit data, the higher 16-bit area (S+1) is automatically
decided if the lower 16-bit area(S) is specified.

■ Flag condition

Error flag ( R9007 ) : Turns ON and keeps the ON state when the area specified
using the index modifier exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instant when the area specified using
the index modifier exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
Address Command
example
X0 20 ST X 0
21 F 136 ( DBCU )
20 [ F136 DBCU , WX 3 , DT0 ] WX 3
DT 0

In the example above, counts 1's numbers of WX3 [ H 32010136 (hexadecimal) ]


when the X0 turns ON.
The counted result (total of 1's number) [ K9 (decimal) ] is stored into DT0.

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙0
3 2 0 1 0 1 3 6
WX4 WX3
0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0

X0 : ON

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


WR0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 Total of 1's number
"K9(decimal)"
Special instructions

F140( STC ) P140( PSTC ) Carry flag (R9009) Set ................................348


F141( CLC ) P141( PCLC ) Carry flag (R9009) Reset .............................349
F142( WDT ) P142( PWDT ) Watch dog timer Update ..............................350
F143( IORF ) P143( PIORF ) Patial I/O Update ........................................351
F145( SEND ) P145( PSEND ) Link data Send ...............................................351
F146( RECV ) P146( PRECV ) Link data Receive. .........................................354
F147( PR ) Print out .......................................................356
F148( ERR ) P148( PERR ) Self-diagnostic error Set ...........................358
F149( MSG ) P149( PMSG ) Message display .............................................359
F150( READ ) P150( PREAD ) Data read from advanced units ......................360
F151( WRT ) P151( PWRT ) Data write into advanced units ....................361
F152( RMRD ) P152( PRMRD ) Data read from the slave station .................362
F153( RMWT) P153( PRMWT ) Data write into the slave station ...............364
F154( MCAL ) P154( PMCAL ) Machine language call ...................................367
F155( SMPL ) P155( PSMPL ) Sampling Start ...............................................368
F156( STRG ) P156( PSTRG ) Sampling Stop ...............................................368

Notes :
You can monitor 16-bit data by operational instruction 8 ( OP8 ) with the HANDY LOADER.
You can monitor 32-bit data by operational instruction 12 ( OP12 ) with the HANDY LOADER.
F140 (STC) Carry flag (R9009)
Set
P140 (PSTC) Steps : 1

Outline Sets carry flags ( R9009 )


(P140 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F140 STC ]

Description The carry flag (R9009) turns ON when the trigger turns ON.

Program
Address Command
example
X0
20 ST X 0
20 [ F140 STC ] 21 F 140 ( STC )
F141 (CLC) Carry flag (R9009)
Reset
P141 (PCLC) Steps : 1

Outline Resets carry flags ( R9009 )


(P141 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F141 CLC ]

Description The carry flag (R9009) turns OFF when the trigger turns ON.

Program
Address Command
example
X0
20 ST X 0
20 [ F141 CLC ] 21 F 141 ( CLC )
F142 (WDT) Watchdog Timer
Update
P142 (PWDT) Steps : 3

Outline Updates the watchdog timer.


(P142 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F142 WDT , S ]

S Preset(Set) value of watch dog timer

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S
: Available

Description The scan check watchdog timer is preset with the constant specified by S when
the trigger tums ON.
The value specified by S is 1 to 255 and the preset time becomes;
2.5ms x S
The scan check watchdog timer is automatically set at the start of a scan with
the value of the system register( No.30 ).
To monitor the transit of a processing block, set the watchdog timer with this
instruction immediately before transition and set again immediately after that.

Notes :
Although this instruction can be used any number of times, the system
watchdog timer activates to stop operation and turns OFF the output when the
total scan time exceeds 640ms.
It is necessary to turn OFF power of the CPU when the scan check watchdog
timer is timed out.
Refer to 「 Watchdog timer」.

Program
Address Command
example
R0 20 ST R 0
21 F 142 ( WDT )
20 [ F142 WDT , K 128 ]
K 128
F143 (IORF) Partial I/O
Update
P143 (PIORF) Steps : 5

Outline Partially updates the I/O points.


(P143 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F143 IORF , D1 , D2 ]

D1 Starting word No.

D2 Last word No. (K0 ≤ D1 ≤ D2 ≤ K127)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D1

D2
: Available

Description External I/0 range specified by DI and D2 is updated when the trigger turns ON.
X : updates the input data. and outputs. )
Y : updates the output data

Specify the word No. to satisfy : K0 ≤ D1 ≤ D2 ≤ K127.


( When the only WX10 is to be updated, specify D1 = K10 and D2 = KI0. )

The partial 1/0 update instruction ( 10RF, PIORF ) is executed only for the I/0
units on the basic base plate or expansion base plate.
It is not executed for the I/0 unit in the slave station of the Remote I/0 System

Notes :
Even if the H constant (hexadecimal) can be used to specify the base word of external I/Os.
However, as the word No. of N-700 , N-7000 PLC is based on decimal system, it is
recommended that K constant ( decimal ) be used.

Program
Address Command
example
R0 20 ST R 0
21 F 143 ( IORF )
20 [ F143 IORF , K 0 , K1 ]
K 0
K 1
F145 (SEND) Link data
Send
P145 (PSEND) Steps : 9

Outline Sends the data to the linked PLC .


(P145 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F145 SEND, S1, S2 , D , N ]

S1 16-bit area to specify the conditions of this instruction.

S2 Starting word No. of the station itself (data source station)

D Selection of the operand of another station ( data destination station)


( Specified with the number "0" )

N Starting 16-bit area of the another station in the operand specified


by "D". (data destination station)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S1

S2

: Available
Description

■ Conditions of the instructions (S1+1, S1)

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0 Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


S1+1 0 0 0 0 S1 0 0 0

LK UN n2 n1
F
S1
1. Word unit send selection
F=0 : Word unit selection
n2=0 : Set "0" when the word unit is selected.
n1=1 to 16 : Specify the numberof words to be sent.
2. Bit unit send selection
F=1 : Bit unit selection
n2=0 to 15 : Destination bit No.
n1=0 to 15 : Source bit No.

S1+1
1. LINK No, Selection ( LK : 1 to 3, the station itself )
1) Up to 3 Link Units can be connected to one CPU. This ( LK ) selects the source
Link Unit in the three
Notes :

The LINK No. is specified by the position of each Link Unit on the Basic Base Plate.
The Link Units are designated as LINK1, 2 and 3. starting from the unit nearest to
the CPU.

2) Link station No. Selection ( UN : 1 to 63, another station )


- Up to 63 stations can be connected to one Link Unit.
This ( UN ) selects the destination station No..

Notes :

Two or more F145 ( P145 ), F146 ( P146 ) instructions cannot be executed in one scan. If
the triggers of two or more F145 ( P145 ), F146 ( P146 )
instructions turn ON in one scan, the instruction with the smallest address No. is executed.

The send operation is executed after the end instruction ( ED ).

■ Flag condition
R9030 0 : When the data cannot be sent. ( including when the data is
being sent. )
1 : When the data can be sent.

R9031 0 : When the send operation is completed without error.


1 : When send error occurs. The error code is stored to DT9039.

Notes :
Error code( time-out error )
H71 (hexadecimal) : Response signal of send operation cannot be received.
H72 (hexadecimal) : Buffer of the Link Unit is full.
H73 (hexadecimal) : Response command cannot be received.
When the above mentioned errors occur, check the set value of the time-out in the system
register No. 32. The value can be set in the range of 10ms to 81.9s.( default=2ms )

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙when the data specified by the S1+1 and S1 is out of
the range.
∙when the Link Unit cannot be found.
∙when the S2 + ( nl-l ) or N + ( nl-l ) exceeds the
limit of S2 or D.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instants.


∙when the data specified by the S1+1 and S1 is out of
the range.
∙when the Link Unit cannot be found.
∙when the S2 + ( nl-l ) or N + ( nl-l ) exceeds the
limit of S2 or D.
The error address is transferred in the DT9018 and held.

Program
Address Command
example
R0
20 ST R 0
20 [ F145 SEND , DT0, LD30 ,WR0, K0 ] 21 F 145 ( SEND )
DT 0
LD 30
WR 0
K 0
F146 (RECV) Link data
Receive
P146 (PRECV) Steps : 9

Outline Receives the data from the linked PLC .


(P146 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F146 RECV, S1, S2 , N , D ]

S1 16-bit area to specify the conditions of this instruction.

Selection of the operand of another station ( data source station)


S2
( Specified with the number "0" )

Starting 16-bit area of the another station in the operand specified


N
by "S2".

D Starting 16-bit area of the station itself (data destination station)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S1

S2

: Available
Description

■ Conditions of the instructions (S1+1, S1)

Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0 Bit 15∙∙12 11∙∙ 8 7 ∙∙ 4 3 ∙∙ 0


S1+1 0 0 0 0 S1 0 0 0

LK UN n2 n1
F
S1
1. Word unit receive selection
F=0 : Word unit selection
n2=0 : Set "0" when the word unit is selected.
n1=1 to 16 : Specify the numberof words to be sent.
2. Bit unit receive selection
F=1 : Bit unit selection
n2=0 to 15 : Destination bit No.
n1=0 to 15 : Source bit No.

S1+1
1. LINK No, Selection ( LK : 1 to 3, another station )
1) Up to 3 Link Units can be connected to one CPU. This ( LK ) selects the source
Link Unit in the three
Notes :

The LINK No. is specified by the position of each Link Unit on the Basic Base
Plate. The Link Units are designated as LINK1, 2 and 3. starting from the unit
nearest to the CPU.

2) Link station No. Selection ( UN : 1 to 63, the station itself)


- Up to 63 stations can be connected to one Link Unit.
This ( UN ) selects the destination station No..

Notes :

Two or more F146 ( P146 ), F145 ( P145 ) instructions cannot be executed in


one scan. If the triggers of two or more instructions turn ON in one scan,
the instruction with the smallest address No. is executed.

The receive operation is executed after the end instruction ( ED ).

■ Flag condition
R9030 0 : When the data cannot be sent. ( including when the data is
being received. )
1 : When the data can be received.

R9031 0 : When the send operation is completed without error.


1 : When receive error occurs. The error code is stored to DT9039.

Notes :
Error code( time-out error )
H71 (hexadecimal) : Response signal of send operation cannot be received.
H72 (hexadecimal) : Buffer of the Link Unit is full.
H73 (hexadecimal) : Response command cannot be received.
When the above mentioned errors occur, check the set value of the time-out in the
system register No. 32.
The value can be set in the range of 10ms to 81.9s.( default=2ms )

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙when the data specified by the S1+1 and S1 exceeds
the range.
∙when the Link Unit cannot be found.
∙when the N + ( nl-l ) or D + ( nl-l ) exceeds the
limit of S2 or D.

Error flag ( R9008 ) : Turns ON for an instants.


∙when the data specified by the S1+1 and S1 exceeds
the range.
∙when the Link Unit cannot be found.
∙when the N + ( nl-l ) or D + ( nl-l ) exceeds the
limit of S2 or D.

Program
Address Command
example
X0
20 ST X 0
20 [ F146 RECV , DT0, WR0 , K0, LD20 ] 21 F 146 ( RECV )
DT 0
WR 0
K 0
LD 20
F147 (PR ) Print out Steps : 5

Outline Outputs 12 characters stored in 6-word data area to the outputs.


(P147 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
(DF) [ F147 PR , S , D ]
R9033

S Start number of area storing the print out data

D Area to which data is output

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

D
: Available

Description ASCII codes for 12 characters stored in 6 word area specified by S are sent to the
area specified by D.
As shown below, four scans are required for 1 character output.
Therefore, 37 scan are required until all character are output.
Connection example for output unit

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state.
∙when the S+5 exceeds the limit.
∙when the trigger of another print out instruction(PR)
turns ON while one print out instruction (PR) is
being executed.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instants.


∙when the S+5 exceeds the limit.
∙when the trigger of another print out instruction(PR)
turns ON while one print out instruction (PR) is
being executed.
The error address is transferred in the DT9018.

Notes :

Since several print out instructions (PR) cannot be executed in one scan, use
executing flag R9033 to be sure sure they are not executed simultaneously.

Program
Address Command
example X0
20 (DF) [ F147 PR , DT 0, WY1 20 ST X 0
21 DF
R903 ] OR R 9033
3 147 ( PR )
DT 0
WY 1
F148 (ERR) Self-diagnostic error
P148 (PERR) Set
Steps : 3

Outline Sets the specified error code to the special register DT9000.
(P148 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F148 ERR , n ]

n Error number

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description The error No. specified by n is placed into special data register DT9000.
At the same time, the self-diagnostic error flag ( R9000 ) is set and ERROR LED on
the CPU is turned ON.
The contents can be read and checked using the programming tool ( FPST software,
Handy loader )

When n = O, the error Is reset.


( only for operation continue errors, n = 200 to 299. )
The ERROR LED is turned OFF and the contents of special data register DT9000
are cleared with O.
When n = 100 to 199, the operation Is halted.
When n = 200 to 299, the operation Is continued.

■ Flag condition
Error flag ( R9007 ) : Turns ON and keeps the ON state when the "n" exceeds
the limit.

Error flag ( R9008 ) : Turns ON for an instant when the "n" exceeds the limit.

Program
Address Command
example
X0
20 ST X 0
20 [ F148 ERR , K 100 ] 21 F 148 ( ERR )
K 100
F149 (MSG)
Message display
P149 (PMSG) Steps :13

Outline Displays the specified charcters on the programming tools (FPST software ,
Handy loader)
(P149 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F149 MSG , S ]

S Charcter constant

■ Operands
Word Operands
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY M K H modifier

S
: Available

Description The charcter constant specified by S is display on the Handy loader.


The message flag (R9026) is set and its contents are placed into special data area
DT9030 to DT9035.
This instruction cannot be executed if a message is already set.

Program
Address Command
example
X0
20 ST X 0
20 [ F149 MSG , M TEST PROGRAM 21 F 149 ( MSG )
M TEST
PROGRAM
F150 (READ)
Data read from advanced units
P150 (PREAD) Steps : 9

Outline Reads the data from the specified advanced unit.


(P150 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F150 READ, S1, S2 , n , D ]

S1 Slot No. of advanced unit.

S2 Memory address No. of advanced unit

n Number of words to be read

D Starting 16-bit area (the read data is stored)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S1

S2

D
: Available

Description 1. Specifies the advanced unit by S1.


2. Reads the n-word data from the memory address No. specified by S2 of the
specified advanced unit.
3. The read result is stored into the data area specified by D.

Refer to each technical manual of advanced unit, for detail information.

Program
Address Command
example
X0
20 ST X 0
20 [ F150 READ , K 3, K 0 , K 5 , WR0] 21 F 150 ( READ )
K 3
K 0
K 5
WR 0

In the example above, reads the 5-word data from the address 0 of advanced
unit "
slot No. 3" on base plate when the XI0 tums ON.
The result is stored into the data area of WR0.
F151 (WRT)
Data write into advanced units
P151 (PWRT) Steps : 9

Outline Writes the data into the specified advanced unit.


(P151 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F151 WRT, S1, S2 , n , D ]

S1 Slot No. of advanced unit.

S2 Starting 16-bit area (the source data is stored)

n Number of words to be written

D Starting memory address No. of advanced unit

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S1

S2

D
: Available

Description 1. Specifies the advanced unit by S1.


2. Writes the n -word data into the memory address No. specified by S2 of the
specified advanced unit.
3. The written result is stored into the data area specified by D.

Refer to each technical manual of advanced unit, for detail information.

Program
Address Command
example
X0 20 ST X 0
21 F 151 ( WRT )
20 [ F151 WRT , K 0, DT 5, K 2 , K 0
K 0
DT 5
K 2
WR 0

In the example above, writes the 2-word data starting from DT5 into the address 0 of
advanced unit " slot No. 0" on base plate when the X0 tums ON.
The result is stored into the address 0 of advanced unit.
F152 (RMRD)
Data read from the slave units
P152 (PRMRD) Steps : 9

Outline Reads the data from the specified advanced unit of the slave unit.
(P152 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F152 RMRD, S1, S2 , n , D ]

S1 16-bit area to specify the conditions of this instruction

S2 Starting address of f advanced unit memory

n Number of words to be read (Max. 32 words)

D Starting 16-bit area (the read data is stored into)

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S1

S2

D
: Available

Description 1. Specifies the advanced unit of slave station by data "S1 + 1 and S1"
2. Reads the n-word data from the address No. of the specified slave station
specified by S2.
3. The read result is stored into the data area specified by D.

Specification of "S1+1, S1"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0
S1+1 0 0 0 0 0 0 0 0 S1

Specifies 0. Specifies the master station


No. (range : 1 to 4)
Specifies the slot No. of
the advanced unit on the
base plate of slave station.

N-700 / N-7000 PLC :


0 to 31 (H0 to H1F) Specifies the station No. of the
slave station.
[ range : H1 to H20(hexadecimal)]
Notes :
All the base plate are
counted as 8-slot type.
Notes :

Two or more F152 ( P152 ), F153 ( P153 ) instructions cannot be executed in one scan. If
the triggers of two or more these instructions turn ON in one
scan, the instruction with the smallest address No. is executed.

The read operation is executed after the end instruction ( ED ).

■ Flag operation
Executable flag (R9035) 0 : When the data cannot be read or being read
1 : When the data can be read.

End flag (R9036) 0 : When the read operation is completed normally.


1 : When read error occurs.
The error code is stored to DT9036.

Notes :
Error codes are as follows :
H5B (hexadecimal) : Time-out error.
H68 (hexadecimal) : Access area missing error
H71 (hexadecimal) : Response signal of send operation cannot be received.
H72 (hexadecimal) : Buffer of the Mster Unit is full.
H73 (hexadecimal) : Response command cannot be received.
When the 71,72,73 errors occur, change the set value of the time-out in 10ms to 81.9
s. the syatrm register No.32 within. ( default=2ms )

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙when the data specified by the S1+1 and S1 is out of
the range.
∙when there is no master station.
∙when the address modifier error occurs.
∙when read area exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instants.


∙when the data specified by the S1+1 and S1 is out of
the range.
∙when there is no master station.
∙when the address modifier error occurs.
∙when read area exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
F153 (RMWT)
Data write into the slave units
P153 (PRMWT) Steps : 9

Outline Writes the data into the specified advanced unit of the slave unit.
(P153 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F153 RMWT, S1, S2 , n , D ]

S1 16-bit area to specify the conditions of this instruction

S2 Starting 16-bit area (the source data is stored)

n Number of words to be read (Max. 32 words)

D Starting memory address No. of advanced unit.

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

S1

S2

D
: Available

Description 1. Specifies the advanced unit of slave station by data "S1 and S1+1"
2. Writes the n-word data starting from the area specified by S2 into the area
starting from the area specified by D.

Specification of "S1+1, S1"

Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0 Bit 15∙∙12 11∙∙ 8 7∙∙ 4 3∙∙ 0
S1+1 0 0 0 0 0 0 0 0 S1

Specifies 0. Specifies the master station


No. (range : 1 to 4)
Specifies the slot No. of
the advanced unit on the
base plate of slave station.

N-700 / N-7000 PLC :


0 to 31 (H0 to H1F) Specifies the station No. of the
slave station.
Notes : [ range : H1 to H20(hexadecimal)]

All the base plate are


counted as 8-slot type.
Notes :

Two or more F152 ( P152 ), F153 ( P153 ) instructions cannot be executed in one scan. If
the triggers of two or more these instructions turn ON in one
scan, the instruction with the smallest address No. is executed.

The read operation is executed after the end instruction ( ED ).

■ Flag operation
Executable flag (R9035) 0 : When the data cannot be written or read.
1 : When the data can be written.

End flag (R9036) 0 : When the write operation is completed normally.


1 : When write error occurs.
The error code is stored to DT9036.

Notes :
Error codes are as follows :
H5B (hexadecimal) : Time-out error.
H68 (hexadecimal) : Access area missing error
H71 (hexadecimal) : Response signal of send operation cannot be received.
H72 (hexadecimal) : Buffer of the Mster Unit is full.
H73 (hexadecimal) : Response command cannot be received.
When the 71,72,73 errors occur, change the set value of the time-out in 10ms to 81.9
s. the syatrm register No.32 within. ( default=2ms )

Error flag ( R9007 ) : Turns ON and keeps the ON state.


∙when the data specified by the S1+1 and S1 is out of
the range.
∙when there is no master station.
∙when the address modifier error occurs.
∙when read area exceeds the limit.
The error address is transferred in the DT9017 and held.

Error flag ( R9008 ) : Turns ON for an instants.


∙when the data specified by the S1+1 and S1 is out of
the range.
∙when there is no master station.
∙when the address modifier error occurs.
∙when read area exceeds the limit.
The error address is transferred in the DT9018.

Note :
Refer to " 2-6. (8) Special Relays ( R: R9000 to R910F ) ", for further
information of error flag.
Program
example Address Command

In the example above, writes /reads the 15-word data memory of advanced unit
(slot No.1) on slave station.
F154 (MCAL)
Machine language call
P154 (PMCAL) Steps : 3

Outline Calls program area of the machine language.


(P154 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigger
[ F154 MCAL , n ]

n Starting data area of machine language program to be called

■ Operands
Word Operands Constant
Preset (Set) Index
value WX WY WR WL SV EV DT Ld FL IX IY K H modifier

n
: Available

Description Calls the address of machine language program area specified by n.


Machine language programs are stored in machine language program area,
Range : 0 to 14k words ( N-7000 / N-700 PLC )
Machine language program area can be set after setting of sequence program
area.
Machine language program area can be set in the system register No. 1.
Set the area in 2k-word unit.
※ Refer to, 「2-4. Organization of Memory Area」, for detail information of
memory area.

Program
example Address Command

R0 10 ST R 0
10 [ F154 MCAL , H0 ] 11 F 154 ( MCAL )
H 0

In the example above, calls the address 0 of machine language program area
when the
R0 tums ON.
F155 (SMPL)
Sampling Start
P155 (PSMPL)
F156 (STRG)
Sampling Stop
P156 (PSTRG) Steps : 1

Outline F155 : Transfers the sampling data specified by FPST software into the
sampling memory.
(P155 : executed only when the leading edge of the trigger is detected. )

F156 : Stops transferring the sampling data to the sampling memory.


(P156 : executed only when the leading edge of the trigger is detected. )

Basic style
of instruction Trigge
r [ F155 SMPL ]
Trigge
r [ F156 STRG ]

Description The sampling trace function samples the relays and data according to the previously
set with using the FPST software and transfers the specified points to the sampling
memory.

Procedure
1. Specify the sampled points using the FPST software.
∙The points can be sampled are ;
1) Relay contacts: 16 points [ available for External input (X), External output (Y), Inter
-nal relay (R), Timer (T), Counter (C) and Link relay (L)]
2) Data :3 words [ available for Special data register (DT), Link register (LD),
File register (FL), Preset (Set) value (SV), Count (Elapsed)
value (EV) and Word Input / Output (WX, WY, WR, WL)]

2. Set the sampling condition with the FPST software


∙Specify the sampling memory size and the sampling stop delay.
Sampling memory : Maximum 4000 words ( 1000 samples )
( 16 contacts + 3 words/sample )
∙Select the sampling style.
1) Instruction basis : Transfers the data to the sampling memory the instant the
sampling instruction
[ F155 ( SMPL ) / P155 ( PSMPL ) ]is executed.
2) Time sampling : Transfers the data to the sampling memory at fixed time
intervals.
The interval can be set within 10 ms to 30 s.
3) Set the sampling condition to " ENABLE ".

3. The specified data is transferred to the sampling memory when the trigger of F155
( P155 ) tums ON.
4. The sampling is stopped after the specified delay when the trigger of F156 ( P156 )
turns ON.

Notes :
This operation can also be performed with the FPST software
Program
Address Command
example X0
10 ST X 0
10 [ F155 SMPL ]
11 F 155 ( SMPL
)
X1
30 [ F156 STRG ]
30
ST X 1
F 156 ( STRG
)

You might also like