0% found this document useful (0 votes)
34 views934 pages

FP-XH PGRG e

The document is a programming manual for the Panasonic FP-XH Control Unit, detailing basic and high-level instructions for its operation. It includes a comprehensive list of instruction words, sequence instructions, control instructions, and various function instructions necessary for programming the control unit. Additionally, it provides references to other related manuals available for download on the Panasonic website.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views934 pages

FP-XH PGRG e

The document is a programming manual for the Panasonic FP-XH Control Unit, detailing basic and high-level instructions for its operation. It includes a comprehensive list of instruction words, sequence instructions, control instructions, and various function instructions necessary for programming the control unit. Additionally, it provides references to other related manuals available for download on the Panasonic website.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 934

Programmable Controller

FP-XH Control Unit


Programming Manual

Domestic version

WUME-FPXHPGRG-021

2024.6 industry.panasonic.com/
(MEMO)

2 WUME-FPXHPGRG-021
Introduction
Thank you for purchasing a Panasonic product. Before you use the product, please carefully
read through the user’s manual, and understand it in detail to use the product properly.

Types of Manuals
● This manual describes the basic instructions and high-level instructions used by the FP-XH
Series Control Unit.
● The following user’s manuals are available for the FP-XH series. Please refer to a relevant
manual for the unit and purpose of your use.
● The manuals can be downloaded on our website:https://industry.panasonic.com/global/en/
downloads/?tab=manual.
Unit name or purpose of
Manual name Manual code
use
FP-XH Control Unit FP-XH User‘s Manual (Basic) WUME-FPXHBASG
FP-X Expansion Unit
FP-XH Series Programming Manual WUME-FPXHPGRG
FP-X Extension Cassette
Positioning Function / FP-XH User’s Manual
PWM Output / High-speed WUME-FPXHPOSG
Counter Function (Positioning / PWM Output / High-speed Counter)

Communication Functions
FP-X Extension FP-XH User‘s Manual (COM Communication) WUME-FPXHCOMG
(Communication) Cassette

WUME-FPXHPGRG-021 iii
(MEMO)

iv WUME-FPXHPGRG-021
Table of Contents

1 List of Instruction Words......................................................................1-1


1.1 List of Basic Instruction Words............................................................1-2
1.2 List of High-level Instructions ..............................................................1-8

2 Sequence Basic Instructions ...............................................................2-1


2.1 ST, ST/ and OT (Start, Start Not and Out) ..........................................2-2
2.2 DST, DST/ (Direct start, direct start Not).............................................2-4
2.3 DOT (direct out) ..................................................................................2-7
2.4 / (Not) ..................................................................................................2-10
2.5 AN, AN/ (AND, AND Not)....................................................................2-11
2.6 DAN, DAN/ (Direct AND, Direct AND NOT)........................................2-13
2.7 OR, OR/ (OR, OR Not) .......................................................................2-16
2.8 DOR, DOR/ (Direct OR, Direct OR Not) .............................................2-18
2.9 ST↑, ST↓, AN↑, AN↓, OR↑, OR↓ (Rise Detection, Fall Detection) ......2-21
2.10 ALT (Alternate Out) ...........................................................................2-23
2.11 ANS (And Stack) ...............................................................................2-25
2.12 ORS (OR Stack) ...............................................................................2-27
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack)................2-29
2.14 DF, DF/ (Rise Differential,Fall Differential) ........................................2-33
2.15 DFI [Rise Differential (initial execution type)] ....................................2-38
2.16 SET, RST (Set, Reset) ......................................................................2-40
2.17 DSET/DRST (Direct Set/Direct Reset)..............................................2-43
2.18 KP (Keep) .........................................................................................2-47
2.19 DKP (Direct Keep) ............................................................................2-49
2.20 NOP ..................................................................................................2-52

3 Basic Function Instructions.................................................................3-1


3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer) .....3-2
3.2 F137 STMR (16-bit, 0.01 s On-delay Timer).......................................3-9
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer).......................................3-12
3.4 CT [Counter (Preset Subtraction Expression)]....................................3-16
3.5 F118 UDC (Up/Down Counter) ...........................................................3-23
3.6 SR (Shift Register) ..............................................................................3-26
3.7 F119 LRSR (Left/Right Shift Register) ................................................3-29
3.8 F182 FILTR (Time Literal Process) .....................................................3-32

4 Control Instructions..............................................................................4-1
4.1 MC/MCE (Master Control Relay / Master Control Relay End) ............4-2

WUME-FPXHPGRG-021 v
4.2 JP/LBL (Jump/Label) ..........................................................................4-7
4.3 LOOP, LBL (Loop, Label)....................................................................4-11
4.4 ED (End) .............................................................................................4-15
4.5 CNDE (Conditional End) .....................................................................4-16
4.6 EJECT.................................................................................................4-18

5 Step ladder Instructions .......................................................................5-1


5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear
Step, Step End).....................................................................................5-2
5.2 SCLR (Clear Multiple Processes) .......................................................5-17

6 Subroutine Instructions .......................................................................6-1


6.1 CALL/SUB/RET (Subroutine Call, Subroutine Entry, Subroutine
Return) ..................................................................................................6-2

7 Interrupt Instructions............................................................................7-1
7.1 INT/IRET (Interrupt / Interrupt Return) ................................................7-2
7.2 ICTL (Interrupt Control).......................................................................7-8
7.2.1 How to start the interrupt program when executing the high-speed
counter match ON / match OFF instruction ...................................... 7-15

8 Special Setting Instructions.................................................................8-1


8.1 SYS1 (Communication Condition Setting) ..........................................8-2
8.2 SYS1 (Password setting) ....................................................................8-8
8.3 SYS1 (Interrupt setting) ......................................................................8-10
8.4 SYS1 [PC (PLC) Link Time Setting]....................................................8-12
8.5 SYS1 (MEWTOCOL-COM response control) .....................................8-14
8.6 SYS1 (Change high-speed counter operation mode) .........................8-16
8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change] .......8-18

9 Compare Contact Instructions ............................................................9-1


9.1 ST=, ST <>, ST>, ST>=, ST<, ST<= [16-bit Data Comparison
(Start)] ...................................................................................................9-2
9.2 AN=, AN<>, AN>, AN>=, AN<, AN<= [16-bit Data Comparison
(AND)] ...................................................................................................9-4
9.3 OR= OR <> OR > OR >= OR < OR <= [16-bit Data Comparison
(OR)] .....................................................................................................9-6
9.4 STD=, STD<>, STD>, STD>=, STD<, STD<= [32-bit Data
Comparison(start)] ................................................................................9-8
9.5 AND=, AND<>, AND>, AND>=, AND<, AND<= [32-bit Data
Comparison (AND)]...............................................................................9-10
9.6 ORD=, ORD<>, ORD>, ORD>=, ORD<, ORD<= [32-bit Data
Comparison (OR)] .................................................................................9-12
9.7 STF=, STF<>, STF>, STF>=, STF< and STF<= [Floating point real
number data comparison (start)] ...........................................................9-14

vi WUME-FPXHPGRG-021
9.8 ANF=, ANF<>, ANF>, ANF>=, ANF<, ANF<= [Floating point real
number data comparison (AND)] ..........................................................9-16
9.9 ORF=, ORF<>, ORF>, ORF>=, ORF<, ORF<= [floating point real
number data comparison (OR)] ............................................................9-18

10 Transfer Instructions ..........................................................................10-1


10.1 F0 MV (16-bit Data Transfer) ............................................................10-2
10.2 F0 MV (10 µsec Ring Counter Read) ...............................................10-4
10.3 F1 DMV (32-bit Data Transfer) .........................................................10-5
10.4 F2 MV/ (16-bit Data Inversion and Transfer) ....................................10-7
10.5 F3 DMV/ (32-bit Data Inversion and Transfer)..................................10-9
10.6 F5 BTM (Bit Data Transfer)...............................................................10-11
10.7 F6 DGT (Digit Data Transfer)............................................................10-16
10.8 F7 MV2 (Two 16-bit Data Transfer to Single Area)...........................10-20
10.9 F8 DMV2 (32-bit 2 Data Transfer) ....................................................10-22
10.10 F10 BKMV (Data Block Transfer) ...................................................10-24
10.11 F11 COPY (16-bit Data Block Copy)...............................................10-27
10.12 F12 ICRD (F-ROM Read) ...............................................................10-29
10.13 P13 ICWT (F-ROM Write)...............................................................10-31
10.14 F15 XCH (16-bit Data Exchange) ...................................................10-33
10.15 F16 DXCH (32-bit Data Exchange).................................................10-35
10.16 F17 SWAP (Higher/Lower Byte Exchange) ....................................10-37
10.17 F18 BXCH (Block Exchange)..........................................................10-39
10.18 F190 MV3 (Three 16-bit Data Transfer to Single Area) ..................10-41
10.19 F191 DMV3 (32-Bit 3-Data Batch Transfer)....................................10-43

11 Binary Arithmetic Instructions...........................................................11-1


11.1 F20 + (16-bit Data Addition [D+S=D]) ...............................................11-2
11.2 F21 D+ (32-bit Data Addition [D+S=D]) ............................................11-4
11.3 F22 + (16-bit Data Addition [S1+S2=D]) ...........................................11-6
11.4 F23 D+ (32-bit Data Addition [S1+S2=D]).........................................11-8
11.5 F25 - (16-bit Data Subtraction [D-S=D])............................................11-10
11.6 F26 D-(32-bit Data Subtraction [D-S=D]) ..........................................11-13
11.7 F27 - (16-bit Data Subtraction [S1-S2=D]) ........................................11-15
11.8 F28 D- (32-bit Data Subtraction [S1-S2=D]) .....................................11-18
11.9 F30 * (16-bit Data Multiplication [S1*S2=D+1, D]) ............................11-20
11.10 F31 D* (32-bit Data Multiplication [S1*S2=D+3, D+2, D+1, D] .......11-22
11.11 F32 % (16-bit Data Subtraction [S1/S2=D]) ....................................11-24
11.12 F33 D% (32-bit Data Subtraction [S1/S2=D+1, D]).........................11-26
11.13 F34 *W (16-bit Data Multiplication [S1*S2=D]) ...............................11-28
11.14 F35 +1 (16-bit Data Increment) .......................................................11-30

WUME-FPXHPGRG-021 vii
11.15 F36 D+1 (32-bit Data Increment) ....................................................11-32
11.16 F37 -1 (16-bit Data Decrement) ......................................................11-34
11.17 F38 D-1 (32-bit Data Decrement)....................................................11-36
11.18 F39 D*D (32-bit Data Multiplication [S1*S2=D+1, D]) .....................11-38

12 BCD Data Arithmetic Instructions .....................................................12-1


12.1 F40 B+ (4-digit BCD Data Addition [D+S=D]) ...................................12-2
12.2 F41 DB+ (8-digit BCD Data Addition [D+S=D]) ................................12-4
12.3 F42 B+ (4-digit BCD Data Addition [S1+S2=D]) ...............................12-6
12.4 F43 DB+ (8-digit BCD Data Addition [S1+S2=D]).............................12-8
12.5 F45 B- (4-digit BCD Data Subtraction [D-S=D])................................12-10
12.6 F46 DB- (8-digit BCD Data Subtraction [D-S=D]) .............................12-12
12.7 F47 B- (4-digit BCD Data Subtraction [S1-S2=D])............................12-14
12.8 F48 DB- (8-digit BCD Data Subtraction [S1-S2=D]) .........................12-16
12.9 F50 B* (4-digit BCD Data Multiplication [S1*S2=D+1, D]) ................12-18
12.10 F51 DB* (8-Digit BCD Data Multiplication [S1*S2=D+3, D+2, D
+1, D]) ...................................................................................................12-20
12.11 F52 B% (4-digit BCD Data Subtraction [S1/S2=D]) ........................12-22
12.12 F53 DB% (8-digit BCD Data Subtraction [S1/S2=D+1, D]).............12-24
12.13 F55 B+1 (4-digit BCD Data Increment)...........................................12-26
12.14 F56 DB+1 (8-digit BCD Data Increment) ........................................12-28
12.15 F57 B-1 (4-digit BCD Data Decrement) ..........................................12-30
12.16 F58 DB-1 (8-digit BCD Data Decrement)........................................12-32

13 Data Comparison Instructions...........................................................13-1


13.1 F60 CMP (16-bit Data Comparison) .................................................13-2
13.2 F61 DCMP (32-bit Data Comparison)...............................................13-8
13.3 F62 WIN (16-bit Data Band Comparison) .........................................13-12
13.4 F63 DWIN (32-bit Data Band Comparison) ......................................13-14
13.5 F64 BCMP (Block Data Comparison) ...............................................13-16
13.6 F373 DTR (16-bit Data Change Detection).......................................13-19
13.7 F374 DDTR (32-bit Data Change Detection) ....................................13-21

14 Boolean Instructions ..........................................................................14-1


14.1 F65 WAN (16-bit Data AND).............................................................14-2
14.2 F66 WOR (16-bit Data OR)...............................................................14-4
14.3 F67 XOR (16-bit Data Exclusive OR) ...............................................14-6
14.4 F68 XNR (16-bit Data Exclusive NOR) .............................................14-8
14.5 F69 WUNI [(S1 AND S3) OR (S2 AND S3) = D] (16-bit) ..................14-10
14.6 F215 DAND (32-bit Data AND) .........................................................14-12
14.7 F216 DOR (32-bit Data OR) .............................................................14-14

viii WUME-FPXHPGRG-021
14.8 F217 DXOR (32-bit Data Exclusive OR)...........................................14-16
14.9 F218 DXNR (32-bit Data Exclusive NOR) ........................................14-18
14.10 F219 DUNI [(S1 AND S3) OR (S2 AND S3) = D] (32-bit)...............14-20

15 Data Conversion Instructions ............................................................15-1


15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)]...................15-3
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion) .............15-7
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion) .............15-10
15.4 F73 BCDA (BCD Data to ASCII Code Conversion) ..........................15-14
15.5 F74 ABCD (ASCII Code to BCD Data Conversion) ..........................15-18
15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion) ...............15-22
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion) ...............15-25
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion) ...............15-29
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion) ...............15-32
15.10 F80 BCD (16-bit Binary Data to BCD Data Conversion).................15-36
15.11 F81 BIN (BCD Data to 16-bit Binary Data Conversion) ..................15-38
15.12 F82 DBCD (32-bit Binary Data to BCD Data Conversion) ..............15-40
15.13 F83 DBIN (BCD Data to 32-bit Binary Data Conversion)................15-41
15.14 F84 INV (16-bit Data Invert)............................................................15-42
15.15 F85 NEG (16-bit Data Sign Inversion) ............................................15-43
15.16 F86 DNEG (32-bit Data Sign Inversion)..........................................15-44
15.17 F87 ABS (Absolute Value of 16-bit Data)........................................15-46
15.18 F88 DABS (Absolute Value of 32-bit Data) .....................................15-47
15.19 F89 EXT (Sign Extension) ..............................................................15-48
15.20 F90 DECO (Decode).......................................................................15-50
15.21 F91 SEGT (7-segment)...................................................................15-53
15.22 F92 ENCO (Encode).......................................................................15-55
15.23 F93 UNIT (Digit Combine) ..............................................................15-58
15.24 F94 DIST (Digit Distribute)..............................................................15-60
15.25 F96 SRC (16-bit Data Search)........................................................15-62
15.26 F97 DSRC (32-bit Data Search) .....................................................15-64
15.27 F230 TMSEC (Time data to second conversion)............................15-66
15.28 F231 SECTM (Second to Time Data Conversion)..........................15-69
15.29 F235 GRY (16-bit Data to Gray Code Conversion) ........................15-72
15.30 F236 DGRY (32-bit Data to Gray Code Conversion)......................15-73
15.31 F237 GBIN (Gray Code to 16-bit Data Conversion) .......................15-74
15.32 F238 DGBIN (Gray Code to 32-bit Data Conversion).....................15-75
15.33 F240 COLM (Bit Line to Bit Column Conversion) ...........................15-77
15.34 F241 LINE (Bit Column to Bit Line Conversion) .............................15-79

WUME-FPXHPGRG-021 ix
16 Data Shift Instruction..........................................................................16-1
16.1 F100 SHR (16-bit Data Right Shift)...................................................16-2
16.2 F101 SHL (16-bit Data Left Shift)......................................................16-4
16.3 F102 DSHR (32-bit Data Right Shift) ................................................16-6
16.4 F103 DSHL (32-bit Data Left Shift) ...................................................16-8
16.5 F105 BSR (16-bit Data 1-Digit Right Shift) .......................................16-10
16.6 F106 BSL (16-bit Data 1-Digit Left Shift) ..........................................16-12
16.7 F108 BITR (Block Area Bitwise Right Shift)......................................16-14
16.8 F109 BITL (Block Area Bitwise Left Shift).........................................16-16
16.9 F110 WSHR (Block Area 1 Word Right Shift) ...................................16-18
16.10 F111 WSHL (Block Area 1 Word Left Shift) ....................................16-20
16.11 F112 WBSR (Block Area 1 Digit Right Shift)...................................16-22
16.12 F113 WBSL (Block Area 1 Digit Left Shift)......................................16-24

17 Data Rotation Instructions .................................................................17-1


17.1 F120 ROR (16-Bit Data Rotation to the Right)..................................17-2
17.2 F121 ROL (16-Bit Data Rotation to the Left) ....................................17-4
17.3 F122 RCR (16-bit Data Right Rotation with Carry) ...........................17-6
17.4 F123 RCL (16-bit Data Left Rotation with Carry) ..............................17-8
17.5 F125 DROR [32-Bit Data Right Rotation] .........................................17-10
17.6 F126 DROL (32-bit data left rotation)................................................17-12
17.7 F127 DRCR (32-bit Data Right Rotation with Carry) ........................17-14
17.8 F128 DRCL (32-bit Data Left Rotation with Carry) ...........................17-16

18 Data Buffer Instruction .......................................................................18-1


18.1 F98 CMPR (Compress Shift Read)...................................................18-2
18.2 F99 CMPW (Compress Shift Write) ..................................................18-6
18.3 How to Use the FIFO (First-in First-out) Buffer .................................18-10
18.4 F115 FIFT (FIFO Buffer Definition) ...................................................18-11
18.5 F116 FIFR (FIFO Data Read) ...........................................................18-14
18.6 F117 FIFW (FIFO Data Write)...........................................................18-18

19 Bit Manipulation Instructions ............................................................19-1


19.1 F130 BTS (Specified Bit Set) ............................................................19-2
19.2 F131 BTR (Specified Bit Reset)........................................................19-4
19.3 F132 BTI (Specified Bit Inversion) ....................................................19-6
19.4 F133 BTT (Specified Bit Test) ...........................................................19-8
19.5 F135 BCU (Count ON Bits in 16-bit Data) ........................................19-10
19.6 F136 DBCU (Count ON Bits in 32-bit Data)......................................19-12

20 Special Instructions ............................................................................20-1

x WUME-FPXHPGRG-021
20.1 F138 HMSS (Hour, Minute, Second Data to Second Data
Conversion)...........................................................................................20-2
20.2 F139 SHMS (Second Data to Hour, Minute, Second Data
Conversion)...........................................................................................20-4
20.3 F140 STC (Cy Flag Set) ...................................................................20-6
20.4 F141 CLC (Cy Flag Clear) ................................................................20-7
20.5 F143 IORF (Partial I/O refresh).........................................................20-8
20.6 F147 PR (Printout) ............................................................................20-10
20.7 F148 ERR (Self-diagnostic Error Set)...............................................20-15
20.8 F149 MSG (Character Send to Programming Tool)..........................20-17
20.9 F150 READ (Shared Memory Read) ................................................20-18
20.10 F151 WRT (Write to Shared Memory) ............................................20-21
20.11 F157 CADD (Calendar Data Addition) ............................................20-24
20.12 F158 CSUB (Calendar Data Subtraction) .......................................20-27
20.13 F160 DSQR (32-bit Data Square Root) ..........................................20-32

21 Serial Communication Instructions ..................................................21-1


21.1 [F145 SEND] [F146 RECV] Instructions: Common Items.................21-2
21.2 [F145 SEND] Data Transmission (MEWTOCOL-COM Master)........21-4
21.3 [F146 RECV] Data Reception (MEWTOCOL-COM Master).............21-7
21.4 [F145 SEND] Data Transmission (MODBUS Master: Function
Code Specification) ...............................................................................21-10
21.5 [F146 RECV] Data Reception (MODBUS Master: Function Code
Specification) ........................................................................................21-12
21.6 [F145 SEND] Data Transmission (MODBUS Master).......................21-14
21.7 [F146 RECV] Data Reception (MODBUS Master)............................21-17
21.8 [F159 MTRN] Serial Data Send / Receive Instruction.......................21-20

22 Sampling Trace Instructions ..............................................................22-1


22.1 Sampling Trace.................................................................................22-2
22.2 F155 SMPL (Sample Set Data) ........................................................22-3
22.3 F156 STRG (Sampling Stop Trigger)................................................22-4

23 High-speed Counter Instruction ........................................................23-1


23.1 [F0 MV] High-speed Counter Control Instruction ..............................23-2
23.2 [F1 DMV] Elapsed Value Write / Read Instruction ............................23-4
23.3 [F166 HC1S] High-speed Counter Target Value Match ON
Instruction and [F167 HC1R] High-speed Counter Target Value Match
OFF Instruction .....................................................................................23-5
23.4 Sample Program (Positioning Operation With Inverter: Single-
Speed) ..................................................................................................23-7
23.5 Sample Program (Positioning Operation With Inverter: Double-
Speed) ..................................................................................................23-9

WUME-FPXHPGRG-021 xi
24 High-speed Counter Cam Control Instruction .................................24-1
24.1 [F165 CAM0] High-speed Counter Cam Control Instruction.............24-2
24.2 Sample Program (Upper Limit Control, Reset, Addition) ..................24-7
24.3 Sample Program (Upper Limit Control, Instruction Clear, Addition) .24-9
24.4 Sample Program (Upper Limit Control, Subtraction) ........................24-11

25 PWM Output Instructions ...................................................................25-1


25.1 [F173 PWMH] PWM Output Instruction (Frequency Specification) ..25-2
25.2 [F173 PWMH] PWM Output Instruction (Control Code
Specification) ........................................................................................25-4

26 Character String Instructions ............................................................26-1


26.1 F95 ASC (Character Constant to ASCII Code Conversion) .............26-2
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String
Conversion)...........................................................................................26-5
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data
Conversion)...........................................................................................26-11
26.4 F252 ACHK (Multiple ASCII Data Strings ASCII Code Check).........26-18
26.5 F253 SSET (Character Constant → ASCII Code Conversion: with
Storage Area Size)................................................................................26-20
26.6 Overview of String Instructions F257 SCMP to F265 SREP.............26-24
26.7 F257 SCMP (Comparing Character Strings) ....................................26-25
26.8 F258 SADD (Character String Addition) ...........................................26-27
26.9 F259 LEN (Character String Length) ................................................26-29
26.10 F260 SSRC (Search for Character String)......................................26-31
26.11 F261 RIGHT (Right Retrieve from Character String) ......................26-33
26.12 F262 LEFT (Left Retrieve from Character String)...........................26-35
26.13 F263 MIDR (Read from Any Position in Character String) .............26-37
26.14 F264 MIDW (Write to Any Position in Character String) .................26-39
26.15 F265 SREP (Replace Character Strings) .......................................26-41

27 Data Manipulation Instructions .........................................................27-1


27.1 F270 MAX (Search Maximum Value from 16-bit Data Block) ...........27-2
27.2 F271 DMAX (Search Maximum Value from 32-bit Data Block) ........27-4
27.3 F272 MIN (Search Minimum Value from 16-bit Data Block) .............27-6
27.4 F273 DMIN (Search Minimum Value from 32-bit Data Block)...........27-8
27.5 F275 MEAN (16-bit Data Sum and Average)....................................27-10
27.6 F276 DMEAN (32-bit Data Sum and Average) .................................27-12
27.7 F277 SORT (16-bit Data Block Sort) ................................................27-14
27.8 F278 DSORT (32-bit Data Block Sort)..............................................27-16
27.9 F282 SCAL (16-bit Data Linearization) .............................................27-18
27.10 F283 DSCAL (32-bit Data Linearization) ........................................27-21

xii WUME-FPXHPGRG-021
27.11 F284 RAMP (16-bit Data Ramp Output) .........................................27-24
27.12 F285 LIMT (16-bit Data Upper and Lower Limit Control)................27-26
27.13 F286 DLIMT (32-bit Data Upper and Lower Limit Control) .............27-28
27.14 F287 BAND (16-bit Data Deadband Control) .................................27-30
27.15 F288 DBAND (32-bit Data Deadband Control) ...............................27-32
27.16 F289 ZONE (16-bit Data Zone Control) ..........................................27-34
27.17 F290 DZONE (32-bit Data Zone Control) .......................................27-36

28 Floating-point Instruction ..................................................................28-1


28.1 F309 FMV (Floating Point Data Move) .............................................28-3
28.2 F310 F+ (Floating Point Data Addition) ............................................28-5
28.3 F311 F- (Floating Point Data Subtraction) ........................................28-7
28.4 F312 F* (Floating Point Data Multiplication) .....................................28-9
28.5 F313 F% (Floating Point Data Division)............................................28-11
28.6 F314 SIN (Floating Point Data Sine Operation)................................28-13
28.7 F315 COS (Floating Point Data Cosine Operation) ..........................28-15
28.8 F316 TAN (Floating Point Data Tangent Operation) .........................28-17
28.9 F317 ASIN (Floating Point Data Arcsine Operation) ........................28-19
28.10 F318 ACOS (Floating Point Data Arccosine Operation) .................28-21
28.11 F319 ATAN (Floating Point Data Arctangent Operation).................28-23
28.12 F320 LN (Floating Point Data Natural Logarithmic Operation) .......28-25
28.13 F321 EXP (Floating Point Data Exponent Operation) ....................28-27
28.14 F322 LOG (Floating Point Data Logarithm Operation) ...................28-29
28.15 F323 PWR (Floating Point Data Power Operation) ........................28-31
28.16 F324 FSQR (Floating Point Data Square Root Operation).............28-33
28.17 F325 FLT (16-bit Integer to Floating Point Data Conversion) .........28-35
28.18 F326 DFLT (32-bit Integer to Floating Point Data Conversion).......28-36
28.19 F327 INT [Floating Point Data to 16-bit Integer Conversion
(Largest Integer Not Exceeding the Floating-point Data)].....................28-38
28.20 F328 DINT [Floating Point Data to 32-bit Integer Conversion
(Largest Integer Not Exceeding the Floating-point Data)].....................28-40
28.21 F329 FIX [Floating Point Data to 16-bit Integer Conversion
(Round-down)] ......................................................................................28-42
28.22 F330 DFIX [Floating Point Data to 32-bit Integer Conversion
(Round-down)] ......................................................................................28-44
28.23 F331 ROFF [Floating Point Data to 16-bit Integer Conversion
(Round-off)] ...........................................................................................28-46
28.24 F332 DROFF [Floating Point Data to 16-bit Integer Conversion
(Round-off)] ...........................................................................................28-48
28.25 F333 FINT (Floating Point Data Round-down) ...............................28-50
28.26 F334 FRINT (Floating Point Data Round-off) .................................28-52
28.27 F335 F+/- (Floating Point Data Sign Conversion)...........................28-54

WUME-FPXHPGRG-021 xiii
28.28 F336 FABS (Floating Point Data Absolute Value Conversion) .......28-56
28.29 F337 RAD (Degree to Radian Conversion) ....................................28-58
28.30 F338 DEG (Radian to Degree Conversion) ....................................28-60

29 Real Number Data Processing Instructions .....................................29-1


29.1 F345 FCMP (Floating Point Data Comparison) ................................29-2
29.2 F346 FWIN (Floating Point Data Band Comparison)........................29-4
29.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control)..........29-6
29.4 F348 FBAND (Floating Point Data Deadband Control) ....................29-8
29.5 F349 FZONE (Floating Point Data Zone Control).............................29-10
29.6 F354 FSCAL (Scaling of real number data)......................................29-12

30 Process Control Instructions.............................................................30-1


30.1 F355 PID (PID Operation).................................................................30-2
30.2 F356 EZPID (PID Operation: PWM Output Possible).......................30-9

31 Positioning Control Instructions (Table Setting Mode) ...................31-1


31.1 [F380 POSST] Positioning Table Start Instruction ............................31-2
31.2 [F381 JOGST] JOG Operation Start Instruction ...............................31-4
31.3 [F382 ORGST] Home Return Start Instruction .................................31-6
31.4 [F383 MPOST] Positioning Table Simultaneous Start Instruction.....31-8
31.5 [F384 PTBLR] Positioning Parameter Read Instruction ...................31-10
31.6 [F385 PTBLW] Positioning Parameter Write Instruction ...................31-12

32 Positioning Control Instructions (FP-X Compatible Mode) ............32-1


32.1 [F1 DMV] Elapsed Value Write / Read Instruction ............................32-2
32.2 [F171 (SPDH)] Pulse Output (Trapezoidal Control)..........................32-3
32.3 [F171 (SPDH)] Pulse Output (Home Return)....................................32-8
32.4 [F172 (PLSH)] Pulse Output (JOG operation) ..................................32-13
32.5 [F174 (SP0H)] Pulse Output (Selectable Data Table Control
Operation) .............................................................................................32-16
32.6 [F175 (SPSH)] Pulse Output (Linear Interpolation) ..........................32-21

33 Precautions for Programming ...........................................................33-1


33.1 Changing the Set Value of Timer/Counter During RUN ....................33-2
33.1.1 How to Rewrite Constants in the Program ..................................... 33-2
33.1.2 Methods Used to Rewrite a Value in the Set Value Area ............... 33-2
33.2 Use of Duplicate Output....................................................................33-5
33.2.1 Duplicate Output ............................................................................ 33-5
33.2.2 Processing When Output Is Duplicated with OT, KP, SET, and
RST Instructions ............................................................................... 33-5
33.3 Rise Detection Method......................................................................33-7
33.3.1 Rise Detection Instructions ............................................................ 33-7
33.3.2 Operation and Precautions at Run Start Time ............................... 33-8

xiv WUME-FPXHPGRG-021
33.3.3 Precautions When Using Control Instructions ............................... 33-10
33.4 Operation Errors ...............................................................................33-13
33.4.1 Outline of Operation Errors ............................................................ 33-13
33.4.2 Operation Mode when an Operation Error Occurs ........................ 33-13
33.4.3 Handling the Occurrence of Operation Errors................................ 33-14
33.4.4 Points to Review in Program.......................................................... 33-14
33.5 How to Use the Index Register .........................................................33-16
33.5.1 Index Registers .............................................................................. 33-16
33.5.2 Index Modification Applicable Areas .............................................. 33-16
33.5.3 Example of Using an Index Register.............................................. 33-17
33.6 Handling BCD Data...........................................................................33-19
33.7 Precautions for Programming ...........................................................33-21
33.8 Rewrite Function During RUN...........................................................33-23
33.8.1 Operation of Rewrite During RUN.................................................. 33-23
33.8.2 When Rewriting During RUN is not Possible ................................. 33-23
33.8.3 Method and Operation of Rewriting during RUN ........................... 33-25
33.9 Processing During Forced Input/Output ...........................................33-26

Appendix Reference Material.................................................................App-1


Operation Memory Area.............................................................................App-2
List of System Registers ............................................................................App-4
List of System Registers ............................................................................ App-4
List of Special Relays.................................................................................App-16
List of Special Data Registers....................................................................App-30
Communication Commands.......................................................................App-47
List of MEWTOCOL Supported Commands .............................................. App-47
List of MODBUS Supported Commands.................................................... App-48
Positioning Memory ...................................................................................App-49
Configuration of Memory Map.................................................................... App-49
Common Area (Memory Area No. 0) ......................................................... App-50
Axis Information Area (Memory Area No. 1) .............................................. App-51
Axis Setting Area (Memory Area No. 2) ..................................................... App-52
Positioning Table Area (Memory Area No. 3)............................................. App-54
List of Error Codes .....................................................................................App-56
List of Syntax Check Errors ....................................................................... App-56
Self-diagnostic Errors................................................................................. App-57
List of MEWTOCOL-COM Communication Error Codes ........................... App-58
List of MODBUS Communication Error Codes .......................................... App-59
BIN/HEX/BCD Code Correspondence Table .............................................App-60
ASCII Code Table, JIS8 Code Table ..........................................................App-61

WUME-FPXHPGRG-021 xv
(MEMO)

xvi WUME-FPXHPGRG-021
1 List of Instruction Words
1.1 List of Basic Instruction Words............................................................1-2
1.2 List of High-level Instructions ..............................................................1-8

WUME-FPXHPGRG-021 1-1
1.1 List of Basic Instruction Words

1.1 List of Basic Instruction Words

■ Sequence basic instructions


Referen
Mnemonic Name Steps ce
page:
Begins a logic operation with a Form A (normally open)
ST 1 (2) "P.2-2"
contact(Note 1)
Begins a logic operation with a Form A (normally open) contact:
DST 2 "P.2-4"
Direct input(Note 1)
Begins a logic operation with a Form B (normally closed)
ST/ 1 (2) "P.2-2"
contact(Note 1)
Begins a logic operation with a Form B (normally closed)
DST/ 2 "P.2-4"
contact: Direct input (Note 1)

OT Outputs the operation result(Note 1) 1 (2) "P.2-2"

DOT Outputs the operation result: Direct input(Note 1) 2 "P.2-7"

/ Inverts the operation result 1 "P.2-10"

AN Connects a Form A (normally open) contact serially(Note 2) 1 (2) "P.2-11"

Connects a Form A (normally open) contact serially: Direct


DAN 2 "P.2-13"
input(Note 1)

AN/ Connects a Form B (normally closed) contact serially(Note 2) 1 (2) "P.2-11"

Connects a Form B (normally closed) contact serially: Direct


DAN/ 2 "P.2-13"
input(Note 1)

OR Connects a Form A (normally open) contact in parallel(Note 2) 1 (2) "P.2-16"

Connects a Form A (normally open) contact in parallel: Direct


DOR 2 "P.2-18"
input(Note 1)

OR/ Connects a Form B (normally closed) contact in parallel(Note 2) 1 (2) "P.2-16"

Connects a Form B (normally closed) contact in parallel: Direct


DOR/ 2 "P.2-18"
input(Note 1)
ST↑ Begins a rise contact logic operation 2 "P.2-21"
ST↓ Begins fall contact logic operation 2 "P.2-21"
AN↑ Connects a contact serially when a rise is detected 2 "P.2-21"
AN↓ Connects a contact serially when a fall is detected 2 "P.2-21"
OR↑ Connects a contact in parallel when a rise is detected 2 "P.2-21"
OR↓ Connects a contact in parallel when a fall is detected 2 "P.2-21"
ALT Alternate out 3 "P.2-23"
ANS Connects multiple instruction blocks serially 1 "P.2-25"
ORS Connects multiple instruction blocks in parallel 1 "P.2-27"
PSHS Stores the operation result 1 "P.2-29"
RDS Reads the operation result stored by PSHS 1 "P.2-29"

1-2 WUME-FPXHPGRG-021
1.1 List of Basic Instruction Words

Referen
Mnemonic Name Steps ce
page:
POPS Reads and clears the operation result stored by PSHS 1 "P.2-29"
DF Rise detection 1 "P.2-33"
DF/ Fall detection 1 "P.2-33"
DFI Rise detection (possible on the first scan) 1 "P.2-38"

SET Turns ON the output and holds it ON(Note 1) 3 "P.2-40"

DSET Turns ON the output and holds it ON: Direct input(Note 1) 3 "P.2-43"

RST Turns OFF the output and holds it OFF(Note 1) 3 "P.2-40"

DRST Turns OFF the output and holds it OFF: Direct input(Note 1) 3 "P.2-43"

KP Outputs with set and reset inputs 1 "P.2-47"


DKP Outputs with set and reset inputs: Direct output 2 "P.2-49"
NOP No operation 1 "P.2-52"

(Note 1) Indicates an instruction for which bit index modification is possible.


(Note 2) Numbers in parentheses in the Steps column indicate the number of steps when index modification is
performed or when the device number is large (R1120 or higher, T256 or higher, and C256 or higher).

■ Basic function instructions


Referen
Mnemonic Name Steps ce
page:
TML On-delay timer set in 0.001‑s units 3 (4) "P.3-2"
TMR On-delay timer set in 0.01‑s units 3 (4) "P.3-2"
TMX On-delay timer set in 0.1‑s units 3 (4) "P.3-2"
TMY On-delay timer set in 1‑s units 4 (5) "P.3-2"
F137 STMR On-delay timer set to 0.01 s 5 "P.3-9"
F183 DSTM 32-bit on-delay timer set to 0.01 s 7 "P.3-12"
CT Down counter 3 (4) "P.3-16"
F118 UDC Up/down counter 5 "P.3-23"
SR Shift register 1 "P.3-26"
F119 LRSR Left/right shift register 5 "P.3-29"
F182 FILTR Time constant processing instruction S1, S2, S3, D 9 "P.3-32"

(Note 1) Numbers in parentheses in the Steps column indicate the number of steps when index modification is
performed or when the device number is large (R1120 or higher, T256 or higher, and C256 or higher).

WUME-FPXHPGRG-021 1-3
1.1 List of Basic Instruction Words

■ Control instructions
Referen
Mnemonic Name Steps ce
page:
MC Master control relay 2 "P.4-2"
MCE Master control relay end 2 "P.4-2"
JP Jumps to specified label 2 "P.4-7"
LOOP Jumps to the specified label the number of times specified by D 4 "P.4-11"

Labels subject to the processing of instructions such as JP and "P.4-7"


LBL 1
LOOP "P.4-11"
ED Main program area end 1 "P.4-15"
CNDE Conditional program end 1 "P.4-16"
EJECT Page break when printing 2 "P.4-18"

(Note 1) Numbers in parentheses in the Steps column indicate the number of steps when index modification is
performed or when the device number is large (R1120 or higher, T256 or higher, and C256 or higher).

■ Step ladder instructions


Referen
Mnemonic Name Steps ce
page:
SSTP Process start 3 "P.5-2"
NSTL Specified process start-up (every scan execution type) 3 "P.5-2"
NSTP Specified process start-up (differential execution type) 3 "P.5-2"
CSTP Clears the specified process 3 "P.5-2"
STPE Step ladder area end 1 "P.5-2"
SCLR Clears multiple processes 5 "P.5-17"

■ Subroutine instructions
Referen
Mnemonic Name Steps ce
page:
CALL Calls the specified subroutine 2 "P.6-2"
SUB Subroutine definition 1 (2) "P.6-2"
RET Ends the subroutine program and returns to the main program 1 "P.6-2"

■ Interrupt instructions
Referen
Mnemonic Name Steps ce
page:
INT Interrupt program definition 1 "P.7-2"
IRET Ends the interrupt program and returns to the main program 1 "P.7-2"

1-4 WUME-FPXHPGRG-021
1.1 List of Basic Instruction Words

Referen
Mnemonic Name Steps ce
page:
ICTL Interrupt control specification 5 "P.7-8"

■ Program block control instructions


Referen
Mnemonic Name Steps ce
page:

EDPB(Note 1) Final point of PBn program 1

(Note 1) Cannot be input with a programming tool.

■ Special setting instructions


Referen
Mnemonic Name Steps ce
page:
Communication conditions setting, end code time setting for "P.8-2"
setting communication conditions, "P.8-8"
password setting, interrupt setting, PLC link setting, "P.8-10"
SYS1 MEWTOCOL-COM response control, high-speed counter 13
operation mode change, "P.8-12"
direct station number setting, indirect station number setting, "P.8-14"
firmware version number read "P.8-16"
SYS2 System register change instruction 7 "P.8-18"

■ Compare contact instructions


Referen
Mnemonic Name Steps ce
page:
ST= Begins a logical operation to compare 16-bit data 5 "P.9-2"
ST<> Begins a logical operation to compare 16-bit data 5 "P.9-2"
ST> Begins a logical operation to compare 16-bit data 5 "P.9-2"
ST>= Begins a logical operation to compare 16-bit data 5 "P.9-2"
ST< Begins a logical operation to compare 16-bit data 5 "P.9-2"
ST<= Begins a logical operation to compare 16-bit data 5 "P.9-2"
AN = 16-bit data compare serial connection 5 "P.9-4"
AN <> 16-bit data compare serial connection 5 "P.9-4"
AN > 16-bit data compare serial connection 5 "P.9-4"
AN >= 16-bit data compare serial connection 5 "P.9-4"
AN < 16-bit data compare serial connection 5 "P.9-4"
AN <= 16-bit data compare serial connection 5 "P.9-4"
OR= 16-bit data compare parallel connection 5 "P.9-6"
OR<> 16-bit data compare parallel connection 5 "P.9-6"

WUME-FPXHPGRG-021 1-5
1.1 List of Basic Instruction Words

Referen
Mnemonic Name Steps ce
page:
OR> 16-bit data compare parallel connection 5 "P.9-6"
OR>= 16-bit data compare parallel connection 5 "P.9-6"
OR< 16-bit data compare parallel connection 5 "P.9-6"
OR<= 16-bit data compare parallel connection 5 "P.9-6"
STD= Begins a logical operation to compare 32-bit data 9 "P.9-8"
STD<> Begins a logical operation to compare 32-bit data 9 "P.9-8"
STD> Begins a logical operation to compare 32-bit data 9 "P.9-8"
STD>= Begins a logical operation to compare 32-bit data 9 "P.9-8"
STD< Begins a logical operation to compare 32-bit data 9 "P.9-8"
STD<= Begins a logical operation to compare 32-bit data 9 "P.9-8"
AND= 32-bit data compare serial connection 9 "P.9-10"
AND<> 32-bit data compare serial connection 9 "P.9-10"
AND> 32-bit data compare serial connection 9 "P.9-10"
AND>= 32-bit data compare serial connection 9 "P.9-10"
AND< 32-bit data compare serial connection 9 "P.9-10"
AND<= 32-bit data compare serial connection 9 "P.9-10"
ORD= 32-bit data compare parallel connection 9 "P.9-12"
ORD<> 32-bit data compare parallel connection 9 "P.9-12"
ORD> 32-bit data compare parallel connection 9 "P.9-12"
ORD>= 32-bit data compare parallel connection 9 "P.9-12"
ORD< 32-bit data compare parallel connection 9 "P.9-12"
ORD<= 32-bit data compare parallel connection 9 "P.9-12"

■ Compare contact instructions


Referen
Mnemonic Name Steps ce
page:
Begins a logical operation to compare single-precision floating
STF= 10 "P.9-14"
point data
Begins a logical operation to compare single-precision floating
STF<> 10 "P.9-14"
point data
Begins a logical operation to compare single-precision floating
STF> 10 "P.9-14"
point data
Begins a logical operation to compare single-precision floating
STF>= 10 "P.9-14"
point data
Begins a logical operation to compare single-precision floating
STF< 10 "P.9-14"
point data
Begins a logical operation to compare single-precision floating
STF<= 10 "P.9-14"
point data

1-6 WUME-FPXHPGRG-021
1.1 List of Basic Instruction Words

Referen
Mnemonic Name Steps ce
page:
ANF= Single-precision floating point data compare serial connection 10 "P.9-16"
ANF<> Single-precision floating point data compare serial connection 10 "P.9-16"
ANF> Single-precision floating point data compare serial connection 10 "P.9-16"
ANF>= Single-precision floating point data compare serial connection 10 "P.9-16"
ANF< Single-precision floating point data compare serial connection 10 "P.9-16"
ANF<= Single-precision floating point data compare serial connection 10 "P.9-16"
ORF= Single-precision floating point data compare parallel connection 10 "P.9-18"
ORF<> Single-precision floating point data compare parallel connection 10 "P.9-18"
ORF> Single-precision floating point data compare parallel connection 10 "P.9-18"
ORF>= Single-precision floating point data compare parallel connection 10 "P.9-18"
ORF< Single-precision floating point data compare parallel connection 10 "P.9-18"
ORF<= Single-precision floating point data compare parallel connection 10 "P.9-18"

WUME-FPXHPGRG-021 1-7
1.2 List of High-level Instructions

1.2 List of High-level Instructions

■ Transfer instructions
Reference
Fun no. Mnemonic Operand Name Step
page
F0 MV S, D 16-bit data transfer 5 "P.10-2"
F0 MV DT90020, D 10 µsec ring counter read 5 "P.10-4"
F1 DMV S, D 32-bit data transfer 7 "P.10-5"
F2 MV/ S, D 16-bit data reverse and transfer 5 "P.10-7"
F3 DMV/ S, D 32-bit data reverse and transfer 7 "P.10-9"
F5 BTM S, n, D Bit data transfer 7 "P.10-11"
F6 DGT S, n, D Digit data transfer 7 "P.10-16"
F7 MV2 S1, S2, D Two 16-bit data transfer to a single area 7 "P.10-20"
F8 DMV2 S1, S2, D Two 32-bit data transfer to a single area 11 "P.10-22"
F10 BKMV S1, S2, D Data block transfer 7 "P.10-24"
F11 COPY S, D1, D2 16-bit data block copy 7 "P.10-27"
F12 ICRD S1, S2, D F-ROM read 11 "P.10-29"
P13 PICWT S1, S2, D F-ROM write 11 "P.10-31"
F15 XCH D1, D2 16-bit data exchange 5 "P.10-33"
F16 DXCH D1, D2 32-bit data exchange 5 "P.10-35"
F17 SWAP D Higher and lower byte exchange 3 "P.10-37"
F18 BXCH D1, D2, D3 Data block exchange 7 "P.10-39"
F190 MV3 S1, S2, S3, D Three 16-bit data transfer to a single area 10 "P.10-41"
F191 DMV3 S1, S2, S3, D Three 32-bit data transfer to a single area 16 "P.10-43"

■ Binary arithmetic operation instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F20 + S, D 16-bit data addition [D+S=D] 5 "P.11-2"
F21 D+ S, D 32-bit data addition [D+S=D] 7 "P.11-4"
F22 + S1, S2, D 16-bit data addition [S1+S2=D] 7 "P.11-6"
F23 D+ S1, S2, D 32-bit data addition [S1+S2=D] 11 "P.11-8"
F25 - S, D 16-bit data subtraction [D-S=D] 5 "P.11-10"
F26 D- S, D 32-bit data subtraction [D-S=D] 7 "P.11-13"
F27 - S1, S2, D 16-bit data subtraction [S1-S2=D] 7 "P.11-15"
F28 D- S1, S2, D 32-bit data subtraction [S1-S2=D] 11 "P.11-18"
F30 * S1, S2, D 16-bit data multiplication [S1*S2=D+1,D] 7 "P.11-20"
32-bit data multiplication [S1*S2=D+3,D+2,D
F31 D* S1, S2, D 11 "P.11-22"
+1,D]

1-8 WUME-FPXHPGRG-021
1.2 List of High-level Instructions

Reference
Fun no. Mnemonic Operand Name Step
page
F32 % S1, S2, D 16-bit data division [S1/S2=D] 7 "P.11-24"
F33 D% S1, S2, D 32-bit data division [S1/S2=D+1,D] 11 "P.11-26"
F34 *W S1, S2, D 16-bit data multiplication [S1*S2=D] 7 "P.11-28"
F35 +1 D 16-bit data increment 3 "P.11-30"
F36 D+1 D 32-bit data increment 3 "P.11-32"
F37 -1 D 16-bit data decrement 3 "P.11-34"
F38 D-1 D 32-bit data decrement 3 "P.11-36"
F39 D*D S1, S2, D 32-bit data multiplication [S1*S2=D+1,D] 11 "P.11-38"

■ BCD data arithmetic instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F40 B+ S, D 4-digit BCD data addition [D+S=D] 5 "P.12-2"
F41 DB+ S, D 8-digit BCD data addition [D+S=D] 7 "P.12-4"
F42 B+ S1, S2, D 4-digit BCD data addition [S1+S2=D] 7 "P.12-6"
F43 DB+ S1, S2, D 8-digit BCD data addition [S1+S2=D] 11 "P.12-8"
F45 B- S, D 4-digit BCD data subtraction [D-S=D] 5 "P.12-10"
F46 DB- S, D 8-digit BCD data subtraction [D-S=D] 7 "P.12-12"
F47 B- S1, S2, D 4-digit BCD data subtraction [S1-S2=D] 7 "P.12-14"
F48 DB- S1, S2, D 8-digit BCD data subtraction [S1-S2=D] 11 "P.12-16"
F50 B* S1, S2, D 4-digit BCD data multiplication [S1*S2=D+1,D] 7 "P.12-18"
8-digit BCD data multiplication [S1*S2=D+3,D
F51 DB* S1, S2, D 11 "P.12-20"
+2,D+1,D]
F52 B% S1, S2, D 4-digit BCD data division [S1/S2=D] 7 "P.12-22"
F53 DB% S1, S2, D 8-digit BCD data division [S1/S2=D+1,D] 11 "P.12-24"
F55 B+1 D 4-digit BCD data increment 3 "P.12-26"
F56 DB+1 D 8-digit BCD data increment 3 "P.12-28"
F57 B-1 D 4-digit BCD data decrement 3 "P.12-30"
F58 DB-1 D 8-digit BCD data decrement 3 "P.12-32"

■ Data comparison instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F60 CMP S1, S2 16-bit data comparison 5 "P.13-2"
F61 DCMP S1, S2 32-bit data comparison 9 "P.13-8"
F62 WIN S1, S2, S3 16-bit data band comparison 7 "P.13-12"
F63 DWIN S1, S2, S3 32-bit data band comparison 13 "P.13-14"
F64 BCMP S1, S2, S3 Block data comparison 7 "P.13-16"

WUME-FPXHPGRG-021 1-9
1.2 List of High-level Instructions

Reference
Fun no. Mnemonic Operand Name Step
page
F373 DTR S, D 16-bit data change detection 6 "P.13-19"
F374 DDTR S, D 32-bit data change detection 6 "P.13-21"

■ Boolean instructions
Reference
Fun no. Mnemonic Operand Name Step
page
F65 WAN S1, S2, D 16-bit data AND 7 "P.14-2"
F66 WOR S1, S2, D 16-bit data OR 7 "P.14-4"
F67 XOR S1, S2, D 16-bit data exclusive OR 7 "P.14-6"
F68 XNR S1, S2, D 16-bit data exclusive NOR 7 "P.14-8"
F69 WUNI S1, S2, S3, D [(S1 AND S3) OR (S2 AND S3)=D](16-bit) 9 "P.14-10"
F215 DAND S1, S2, D 32-bit data AND 12 "P.14-12"
F216 DOR S1, S2, D 32-bit data OR 12 "P.14-14"
F217 DXOR S1, S2, D 32-bit data exclusive OR 12 "P.14-16"
F218 DXNR S1, S2, D 32-bit data exclusive NOR 12 "P.14-18"
F219 DUNI S1, S2, S3, D [(S1 AND S3) OR (S2 AND S3)=D](32-bit) 16 "P.14-20"

■ Data conversion instructions


Reference
Fun no. Mnemonic Operand Name Step
page
Block check code calculation (ADD.SUB,
F70 BCC S1, S2, S3, D 9 "P.15-3"
XOR, CRC)
F71 HEXA S1, S2, D Convert hexadecimal data to ASCII code 7 "P.15-7"
F72 AHEX S1, S2, D Convert ASCII code to hexadecimal data 7 "P.15-10"
F73 BCDA S1, S2, D Convert BCD data to ASCII code 7 "P.15-14"
F74 ABCD S1, S2, D Convert ASCII code to BCD data 7 "P.15-18"
F75 BINA S1, S2, D Convert 16-bit binary data to ASCII code 7 "P.15-22"
F76 ABIN S1, S2, D Convert ASCII code to 16-bit binary data 7 "P.15-25"
F77 DBIA S1, S2, D Convert 32-bit binary data to ASCII code 11 "P.15-29"
F78 DABI S1, S2, D Convert ASCII code to 32-bit binary data 11 "P.15-32"
F80 BCD S, D Convert 16-bit binary data to BCD data 5 "P.15-36"
F81 BIN S, D Convert BCD data to 16-bit binary data 5 "P.15-38"
F82 DBCD S, D Convert 32-bit binary data to BCD data 7 "P.15-40"
F83 DBIN S, D Convert BCD data to 32-bit binary data 7 "P.15-41"
F84 INV D 16-bit data inversion 3 "P.15-42"
F85 NEG D 16-bit data sign inversion 3 "P.15-43"
F86 DNEG D 32-bit data sign inversion 3 "P.15-44"
F87 ABS D 16-bit data absolute value 3 "P.15-46"

1-10 WUME-FPXHPGRG-021
1.2 List of High-level Instructions

Reference
Fun no. Mnemonic Operand Name Step
page
F88 DABS D 32-bit data absolute value 3 "P.15-47"
F89 EXT D Sign extension 3 "P.15-48"
F90 DECO S, n, D Decode 7 "P.15-50"
F91 SEGT S, D 7-segment decode 5 "P.15-53"
F92 ENCO S, n, D Encode 7 "P.15-55"
F93 UNIT S, n, D Digit combine 7 "P.15-58"
F94 DIST S, n, D Digit distribute 7 "P.15-60"
F96 SRC S1, S2, S3 16-bit data search 7 "P.15-62"
F97 DSRC S1, S2, S3, S4 32-bit data search 9 "P.15-64"
F230 TMSEC S, D Time to second conversion 6 "P.15-66"
F231 SECTM S, D Second to time conversion 6 "P.15-69"
F235 GRY S, D 16-bit data to gray code conversion 6 "P.15-72"
F236 DGRY S, D 32-bit data to gray code conversion 8 "P.15-73"
F237 GBIN S, D Gray code to 16-bit data conversion 6 "P.15-74"
F238 DGBIN S, D Gray code to 32-bit data conversion 8 "P.15-75"
F240 COLM S1, S2, D Bit line to bit column conversion 8 "P.15-77"
F241 LINE S1, S2, D Bit column to bit line conversion 8 "P.15-79"

■ Data shift instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F100 SHR D, n 16-bit data right shift 5 "P.16-2"
F101 SHL D, n 16-bit data left shift 5 "P.16-4"
F102 DSHR D, n 32-bit data right shift 5 "P.16-6"
F103 DSHL D, n 32-bit data left shift 5 "P.16-8"
F105 BSR D 16-bit data 1 digit right shift 3 "P.16-10"
F106 BSL D 16-bit data 1 digit left shift 3 "P.16-12"
F108 BITR D1, D2, n Bitwise right shift in block area 7 "P.16-14"
F109 BITL D1, D2, n Bitwise left shift in block area 7 "P.16-16"
F110 WSHR D1, D2 Right shift by one word in block area 5 "P.16-18"
F111 WSHL D1, D2 Left shift by one word in block area 5 "P.16-20"
F112 WBSR D1, D2 Right shift by one digit in block area 5 "P.16-22"
F113 WBSL D1, D2 Left shift by one digit in block area 5 "P.16-24"

■ Data rotate instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F120 ROR D, n 16-bit data right rotation 5 "P.17-2"

WUME-FPXHPGRG-021 1-11
1.2 List of High-level Instructions

Reference
Fun no. Mnemonic Operand Name Step
page
F121 ROL D, n 16-bit data left rotation 5 "P.17-4"
F122 RCR D, n 16-bit data right rotation with carry 5 "P.17-6"
F123 RCL D, n 16-bit data left rotation with carry 5 "P.17-8"
F125 DROR D, n 32-bit data right rotation 5 "P.17-10"
F126 DROL D, n 32-bit data left rotation 5 "P.17-12"
F127 DRCR D, n 32-bit data right rotation with carry 5 "P.17-14"
F128 DRCL D, n 32-bit data left rotation with carry 5 "P.17-16"

■ Data buffer instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F98 CMPR D1, D2, D3 Compress shift read 7 "P.18-2"
F99 CMPW S1, D, S2 Compress shift write 7 "P.18-6"
F115 FIFT n, D FIFO buffer definition 5 "P.18-11"
F116 FIFR S, D FIFO data read 5 "P.18-14"
F117 FIFW S, D FIFO data write 5 "P.18-18"

■ Bit manipulation instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F130 BTS D, n Specified bit set 5 "P.19-2"
F131 BTR D, n Specified bit reset 5 "P.19-4"
F132 BTI D, n Specified bit inversion 5 "P.19-6"
F133 BTT S, n Specified bit test 5 "P.19-8"
F135 BCU S, D Count ON bits in 16-bit data 5 "P.19-10"
F136 DBCU S, D Count ON bits in 32-bit data 7 "P.19-12"

■ Special instructions
Reference
Fun no. Mnemonic Operand Name Step
page
Hour, minute, second data to second data
F138 HMSS S, D 5 "P.20-2"
conversion
Second data to hour, minute, second data
F139 SHMS S, D 5 "P.20-4"
conversion
F140 STC Carry flag set 1 "P.20-6"
F141 CLC Carry flag reset 1 "P.20-7"
F143 IORF D1, D2 Partial I/O refresh 5 "P.20-8"
F147 PR S, D Printout 5 "P.20-10"
F148 ERR n Self-diagnostic error code set 3 "P.20-15"

1-12 WUME-FPXHPGRG-021
1.2 List of High-level Instructions

Reference
Fun no. Mnemonic Operand Name Step
page
F149 MSG S Send characters to programming tool 13 "P.20-17"
F150 READ S1, S2, n, D Read shared memory 9 "P.20-18"
F151 WRT S1, S2, n, D Write data to shared memory 9 "P.20-21"
F157 CADD S1, S2, D Calendar data addition 9 "P.20-24"
F158 CSUB S1, S2, D Calendar data subtraction 9 "P.20-27"
F160 DSQR S, D 32-bit data square root 7 "P.20-32"

■ Serial communication instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F145 SEND S1, S2, D, N Data send instruction [MEWTOCOL master] 9 "P.21-4"
F146 RECV S1, S2, N, D Data receive instruction [MEWTOCOL master] 9 "P.21-7"
Data send instruction [MODBUS master:
F145 SEND S1, S2, D, N 9 "P.21-10"
Function code specification]
Data receive instruction [MODBUS master:
F146 RECV S1, S2, N, D 9 "P.21-12"
Function code specification]
Data send instruction [MODBUS master: No
F145 SEND S1, S2, D, N 9 "P.21-14"
function code specification]
Data receive instruction [MODBUS master: No
F146 RECV S1, S2, N, D 9 "P.21-17"
function code specification]
F159 MTRN S, n, D General-purpose communication instructions 7 "P.21-20"

■ Sampling trace instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F155 SMPL Sampling 1 "P.22-3"
F156 STRG Sampling trigger 1 "P.22-4"

■ High-speed counter instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F0 MV S, DT90052 High-speed counter control instruction 5 "P.23-2"
F1 DMV S, DT90300 High-speed counter elapsed value read 7 "P.23-4"
F1 DMV DT90300, D High-speed counter elapsed value write 7 "P.23-4"
Target value match ON (with channel
F166 HC1S n, S, D 11 "P.23-5"
specification)
Target value match OFF (with channel
F167 HC1R n, S, D 11 "P.23-5"
specification)

WUME-FPXHPGRG-021 1-13
1.2 List of High-level Instructions

■ High-speed counter cam control instruction


Reference
Fun no. Mnemonic Operand Name Step
page
F165 CAM0 S Cam control 3 "P.24-2"

■ PWM output instructions


Reference
Fun no. Mnemonic Operand Name Step
page
PWM output instruction (Frequency
F173 PWMH S, n 5 "P.25-2"
specification)
PWM output instruction (Control code
F173 PWMH S, n 5 "P.25-4"
specification)

■ Character string instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F95 ASC M,D Convert character constant to ASCII code 15 "P.26-2"
Convert multiple binary data to ASCII data
F250 BTOA S1, S2, S3, D 12 "P.26-5"
string
Convert multiple ASCII data strings to binary
F251 ATOB S1, S2, S3, D 12 "P.26-11"
data
ASCII code check of multiple ASCII data
F252 ACHK S1, S2, S3 10 "P.26-18"
strings
8 to
Character constant to ASCII code conversion 264
F253 SSET S1, S2, D "P.26-20"
(with storage area size)
(Note 1)

F257 SCMP S1, S2, D Character string comparison 10 "P.26-25"


F258 SADD S1, S2, D Character string addition 12 "P.26-27"
F259 LEN S, D Character string length 6 "P.26-29"
F260 SSRC S1, S2, D Character string search 10 "P.26-31"
F261 RIGHT S1, S2, D Right retrieve from character string 8 "P.26-33"
F262 LEFT S1, S2, D Left retrieve from character string 8 "P.26-35"
F263 MIDR S1, S2, S3, D Read from any position in character string 10 "P.26-37"
F264 MIDW S1, S2, S3, D Write to any position in character string 12 "P.26-39"
F265 SREP S, D, P, n Replace character string 12 "P.26-41"

(Note 1) For the F253 instruction, the number of steps varies according to the content specified for the
operand.

■ Data manipulation instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F270 MAX S1, S2, D Search maximum value from 16-bit data block 8 "P.27-2"
F271 DMAX S1, S2, D Search maximum value from 32-bit data block 8 "P.27-4"

1-14 WUME-FPXHPGRG-021
1.2 List of High-level Instructions

Reference
Fun no. Mnemonic Operand Name Step
page
F272 MIN S1, S2, D Search minimum value from 16-bit data block 8 "P.27-6"
F273 DMIN S1, S2, D Search minimum value from 32-bit data block 8 "P.27-8"
F275 MEAN S1, S2, D Total and mean value calculation in 16-bit data 8 "P.27-10"
F276 DMEAN S1, S2, D Total and mean value calculation in 32-bit data 8 "P.27-12"
F277 SORT S1, S2, S3 Sort data in 16-bit data block 8 "P.27-14"
F278 DSORT S1, S2, S3 Sort data in 32-bit data block 8 "P.27-16"
F282 SCAL S1, S2, D Linearization of 16-bit data 8 "P.27-18"
F283 DSCAL S1, S2, D Linearization of 32-bit data 10 "P.27-21"
F284 RAMP S1, S2, S3, D 16-bit data ramp output 10 "P.27-24"
F285 LIMT S1, S2, S3, D 16-bit data upper and lower limit control 10 "P.27-26"
F286 DLIMT S1, S2, S3, D 32-bit data upper and lower limit control 16 "P.27-28"
F287 BAND S1, S2, S3, D 16-bit data deadband control 10 "P.27-30"
F288 DBAND S1, S2, S3, D 32-bit data deadband control 16 "P.27-32"
F289 ZONE S1, S2, S3, D 16-bit data zone control 10 "P.27-34"
F290 DZONE S1, S2, S3, D 32-bit data zone control 16 "P.27-36"

■ Floating point number data instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F309 FMV S, D Floating point number data transfer 8 "P.28-3"
F310 F+ S1, S2, D Floating point number data addition 14 "P.28-5"
F311 F- S1, S2, D Floating point number data subtraction 14 "P.28-7"
F312 F* S1, S2, D Floating point number data multiplication 14 "P.28-9"
F313 F% S1, S2, D Floating point number data division 14 "P.28-11"
F314 SIN S, D Sine of floating point number data 10 "P.28-13"
F315 COS S, D Cosine of floating point number data 10 "P.28-15"
F316 TAN S, D Tangent of floating point number data 10 "P.28-17"
F317 ASIN S, D Arcsine of floating point number data 10 "P.28-19"
F318 ACOS S, D Arccosine of floating point number data 10 "P.28-21"
F319 ATAN S, D Arctangent of floating point number data 10 "P.28-23"
F320 LN S, D Natural logarithm of floating point number data 10 "P.28-25"
F321 EXP S, D Exponent of floating point number data 10 "P.28-27"
F322 LOG S, D Floating point number data common logarithm 10 "P.28-29"
F323 PWR S1, S2, D Floating point number data power 14 "P.28-31"
F324 FSQR S, D Floating point number data square root 10 "P.28-33"
16-bit integer data to floating point number
F325 FLT S, D 6 "P.28-35"
data conversion

WUME-FPXHPGRG-021 1-15
1.2 List of High-level Instructions

Reference
Fun no. Mnemonic Operand Name Step
page
32-bit integer data to floating point number
F326 DFLT S, D 8 "P.28-36"
data conversion
Floating point number data to 16-bit integer
F327 INT S, D conversion (largest integer not exceeding 8 "P.28-38"
floating point real number)
Floating point number data to 32-bit integer
F328 DINT S, D conversion (largest integer not exceeding 8 "P.28-40"
floating point real number)
Floating point number data to truncated 16-bit
F329 FIX S, D 8 "P.28-42"
integer conversion
Floating point number data to truncated 32-bit
F330 DFIX S, D 8 "P.28-44"
integer conversion
Floating point number data to rounded 16-bit
F331 ROFF S, D 8 "P.28-46"
integer conversion
Floating point number data to rounded 32-bit
F332 DROFF S, D 8 "P.28-48"
integer conversion
Round down floating point number data at the
F333 FINT S, D 8 "P.28-50"
decimal point
Round off floating point number data to the
F334 FRINT S, D 8 "P.28-52"
first decimal place
F335 F+/- S, D Floating point number data sign conversion 8 "P.28-54"
F336 FABS S, D Floating point number data absolute value 8 "P.28-56"
F337 RAD S, D Floating point number data degree to radian 8 "P.28-58"
Radian to degree floating point number data
F338 DEG S, D 8 "P.28-60"
conversion

■ Real number data processing instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F345 FCMP S1, S2 Floating point number data comparison 10 "P.29-2"
F346 FWIN S1, S2, S3 Floating point number data band comparison 14 "P.29-4"
Floating point number data upper / lower limit
F347 FLIMT S1, S2, S3, D 18 "P.29-6"
control
F348 FBAND S1, S2, S3, D Floating point number data dead-band control 18 "P.29-8"
F349 FZONE S1, S2, S3, D Floating point number data zone control 18 "P.29-10"
F354 FSCAL S1, S2, D Scaling of real number data 12 "P.29-12"

■ Process control instructions


Reference
Fun no. Mnemonic Operand Name Step
page
F355 PID S PID operation 4 "P.30-2"
Easy PID
F356 EZPID S1, S2, S3, S4 10 "P.30-9"
(PID operation: PWM output is possible.)

1-16 WUME-FPXHPGRG-021
1.2 List of High-level Instructions

■ Positioning control instructions (Table setting mode)


Reference
Fun no. Mnemonic Operand Name Step
page
F380 POSST S1, S2, S3 Positioning table start instruction 8 "P.31-2"
F381 JOGST S1, S2 JOG operation start instruction 6 "P.31-4"
F382 ORGST S Home return start instruction 4 "P.31-6"
F383 MPOST S Positioning table simultaneous start instruction 4 "P.31-8"
F384 PTBLR S1, S2, n, D Positioning parameter read instruction 10 "P.31-10"
F385 PTBLW S1, S2, n, D Positioning parameter write instruction 10 "P.31-12"

■ Positioning control instructions (FP-X compatible mode)


Reference
Fun no. Mnemonic Operand Name Step
page
F1 DMV S, DT90348 Elapsed value read instruction 7 "P.23-4"
F1 DMV DT90348, D Elapsed value write instruction 7 "P.23-4"
F171 SPDH S, n Pulse output (Trapezoidal control) 5 "P.32-3"
F171 SPDH S, n Pulse output (Home return) 5 "P.32-8"
F172 PLSH S, n Pulse output (JOG operation) 5 "P.32-13"
Pulse output (Selectable data table control
F174 SP0H S, n 5 "P.32-16"
operation)
F175 SPSH S, n Pulse output (Linear interpolation) 5 "P.32-21"

WUME-FPXHPGRG-021 1-17
(MEMO)

1-18 WUME-FPXHPGRG-021
2 Sequence Basic Instructions
2.1 ST, ST/ and OT (Start, Start Not and Out) ..........................................2-2
2.2 DST, DST/ (Direct start, direct start Not).............................................2-4
2.3 DOT (direct out) ..................................................................................2-7
2.4 / (Not) ..................................................................................................2-10
2.5 AN, AN/ (AND, AND Not)....................................................................2-11
2.6 DAN, DAN/ (Direct AND, Direct AND NOT)........................................2-13
2.7 OR, OR/ (OR, OR Not) .......................................................................2-16
2.8 DOR, DOR/ (Direct OR, Direct OR Not) .............................................2-18
2.9 ST↑, ST↓, AN↑, AN↓, OR↑, OR↓ (Rise Detection, Fall Detection) ......2-21
2.10 ALT (Alternate Out) ...........................................................................2-23
2.11 ANS (And Stack) ...............................................................................2-25
2.12 ORS (OR Stack) ...............................................................................2-27
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack)................2-29
2.14 DF, DF/ (Rise Differential,Fall Differential) ........................................2-33
2.15 DFI [Rise Differential (initial execution type)] ....................................2-38
2.16 SET, RST (Set, Reset) ......................................................................2-40
2.17 DSET/DRST (Direct Set/Direct Reset)..............................................2-43
2.18 KP (Keep) .........................................................................................2-47
2.19 DKP (Direct Keep) ............................................................................2-49
2.20 NOP ..................................................................................................2-52

WUME-FPXHPGRG-021 2-1
2.1 ST, ST/ and OT (Start, Start Not and Out)

2.1 ST, ST/ and OT (Start, Start Not and Out)

■ Instruction format

■ Instruction list
Instru
Description
ction
ST Input contact starting logical operation as Form A (normally open)
ST/ Input contact starting logical operation as Form B (normally closed)
OT Coil that outputs logical operation

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
ST ● ● ● ● ● ● ●
ST/ ● ● ● ● ● ● ●
OT ● ● ● ●

■ Outline of operation
Instru
Operation
ction
ST Handles input contact as Form A (normally open) and begins a logical operation.
ST/ Handles input contact as Form B (normally closed) and begins a logical operation.
OT Outputs operation results to the specified coil.

■ Operation example
Operation of instruction format description program
● Execution results are output to Y10 when X0 is ON, and to Y11 when X0 is OFF.

2-2 WUME-FPXHPGRG-021
2.1 ST, ST/ and OT (Start, Start Not and Out)

■ Precautions for programming


● ST instructions begin from the bus bar. (This is the same for ST/ instructions)

● OT instructions cannot begin directly from the bus bar.

● OT instructions can be used consecutively.

● When an external switch is Form B (normally closed), such as an emergency stop switch,
take care to useSTinstructions in programming.

WUME-FPXHPGRG-021 2-3
2.2 DST, DST/ (Direct start, direct start Not)

2.2 DST, DST/ (Direct start, direct start Not)

■ Instruction format

■ Instruction list
Instru
Description
ction
DST Input contact starting logical operation as Form A (normally open)
DST/ Input contact starting logical operation as Form B (normally closed)

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
DST ● ●
DST/ ● ●

■ Outline of operation
Instru
Operation
ction
The specified external contact is read and reflected in the input contact, that input contact is handled
DST
as a Form A (normally open) contact, and the logical operation begins.
The specified external contact is read and reflected in the input contact, that input contact is handled
DST/
as a Form B (normally closed) contact, and the logical operation begins.

■ Operation example
Operation of instruction format description program
● When external input X0 turns ON, R0 turns ON.
● When external input X1 turns OFF, R1 turns ON.

■ Precautions for programming


● If the contact is outside the permissible range, an operation error will result.
● When the time is set using the controller input time constant setting system register, the time
constant is invalid.

■ Comparison of ST instruction and DST instruction


● Compared to the ST instruction, the DST instruction is capable of a high-speed response.
<For ST instruction>

2-4 WUME-FPXHPGRG-021
2.2 DST, DST/ (Direct start, direct start Not)

● Ladder diagram

● Timing chart
*Main unit input constant setting: None
n-1 scan n scan n+1 scan

External
input
X0

R0

ST X0 execution
<For DST instruction>
● Ladder diagram

● Timing chart
*Main unit input constant setting: None

WUME-FPXHPGRG-021 2-5
2.2 DST, DST/ (Direct start, direct start Not)

n-1 scan n scan n+1 scan

X0

R0

DST X0 execution

2-6 WUME-FPXHPGRG-021
2.3 DOT (direct out)

2.3 DOT (direct out)

■ Instruction format

■ Instruction list
Instru
Description
ction
DOT Coil that outputs logical operation

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
DOT ● ●

■ Outline of operation
Instru
Operation
ction
Reflects the operation result to the specified output contact, and outputs ON/OFF to the external
DOT
output.

■ Operation example
Operation of instruction format description program
● If R0 is ON, Y0 turns ON.
● If R0 is OFF, Y0 turns OFF.

■ Precautions for programming


● If the contact is outside the permissible range, an operation error will result.
● If the same output coil is specified, a syntax error (duplicate output) will occur.

■ Comparison of OT instructions and DOT instructions


● Compared to OT instructions, DOT instructions are capable of high-speed responses.
<OT instruction>

WUME-FPXHPGRG-021 2-7
2.3 DOT (direct out)

● Ladder diagram

● Timing chart
n-1 scan n scan n+1 scan

R0

Y0

OT Y0 execution
<DOT instruction>
● Ladder diagram

2-8 WUME-FPXHPGRG-021
2.3 DOT (direct out)

● Timing chart
n-1 scan n scan n+1 scan

R0

Y0

DOT Y0 execution

WUME-FPXHPGRG-021 2-9
2.4 / (Not)

2.4 / (Not)

■ Instruction format

■ Outline of operation
● The NOT instruction inverts the operation result up to immediately before this instruction.

■ Operation example
Operation of instruction format description program
● When X0 turns ON, Y10 turns ON and Y11 turns OFF.
● When X0 turns OFF, Y10 turns OFF and Y11 turns ON.

2-10 WUME-FPXHPGRG-021
2.5 AN, AN/ (AND, AND Not)

2.5 AN, AN/ (AND, AND Not)

■ Instruction format

■ Instruction list
Instru
Description
ction
AN Form A (normally open) contacts connected in series
AN/ Form B (normally closed) contacts connected in series

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
AN ● ● ● ● ● ● ●
AN/ ● ● ● ● ● ● ●

■ Outline of operation
● A logical conjunction is executed with the immediately preceding serially connected
operation result.

■ Operation example
Operation of instruction format description program
● When X0 and X1 turn ON and X2 turns OFF, the result is output to Y10.

■ Precautions for programming


● Use the AN instruction when Form A (normally open) contacts are serially connected.
● Use the AN/ instruction when Form B (normally closed) contacts are serially connected.

WUME-FPXHPGRG-021 2-11
2.5 AN, AN/ (AND, AND Not)

● The AN and AN/ instructions can be used consecutively.

2-12 WUME-FPXHPGRG-021
2.6 DAN, DAN/ (Direct AND, Direct AND NOT)

2.6 DAN, DAN/ (Direct AND, Direct AND NOT)

■ Instruction format

■ Instruction list
Instru
Description
ction
DAN Form A (normally open) contacts connected in series
DAN/ Form B (normally closed) contacts connected in series

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
DAN ● ●
DAN/ ● ●

■ Outline of operation
● Reads the specified external input, reflects this in the input contact, and performs a logical
conjunction with the calculation results of the immediately preceding operation connected in
series.

■ Operation example
Operation of instruction format description program
● R10 turns ON when R0 is ON and external input X0 is ON.
● R11 turns ON when R1 is ON and external input X0 is OFF.

■ Precautions for programming


● If the contact is outside the permissible range, an operation error will result.
● When the time is set using the controller input time constant setting system register, the time
constant is invalid.

■ Comparison of AN instructions and DAN instructions


● Compared to AN instructions, DAN instructions are capable of faster response.
<For AN instruction>

WUME-FPXHPGRG-021 2-13
2.6 DAN, DAN/ (Direct AND, Direct AND NOT)

● Ladder diagram

● Timing chart
n-1 scan n scan n+1 scan

R0

X0

R10

AN X0 execution
<For DAN instruction>
● Ladder diagram

2-14 WUME-FPXHPGRG-021
2.6 DAN, DAN/ (Direct AND, Direct AND NOT)

● Timing chart
n-1 scan n scan n+1 scan

R0

X0

R10

DAN X0 execution

WUME-FPXHPGRG-021 2-15
2.7 OR, OR/ (OR, OR Not)

2.7 OR, OR/ (OR, OR Not)

■ Instruction format

■ Instruction list
Instru
Description
ction
OR Form A (normally open) contact connected in parallel
OR/ Form B (normally closed) contact connected in parallel

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
OR ● ● ● ● ● ● ●
OR/ ● ● ● ● ● ● ●

■ Outline of operation
● A logical disjunction is executed with the immediately preceding operation result of the
contact connected in parallel.

■ Operation example
Operation of instruction format description program
If any of the conditions of X0 ON, X1 ON, or X2 OFF is satisfied, the result is output to Y10.

2-16 WUME-FPXHPGRG-021
2.7 OR, OR/ (OR, OR Not)

■ Precautions for programming


● Use the OR instruction when Form A (normally open) contacts are connected in parallel.
● Use the OR/ instruction when Form B (normally closed) contacts are connected in parallel.
● The OR instruction, like the ST instruction, starts from the bus bar.
● The OR and OR/ instructions can be used consecutively.

WUME-FPXHPGRG-021 2-17
2.8 DOR, DOR/ (Direct OR, Direct OR Not)

2.8 DOR, DOR/ (Direct OR, Direct OR Not)

■ Instruction format

■ Instruction list
Instru
Description
ction
DOR Form A (normally open) contact connected in parallel
DOR/ Form B (normally closed) contact connected in parallel

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
DOR ● ●
DOR/ ● ●

■ Outline of operation
● The specified external input is read and the value is reflected to the input contact. A logical
disjunction is executed with the immediately preceding operation result of the contact
connected in parallel.

■ Operation example
Operation of instruction format description program
● When R0 turns OFF or external input X0 turns ON, R10 turns ON.
● When R1 turns OFF or external input X0 turns OFF, R11 turns ON.

■ Precautions for programming


● If the contact is outside the permissible range, an operation error will result.
● When the time is set using the controller input time constant setting system register, the time
constant is invalid.

2-18 WUME-FPXHPGRG-021
2.8 DOR, DOR/ (Direct OR, Direct OR Not)

■ Comparing the OR instruction and DOR instruction


● A quicker response is possible with a DOR instruction than with an OR instruction.
<OR instruction>
● Ladder diagram

● Timing chart
n-1 scan n scan n+1 scan

R0

X0

R10

OR X0 execution
<DOR instruction>
● Ladder diagram

WUME-FPXHPGRG-021 2-19
2.8 DOR, DOR/ (Direct OR, Direct OR Not)

● Timing chart
n-1 scan n scan n+1 scan

R0

X0

R10

DOR X0 execution

2-20 WUME-FPXHPGRG-021
2.9 ST↑, ST↓, AN↑, AN↓, OR↑, OR↓ (Rise Detection, Fall Detection)

2.9 ST↑, ST↓, AN↑, AN↓, OR↑, OR↓ (Rise Detection, Fall Detection)

■ Instruction format

■ Instruction list
Instruction Description
ST↑, ST↓ Input contact that starts a logical operation at the rise or fall of a signal
AN↑, AN↓ Contacts connected in series at the rise or fall of a signal
OR↑, OR↓ Contacts connected in parallel at the rise or fall of a signal

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
ST↑, ST↓ ● ● ● ● ● ●
AN↑, AN↓ ● ● ● ● ● ●
OR↑, OR↓ ● ● ● ● ● ●

■ Outline of operation
Instruction Operation
Conduction takes place for 1 scan only following the change of a signal from the OFF to
ST↑, AN↑, OR↑
ON state (rise).
Conduction takes place for 1 scan only following the change of a signal from the ON to
ST↓, AN↓, OR↓
OFF state (fall).

■ Operation example
Operation of instruction format description program
1. When X0 changes from OFF to ON (rise), only 1 scan is output to Y10.

WUME-FPXHPGRG-021 2-21
2.9 ST↑, ST↓, AN↑, AN↓, OR↑, OR↓ (Rise Detection, Fall Detection)

ON
X1 OFF
ON
X2 OFF
1 scan 1 scan

Rising edge Rising edge


2. Output to Y11 takes place for 1 scan only following the change of X2 from the OFF to ON
state (rise) when X1 is ON.

ON
X1 OFF
ON
X2 OFF

ON
Y11 OFF
1 scan
3. Output to Y12 takes place for 1 scan only following the change of X3 or X4 from the ON to
OFF state (fall).

ON
X3 OFF

ON
X4 OFF
ON
Y12 OFF
1 scan 1 scan

2-22 WUME-FPXHPGRG-021
2.10 ALT (Alternate Out)

2.10 ALT (Alternate Out)

■ Instruction format

■ Instruction list
Instru
Description
ction
ALT Coil that controls flip-flops

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
ALT ● ● ●

■ Outline of operation
● When the operation result up to immediately before changes (rises) from OFF to ON, the
specified coil ON/OFF is inverted.
● The specified coil ON/OFF status is held until the next rise of the ALT instruction that
specifies that coil. (Flip-flop control)

■ Operation example
Operation of instruction format description program
Each time X0 changes from OFF to ON (rises), the output Y10 ON/OFF status is inverted.

ON
X0 OFF
ON
Y10 OFF

Inverts the Inverts the Inverts the


operation result operation result operation result

■ Precautions for programming


The ALT instruction detects input OFF to ON rise and inverts the output.
● While the input continues to be ON, it is inverted only during rise. After that it is not inverted.
● When switching to RUN or when powering on in "RUN mode" , if input is ON from the
beginning, inversion is not carried out for the first scan.

WUME-FPXHPGRG-021 2-23
2.10 ALT (Alternate Out)

● Be aware that, if used with instructions that change the order of execution such as the MC to
MCE instructions or the JP to LBL instructions (see 1 to 6 below), the operation of
instructions may change depending on the timing of instruction execution and input.
1. MC to MCE instructions
2. JP to LBL instructions
3. LOOP to LBL instructions
4. CNDE instruction
5. Step ladder instructions
6. Subroutine instructions

2-24 WUME-FPXHPGRG-021
2.11 ANS (And Stack)

2.11 ANS (And Stack)

■ Instruction format

■ Outline of operation
● Blocks that were connected in parallel are connected in series.

Blocks stack in series


● The start of each block begins with an ST instruction.

■ Operation example
Operation of instruction format description program
When X0 or X1 are ON, and X2 or X3 are ON, they are output to Y10.

(X0 OR X1) AND (X2 OR X3)→Y10

Block 1 Block 2

WUME-FPXHPGRG-021 2-25
2.11 ANS (And Stack)

■ When blocks are consecutive


When blocks are consecutive, consider a block division as follows.

Block 5 X0 X2 X4 Y10
(1) (2)
Block 4

X1 X3 X5

Block 1 Block 3
Block 2
Block 1 Block 2

ST X 0
Block 5

Block 4

OR X 1
ST X 2
OR X 3
ANS・・・・・・・・・・・・(1)
Block 3

ST X 4
OR X 5
ANS・・・・・・・・・・・・(2)
OT Y 10

2-26 WUME-FPXHPGRG-021
2.12 ORS (OR Stack)

2.12 ORS (OR Stack)

■ Instruction format

■ Outline of operation
● Serially connected blocks are connected in parallel.

Blocks stack in parallel


● The start of each block begins with an ST instruction.

■ Operation example
Operation of instruction format description program
When both X0 and X1 turn ON, or when both X2 and X3 turn ON, the result is output to Y10.

(X0 AND X1) OR (X2 AND X3)→Y10

Block 1 Block 2

WUME-FPXHPGRG-021 2-27
2.12 ORS (OR Stack)

■ When blocks are consecutive


When blocks are consecutive, consider a block division as follows.

X0 X1 Y10
Block 1
X2 X3 (1)
Block 2
X4 X5 (2)
Block 3

Block 4 Block 5

ST X 0
Block 1
AN X 1
Block 4 Block 2 ST X 2
AN X 3
Block 5 ORS (1)
ST X 4
Block 3
AN X 5
ORS (2)
OT Y 10

2-28 WUME-FPXHPGRG-021
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack)

2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack)

■ Instruction format

■ Outline of operation
These instructions can be used to store one operation result, read it, and perform multiple
processes on it.
Instruction Operation
The operation result immediately before the PSHS instruction is stored and operation continues
PSHS
from the next step.
The operation result stored by the PSHS instruction is read and operation continues from the
RDS
next step using this result.
The operation result stored by the PSHS instruction is read, operation continues from the next
POPS
step using this result, and the operation result stored by the PSHS instruction is cleared.

This instruction is used when there is branching from a single contact, followed by another
contact or contacts.

■ Operation example
Operation of instruction format description program
1) When X0 turns ON, the operation result is stored by thePSHSinstruction, and if X1 is ON, the
result is output to Y10.
2) The operation result is read by the RDS instruction, and if X2 is ON, the result is output to
Y11.
3) The operation result is read by the POPS instruction, output to Y12 if X3 is OFF, and the
operation result stored by the PSHS instruction is cleared.

WUME-FPXHPGRG-021 2-29
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack)

■ Programming precautions
● Use the RDS instruction when continuing to use the operation result, and use the POPS
instruction when finishing. (The POPS instruction must be included.)

● The RDS instruction may be used consecutively as many times as required.

2-30 WUME-FPXHPGRG-021
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack)

■ Precautions when using thePSHSinstruction consecutively


● The PSHS instruction is limited to a maximum of eight consecutive uses.
● Please note that the program will not run correctly if this limit is exceeded.

X0 X1 X2 X3 X4 X5 X6 Y10 ST X 0
PSHS…(1)
AN X 1
PSHS…(2)
(1) (2) (3) (4) (5) (6) AN X 2
PSHS…(3)
AN X 3
PSHS…(4)
Example of using 6 times in a row. AN X 4
PSHS…(5)
AN X 5
PSHS…(6)
AN X 6
OT Y 10

● If the POPS instruction is used when using the PSHS instruction consecutively, reading will
take place in order beginning from the last data stored by the PSHSinstruction.

WUME-FPXHPGRG-021 2-31
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack)

X0 X1 X2 X3 X4 X5 Y10 <Continues from


above program>
POPS…Reads (5)
X6 Y11
AN X 6
(1) (2) (3) (4) (5) OT Y 11
X7 Y12 POPS…Reads (4)

X8 Y13 AN X 7
OT Y 12
POPS…Reads (3)
X9 Y14

AN X 8
Y15 OT Y 13
XA

2-32 WUME-FPXHPGRG-021
2.14 DF, DF/ (Rise Differential,Fall Differential)

2.14 DF, DF/ (Rise Differential,Fall Differential)

■ Instruction format

■ Outline of operation
Instruction Operation
When an execution condition changes from OFF to ON (rise), outputs only that 1 scan (differential
DF
output).
When an execution condition changes from ON to OFF (fall), outputs only that 1 scan (differential
DF/
output).

● There is no limit to the number of times a differential instruction can be used.


● With a differential instruction, only the changes in the contact’s ON/OFF status are detected,
so if execution conditions are met (ON) from the start when switching into "RUN mode" or
when powering on in" RUN mode" , there will be no output.

<Example> Rise differential

X0

Y10

No output
Rising edge

RUN

■ Operation example
Operation of instruction format description program
1. When X0 changes from OFF to ON (rise), only 1 scan is output to Y10.
2. When X1 changes from ON to OFF (fall), only 1 scan is output to Y11.

WUME-FPXHPGRG-021 2-33
2.14 DF, DF/ (Rise Differential,Fall Differential)

X0

X1

Y10
1 scan
Y11
1 scan

Rising edge Falling edge

■ Related instructions
● The DFI instruction can be used. Only the first 1 scan is executed.

■ Programming precautions
● For the circuit shown below, the operation is as follows.

(1) When X1 is OFF, Y10 remains OFF even if X0 rises.


(2) When X0 is ON, Y10 remains OFF even if X1 rises.
(3) When X1 is ON, if X0 rises, then Y10 turns ON for one scan.

● In the following program, the execution condition is ON from the beginning, so output cannot
be obtained.
R9013 only turns ON during the
first scan after RUN begins.
R9010 is a normally ON relay.

● In the following program, output can be obtained.

2-34 WUME-FPXHPGRG-021
2.14 DF, DF/ (Rise Differential,Fall Differential)

R9014 turns ON from the second


scan after RUN begins.

● Caution is required when using differential instructions in combination with instructions that
change the order of execution of instructions (1 to 6 below), such as the MC/MCE
instructions or the JP/LBL instructions.
1. MC to MCE instructions
2. JP to LBL instructions
3. LOOP to LBL instructions
4. CNDE instruction
5. Step ladder instructions
6. Subroutine instructions
● When a differential instruction is combined with an AND stack instruction or a pop stack
instruction, take care that the syntax is correct.
● For the circuit shown below, the operation is as follows.

<Time chart>

X0

X1

Y0

There is no output here


● To turn Y0 ON at the rise of either X0 or X1, program it as follows.

WUME-FPXHPGRG-021 2-35
2.14 DF, DF/ (Rise Differential,Fall Differential)

<Time chart>

■ Examples of applying differential instructions


● Using differential instructions makes it easy to create and adjust programs.
<Example of application to a self-holding circuit>
● Using a differential instruction allows longer input signals to be supported.

X0

X1

R0

Y10

Y10’
If there are no differential instructions
in the above ladder diagram
<Example of application to an alternating circuit>
● It can also be applied to alternating circuits that hold and release with a single signal.

2-36 WUME-FPXHPGRG-021
2.14 DF, DF/ (Rise Differential,Fall Differential)

<Example 1>

<Example 2>

WUME-FPXHPGRG-021 2-37
2.15 DFI [Rise Differential (initial execution type)]

2.15 DFI [Rise Differential (initial execution type)]

■ Instruction format

■ Outline of operation
Instruction Operation
When an execution condition changes from OFF to ON (rise), outputs only that one scan
DFI
(differential output).

● If the execution condition is met from before RUN starts, output (differential output) is
performed at the first scan.
● There is no limit on the number of times the DFI instruction can be used.
● If it is possible for execution conditions to be met when switching into "RUN mode" or when
powering on in "RUN mode", with the DF instruction, output cannot be obtained with the first
scan, so using the DFI instruction, blocks that were connected in series are connected in
parallel.

■ Operation example
Operation of instruction format description program
When X0 changes from OFF to ON (rise), only 1 scan is output to Y10.
● When execution condition is met after RUN starts

X0

Y10

1 scan

Rising edge
● When execution condition is met from the beginning

X0

Y10

1 scan

2-38 WUME-FPXHPGRG-021
2.15 DFI [Rise Differential (initial execution type)]

● Caution is required when using differential instructions in combination with instructions that
change the order of execution of instructions (1 to 6 below), such as the MC/MCE
instructions or the JP/LBL instructions.
1. MC to MCE instructions
2. JP to LBL instructions
3. LOOP to LBL instructions
4. CNDE instruction
5. Step ladder instructions
6. Subroutine instructions
● When a differential instruction is combined with an AND stack instruction or a pop stack
instruction, take care that the syntax is correct.

WUME-FPXHPGRG-021 2-39
2.16 SET, RST (Set, Reset)

2.16 SET, RST (Set, Reset)

■ Instruction format

■ Instruction list
Instru
Description
ction
SET Output coil
RST Output coil

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
SET ● ● ● ●
RST ● ● ● ●

■ Outline of operation
Instruction Operation
When the execution condition turns ON, the output turns ON and the state is held regardless of a
SET
change in the state of the execution condition.
When the execution condition turns ON, the output coil turns OFF and the OFF state is held
RST
regardless of a change in the state of the execution condition.

● The same output coil can be specified as many times as desired for the SET and RST
instruction output destinations. (Even if a total check is run, this is not handled as a syntax
error.)

■ Operation example
Operation of instruction format description program
1. When X0 turns ON, Y30 turns ON and is held in that state.
2. When X1 turns ON, Y30 turns OFF and is held in that state.

2-40 WUME-FPXHPGRG-021
2.16 SET, RST (Set, Reset)

■ Processing mechanisms when the SET and RST instructions are used
● The output content is overwritten with each step during processing of the operation.

e.g. Processing when X0, X1, and X2 are all turned ON

● I/O refresh is performed when an ED instruction is executed; therefore, the data actually
output is determined by the final operation result. In the above example, output occurs with
Y10 ON.
● To output a result while the operation is still in progress, use the partial I/O refresh instruction
(F143).

■ Precautions for programming


● The output destination of a SET instruction retains its state even during the operation of an
MC instruction.

WUME-FPXHPGRG-021 2-41
2.16 SET, RST (Set, Reset)

● The output destination of a SET instruction is reset when switching from "RUN" to "PROG.
mode" and when the power is turned OFF. (However, if an internal relay set as a hold type is
specified as the output destination, reset does not take place.)

■ SET and RST instructions used as a set with differential instructions


● Placing a DF differential instruction before the SET and RST instructions makes program
development and adjustment easier.
● This is particularly effective when the same output destination is used in several places in the
program.

2-42 WUME-FPXHPGRG-021
2.17 DSET/DRST (Direct Set/Direct Reset)

2.17 DSET/DRST (Direct Set/Direct Reset)

■ Instruction format

■ Instruction List
Instruct
Description
ion
DSET Output coil
DRST Output coil

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
DSET ● ●
DRST ● ●

■ Outline of operation
Instruction Operation
When the execution condition is ON, the specified output contact is turned ON, and ON is output
DSET
to external output. Regardless of execution condition status changes, the ON status is held.
When the execution condition is ON, the specified output contact is turned OFF, and OFF is output
DRST
to external output. Regardless of execution condition status changes, the OFF status is held.

● You can specify the same output coil for the DSET and DRST instruction output destination
as many times as required. Even if Total Check is implemented, it is not treated as a syntax
error.

■ Operation Example
Operation of instruction format description program
● When R0 turns ON, external output is turned ON and the ON status is maintained.
● When R1 turns ON, external output is turned OFF and the OFF status is maintained.

■ Precautions for programming


● If the contact is outside the permissible range, an operation error will result.
● Even if the MC instruction is in progress, the DSET instruction output destination holds that
status.
● The DSET instruction output destination will reset when "RUN MODE" switches to "PROG.
MODE" or when the device is powered OFF.

WUME-FPXHPGRG-021 2-43
2.17 DSET/DRST (Direct Set/Direct Reset)

■ Comparison of SET instructions and DSET instructions


● Compared to SET instructions, DSET instructions are capable of high-speed responses.
<SET instruction>
● Ladder diagram

● Timing chart
n-1 scan n scan n+1 scan

R0

Y0

SET Y0 execution
<DSET instruction>
● Ladder diagram

2-44 WUME-FPXHPGRG-021
2.17 DSET/DRST (Direct Set/Direct Reset)

● Timing chart
n-1 scan n scan n+1 scan

R0

Y0

DSET Y0 execution

■ Comparison of RST instructions and DRST instructions


● Compared to RST instructions, DRST instructions are capable of high-speed responses.
<RST instruction>
● Ladder diagram

● Timing chart
n-1 scan n scan n+1 scan

R0

Y0

RST Y0 execution
<DRST instruction>

WUME-FPXHPGRG-021 2-45
2.17 DSET/DRST (Direct Set/Direct Reset)

● Ladder diagram

● Timing chart
n-1 scan n scan n+1 scan

R0

Y0

DRST Y0 execution

2-46 WUME-FPXHPGRG-021
2.18 KP (Keep)

2.18 KP (Keep)

■ Instruction format

X0
Set input
KP

X1
Reset input R30

■ Instruction list
Instru
Description
ction
KP Output coil

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
KP ● ● ●

■ Outline of operation
● When the set input turns ON, output of the specified coil turns ON and is held in that state.
● When the reset input turns ON, the hold state is released.
● The output is held in an ON state until the reset input turns ON, regardless of the ON/OFF
state of the set input.
● If the set input and reset input turn ON simultaneously, the reset input takes priority. Serially
connected blocks are connected in parallel.

■ Operation example
Operation of instruction format description program
1) When X0 turns ON, output of the specified coil turns ON and is held in that state.
2) When X1 turns ON, the hold state is released.

X0

X1

R30

Set Reset Reset takes priority

WUME-FPXHPGRG-021 2-47
2.18 KP (Keep)

■ Precautions for programming


● The state of the output destination is held even during operation of the MC instruction.
● The output is reset when switching from"RUN mode"to"PROG. mode"and when the power is
turned OFF. (However, if an internal relay set as a hold type is specified as the output
destination, reset does not take place.)

2-48 WUME-FPXHPGRG-021
2.19 DKP (Direct Keep)

2.19 DKP (Direct Keep)

■ Instruction format

R0
Set input
DKP

R1
Reset input Y0

■ Instruction list
Instru
Description
ction
DKP Output coil

■ Devices that can be specified (indicated by ●)


Operands X Y R T C L Index modifier
DKP ●

■ Outline of operation
● When set input is ON, output from the specified coil is ON, and external output is also ON.
Additionally, this status is retained.
● When reset input is ON, output from the specified coil is OFF, and external output is also
OFF. Additionally, retention is canceled.
● During retention, regardless of set input ON/OFF status, output is retained until there is reset
input.
● If the set input and reset input turn ON simultaneously, the reset input takes priority.

■ Operation example
Operation of instruction format description program
● When R0 turns ON, external output is turned ON and the ON status is maintained.
● When R1 turns ON, external output is turned OFF and the OFF status is maintained.

■ Precautions for programming


● If the contact is outside the permissible range, an operation error will result.
● If the same output coil is specified, a syntax error (duplicate output) will occur.
● The state of the output destination is held even during operation of the MC instruction.
● When switching from "RUN mode" to "PROG. mode" and at power OFF, the output
destination is reset.

■ Comparison of KP instruction and DKP instruction


● The DKP instruction is capable of faster responsiveness than the KP instruction.
<KP instruction>

WUME-FPXHPGRG-021 2-49
2.19 DKP (Direct Keep)

● Ladder diagram

● Timing chart
n-1 scan n scan n+1 scan

R0

R1

Y0

KP Y0 execution
<DKP instruction>
● Ladder diagram

2-50 WUME-FPXHPGRG-021
2.19 DKP (Direct Keep)

● Timing chart
n-1 scan n scan n+1 scan

R0

R1

Y0

DKP Y0 execution

WUME-FPXHPGRG-021 2-51
2.20 NOP

2.20 NOP

■ Instruction format
1 NOP count
X0 X1 X2 Y10
NOP

■ Outline of operation
● This instruction has no effect on the operation results to that point. The same operation is
performed even without a NOP instruction.
● A NOP instruction can be used to make the program easier to read when checking or
correcting.
● Write a NOP instruction (overwrite the previous instruction) when you want to delete an
instruction without changing addresses.
● Insert a NOP instruction when you want to move the addresses of one part of a program
without changing the program.
● For example, this is a convenient means of breaking a long program into several blocks.

e.g.
To move the starting point of a program block from address 39 to address 40, insert a NOP
instruction at address 39.
Address Address
36 ST X0 36 ST X0
OR X1 OR X1
OT Y10 OT Y10
39 ST X2 39 NOP Insert NOP
40 AN X3 40 ST X2
41 OT R20 41 AN X3
42 ST R2 42 OT R20
43 DF 43 ST R2
44 ST X3 44 DF
45 ST X3

■ DeletingNOPinstructions
After creating a program, it is possible to delete all NOP instructions in a program by using the
programming tool.

2-52 WUME-FPXHPGRG-021
3 Basic Function Instructions
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer) .....3-2
3.2 F137 STMR (16-bit, 0.01 s On-delay Timer).......................................3-9
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer).......................................3-12
3.4 CT [Counter (Preset Subtraction Expression)]....................................3-16
3.5 F118 UDC (Up/Down Counter) ...........................................................3-23
3.6 SR (Shift Register) ..............................................................................3-26
3.7 F119 LRSR (Left/Right Shift Register) ................................................3-29
3.8 F182 FILTR (Time Literal Process) .....................................................3-32

WUME-FPXHPGRG-021 3-1
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer)

3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer)

■ Instruction format
Timer number
X0 Execution conditions Timer units

TML5 K300

T5 Set value R0

Timer no. 5 timer contact

■ Instruction list
Instru
Description
ction
n Timer set value

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

n ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The timer is a non-hold type that is reset when the power is turned off or when switching from
"RUN mode" to "PROG. mode". (If the operating state must be held, set system register No.
6. In that case, be sure to use a battery.)
● When the execution condition turns ON, the set time decrements until the elapsed value
becomes 0, at which point timer contact Tn (n is the timer contact number) turns ON.
● If the execution condition turns OFF during while the set time is decrementing, the operation
is interrupted and the elapsed value is reset (cleared to 0).
● The OT instruction can also be written immediately after a timer coil.

■ Setting the timer period


1. The timer set time is (timer unit) × (timer set value).
2. The timer set value [n] is set as a decimal constant in the range of K1 to K32767.
TML 0.001 to 32.767 seconds in units of 0.001 second
TMR 0.01 to 327.67 seconds in units of 0.01 second
TMX 0.1 to 3276.7 seconds in units of 0.1 second
TMY 1 to 32,767 seconds in units of 1 second

e.g. When K43 is set by TMX, the set time is 0.1 × 43 = 4.3 seconds.
When K500 is set by TMR, the set time is 0.01 × 500 = 5 seconds.

3-2 WUME-FPXHPGRG-021
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer)

■ Precautions for programming


● As subtraction operations are performed during operation, create the program so that it
operates once during one scan. If an operation is performed more than once during one scan
or cannot be performed even once due to an interrupt processing program or jump/loop
instruction, correct results cannot be obtained.
● When combining a timer instruction with an AND stack instruction or a POP stack instruction,
be careful that the programming is correct.

■ Timer operation mechanism


The following are examples of specifying a K constant as the set value. See below for the
operation when specifying the set value area number.
1. When the mode is switched to "RUN mode" or when the power is turned ON in "RUN
mode" , the timer set value is transferred to the set value area "SV" of the same number.

X0 (1) Transfer to SV area


TMX5 K30
SV5
T5 Y10 30

2. When the timer execution condition rises from OFF to ON, the timer set value is transferred
from the set value area "SV" to the elapsed value area "EV" of the same number.
(The same operation is performed when switching to "RUN mode" while the execution
condition is ON.)
3. For each scan, if the execution condition is ON, the timer decrements by the value in the
elapsed value area "EV" .

X0 (2) Transfer to EV area


TMX5 K30
SV5 EV5
30 30
T5 Y10
29
(3) Subtraction
operation 28
27

4. When the value of the elapsed value area "EV" becomes 0, the timer contact "T" of the
same number turns ON.

X0
TMX5 K30 SV5 EV5
30 0
(4) Subtraction
T5 Y10 operation end

WUME-FPXHPGRG-021 3-3
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer)

■ Examples of timer instruction application


<Timer series connection>
● Ladder diagram

● Timing chart

X0

T0

3 seconds
T1
2 seconds
Y10

Y11

<Timer parallel connection>


● Ladder diagram

3-4 WUME-FPXHPGRG-021
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer)

● Timing chart

X0

T0
3 seconds
T1
2 seconds
Y10

Y11

■ How to directly specify the set value area No. for the timer set value
● The set value area number can be specified directly as the set value [n].

The above program in which SV5 is specified as the set value operates as follows.
1. When execution condition X0 turns ON, the data transfer instruction (F0 MV) is executed
and SV5 is set to K30.
2. When execution condition X1 turns ON, the set value is set to 30 and the decrement
operation starts.
● Set the number of the set value area "SV" specified in [n] to be the same as the timer
number.

Timer number Setting value area no. [n]

TMX5 SV5

Set to the same number.

● Even if the value in the set value area "SV" is changed during the subtraction operation, the
subtraction operation will continue from the value before the change.
Timer operation starts with the changed value the next time the execution condition changes
from OFF to ON after the decrement operation is completed or interrupted.
● The set value area SV is normally a non-hold type that is reset when the power is turned off
or when switching from "RUN mode" to "PROG. mode" .

WUME-FPXHPGRG-021 3-5
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer)

If the SV value was changed while in RUN mode and that value is to be used as a set value
without being reset the next time the power supply is turned on or when switching from
"PROG. Mode" to "RUN mode" , set the value to a hold type by using system register no. 6.

■ Timer operation when the set value area number is directly specified
1. When the execution condition for a high-level instruction is ON, the value is set in the set
value area"SV".
The following diagram shows an example of using the F0 MV instruction.

X0
(1) Transfer to SV area
F0 MV K30 SV5
SV5
X1 30
TMX5 SV5

T5 Y10

2. When the timer execution condition rises from OFF to ON, the timer set value is transferred
from the set value area "SV" to the elapsed value area "EV" of the same number. (The
same operation is performed when switching to "RUN mode" while the execution condition
is ON.)
3. For each scan, if the execution condition is ON, the timer decrements by the value in the
elapsed value area "EV ".

X0 (2) Transfer to EV area


F0 MV K30 SV5
SV5 EV5
30 30
X1
TMX5 SV5 29
(3) Subtraction
operation 28
27
T5 Y10

4. When the value of the elapsed value area "EV" becomes 0, the timer contact "T" of the
same number turns ON.

X1
TMX5 SV5 SV5 EV5
30 0
T5 Y10 (4) Subtraction
operation end

■ Examples of applying direct specification of set value area numbers


Example 1) Changing set values based on specified conditions
The set value is K50 when X0 is ON and K30 when X1 is ON.

3-6 WUME-FPXHPGRG-021
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer)

● Ladder diagram

● Timing chart

X0

X1

X2

T5
5 seconds 3 seconds

SV5 K0 K50 K30 K50


Example 2) Setting a set value from external digital switches
The BCD data of the digital switches connected to X0 through XF is converted and becomes
the set value.
● Connection example

Control unit

0 7 9 4 Set counter value

WX0 digital switch

WUME-FPXHPGRG-021 3-7
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer)

● Ladder diagram

3-8 WUME-FPXHPGRG-021
3.2 F137 STMR (16-bit, 0.01 s On-delay Timer)

3.2 F137 STMR (16-bit, 0.01 s On-delay Timer)

■ Instruction format

■ Instruction list
Instru
Description
ction
S Area storing the setting value, or constant data
D Process value area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
Operates as an ON-delay timer in units of 0.01 seconds. When the internal relay is ON, the
setting time is subtracted, and the special internal relay R900D turns ON when the process
value [D] becomes 0. (It is OFF when the internal relay is OFF and during subtraction.)

■ Operation example
Operation of instruction format description program
The internal relay is executed, the auxiliary timer is activated, and when a time equal to the
value stored in [DT10] × 0.01 seconds has elapsed, R5 turns ON.
● When the internal relay is OFF, the process value area is cleared to 0. The relay in use for
the OT instruction turns OFF.
● When the time of the special internal relay R900D is up, it turns ON. It is also possible to use
R900D as a timer contact. (It is OFF when the internal relay is OFF and during subtraction.)

Operation is the same as the above example.

WUME-FPXHPGRG-021 3-9
3.2 F137 STMR (16-bit, 0.01 s On-delay Timer)

■ Setting the timer period


1. The timer period is 0.01 × [timer set value].
2. The timer set value is set with a K constant within the range of K1 to K32767.
"STMR" ranges from 0.01 to 327.67 seconds, in units of 0.01 second.
e.g. If the set value is K500, the set time is 0.01 × 500 = 5 seconds.

■ Precautions for programming


● Ensure that the specifications of the area storing the set value and the process value area do
not overlap with other timer/counter instructions or operation memory areas of high-level
instructions.
● As subtraction operations are performed during operation, create the program so that it
operates once during one scan.
(During interrupt processing programs or with jump/loop instructions, a correct result cannot
be obtained if there are multiple or no operations during one scan.)

■ How the auxiliary timer works


1. When the internal relay turns from OFF to ON, the set value specified by [S] is transferred
to the process value area [D].

R0 R5
DT10
F137 STMR DT10 DT20
K500 S

(1) Send to [D]


R900D
DT20
F0 MV DT30 DT40
K500

2. With each scan, if the internal relay is ON, the value of the process value area [D] is
subtracted.

R0 R5
DT20
F137 STMR DT10 DT20
K500
(2) Subtraction
operation
R900D 499
498
F0 MV DT30 DT40 497

3. If the value of the process value area [D] becomes 0, then the relay in use for the next OT
instruction turns ON. The special internal relay R900D also turns ON.

3-10 WUME-FPXHPGRG-021
3.2 F137 STMR (16-bit, 0.01 s On-delay Timer)

R0 R5
DT20
F137 STMR DT10 DT20
0

R900D
F0 MV DT30 DT40
(3) Subtraction
operation complete

■ Precautions when using R900D


When using multiple auxiliary timers with R900D, ensure that R900D is used on the line after
the auxiliary timer instruction.

<Example>

R0
(a) F137 STMR DT10 DT20

Pair
R900D Y10

R1
(b) F137 STMR DT30 DT40

Pair
R900D Y11

When the time is up for timer (a), activated by R0:ON, Y0 turns ON. When the time is up for
timer (b), activated by R1:ON, Y1 turns ON.
● A correct operation cannot be obtained if specified as shown below.

WUME-FPXHPGRG-021 3-11
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer)

3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer)

■ Instruction format

■ Instruction list
Instru
Description
ction
S Area storing the setting value, or constant data
D Process value area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ●

■ Outline of operation
● This instruction operates as a 32-bit addition expression ON-delay timer set in 0.01-second
units.
● When the internal relay turns ON, addition of the elapsed time is performed. When the
elapsed value [D, D+1] (32 bits) equals or exceeds the set value, the relays used by the OT
instruction described next in the program are turned ON.

■ Operation example
Operation of instruction format description program
The internal relay condition is established, the auxiliary timer becomes active, and when the
value stored in data registers DT10 and DT11 × 0.01 seconds has elapsed, R5 turns ON.
● When the internal relay is OFF, the process value area is cleared to 0. The relay in use for
the OT instruction turns OFF.
● When the time of the special internal relay R900D is up, it turns ON. It is also possible to use
R900D as a timer contact. (Turns OFF when the internal relay is OFF and during addition.)

Operation is the same as the above example.

3-12 WUME-FPXHPGRG-021
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer)

■ Setting the timer period


1. The timer period is 0.01 × [timer set value].
2. The timer set value is set as a K constant in the range of K1 to K2147483647.
0.01 to 21474836.47 seconds in units of 0.01 second.
Example) If the set value is K500, the set time is 0.01 × 500 = 5 seconds.

■ Precautions for programming


● Ensure that the specifications of the area storing the set value and the process value area do
not overlap with other timer/counter instructions or operation memory areas of high-level
instructions.
● Addition is performed when the operation is executed, so the program should be created so
the an operation is executed once per scan. (If an operation is performed more than once
during one scan or cannot be performed even once due to an interrupt processing program
or jump/loop instruction, correct results cannot be obtained.)

■ How the auxiliary timer works


1. When the internal relay changes from OFF to ON, 0s are transferred to the elapsed value
area [D, D+1].

R0 R5
F183 DSTM K500 DT5 0

(1) Send to [D, D+1]

R900D
DT5, DT6
F0 MV DT50 WR50
0

2. During each scan, if the internal relay is ON, the values in the elapsed value area of [D, D
+1] are added.

R0 R5
DT5, DT6
F183 DSTM K500 DT5
K500

(2) Additionoperation
R900D 0
1
F0 MV DT50 WR50 2

3. When the values in the elapsed value area [D, D+1] equal the values of [S, S+1], the relays
used by the OT instruction described next in the program are turned ON. The special
internal relay R900D also turns ON.

WUME-FPXHPGRG-021 3-13
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer)

R0 R5
DT5
F183 DSTM K500 DT5
K500

R900D
F0 MV DT50 WR50
(3) Addition
operation complete

Process value (D, D+1)

ON
R0
OFF
R5
(R900D)

■ Precautions when using R900D


When using multiple auxiliary timers with R900D, ensure that R900D is used on the line after
the auxiliary timer instruction.

<Example>

When the time is up for timer (a), activated by R0:ON, Y0 turns ON. When the time is up for
timer (b), activated by R1:ON, Y1 turns ON.
● A correct operation cannot be obtained if specified as shown below.

3-14 WUME-FPXHPGRG-021
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer)

WUME-FPXHPGRG-021 3-15
3.4 CT [Counter (Preset Subtraction Expression)]

3.4 CT [Counter (Preset Subtraction Expression)]

■ Instruction format

X0 Count number
Count input
CT100
Set value
X1
Reset input K10

n
C100 Y31

■ Instruction list
Instru
Description
ction
n Counter set value

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

n ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● All counters are subtraction preset counters.
● When the reset input falls from ON to OFF, the value of the set value area SV is preset in the
elapsed value area (EV).
● When the reset input is ON, the elapsed value is reset to 0.
● When the count input changes from OFF to ON, the set value is subtracted, and when the
elapsed value reaches 0, it is output to the counter contact Cn (n is the counter number).
● If the count input and reset input both turn ON at the same time, the reset input is given
priority.
● If the count input rises and the reset input falls at the same time, the count input is ignored
and preset is executed.
● An OT instruction can be entered immediately after a counter instruction.

■ Operation example
Operation of instruction format description program
1. If X0 is turned ON 10 times, C100 turns ON, and Y31 turns ON.
2. The elapsed value is reset when X1 turns ON.

3-16 WUME-FPXHPGRG-021
3.4 CT [Counter (Preset Subtraction Expression)]

X0

10 times
X1

C100

Y31

■ Setting the count value


The count value can be set to a decimal constant (K constant) in a setting range from K0 to
K32767.

■ Counter operation
The following are examples of specifying a K constant as the set value. For an explanation of
operations when a set value area number is specified, see"P.3-19". (This example shows a
case in which “100” is specified for the counter.)
1. When switched to "RUN mode" or when the power is turned ON in "RUN mode" , the
counter set value is transferred to the set value area "SV" with the same number.
2. When the reset input falls, the value in the set value area SV is preset in the elapsed value
area EV.

X0
CT100 (1) Send
(2) Preset
X1
K10 SV100 EV100
10 10
C100 Y10

3. Each time the count input X0 turns ON, the value in the elapsed value area "EV" is
subtracted.

X0
CT100 SV100 EV100
10 10
X1 9
(3) Subtraction
K10 operation
8
7
C100 Y10

WUME-FPXHPGRG-021 3-17
3.4 CT [Counter (Preset Subtraction Expression)]

4. When the value in the elapsed value area "EV" reaches zero, the counter contact "C" with
the same number turns ON.

X0
CT100 SV100 EV100
10 10
X1 (4) Subtraction
K10 operation end

C100 Y10

■ Precautions for programming


When combining a counter instruction with an AND stack instruction or POP stack instruction,
be careful that the programming is correct.

■ Cautions on detecting the count input


In a counter instruction, the subtraction takes place when the rise of the count input from OFF
to ON is detected.
● Counting is only performed at the rise, so even if the count input remains on, no further
counting will occur.
● In cases where the count input is initially ON, such as when the mode is switched to RUN or
when the power is turned on when in "RUN mode" , subtraction will not take place at the first
scan.
RUN
(Power ON)

Count input

Do not count Count

● Be aware that, if used with instructions that change the order of execution such as the MC to
MCE instructions or the JP to LBL instructions (see 1 to 6 below), the operation of
instructions may change depending on the timing of instruction execution and count input.
1. MC to MCE instructions
2. JP to LBL instructions
3. LOOP to LBL instructions
4. CNDE instruction
5. Step ladder instructions
6. Subroutine instructions

3-18 WUME-FPXHPGRG-021
3.4 CT [Counter (Preset Subtraction Expression)]

■ Related instructions
● Counter instructions also include an up/down counter instruction (F118 UDC).
● An increment instruction (F35+1) can be used to provide the same type of function.

■ Directly specifying a set value area number as a counter set value


The set value area number can be specified directly as the set value [n].

The program described above, which specifies SV100 for the set value, operates as follows.
1. When execution condition X0 is ON, the data transfer instruction (F0 MV) is executed and
K30 is set in SV100.
2. When the count input X1 turns ON, the subtraction operation begins from the set value of
30.
● Make the address of the set value area "SV" that specifies [n] the same as the counter
number.

Display:
Counter number
X1
CT100
Set to the
same number
X2
SV100

Setting value area no. [n]


● Even if the value in the set value area "SV" is changed during the subtraction operation, the
subtraction operation will continue from the value before the change. Counter operation from
the new value will not begin until the counter is reset and the count input subsequently
changes from OFF to ON.

■ Counter operation when a set value area number is directly specified


1. When the execution condition for a high-level instruction is ON, the value is set in the set
value area "SV" . The following diagram shows an example of using the F0 MV instruction.

WUME-FPXHPGRG-021 3-19
3.4 CT [Counter (Preset Subtraction Expression)]

X0
F0 MV K30 SV100
SV100
X1 30
CT100
(1) Transferto SV area
X2
SV100

C100 Y30

2. When the reset input falls, the value in the set value area "SV" is preset in the elapsed
value area "EV" .

X1
SV100 EV100
CT100
30 30
X2
(2) Preset
SV100

C100 Y30

3. Each time the count input X1 turns ON, the value in the elapsed value area "EV" is
subtracted.

X1
CT100 SV100 EV100
30 30
X2 29
(3) Subtraction
SV100 operation
28
27
C100 Y30

4. When the value in the elapsed value area "EV" reaches zero, the counter contact "C" with
the same number turns ON.

3-20 WUME-FPXHPGRG-021
3.4 CT [Counter (Preset Subtraction Expression)]

X1
CT100 SV100 EV100
30 0
X2 (4) Subtraction
SV100 operation end

C100 Y30

■ Examples of applying direct specification of set value area numbers


Example 1) Changing set values based on specified conditions
The set value is K50 when X0 is ON and K30 when X1 is ON.
● Ladder diagram

● Timing chart
Example when X0 turns ON.

WUME-FPXHPGRG-021 3-21
3.4 CT [Counter (Preset Subtraction Expression)]

X0

X1
50 times
X2

X3

C100

SV100 K0 K50
Example 2) Setting a set value from external digital switches
The BCD data of the digital switches connected to X0 through XF is converted and becomes
the set value.
● Connection example

Control unit

0 7 9 4 Set counter value

WX0
Digital switches
● Ladder diagram

3-22 WUME-FPXHPGRG-021
3.5 F118 UDC (Up/Down Counter)

3.5 F118 UDC (Up/Down Counter)

■ Instruction format

R0 Up/down input

F118 UDC

R1 Count input
(Preset value)
DT10
S
R2 Reset input
(Process value) DT0
D
Y50
DT0 = K0

■ Instruction list
Instru
Description
ction
S Area storing preset values, or constant data
D Up/down counter elapsed value area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ●

■ Outline of operation
● This is a counter that switches between incremental counting (addition) and decremental
counting (subtraction) depending on whether the relay specified by the up/down input is ON
or OFF.
● The count operation is incremental counting (+1) when the up/down input is ON, and
decremental counting (-1) when the up/down input is OFF. The elapsed value is stored in the
area specified by [D].
● When the reset input is switched from ON to OFF, the preset value of [S] is transferred to [D].
The count range is K–32,768 (H8000) to K32,767 (H7FFF).
● When the count input is changed from OFF to ON (with reset input in an OFF state), the
count operation is performed with the value set in [D] as the default value.
● When the reset input turns ON, the elapsed value area of [D] is cleared.
● The count result can be determined by comparing the elapsed value of [D] with the specified
setting value by using the data comparison instruction.
● Execute the data comparison instruction immediately after the F118 UDC instruction.

WUME-FPXHPGRG-021 3-23
3.5 F118 UDC (Up/Down Counter)

■ Operation example
Operation of instruction format description program
The program on the previous page is an example in which the default value is set, and external
output Y50 turns ON when target value is 0.
This can be used, for example, in programs such as those that cause an indicator lamp to light
when the work being added or subtracted reaches a certain quantity.
1. When reset input R2 switches from ON to OFF, the DT10 value is written to DT0. This value
is the target value.
2. If count input R1 is ON when R0 turns OFF, the DT0 value is decremented by 1
(decremental counting). If count input R1 is ON when R0 turns ON, the DT0 value is
incremented by 1 (incremental counting).
3. As a result of work being added or subtracted, the counter elapsed value area DT0 value is
compared with K0, and if DT0 is equal to K0, external output Y50 turns ON.
Preset

Reset

Elapsed time
0
ON
R2 OFF
ON
R0
OFF
ON
R1 OFF
ON
Y50
OFF

■ Precautions for programming


● If a hold type memory area is specified for the elapsed value area, the elapsed value acts in
accordance with the content being held.
● Be aware that the default value when starting operation is not automatically preset to the
elapsed value area. When performing preset, switch reset input from ON to OFF.
● When combining the F118 UDC instruction with an AND stack instruction or a POP stack
instruction, be careful that the programming is correct.

■ Cautions on detecting the count input


With the F118 UDC instruction, the increment or decrement occurs when the rise of the count
input from OFF to ON is detected.

3-24 WUME-FPXHPGRG-021
3.5 F118 UDC (Up/Down Counter)

● Counting is only performed at the rise, so even if the count input remains on, no further
counting will occur.
● When switching to RUN or when powering on in "RUN mode" , if the count input is ON from
the beginning, increment/decrement is not carried out for the first scan.
RUN
(Power ON)

Count input

Do not count Count

● Be aware that, if used with instructions that change the order of execution such as the MC to
MCE instructions or the JP to LBL instructions (see 1 to 6 below), the operation of
instructions may change depending on the timing of instruction execution and count input.
1. MC to MCE instructions
2. JP to LBL instructions
3. LOOP to LBL instructions
4. CNDE instruction
5. Step ladder instructions
6. Subroutine instructions

WUME-FPXHPGRG-021 3-25
3.6 SR (Shift Register)

3.6 SR (Shift Register)

■ Instruction format

X0
Data input
SR WR3
D
X1
Shift input

X2
Reset input

■ Instruction list
Instru
Description
ction
D Specified register

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ●

■ Outline of operation
● An instruction that moves (shifts) the content of the specified register WR (16-bit unit) one bit
to the left.
1. When shift input turns ON (rises), the contents of WR is shifted one bit to the left
2. When shifting, the empty bit (least significant bit) is set to 1 if data input is ON or 0 if OFF.
When shift input turns ON, this instruction operates as shown in the figure below.

3-26 WUME-FPXHPGRG-021
3.6 SR (Shift Register)

3. When reset input is ON, the content of the specified register is cleared.

■ Operation example
Operation of instruction format description program
1. If X1 turns ON when X2 is in an OFF state, the content of WR3 (internal relays R30 to R3F)
is shifted one bit to the left.
2. The bit left empty by the left shift (R30) is set to 1 when X0 is ON and 0 when OFF.
3. When X2 turns ON, the content of WR3 is reset to 0.

■ Precautions for programming


● The SR instruction requires data input, shift input, and reset input.
● When reset input and shift input rise simultaneously, reset input is prioritized.

WUME-FPXHPGRG-021 3-27
3.6 SR (Shift Register)

Shift input

Reset input

Rn

Reset input has priority


● Note that when a hold type memory area is specified for the shift register, an automatic reset
is not performed when the power supply is turned ON.
● When combining a shift register instruction with an AND stack instruction or pop stack
instruction, make sure that the syntax is correct.

■ Precautions for shift input detection


The SR instruction performs a shift when an OFF to ON rise is detected.
● If the shift input remains continuously ON, a shift will only take place at the rise. No further
shifts will take place.
● In cases where the shift input is initially ON, such as when the mode is switched to RUN or
when the power is turned on when in"RUN mode", a shift will not take place at the first scan.
RUN
(Power ON)

Shift input

Do not shift Shift


● Be aware that, if used in combination with instructions (see below, 1. to 6.) that change the
order of execution of instructions such as the MC to MCE instructions or the JP to LBL
instructions, depending on the execution of the instruction and the shift input timing the
instruction operation changes.
1. MC to MCE instructions
2. JP to LBL instructions
3. LOOP to LBL instructions
4. CNDE instruction
5. Step ladder instructions
6. Subroutine instructions

■ Related instructions
In addition to this instruction, there is also a left/right shift register (F119 LRSR). The same type
of operation can be implemented using data shift instructions (F100 SHR to F113 WBSL) or
data rotate instructions (F120 ROR to F123 RCL).

3-28 WUME-FPXHPGRG-021
3.7 F119 LRSR (Left/Right Shift Register)

3.7 F119 LRSR (Left/Right Shift Register)

■ Instruction format

R0 Left/right shift input


(ON: Left, OFF: Right)
F119 LRSR

R1 Data input
DT0
D1
R2 Shift input
DT9
D2
R3 Reset input

■ Instruction list
Instru
Description
ction
D1 Starting number of area to be shifted
D2 End number of area to be shifted

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ●

■ Outline of operation
● This shift register changes direction, either left (direction of most significant bit) or right
(direction of least significant bit), in which a shift of one bit is made based on the ON/OFF
status of the relay specified by the left/right shift input.
● The shift operation is made to the left when the left/right shift input is ON, and to the right
when OFF.
● Specify the same type of area for both [D1] and [D2]. Additionally, specify values so that [D1]
is equal to or less than [D2].
● The following operation is performed.
1. When the shift input changes from OFF to ON (the reset input is OFF), the contents of
the area specified by [D1] and [D2] are shifted one bit to the left or right.
2. When the data is shifted, 1 will be set in the empty bit left by the shift (the most
significant bit or least significant bit) if the data input is ON, and 0 if the data input is OFF.

WUME-FPXHPGRG-021 3-29
3.7 F119 LRSR (Left/Right Shift Register)

Also, the bit extracted by the shift (the most significant bit for a shift to the left, and the
least significant bit for a shift to the right) will be set for the special internal relay R9009
(carry flag).
3. If the reset input is ON, the contents of the specified area are cleared to 0.

■ Operation example
Operation of instruction format description program

Left shift
DT9 DT0

15 0 ~
~~~ 15 0

CY
R0: ON
R2: OFF→ON

~~

15 0 15 0

To bit 0
R1: When ON: "1"
When OFF: "0"
Right shift
DT9 DT0

~~

15 0 15 0

CY
R0: OFF
R2: OFF→ON

~~

15 0 15 0

To bit 15
R1: When ON: "1"
When OFF: "0"
■ Precautions for shift input detection
In the F119 LRSR instruction, shift takes place when the OFF > ON rise of the shift input is
detected.
● If the shift input remains continuously ON, a shift will only take place at the rise. No further
shifts will take place.

3-30 WUME-FPXHPGRG-021
3.7 F119 LRSR (Left/Right Shift Register)

● In cases where the shift input is initially ON, such as when the mode is switched to RUN or
when the power is turned on when in "RUN mode" , a shift will not take place at the first
scan.
RUN
(Power ON)

Shift input

Do not shift Shift


● Be aware that, if used in combination with instructions (see below, 1. to 6.) that change the
order of execution of instructions such as the MC to MCE instructions or the JP to LBL
instructions, depending on the execution of the instruction and the shift input timing the
instruction operation changes.
1. MC to MCE instructions
2. JP to LBL instructions
3. LOOP to LBL instructions
4. CNDE instruction
5. Step ladder instructions
6. Subroutine instructions

■ Precautions for programming


When combining the F119 LRSR instruction with an AND stack instruction or POP stack
instruction, be careful that the programming is correct.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the [D1] address > [D2] address
(ER)
R9009
Turns ON when the bit extracted by the shift is "1"
(CY)

WUME-FPXHPGRG-021 3-31
3.8 F182 FILTR (Time Literal Process)

3.8 F182 FILTR (Time Literal Process)

■ Instruction format

■ Instruction list
Instru
Description
ction
S1 Area storing the 16-bit data that is filter processing target
S2 Area storing the filter processing target bits, or constant data
S3 Area storing the filter processing time, or constant data
D Area storing the filter processing result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
In the 16-bit data in the area specified by S1, for the bits specified by S2, 0 bits are directly
output and 1 bits (filter processing targets) are output after filter processing for the amount of
time (0 to 30000, ms units) specified by S3 and the result is output in bit units (the bit positions
are the same as for S1) to the area specified by D.

(Note 1) The bit positions of S1 and D correspond.

3-32 WUME-FPXHPGRG-021
3.8 F182 FILTR (Time Literal Process)

■ Precautions for programming


● When the execution condition rises, all input bits specified by S1 are directly output
unconditionally.
● It is possible that an error of up to one scan may occur in the filter processing time.

■ Example of program execution


The changes in the execution condition R0 and the values of X0 to XF when the state before
execution of this instruction (R0 = 0) is as follows are explained by using a time chart.
WX0 (Filter processing input data) = HA9BC
DT1 (Filter processing target bit) = H0001
DT2 (Filter processing time) = K500
WR10 (Filter processing result) = HFFFF
R0 (execution condition)
ON
OFF

X0
400ms 500ms 500ms
ON
OFF
500ms 200ms
R100

ON
OFF

X1-XF

ON
OFF

R101-R10F

ON
OFF

■ Flag operations
Name Description
R9007 When the area is exceeded in index modification
R9008
When the filter processing time specified by S3 is outside the range of K0 to K30000
(ER)

WUME-FPXHPGRG-021 3-33
(MEMO)

3-34 WUME-FPXHPGRG-021
4 Control Instructions
4.1 MC/MCE (Master Control Relay / Master Control Relay End) ............4-2
4.2 JP/LBL (Jump/Label) ..........................................................................4-7
4.3 LOOP, LBL (Loop, Label)....................................................................4-11
4.4 ED (End) .............................................................................................4-15
4.5 CNDE (Conditional End) .....................................................................4-16
4.6 EJECT.................................................................................................4-18

WUME-FPXHPGRG-021 4-1
4.1 MC/MCE (Master Control Relay / Master Control Relay End)

4.1 MC/MCE (Master Control Relay / Master Control Relay End)

■ Instruction format
Execution conditions Master control relay number
X0
( MC 1 )
X1 Y31

Master control area


Y31

X2 Y32

Y32
Master control relay number

( MCE 1)

■ Outline of operation
● Executes the program between the MC and MCE instructions when the execution condition
turns ON.
● When the execution condition is OFF, the state of each I/O relay is as follows.
OT instruction All OFF
KP instruction Holds the state
SET instruction Holds the state
RST instruction Holds the state
TM instruction Reset
CT instruction Holds the intermediate process
SR instruction Holds the intermediate process
Differential instruction Refer to the following
Other instructions Not executed

● Caution is required when using an instruction that is executed by detecting the rise of an
execution condition, such as a differential instruction (1 to 7 below).
1. DF (rise differential)
2. CT (counter) count input
3. F118 UDC (up-down counter) count input
4. SR (shift register) shift input
5. F119 LRSR (left and right shift register) shift input
6. NSTP (next step)
7. Differential execution type high-level instruction (instruction specified by P and a number)

4-2 WUME-FPXHPGRG-021
4.1 MC/MCE (Master Control Relay / Master Control Relay End)

■ Operation example
Operation of instruction format description program
1. Executes the process between the MC1 and MCE1 instructions while the execution
condition is ON.
2. If the execution condition is OFF, the process between the MC1 and MCE1 instructions is
not executed and output is turned OFF.

X0

X1

Y31

X2

Y32

■ Operation of differential instructions between MC and MCE


● Note that if a differential instruction is used between MC and MCE, the output will vary as
follows depending on the timing of the MC execution condition and the input of differential
instruction.

WUME-FPXHPGRG-021 4-3
4.1 MC/MCE (Master Control Relay / Master Control Relay End)

Timing chart 1

X0

X1

Y10

Timing chart 2

X0

X1

Y10

● Output will not be obtained if the same execution condition is specified for an MC instruction
and a differential instruction. If output is needed, enter the differential instruction outside of
the MC-MCE instruction sequence.

4-4 WUME-FPXHPGRG-021
4.1 MC/MCE (Master Control Relay / Master Control Relay End)

■ Precautions for programming


● A second MC-MCE instruction pair can be entered (nested) between an initial MC-MCE
instruction pair. (There is no limit to the number of nestings.)

WUME-FPXHPGRG-021 4-5
4.1 MC/MCE (Master Control Relay / Master Control Relay End)

● The program cannot be executed in the following cases.


1. Either MC or MCE is missing.
2. The order of MC and MCE is reversed.

3. There is duplicated use of the specified number.

X0
( MC 0 )
X1 Duplicates used
( MC 0 )
X2 Y10

(MCE 0 )

(MCE 0 )

4-6 WUME-FPXHPGRG-021
4.2 JP/LBL (Jump/Label)

4.2 JP/LBL (Jump/Label)

■ Instruction format

X1
( JP 1 )

Label number

( LBL 1 )
■ Outline of operation
● When the execution condition turns ON, the program jumps to the label (LBL instruction)
with the same number as the specified number.
● Program execution continues from the next instruction after the jump destination label.

■ Operation example
Operation of instruction format description program
When execution condition X1 turns ON, the program jumps to label 1.

X1: When ON
X1 Program
( JP 1 ) Not executed

Program

( LBL 1 )
Program

● The same label is used by the JP instruction and the LOOP instruction. Any instruction can
be used as the starting point for the jump destination.
● It is possible to use JP instructions with the same label number multiple times.

WUME-FPXHPGRG-021 4-7
4.2 JP/LBL (Jump/Label)

● 2 or more LBL instructions with the same number cannot be written in the same program.
● If the jump destination label is not programmed, a syntax error occurs.
● Caution is required when using an instruction that is executed by detecting the rise of an
execution condition, such as a differential instruction (1 to 7 below).
1. DF (rise differential)
2. CT (counter) count input
3. F118 UDC (up-down counter) count input
4. SR (shift register) shift input
5. F119 LRSR (left and right shift register) shift input
6. NSTP (next step)
7. Differential execution type high-level instruction (instruction specified by P and a number)

■ Precautions for programming


● If the label is written to an address before the JP instruction, be aware that there is a
possibility that the scan cannot be completed, and an operation bottleneck error will occur.
● JP and LBL instructions cannot be used in a step ladder area (the range from SSTP to
STPE).
● It is not possible to jump from a main program to a subprogram (a subroutine or interrupt
program after the ED instruction), from a subprogram to a main program, or from a
subprogram to another subprogram.

■ Operation of TM, CT, and SR instructions between JP and LBL instructions


● If the LBL instruction is at an address after the JP instruction, then processing of each
instruction when executing the JP instruction will be as follows.

( JP 1 ) When the
execution condition
turns ON, the
( LBL 1 ) program jumps.

(1) TM Clocking is not performed. If it is not executed once during a single scan, the correct time
instruction cannot be guaranteed.
(2) CT
Even if count input is ON, counting is not performed. The elapsed value is retained.
instruction

4-8 WUME-FPXHPGRG-021
4.2 JP/LBL (Jump/Label)

(3) SR Even if shift input is ON, no shift is performed. The contents of the specified register are
instruction retained.

● If the LBL instruction is at an address before the JP instruction, then processing of each
instruction when executing the JP instruction will be as follows.

( LBL1 ) Executes
repeatedly while
the execution
( JP1 ) condition is ON.

(1) TM
Multiple timings occur during a single scan, therefore the time cannot be guaranteed.
instruction
(2) CT If the state of the count input does not change during the scan, it will operate in the usual
instruction way.
(3) SR If the state of the shift input does not change during the scan, it will operate in the usual
instruction way.

■ Operation of a differential instruction between JP and LBL


● If a differential instruction is used between a JP and LBL instruction, be aware that the
obtained output will differ as shown below depending on the execution condition of the JP
and the input timing of the differential instruction.

Timing chart 1

X0

X1

Y10

WUME-FPXHPGRG-021 4-9
4.2 JP/LBL (Jump/Label)

Timing chart 2

X0

X1

Y10

● When the execution conditions for the JP instruction are the same as the execution
conditions for the differential instruction, the leading edge (or trailing edge) of the execution
condition for the differential instruction will not be detected. If differential output is required,
write the differential instruction outside of the area between the JP and LBL instructions.

X1
( JP 1 )
X1 Y11
( DF/ ) Not executed

( LBL 1 )

X1 Y11
( DF/ ) Written outside
X1
( JP 1 )

( LBL 1 )

4-10 WUME-FPXHPGRG-021
4.3 LOOP, LBL (Loop, Label)

4.3 LOOP, LBL (Loop, Label)

■ Instruction format

X0
F0 MV K5 DT0

Label number

( LBL 1 )

Label number Loop count


X1
LOOP 1 DT0

■ Instruction list
Instru
Description
ction
S Area storing number of loop operations

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ●

■ Outline of operation
● When the execution condition turns ON, 1 is subtracted from the content of [S] and if the
result does not equal 0, the operation jumps to the label (LBL instruction) with the same
number as the specified number.
● Program execution continues starting from the instruction of the label at the jump destination.
● The LOOP instruction is used to set the number of times to execute the program. When the
number of times (K constant) specified by [S] is reached, the operation does not jump even if
the execution condition is established.

WUME-FPXHPGRG-021 4-11
4.3 LOOP, LBL (Loop, Label)

X0
F0 MV K5 DT0

( LBL 1 )

X1
LOOP 1 DT0

If DT0=K5, then after 5 jumps, there


are no more jumps even if X1 is ON.
● If the memory area content specified by [S] is 0 from the start, the operation does not jump to
a label number, and the next processing is performed.
● The same label is used by the JP instruction and the LOOP instruction. A label can be used
as the jump destination for any instruction, as many times as required.

● Two or moreLBLinstructions with the same number cannot be written in the same program.
● If the jump destination label is not programmed, a syntax error occurs.

■ Operation of TM, CT, and SR instructions between LOOP and LBL instructions
● If the LBL instruction address is after that of the LOOP instruction, the TM, CT, and SR
instructions are processed as follows when the LOOP instruction is executed.
X0
LOOP 1 DT0
When the execution
condition turns ON,
the program jumps.
( LBL 1 )

(1) TM Clocking is not performed. If it is not executed once during a single scan, the correct time
instruction cannot be guaranteed.
(2) CT
Even if count input is ON, counting is not performed. The elapsed value is retained.
instruction
(3) SR Even if shift input is ON, no shift is performed. The contents of the specified register are
instruction retained.

4-12 WUME-FPXHPGRG-021
4.3 LOOP, LBL (Loop, Label)

● If the LBL instruction address is before that of the LOOP instruction, the TM, CT, and SR
instructions are processed as follows when the LOOP instruction is executed.

( LBL1 ) Executes
repeatedly while
X0 the execution
condition is ON.
LOOP 1 DT0

(1) TM
Multiple timings occur during a single scan, therefore the time cannot be guaranteed.
instruction
(2) CT If the state of the count input does not change during the scan, it will operate in the usual
instruction way.
(3) SR If the state of the shift input does not change during the scan, it will operate in the usual
instruction way.

■ Precautions for programming


● If the label is written to an address before the LOOP instruction, be aware of the following
points.
1. Ensure that the instruction for setting the loop count is written before LBL to LOOP. See
the "P.4-12" program.
2. Write each instruction repeatedly executed between LBL to LOOP so that they are
executed under the same conditions as the LOOP instruction.
3. During this repetition, it is possible that a single scan will exceed the operation bottleneck
monitoring time and an operation bottleneck error may occur.

Example 1: When X5 turns ON, two F0 MV instructions are repeated five times.

WUME-FPXHPGRG-021 4-13
4.3 LOOP, LBL (Loop, Label)

Example 2: The DT100 value is transferred to DT200 to DT219.

● The LOOP instruction and LBL instruction cannot be used in the step ladder area (SSTP to
STPE range).
● It is not possible to jump from a main program to a subprogram (a subroutine or interrupt
program after the ED instruction), from a subprogram to a main program, or from a
subprogram to another subprogram.
● Caution is required when using an instruction that is executed by detecting the rise of an
execution condition, such as a differential instruction (1 to 7 below).
1. DF (rise differential)
2. CT (counter) count input
3. F118 UDC (up-down counter) count input
4. SR (shift register) shift input
5. F119 LRSR (left and right shift register) shift input
6. NSTP (next step)
7. Differential execution type high-level instruction (instruction specified by P and a number)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the content of [S] is a negative value (the most significant bit is 1)
(ER)

4-14 WUME-FPXHPGRG-021
4.4 ED (End)

4.4 ED (End)
Indicates the end of a regular program area.

■ Instruction format

■ Outline of operation
● Write the ED instruction at the end of the regular program area.
Program area
Address
0

Normal program area

ED
Subroutine program

Interrupt program

● Program areas are divided into the regular program area (main program) and "subroutine"
and "interrupt program" areas (subprograms) using this instruction.
● Write subroutine programs and interrupt programs after the ED instruction.

WUME-FPXHPGRG-021 4-15
4.5 CNDE (Conditional End)

4.5 CNDE (Conditional End)

■ Instruction format

X0 X1 Y30

Y30

X3
Execution conditions
(CNDE )
R0 X2 Y31

■ Outline of operation
● Ends arithmetic processing of the program at the specified address.
● When the execution condition turns ON, arithmetic processing of the program ends, and
processing such as input and output is performed. When processing is complete, the
operation returns to the starting address.
● The processing timing can be adjusted by performing the processing only after the required
number of program scans are completed.
● The CNDE instruction is not available in a subprogram such as a subroutine or interrupt
program. Use in the main program area.
● The CNDE instruction can be described any number of times in the main program.
● Caution is required when using an instruction that is executed by detecting the rise of an
execution condition, such as a differential instruction (1 to 7 below).
1. DF (rise differential)
2. CT (counter) count input
3. F118 UDC (up-down counter) count input
4. SR (shift register) shift input
5. F119 LRSR (left and right shift register) shift input
6. NSTP (next step)
7. Differential execution type high-level instruction (instruction specified by P and a number)

4-16 WUME-FPXHPGRG-021
4.5 CNDE (Conditional End)

Program that executes


when "CNDE" executed
X0 X1 Y30

Y30

X3
( CNDE )
Program that is not executed
when "CNDE" executed

( ED )
Execution during
normal scan

WUME-FPXHPGRG-021 4-17
4.6 EJECT

4.6 EJECT

■ Instruction format

■ Outline of operation
● When printing out a program created using tool software, a page break occurs at the location
at which this instruction is inserted.
● As with NOP instructions, no processing is performed in the program.

■ Operation example
Operation of instruction format description program
When printing out a created program, insert an EJECT instruction in the address where you
would like a page break.
In the example above, a page break occurs at address 2.

4-18 WUME-FPXHPGRG-021
5 Step ladder Instructions
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear
Step, Step End).....................................................................................5-2
5.2 SCLR (Clear Multiple Processes) .......................................................5-17

WUME-FPXHPGRG-021 5-1
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

■ Instruction format

■ Outline of operation
● When the NSTL or NSTP instruction is executed, the process of the specified number
starting from the SSTP instruction is started and executed.
● The program from the SSTP instruction to the next SSTP or STPE instruction is considered
one process.

<Example>

Y10
SSTP 1

X1 Process 1
F0 MV DT0 DT100

Y20
SSTP 2

● These instructions make it easy to execute sequence control, selection branch control,
parallel branch merge control, and similar operations.
1. Sequence control
Only the necessary processes are switched and executed in order.

Process 1 Process 2 Process 3 Process 4

2. Selection branch control

5-2 WUME-FPXHPGRG-021
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

The processes are selected and executed according to conditions.

Process 2

Process 1 Process 4

Process 3

3. Parallel branch merge control


• Multiple processes are executed simultaneously.
• After each process is completed, the next process is executed.

Process 2

Process 1 Process 4

Process 3

■ Syntax of step ladder instruction


SSTP start step
● This instruction indicates the "start of process n". Be sure to write "SSTP n" at the beginning
of the process n program.

Y10
SSTP 1

Y20 Process 1
SSTP 2

Y50 Process 2
SSTP 5

● Process n is defined as being from one "SSTP n" instruction to the next SSTP or STPE
instruction.
● The same process number cannot be defined for more than one process.
● The OUT instruction can be connected directly from the bus bar immediately after the SSTP
instruction.
● The SSTP instruction cannot be used in a subprogram (subroutine or interrupt program).
● The area starting from the first SSTP instruction to the STPE instruction is referred to as the
"step ladder area". The programs in this area are all controlled as processes. Other areas
are referred to as "normal ladder areas".

WUME-FPXHPGRG-021 5-3
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

Y10 Normal
ladder area
SSTP 1

Yn Step ladder
SSTP n area

STPE
Normal
ladder area
● There is a special internal relay that turns ON for one scan only when a process on the step
ladder starts. (R9015: step ladder initial pulse relay.) This relay can be used to process only
one scan when starting a process, such as resetting a counter.
NSTL next step (every scan execution type), NSTP next step (differential execution type)
● When an NSTL n or NSTP n instruction is executed, process n specified by n is invoked.
● The execution condition of the next step instruction becomes the start condition of the
process.
X0
NSTP 1
X0: OFF→ ON

Y10 SSTP1: Start

SSTP 1

R0
NSTP 2 R0: ON

SSTP1: Clear
Y20 SSTP2: Start
SSTP 2

● Write the process that starts first in the next step instruction in the normal ladder area.
● A process can be started from the normal ladder area or from a process that is executing.
● However, when you start a process with a next step instruction from within a process, the
process that is executing and contains the next step instruction is automatically cleared and
the specified process starts.
Be aware that the outputs and other processes are actually turned off by the clear operation
during the next scan.
● The NSTP instruction is a differential execution type instruction, so it is executed for only one
time when the execution condition rises. Also, since it only detects if the execution condition
has changed between ON and OFF, the instruction is not executed when switching to "RUN
mode" or when the power is turned ON while in "RUN mode" and the execution condition is
already ON.

5-4 WUME-FPXHPGRG-021
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

RUN
(Power ON)

Shift input

Not executing Executing

Executing Executing

● Be aware that, if the NSTP instruction is used with instructions that change the order of
execution such as the MC to MCE instructions or the JP to LBL instructions (see 1 to 6
below), the operation of instructions may change depending on the instruction execution and
execution condition timing.
1. MC to MCE instructions
2. JP to LBL instructions
3. LOOP to LBL instructions
4. CNDE instruction
5. Step ladder instructions
6. Subroutine instructions
● When combining the NSTP instruction with an AND stack instruction or a POP stack
instruction, be careful that the programming is correct.
CSTP clear step
When a CSTPn instruction is executed, process n specified by n is cleared. This instruction can
be used to clear the final process or to clear the processes executing in parallel during parallel
branch merge control.

<Example>
X0
NSTP99 X1: ON
X1 ↓
Process 99: Clear
CSTP99

Y990
SSTP99
Process 99
STPE

● A process can be cleared from the normal ladder area or from a process that is already
started.
You can use the SCLR (block clear) instruction to clear multiple processes at once by
specifying a range.
STPE step end

WUME-FPXHPGRG-021 5-5
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

Indicates the "end of the step ladder area". Be sure to write this instruction at the end of the
final process. This makes the final process from SSTP to STPE.
Normal
Y10 ladder area
SSTP1

Step ladder
Yn area
SSTPn
Process n

STPE
Normal
ladder area

(Note 1) In this case, process n is the final process.


● The STPE instruction can only be written once, in the main program. (It cannot be written in
subprograms such as subroutine programs and interrupt programs.)

■ Precautions for programming


● Processes do not need to be written in numerical order.
● In the step ladder area, you cannot use the following instructions:
1. Jump instructions (JP and LBL)
2. Loop instructions (LOOP and LBL)
3. Master control instructions (MC and MCE)
4. Subroutine instructions (SUB and RET) (*)
5. Interrupt instructions (INT and IRET)
6. ED instruction
7. CNDE instruction
(Note): The CALL instruction can be used within the step ladder area.
● To clear all processes at once, use the master control relay in the program as follows.

e.g. All processes are cleared when X0 turns ON


X0
(MC0 )
Y10
SSTP 1
Master control
Step ladder area

Y20
SSTP 2
Y30
SSTP 3

STPE

(MCE0 )

(ED )

5-6 WUME-FPXHPGRG-021
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

● Processes do not need to be started in numerical order. You can execute multiple processes
simultaneously.
● When the output in a process that has not been started is forcibly turned ON or OFF, even if
the forced ON/OFF operation is canceled, the output state will be held until the process
starts.

■ Step ladder operations


● With step ladder operations, the program in the normal ladder area and the program in the
processes invoked by the next step instruction (NSTL or NSTP) are executed. The program
in processes that are not executing is ignored.

Execution
Normal ladder area Y10
SSTP 1

Not started process 1 Y20 Not executed


SSTP 2

Not started process 2 Y90 Execution


SSTP 9
Not started process 9 Not executed

STPE
Execution
Normal ladder area
(ED )

When only process 2 is executing as shown in the above figure, the program in the normal
ladder area and in process 2 is executed.
● When a process is started and while the first scan is being performed, the step initial pulse
relay (R9015) turns ON. It turns OFF for the second and subsequent scans. This relay can
be used to reset counters and shift registers.

■ Precautions for clearing a process


● If the next step instruction is executed in an active process, that process is automatically
cleared. However, the actual clear operation does not occur until the next scan. For this
reason, when a process transitions, two processes may be executing at the same time for
one scan. To prevent simultaneous execution of a set of outputs that should not be ON at the
same time, write an interlock into the program. (If there is a possibility of processes being
simultaneously ON because of hardware response delays, take measures in the hardware
processing to allow the response delay to be taken into account, even if the program
includes an interlock.)

WUME-FPXHPGRG-021 5-7
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

<Example>

● When a process is cleared, the operation of each instruction used in that process is as
follows.
OT instruction All OFF
KP instruction Holds the state
SET instruction Holds the state
RST instruction Holds the state
TM instruction Resets the elapsed value and timer contact output
CT instruction Holds the intermediate process
SR instruction Holds the intermediate process
Differential instruction Holds the state of the execution condition (Note 1)
Other instructions Not executed

(Note 1) This is the same operation as when the execution condition of the MC instruction turns OFF. Refer
to the explanation of the MC and MCE instructions.
● Caution is required when using an instruction that is executed by detecting the rise of an
execution condition, such as a differential instruction (1 to 7 below).
1. DF (rise differential)
2. CT (counter) count input
3. F118 UDC (up-down counter) count input
4. SR (shift register) shift input
5. F119 LRSR (left and right shift register) shift input
6. NSTP (next step)
7. Differential execution type high-level instruction (instruction specified by P and a number)

■ Examples of step ladder instructions


(1) Sequence control
This is a program that repeats the work in a certain process until it is completed, and then
moves to the next process.
● In the program, write the instruction to start the process to be executed next in each process.
When the start instruction is executed, the next process is started, and the process that had
been executing is cleared.

5-8 WUME-FPXHPGRG-021
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

● Processes do not need to be executed in numerical order. You can also program the start
instruction to invoke a previous process according to conditions.
[Program example]
1. When X10 turns ON, process 10 is executed.
2. When X11 turns ON, process 10 is cleared and process 11 is executed.
3. When X12 turns ON, process 11 is cleared and process 12 is executed.
4. When X14 turns ON, process 12 is cleared and step ladder operation finishes.
● Process flowchart

X10

Process 10 R50

X11

Process 11 R51

X12

Process 12 R52

X14

End

WUME-FPXHPGRG-021 5-9
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

● Program

X10
NSTP 10

R50
SSTP 10

X11
Process 10
NSTP 11

R51
SSTP 11

X12
NSTP 12 Process 11

R52
SSTP 12

Process 12
X14
CSTP 12

STPE

● Timing chart

ON
X10 OFF

X11

X12

X14

R50 Process 10 Start clear

R51 Process 11

R52 Process 12

5-10 WUME-FPXHPGRG-021
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

(2) Selection branch control of a process


This program selects and switches to the next process according to the actions and results of a
particular process. Each process loops until its work is completed.
● In the program, write the instruction to start the process to be executed next in each process.
The next process is selected and program execution is transferred according to the
execution conditions.
[Program example]
1. When X100 turns ON, process 100 is executed.
2. While process 100 is executing,
● when X101 turns ON, process 101 is executed.
● Or when X102 turns ON, process 102 is executed.
3.
● While process 101 is executing, when X103 turns ON, process 101 is cleared and
process 200 is executed.
● While process 102 is executing, when X104 turns ON, process 102 is cleared and
process 200 is executed.
4. When X200 turns ON, process 200 is cleared and step ladder operation finishes.
● Process flowchart

X100

Process 100 R150

X101 X102

Process 101 R151 Process 102 R152

X103 X104

Process 200 R153

X200

End

WUME-FPXHPGRG-021 5-11
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

● Program

● Timing chart
This is an example of when X101 turns ON.

5-12 WUME-FPXHPGRG-021
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

ON
X100 OFF

X101

X102

X103

X104

X200

R150 Process 100 Start clear

R151 Process 101

R152

R153 Process 200

(3) Parallel branch merge control of a process


This program starts multiple processes at the same time. When the work is completed in each
of the branched processes, they merge again before transferring execution to the next process.
● In the program, write multiple process transfer instructions for one execution condition in
succession in a process.
● To merge processes, include a flag indicating the state of the other processes in the transfer
condition for the next process. When they merge and execute the next process, clear all
uncleared processes at the same time.
[Program example]
1. When X0 turns ON, process 0 is executed.
2. When X10 turns ON, process 0 is cleared and process 10 and process 20 are executed
simultaneously (parallel branch).
3. When X11 turns ON, process 10 transitions to process 11.
4. With processes 11 and 20 executing, when X30 turns ON, execution transfers to process
30 (merge).
● Process 20 is cleared with the clear instruction.
● Process 11 is cleared and process 30 is executed.
5. When X31 turns ON, process 30 is cleared and process 0 is executed again.

WUME-FPXHPGRG-021 5-13
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

● Process flowchart

X0

Process 0 R20

X10

Process 10 R21 Process 20 R22

X11

Process 11 R23

X30

Process 30 R24

X31

5-14 WUME-FPXHPGRG-021
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

● Program

X0
NSTP 0

R20
SSTP 0

X10 Process 0
(NSTL 10)

NSTL 20

R21
SSTP 10

Process 10
X11
(NSTL 11)
R22
SSTP 20
R100

Process 20

R23
SSTP 11

X30 R100
NSTL 30
Process 11

CSTP 20

R24
SSTP 30

Process 30
X31
NSTL 0

STPE

WUME-FPXHPGRG-021 5-15
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)

● Timing chart

ON
X0 OFF

X10

X111

X30

X31

Start clear
R20 Process 0 Process 0

R21 Process 10

R22 Process 20

R23 Process 11

R24 Process 30

5-16 WUME-FPXHPGRG-021
5.2 SCLR (Clear Multiple Processes)

5.2 SCLR (Clear Multiple Processes)

■ Instruction format

■ Outline of operation
When the SCLR instruction is executed, all active processes from process n1 through process
n2 are cleared.

■ Operation example
Operation of instruction format description program
When input XF turns ON, active processes from 1 through 3 are cleared.

WUME-FPXHPGRG-021 5-17
5.2 SCLR (Clear Multiple Processes)

X0

Process 0

X1

Process 1 Process 2 Process 3

XF (block area)

End

■ Precautions for programming


● Specify values so that n1 is equal to or smaller than n2.
● The SCLR instruction can be executed from both normal ladder areas and active processes.

5-18 WUME-FPXHPGRG-021
6 Subroutine Instructions
6.1 CALL/SUB/RET (Subroutine Call, Subroutine Entry, Subroutine
Return) ..................................................................................................6-2

WUME-FPXHPGRG-021 6-1
6.1 CALL/SUB/RET (Subroutine Call, Subroutine Entry, Subroutine Return)

6.1 CALL/SUB/RET (Subroutine Call, Subroutine Entry, Subroutine


Return)

■ Instruction format
X0
( CALL 1 )
Subroutine
program number

( ED )

( SUB 1 )

Subroutine
Subroutine
program number

( RET )

■ Outline of operation
● When the execution condition turns ON, the CALL instruction is executed and the subroutine
program of the specified number starting from the SUB instruction is executed.
● When the RET instruction is executed, the program returns to the address following the
CALL instruction in the main program and execution of the main program continues.

X0 (1)
(CALL n)
(3)

( ED )
( SUB n )
Subroutine program n
(2)
( RET )

CALL nis executed in the order of (1) to (3).

■ Subroutine program syntax


● "Subroutine program n"is the program between the SUB n instruction and the RET
instruction. Always write a subroutine to an address after the ED instruction.
● The CALL n instruction can be described in the main program and any other subroutine
program, interrupt program, or step ladder. Additionally, a CALL instruction with the same
number can be repeated.
● Subroutines can be nested up to 5 layers deep.

6-2 WUME-FPXHPGRG-021
6.1 CALL/SUB/RET (Subroutine Call, Subroutine Entry, Subroutine Return)

SUB0 (Level 2)
CALL1 SUB1 (Level 3)
RET CALL2 SUB2 (Level 4)
RET CALL3 SUB3 (Level 5)
RET CALL4 SUB4
RET
Called from within subroutine RET

Example of 5 layer nesting

■ Precautions for programming


● A subroutine program cannot be described in an interrupt program.

( INT 1 )

( SUB 21)
Subroutine
(RET )

(IRET )
● An interrupt program cannot be described in a subroutine program.

( SUB 21)

( INT 0 )
Subroutine
Interrupt
program
( IRET )

( RET )
● Caution is required when using an instruction that is executed by detecting the rise of an
execution condition, such as a differential instruction (1 to 7 below), in a subroutine.
1. DF (rise differential)
2. CT (counter) count input
3. F118 UDC (up-down counter) count input
4. SR (shift register) shift input
5. F119 LRSR (left and right shift register) shift input
6. NSTP (next step)
7. Differential execution type high-level instruction (instruction specified by P and a number)

WUME-FPXHPGRG-021 6-3
6.1 CALL/SUB/RET (Subroutine Call, Subroutine Entry, Subroutine Return)

■ Operation when the execution condition of the CALL instruction turns OFF
When the execution condition of the CALL instruction turns OFF, the operation of that
subroutine is not performed (the same applies to calls in master control and step ladders). In
this case, the operation of each instruction used in the subroutine is as follows.
OT instruction Holds the state.
KP instruction Holds the state.
SET Holds the state.
instruction
RST Holds the state.
instruction
Clocking is not performed. Note that the time cannot be guaranteed if clocking is not performed
TM instruction
once during a scan.
CT instruction Holds the current progress.
SR instruction Holds the current progress.
Differential The same as when a differential instruction is used between MC and MCE.
instruction
Other Not executed.
instructions

■ Flag operations
Name Description
R9007
Turns ON when theCALLinstruction is executed in the 5th layer of a subroutine when 5-
R9008
layer nesting is being performed
(ER)

6-4 WUME-FPXHPGRG-021
7 Interrupt Instructions
7.1 INT/IRET (Interrupt / Interrupt Return) ................................................7-2
7.2 ICTL (Interrupt Control).......................................................................7-8
7.2.1 How to start the interrupt program when executing the high-speed
counter match ON / match OFF instruction ...................................... 7-15

WUME-FPXHPGRG-021 7-1
7.1 INT/IRET (Interrupt / Interrupt Return)

7.1 INT/IRET (Interrupt / Interrupt Return)

■ Instruction format

( ED )

( INT 0 )
Interrupt
program
number
( IRET )

■ Outline of operation
● When an interrupt is input, the interrupt program of the number specified is executed starting
from the INT instruction.
● When the interrupt program reaches the IRET instruction, the program returns to the address
where the interrupt occurred and the main program resumes.

X0 Interrupt
(1)
( DF ) ICTL S1 S2
(3)
Main program
(ED )
(INT n )
Interrupt program n
(2)
(IRET )

When an interrupt occurs, execution will occur in the order of (1) to (3).

■ Interrupt Program Syntax


● The interrupt program is the program between the INT n instruction and the IRET instruction.
The interrupt program must always be placed in an address after the ED instruction.
● The number of the interrupt program is determined by the type of interrupt.
Interrupt program number Interrupt input High-speed counter target value match
interrupt
INT0 X0 ch0
INT1 X1 ch1
INT2 X2 −
INT3 X3 ch2
INT4 X4 ch3
INT5 X5 −

7-2 WUME-FPXHPGRG-021
7.1 INT/IRET (Interrupt / Interrupt Return)

Interrupt program number Interrupt input High-speed counter target value match
interrupt
INT6 X6 −
INT7 X7 −
INT8 − −
INT9 − −
INT10 − −
INT11 − −
INT12 − −
INT13 − −
INT24 Periodic interrupt −

(Note 1) When using a high-speed counter target value match interrupt. program, the counting performance of
the high-speed counter may decrease upon initiation of the interrupt program.

■ Before inputting an interrupt program


1. Specify the contact to be used as the interrupt input.
Select the input contact to be used as the interrupt input and specify it in system register
No. 403.

● If the high-speed counter/pulse catch is set, that contact cannot be used as the interrupt
input.
● There is no need to specify the input contact for high-speed counter target value match
interrupts and periodic interrupts.
2. "Enable" execution of interrupt programs.
All interrupt programs are set to "execution disabled" as default. "Enable" interrupt
programs to be executed using the ICTL instruction.

■ Precautions when rewriting during RUN


If the program is rewritten in "RUN mode", all interrupt programs will be set to "execution
disabled", making it necessary to "enable" them after rewriting in RUN.
To automatically re-enable with a ladder program, use R9034 (rewrite during RUN completion
flag). R9034 is a special relay that is ON for only 1 scan after completion of a rewrite during
RUN.

■ Interrupt program execution


There are three types of interrupt.
1. Interrupt from the input contact
An interrupt occurs from the input specified in system register No. 403.
2. High-speed counter target value match interrupt
When executing a high-speed counter instruction, an interrupt occurs when the high-speed
counter elapsed value equals the set target value.
3. Periodic interrupt (INT24)
The interrupt occurs in fixed time intervals. The time interval is set with the ICTL instruction.

WUME-FPXHPGRG-021 7-3
7.1 INT/IRET (Interrupt / Interrupt Return)

● If the interrupt occurs, the interrupt program with the corresponding number is executed.

Execution Execution

Execution

INT input
● If interrupts are disabled, they will be executed when execution is enabled with the ICTL
instruction.

Execution

Execution

INT input

Enabled
● If an interrupt occurs during execution of another interrupt program, it will be executed after
the other program finishes.

Main program processing Execution

INT1 program processing Execution

INT2 program processing Execution

INT2 input

■ Precautions for programming


● A syntax error will occur if either the INT instruction or IRET instruction is missing.
● When an interrupt occurs, the operation memory corresponding to the interrupt input contact
is not I/O refreshed. Therefore, contacts other than the interrupt input contact, such as the
normally ON relay R9010, should be specified by the input conditions in the interrupt
program.

(INT 5 )
Specify R9010, etc. instead of X5.

X5
F0 MV K10 DT100

(IRET )
● A subroutine program cannot be used in an interrupt program.

7-4 WUME-FPXHPGRG-021
7.1 INT/IRET (Interrupt / Interrupt Return)

( INT 1 )

( SUB 11)
Subroutine
(RET )

(IRET )
● An interrupt program cannot be used in a subroutine program.

( SUB 11 )

( INT 0 )
Subroutine
Interrupt
program
( IRET )

( RET )
● Another interrupt program cannot be used in an interrupt program.

■ Control when multiple interrupts occur simultaneously


● When multiple interrupts occur simultaneously, the interrupt program with the smallest
number is executed first. The other interrupt programs are then placed into an execution
waiting state., After the first interrupt program is completed, the other programs will be
executed in order from the smallest number.

WUME-FPXHPGRG-021 7-5
7.1 INT/IRET (Interrupt / Interrupt Return)

Main program processing

INT1 program processing

INT2 program processing

INT3 program processing

INT1 input

INT2 input

INT3 input
● When multiple interrupts occur during execution of an interrupt program, they will be
executed in order from the smallest program number when the program has finished
execution.

e.g.

Main program processing

INT1 program processing

INT2 program processing

INT3 program processing

INT4 program processing

INT1 input

INT2 input

INT3 input

INT4 input

(Note 1) During execution of the INT3 program in the example above, INT1 will be executed before INT2,
even if interrupt INT2 occurs before INT1.

7-6 WUME-FPXHPGRG-021
7.1 INT/IRET (Interrupt / Interrupt Return)

■ Interrupt program execution waiting and clearing


● When multiple interrupts occur simultaneously or when a new interrupt occurs during
execution of another interrupt program, the interrupts of lower priority will enter an "execution
wait state". They will be executed in order when the other interrupt program finishes
execution.

e.g.

Main program processing

INT1 program processing

INT2 program processing

INT1 input

INT2 input

Wait for execution


● If placed in execution wait state, there is a time difference between the occurrence of the
interrupt and execution of the interrupt program. To avoid execution of these execution wait
state programs, clear them using the ICTL instruction. Cleared interrupt programs will not be
executed.

e.g.
ICTL execution (INT2 clear)

Main program processing

INT1 program processing

INT2 program processing


Clear
INT1 input

INT2 input
● Even when execution of interrupt programs is disabled with the ICTL instruction, if an
interrupt occurs it will enter an "execution wait state". Waiting interrupt programs will be
executed upon enabling execution with the ICTL instruction. As noted above, the interrupt
programs in an execution wait state can be cleared by using the ICTL instruction.

WUME-FPXHPGRG-021 7-7
7.2 ICTL (Interrupt Control)

7.2 ICTL (Interrupt Control)

■ Instruction format

■ Operands
Items Settings
S1 Area storing the control data, or constant data
S2 Area storing the control data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● When the ICTL instruction is executed, based on the content of [S1] and [S2], either (1)
enabling or disabling of the interrupt program is specified, or (2) clearing of the interrupt
program is specified.
● Perform differential execution using an instruction such as DF so that it is only executed once
when setting.
● Multiple ICTL instructions can be written consecutively for a single execution condition.
Always execute this instruction before executing an interrupt program to enable interruption.

■ Precautions when rewriting during RUN


● If a rewrite during RUN is performed while using an interrupt function, the interrupt function
will be disabled. It is necessary to re-enable execution of the interrupt program with an ICTL
instruction.

e.g. A periodic interrupt every 10 ms is set at the start of operation (re-enables


interrupt after rewriting during RUN.)
R9013
INT24executed
ICTL H2 K1
every10 ms
R9034

7-8 WUME-FPXHPGRG-021
7.2 ICTL (Interrupt Control)

■ Description examples
Example 1) Setting a periodic interrupt every 10 ms at the start of operation
R9013
INT24executed
ICTL H2 K1
every10 ms

(Note 1) R9013 (initial pulse relay) is a relay that turns ON in only the first scan after execution begins.

Example 2) Enabling INT0 to 3 when X0 rises


X0
EnableINT0
( DF ) ICTL H0 HF
to 3 when X0: ON

Example 3) Clearing interrupts other than INT0 when the INT0 program ends

( INT 0 ) Interrupts other


than INT0 are
R0
cleared when the
ICTL H100 H1 INT0 program ends

( IRET )

■ Specifying control data


[S1]: Specifies the type of interrupt and the function to be controlled
15 D (bits)

S1

Specifies the interrupt type


H00: INT0 to INT13
H02: INT24 (10 ms units)
H03: INT24 (0.5 ms units)
H04: INT24 (0.1 ms units)
Specifies the control function
H00: Execution enable/disable
H01: Interrupt clear

(1) When specifying enable/disable execution of INT0 to 7 [S1] = H0


(2) When specifying to clear interrupts for INT0 to 7 [S1] = H100
[S1] = H2 (10 ms units)
(3) Time interval setting for INT24 [S1] = H3 (0.5 ms units)
[S1] = H4 (0.1 ms units)

WUME-FPXHPGRG-021 7-9
7.2 ICTL (Interrupt Control)

■ Precautions for programming


Inputs that can actually be used as interrupt inputs. (Refer to the table below)
Interrupt program number Interrupt input
INT0 X0
INT1 X1
INT2 X2
INT3 X3
INT4 X4
INT5 X5
INT6 X6
INT7 X7
INT8 −
INT9 −
INT10 −
INT11 −
INT12 −
INT13 −
INT24 Periodic interrupt

[S2]: Specifies the control content


1. Specifying enable/disable execution of the interrupt program (when S1 = H0 or S1 = H1)
Set the control data to the bit corresponding to the interrupt program number you wish to
control.
● To enable execution, set the program number bit to "1"
● To disable execution, set the program number bit to "0"

e.g. Enabling interrupt program INT1 and INT2, and disabling INT0 and INT3 to
INT13
Bit 15 Bit 0

0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
13 12 11 10 9 8 7 6 5 4 3 2 1 0
(INT number)
2. Clear the interrupts (when S1 = H100)
Set the control data to the bit corresponding to the interrupt program number you wish to
control.
● Set the program number bits to be cleared to "0"
● Set the program number bits not to be cleared to "1"

7-10 WUME-FPXHPGRG-021
7.2 ICTL (Interrupt Control)

e.g. Clearing interrupt program INT0 to INT2, not clearing INT3 to IN13
Bit 15 Bit 0

0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0
13 12 11 10 9 8 7 6 5 4 3 2 1 0
(INT number)
3. Specifying a periodic interrupt (when S1 = H2)
Specify the setting value with a decimal.
Time interval = value of [S2] × 10 (ms)
Bit 15 Bit 0

K0 to K3000
● Time interval setting is K1 to K3000 (10 ms to 30 s)
● Disable INT24 is K0
4. Specify a periodic interrupt (when S1 = H3)
Time interval = value of [S2] × 0.5 (ms)
Bit 15 Bit 0

K0 to K3000
● Time interval setting is K1 to K3000 (0.5 ms to 1.5 s)
● Disable INT24 is K0

■ Example setting to enable interrupt program execution

Specifies enable/disable execution of interrupt programs corresponding to interrupts from a


[S1]: H0000
specified input contact or interrupts matching the target value
[S2]: H0021 Enable INT0 and INT5 (bits 0 and 5 are"1") and disable others

WUME-FPXHPGRG-021 7-11
7.2 ICTL (Interrupt Control)

Bit 15 Bit 0

S2: 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1
(INT number) 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Input contact
X0 (INT0)
X1 (INT1)
X2 (INT2)
X3 (INT3)
X4 (INT4)
X5 (INT5)
X6 (INT6)
X7 (INT7)
X8 (INT8)
X9 (INT9)
X10 (INT10)
X11 (INT11)
X12 (INT12)
X13 (INT13)
● Set the bits corresponding to the interrupts to be enabled to"1".

Description
If this ICTL instruction is executed, the No. 0 and No. 5 programs will be executed if the
corresponding interrupt occurs.

7-12 WUME-FPXHPGRG-021
7.2 ICTL (Interrupt Control)

ICTL execution (enable)

Main program Execution Execution

INT0 program Execution

INT5 program Execution

INT0 input Occurs

INT5 input Occurs

Disable/Enable Disabled Enabled

■ Example setting to clear interrupts

[S1]: H0100 Clears the interrupts from a specified input contact or interrupts matching the target value
[S2]: HFE Clears INT0 interrupt (bit 0 is"0"), others are not cleared

(Note 1) Refer to the"Enable/Disable"example regarding the correspondence between setting values and
interrupt input contacts.

Description
If in a state where an INT0 interrupt is occurring but the corresponding interrupt program is not
being executed, executing this ICTL instruction will clear the interrupt.

WUME-FPXHPGRG-021 7-13
7.2 ICTL (Interrupt Control)

ICTL execution (INT0 clear)

Main program Execution Execution

INT0 program

INT1 program Execution

Clear
INT0 input

INT1 input

Disable/Enable Disabled Enabled

(Note 1) As INT0 has been cleared, it will not be executed even after being enabled. INT1 has not been
cleared, so it will be executed after being enabled.

■ Example settings for periodic interrupt

[S1]: H0002 Specifies a periodic interrupt


Specifies the time interval of the periodic interrupt
[S2]: K1500
If K1500, the time interval is K1500 × 10 ms = 15000 ms (15 s)

Description
If this ICTL instruction is executed, a periodic interrupt will occur every 15 seconds and the
INT24 interrupt program will be executed.
ICTL execution (periodical interrupt)

Main program Execution Execution Execution

INT24 program

15 seconds 15 seconds

(Note 1) To stop the periodic interrupt, execute the following.

7-14 WUME-FPXHPGRG-021
7.2 ICTL (Interrupt Control)

7.2.1 How to start the interrupt program when executing the high-speed
counter match ON / match OFF instruction

1. Set the counter via the system register. (It is not necessary to set the external interrupt.)
2. Specify the interrupt program in the program.
The high-speed counters correspond to the interrupt programs as indicated in the table
below.
Interrupt program number High-speed counter target value match interrupt
INT0 ch0
INT1 ch1
INT2 −
INT3 ch2
INT4 ch3
INT5 −
INT6 −
INT7 −
INT8 −
INT9 −
INT10 −
INT11 −
INT12 −
INT13 −

3. Enable the setting via the ICTL instruction. Enable ICTL H0, H9 - - INT0 and INT3.
4. Start the match ON / match OFF instruction.
5. The program is executed when the conditions for match ON / match OFF are met.

● When using a high-speed counter target value match interrupt program, the counting
performance of the high-speed counter may decrease upon initiation of the interrupt program.

WUME-FPXHPGRG-021 7-15
(MEMO)

7-16 WUME-FPXHPGRG-021
8 Special Setting Instructions
8.1 SYS1 (Communication Condition Setting) ..........................................8-2
8.2 SYS1 (Password setting) ....................................................................8-8
8.3 SYS1 (Interrupt setting) ......................................................................8-10
8.4 SYS1 [PC (PLC) Link Time Setting]....................................................8-12
8.5 SYS1 (MEWTOCOL-COM response control) .....................................8-14
8.6 SYS1 (Change high-speed counter operation mode) .........................8-16
8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change] .......8-18

WUME-FPXHPGRG-021 8-1
8.1 SYS1 (Communication Condition Setting)

8.1 SYS1 (Communication Condition Setting)

■ Instruction format

(Note 1) In the example shown in the figure above, the transmission format and baud rate of the COM1 port are
set as below.
Character bit length: 8; Parity bit: Odd parity; Stop bit: 1
Baud rate: 19200 bps

■ Operands
Items Settings
S Character constant

■ Devices that can be specified (indicated by ●)


Constant Index
Operand modifier
WX WY WR WL SV EV DT LD I SWR SDT
s K H M (Note 1)

S ●

(Note 1) A character constant cannot be specified.

■ Outline of operation
● This instruction changes the communication conditions of the port specified as the first
keyword to the contents specified as the second keyword.
● The following functions can be changed.
• Transmission format
• Baud rate
• Unit number setting (direct / indirect)
• COM response control
• Header and terminator
• End time
• RS (Request to Send) control

■ Precautions on programming
● Enclose the first and second keywords in double quotation marks (”).
● Separate the first keyword and second keyword with a comma (,) without inserting a space.

8-2 WUME-FPXHPGRG-021
8.1 SYS1 (Communication Condition Setting)

● Insert space characters in front of the first keyword so that the total number of characters of
the first and second keywords is 12. (The number of space characters to be inserted in front
of the first keyword is 12 minus the total number of characters to be entered for the
keywords.)
For FPWIN-GR7 Ver.2.23 or later, if the character constant consists of less than 12
characters, space characters will be automatically input (to compensate for the shortage of
characters) when the project is converted.
Example: When entering COM1 as the first keyword and 19200 as the second keyword
Specified
“ ˽ ˽ C O M 1 , 1 9 2 0 0 ”
contents
No. of
1 2 3 4 5 6 7 8 9 10 11 12
characters

● Even if this instruction is executed, the contents of the system ROM in the main unit will not
be rewritten. Therefore, when the power is turned OFF and then ON, the contents of the
system ROM is rewritten with the contents of the system register specified in FPWIN GR7.
● We recommend that this instruction be executed as a differentiated instruction.
● Because the system register settings are changed, a verification error may occur when
verification is performed with FPWIN GR7.

■ Specifying the communication conditions (transmission format)


● Specify transmission format (data length, parity check, and stop bit).
First keyword Second keyword
Ports to be used Data length Parity check Stop bit
COM0: COM0 port B7: 7 bits PN: No parity S1: 1
COM1: COM1 port B8: 8 bits PO: Odd parity S2: 2
COM2: COM2 port PE: Even parity
TOOL: COM0 port

Setting examples
Exampl
S “˽COM0,B7PNS1”
e1
Settings Port: COM0 / Data length: 7 bits / Parity check: None / Stop bit: 1
Exampl
S “˽COM1,B8PES2”
e2
Settings Port: COM1 / Data length: 8 bits / Parity check: Even parity / Stop bit: 2
Exampl
S “˽COM2,B8POS1”
e3
Settings Port: COM2 / Data length: 8 bits / Parity check: Odd parity / Stop bit: 1

■ Specifying the communication conditions (baud rate)


● Specify a baud rate.
First keyword Second keyword
Ports to be used Baud rate
COM0: COM0 port 1200: 1200 bps 19200: 19200 bps 230400: 230400 bps
COM1: COM1 port 2400: 2400 bps 38400: 38400 bps

WUME-FPXHPGRG-021 8-3
8.1 SYS1 (Communication Condition Setting)

First keyword Second keyword


Ports to be used Baud rate
COM2: COM2 port 4800: 4800 bps 57600: 57600 bps
TOOL: COM0 port 9600: 9600 bps 115200: 115200 bps

(Note 1) If the baud rate is changed as below, communications passing through all COM ports will be reset.
Baud rates of all COM ports: 4800 bps or higher ↔ Baud rate of any of the COM ports: 2400 bps or
lower
(Note 2) If the baud rate of any of the COM ports is 2400 bps or lower, F-ROM access will slow down.
Example) F12(ICRD) instruction, P13(ICWT) instruction, etc.

Setting example
Exampl
S “˽˽COM0,19200”
e1
Settings Port: COM0 / 19200 bps
Exampl
S “˽˽˽COM1,1200”
e2
Settings Port: COM1 / 1200 bps
Exampl
S “˽COM2,115200”
e3
Settings Port: COM2 / 115200 bps

■ Specifying the communication conditions (unit number)


● Specify a unit number directly or indirectly.
First keyword Second keyword
Ports to be used Unit number (for direct Unit number (for indirect
specification) specification)
COM0: COM0 port No1 to No99: Unit numbers 1 to For a DT number that contains a
COM1: COM1 port 99 unit number, specify D followed by
a four-digit number, as below.
COM2: COM2 port
D0000 to D9999: DT0 to DT9999
TOOL: COM0 port

(Note 1) For direct specification of unit numbers, you can specify unit numbers 1 to 99. For indirect
specification of unit numbers, specify a DT number that contains a unit number.

Setting example
Exampl
S “˽˽˽˽COM0,No1”
e1
Settings (For direct specification of unit numbers) Port: COM0 / Unit number: No1
Exampl
S “˽˽˽COM1,No99”
e2
Settings (For direct specification of unit numbers) Port: COM1 / Unit number: No99
Exampl
S “COM0No,D0000”
e3
Settings (For indirect specification of unit numbers) Port: COM0 / Unit number: Value set in DT0

8-4 WUME-FPXHPGRG-021
8.1 SYS1 (Communication Condition Setting)

Exampl
S “COM2No,D0123”
e4
Settings (For indirect specification of unit numbers) Port: COM2 / Unit number: Value set in DT0123

■ Specifying the communication conditions (response time of COM port)


● Specify the response time of a COM port.
First keyword Second keyword
Ports to be used Response time
COM0: COM0 port WAIT0 to WAIT999 (n=0 to 999)
COM1: COM1 port [When the communication mode is computer link or MODBUS RTU]
COM2: COM2 port Set time = Scan time x n
TOOL: COM0 port [When the communication mode is PLC link]
Set time = n µs

Setting examples
Exampl
S “˽˽COM0,WAIT1”
e1
Port: COM0
Settings [When the communication mode computer link or MODBUS RTU] Scan time x 1
[When the communication mode is PLC link] 1 µs
Exampl
S “COM1,WAIT999”
e2
Port: COM1
Settings [When the communication mode is computer link or MODBUS RTU] Scan time x 999
[When the communication mode is PLC link] 999 µs

■ Specifying the communication conditions (header / terminator)


● Specify a header or terminator.
First keyword Second keyword
Ports to be used For header For terminator
COM0: COM0 port STX: With STX ETX: ETX
COM1: COM1 port NOSTX: Without STX CR: CR
COM2: COM2 port CRLF: CR + LF
TOOL: COM0 port NOTERM: No terminator
TIME: Enables end time
(Note 1)

(Note 1) The setting of TIME takes precedence over the settings of other terminators (EXT, CR, CRLF, and
NOTERM).

Setting example
Exampl
S “˽˽˽˽COM0,STX”
e1
Settings Port: COM0 / Header: With STX

WUME-FPXHPGRG-021 8-5
8.1 SYS1 (Communication Condition Setting)

Exampl
S “˽˽˽˽COM1,ETX”
e2
Settings Port: COM1 / Terminator: ETX
Exampl
S “˽˽˽˽˽COM1,CR”
e3
Settings Port: COM1 / Terminator: CR
Exampl
S “˽COM2,NOTERM”
e4
Settings Port: COM2 / Terminator: No terminator
Exampl
S “˽˽˽COM2,TIME”
e5
Settings Port: COM2 / Terminator: Enables end time

■ Specifying the communication conditions (end time)


● Specify an end time.
First keyword Second keyword
Ports to be used End time
COM0: COM0 port Specify an end time in 0.01 ms increments between 0.01 and 100 ms.
COM1: COM1 port T0 to T10000: 0.01ms to 100ms
COM2: COM2 port
TOOL: COM0 port

Setting examples
Exampl
S “˽˽˽˽˽COM0,T0”
e1
Settings Port: COM0 / End time: Transfer time for approx. 4 bytes of data
Exampl
S “˽˽˽COM1,T123”
e2
Settings Port: COM1 / End time: 1.23 ms
Exampl
S “˽COM2,T10000”
e3
Settings Port: COM2 / End time: 100 ms

■ Specifying the communication conditions (RS (Request to Send) control)


● RS control can be performed for 1-channel RS-232C type communication cassettes.
● RS control can only be set for the COM1 port.
First keyword Second keyword
Ports to be used RS (Request to Send) control
COM1: COM1 port RTS1: Disables communication (turns ON the RS terminal)
RTS0: Enables communication (turns OFF the RS terminal)

8-6 WUME-FPXHPGRG-021
8.1 SYS1 (Communication Condition Setting)

Setting example
Exampl
S “˽˽˽COM1,RTS1”
e1
Settings Port: COM1 / RS (Request to Send) control: Disables communication
Exampl
S “˽˽˽COM1,RTS0”
e2
Settings Port: COM1 / RS (Request to Send) control: Enables communication

■ Flag operations
Name Description
Set when non-keyword text or an out-of-range value is specified for the first and second
keywords.
Set when there is no comma between the first and second keywords.
Set if no communication cassette is mounted when COM1 or COM2 is specified.
Set if the baud rate or transmission format for COM1 is changed when COM1 is in PLC link
mode.
Set if the baud rate or transmission format is changed while the modem for the COM0, COM1,
R9007 or COM2 port is being initialized.
R9008 Set if the communication mode is set to any mode other than general-purpose communication
(ER) mode when a header or terminator is set.
Set if any communication cassette other than 1-channel RS-232C type communication
cassettes is mounted when RS control is performed.
Set if a unit number greater than the maximum unit number set in the system register is
specified when COM1 is in PLC link mode.
Set if the communication speed is changed as below while F-ROM is being accessed.
Baud rates of all COM ports: 4800 bps or higher
↔ Baud rate of any of the COM ports: 2400 bps or lower

WUME-FPXHPGRG-021 8-7
8.2 SYS1 (Password setting)

8.2 SYS1 (Password setting)

■ Instruction format
R0
( DF ) SYS1 " PASS,ABCD"

S
First keyword Second
keyword
R1
( DF ) SYS1 "PAS,abcdefgh"

S
First keyword Second keyword

■ Operands
Items Settings
S Character constant

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●

■ Outline of operation
The password specified for the controller is changed to the contents specified by the No. 2
keyword.

■ Operation example
Operation of instruction format description program
When R0 turns ON, the controller password is changed to "ABCD".

■ Specify keywords
● For a 4-digit password

● For an 8-digit password

If there are fewer than eight characters, spaces are automatically added at the end to make
eight characters.

8-8 WUME-FPXHPGRG-021
8.2 SYS1 (Password setting)

■ Precautions for programming


● When this instruction is executed, it takes approximately 100 ms to write to the built-in F-
ROM.
● If the specified password is the same as the password that has already been written, the
password is not written to the F-ROM.
● It is recommended to use differential execution for this instruction.
● Put (12 characters – number of input characters) spaces in front of Keyword 1 so that
Keyword 1 and Keyword 2 combined have 12 characters. In FPWIN GR7 Ver. 2.23 and later,
if the character constant does not reach 12 characters, spaces are automatically input when
the project is converted.

■ Flag operations
Name Description
Turns ON when a character other than a keyword is specified
R9007 Turns ON when there is no comma between Keyword 1 and Keyword 2
R9008 Turns ON when the keyword is specified in lower-case characters (for a 4-digit password)
(ER)
Turns ON when the data specified for the password specifies characters other than 0 to 9
and A to F, or the specified data consists of other than four digits (for a 4-digit password)

WUME-FPXHPGRG-021 8-9
8.3 SYS1 (Interrupt setting)

8.3 SYS1 (Interrupt setting)

■ Instruction format

■ Operands
Items Settings
S Character constant

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●

■ Outline of operation
The input specified by the No. 1 keyword is set as the interrupt input, and the input conditions
are changed to the contents specified by the No. 2 keyword.

■ Operation example
Operation of instruction format description program
When R0 turns ON, input X1 is set to the interrupt input that becomes valid at the rising edge.

■ Specify keywords

■ Precautions for programming


● Executing this instruction does not rewrite the contents of the system ROM of the main unit.
As a result, turning the power supply OFF and then ON again rewrites the contents of the
system registers specified by the programming tool software.
● It is recommended to use differential execution for this instruction.
● When UP or DOWN has been specified, the contents of the system registers change in
accordance with the specification, meaning a verification error may occur in some cases

8-10 WUME-FPXHPGRG-021
8.3 SYS1 (Interrupt setting)

when the program is verified. When BOTH has been specified, the contents of the system
registers do not change.
● Put (12 characters – number of input characters) spaces in front of Keyword 1 so that
Keyword 1 and Keyword 2 combined have 12 characters. In FPWIN GR7 Ver. 2.23 and later,
if the character constant does not reach 12 characters, spaces are automatically input when
the project is converted.

■ Flag operations
Name Description

R9007 Turns ON when a character other than a keyword is specified


R9008 Turns ON when there is no comma between Keyword 1 and Keyword 2
(ER) Turns ON when the keyword is specified in lower-case alphabet characters

WUME-FPXHPGRG-021 8-11
8.4 SYS1 [PC (PLC) Link Time Setting]

8.4 SYS1 [PC (PLC) Link Time Setting]

■ Instruction format

■ Operands
Items Settings
S Character constant

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●

■ Outline of operation
● Set the condition specified by Keyword 1 as the time specified by Keyword 2.
● The setting for the link entry waiting time is set if the transmission cycle time is shortened
when there are stations that have not joined the link (*).
*Stations that have not joined the link: stations that have not been connected between the
No. 1 station and the station with the largest number, or stations for which the power supply
has not been turned on
● The error detection time setting for the transmission assurance relay is set if the time
between the power supply being turned OFF at one station and the transmission assurance
relay from the powered-OFF station being turned OFF at a different station is to be
shortened.

■ Operation example
Operation of instruction format description program
During PC (PLC) link, when R9014 turns ON (at leading edge), the link entry waiting time and
error detection time for the transmission assurance relay are set as follows.
Link entry waiting time: 100 ms
Transmission assurance relay error detection time: 100 ms

■ Specify Keywords
1. Link entry waiting time

8-12 WUME-FPXHPGRG-021
8.4 SYS1 [PC (PLC) Link Time Setting]

2. Error detection time for transmission assurance relay

■ Precautions for programming


● The program should be placed at the beginning of all PLCs being linked, and the same
values should be set.
● This instruction should be specified with special internal relay R9014 as the differential
execution condition.
● Execution of this instruction does not affect the system register setting contents.
● Put a (12 characters – number of input characters) space in front of Keyword 1 so that
Keyword 1 and Keyword 2 combined have 12 characters. In FPWIN GR7 Ver. 2.23 and later,
if the character constant does not reach 12 characters, spaces are automatically input when
the project is converted.

■ Precautions when setting the link entry waiting time


● This should be set to be at least twice that of the largest scan time of each PLC to be linked.
● If set to a shorter value, there may be some PLCs that are not be able to join the link, even if
they are powered on.
● If there are any stations that have not joined the link, the settings should not be changed,
especially if there are no problems, even if the link transmission cycle time is longer as a
result. (The default value is 400 ms.)

■ Precautions when setting the error detection time for the transmission
assurance relay
● This should be set to be at least twice that of the largest transmission cycle time when all
PLCs are linked.
● If set to a shorter value, there is a possibility that the transmission assurance relay will
malfunction.
● The settings should not be changed, especially if there are no problems, even if the
transmission assurance relay detection time is longer as a result. (The default value is 6400
ms.)

■ Flag operations
Name Description
Turns ON when a character other than a keyword is specified
R9007
Turns ON when there is no comma between Keyword 1 and Keyword 2
R9008
Turns ON when the keyword is specified in lower-case alphabet characters
(ER)
Turns ON when a value outside the specified range is specified

WUME-FPXHPGRG-021 8-13
8.5 SYS1 (MEWTOCOL-COM response control)

8.5 SYS1 (MEWTOCOL-COM response control)

■ Instruction format
R0
( DF ) SYS1 " COM1,WAIT2"

S
First keyword Second keyword

■ Operands
Items Settings
S Character constant

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●

■ Outline of operation
● The MEWTOCOL−COM response time of the port specified by the No. 1 keyword is delayed
based on the contents specified by the No. 2 keyword.
● This instruction is used to delay the response time on the PLC side until a state is reached in
which commands can be sent by an external device and responses can be received from the
PLC.

Usage example:
When a commercial RS232C/RS485 converter is being used to carry out communication
between a computer and the PLC, this instruction is used to return the PLC response after
switching of the enable signal has been completed on the converter side.

Commercial
RS-232C/RS-485 converter

Command
External device
(PC)
Response

PLC PLC PLC

8-14 WUME-FPXHPGRG-021
8.5 SYS1 (MEWTOCOL-COM response control)

■ Specify keywords

● If the communication mode has been set to computer link mode or MODBUS RTU mode
Set time = scan time x n (n: 0 to 999)
● If the communication mode has been set to PC (PLC) link mode
Set time = n μs (n: 0 to 999)
● If n = 0, the delay time set by this instruction will be set to "None".

■ Precautions for programming


Because PC (PLC) links may become unstable, do not change settings unless absolutely
necessary.
● This instruction is valid only if the setting on the controller side has been set to computer link
mode or PC (PLC) link mode.
● Set all the PLCs to be linked to the same value so that execution occurs at the rise of R9014
at the beginning of the program.
● Executing this instruction does not change the settings in the system registers.
● If the settings are changed, set to approximately double or more.
● It is recommended to use differential execution for this instruction.
● When the power supply to the PLC turns OFF, the settings set by this instruction are cleared.
(The set value becomes 0.)
However, the settings will be retained if the mode is switched to "PROG. mode" after this
instruction has been executed.
● If a commercial RS232C/RS485 converter is being used in PC (PLC) link mode, this
instruction should be programmed in all of the connected stations (PLCs).
● Put (12 characters – number of input characters) spaces in front of Keyword 1 so that
Keyword 1 and Keyword 2 combined have 12 characters. In FPWIN GR7 Ver. 2.23 and later,
if the character constant does not reach 12 characters, spaces are automatically input when
the project is converted.

■ Flag operations
Name Description
Turns ON when a character other than a keyword is specified
R9007 Turns ON when there is no comma between Keyword 1 and Keyword 2
R9008 Turns ON when the keyword is specified in lower-case alphabet characters
(ER)
Turns ON when no communication cassette has been installed when COM1 or COM2 has
been set

WUME-FPXHPGRG-021 8-15
8.6 SYS1 (Change high-speed counter operation mode)

8.6 SYS1 (Change high-speed counter operation mode)

■ Instruction format

■ Operands
Items Settings
S Character constant

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●

■ Outline of operation
The high-speed counter operation mode specified by Keyword 1 is changed to the operation
mode specified by Keyword 2. It is possible to switch between addition input and subtraction
input.

■ Operation example
Operation of instruction format description program
When R0 turns ON, the operation mode of high-speed counter CH0 is set to addition mode.

■ Specify keywords
SYS1," HSC1, UP"

Specify high- speed counter


HSCn n:0, 1, 2, 3
UP: Specify addition input
DOWN: Specify subtraction input

■ Precautions for programming


● With this instruction, if the high-speed counter system register setting is neither addition input
nor subtraction input, an operation error is returned. Specify the system register setting to
addition or subtraction in advance. Also, when addition input is specified, even if addition
input is specified again, the setting remains addition input. This is the same when subtraction
input is specified.
● Executing this instruction does not rewrite the contents of the system ROM of the main unit.
As a result, turning the power supply OFF and then ON again rewrites the contents of the
system registers specified by the programming tool software.
● It is recommended to use differential execution for this instruction.

8-16 WUME-FPXHPGRG-021
8.6 SYS1 (Change high-speed counter operation mode)

● When UP or DOWN has been specified, the contents of the system registers change in
accordance with the specification, meaning a verification error may occur in some cases
when the program is verified. When BOTH has been specified, the contents of the system
registers do not change.
● Put (12 characters – number of input characters) spaces in front of Keyword 1 so that
Keyword 1 and Keyword 2 combined have 12 characters. In FPWIN GR7 Ver. 2.23 and later,
if the character constant does not reach 12 characters, spaces are automatically input when
the project is converted.

■ Flag operations
Name Description
Turns ON when a character other than a keyword is specified
R9007
Turns ON when there is no comma between Keyword 1 and Keyword 2
R9008
Turns ON when the keyword is specified in lower-case alphabet characters
(ER)
When the system register setting is something other than addition input or subtraction input

WUME-FPXHPGRG-021 8-17
8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change]

8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change]

■ Instruction format

■ Operands
Items Settings
S Starting number of area storing 16-bit data
D1 Starting number of the system register to be specified (K40 to K47, K50 to K57)
D2 Ending number of the system register to be specified (K40 to K47, K50 to K57)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●
D1 ●
D2 ●

■ Outline of operation
The contents of system registers No. 40 to 48 and No. 50 to 57 are changed to the contents of
the data register starting with [S].

■ System registers No. 40 to 48, No. 50 to 57


No. Name Sett values/range
PC 40 Range used by link relay 0 to 64 words
(PLC)
W0-0 41 Range used by link register 0 to 128 words
setting 42 Link relay transmission starting No. 0 to 63
43 Link relay transmission size 0 to 64 words
44 Link register transmission starting No. 0 to 127
45 Link register transmission size 0 to 127 words
46 PC (PLC) link switch flag 0: Standard, 1:
Reverse
47 MEWNET-W0 PC (PLC) link maximum station number 1 to 16
specification
48 PLC link baud rate 0: 115200 bps
1: 230400 bps
PC 50 Range used by link relay 0 to 64 words
(PLC)

8-18 WUME-FPXHPGRG-021
8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change]

No. Name Sett values/range


W0-1 51 Range used by link register 0 to 128 words
setting
52 Link relay transmission starting No. 64 to 127
53 Link relay transmission size 0 to 64 words
54 Link register transmission starting No. 128 to 255
55 Link register transmission size 0 to 127 words
57 MEWNET-W0 PC (PLC) link maximum station number 1 to 16
specification

■ Program example

Setting value of system


F0 MV K64 DT0 register 40

Setting value of system


F0 MV K128 DT1 register 41

Setting value of system


F0 MV K0 DT2 register 42

Setting value of system


F0 MV K10 DT3 register 43

Setting value of system


F0 MV K0 DT4 register 44

Setting value of system


F0 MV K10 DT5 register 45

Setting value of system


F0 MV K0 DT6 register 46

Setting value of system


F0 MV K5 DT7 register 47

Stored values from DT0


SYS2 DT0 K40 K47 to DT7 are set in system
registers 40 to 47

■ Precautions for programming


● Executing this instruction does not rewrite the contents of the system ROM of the main unit.
As a result, when the power supply is turned OFF and ON again, the contents of the system
registers set with the tool software are rewritten.
● Specify a value between K40 and K48 or between K50 and K57 for [D1] or [D2]. Ensure that
D1 is less than or equal to D2.
● Since the value of the system register is changed, a verification error may occur during
program verification.

WUME-FPXHPGRG-021 8-19
8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change]

■ Flag operations
Name Description
R9007 Turns ON when D1>D2
R9008
Turns ON when a set value is outside the specified range of a system register setting value
(ER)

8-20 WUME-FPXHPGRG-021
9 Compare Contact
Instructions
9.1 ST=, ST <>, ST>, ST>=, ST<, ST<= [16-bit Data Comparison
(Start)] ...................................................................................................9-2
9.2 AN=, AN<>, AN>, AN>=, AN<, AN<= [16-bit Data Comparison
(AND)] ...................................................................................................9-4
9.3 OR= OR <> OR > OR >= OR < OR <= [16-bit Data Comparison
(OR)] .....................................................................................................9-6
9.4 STD=, STD<>, STD>, STD>=, STD<, STD<= [32-bit Data
Comparison(start)] ................................................................................9-8
9.5 AND=, AND<>, AND>, AND>=, AND<, AND<= [32-bit Data
Comparison (AND)]...............................................................................9-10
9.6 ORD=, ORD<>, ORD>, ORD>=, ORD<, ORD<= [32-bit Data
Comparison (OR)] .................................................................................9-12
9.7 STF=, STF<>, STF>, STF>=, STF< and STF<= [Floating point real
number data comparison (start)] ...........................................................9-14
9.8 ANF=, ANF<>, ANF>, ANF>=, ANF<, ANF<= [Floating point real
number data comparison (AND)] ..........................................................9-16
9.9 ORF=, ORF<>, ORF>, ORF>=, ORF<, ORF<= [floating point real
number data comparison (OR)] ............................................................9-18

WUME-FPXHPGRG-021 9-1
9.1 ST=, ST <>, ST>, ST>=, ST<, ST<= [16-bit Data Comparison (Start)]

9.1 ST=, ST <>, ST>, ST>=, ST<, ST<= [16-bit Data Comparison (Start)]

■ Instruction format

■ Operands
Items Settings
S1 Comparison data 1: Number of area storing 16-bit data, or constant data
S2 Comparison data 2: Number of area storing 16-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The signed 16-bit data specified by [S1] is compared with the signed 16-bit data specified by
[S2].
● If the comparison results in one of the specified statuses (=, <, >, etc.), a logical operation is
initiated with the contacts operating as liaison contacts.
● Comparison results and operations relate as follows.
Comparison instruction Relationship between S1 and S2
S1 < S2 S1 = S2 S1 > S2
ST= OFF ON OFF
ST<> ON OFF ON
ST> OFF OFF ON
ST>= OFF ON ON
ST< ON OFF OFF
ST<= ON ON OFF

(Note 1) "<>" is displayed as "≠".


">=" is displayed as "≥".
"<=" is displayed as "≤".

9-2 WUME-FPXHPGRG-021
9.1 ST=, ST <>, ST>, ST>=, ST<, ST<= [16-bit Data Comparison (Start)]

■ Operation example
Operation of instruction format description program
Compares the value of data register DT0 with K50. If DT0 = K50, external output Y30 turns ON.
Compares the value of DT0 with K60. If DT0 ≥ K60, Y31 turns ON.
Value of DT0

60
50

10

X0 ON
OFF

Y30 ON
OFF

■ Precautions for use


● These instructions start from the bus bar.
● In the case of BCD data, etc., data is compared as a negative value if the most significant bit
is 1, so the comparison results may not be accurate. In cases such as this, compare after
converting the data to binary data by using an instruction such as F81 BIN.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 9-3
9.2 AN=, AN<>, AN>, AN>=, AN<, AN<= [16-bit Data Comparison (AND)]

9.2 AN=, AN<>, AN>, AN>=, AN<, AN<= [16-bit Data Comparison (AND)]

■ Instruction format

■ Operands
Items Settings
S1 Comparison data 1: Number of area storing 16-bit data, or constant data
S2 Comparison data 2: Number of area storing 16-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The signed 16-bit data specified by [S1] is compared with the signed 16-bit data specified by
[S2].
● If the comparison results in one of the specified statuses (=, <, >, etc.), the contacts are
connected in series as liaison contacts.
● Comparison results and operations relate as follows.
Comparison instruction Relationship between S1 and S2
S1 < S2 S1 = S2 S1 > S2
AN= OFF ON OFF
AN<> ON OFF ON
AN> OFF OFF ON
AN>= OFF ON ON
AN< ON OFF OFF
AN<= ON ON OFF

(Note 1) "<>" is displayed as "≠".


">=" is displayed as "≥".
"<=" is displayed as "≤".

9-4 WUME-FPXHPGRG-021
9.2 AN=, AN<>, AN>, AN>=, AN<, AN<= [16-bit Data Comparison (AND)]

■ Operation example
Operation of instruction format description program
When internal relay X0 turns ON, the value of DT0 and K60 are compared, and if DT0 is equal
to or greater than K60, the external output Y30 turns ON. If X0 is OFF or if DT0 is less than
K60, Y30 turns OFF.

60

10

ON
X0
OFF

Y30 ON
OFF

■ Precautions for use


● These instructions can be used consecutively.
● In the case of BCD data, etc., data is compared as a negative value if the most significant bit
is 1, so the comparison results may not be accurate. In cases such as this, compare after
converting the data to binary data by using an instruction such as F81 BIN.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 9-5
9.3 OR= OR <> OR > OR >= OR < OR <= [16-bit Data Comparison (OR)]

9.3 OR= OR <> OR > OR >= OR < OR <= [16-bit Data Comparison (OR)]

■ Instruction format

■ Operands
Items Settings
S1 Comparison data 1: Number of area storing 16-bit data, or constant data
S2 Comparison data 2: Number of area storing 16-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The signed 16-bit data specified by [S1] is compared with the signed 16-bit data specified by
[S2].
● When comparison results are the specified status (=, <, >, etc.), a parallel connection occurs
as the conductive contact.
● Comparison results and operations relate as follows.
Comparison instruction Relationship between S1 and S2
S1 < S2 S1 = S2 S1 > S2
OR= OFF ON OFF
OR<> ON OFF ON
OR> OFF OFF ON
OR>= OFF ON ON
OR< ON OFF OFF
OR<= ON ON OFF

(Note 1) "<>" is displayed as "≠".


">=" is displayed as "≥".
"<=" is displayed as "≤".

9-6 WUME-FPXHPGRG-021
9.3 OR= OR <> OR > OR >= OR < OR <= [16-bit Data Comparison (OR)]

■ Operation example
Operation of instruction format description program
When external input X0 turns ON, or the result of comparison between the value of DT0 and
K60 is DT0 ≥ K60, external output Y30 turns ON. If X0 is OFF and DT0 < K60, Y30 turns OFF.

60

10

ON
X0
OFF

Y30 ON
OFF

■ Precautions for use


● These instructions start from the bus bar.
● These instructions can be used consecutively.
● In the case of BCD data, etc., data is compared as a negative value if the most significant bit
is 1, so the comparison results may not be accurate. In cases such as this, compare after
converting the data to binary data by using an instruction such as F81 BIN.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 9-7
9.4 STD=, STD<>, STD>, STD>=, STD<, STD<= [32-bit Data
Comparison(start)]

9.4 STD=, STD<>, STD>, STD>=, STD<, STD<= [32-bit Data


Comparison(start)]

■ Instruction format

■ Operands
Items Settings
S1 Comparison data 1: Area number storing the 32-bit data, or constant data
S2 Comparison data 2: Area number storing the 32-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Compares the signed 32-bit data of the combined area of [S1] and [S1+1] with the signed 32-
bit data of the combined area of [S2] and [S2+1].
● If the comparison results in one of the specified statuses (=, <, >, etc.), a logical operation is
initiated with the contacts operating as liaison contacts.
● The relationship between comparison results and operation is the same as"9.1 ST=, ST <>,
ST>, ST>=, ST<, ST<= [16-bit Data Comparison (Start)]".
● Memory area is specified by the memory area number of the lower order hexadecimal part.

The data in the specified memory area and in


the following memory area are combined and
treated as 32
-bit data.
S1+1 S1
Comparison

S2+1 S2

9-8 WUME-FPXHPGRG-021
9.4 STD=, STD<>, STD>, STD>=, STD<, STD<= [32-bit Data
Comparison(start)]

■ Operation example
Operation of instruction format description program
The 32-bit value that is a combination of data registers DT0 and DT1 is compared with the 32-
bit value that is a combination of DT100 and DT101, and if (DT0, DT1) = (DT100, DT101),
external output Y30 turns ON. If (DT0, DT1) is greater than (DT100, DT101), Y31 turns ON.

■ Precautions for use


● These instructions start from the bus bar.
● In the case of BCD data, etc., data is compared as a negative value if the most significant bit
is 1, so the comparison results may not be accurate. In these instances, use the F83 DBIN
instruction or similar to convert to binary data before comparison.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 9-9
9.5 AND=, AND<>, AND>, AND>=, AND<, AND<= [32-bit Data Comparison
(AND)]

9.5 AND=, AND<>, AND>, AND>=, AND<, AND<= [32-bit Data


Comparison (AND)]

■ Instruction format

■ Operands
Items Settings
S1 Comparison data 1: Area number storing the 32-bit data, or constant data
S2 Comparison data 2: Area number storing the 32-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Compares the signed 32-bit data of the combined area of [S1] and [S1+1] with the signed 32-
bit data of the combined area of [S2] and [S2+1].
● If the comparison results in one of the specified statuses (=, <, >, etc.), the contacts are
connected in series as liaison contacts.
● The relationship between comparison results and operation is the same as"9.2 AN=, AN<>,
AN>, AN>=, AN<, AN<= [16-bit Data Comparison (AND)]".
● Memory area is specified by the memory area number of the lower order hexadecimal part.

The data in the specified memory area and in


the following memory area are combined and
treated as 32
-bit data.
S1+1 S1
Comparison

S2+1 S2

■ Operation example
Operation of instruction format description program
When the external input X0 is ON, and when the comparison result of the combined 32-bit
values of data registers DT0 and DT1 and the combined 32-bit values of DT100 and DT101 is

9-10 WUME-FPXHPGRG-021
9.5 AND=, AND<>, AND>, AND>=, AND<, AND<= [32-bit Data Comparison
(AND)]

(DT0, DT1) ≥ (DT100, DT101), the external output Y30 turns ON. If X0 is OFF or if (DT0, DT1)
is less than (D100, D101), Y30 turns OFF.

■ Precautions for use


● These instructions can be used consecutively.
● In the case of BCD data, etc., data is compared as a negative value if the most significant bit
is 1, so the comparison results may not be accurate. In these instances, use the F83 DBIN
instruction or similar to convert to binary data before comparison.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 9-11
9.6 ORD=, ORD<>, ORD>, ORD>=, ORD<, ORD<= [32-bit Data Comparison
(OR)]

9.6 ORD=, ORD<>, ORD>, ORD>=, ORD<, ORD<= [32-bit Data


Comparison (OR)]

■ Instruction format

■ Operands
Items Settings
S1 Comparison data 1: Area number storing the 32-bit data, or constant data
S2 Comparison data 2: Area number storing the 32-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● This compares signed 32-bit data for the combined [S1] and [S1+1] area with the signed 32-
bit data for the combined [S2] and [S2+1] area.
● When comparison results are the specified status (=, <, >, etc.), a parallel connection occurs
as the conductive contact.
● The relationship between comparison results and operation is the same as"9.3 OR= OR <>
OR > OR >= OR < OR <= [16-bit Data Comparison (OR)]".
● Memory area is specified by the memory area number of the lower order hexadecimal part.

The data in the specified memory area and in


the following memory area are combined and
treated as 32
-bit data.
S1+1 S1
Comparison

S2+1 S2

9-12 WUME-FPXHPGRG-021
9.6 ORD=, ORD<>, ORD>, ORD>=, ORD<, ORD<= [32-bit Data Comparison
(OR)]

■ Operation example
Operation of instruction format description program
When external input X0 turns ON, or when (DT0, DT1) ≥ (DT100, DT101) after a comparison
between the 32-bit value from combining data register DT0 and DT1 and the 32-bit value from
combining data register DT100 and DT101, then the external output Y30 is ON. If X0 is OFF
and (DT0, DT1) < (DT100, DT101), then Y30 turns OFF.

■ Precautions for use


● These instructions start from the bus bar.
● These instructions can be used consecutively.
● In the case of BCD data, etc., data is compared as a negative value if the most significant bit
is 1, so the comparison results may not be accurate. In these instances, use the F83 DBIN
instruction or similar to convert to binary data before comparison.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 9-13
9.7 STF=, STF<>, STF>, STF>=, STF< and STF<= [Floating point real
number data comparison (start)]

9.7 STF=, STF<>, STF>, STF>=, STF< and STF<= [Floating point real
number data comparison (start)]

■ Instruction format

■ Operands
Items Settings
S1 Area storing real number data, or real number data (comparison data 1) (two words)
S2 Area storing real number data, or real number data (comparison data 2) (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Compares the real number data in the area combining [S1] and [S1+1] with the real number
data in the area combining [S2] and [S2+1].
● If the comparison results in one of the specified statuses (=, <, >, etc.), a logical operation is
initiated with the contacts operating as liaison contacts.
● The relationship between comparison results and operation is the same as "9.1 ST=, ST <>,
ST>, ST>=, ST<, ST<= [16-bit Data Comparison (Start)]".
● Memory area is specified by the memory area number of the lower order hexadecimal part.

The data in the specified memory area and in


the following memory area are combined and
treated as single precision real number data.
S1+1 S1
Comparison

S2+1 S2

9-14 WUME-FPXHPGRG-021
9.7 STF=, STF<>, STF>, STF>=, STF< and STF<= [Floating point real
number data comparison (start)]

■ Operation example
Operation of instruction format description program
The real number that is a combination of data registers DT0 and DT1 is compared with the real
number that is a combination of data registers DT100 and DT101, and if (DT0, DT1) is equal to
(DT100, DT101), external output Y30 turns ON. If (DT0, DT1) is greater than (DT100, DT101),
Y31 turns ON.

■ Precautions for use


● These instructions start from the bus bar.
● If [S1] and [S2] are specified with an integer device, the operation occurs after the integer
data is internally converted to real numbers.
● If a K constant is specified for [S1] or [S2], the same processing is performed as when an
integer device is specified.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when non-real-number data is specified in [S1, S1+1] or [S2, S2+1]
(ER)

WUME-FPXHPGRG-021 9-15
9.8 ANF=, ANF<>, ANF>, ANF>=, ANF<, ANF<= [Floating point real number
data comparison (AND)]

9.8 ANF=, ANF<>, ANF>, ANF>=, ANF<, ANF<= [Floating point real
number data comparison (AND)]

■ Instruction format

■ Operands
Items Settings
S1 Area storing real number data, or real number data (comparison data 1) (two words)
S2 Area storing real number data, or real number data (comparison data 2) (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Compares the real number data in the area combining [S1] and [S1+1] with the real number
data in the area combining [S2] and [S2+1].
● If the comparison result is one of the specified statuses (=, >, <, etc.), the contacts are
connected in series as liaison contacts.
● The relationship between comparison results and operation is the same as "9.2 AN=, AN<>,
AN>, AN>=, AN<, AN<= [16-bit Data Comparison (AND)]".
● Memory area is specified by the memory area number of the lower order hexadecimal part.

The data in the specified memory area and in


the following memory area are combined and
treated as single precision real number data.
S1+1 S1
Comparison

S2+1 S2

■ Operation example
Operation of instruction format description program
When external input X0 turns ON, the real number that is a combination of data registers DT0
and DT1 is compared with the real number that is a combination of data registers DT100 and

9-16 WUME-FPXHPGRG-021
9.8 ANF=, ANF<>, ANF>, ANF>=, ANF<, ANF<= [Floating point real number
data comparison (AND)]

DT101, and if (DT0, DT1) is equal to or greater than (DT100, DT101), external output Y30 turns
ON. If X0 is OFF or if (DT0, DT1) is less than (D100, D101), Y30 turns OFF.

■ Precautions for use


● These instructions can be used consecutively.
● If [S1] and [S2] are specified with an integer device, the operation occurs after the integer
data is internally converted to real numbers.
● If a K constant is specified for [S1] or [S2], the same processing is performed as when an
integer device is specified.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when non-real-number data is specified in [S1, S1+1] or [S2, S2+1]
(ER)

WUME-FPXHPGRG-021 9-17
9.9 ORF=, ORF<>, ORF>, ORF>=, ORF<, ORF<= [floating point real number
data comparison (OR)]

9.9 ORF=, ORF<>, ORF>, ORF>=, ORF<, ORF<= [floating point real
number data comparison (OR)]

■ Instruction format

■ Operands
Items Settings
S1 Area storing real number data, or real number data (comparison data 1) (two words)
S2 Area storing real number data, or real number data (comparison data 2) (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Compares the real number data in the area combining [S1] and [S1+1] with the real number
data in the area combining [S2] and [S2+1].
● If the comparison result is in the specified status (=, >, <, …), it is connected in parallel as a
conducting contact.
● The relationship between comparison results and operation is the same as "9.3 OR= OR <>
OR > OR >= OR < OR <= [16-bit Data Comparison (OR)]".
● Memory area is specified by the memory area number of the lower order hexadecimal part.

The data in the specified memory area and in


the following memory area are combined and
treated as single precision real number data.
S1+1 S1
Comparison

S2+1 S2

9-18 WUME-FPXHPGRG-021
9.9 ORF=, ORF<>, ORF>, ORF>=, ORF<, ORF<= [floating point real number
data comparison (OR)]

■ Operation example
Operation of instruction format description program
If external input X0 is ON, or if the real number values of combined data registers DT0 and DT1
and the real number values of combined data registers DT100 and DT101 are compared and
(DT0, DT1) ≥ (DT100, DT101), then the external output Y30 turns ON. If X0 is OFF and (DT0,
DT1) < (DT100, DT101), then Y30 turns OFF.

■ Precautions for use


● This instruction starts from the bus bar.
● These instructions can be used consecutively.
● If [S1] and [S2] are specified with an integer device, the operation occurs after the integer
data is internally converted to real numbers.
● If a K constant is specified for [S1] or [S2], the same processing is performed as when an
integer device is specified.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when non-real-number data is specified in [S1, S1+1] or [S2, S2+1]
(ER)

WUME-FPXHPGRG-021 9-19
(MEMO)

9-20 WUME-FPXHPGRG-021
10 Transfer Instructions
10.1 F0 MV (16-bit Data Transfer) ............................................................10-2
10.2 F0 MV (10 µsec Ring Counter Read) ...............................................10-4
10.3 F1 DMV (32-bit Data Transfer) .........................................................10-5
10.4 F2 MV/ (16-bit Data Inversion and Transfer) ....................................10-7
10.5 F3 DMV/ (32-bit Data Inversion and Transfer)..................................10-9
10.6 F5 BTM (Bit Data Transfer)...............................................................10-11
10.7 F6 DGT (Digit Data Transfer)............................................................10-16
10.8 F7 MV2 (Two 16-bit Data Transfer to Single Area)...........................10-20
10.9 F8 DMV2 (32-bit 2 Data Transfer) ....................................................10-22
10.10 F10 BKMV (Data Block Transfer) ...................................................10-24
10.11 F11 COPY (16-bit Data Block Copy)...............................................10-27
10.12 F12 ICRD (F-ROM Read) ...............................................................10-29
10.13 P13 ICWT (F-ROM Write)...............................................................10-31
10.14 F15 XCH (16-bit Data Exchange) ...................................................10-33
10.15 F16 DXCH (32-bit Data Exchange).................................................10-35
10.16 F17 SWAP (Higher/Lower Byte Exchange) ....................................10-37
10.17 F18 BXCH (Block Exchange)..........................................................10-39
10.18 F190 MV3 (Three 16-bit Data Transfer to Single Area) ..................10-41
10.19 F191 DMV3 (32-Bit 3-Data Batch Transfer)....................................10-43

WUME-FPXHPGRG-021 10-1
10.1 F0 MV (16-bit Data Transfer)

10.1 F0 MV (16-bit Data Transfer)


Transfers the 16-bit data in the specified area number.

■ Instruction format

■ Operands
Items Settings
S Area storing the hexadecimal data or constant data
D Area where data is transferred to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data in the memory area specified by [S] is transferred to the memory area
specified by [D].

■ Operation example
Example 1: Instruction format and described program operation
● When the internal relay R0 turns ON, the content of data register DT10 is transferred to data
register DT20.
Example 2: Constant K30 is transferred to the timer 0 setting value area when internal
relay R1 turns ON

Example 3: The timer 0 elapsed value is transferred to data register DT0 when R2 turns
ON

10-2 WUME-FPXHPGRG-021
10.1 F0 MV (16-bit Data Transfer)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 10-3
10.2 F0 MV (10 µsec Ring Counter Read)

10.2 F0 MV (10 µsec Ring Counter Read)

■ Instruction format

■ Operands
Items Settings
D Area where data is transferred to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● When this instruction is executed, the 10 μsec ring counter (H0 to HFFFF) is read once, and
the read value is transferred to the memory area specified by [D]. At the same time, the
value stored in special data register DT90020 (10 μsec ring counter) is also updated.

■ Operation example
Operation of instruction format description program

DT20
DT21
(2) Transfer
DT22
DT23
(1) Get 10 µs ring counter
DT90019 2.5 ms ring counter
DT90020 10 µs ring counter read
(3) Update
DT90021 Not used
DT90022 Scan time register

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-4 WUME-FPXHPGRG-021
10.3 F1 DMV (32-bit Data Transfer)

10.3 F1 DMV (32-bit Data Transfer)


Transfers 32-bit data to the specified area number.

■ Instruction format

■ Operands
Items Settings
S Area storing 32-bit data, or constant data
D Area where data is transferred to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The 32-bit data in the memory area specified by [S] is transferred to the memory area specified
by [D].

■ Operation example
Operation of instruction format description program
When the internal relay R0 turns ON, the content of data register DT10 and DT11 is transferred
to data register DT20 and DT21.
● Specify a lower 16-bit memory area for the memory area.

Upper 16 bits Lower 16 bits


The 16 -bit content of DT10 is combined with the 16 -bit
content of DT11 and treated as 32 -bit data.

Content of DT11 Content of DT10

The 32 -bit data is split into higher and lower 16- bit data
and stored in DT20 and DT21 respectively.

To DT21 To DT20

WUME-FPXHPGRG-021 10-5
10.3 F1 DMV (32-bit Data Transfer)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-6 WUME-FPXHPGRG-021
10.4 F2 MV/ (16-bit Data Inversion and Transfer)

10.4 F2 MV/ (16-bit Data Inversion and Transfer)


Inverts and transfers 16-bit data at the specified area number.

■ Instruction format

■ Operands
Items Settings
S Area storing the hexadecimal data or constant data
D Area where data is transferred to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The 16-bit data in the area specified by [S] is logically inverted (0⇔1 inversion) and transferred
to the area specified by [D].

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the contents of data register DT11 are logically inverted and
transferred to data register DT20.

WUME-FPXHPGRG-021 10-7
10.4 F2 MV/ (16-bit Data Inversion and Transfer)

DT10 H 3F DT20 H 1111 [D]

DT11 H 5555 [S] DT21 H 23A

DT12 H 1234 DT22 H FFFF

R0:ON F2 execution

Invert and transfer


DT10 H 3F DT20 H AAAA [D]

DT11 H 5555 [S] DT21 H 23A

DT12 H 1234 DT22 H FFFF

DT11 = "0101 0101 0101 0101" (H5555)


↓Invert and transfer
DT20 = "1010 1010 1010 1010" (HAAAA)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-8 WUME-FPXHPGRG-021
10.5 F3 DMV/ (32-bit Data Inversion and Transfer)

10.5 F3 DMV/ (32-bit Data Inversion and Transfer)


Inverts the 32-bit data in the specified area number and transfers it.

■ Instruction format

■ Operands
Items Settings
S Area storing 32-bit data, or constant data
D Area where data is transferred to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The 32-bit data in the area specified by [S] is logically inverted (0⇔1 inversion) and transferred
to the area specified by [D].

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the contents of data registers DT11 and DT12 are logically
inverted and transferred to data registers DT20 and DT21.

WUME-FPXHPGRG-021 10-9
10.5 F3 DMV/ (32-bit Data Inversion and Transfer)

DT10 H 25AC DT20 H 1111 [D]

DT11 H 0 [S] DT21 H 34A

DT12 H FFFD DT22 H FFFF

R0:ON F3 execution

Invert and transfer


DT10 H 25AC DT20 H FFFF [D]

DT11 H 0 [S] DT21 H 2

DT12 H FFFD DT22 H FFFF

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-10 WUME-FPXHPGRG-021
10.6 F5 BTM (Bit Data Transfer)

10.6 F5 BTM (Bit Data Transfer)


Transfers 1-bit data in the specified 16-bit data to the specified bit.

■ Instruction format

■ Operands
Items Settings
S Area storing the hexadecimal data or constant data
n Area specifying the transfer method
D Data destination storage area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Transfers the content of one bit ("1"or"0") at any position in the 16-bit data of the area
specified by [S] to any bit of the memory area specified by [D]. The bit position is specified by
the value of [n].

■ Operation example
Operation of instruction format description program
● When internal relay R0 turns ON, the content of bit 4 of data register DT20 is transferred to
bit 12 of DT10.

WUME-FPXHPGRG-021 10-11
10.6 F5 BTM (Bit Data Transfer)

[Source]
Bits 15 12 8 7 0
DT20 1 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1

[Source]
Bits 15 12 8 7 0
DT10 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0

R0:ON F5 execution

Bits 15 12 7 0
DT10 0 0 0 1 0 1 0 0 1 1 0 1 0 0 1 0

■ About transfer method specification [n]


● Specify [n] as an H constant in the following format:

n=H
(1) Bit position in destination [D]
(Range: 0 to F)

(2) Transfer bit count


Specify 0.
(3) Bit position in source [S]
(Range: 0 to F)

Bit position specification of [S] and [D]


Bits
Positio 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
n
Set
value F E D C B A 9 8 7 6 5 4 3 2 1 0
(H)

For example, specify A to specify bit 10. When transferring bit 4 of [S] to bit 12 of [D], n = HC04.

■ Transferring multiple bits


● When the number of transfer bits is specified in n, the specified bits from the position
specified by [S] are transferred to the position whose start is specified by [D].
● Up to 16 bits can be transferred. Specify the number of transfer bits as a hexadecimal
number. The range is 0 to F (1 bit to 16 bits).
Number of transfer bits Setting (n)
1 bit H□0□
2-bit H□1□

10-12 WUME-FPXHPGRG-021
10.6 F5 BTM (Bit Data Transfer)

Number of transfer bits Setting (n)


3 bits H□2□
4-bit H□3□
5 bits H□4□
6 bits H□5□
7 bits H□6□
8 bits H□7□
9 bits H□8□
10 bits H□9□
11 bits H□A□
12 bits H□B□
13 bits H□C□
14 bits H□D□
15 bits H□E□
16 bits H□F□

Example 1: When transferring two bits (n = H□1□)


Transfer two bits from [S] bit 5 to [D] bit 10... n = HA15

Bits 15 12 11 8 7 4 3 0
[S] 0 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1

2 bits from bit 5


Bits 15 12 11 8 7 4 3 0
[D] 1 1 1 0 1 1 0 1 0 0 0 1 1 0 0 1

F5 execution

Bits 15 12 11 8 7 4 3 0
[D] 1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1

Transfer bits 5 to 6 of [S]


to bits 10 to 11 of [D]
● When 0 is specified for the number of transfer bits, the single specified bit is transferred.
● If the specified range is outside the area of [S], the contents of the part extending beyond the
area are set to 0 and transferred.

WUME-FPXHPGRG-021 10-13
10.6 F5 BTM (Bit Data Transfer)

Example 2: Transfer four bits from bit 14 of [S] to bit 2 of [D]... n = H23E

Bits 15 12 11 8 7 4 3 0
[S] 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0

4 bits starting from bit 14


Bits 15 12 11 8 7 4 3 0
[D] 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 1

F5 execution

Bits 15 12 11 8 7 4 3 0
[D] 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 1

Bits 14 to 15 of [S] are sent to bits 2 to 3 of [D].


0 is stored in bits 4 to 5 of [D].
● If the specified range is outside the area of [D], the part extending beyond the area will not
be transferred. Data is not written to the next address.

Example 3: Transfer six bits from bit 6 of [S] to bit 12 of [D]... n = HC56

Bits 15 12 11 8 7 4 3 0
[S] 0 0 0 0 0 1 0 1 1 1 0 1 1 1 1 1

6 bits from bit 6


Bits 15 12 11 8 7 4 3 0
[D] 0 0 0 0 1 0 0 1 1 1 1 1 0 0 1 1

F5 execution

Bits 15 12 11 8 7 4 3 0
[D] 0 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1

Among bits 6 to 11 of [S], bits 6 to 9 are sent to


bits 12 to 15 in [D]
(The content of bits 10 to 11 of [S] have no effect)

10-14 WUME-FPXHPGRG-021
10.6 F5 BTM (Bit Data Transfer)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 10-15
10.7 F6 DGT (Digit Data Transfer)

10.7 F6 DGT (Digit Data Transfer)


Transfers the specified 16-bit data in 4-bit (digit) units.

■ Instruction format

■ Operands
Items Settings
S Area storing the hexadecimal data or constant data
n Area specifying the transfer method
D Area where data is transferred to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The 16-bit data in the memory area specified by [S] is transferred to the memory area specified
by [D], according to the transfer method specified by [n].

10-16 WUME-FPXHPGRG-021
10.7 F6 DGT (Digit Data Transfer)

■ Operation example
Operation of instruction format description program

DT10
0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1
Among the DT10 data, only the
lower 4 bits are transferred

DT20
0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1

In this example, the content of the


higher 12 bits of DT20 do not change.

■ What is a digit?
● Digits are units of four bits used when handling data.
● With this instruction, 16-bit data is separated into four digits for convenience. Starting from
the lowest four bits, these digits are named digit 0, digit 1, digit 2, and digit 3.

16-bit data

0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1

3rd digit 2nd digit 1st digit 0th digit

■ About transfer method specification [n]


● For designating
(1) which digit to transfer to at the transfer destination;
(2) how many digits to transfer; and
(3) which digit to transfer from at the transfer source
with digit transfer.
● Specify [n] as an H constant in the following format:

WUME-FPXHPGRG-021 10-17
10.7 F6 DGT (Digit Data Transfer)

n=H

(1) To which digit in the destination


0: 0th digit
1: 1st digit
2: 2nd digit
3: 3rd digit

(2) How many digits


0: 1 digit (4 bits)
1: 2 digit (8 bits)
2: 3 digit (12 bits)
3: 4 digit (16 bits)

(3) From which digit in the sender


0: 0th digit
1: 1st digit
2: 2nd digit
3: 3rd digit

If (1) or (2) is 0, such as"H000"in the program example on the previous page, use the short
form"H0".

■ Examples of transfer methods


The following digit transfer patterns are possible based on the specification of [n]:
1. One digit is transferred to a parallel destination

Transferring from digit 1 to digit 1

3 2 1 0
S

Set n=H101.

D
2. One digit is transferred to a non-parallel destination

Transferring from digit 3 to digit 0

3 2 1 0
S
Set n=H3.
(H003)
D
3. Multiple digits are transferred to a parallel destination

10-18 WUME-FPXHPGRG-021
10.7 F6 DGT (Digit Data Transfer)

Transferring digits 2 and 3 to digits 2 and 3

3 2 1 0
S

Set n=H212.

D
4. Multiple digits are transferred to a non-parallel destination

Transferring digits 0 and 1 to digits 2 and 3

3 2 1 0
S

Set n=H210.

D
5. Four digits are transferred

3 2 1 0
S

Set n=H130.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 10-19
10.8 F7 MV2 (Two 16-bit Data Transfer to Single Area)

10.8 F7 MV2 (Two 16-bit Data Transfer to Single Area)


Two 16-bit data are transferred from the specified area number.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the hexadecimal data or constant data
S2 Area storing the hexadecimal data or constant data
D Starting address of the data transfer destination (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The two 16-bit data (two words) specified by [S1] and [S2] are transferred to the memory area
(two words) specified by [D].

■ Operation example
Operation of instruction format description program
When the execution condition R0 turns ON, the contents of data register DT10 is transferred to
DT30, and the contents of DT20 is transferred to DT31.

16 bits 16 bits
[S2] [S1]

Content of DT20 Content of DT10

[D]

To DT31 To DT30

10-20 WUME-FPXHPGRG-021
10.8 F7 MV2 (Two 16-bit Data Transfer to Single Area)

■ Related instructions
Use the F190 MV3 instruction to transfer three types of 16-bit data.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 10-21
10.9 F8 DMV2 (32-bit 2 Data Transfer)

10.9 F8 DMV2 (32-bit 2 Data Transfer)


Two 32-bit data are transferred from the specified area number.

■ Instruction format

■ Operands
Items Settings
S1 Area storing 32-bit data, or constant data
S2 Area storing 32-bit data, or constant data
D Starting address of the data transfer destination area (four words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The two 32-bit data (four words) specified in [S1] and [S2] are transferred to the memory
area (four words) specified in [D].
● The specification of [S1] and [S2] specifies the lower 16-bit memory area.
● The specification of [D] specifies the start of the 4 word memory area.

■ Operation example
Operation of instruction format description program

Upper 16 bits Lower 16 bits Upper 16 bits Lower 16 bits


[S2] [S1] DT10 and DT11, and DT20
and DT21 are combined, and
treated as 2 sets of 32 -bit data.
Content Content Content Content
of DT21 of DT20 of DT11 of DT10

[D] The 32 -bit data is stored in


order of [S1], [S2] into DT30
to DT33.
To DT33 To DT32 To DT31 To DT30

10-22 WUME-FPXHPGRG-021
10.9 F8 DMV2 (32-bit 2 Data Transfer)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 10-23
10.10 F10 BKMV (Data Block Transfer)

10.10 F10 BKMV (Data Block Transfer)


Transfers data at the block unit.

■ Instruction format

■ Operands
Items Settings
S1 Starting address of the source data
S2 Final address of the source data
D Data destination storage area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
This bulk transfers the data between the area specified by [S1] and the area specified by [S2] to
the area specified by [D] and later.

■ Operation example
Operation of instruction format description program
When the internal relay R0 turns ON, the data of data registers DT0 to DT3 is transferred to the
data registers DT10 to DT13.

10-24 WUME-FPXHPGRG-021
10.10 F10 BKMV (Data Block Transfer)

[S1] DT0 K 10 DT9 K0

Destination
DT1 K 11 DT10 K0
DT2 K 12 DT11 K0
[S2] DT3 K 13 DT12 K0
DT4 K 14 DT13 K0

R0:ON F10 execution

[S1] DT0 K 10 DT9 K0


DT1 K 11 DT10 K 10 [D]
DT2 K 12 DT11 K 11
[S2] DT3 K 13 DT12 K 12
DT4 K 14 DT13 K 13

■ Precautions for programming


● Specify the same type of memory area for [S1] and [S2].
● Specify the number of the lower address with [S1], and the number of the higher address
with [S2].
If [S1] > [S2] is specified and an instruction executed, an operation error will occur.

■ Precautions if the same type of memory area is specified for S1, S2, and D
● If [S1] and [D] have the same type and same number of memory area specified, the
instruction is not executed.
● If the block being transferred overlaps the destination, transfer results will be overwritten.
● If [S1] < [D], data is transferred starting from the higher address.
In the following example, the data is stored in the order DT4 > DT3 > DT2 > DT1.

WUME-FPXHPGRG-021 10-25
10.10 F10 BKMV (Data Block Transfer)

● If [S1] > [D], data is transferred starting from the lower address.
In the following example, the data is stored in the order DT0 > DT1 > DT2.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-26 WUME-FPXHPGRG-021
10.11 F11 COPY (16-bit Data Block Copy)

10.11 F11 COPY (16-bit Data Block Copy)


Copies the specified data to all areas in the range specified by the block.

■ Instruction format

■ Operands
Items Settings
S Area storing the copy source data, or constant data
D1 Starting number of data copy destination area
D2 End number of data copy destination area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D1 ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ●

■ Outline of operation
16-bit data in the area specified by [S] is copied to all areas between [D1] and [D2].

■ Operation example
Operation of instruction format description program
The data from data register DT1 is copied to each data register from DT10 to DT14 when
internal relay R0 turns ON.

WUME-FPXHPGRG-021 10-27
10.11 F11 COPY (16-bit Data Block Copy)

DT0 K 10 DT10 K0 [D1]


[S] DT1 K 11 DT11 K0
DT2 K 12 DT12 K0
DT3 K 13 DT13 K0
DT4 K 14 DT14 K0 [D2]

R0:ON F11 execution

DT0 K 10 DT10 K 11 [D1]


[S] DT1 K 11 DT11 K 11
DT2 K 12 DT12 K 11
DT3 K 13 DT13 K 11
DT4 K 14 DT14 K 11 [D2]

■ Precautions for programming


● Specify the same type of memory area for both [D1] and [D2].
● The area of the lower address for the block being copied should be specified by [D1], and the
higher address should be specified by [D2]. If specified as [D1] > [D2], an operation error will
occur when the instruction is executed.
● When the same number is specified for [D1] and [D2], the 16-bit data is transferred to that
number's area.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the D1 address > D2 address
(ER)

10-28 WUME-FPXHPGRG-021
10.12 F12 ICRD (F-ROM Read)

10.12 F12 ICRD (F-ROM Read)


Reads the specified data from the F-ROM area.

■ Instruction format

■ Operands
Items Settings
S1 Starting block number (settable range: K0 to K31) of the data read from the F-ROM area
S2 Number of reading blocks (settable range: K1 to K32)
D Starting number of the area storing the read data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ●
S2 ●
D ●

■ Outline of operation
From
Transfers data starting with the block specified by S1 in the F-ROM for the blocks specified by
S2.
To
Transfers to the memory area starting with the address specified by D in the data register.
Transfer units
Data is transferred by the following units.
Data to be transferred per block: 2,048 words

■ Settable range of the operand D


The settable range of the operand D varies depending on the model and system register No. 0
(setting of the program area size).
System register No. 0
Model Settable range
Setting of program area size
C14 16 (Fixed) DT0 to DT10240
C30 / C60 24 DT0 to DT63488

WUME-FPXHPGRG-021 10-29
10.12 F12 ICRD (F-ROM Read)

System register No. 0


Model Settable range
Setting of program area size
32 DT0 to DT30720
40 DT0 to DT10240

■ Example of operation
Operation of instruction format description program
When the execution condition R0 is ON, 10 blocks of data starting from block 0 is transferred
from the F-ROM to data registers DT0 to DT20479.

■ Precautions for programming


● Since the initial data of the F-ROM is indeterminate, be careful when reading data from the
F-ROM when no data is written yet.

■ Flag operations
Name Description
Turns ON when the address specified by [S1] is not in the F-ROM area.
R9007
Turns ON when the value specified by [S2] exceeds the range of the F-ROM area.
R9008
(ER) Turns ON when the area is exceeded at the time when the blocks specified by [D] onwards
are transferred.

10-30 WUME-FPXHPGRG-021
10.13 P13 ICWT (F-ROM Write)

10.13 P13 ICWT (F-ROM Write)


Transfer specified data to the F-ROM area.

■ Instruction format

■ Operands
Items Settings
S1 Starting number of the area storing written data
S2 Number of writing blocks (settable range: K1)
D Starting number of the write destination (settable range: K0 to K31) of the F-ROM area

■ Devices that can be specified (indicated by ●)

SW SD ConstantIndex Integer
Operand WX WY WR WL SV EV DT LD I
R T K H M f modifier Device

S1 ●
S2 ●
D ●

■ Outline of operation
From
Transfers data starting with the address specified by S1 in the data register for the blocks
specified by S2.
To
Transfers to the memory area starting with the block specified by D in the F- ROM.
Transfer units
Data is transferred by the following units.
Data to be transferred per block: 2048 words

■ Settable range of the operand S1


The settable range of the operand S1 varies depending on the model and system register No. 0
(setting of the program area size).
System register No. 0
Model Settable range
Setting of program area size
C14 16 (Fixed) DT0 to DT10240
C30 / C60 24 DT0 to DT63488

WUME-FPXHPGRG-021 10-31
10.13 P13 ICWT (F-ROM Write)

System register No. 0


Model Settable range
Setting of program area size
32 DT0 to DT30720
40 DT0 to DT10240

■ Example of operation
Operation of instruction format description program
When the execution condition R0 is ON, data of one block (2,048 words) is transferred to block
0 in the F-ROM area.

■ Precautions for programming


● The number of blocks that can be written is only one.
● The instruction operation time is approx. 100 ms max. When writing multiple blocks, divide
them into multiple scans.
● Data can be written to F-ROM up to 10000 times.
● This instruction is differential execution type (P13) to prevent a large number of write
operations to F-ROM due to program mistakes
● When creating a program, be careful that write operations to F-ROM are not repeatedly
performed.
● Do not use it in interrupt programs.

■ Flag operations
Name Description
Turns ON when the area is exceeded at the time when the blocks specified by [S1]
R9007 onwards are transferred.
R9008
Turns ON when the number of blocks specified by [S2] is other than one.
(ER)
Turns ON when the address specified by [D] is not in the F-ROM area.

10-32 WUME-FPXHPGRG-021
10.14 F15 XCH (16-bit Data Exchange)

10.14 F15 XCH (16-bit Data Exchange)


Exchanges 16-bit data of two areas.

■ Instruction format

■ Operands
Items Settings
D1 Area that stores the 16-bit data to exchange with D2
D2 Area that stores the 16-bit data to exchange with D1

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ● ●

■ Outline of operation
Exchanges the data in the area specified by [D1] with that in the area specified by [D2].

■ Operation example
Operation of instruction format description program
The contents of data register DT10 and data register DT22 are exchanged when internal relay
R0 turns ON.

WUME-FPXHPGRG-021 10-33
10.14 F15 XCH (16-bit Data Exchange)

[D1] DT10 K 10 DT20 K 20


DT11 K 11 DT21 K 21
DT12 K 12 DT22 K 22 [D2]
DT13 K 13 DT23 K 23
DT14 K 14 DT24 K 24

R0:ON F15 execution

[D1] DT10 K 22 DT20 K 20


DT11 K 11 DT21 K 21
DT12 K 12 DT22 K 10 [D2]
DT13 K 13 DT23 K 23
DT14 K 14 DT24 K 24

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-34 WUME-FPXHPGRG-021
10.15 F16 DXCH (32-bit Data Exchange)

10.15 F16 DXCH (32-bit Data Exchange)


Exchanges the 32-bit data of two areas.

■ Instruction format

■ Operands
Items Settings
D1 Area storing the 32-bit data to be exchanged with D2
D2 Area storing the 32-bit data to be exchanged with D1

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ● ●

■ Outline of operation
The first two words of the content (32-bit) at the start of the area specified by [D1] are
exchanged with the first two words of the content (32-bit) at the start of the area specified by
[D2].

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the data in data registers DT10 and DT11 is exchanged with
the data in data registers DT22 and DT23.

WUME-FPXHPGRG-021 10-35
10.15 F16 DXCH (32-bit Data Exchange)

[D1] DT10 H 0 DT20 H 1234


DT11 H FFFD DT21 H 5678
DT12 H 25AC DT22 H 9ABC [D2]
DT13 H F23 DT23 H DEF1

R0:ON F16 execution

[D1] DT10 H 9ABC DT20 H 1234


DT11 H DEF1 DT21 H 5678
DT12 H 25AC DT22 H 0 [D2]
DT13 H F23 DT23 H FFFD

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-36 WUME-FPXHPGRG-021
10.16 F17 SWAP (Higher/Lower Byte Exchange)

10.16 F17 SWAP (Higher/Lower Byte Exchange)


Exchanges higher (8-bit) and lower (8-bit) order bytes in 16-bit data.

■ Instruction format

■ Operands
Items Settings
D Area storing 16-bit data for higher 8-bit and lower 8-bit exchange

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
Exchanges the higher and lower order bytes of the 16-bit data stored in the area specified by
[D].

■ Operation example
Operation of instruction format description program
The higher and lower bytes stored in data register DT0 are exchanged when internal relay R0
turns ON.

15 0
BIN 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0
HEX 0 4 D 2

Higher byte Lower byte


F17
R0:ON
execution

15 0
BIN 1 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0
HEX D 2 0 4

WUME-FPXHPGRG-021 10-37
10.16 F17 SWAP (Higher/Lower Byte Exchange)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-38 WUME-FPXHPGRG-021
10.17 F18 BXCH (Block Exchange)

10.17 F18 BXCH (Block Exchange)


Exchanges data in blocks.

■ Instruction format

■ Operands
Items Settings
D1 Starting address for exchange block 1
D2 Ending address for exchange block 1
D3 Starting address for exchange block 2

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ● ●
D3 ● ● ● ● ● ● ● ● ●

■ Outline of operation
Exchanges the data from the area specified in [D1] to the area specified in [D2] with the data in
the area starting at [D3].

■ Precautions for programming


● Specify the same type of memory address for [D1] and [D2].
● Specify the number of the lower address with [D1], and the number of the higher address
with [D2].
If specified as [D1] > [D2], an operation error will occur when the instruction is executed.
● If the blocks to be exchanged overlap, they cannot be exchanged correctly. However, an
error will not occur.

■ Operation example
Operation of instruction format description program
When the execution condition R0 is ON, data is exchanged between data registers DT10 to
DT13 and DT31 to DT34.

WUME-FPXHPGRG-021 10-39
10.17 F18 BXCH (Block Exchange)

DT10 K 10 [D1] DT30 K1


DT11 K 11 DT31 K2 [D3]
DT12 K 12 DT32 K3
DT13 K 13 [D2] DT33 K4
DT14 K 14 DT34 K5
DT35 K6

R0:ON F18 execution

DT10 K2 [D1] DT30 K1


DT11 K3 DT31 K 10 [D3]
DT12 K4 DT32 K 11
DT13 K5 [D2] DT33 K 12
DT14 K 14 DT34 K 13
DT35 K6

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when [D1] > [D2]
(ER) Turns ON when area is exceeded when exchanging blocks specified in [D3] or higher

10-40 WUME-FPXHPGRG-021
10.18 F190 MV3 (Three 16-bit Data Transfer to Single Area)

10.18 F190 MV3 (Three 16-bit Data Transfer to Single Area)


Three 16-bit data items are batch-transferred from the specified area number.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the hexadecimal data or constant data
S2 Area storing the hexadecimal data or constant data
S3 Area storing the hexadecimal data or constant data
D Starting address of the data transfer destination area (three words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The three types of 16-bit data in the memory areas specified by [S1], [S2], and [S3] are batch-
transferred to the memory area (three words) specified by [D].

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT10 is transferred to DT40, the
content of DT20 is transferred to DT41, and the content of DT30 is transferred to DT42, in a
batch.

WUME-FPXHPGRG-021 10-41
10.18 F190 MV3 (Three 16-bit Data Transfer to Single Area)

[S3] 16 bits [S2] 16 bits [S1] 16 bits

Content of DT30 Content of DT20 Content of DT10

[D]

To DT42 To DT41 To DT40

■ Related instructions
Use the F87 MV2 instruction when batch-transferring two types of 16-bit data.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-42 WUME-FPXHPGRG-021
10.19 F191 DMV3 (32-Bit 3-Data Batch Transfer)

10.19 F191 DMV3 (32-Bit 3-Data Batch Transfer)


Three 32-bit data items are batch-transferred from the specified area number.

■ Instruction format

■ Operands
Items Settings
S1 Area storing 32-bit data, or constant data
S2 Area storing 32-bit data, or constant data
S3 Area storing 32-bit data, or constant data
D Starting address of the data transfer destination area (six words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The three types of 32-bit data in the memory areas specified by [S1], [S2], and [S3] are batch-
transferred to the memory area (six words) specified by [D].

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the combined 32-bit content of data registers DT10 and
DT11, data registers DT20 and DT21, and data registers DT30 and DT31 is batch-transferred to
the 6-word area starting from data register DT40.

WUME-FPXHPGRG-021 10-43
10.19 F191 DMV3 (32-Bit 3-Data Batch Transfer)

Upper 16 bits Lower 16 bits Upper 16 bits Lower 16 bits Upper 16 bits Lower 16 bits

[S3] [S2] [S1]

Content of DT31 Content of DT30 Content of DT21 Content of DT20 Content of DT11 Content of DT10

[D]

To DT45 To DT44 To DT43 To DT42 To DT41 To DT40

■ Related instructions
Use the F8 DMV2 instruction when batch-transferring two types of 32-bit data.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

10-44 WUME-FPXHPGRG-021
11 Binary Arithmetic
Instructions
11.1 F20 + (16-bit Data Addition [D+S=D]) ...............................................11-2
11.2 F21 D+ (32-bit Data Addition [D+S=D]) ............................................11-4
11.3 F22 + (16-bit Data Addition [S1+S2=D]) ...........................................11-6
11.4 F23 D+ (32-bit Data Addition [S1+S2=D]).........................................11-8
11.5 F25 - (16-bit Data Subtraction [D-S=D])............................................11-10
11.6 F26 D-(32-bit Data Subtraction [D-S=D]) ..........................................11-13
11.7 F27 - (16-bit Data Subtraction [S1-S2=D]) ........................................11-15
11.8 F28 D- (32-bit Data Subtraction [S1-S2=D]) .....................................11-18
11.9 F30 * (16-bit Data Multiplication [S1*S2=D+1, D]) ............................11-20
11.10 F31 D* (32-bit Data Multiplication [S1*S2=D+3, D+2, D+1, D] .......11-22
11.11 F32 % (16-bit Data Subtraction [S1/S2=D]) ....................................11-24
11.12 F33 D% (32-bit Data Subtraction [S1/S2=D+1, D]).........................11-26
11.13 F34 *W (16-bit Data Multiplication [S1*S2=D]) ...............................11-28
11.14 F35 +1 (16-bit Data Increment) .......................................................11-30
11.15 F36 D+1 (32-bit Data Increment) ....................................................11-32
11.16 F37 -1 (16-bit Data Decrement) ......................................................11-34
11.17 F38 D-1 (32-bit Data Decrement)....................................................11-36
11.18 F39 D*D (32-bit Data Multiplication [S1*S2=D+1, D]) .....................11-38

WUME-FPXHPGRG-021 11-1
11.1 F20 + (16-bit Data Addition [D+S=D])

11.1 F20 + (16-bit Data Addition [D+S=D])


16-bit data is added.

■ Instruction format

■ Operands
Items Settings
S Area storing the 16-bit data to be added, or constant data
D Area storing the data (16-bit) to be added

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified in [S] is added to the 16-bit data representing the decimal specified
in [D].
(D) + (S) → (D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT10 is added to the content of
data register DT1. When the decimal number 4 is in DT1, and 8 is in DT10, it will be as follows.

11-2 WUME-FPXHPGRG-021
11.1 F20 + (16-bit Data Addition [D+S=D])

DT10
D: K8
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

+ (addition) +

DT1
S: K4
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

DT10
D: K12
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
When converted to decimal

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, either an overflow or underflow occurs.
● Under normal circumstances, do not allow an overflow or underflow to occur.
● If an overflow or underflow occurs, use the 32-bit operation instruction.
● Use the F89 EXT sign extension instruction to convert the 16-bit data into 32-bit data.
● If an overflow or underflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows/underflows
(CY)

WUME-FPXHPGRG-021 11-3
11.2 F21 D+ (32-bit Data Addition [D+S=D])

11.2 F21 D+ (32-bit Data Addition [D+S=D])


32-bit data is added.

■ Instruction format

■ Operands
Items Settings
S Area storing the 32-bit data to be added, or constant data
D Area storing the data (32-bit) to be added

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 32-bit data specified in [S] is added to the 32-bit data representing the decimal specified
in [D].
(D+1, D) + (S+1, S) → (D+1, D)

■ Operation example
Operation of instruction format description program
When the internal relay R0 is ON, the content (32-bit) of data registers DT10 to DT11 is added
to the content (32-bit) of data registers DT0 to DT1.

11-4 WUME-FPXHPGRG-021
11.2 F21 D+ (32-bit Data Addition [D+S=D])

Upper 16 bits Lower 16 bits

Content of DT11 Content of DT10


The data in the specified memory area and in the following
+ memory area are combined and treated as 32-bit data.
(addition)

Content of DT1 Content of DT0

(Store result)

The lower 16 bits of the addition result are stored in DT10 and the
higher 16 bits are stored in DT11.

Store to DT11 Store to DT10

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, either an overflow or underflow occurs.
● Ensure that overflows and underflows do not occur in normal circumstances.
● If an overflow or underflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows/underflows
(CY)

WUME-FPXHPGRG-021 11-5
11.3 F22 + (16-bit Data Addition [S1+S2=D])

11.3 F22 + (16-bit Data Addition [S1+S2=D])


This is an instruction that adds 16-bit data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the 16-bit data to be added, or constant data
S2 Area storing the 16-bit data to be added, or constant data
D Area storing the addition results

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data expressing a decimal number specified by [S1] and [S2] is added, and the
result is stored in [D].
(S1) + (S2) → (D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the contents of data register DT10 and data register DT20 are
added together, and the result is stored in data register DT30. If DT10 contains decimal 8 and
DT20 contains decimal 4, the result is as follows.

11-6 WUME-FPXHPGRG-021
11.3 F22 + (16-bit Data Addition [S1+S2=D])

DT10
S1: K8
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

+ (addition) +

DT20
S2: K4
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

DT30
D: K12
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
When converted to decimal

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, either an overflow or underflow occurs.
● Under normal circumstances, do not allow an overflow or underflow to occur.
● If an overflow or underflow occurs, use the 32-bit operation instruction.
● Use the F89 EXT sign extension instruction to convert the 16-bit data into 32-bit data.
● If an overflow or underflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows/underflows
(CY)

WUME-FPXHPGRG-021 11-7
11.4 F23 D+ (32-bit Data Addition [S1+S2=D])

11.4 F23 D+ (32-bit Data Addition [S1+S2=D])


This is an instruction that adds 32-bit data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the 32-bit data to be added, or constant data
S2 Area storing the 32-bit data to be added, or constant data
D Area storing the addition results

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 32-bit data expressing a decimal number specified by [S1] and [S2] is added, and the
result is stored in [D].
(S1+1, S1) + (S2+1, S2) → (D+1, D)
● The memory area is specified by the memory area number of the lower 16-bit portion.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the contents of data registers DT10 and DT11 are added to
the contents of data registers DT20 and DT21, and the result is stored in data registers DT30
and DT31.

11-8 WUME-FPXHPGRG-021
11.4 F23 D+ (32-bit Data Addition [S1+S2=D])

Upper 16 bits Lower 16 bits

Content of DT11 Content of DT10


The data in the specified memory area and in the following memory
area are combined and treated as 32-bit data.
+
(addition)

Content of DT21 Content of DT20

(Store result)

The lower 16 bits of the addition result are stored in DT30 and the
higher 16 bits are stored in D31.

Store to DT31 Store to DT30

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, either an overflow or underflow occurs.
● Ensure that overflows and underflows do not occur in normal circumstances.
● If an overflow or underflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows/underflows
(CY)

WUME-FPXHPGRG-021 11-9
11.5 F25 - (16-bit Data Subtraction [D-S=D])

11.5 F25 - (16-bit Data Subtraction [D-S=D])


16-bit data is subtracted.

■ Instruction format

■ Operands
Items Settings
S Area storing the subtrahend (16-bit data), or constant data
D Area storing the subtrahend from (16-bit data)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [S] is subtracted from the 16-bit decimal data specified by [D].
(D) - (S) -> (D)

■ Operation example
Operation of instruction format description program
Subtracts the contents of data register DT10 from the contents of data register DT20 when
internal relay R0 turns ON.
Specific Example 1) When the decimal number 16 is in DT20 and the decimal number 4 is in
DT10

11-10 WUME-FPXHPGRG-021
11.5 F25 - (16-bit Data Subtraction [D-S=D])

DT20
D: K16
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0

- (subtraction) -

DT10
S: K4
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

DT20
D: K12
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
When converted to decimal
Specific Example 2) When the decimal number 3 is in DT20 and the decimal number 5 is in
DT10

DT20
D: K3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

- (subtraction) -

DT10
S: K5
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1

DT20
D: K-2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
When converted to decimal

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, either an overflow or underflow occurs.
● Under normal circumstances, do not allow an overflow or underflow to occur.
● If an overflow or underflow occurs, use the 32-bit operation instruction.
● Use the F89 EXT sign extension instruction to convert the 16-bit data into 32-bit data.
● If an overflow or underflow occurs, the CY flag (special internal relay R9009) turns ON.

WUME-FPXHPGRG-021 11-11
11.5 F25 - (16-bit Data Subtraction [D-S=D])

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows/underflows
(CY)

11-12 WUME-FPXHPGRG-021
11.6 F26 D-(32-bit Data Subtraction [D-S=D])

11.6 F26 D-(32-bit Data Subtraction [D-S=D])


Subtracts 32-bit data.

■ Instruction format

■ Operands
Items Settings
S Area that stores subtrahends (32-bit data), or constant data
D Area storing the number to be subtracted (32-bit data)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 32-bit data specified by [S] is subtracted from the 32-bit data expressing a decimal
number specified by [D].
(D+1, D) – (S+1, S) → (D+1, D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data registers DT10 and DT11 (32 bits) is
subtracted from the content of data registers DT20 and DT21(32 bits).

WUME-FPXHPGRG-021 11-13
11.6 F26 D-(32-bit Data Subtraction [D-S=D])

Upper 16 bits Lower 16 bits

Content of DT21 Content of DT20


The data in the specified memory area and in the following memory area
- are combined and treated as 32-bit data.
(subtraction)

Content of DT11 Content of DT10

(Store result)

The lower 16 bits of the subtraction result are stored in DT20 and the
higher 16 bits are stored in DT21.

Store to DT21 Store to DT20

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, either an overflow or underflow occurs.
● Ensure that overflows and underflows do not occur in normal circumstances.
● If an overflow or underflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows/underflows
(CY)

11-14 WUME-FPXHPGRG-021
11.7 F27 - (16-bit Data Subtraction [S1-S2=D])

11.7 F27 - (16-bit Data Subtraction [S1-S2=D])


16-bit data is subtracted.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the number to be subtracted (16-bit data), or constant data
S2 Area storing the subtrahend (16-bit data), or constant data
D Area that stores operation results

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified in [S2] is subtracted from the 16-bit data representing the decimal
of the memory area specified in [S1], and the result is stored in [D].
(S1) - (S2) → (D)

■ Operation example
Operation of instruction format description program
When the internal relay R0 is ON, the content of data register DT20 is subtracted from the
content of data register D10, and the operation result is stored in data register DT30.
Example 1) If the decimal 16 is in DT10, and 4 is in DT20

WUME-FPXHPGRG-021 11-15
11.7 F27 - (16-bit Data Subtraction [S1-S2=D])

DT10
K16
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0

- (subtraction) -

DT20
K4
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

DT30
K12
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
When converted to decimal
Example 2) If the decimal 3 is in DT10, and 5 is in DT20

DT10
K3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

- (subtraction) -

DT20
K5
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1

DT30
K-2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
When converted to decimal

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, either an overflow or underflow occurs.
● Under normal circumstances, do not allow an overflow or underflow to occur.
● If an overflow or underflow occurs, use the 32-bit operation instruction.
● Use the F89 EXT sign extension instruction to convert the 16-bit data into 32-bit data.
● If an overflow or underflow occurs, the CY flag (special internal relay R9009) turns ON.

11-16 WUME-FPXHPGRG-021
11.7 F27 - (16-bit Data Subtraction [S1-S2=D])

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows/underflows
(CY)

WUME-FPXHPGRG-021 11-17
11.8 F28 D- (32-bit Data Subtraction [S1-S2=D])

11.8 F28 D- (32-bit Data Subtraction [S1-S2=D])


Subtracts 32-bit data.

■ Instruction format

■ Operands
Items Settings
S1 Area that stores minuends (32-bit data), or constant data
S2 Area that stores subtrahends (32-bit data), or constant data
D Area that stores operation results

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● 32-bit data specified in [S2] is subtracted from the 32-bit data, representing a decimal, of the
memory area specified in [S1], and the result is stored in [D].
(S1+1, S1) - (S2+1, S2) → (D+1, D)
● The memory area is specified by the memory area number of the lower 16-bit portion.

■ Operation example
Operation of instruction format description program
When the internal relay R0 is ON, the content of data registers DT20 to DT21 is subtracted from
the content of DT10 to DT11, and the operation result is stored in DT30 to DT31.

11-18 WUME-FPXHPGRG-021
11.8 F28 D- (32-bit Data Subtraction [S1-S2=D])

Upper 16 bits Lower 16 bits

Content of DT11 Content of DT10


The data in the specified memory area and in the following memory
- area are combined and treated as 32-bit data.
(subtraction)

Content of DT21 Content of DT20

(Store result)

The lower 16 bits of the subtraction result are stored in DT30 and the
higher 16 bits are stored in DT31.

Store to DT31 Store to DT30

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, either an overflow or underflow occurs.
● Ensure that overflows and underflows do not occur in normal circumstances.
● If an overflow or underflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows/underflows
(CY)

WUME-FPXHPGRG-021 11-19
11.9 F30 * (16-bit Data Multiplication [S1*S2=D+1, D])

11.9 F30 * (16-bit Data Multiplication [S1*S2=D+1, D])


Multiplies hexadecimal data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the hexadecimal data or constant data
S2 Area storing the hexadecimal data or constant data
D Area storing the multiplication results (32-bit data)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Multiplies the hexadecimal data expressed in decimal form that is specified by [S1] with the
hexadecimal data specified by [S2], and stores the result in the area specified by [D].
(S1) × (S2) → (D+1, D)
● The calculation result is stored using 32-bit data (K constant).
● Storage destination [D] is specified by the number of the memory area with the lower order
16 bits.

■ Operation example
Operation of instruction format description program
The contents of data registers DT10 and DT20 are multiplied and stored in data registers DT30
and DT31 when internal relay R0 turns ON. When 8 is in the decimal number in DT10 (K
constant) and 2 is in the decimal number 4 in DT20.

11-20 WUME-FPXHPGRG-021
11.9 F30 * (16-bit Data Multiplication [S1*S2=D+1, D])

DT10
K8
0 0 0 00 0 0 0 0 0 0 0 1 0 00

× ×

DT20
K2
0 0 0 00 0 0 0 0 0 0 0 0 0 10

=
DT31 DT30
K16
0 0 0 00 0 0 0 0 0 0 0 0 0 00 0 0 0 00 0 0 0 0 0 0 1 0 0 00

Converted to decimal
Of the 32-bit data multiplication results, the lower order 16 bits are stored in the specified
memory area (DT30) and the higher order 16 bits is stored in the next area after the specified
area (DT31).

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 11-21
11.10 F31 D* (32-bit Data Multiplication [S1*S2=D+3, D+2, D+1, D]

11.10 F31 D* (32-bit Data Multiplication [S1*S2=D+3, D+2, D+1, D]


Multiplies 32-bit data items.

■ Instruction format

■ Operands
Items Settings
S1 Multiplicand data: Area storing 32-bit data, or constant data
S2 Multiplier data: Area storing 32-bit data, or constant data
D Storage destination: Area storing multiplication result (64-bit data)

■ Devices that can be specified (indicated by ●)

Operand SW SD Constant Index Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● Multiplies the 32-bit data representing decimal data specified by [S1] and the 32-bit data
specified by [S2], and stores the result in the area specified by [D].
(S1+1, S1) × (S2+1, S2) → (D+3, D+2, D+1, D)
● The calculation result is stored in the 64-bit area.
● The memory area is specified by the number of the lowest 16-bit memory area.

11-22 WUME-FPXHPGRG-021
11.10 F31 D* (32-bit Data Multiplication [S1*S2=D+3, D+2, D+1, D]

■ Operation example
Operation of instruction format description program

16 bits 16 bits

Content of DT11 Content of DT10


The data in the specified memory area and in the
following memory area are combined and treated
× as 32-bit data.

16 bits 16 bits

Content of DT21 Content of DT20

16 bits 16 bits 16 bits 16 bits The 64-bit multiplication result is stored in order
from the lower 16 bits in DT30 to DT33.

Store to DT33 Store to DT32 Store to DT31 Store to DT30

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 11-23
11.11 F32 % (16-bit Data Subtraction [S1/S2=D])

11.11 F32 % (16-bit Data Subtraction [S1/S2=D])


Divides 16-bit data.

■ Instruction format

■ Operands
Items Settings
S1 Dividend data: Area storing 16-bit data, or constant data
S2 Divisor data: Area storing 16-bit data, or constant data
Storage destination: Area storing the division result (quotient) (remainder stored as 16-bit data in
D
DT90015)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data expressing a decimal specified by [S1] is divided by the 16-bit data specified
by [S2]. The quotient is stored in [D], and the remainder is stored in special data register
DT90015.
(S1) ÷ (S2) → Quotient (D) Remainder (DT90015)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, data register DT10 is divided by data register DT20, and the
quotient is stored in DT30 and the remainder in DT90015. If the content in DT10 is decimal
number (K constant) 15 and the content in DT20 is 4, the result is as follows.

11-24 WUME-FPXHPGRG-021
11.11 F32 % (16-bit Data Subtraction [S1/S2=D])

DT10
K15
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1

÷ ÷

DT20
K4
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

DT30
Quotient K3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

DT90015 Remainder
K3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
When converted to decimal

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when [S2] is"0"
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the negative maximum value is divided by"–1"
(CY)

WUME-FPXHPGRG-021 11-25
11.12 F33 D% (32-bit Data Subtraction [S1/S2=D+1, D])

11.12 F33 D% (32-bit Data Subtraction [S1/S2=D+1, D])


Divides 32-bit data.

■ Instruction format

■ Operands
Items Settings
S1 Dividend data: Area storing 32-bit data, or constant data
S2 Divisor data: Area storing 32-bit data, or constant data
Storage destination: Area storing the division result (quotient) (remainder stored as 32-bit data in
D
DT90015 and DT90016)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 32-bit data expressing a decimal specified by [S1] is divided by the 32-bit data specified
by [S2]. The quotient is stored in [D], and the remainder is stored in special data registers
DT90015 and DT90016.
(S1 + 1, S1) ÷ (S2 + 1, S2) → Quotient (D+1, D) Remainder (DT90016, DT90015)
● Memory area is specified by the memory area number of the lower order hexadecimal part.

11-26 WUME-FPXHPGRG-021
11.12 F33 D% (32-bit Data Subtraction [S1/S2=D+1, D])

■ Operation example
Operation of instruction format description program

Upper 16 bits Lower 16 bits

Content of DT11 Content of DT10


÷
(division)

Content of DT21 Content of DT20

(Store result)

The quotient is stored in DT30 to DT31.

Store to DT31 Store to DT30

The lower 16 bits of the remainder are stored in


DT90015 and the higher 16 bits are stored in DT90016.

Store to Store to
DT90016 DT90015

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when [S2] is"0"
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the negative maximum value is divided by"–1"
(CY)

WUME-FPXHPGRG-021 11-27
11.13 F34 *W (16-bit Data Multiplication [S1*S2=D])

11.13 F34 *W (16-bit Data Multiplication [S1*S2=D])


Multiplies 16-bit data and stores the result in a 16-bit, one-word area.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the hexadecimal data or constant data
S2 Area storing the hexadecimal data or constant data
D Area storing multiplication result (16-bit data)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [S1] and the 16-bit data specified by [S2] are multiplied, and the
result is stored in the area specified by [D].
(S1) x (S2) → (D)
● The operation result is stored as one word of 16-bit data.

■ Operation example
Operation of instruction format description program
When the DT10 content is decimal 8

11-28 WUME-FPXHPGRG-021
11.13 F34 *W (16-bit Data Multiplication [S1*S2=D])

■ Precautions for programming


Keep the operation result [D] within the range of K–32768 to K32767.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the operation result exceeds 16 bits
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 11-29
11.14 F35 +1 (16-bit Data Increment)

11.14 F35 +1 (16-bit Data Increment)


Adds 1 to 16-bit data.

■ Instruction format

■ Operands
Items Settings
D Area to which 1 is to be added

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● 1 is added to the 16-bit data that expresses the decimal number specified by [D] and the
result is stored in [D].
(D) + 1 → (D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, 1 is added to the contents of data register DT0.

DT0
K9
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
+
+1 1

DT0 =
K10
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
When converted to decimal

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, an overflow occurs.

11-30 WUME-FPXHPGRG-021
11.14 F35 +1 (16-bit Data Increment)

● Ensure that overflows do not occur in normal circumstances.


● If an overflow occurs, use a 32-bit operation instruction.
● If an overflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows
(CY)

WUME-FPXHPGRG-021 11-31
11.15 F36 D+1 (32-bit Data Increment)

11.15 F36 D+1 (32-bit Data Increment)


Adds 1 to 32-bit data.

■ Instruction format

■ Operands
Items Settings
D The area (32-bit) that +1 is added to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Adds +1 to the 32-bit data, representing a decimal, specified in [D] and stores it in the 2-word
memory area starting at [D].
(D+1, D) + 1 → (D+1, D)

■ Operation example
Operation of instruction format description program
When the internal relay R0 is ON, adds +1 to the content of the combined 32 bits of data
registers DT0 and DT1.

Upper 16 bits Lower 16 bits


The data in the specified memory area and in the
following memory area are combined and treated
as 32-bit data.
Content of DT1 Content of DT0

+1

Store to DT1 Store to DT0

11-32 WUME-FPXHPGRG-021
11.15 F36 D+1 (32-bit Data Increment)

■ Precautions for programming


● With arithmetic operation instructions, in the event that the operation result falls beyond the
range of values that can be handled, an overflow occurs.
● Ensure that overflows do not occur in normal circumstances.
● If an overflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows
(CY)

WUME-FPXHPGRG-021 11-33
11.16 F37 -1 (16-bit Data Decrement)

11.16 F37 -1 (16-bit Data Decrement)


Subtracts 1 from 16-bit data.

■ Instruction format

■ Operands
Items Settings
D Area to be decreased by 1

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [D] and expressed in base 10 is decreased by 1 and stored in
[D].
(D) - 1 → (D)

■ Operation example
Operation of instruction format description program
When internal relay R0 is ON, the content of data register DT0 is decreased by 1.

DT0
K10
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
-
-1 1

DT0 =
K9
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
When converted to decimal

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the numerical range that can be
handled, an underflow will result.

11-34 WUME-FPXHPGRG-021
11.16 F37 -1 (16-bit Data Decrement)

● Under normal circumstances, do not allow an underflow to occur.


● If an underflow occurs, use the 32-bit operation instruction.
● If an underflow occurs, the CY flag (special internal relay R9009) will turn ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the calculation result underflows
(CY)

WUME-FPXHPGRG-021 11-35
11.17 F38 D-1 (32-bit Data Decrement)

11.17 F38 D-1 (32-bit Data Decrement)


Subtracts 1 from 32-bit data.

■ Instruction format

■ Operands
Items Settings
D Area (32-bit) from which 1 is subtracted

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● 1 is subtracted from the 32-bit data that expresses the decimal number specified by [D] and
the result is stored in the 2-word memory area starting at [D].
(D+1, D) – 1 → (D+1, D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, 1 is subtracted from the contents of the 32-bit data that is a
combination of data registers DT0 and DT1.

Upper 16 bits Lower 16 bits


The data in the specified memory area and in the following
memory area are combined and treated as 32 -bit data.

Content of DT1 Content of DT0

-1

Store to DT1 Store to DT0

11-36 WUME-FPXHPGRG-021
11.17 F38 D-1 (32-bit Data Decrement)

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the numerical range that can be
handled, an underflow will result.
● Under normal circumstances, do not allow an underflow to occur.
● If an underflow occurs, the CY flag (special internal relay R9009) will turn ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the calculation result underflows
(CY)

WUME-FPXHPGRG-021 11-37
11.18 F39 D*D (32-bit Data Multiplication [S1*S2=D+1, D])

11.18 F39 D*D (32-bit Data Multiplication [S1*S2=D+1, D])


Multiplies 32-bit data items and stores the result in the 32-bit two-word area.

■ Instruction format

■ Operands
Items Settings
S1 Multiplicand data: Area storing 32-bit data, or constant data
S2 Multiplier data: Area storing 32-bit data, or constant data
D Storage destination: Area storing multiplication result (32-bit data)

■ Devices that can be specified (indicated by ●)

Operand SW SD Constant Index Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 32-bit data specified by [S1] and the 32-bit data specified by [S2] are multiplied, and the
result is stored in the area specified by [D].
(S1+1, S1) × (S2+1, S2) → (D+1, D)
● The operation result is stored as two words of 32-bit data.

11-38 WUME-FPXHPGRG-021
11.18 F39 D*D (32-bit Data Multiplication [S1*S2=D+1, D])

■ Operation example
Operation of instruction format description program
Upper 16 bits Lower 16 bits

Content of DT11 Content of DT10


The data in the specified memory area and in the following
memory area are combined and treated as 32-bit data.
×

Content of DT21 Content of DT20

(Store result)

The 32-bit multiplication result is stored in order from the


lower 16 bits.

Store to DT31 Store to DT30

■ Precautions for programming


Keep the operation result [D] within the range of K-2147483648 to K2147483647.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the operation result exceeds 32 bits
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 11-39
(MEMO)

11-40 WUME-FPXHPGRG-021
12 BCD Data Arithmetic
Instructions
12.1 F40 B+ (4-digit BCD Data Addition [D+S=D]) ...................................12-2
12.2 F41 DB+ (8-digit BCD Data Addition [D+S=D]) ................................12-4
12.3 F42 B+ (4-digit BCD Data Addition [S1+S2=D]) ...............................12-6
12.4 F43 DB+ (8-digit BCD Data Addition [S1+S2=D]).............................12-8
12.5 F45 B- (4-digit BCD Data Subtraction [D-S=D])................................12-10
12.6 F46 DB- (8-digit BCD Data Subtraction [D-S=D]) .............................12-12
12.7 F47 B- (4-digit BCD Data Subtraction [S1-S2=D])............................12-14
12.8 F48 DB- (8-digit BCD Data Subtraction [S1-S2=D]) .........................12-16
12.9 F50 B* (4-digit BCD Data Multiplication [S1*S2=D+1, D]) ................12-18
12.10 F51 DB* (8-Digit BCD Data Multiplication [S1*S2=D+3, D+2, D
+1, D]) ...................................................................................................12-20
12.11 F52 B% (4-digit BCD Data Subtraction [S1/S2=D]) ........................12-22
12.12 F53 DB% (8-digit BCD Data Subtraction [S1/S2=D+1, D]).............12-24
12.13 F55 B+1 (4-digit BCD Data Increment)...........................................12-26
12.14 F56 DB+1 (8-digit BCD Data Increment) ........................................12-28
12.15 F57 B-1 (4-digit BCD Data Decrement) ..........................................12-30
12.16 F58 DB-1 (8-digit BCD Data Decrement)........................................12-32

WUME-FPXHPGRG-021 12-1
12.1 F40 B+ (4-digit BCD Data Addition [D+S=D])

12.1 F40 B+ (4-digit BCD Data Addition [D+S=D])


Adds 4-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S Area storing the 4-digit BCD data to be added, or constant data
D Area storing the 4-digit BCD data to be added to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 4-digit BCD data specified by [S] is added to the 4-digit BCD data (H constant) specified
by [D].
(D) + (S) → (D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT10 is added to the content of
data register DT1. If DT1 contains BCD 4 and DT10 contains 8, the result is as follows.

12-2 WUME-FPXHPGRG-021
12.1 F40 B+ (4-digit BCD Data Addition [D+S=D])

DT10
D: 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 8 (BCD)
+ (addition)

DT1
S: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 4 (BCD)

DT10

D: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
0 0 1 2 (BCD)

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an overflow.
● Ensure that overflows do not occur in normal circumstances.
● In the case of an overflow, use an 8-digit arithmetic operation instruction.
● If an overflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows
(CY)

WUME-FPXHPGRG-021 12-3
12.2 F41 DB+ (8-digit BCD Data Addition [D+S=D])

12.2 F41 DB+ (8-digit BCD Data Addition [D+S=D])


Adds 8-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S Area storing the 8-digit BCD data to be added, or constant data
D Area storing the 8-digit BCD data to be added to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 8-digit BCD data specified by [S] is added to the 8-bit BCD data (H constant) specified
by [D].
(D+1, D) + (S+1, S) → (D+1, D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the contents of data registers DT0 and DT1 are added to the
contents of data registers DT10 and DT11.

12-4 WUME-FPXHPGRG-021
12.2 F41 DB+ (8-digit BCD Data Addition [D+S=D])

Upper 16 bits Lower 16 bits

Content of DT11 Content of DT10


The data in the specified memory area and in the following memory
+ area are combined and treated as 32-bit data.
(addition)

Content of DT1 Content of DT0

(Store result)

The lower 16 bits of the addition result are stored in DT10 and the higher
16 bits are stored in DT11.

Store to DT11 Store to DT10

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an overflow.
● Ensure that overflows do not occur in normal circumstances.
● If an overflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows
(CY)

WUME-FPXHPGRG-021 12-5
12.3 F42 B+ (4-digit BCD Data Addition [S1+S2=D])

12.3 F42 B+ (4-digit BCD Data Addition [S1+S2=D])


Adds 4-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the 4-digit BCD data to be added, or constant data
S2 Area storing the 4-digit BCD data to be added, or constant data
D Area storing the addition results

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 4-digit BCD data (H constant) specified by [S1] and [S2] are added together, and the
result is stored in [D].
(S1) + (S2) → (D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the contents of data register DT10 and data register DT20 are
added together, and the result is stored in data register DT30. If DT10 contains BCD 8 and
DT20 contains BCD 4, the result is as follows.

12-6 WUME-FPXHPGRG-021
12.3 F42 B+ (4-digit BCD Data Addition [S1+S2=D])

DT10

S1: 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 8 (BCD)
+ (addition)

DT20

S2: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 4 (BCD)

DT30

D: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
0 0 1 2 (BCD)

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an overflow.
● Ensure that overflows do not occur in normal circumstances.
● In the case of an overflow, use an 8-digit arithmetic operation instruction.
● If an overflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows
(CY)

WUME-FPXHPGRG-021 12-7
12.4 F43 DB+ (8-digit BCD Data Addition [S1+S2=D])

12.4 F43 DB+ (8-digit BCD Data Addition [S1+S2=D])


Adds 8-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the 8-digit BCD data to be added, or constant data
S2 Area storing the 8-digit BCD data to be added, or constant data
D Area storing the addition results

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 8-digit BCD data (H constant) specified by [S1] and [S2] are added together, and the
result is stored in [D].
(S1+1, S1) + (S2+1, S2) → (D+1, D)
● The memory area is specified by the memory area number of the lower 16-bit portion.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the contents of data registers DT10 and DT11 are added to
the contents of data registers DT20 and DT21, and the result is stored in data registers DT30
and DT31.

12-8 WUME-FPXHPGRG-021
12.4 F43 DB+ (8-digit BCD Data Addition [S1+S2=D])

Upper 16 bits Lower 16 bits

Content of DT11Content of DT10


The data in the specified memory area and in the following
+ memory area are combined and treated as 32 -bit data.
(addition)

Content of DT21Content of DT20

(Store result)
The lower 16 bits of the addition result are stored in DT30
and the higher 16 bits are stored in DT31.

Store to DT31 Store to DT30

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an overflow.
● Ensure that overflows do not occur in normal circumstances.
● If an overflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows
(CY)

WUME-FPXHPGRG-021 12-9
12.5 F45 B- (4-digit BCD Data Subtraction [D-S=D])

12.5 F45 B- (4-digit BCD Data Subtraction [D-S=D])


Subtracts 4-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S Area storing the subtrahend (4-digit BCD data) or constant data
D Area storing the subtrahend (4-digit BCD data)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 4-digit BCD data specified by [S] is subtracted from the 4-digit BCD data (H constant)
specified by [D].
(D) - (S) → (D)

■ Operation example
Operation of instruction format description program
Subtracts the contents of data register DT10 from the contents of data register DT20 when
internal relay R0 turns ON. When BCD is 16 in DT20 and 4 in DT10, it is as shown below.

12-10 WUME-FPXHPGRG-021
12.5 F45 B- (4-digit BCD Data Subtraction [D-S=D])

DT20
D: 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0
0 0 1 6 (BCD)
- (subtraction)

DT10
S: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 4 (BCD)

DT20

D: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
0 0 1 2 (BCD)

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an underflow.
● Under normal circumstances, do not allow an underflow to occur.
● If an underflow occurs, use an 8-digit arithmetic operation instruction.
● If an underflow occurs, the CY flag (special internal relay R9009) will turn ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the calculation result underflows
(CY)

WUME-FPXHPGRG-021 12-11
12.6 F46 DB- (8-digit BCD Data Subtraction [D-S=D])

12.6 F46 DB- (8-digit BCD Data Subtraction [D-S=D])


Subtracts 8-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S Area that stores the subtrahend (8-digit BCD data), or constant data
D Area storing the number to be subtracted (8-digit BCD data)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 8-digit BCD data specified by [S] is subtracted from the 8-digit BCD data (H constant)
specified by [D].
(D+1, D) - (S+1, S) → (D+1, D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data registers DT10 and DT11 is subtracted
from the content of data registers DT20 and DT21.

12-12 WUME-FPXHPGRG-021
12.6 F46 DB- (8-digit BCD Data Subtraction [D-S=D])

Upper 16 bits Lower 16 bits

Content of DT21 Content of DT20


The data in the specified memory area and in the following memory
- area are combined and treated as 32-bit data.
(subtraction)

Content of DT11 Content of DT10

(Store result)

The lower 16 bits of the subtraction result are stored in DT20


and the higher 16 bits are stored in DT21.

Store to DT21 Store to DT20

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an underflow.
● Under normal circumstances, do not allow an underflow to occur.
● If an underflow occurs, the CY flag (special internal relay R9009) will turn ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the calculation result underflows
(CY)

WUME-FPXHPGRG-021 12-13
12.7 F47 B- (4-digit BCD Data Subtraction [S1-S2=D])

12.7 F47 B- (4-digit BCD Data Subtraction [S1-S2=D])


Subtracts 4-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the minuend (4-digit BCD data), or constant data
S2 Area storing the subtrahend (4-digit BCD data) or constant data
D Area that stores the calculation result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 4-digit BCD data specified by [S2] is subtracted from the 4-digit BCD data (H constant)
specified by [S1], and the result is stored in [D].
(S1) - (S2) → (D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT20 is subtracted from the
content of data register DT10, and the result is stored in data register DT30. If DT10 contains
BCD 16 and DT20 contains BCD 4, the result is as follows.

12-14 WUME-FPXHPGRG-021
12.7 F47 B- (4-digit BCD Data Subtraction [S1-S2=D])

DT10

S1: 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0
0 0 1 6 (BCD)
- (subtraction)

DT20
S2: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 4 (BCD)

DT30

D: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0
0 0 1 2 (BCD)

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an underflow.
● Under normal circumstances, do not allow an underflow to occur.
● If an underflow occurs, use an 8-digit arithmetic operation instruction.
● If an underflow occurs, the CY flag (special internal relay R9009) will turn ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the calculation result underflows
(CY)

WUME-FPXHPGRG-021 12-15
12.8 F48 DB- (8-digit BCD Data Subtraction [S1-S2=D])

12.8 F48 DB- (8-digit BCD Data Subtraction [S1-S2=D])


Subtracts 8-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S1 Area that stores the minuend (8-digit BCD data), or constant data
S2 Area that stores the subtrahend (8-digit BCD data), or constant data
D Area that stores the calculation result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Subtracts the 8-digit BCD data specified by [S2] from the 8-digit BCD data (H constant) in the
area specified by [S1], and stores the result in [D].
(S1+1, S1) - (S2+1, S2) → (D+1, D)
● Memory area is specified by the memory area number of the lower order hexadecimal part.

■ Operation example
Operation of instruction format description program
Subtracts the contents of data registers DT20 to DT21 from the contents of data registers DT10
to DT11 when internal relay X0 turns ON, and stores the calculation result in data registers
DT30 to DT31.

12-16 WUME-FPXHPGRG-021
12.8 F48 DB- (8-digit BCD Data Subtraction [S1-S2=D])

Upper 16 bits Lower 16 bits

Content of DT11 Content of DT10


The data in the specified memory area and in the following memory
area are combined and treated as 32-bit data.
-
(subtraction)

Content of DT21 Content of DT20

(Store result)

The lower 16 bits of the subtraction result are stored in DT30 and the
higher 16 bits are stored in DT31.

Store to DT31 Store to DT30

■ Precautions for programming


● If the result of an arithmetic operation instruction falls below the minimum value which can be
handled, an underflow will result.
● Under normal circumstances, do not allow an underflow to occur.
● If an underflow occurs, the CY flag (special internal relay R9009) will turn ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the calculation result underflows
(CY)

WUME-FPXHPGRG-021 12-17
12.9 F50 B* (4-digit BCD Data Multiplication [S1*S2=D+1, D])

12.9 F50 B* (4-digit BCD Data Multiplication [S1*S2=D+1, D])


Multiplies 4-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing 4-digit BCD data, or constant data
S2 Area storing 4-digit BCD data, or constant data
D Area storing multiplication result (8-digit BCD data)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Multiplies the 4-digit BCD data specified by [S1] (H constant) by the 4-digit BCD data
specified by [S2], and the result is stored in the area specified by [D].
(S1) × (S2) → (D+1, D)
● The operation result is stored as 32-bit data (8-digit BCD).
● Storage destination [D] is specified by the number of the memory area with the lower order
16 bits.

■ Operation example
Operation of instruction format description program
e.g. If DT10 contains BCD 8 and DT20 contains BCD 2

12-18 WUME-FPXHPGRG-021
12.9 F50 B* (4-digit BCD Data Multiplication [S1*S2=D+1, D])

Of the 32-bit data multiplication results, the lower order 16 bits are stored in the specified
memory area (DT30) and the higher order 16 bits is stored in the next area after the specified
area (DT31).

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 12-19
12.10 F51 DB* (8-Digit BCD Data Multiplication [S1*S2=D+3, D+2, D+1, D])

12.10 F51 DB* (8-Digit BCD Data Multiplication [S1*S2=D+3, D+2, D+1,
D])
Multiplies 8-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S1 Multiplicand data: Area storing 8-digit BCD data, or constant data
S2 Multiplier data: Area storing 8-digit BCD data, or constant data
D Storage destination: Area storing multiplication result (64-bit data)

■ Devices that can be specified (indicated by ●)

Operand SW SD Constant Index Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The 8-digit BCD data (H constant) specified by [S1] is multiplied by the 8-digit BCD data
specified by [S2], and the result is stored in the area specified by [D].
(S1+1, S1) x (S2+1, S2) → (D+3, D+2, D+1, D)
● The operation result is stored as 64-bit data (16-digit BCD).
● The memory area is specified by the number of the lowest 16-bit memory area.

12-20 WUME-FPXHPGRG-021
12.10 F51 DB* (8-Digit BCD Data Multiplication [S1*S2=D+3, D+2, D+1, D])

■ Operation example
Operation of instruction format description program

Upper 16 bits Lower 16 bits

Content of DT11Content of DT10 The data in the specified memory area and
in the following memory area are combined
and treated as 32 -bit data.
×

Content of DT21 Content of DT20

The 64 -bit multiplication result is stored in order


from the lower 16 bits in DT30 to DT33.

To DT33 To DT32 To DT31 To DT30

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the specified data is not BCD data
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 12-21
12.11 F52 B% (4-digit BCD Data Subtraction [S1/S2=D])

12.11 F52 B% (4-digit BCD Data Subtraction [S1/S2=D])


Divides 4-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S1 Dividend data: Area storing 4-digit BCD data, or constant data
S2 Divisor data: Area storing 4-digit BCD data, or constant data
Storage destination: Area storing the divisor result (quotient) (remainder stored as 16-bit data in
D
DT90015)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 4-digit BCD data (H constant) specified by [S1] is divided by the 4-digit BCD data
specified by [S2], with the quotient stored in [D] and the remainder stored in a special data
register.
(S1) ÷ (S2) → Quotient (D)
Remainder (DT90015)

■ Operation example
Operation of instruction format description program
When the internal relay R0 turns ON, the contents of DT10 are divided by the contents of DT20,
with the quotient stored in DT30 and the remainder stored as BCD in DT90015.
If DT10 contains BCD 15 and DT20 contains BCD 4, the result is as follows.

12-22 WUME-FPXHPGRG-021
12.11 F52 B% (4-digit BCD Data Subtraction [S1/S2=D])

DT10
0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1
0 0 1 5
÷

DT20

0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 4

DT30
Quotient
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
0 0 0 3

DT90015
Remainder
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
0 0 0 3
■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when the specified data is not BCD data
(ER) Turns ON when S2 is"0"(when S1 is divided by"0")
R900B
Turns ON when the operation result (quotient) is"0"
(=)

WUME-FPXHPGRG-021 12-23
12.12 F53 DB% (8-digit BCD Data Subtraction [S1/S2=D+1, D])

12.12 F53 DB% (8-digit BCD Data Subtraction [S1/S2=D+1, D])


Divides 8-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S1 Dividend data: Area storing 8-digit BCD data, or constant data
S2 Divisor data: Area storing 8-digit BCD data, or constant data
Storage destination: Area storing the divisor result (quotient) (remainder stored as 32-bit data in
D
DT90015 and DT90016)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 8-digit BCD data (H constant) from the area specified by [S1] is divided by the 8-digit
BCD data from the area specified by [S2]. The quotient is stored in the area specified by [D],
and the remainder is stored as BCD in special data registers DT90015 and DT90016.
(S1 + 1, S1) ÷ (S2 + 1, S2) → Quotient (D + 1, D)
Remainder (DT90016, DT90015)
● Memory area is specified by the memory area number of the lower order hexadecimal part.

12-24 WUME-FPXHPGRG-021
12.12 F53 DB% (8-digit BCD Data Subtraction [S1/S2=D+1, D])

■ Operation example
Operation of instruction format description program
Upper 16 bits Lower 16 bits

Content of DT11 Content of DT10

÷
(division)

Content of DT21 Content of DT20

(Store result)

The quotient is stored in DT30 to DT31.

Store to DT31 Store to DT30

The lower 16 bits of the remainder are stored in DT90015 and the
higher 16 bits are stored in DT90016.

Store to DT90016 Store to DT90015

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when the specified data is not BCD data
(ER) Turns ON when S2 is"0"(when S1 is divided by"0")
R900B
Turns ON when the operation result (quotient) is"0"
(=)

WUME-FPXHPGRG-021 12-25
12.13 F55 B+1 (4-digit BCD Data Increment)

12.13 F55 B+1 (4-digit BCD Data Increment)


Adds 1 to 4-digit BCD data.

■ Instruction format

■ Operands
Items Settings
D Area to which 1 is to be added

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● 1 is added to the 4-digit BCD data (H constant) specified by [D] and the result is stored in [D].
(D) + 1 → (D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, 1 is added to the contents of data register DT0.

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an overflow.

12-26 WUME-FPXHPGRG-021
12.13 F55 B+1 (4-digit BCD Data Increment)

● Ensure that overflows do not occur in normal circumstances.


● In the case of an overflow, use an 8-digit arithmetic operation instruction.
● If an overflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the content of [D] is not BCD data (BCD error)
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows
(CY)

WUME-FPXHPGRG-021 12-27
12.14 F56 DB+1 (8-digit BCD Data Increment)

12.14 F56 DB+1 (8-digit BCD Data Increment)


Adds 1 to the 8-digit BCD data.

■ Instruction format

■ Operands
Items Settings
D The area (32-bit) that +1 is added to

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Adds +1 to the 8-digit BCD data (H constant) specified by [D], then stores the result in the 2-
word memory area starting with [D].
(D+1, D) + 1 -> (D+1, D)

■ Operation example
Operation of instruction format description program
Adds 1 to the contents (8- digit BCD data) of data registers DT1 and DT0 when internal relay
R0 turns ON.

Upper 16 bits Lower 16 bits


The data in the specified memory area and in the following
memory area are combined and treated as 32 -bit data.

Content of DT1 Content of DT0

+1

Store to DT1 Store to DT0

12-28 WUME-FPXHPGRG-021
12.14 F56 DB+1 (8-digit BCD Data Increment)

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an overflow.
● Ensure that overflows do not occur in normal circumstances.
● If an overflow occurs, the CY flag (special internal relay R9009) turns ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the content of the area specified by [D] is not BCD data (BCD error)
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when operation result overflows
(CY)

WUME-FPXHPGRG-021 12-29
12.15 F57 B-1 (4-digit BCD Data Decrement)

12.15 F57 B-1 (4-digit BCD Data Decrement)


Subtracts 1 from 4-digit BCD data.

■ Instruction format

■ Operands
Items Settings
D Area to be decreased by 1

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● 1 is subtracted from the 4-digit BCD data (H constant) specified by [D] and the result is
stored in [D].
(D) - 1 → (D)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, 1 is subtracted from the content of data register DT0.

12-30 WUME-FPXHPGRG-021
12.15 F57 B-1 (4-digit BCD Data Decrement)

■ Precautions for programming


● If the result of an arithmetic operation instruction exceeds the maximum value that can be
handled, this will result in an underflow.
● Under normal circumstances, do not allow an underflow to occur.
● If an underflow occurs, use an 8-digit arithmetic operation instruction.
● If an underflow occurs, the CY flag (special internal relay R9009) will turn ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the content of [D] is not BCD data (BCD error)
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the calculation result underflows
(CY)

WUME-FPXHPGRG-021 12-31
12.16 F58 DB-1 (8-digit BCD Data Decrement)

12.16 F58 DB-1 (8-digit BCD Data Decrement)


Subtracts 1 from 8-digit BCD data.

■ Instruction format

■ Operands
Items Settings
D Area (32-bit) from which 1 is subtracted

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Subtracts 1 from 8-digit BCD data (H constant) specified by [D] and stores the result in the
two-word memory area starting with [D].
(D+1, D) - 1 -> (D+1, D)

■ Operation example
Operation of instruction format description program
Subtracts 1 from the 8-digit BCD data content of data registers DT0 and DT1 when internal
relay R0 turns ON.

Upper 16 bits Lower 16 bits


The data in the specified memory area and in the
following memory area are combined and treated
as 32-bit data.
Content of DT1 Content of DT0

-1

Store to DT1 Store to DT0

12-32 WUME-FPXHPGRG-021
12.16 F58 DB-1 (8-digit BCD Data Decrement)

■ Precautions for programming


● If the result of an arithmetic operation instruction falls below the minimum value which can be
handled, an underflow will result.
● Under normal circumstances, do not allow an underflow to occur.
● If an underflow occurs, the CY flag (special internal relay R9009) will turn ON.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the content of [D] is not BCD data (BCD error)
(ER)
R900B
Turns ON when the calculation result is"0"
(=)
R9009
Turns ON when the calculation result underflows
(CY)

WUME-FPXHPGRG-021 12-33
(MEMO)

12-34 WUME-FPXHPGRG-021
13 Data Comparison
Instructions
13.1 F60 CMP (16-bit Data Comparison) .................................................13-2
13.2 F61 DCMP (32-bit Data Comparison)...............................................13-8
13.3 F62 WIN (16-bit Data Band Comparison) .........................................13-12
13.4 F63 DWIN (32-bit Data Band Comparison) ......................................13-14
13.5 F64 BCMP (Block Data Comparison) ...............................................13-16
13.6 F373 DTR (16-bit Data Change Detection).......................................13-19
13.7 F374 DDTR (32-bit Data Change Detection) ....................................13-21

WUME-FPXHPGRG-021 13-1
13.1 F60 CMP (16-bit Data Comparison)

13.1 F60 CMP (16-bit Data Comparison)


Compares the two specified 16-bit data and outputs the judgment result to special internal
relays.

■ Instruction format

■ Operands
Items Settings
S1 Comparison data 1: Area storing 16-bit data, or constant data
S2 Comparison data 2: Area storing 16-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [S1] expressing a decimal number is compared with the 16-bit
data specified by [S2], and the judgment result is output to special internal relays R9009 to
R900C (comparison instruction judgement flags).
● R9009 to R900C are assigned based on whether [S1] or [S2] is larger or smaller, as shown
in the table below.
Flag
Relationship
R900A R900B R900C R9009
between S1 and S2
> = < Carry
S1 < S2 OFF OFF ON Indefinite
S1 = S2 OFF ON OFF OFF

13-2 WUME-FPXHPGRG-021
13.1 F60 CMP (16-bit Data Comparison)

Flag
Relationship
R900A R900B R900C R9009
between S1 and S2
> = < Carry
S1 > S2 ON OFF OFF Indefinite

(Note 1) The above table shows the comparison results for signed integer.
When comparing unsigned integer or BCD data, refer to "P.13-6".

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON and when the data register DT0 value is K100, output relay
Y11 turns ON. When the value is smaller than K100, Y12 turns ON, and when the value is
larger than K100, Y10 turns ON.

■ About internal relays


● In the program example on the previous page, comparison is only performed when R0 turns
ON.
● If ongoing comparison is necessary, use relay R9010, which is always ON, as the internal
relay.

e.g.

R9010 Normally ON relay


F60 CMP DT0 K100

R9010 R900A Y10

R9010 R900B Y11

R9010 R900C Y12

This part can be omitted because it always executes.


● The following programming is possible using instructions PSHS, RDS, and POPS.

WUME-FPXHPGRG-021 13-3
13.1 F60 CMP (16-bit Data Comparison)

This program has the same operation as the program example.

■ Precautions when using two or more comparison instructions


● The comparison instruction judgment flags R900A to R900C are updated each time
comparison instructions are executed.
● Therefore, when using two or more comparison instructions:
1. Insert programs using judgment flags immediately after the comparison instruction.
2. Output to the output relay or internal relay for each comparison instruction.

13-4 WUME-FPXHPGRG-021
13.1 F60 CMP (16-bit Data Comparison)

e.g. Example of comparison of DT0 and K100, and DT1 and K200

The comparison result for (a) is reflected in the contents of output relays Y10 to Y12 of program
(b), and the comparison result for (c) is reflected in the contents of output relays Y13 to Y15 of
program (d).

■ Precautions when comparing BCD data or external data


● When comparing BCD data or unsigned 16-bit data (0 to FFFF), construct a judgment
program such as the one shown below using R900B and R9009 instead of R900A and
R900C.

WUME-FPXHPGRG-021 13-5
13.1 F60 CMP (16-bit Data Comparison)

e.g. Comparing the BCD data in DT0 and DT1

(e) When DT0 is less than DT1, R1 turns ON


(f) When DT0 is equal to DT1, R2 turns ON
(g) When DT0 is greater than DT1, R3 turns ON

● Flag operation when comparing BCD data or unsigned 16-bit data (0 to FFFF)
Flag
Relationship
R900A R900B R900C R9009
between S1 and S2
> = < Carry
S1 < S2 Indefinite OFF Indefinite ON
S1 = S2 OFF ON OFF OFF
S1 > S2 Indefinite OFF Indefinite OFF

(Note 1) The above table shows the comparison results for unsigned integer or BCD data.
When comparing signed data, refer to "P.13-2".

<Remarks>
For example, because R900A turns OFF and R900C turns ON when S1 = H8000 and S2 =
H1000, accurate comparison results cannot be obtained with a judgment program that uses
R900A and R900C.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.

13-6 WUME-FPXHPGRG-021
13.1 F60 CMP (16-bit Data Comparison)

Name Description
R9008
(ER)

WUME-FPXHPGRG-021 13-7
13.2 F61 DCMP (32-bit Data Comparison)

13.2 F61 DCMP (32-bit Data Comparison)


Compares two specified 32-bit data, and outputs the result to special internal relays.

■ Instruction format

■ Operands
Items Settings
S1 Comparison data 1: Area storing 32-bit data, or constant data
S2 Comparison data 2: Area storing 32-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Compare the 32-bit data specified by [S1] and expressed as a decimal with 32-bit data in the
area specified by [S2], and outputs the result to special internal relay flags (R9009 to
R900C).
● R9009 to R900C are assigned based on whether [S1] or [S2] is larger or smaller, as shown
in the table below.
Flag
Relationship between S1
R900A R900B R900C R9009
and S2
> = < Carry
(S1+1, S1)<(S2+1, S2) OFF OFF ON Indefinite
(S1+1, S1)=(S2+1, S2) OFF ON OFF OFF
(S1+1, S1)>(S2+1, S2) ON OFF OFF Indefinite

13-8 WUME-FPXHPGRG-021
13.2 F61 DCMP (32-bit Data Comparison)

(Note 1) The above table shows the comparison results for signed integer.
When comparing unsigned integer or BCD data, refer to "P.13-11".
● Memory area is specified by the memory area number of the lower order hexadecimal part.

■ Operation example
Operation of instruction format description program
When internal relay R0 is ON, the 32-bit data that is a combination of data registers DT0 and
DT1 is compared with the 32-bit data that is a combination of data registers DT10 and DT11,
and if the values of the two data are the same, the output relay Y11 turns ON. If the data in DT0
to DT1 is smaller than the data in DT10 to DT11, Y12 turns ON, and if it is larger Y10 turns ON.

■ About internal relays


● In the above program example, the comparison is performed only when R0 is ON.
● If ongoing comparison is necessary, use relay R9010, which is always ON, as the internal
relay.

e.g.

R9010 Normally ON relay


F61 DCMP DT0 DT10

R9010 R900A Y10

R9010 R900B Y11

R9010 R900C Y12

This part can be omitted because it always executes.


● The following programming is possible using instructions PSHS, RDS, and POPS.

This program has the same operation as the program example.

WUME-FPXHPGRG-021 13-9
13.2 F61 DCMP (32-bit Data Comparison)

■ Precautions when using two or more comparison instructions


● The comparison instruction judgment flags R900A to R900C are updated each time
comparison instructions are executed.
● Therefore, when using two or more comparison instructions:
1. Insert programs using judgment flags immediately after the comparison instruction.
2. Output to the output relay or internal relay for each comparison instruction.

e.g. Comparison of DT0 to DT1 with DT10 to DT11, and DT2 to DT3 with DT20 to
DT21

The comparison result for (a) is reflected in the contents of output relays Y10 to Y12 of program
(b), and the comparison result for (c) is reflected in the contents of output relays Y13 to Y15 of
program (d).

■ Precautions when comparing BCD data or external data


● When comparing BCD data or unsigned 16-bit data (0 to FFFFFFFF), do not use R900A and
R900C. Use R900B and R9009, and create a judgment program such as the one shown
below.

13-10 WUME-FPXHPGRG-021
13.2 F61 DCMP (32-bit Data Comparison)

e.g. Comparing BCD data in DT0 to DT1 with BCD Data in DT10 to DT11

(e) R1 turns ON when (DT1, DT0) < (DT11, DT10)


(f) R2 turns ON when (DT1, DT0) = (DT11, DT10)
(g) R3 turns ON when (DT1, DT0) > (DT11, DT10)

● Flag operations when comparing BCD data or unsigned 32-bit data (0 to FFFFFFFF)
Flag
Relationship between
R900A R900B R900C R9009
(S1+1, S1) and (S2+1, S2)
> = < Carry
(S1+1, S1)<(S2+1, S2) Indefinite OFF Indefinite ON
(S1+1, S1)=(S2+1, S2) OFF ON OFF OFF
(S1+1, S1)>(S2+1, S2) Indefinite OFF Indefinite OFF

(Note 1) The above table shows the comparison results for unsigned integer or BCD data.
When comparing signed data, refer to "P.13-8".
<Remarks>
For example, when S1 = H80000000 (K - 2,147,483,648) and S2 = H10000001 (K +
268,435,457), and when the F61 DCMP instruction is executed, the judgment is S1 < S2,
R900A turns OFF, and R900C turns ON. Correct comparison results cannot be obtained with
judgment programs that use R900A and R900C.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 13-11
13.3 F62 WIN (16-bit Data Band Comparison)

13.3 F62 WIN (16-bit Data Band Comparison)


Performs a band comparison of signed 16-bit data and outputs the comparison result to special
internal relays.

■ Instruction format
Lower limit Upper limit
R0

F62 WIN DT10 DT20 DT30

S1 S2 S3
R0 R900A Y10

R0 R900B Y11

R0 R900C Y12

■ Operands
Items Settings
S1 Comparison data: Area storing 16-bit data, or constant data
S2 Lower limit data: Area storing 16-bit data, or constant data
S3 Upper limit data: Area storing 16-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● A band comparison is performed on signed 162-bit data expressing a decimal number. The
signed 16-bit data specified by [S1] is compared with the range specified by [S2] (lower limit
value) and [S3] (upper limit value) to determine whether it falls in that range, and the
comparison result is output to the special internal relays R9009 to R900C (comparison
instruction judgment flag).
● The relationship between [S1], [S2], and [S3] affects R9009 to R900C as follows.

13-12 WUME-FPXHPGRG-021
13.3 F62 WIN (16-bit Data Band Comparison)

Flag
Relationship between S1,
R900A R900B R900C R9009
S2, and S3
> = < Carry
S1 < S2 OFF OFF ON ×
S2 ≤ S1 ≤ S3 OFF ON OFF ×
S3 < S1 ON OFF OFF ×

(Note 1) ×: Does not change.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the value of DT10 is compared with the range bounded by the
lower limit value of DT20 and the upper limit value of DT30 to determine if it falls within that
range.

e.g. When DT20 contains K-500 and DT30 contains K500

When DT10 = K-680 R900C: ON, Y12: ON


When DT10 = K-500 R900B: ON, Y11: ON
When DT10 = K256 R900B: ON, Y11: ON
When DT10 = K680 R900A: ON, Y10: ON

■ Precautions for programming


Set so that the lower limit value is equal to or less than the upper limit value (S2 ≤ S3).

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
ON when S2 > S3
(ER)

WUME-FPXHPGRG-021 13-13
13.4 F63 DWIN (32-bit Data Band Comparison)

13.4 F63 DWIN (32-bit Data Band Comparison)


Performs a band comparison of signed 32-bit data and outputs the comparison result to special
internal relays.

■ Instruction format
Lower limit Upper limit
R0

F63 DWIN DT10 DT20 DT30

S1 S2 S3
R0 R900A Y10

R0 R900B Y11

R0 R900C Y12

■ Operands
Items Settings
S1 Comparison data: Area storing 32-bit data, or constant data
S2 Lower limit data: Area storing 32-bit data, or constant data
S3 Upper limit data: Area storing 32-bit data, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● A band comparison is performed on signed 32-bit data expressing a decimal number. The
signed 32-bit data specified by [S1] is compared with the range specified by [S2] (lower limit
value) and [S3] (upper limit value) to determine whether it falls in that range, and the
comparison result is output to the special internal relays R9009 to R900C (comparison
instruction judgement flag).
● The 32-bit data specified by each operand is read from the next area.
• [S1] = (S1+1, S1)
• [S2] = (S2+1, S2)
• [S3] = (S3+1, S3)

13-14 WUME-FPXHPGRG-021
13.4 F63 DWIN (32-bit Data Band Comparison)

● The relationship between [S1], [S2], and [S3] affects R9009 to R900C as follows.
Flag
Relationship between S1,
R900A R900B R900C R9009
S2, and S3
> = < Carry
S1 < S2 OFF OFF ON ×
S2 ≤ S1 ≤ S3 OFF ON OFF ×
S3 < S1 ON OFF OFF ×

(Note 1) ×: Does not change.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the value of (DT11, DT10) is compared with the range
bounded by the lower limit value of (DT21, DT20) and the upper limit value of (DT31, DT30) to
determine if it falls within that range.

e.g. When DT20 and DT21 contain K–50000, and DT30 and DT31 contain K50000

When (DT11, DT10) = K–68000 R900C: ON, Y12: ON


When (DT11, DT10) = K–50000 R900B: ON, Y11: ON
When (DT11, DT10) = K25600 R900B: ON, Y11: ON
When (DT11, DT10) = K68000 R900A: ON, Y10: ON

■ Precautions for programming


Set so that the lower limit value (S2+1, S2) is equal to or less than the upper limit value (S3+1,
S3).

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when (S2+1, S2) is greater than (S3+1, S3)
(ER)

WUME-FPXHPGRG-021 13-15
13.5 F64 BCMP (Block Data Comparison)

13.5 F64 BCMP (Block Data Comparison)


Detects matches in two block-specified areas in byte units.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the control data (4-digit BCD data), or constant data
S2 Starting address of comparison block 1
S3 Starting address of comparison block 2

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The contents of the area specified by [S2] (comparison block 1) are compared with the
contents of the area specified by [S3] (comparison block 2).
● When the comparison result shows that the contents of the blocks match, special internal
relay R900B ("="flag) turns ON.
● [S1] is the control data that determines factors such as the size of the comparison.

■ How to specify control data [S1]


Specify a 4-digit BCD (H constant) according to the following format.

S1=H
Start of block 2
1: From higher byte
0: From lower byte
Start of block 1
1: From higher byte
0: From lower byte
Block size
01 to 99 bytes

13-16 WUME-FPXHPGRG-021
13.5 F64 BCMP (Block Data Comparison)

<Setting example>
When specifying the 4 bytes from the low byte of the area specified by [S2] as block 1 and the 4
bytes from the high byte of the area specified by [S3] as block 2, set [S1] to H1004.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the block starting at data register DT10 is compared with the
block starting at data register DT20. When the values of the two blocks are the same, R1 turns
ON. If H1004 is entered in DT0, the two blocks are as follows.
(Higher) (Lower)
DT10 2 1
Block 1 DT11 4 3

Comparison

DT20 1
Block 2 DT21 3 2
DT22 4

■ Precautions for programming


The flag R900B used for comparison instruction judgment is refreshed each time a comparison
instruction, etc., is executed. Accordingly:
1. The program that uses R900B should be inserted immediately after the BCMP instruction.
2. Output the flag value to an output relay or internal relay and save the result.

WUME-FPXHPGRG-021 13-17
13.5 F64 BCMP (Block Data Comparison)

(Note 1) As shown in the program example above, make sure to place the comparison internal relay before the
flag relay. This is not necessary for normal execution.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when the content specified by [S1] is not comprised of BCD data
(ER) Turns ON when the specified block range exceeds the area

13-18 WUME-FPXHPGRG-021
13.6 F373 DTR (16-bit Data Change Detection)

13.6 F373 DTR (16-bit Data Change Detection)


Detects changes in word data numerical values.

■ Instruction format

■ Operands
Items Settings
S Area that detects data changes
D Area that stores data status during the previous execution

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● If the data in the area specified by [S] has changed since the previous time it was executed,
the internal relay R9009 ("CY"flag) turns ON.
[D] is used as an area for memorizing the preceding values, and the current values are
stored when the instruction is completed.

■ Operation example
Operation of instruction format description program
When execution condition R0 is ON, if there are changes compared to when data register DT10
was previously executed, R9009 turns ON, and R10 also turns ON following this.

■ Precautions for programming


Flag R9009, which is used for detecting data changes, is updated each time a calculation
instruction, etc. is executed. Therefore,
● a program using R9009 should be inserted immediately after the F373 DTR instruction.
● Output to an output relay or internal relay to hold the results.

WUME-FPXHPGRG-021 13-19
13.6 F373 DTR (16-bit Data Change Detection)

● Always insert execution conditions before the flag relay (R9009), as shown in the above
program example. This is not necessary for normal execution.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009
Turns ON if there are changes to the specified data area
(CY)

13-20 WUME-FPXHPGRG-021
13.7 F374 DDTR (32-bit Data Change Detection)

13.7 F374 DDTR (32-bit Data Change Detection)


Detects changes in double-word data (32-bit data) values.

■ Instruction format

■ Operands
Items Settings
S Area that detects data changes
D Area that stores data status during the previous execution

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Internal relay R9009 (the"CY"flag) turns ON if the data in the area specified by [S, S+1] has
changed from the data values of the previous execution.
[D, D+1] is used as an area for recording previous values, with the current values being
stored when instruction execution is complete.

■ Operation example
Operation of instruction format description program
When execution condition R0 is ON, if there are changes compared to when data register DT10
was previously executed, R9009 turns ON, and R10 also turns ON following this.

■ Precautions for programming


Flag R9009, which is used for detecting data changes, is updated each time a calculation
instruction, etc., is executed. Therefore:
● The program that uses R9009 should be inserted immediately after the F374 DDTR
instruction.
● Output to an output relay or internal relay to hold the results.

WUME-FPXHPGRG-021 13-21
13.7 F374 DDTR (32-bit Data Change Detection)

● Always insert execution conditions before the flag relay (R9009), as shown in the above
program example. This is not necessary for normal execution.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009
Turns ON if there are changes to the specified data area
(CY)

13-22 WUME-FPXHPGRG-021
14 Boolean Instructions
14.1 F65 WAN (16-bit Data AND).............................................................14-2
14.2 F66 WOR (16-bit Data OR)...............................................................14-4
14.3 F67 XOR (16-bit Data Exclusive OR) ...............................................14-6
14.4 F68 XNR (16-bit Data Exclusive NOR) .............................................14-8
14.5 F69 WUNI [(S1 AND S3) OR (S2 AND S3) = D] (16-bit) ..................14-10
14.6 F215 DAND (32-bit Data AND) .........................................................14-12
14.7 F216 DOR (32-bit Data OR) .............................................................14-14
14.8 F217 DXOR (32-bit Data Exclusive OR)...........................................14-16
14.9 F218 DXNR (32-bit Data Exclusive NOR) ........................................14-18
14.10 F219 DUNI [(S1 AND S3) OR (S2 AND S3) = D] (32-bit)...............14-20

WUME-FPXHPGRG-021 14-1
14.1 F65 WAN (16-bit Data AND)

14.1 F65 WAN (16-bit Data AND)


Calculates the logical conjunction of 16-bit data.

■ Instruction format

■ Operands
Items Settings
S1 Data 1: Area storing data on which to perform the logical operation, or constant data
S2 Data 2: Area storing data on which to perform the logical operation, or constant data
D Storage location: Area storing the operation result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● A bitwise logical conjunction is performed on each bit of the contents of the area specified by
[S1] and the contents of the area specified by [S2], and the results are stored in [D].
(S1) ^ (S2) → (D)
● This instruction can be used for operations such as forcibly turning OFF (bit masking)
specific parts of data.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, a bitwise logical conjunction is performed on each bit of the
contents of data register DT10 and the contents of data register DT20, and the results are
stored in data register DT30.

14-2 WUME-FPXHPGRG-021
14.1 F65 WAN (16-bit Data AND)

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
DT10: 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1

DT20: 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

R0:ON

DT30: 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 1

■ Logical conjunction (AND)


S1 bit S2 bit Logical conjunction
0 0 0
0 1 0
1 0 0
1 1 1

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-3
14.2 F66 WOR (16-bit Data OR)

14.2 F66 WOR (16-bit Data OR)


Calculates the OR of 16-bit data.

■ Instruction format

■ Operands
Items Settings
S1 Data 1: Area storing data on which to perform the logical operation, or constant data
S2 Data 2: Area storing data on which to perform the logical operation, or constant data
D Storage location: Area storing the operation result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● A bitwise OR is performed on each bit of the contents of the area specified by [S1] and the
contents of the area specified by [S2], and the results are stored in the area specified by [D].
(S1) v (S2) → (D)
● This instruction can be used to forcibly turn ON specific parts of data.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, a bitwise OR is performed on each bit of the contents of data
register DT10 and the contents of data register DT20, and the result is stored in data register
DT30.

14-4 WUME-FPXHPGRG-021
14.2 F66 WOR (16-bit Data OR)

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
DT10: 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1

DT20: 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

R0:ON

DT30: 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1

■ Logical disjunction (OR)


S1 bit S2 bit Logical disjunction
0 0 0
0 1 1
1 0 1
1 1 1

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-5
14.3 F67 XOR (16-bit Data Exclusive OR)

14.3 F67 XOR (16-bit Data Exclusive OR)


Calculates the exclusive OR of 16-bit data.

■ Instruction format

■ Operands
Items Settings
S1 Data 1: Area storing data on which to perform the logical operation, or constant data
S2 Data 2: Area storing data on which to perform the logical operation, or constant data
D Storage location: Area storing the operation result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● An exclusive OR is performed on each bit of the contents of the area specified by [S1] and
the contents of the area specified by [S2], and the results are stored in the area specified by
[D].
{(S1) ^ (S2)} v {(S1) ^ (S2)} → (D)
● This can be used to detect bits whose ON/OFF status does not match.
● When the values of [S1] and [S2] are the same, all the bits in the data specified by [D]
become 0.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, an exclusive OR is performed on each bit of the contents of
data register DT10 and the contents of data register DT20, and the result is stored in data
register DT30.

14-6 WUME-FPXHPGRG-021
14.3 F67 XOR (16-bit Data Exclusive OR)

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
DT10: 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1

DT20: 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

R0:ON

DT30: 0 1 0 0 1 1 0 1 0 1 0 0 0 1 1 0

■ Exclusive OR (XOR)
S1 bit S2 bit Exclusive OR
0 0 0
0 1 1
1 0 1
1 1 0

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-7
14.4 F68 XNR (16-bit Data Exclusive NOR)

14.4 F68 XNR (16-bit Data Exclusive NOR)


Calculates the exclusive NOR of 16-bit data.

■ Instruction format

■ Operands
Items Settings
S1 Data 1: Area storing data on which to perform the logical operation, or constant data
S2 Data 2: Area storing data on which to perform the logical operation, or constant data
D Storage location: Area storing the operation result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● An exclusive NOR is performed on each bit of the contents of the area specified by [S1] and
the contents of the area specified by [S2], and the results are stored in the area specified by
[D].
{(S1) ^ (S2)} v {(S1) ^ (S2)} → (D)
● This can be used to detect bits with matching ON/OFF status.
● When the values of [S1] and [S2] are the same, all the bits in the data specified by [D]
become 1.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, if the values of the bits in the same positions in data registers
DT10 and DT20 are equal, the bits in the same positions in data register DT30 turn ON (1). If
they are not equal, they turn OFF (0).

14-8 WUME-FPXHPGRG-021
14.4 F68 XNR (16-bit Data Exclusive NOR)

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
DT10: 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 1

DT20: 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

R0:ON

DT30: 1 0 1 1 0 0 1 0 1 0 1 1 1 0 0 1

■ Exclusive NOR (XNR)


S1 bit S2 bit Exclusive NOR
0 0 1
0 1 0
1 0 0
1 1 1

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-9
14.5 F69 WUNI [(S1 AND S3) OR (S2 AND S3) = D] (16-bit)

14.5 F69 WUNI [(S1 AND S3) OR (S2 AND S3) = D] (16-bit)
Combines two sets of word data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing data to be combined, or constant data
S2 Area storing data to be combined, or constant data
S3 Area storing mask data for combining, or constant data
D Area that stores operation results

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Using the mask data specified by [S3], the two sets of word data specified by [S1] and [S2]
are combined in bit units, and stored in the area specified by [D].
([S1] AND [S3]) OR ([S2] AND [S3]) → [D]
When [S3] is H0, [S2] is stored in [D]
When [S3] is HFFFF, [S1] is stored in [D].

14-10 WUME-FPXHPGRG-021
14.5 F69 WUNI [(S1 AND S3) OR (S2 AND S3) = D] (16-bit)

■ Operation example
Operation of instruction format description program
DT10 DT20
S1: S2:
1010 1010 1010 1010 0101 0101 0101 0101

AND AND

DT30 S3: DT30 bit inversion data


S3:
1111 0000 0000 1111 Inversion 0000 1111 1111 0000

DT10 AND DT30 DT20 AND NOT(DT30)


1010 0000 0000 1010 0000 0101 0101 0000

OR

DT40
D:
1010 0101 0101 1010

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-11
14.6 F215 DAND (32-bit Data AND)

14.6 F215 DAND (32-bit Data AND)


Calculates logical conjunction of double word data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the data on which OR operations will be performed, or constant data (two words)
S2 Area storing the data on which OR operations will be performed, or constant data (two words)
D Storage destination: Area that stores calculation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Takes the logical conjunction for each bit of the double word data specified by [S1, S1+1] and
the double word data specified by [S2, S2+2], and stores the results in [D, D+1].

14-12 WUME-FPXHPGRG-021
14.6 F215 DAND (32-bit Data AND)

■ Operation example
Operation of instruction format description program

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-13
14.7 F216 DOR (32-bit Data OR)

14.7 F216 DOR (32-bit Data OR)


Performs OR operations double word data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the data on which OR operations will be performed, or constant data (two words)
S2 Area storing the data on which OR operations will be performed, or constant data (two words)
D Storage destination: Area that stores calculation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Performs OR operation on each bit of the double word data specified by [S1, S1+1] and [S2,
S2+1], and stores the results in [D, D+1].

14-14 WUME-FPXHPGRG-021
14.7 F216 DOR (32-bit Data OR)

■ Operation example
Operation of instruction format description program

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-15
14.8 F217 DXOR (32-bit Data Exclusive OR)

14.8 F217 DXOR (32-bit Data Exclusive OR)


Calculates the exclusive OR of double-word data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the data on which OR operations will be performed, or constant data (two words)
S2 Area storing the data on which OR operations will be performed, or constant data (two words)
D Storage destination: Area that stores calculation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● An exclusive OR is performed on each bit of the double-word data specified by [S1, S1+1]
and the double-word data specified by [S2, S2+1], and the results are stored in the area
specified by [D, D+1].
● This can be used to detect which bits are not the same.
Matching bit = 0
Non-matching bit = 1

14-16 WUME-FPXHPGRG-021
14.8 F217 DXOR (32-bit Data Exclusive OR)

■ Operation example
Operation of instruction format description program

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-17
14.9 F218 DXNR (32-bit Data Exclusive NOR)

14.9 F218 DXNR (32-bit Data Exclusive NOR)


Calculates the exclusive NOR of double word data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the data on which OR operations will be performed, or constant data (two words)
S2 Area storing the data on which OR operations will be performed, or constant data (two words)
D Storage destination: Area that stores calculation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Retrieves the exclusive NOR of each bit for the double word data specified by [S1, S1+1]
and the double word data specified by [S2, S2+1] before storing the result in [D, D+1].
● This can be used to determine whether each bit matches.
Matching bit = 1
Non-matching bit = 0

14-18 WUME-FPXHPGRG-021
14.9 F218 DXNR (32-bit Data Exclusive NOR)

■ Operation example
Operation of instruction format description program

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-19
14.10 F219 DUNI [(S1 AND S3) OR (S2 AND S3) = D] (32-bit)

14.10 F219 DUNI [(S1 AND S3) OR (S2 AND S3) = D] (32-bit)
Combines two double words.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the data to be combined, or constant data (two words)
S2 Area storing the data to be combined, or constant data (two words)
S3 Area storing mask data for combination, or constant data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Using the mask data specified by [S3, S3+1], the two double word data specified by [S1,
S1+1] and [S2, S2+1] are combined in bit units and stored in the area specified by [D, D+1].
([S1, S1+1] AND [S3, S3+1]) OR ([S2, S2+1] AND [S3, S3+1]) → [D, D+1]
● If [S3, S3+1] is H0, then [S2, S2+1] → [D, D+1]
● If [S3, S3+1] is HFFFFFFFF, then [S1, S1+1] → [D, D+1]

14-20 WUME-FPXHPGRG-021
14.10 F219 DUNI [(S1 AND S3) OR (S2 AND S3) = D] (32-bit)

■ Operation example
Operation of instruction format description program
DT10, DT11 DT20, DT21
S2 1010 1010 1010 1010 S2 0101 0101 0101 0101
S2+1 1100 1100 1100 1100 S2+1 0011 0011 0011 0011
AND AND
DT30, DT31 DT30, DT31 bit inversion data
S3 1111 0000 0000 1111 S3 0000 1111 1111 0000
S3+1 1111 0000 1111 0000 S3+1 0000 1111 0000 1111
inverted

1010 0000 0000 1010 0000 0101 0101 0000


1100 0000 1100 0000 0000 0011 0000 0011

OR
DT40, DT41
D 1010 0101 0101 1010
D+1 1100 0011 1100 0011

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 14-21
(MEMO)

14-22 WUME-FPXHPGRG-021
15 Data Conversion Instructions
15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)]...................15-3
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion) .............15-7
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion) .............15-10
15.4 F73 BCDA (BCD Data to ASCII Code Conversion) ..........................15-14
15.5 F74 ABCD (ASCII Code to BCD Data Conversion) ..........................15-18
15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion) ...............15-22
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion) ...............15-25
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion) ...............15-29
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion) ...............15-32
15.10 F80 BCD (16-bit Binary Data to BCD Data Conversion).................15-36
15.11 F81 BIN (BCD Data to 16-bit Binary Data Conversion) ..................15-38
15.12 F82 DBCD (32-bit Binary Data to BCD Data Conversion) ..............15-40
15.13 F83 DBIN (BCD Data to 32-bit Binary Data Conversion)................15-41
15.14 F84 INV (16-bit Data Invert)............................................................15-42
15.15 F85 NEG (16-bit Data Sign Inversion) ............................................15-43
15.16 F86 DNEG (32-bit Data Sign Inversion)..........................................15-44
15.17 F87 ABS (Absolute Value of 16-bit Data)........................................15-46
15.18 F88 DABS (Absolute Value of 32-bit Data) .....................................15-47
15.19 F89 EXT (Sign Extension) ..............................................................15-48
15.20 F90 DECO (Decode).......................................................................15-50
15.21 F91 SEGT (7-segment)...................................................................15-53
15.22 F92 ENCO (Encode).......................................................................15-55
15.23 F93 UNIT (Digit Combine) ..............................................................15-58
15.24 F94 DIST (Digit Distribute)..............................................................15-60
15.25 F96 SRC (16-bit Data Search)........................................................15-62
15.26 F97 DSRC (32-bit Data Search) .....................................................15-64
15.27 F230 TMSEC (Time data to second conversion)............................15-66
15.28 F231 SECTM (Second to Time Data Conversion)..........................15-69
15.29 F235 GRY (16-bit Data to Gray Code Conversion) ........................15-72
15.30 F236 DGRY (32-bit Data to Gray Code Conversion)......................15-73

WUME-FPXHPGRG-021 15-1
15 Data Conversion Instructions

15.31 F237 GBIN (Gray Code to 16-bit Data Conversion) .......................15-74


15.32 F238 DGBIN (Gray Code to 32-bit Data Conversion).....................15-75
15.33 F240 COLM (Bit Line to Bit Column Conversion) ...........................15-77
15.34 F241 LINE (Bit Column to Bit Line Conversion) .............................15-79

15-2 WUME-FPXHPGRG-021
15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)]

15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)]
Calculates block check code (BCC).

■ Instruction format

■ Operands
Items Settings
S1 Area storing data specifying the calculation method, or constant data
S2 Starting address of the area storing target data
S3 Area storing the length (number of bytes) of the target data, or constant data
D Area that stores operation results

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● Creates block check code (BCC) from the starting position for the calculation specified by S1
and S2 using the calculation method specified by S1, and stores the result at the storage
position specified by D and S1 according to the conversion method specified by S1.

WUME-FPXHPGRG-021 15-3
15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)]

Specification of control data [S1]


H

Conversion data
0: Binary data
(CRC: 2 bytes, Not CRC: 1 byte)
1: ASCII code (2 bytes)
Storage starting position (number of bytes from D)
0 to F
Storage starting position (number of bytes from S2)
0 to F
Specify the calculation method
0: Addition
1: Subtraction
2: Exclusive OR
A: CRC -16

(Note 1) If CRC−16 is specified as the calculation method, ASCII code cannot be specified for the conversion
data.

■ Calculation method
If the calculation method specified by [S1] is CRC, the calculation is carried out using the
following generator polynomial. (Same calculation method as MODBUS−RTU.)
Generator polynomial: X16+X15+X2+1

■ Operation example
Operation of instruction format description program
When the internal relay R0 turns ON, this calculates the BCC for the 12 bytes of data stored
starting from data register DT0, via an exclusive OR operation. The result is stored in the lower
byte of DT6.

■ Usage example 1
In this example, the block check code of the message being sent"%01#RCSX0000"is
calculated and is added after the message.
● Transmission is performed using ASCII codes.
● BCC is calculated via an exclusive OR.
1. The message should be stored in the memory area as shown below.
DT6 DT5 DT4 DT3 DT2 DT1 DT0
H3030 H3030 H5853 H4352 H2331 H3025
00 00 XS CR #1 0%
BCC
12 bytes
2. The BCC instruction is as shown below.

15-4 WUME-FPXHPGRG-021
15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)]

F70 BCC K2 DT0 K12 DT6

[S1] Exclusive OR

[S2] Start of target data

[S3] Length of target data (12 bytes)

[D] Calculation result

> When this is executed, BCC (H 1D) is stored in the lower byte of DT6 of [D].
● Calculation method
Calculation is performed as shown below. (Explained in Usage example 2.)
% → H25 → 00100101 (a)
0 → H30 → 00110000 (b)
1 → H31 → 00110001 (c)
# → H23 → 00100011 (d)
R → H52 → 01010010 (e)
Specified calculation
(a) S1=K0:+
S1=K1:-
(b) S1=K2:XOR
(c)
(d)
(e)

Calculation is performed in the order of carrying out the specified calculation in 8-bit units,
and carrying out calculations on that result with the next 8 bits.

■ Usage example 2
In this example the block check code of the message being sent"%01#RCSX0000"is calculated
and is added at the end of the message
● Calculation method: addition, conversion data: binary data
DT9 DT8 DT7 DT6 DT5 DT4 DT3 DT2 DT1 DT0
H0000 H0000 H0000 H0000 H3030 H3030 H5853 H4352 H2331 H3025
00 00 XS CR #1 0%
Specification of control data [S1]
DT10 = H0C00

DT9 DT8 DT7 DT6 DT5 DT4 DT3 DT2 DT1 DT0
H0000 H0000 H0000 H00A9 H3030 H3030 H5853 H4352 H2331 H3025
00 00 XS CR #1 0%
● Calculation method: addition, conversion data: ASCII code

WUME-FPXHPGRG-021 15-5
15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)]

DT9 DT8 DT7 DT6 DT5 DT4 DT3 DT2 DT1 DT0
H0000 H0000 H0000 H0000 H3030 H3030 H5853 H4352 H2331 H3025
00 00 XS CR #1 0%
Specification of control data [S1]
DT10 = H1C00

DT9 DT8 DT7 DT6 DT5 DT4 DT3 DT2 DT1 DT0
H0000 H0000 H0000 H3941 H3030 H3030 H5853 H4352 H2331 H3025
9A 00 00 XS CR #1 0%
● Calculation method: addition, conversion data: ASCII code
DT9 DT8 DT7 DT6 DT5 DT4 DT3 DT2 DT1 DT0
H0000 H0000 H0030 H3030 H3058 H5343 H5223 H3130 H2500 H0000
0 00 0X SC R# 10 %
Specification of control data [S1]
DT10 = H1F30

DT9 DT8 DT7 DT6 DT5 DT4 DT3 DT2 DT1 DT0
H0000 H0039 H4130 H3030 H3058 H5343 H5223 H3130 H2500 H0000
9 A0 00 0X SC R# 10 %
● Calculation method: CRC, conversion data: binary data
DT9 DT8 DT7 DT6 DT5 DT4 DT3 DT2 DT1 DT0
H0000 H0000 H0000 H0000 H3030 H3030 H5853 H4352 H2331 H3025
00 00 XS CR #1 0%
Specification of control data [S1]
DT10 = H0C0A

DT9 DT8 DT7 DT6 DT5 DT4 DT3 DT2 DT1 DT0
H0000 H0000 H0000 H2E0A H3030 H3030 H5853 H4352 H2331 H3025
00 00 XS CR #1 0%

■ Flag operations
Name Description
R9007 When the calculation method specified by S1 is outside the specified range
R9008
When the conversion data specified by S1 is outside the specified range
(ER)

15-6 WUME-FPXHPGRG-021
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion)

15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion)


Converts hexadecimal numeric values to ASCII code.

■ Instruction format

■ Operands
Items Settings
S1 Starting number for the area storing the hexadecimal numeric values
S2 Area storing the length of the numeric value (number of bytes) to be converted, or constant data
D Starting number of the area storing the ASCII code of conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The hexadecimal numeric data stored in the area specified by [S1] is converted to ASCII
codes and stored in the area specified by [D].
● [S2] specifies the number of data bytes to be converted.
● The amount of the result (ASCII code) is twice the converted data.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the hexadecimal numeric data stored in data register DT0
(two bytes) is converted to ASCII codes and stored in DT10 and DT11.
Hexadecimal number (DT0)
H ABCD

ASCII code (DT11, DT10)


H 42 41 44 43
BADC
DT11 DT10

WUME-FPXHPGRG-021 15-7
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion)

■ Precautions for programming


1. The two characters that make up one byte are interchanged when stored.
2. Converts two bytes as one section.

Hexadecimal data A B C D

4 2 4 1 4 4 4 3
B A C D
D+1 D
S1 (1) (2) (3) (4) (2) (1) (4) (3)
S1+1 (5) (6) (7) (8)
D+3 D+2
(6) (5) (8) (7)

Hexadecimal data Conversion result

■ Conversion example
The following shows the conversion of hexadecimal number data to ASCII code.

Conversion of 4 bytes (S2 = K4)


[Hexadecimal data] S1+1 S1
EF 12 AB CD

4 bytes

HEXA instruction execution

D+3 D+2 D+1 D


46 45 32 31 42 41 44 43
F E 2 1 B A D C

Converted from S1+1 Converted from S1

Conversion of 3 bytes (S2 = K3)


Since the data to be converted is specified in byte units, it is also possible to convert only the
low byte of one-word data.

15-8 WUME-FPXHPGRG-021
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion)

[Hexadecimal data] S1+1 S1


12 AB CD

3 bytes

HEXA instruction execution

(Conversion result) D+2 D+1 D


32 31 42 41 44 43
2 1 B A D C

■ Reference: ASCII code


Higher
3 4
Lower 0 0 @
1 1 A
2 2 B
3 3 C
4 4 D
5 5 E
6 6 F
7 7 G
8 8 H
9 9 I

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when the conversion range of the number of bytes specified by [S2] exceeds the
R9008 area
(ER) Turns ON when the conversion result exceeds the area
Turns ON when the [S2] specification is"0"

WUME-FPXHPGRG-021 15-9
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion)

15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion)


Converts character strings in ASCII code to hexadecimal numbers.

■ Instruction format

■ Operands
Items Settings
S1 Starting number of the area storing the ASCII code
S2 Area storing the number of ASCII codes (number of characters) to be converted, or constant data
D Number of the start of the area storing the hexadecimal number that is the result of conversion

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The ASCII codes stored in the area specified by [S1] are converted into hexadecimal
numeric data and stored in the area specified by [D].
● The number of ASCII codes (number of characters) to be converted is specified by [S2].
● The volume of the result (hexadecimal numeric data) is half that of the converted ASCII
codes.

■ Operation example
Operation of instruction format description program
When the internal relay R0 turns ON, the ASCII codes stored in data registers DT0 and DT1
(four characters) are converted into hexadecimal numeric data and stored in DT40.

15-10 WUME-FPXHPGRG-021
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion)

ASCII code (DT1, DT0)


H 44 43 42 41
DCBA
DT1 DT0

Value in hexadecimal (DT40)


H CDAB

■ Precautions for programming


1. Two ASCII code characters are converted into two 1-byte numeric digits. At this time, the
upper and lower characters are interchanged.
2. Four characters are converted as one segment of data.
ASCII code string
4 4 4 3 4 2 4 1

C D A B

■ Conversion example
● ASCII codes are converted into hexadecimal data as shown below.

Conversion of eight characters (S2 = K8)


[ASCII code]

S1+3 S1+2 S1+1 S1

32 31 46 45 44 43 42 41

8 characters (8 bytes)

(Conversion result) D+1 D

12 EF CD AB

WUME-FPXHPGRG-021 15-11
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion)

Conversion of seven characters (S2 = K7)

Conversion of six characters (S2 = K6)


[ASCII code]
S1+2 S1+1 S1

46 45 44 43 42 41
F E D C B A

6 characters (6 bytes)

AHEX instruction execution

(Conversion result) D+1 D


EF CD AB

(Note 1) In the conversion results, only the data for the low byte is stored in the D+1 word. The data for the
high byte is left as it is and does not change.
● The conversion results are stored in byte units. If an odd number of characters is being
converted, bits 0 to 3 of the final data (byte) of the conversion results will be filled with"0".

15-12 WUME-FPXHPGRG-021
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion)

ASCII code Conversion range

44 n n-1 n-2

n 0 n-1 n-2

"0" is entered.
(Odd number value specified with n=S2)

■ Reference: ASCII code


Higher
3 4
Lower 0 0 @
1 1 A
2 2 B
3 3 C
4 4 D
5 5 E
6 6 F
7 7 G
8 8 H
9 9 I

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
Turns ON when the conversion range of the number of bytes specified by [S2] exceeds the
R9007 area
R9008 Turns ON when the conversion result exceeds the area
(ER) Turns ON when the [S2] specification is"0"
Turns ON when there is a character code other than 0 to F in the ASCII codes specified by
[S1]

WUME-FPXHPGRG-021 15-13
15.4 F73 BCDA (BCD Data to ASCII Code Conversion)

15.4 F73 BCDA (BCD Data to ASCII Code Conversion)


Converts up to eight digits of BCD data to ASCII code character strings.

■ Instruction format

■ Operands
Items Settings
S1 Starting number of the area storing the BCD numerical value
S2 Area storing data indicating the amount and direction of data to be converted, or constant data
D Starting number of the area storing the ASCII code of conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The BCD data stored in the area specified by [S1] is converted to ASCII code and stored in
the area specified by [D]. Up to four bytes (8 digits) can be converted.
● The amount (number of bytes) of BCD data to be converted and the conversion direction is
specified by [S2].
● The amount of the conversion result (ASCII code) is twice the converted data.

■ Setting the conversion data amount and conversion direction [S2]


Specify a 4-digit BCD (H constant) according to the following format.
S2=H 00

Conversion range
0: Forward direction
1: Reverse direction

Amount of data to convert


1 to 4 bytes
● Since the amount of data to be converted is specified in bytes, it is also possible to convert
only the low byte of one word data.
● Refer to the example for a description of the conversion direction.

15-14 WUME-FPXHPGRG-021
15.4 F73 BCDA (BCD Data to ASCII Code Conversion)

■ Precautions for programming


● The two characters that make up one byte are interchanged when stored.
● Converts two bytes as one section.
Forward Reverse
direction direction

S1 S1
(1)(2) (3)(4) (1)(2) (3)(4)

(2) (1) (4) (3) (4) (3) (2) (1)


D+1 D D+1 D
<Example>
When internal relay R0 turns ON, the BCD data stored in data register DT0 is converted to
ASCII code and stored in DT10.
1. When S2 = H2 (forward direction, 2-byte conversion)
BCD data (DT0)
H 1234

ASCII code (DT11, DT10)


H 32 31 34 33
2143
DT11 DT10
2. When S2 = H1002 (reverse direction, 2-byte conversion)
BCD data (DT0)
H 1234

ASCII code (DT11, DT10)


H 34 33 32 31
4321
DT11 DT10

■ Conversion example
For the above program
The conversion from BCD data to ASCII code is performed as shown below.

WUME-FPXHPGRG-021 15-15
15.4 F73 BCDA (BCD Data to ASCII Code Conversion)

Forward conversion of four bytes (S2 = H0004)


[BCD data] S1+1 S1
12 34 56 78

4 bytes

BCDA instruction execution

D+3 D+2 D+1 D


32 31 34 33 36 35 38 37
2 1 4 3 6 5 8 7

Converted from S1+1 Converted from S1


Reverse conversion of four bytes (S2 = H1004)
[BCD data] S1+1 S1
12 34 56 78

4 bytes

BCDA instruction execution

D+3 D+2 D+1 D

38 37 36 35 34 33 32 31
8 7 6 5 4 3 2 1

Converted from S1+1 Converted from S1

■ Reference: ASCII code


Higher
3
Lower 0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7

15-16 WUME-FPXHPGRG-021
15.4 F73 BCDA (BCD Data to ASCII Code Conversion)

Higher
3
8 8
9 9

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
Turns ON when there is data other than BCD in the data starting with [S1]
R9007
Turns ON when the number of bytes specified by [S2] exceeds the area of [S1]
R9008
Turns ON when the conversion result exceeds the area
(ER)
Turns ON when the number of bytes specified by [S2] is"0"
Turns ON when the number of bytes specified by [S2] is greater than four

WUME-FPXHPGRG-021 15-17
15.5 F74 ABCD (ASCII Code to BCD Data Conversion)

15.5 F74 ABCD (ASCII Code to BCD Data Conversion)


Converts an ASCII character string to 4-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S1 Starting number of the area storing the ASCII code
Area storing data indicating the number of ASCII codes and direction of data to be converted, or
S2
constant data
D Number of the start of the area storing the BCD value that is the result of conversion

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The ASCII codes that are stored in the area starting from the number specified by [S1] are
converted into BCD data and stored in the area starting from the number specified by [D]. A
maximum of eight characters can be converted.
● The number of ASCII codes (number of characters) to be converted and the conversion
direction are specified by [S2].
● The conversion result (BCD data) is half the volume of the converted ASCII code strings.

■ Specification of number of characters to be converted and conversion direction


[S2]
S2=H 00

Conversion range
0: Forward direction
1: Reverse direction

Amount of data to convert


1 to 8 characters

15-18 WUME-FPXHPGRG-021
15.5 F74 ABCD (ASCII Code to BCD Data Conversion)

■ Precautions for programming


● Two ASCII code characters are converted into 1-byte numeric values (two digits). At this
time, the upper and lower characters are interchanged.
● Four characters are stored as one segment of data.
● The conversion results are stored in byte units. If an odd number of characters is being
converted, the conversion result is as follows.
i) Bits 0 to 3 of the final data are filled with"0". (In the forward direction)
ii) Bits 4 to 7 of the final data are filled with"0". (In the reverse direction)
Forward Reverse
direction direction

(2) (1) (4) (3) ASCII code (4) (3) (2) (1)

(1)(2) (3)(4) BCD data (1)(2) (3)(4)

<Example>
When internal relay R0 turns ON, the ASCII codes stored in data registers starting from DT0
are converted to BCD numeric data and stored in DT40.
1. When S2 = H4 (forward direction, 4-byte conversion)
ASCII code (DT1, DT0)
H 34 33 32 31
4321
DT1 DT0

BCD data (DT40)


H 3412
2. When S2 = H1004 (reverse direction, 4-byte conversion)
ASCII code (DT1, DT0)
H 34 33 32 31
4321
DT1 DT0

BCD data (DT40)


H 1234

■ Conversion example
For the above program
ASCII codes are converted into BCD data as shown below.

WUME-FPXHPGRG-021 15-19
15.5 F74 ABCD (ASCII Code to BCD Data Conversion)

Conversion of eight characters (S2 = H0008)


[ASCII code]
S1+3 S1+2 S1+1 S1
38 37 36 35 34 33 32 31
8 7 6 5 4 3 2 1
8 characters (8 bytes)

(Conversion result) D+1 D


78 56 34 12

Conversion of seven characters (S2 = H1007)


[ASCII code]
S1+3 S1+2 S1+1 S1
37 36 35 34 33 32 31
7 6 5 4 3 2 1
7 characters (7 bytes)

ABCD instruction execution


"0" is entered
(Conversion result) D+1 D
01 23 45 67

■ Reference: ASCII code


Higher
3
Lower 0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9

15-20 WUME-FPXHPGRG-021
15.5 F74 ABCD (ASCII Code to BCD Data Conversion)

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
Turns ON when there is a character code other than 0 to 9 in the ASCII codes specified by
[S1]
R9007
R9008 Turns ON when the number of characters specified by [S2] exceeds the area of [S1]
(ER) Turns ON when the conversion result exceeds the area
Turns ON when the number of characters specified by [S2] is"0"
Turns ON when the number of characters specified by [S2] is greater than 8

WUME-FPXHPGRG-021 15-21
15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion)

15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion)


Converts 16-bit BIN data expressing a decimal number to an ASCII code character string.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the hexadecimal data or constant data
S2 Area storing the number of bytes of the area storing the conversion results, or constant data
D Starting number of the area storing the ASCII code of conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data expressing a decimal number specified by [S1] is converted to ASCII code.
The ASCII code is stored in the area specified by [D]. The start of the storage area is
specified by [D] and its size is specified by [S2].
● Specify the number of bytes in [S2] as a decimal number. (This specification cannot be made
with BCD data.)

■ Operation example
Operation of instruction format description program
When internal relay R0 is ON, the 16-bit data (expressing a decimal number) stored in data
register DT0 is converted to ASCII code and stored in DT50 to DT52 (six bytes).

15-22 WUME-FPXHPGRG-021
15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion)

■ Precautions for programming


● If the conversion target is a positive number, a sign code (+) is not added in front of the
numeric data.
● If the conversion target is a negative number, a sign code (–: H2D) is added in front of the
numeric data.
● Any remaining storage area is filled with spaces (H20).
● The position of the ASCII code may change depending on the size of the storage area as
data is filled in the direction of the final address.
D1+3 D1+2 D1+1 D1
30 30 31 2D 20 20 20 20
0 0 1 -

ASCII code Remainder

Range specified in [S2]


● An operation error occurs if the number of bytes of ASCII codes following conversion
(including the minus sign) is larger than the number of bytes specified by S2. When
specifying S2, make sure the number of digits to be converted including the sign is taken into
consideration.

■ Conversion example
The conversion from a 16-bit decimal number to ASCII code is performed as follows.

When converting a negative number


[16-bit data] S1

FF 9C

K-100

D+2 D+1 D

30 30 31 2D 20 20

0 0 1 -

ASCII code Remainder

Range specified in [S2] (6 bytes)

WUME-FPXHPGRG-021 15-23
15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion)

When converting a positive number


[16-bit data] S1

04 D2

K1234

(Conversion result) D+2 D+1 D

34 33 32 31 20 20

4 3 2 1

ASCII code Remainder

Range specified in [S2] (6 bytes)

■ Reference: ASCII code


Higher
3
Lower 0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
Turns ON when the number of bytes specified by [S2] exceeds the area specified by [D]
R9007
Turns ON when the number of bytes specified by [S2] is"0"
R9008
(ER) Turns ON when the conversion result exceeds the area
Turns ON when the number of bytes of the conversion result exceeds the number of bytes
specified by [S2]

15-24 WUME-FPXHPGRG-021
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion)

15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion)


Converts an ASCII code character string expressing a decimal number to 16-bit BIN data.

■ Instruction format

■ Operands
Items Settings
S1 Starting number of the area storing the ASCII code to be converted
S2 Area storing the number of bytes of data to be converted, or constant data
D Area to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The ASCII code expressing a decimal value of the number of bytes (number of characters)
specified by [S2] starting from the area specified by [S1] is converted to a decimal value (16-
bit K constant). The decimal value is stored in the area specified by [D].
● Specify the number of bytes in [S2] as a decimal number. (This specification cannot be made
with BCD data.)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the ASCII code stored in data registers DT0 to DT2 (6 bytes)
is converted to a decimal number (16-bit data), and stored in DT50.
ASCII code (DT2 to DT0)
H 30 30 31 2D 30 30
001 -
DT2 DT1 DT0

16-bit data (DT50)


K-100

WUME-FPXHPGRG-021 15-25
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion)

■ Precautions for programming


● Store the ASCII code for conversion in the direction of the final address of the specified area.
● Fill the remaining bytes with"0"(H30) or spaces (H20).
● Signed ASCII codes (+: H2B, -: H2D) are also converted. The + sign can be omitted.

■ Conversion example
Conversion of ASCII code to a 16-bit decimal number is performed as shown below.

Example of conversion of an ASCII code expressing a negative number


[ASCII code]
S1+2 S1+1 S1
30 30 31 2D 30 30
0 0 1 - (0) (0)

ASCII code Remainder

Range specified in [S2]

ABIN instruction execution

(Conversion result) D
FF 9C
K-100

15-26 WUME-FPXHPGRG-021
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion)

Example of conversion of an ASCII code expressing a positive number


Example (1)
[ASCII code]
S1+2 S1+1 S1

30 30 31 2B 30 30
0 0 1 +

ASCII code Remainder

Range specified in [S2]


Example (2)

[ASCII code]
S1+2 S1+1 S1
30 30 31 2D 30 30

0 0 1

ASCII code Remainder

Range specified in [S2]

ABIN instruction execution

D
00 64

K100

■ Reference: ASCII code


Higher
3
Lower 0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8

WUME-FPXHPGRG-021 15-27
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion)

Higher
3
9 9

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
Turns ON when the number of bytes specified by [S2] exceeds the area of [S1]
R9007 Turns ON when the number of bytes specified by [S2] is"0"
R9008 Turns ON when the conversion result exceeds the area
(ER)
Turns ON when the conversion result exceeds 16 bits of data
Turns ON when an ASCII code containing characters other than the numbers 0 to 9, signed
code, or spaces is specified for [S1]

15-28 WUME-FPXHPGRG-021
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion)

15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion)


Converts 32-bit BIN data expressing a decimal number to an ASCII code character string.

■ Instruction format

■ Operands
Items Settings
S1 Starting number of the area storing 32-bit data, or constant data
S2 Area storing the number of bytes of the area storing the conversion results, or constant data
D Starting number of the area storing the ASCII code of conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The 32-bit data expressing a decimal number specified by [S1] is converted to ASCII code.
The ASCII code is stored in the area starting with the area specified by [D]. The start of the
storage area is specified by [D] and the number of bytes is specified by [S2].
● Specify the number of bytes in [S2] as a decimal number (K constant).

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the 32-bit data stored in data registers DT0 and DT1 is
converted to ASCII code expressing a decimal number and stored in DT50 to DT54 (10 bytes).
32-bit data (DT0, DT1)
K12345678

ASCII codes DT50 to DT54:


H 3837 36 35 34 33 32 31 20 20
8 7 6 5 4 3 2 1
DT54 DT53DT52 DT51 DT50

WUME-FPXHPGRG-021 15-29
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion)

■ Precautions for programming


● If the conversion target is a positive number, a sign code (+) is not added in front of the
numeric data.
● If the conversion target is a negative number, a sign code (–: H2D) is added in front of the
numeric data.
● Any remaining storage area is filled with spaces (H20).
● The position of the ASCII code may change depending on the size of the storage area as
data is filled in the direction of the final address.
● An operation error occurs if the number of bytes of ASCII codes following conversion
(including the minus sign) is larger than the number of bytes specified by S2. When
specifying S2, make sure the number of digits to be converted including the sign is taken into
consideration.

■ Conversion example
The following shows conversion of a 32-bit decimal number to ASCII codes.

When converting a negative number


[16-bit data] S1+1 S1
FF 43 9E B2

K-12345678

D+4 D+3 D+2 D+1 D


38 37 36 35 34 33 32 31 2D 20
8 7 6 5 4 3 2 1 -

ASCII code Remainder

Range specified in [S2] (10 bytes)

15-30 WUME-FPXHPGRG-021
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion)

When converting a positive number


[32-bit data] S1+1 S1
00 BC 61 4E

K12345678

D+3 D+2 D+1 D


38 37 36 35 34 33 32 31
8 7 6 5 4 3 2 1

ASCII code

Range specified in [S2] (8 bytes)

■ Reference: ASCII code


Higher
3
Lower 0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
Turns ON when the number of bytes specified by [S2] exceeds the area specified by [D]
R9007
Turns ON when the number of bytes specified by [S2] is"0"
R9008
(ER) Turns ON when the conversion result exceeds the area
Turns ON when the number of bytes of the conversion result exceeds the number of bytes
specified by [S2]

WUME-FPXHPGRG-021 15-31
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion)

15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion)


Converts an ASCII code character string expressing a decimal number to 32-bit BIN data.

■ Instruction format

■ Operands
Items Settings
S1 Starting number of the area storing the ASCII code to be converted
Area storing the numerical values (number of bytes = number of characters) representing the range to
S2
be converted, or constant data
D Number of the start of the area storing the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The ASCII code string expressing a decimal value of the number of bytes (number of
characters) specified by [S2] starting from the area specified by [S1] is converted to a
decimal value (32-bit K constant). The decimal value is stored in two words starting from the
area specified by [D].
● Specify the number of bytes in [S2] as a decimal number.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the ASCII codes stored in data registers DT0 to DT4 (10
bytes) are converted to decimal numbers, and stored in DT50 and DT51.
ASCII code (DT0 to DT4)
H 3837 36 35 34 33 32 31 20 20
8 7 6 5 4 3 2 1
DT4 DT3 DT2 DT1 DT0

32-bit data (DT50, DT51)


K 12345678

15-32 WUME-FPXHPGRG-021
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion)

■ Precautions for programming


● Store the ASCII code for conversion in the direction of the final address of the specified area.
● Fill the remaining bytes with"0"(H30) or spaces (H20).
● Signed ASCII codes (+: H2B, -: H2D) are also converted. The + sign can be omitted.

■ Conversion example
Conversion of ASCII code to a 32-bit decimal number is performed as shown below.

Example of conversion of an ASCII code string expressing a negative number


[ASCII code]
S1+4 S1+3 S1+2 S1+1 S1
38 37 36 35 34 33 32 31 2D 20
8 7 6 5 4 3 2 1 -

ASCII code Remainder

Range specified in [S2] (10 bytes)

DABI instruction execution

(Conversion result) D+1 D


FF 43 9E B2

K-12345678

WUME-FPXHPGRG-021 15-33
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion)

Example of conversion of an ASCII code expressing a positive number


Example (1)
[ASCII code]
S1+3 S1+2 S1+1 S1

38 37 36 35 34 33 32 31

8 7 6 5 4 3 2 1

ASCII code

Range specified in [S2] (8 bytes)


Example (2)

[ASCII code]
S1+4 S1+3 S1+2 S1+1 S1
38 37 36 35 34 33 32 31 2B 20
8 7 6 5 4 3 2 1 +

ASCII code Remainder

Range specified in [S2] (10 bytes)

DABI instruction execution

D+1 D
00 BC 61 4E

K12345678

■ Reference: ASCII code


Higher
3
Lower 0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7

15-34 WUME-FPXHPGRG-021
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion)

Higher
3
8 8
9 9

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
Turns ON when the number of bytes specified by [S2] exceeds the area of [S1]
R9007 Turns ON when the number of bytes specified by [S2] is"0"
R9008 Turns ON when the conversion result exceeds the area
(ER)
Turns ON when the conversion result exceeds 32 bits of data
Turns ON when an ASCII code containing characters other than the numbers 0 to 9, signed
code, or spaces is specified for [S1]

WUME-FPXHPGRG-021 15-35
15.10 F80 BCD (16-bit Binary Data to BCD Data Conversion)

15.10 F80 BCD (16-bit Binary Data to BCD Data Conversion)


Converts 16-bit binary data to 4-digit BCD.

■ Instruction format

■ Operands
Items Settings
S Target data: Area storing 16-bit data, or constant data
D Storage destination: Area storing 4-digit BCD data following conversion

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data expressing a decimal number specified by [S] is converted to 4-digit BCD
data and stored in the area specified by [D].

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the contents of data register DT10 are converted to 4-digit
BCD data and stored in data register DT20.
If DT10 is converted decimal number 16, the following will be stored in DT20.

DT10 K16 when


converted to
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 decimal

Convert to BCD

DT20
0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0

0 0 1 6 (BCD)

15-36 WUME-FPXHPGRG-021
15.10 F80 BCD (16-bit Binary Data to BCD Data Conversion)

■ Precautions for programming


● The maximum value of 16-bit data that can be converted is K9999 (H270F).

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008 Turns ON when the binary data exceeds the range that can be converted to BCD (when
(ER) negative, or over K9999)

WUME-FPXHPGRG-021 15-37
15.11 F81 BIN (BCD Data to 16-bit Binary Data Conversion)

15.11 F81 BIN (BCD Data to 16-bit Binary Data Conversion)


Converts 4-digit BCD data to 16-bit binary data.

■ Instruction format

■ Operands
Items Settings
S Target data: Area storing 4-digit BCD data, or constant data
D Storage destination: Area storing converted binary data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The 4-digit BCD data specified by [S] is converted to 16-bit data expressing a decimal number
and stored in the area specified by [D].

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT10 is converted to 16-bit data
expressing a decimal number and stored in data register DT20. If DT10 is BCD data consisting
of H15, the following will be stored in DT20.

DT10
0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1

0 0 1 5 (BCD)
Converted to BIN

DT20 K15 when


converted to
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 decimal

15-38 WUME-FPXHPGRG-021
15.11 F81 BIN (BCD Data to 16-bit Binary Data Conversion)

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON if [S] is not BCD data
(ER)

WUME-FPXHPGRG-021 15-39
15.12 F82 DBCD (32-bit Binary Data to BCD Data Conversion)

15.12 F82 DBCD (32-bit Binary Data to BCD Data Conversion)


Converts 32-bit binary data to 8-digit BCD data.

■ Instruction format

■ Operands
Items Settings
S Target data: Area storing 32-bit data, or constant data
D Storage destination: Area storing 8-digit BCD data following conversion

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The 32-bit data specified by [S] expressing a decimal number is converted to 8-digit BCD data
and stored in the area specified by [D].

■ Operation example
Operation of instruction format description program
When internal relay R20 turns ON, the content of data registers DT10 and DT11 is converted to
8-digit BCD data, and stored in DT21 and DT22.

■ Precautions for programming


The maximum value of binary data that can be converted is K99999999 (H5F5E0FF).

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008 When the binary data exceeds the range that can be converted to BCD data (when the
(ER) value is negative or exceeds K99999999)

15-40 WUME-FPXHPGRG-021
15.13 F83 DBIN (BCD Data to 32-bit Binary Data Conversion)

15.13 F83 DBIN (BCD Data to 32-bit Binary Data Conversion)


Converts 8-digit BCD data to 32-bit binary data.

■ Instruction format

■ Operands
Items Settings
S Target data: Area storing 8-digit BCD data, or constant data
D Storage destination: Area storing converted binary data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The 8-digit BCD data specified by [S] is converted to 32-bit data expressing a decimal number
and stored in the area specified by [D].

■ Operation example
Operation of instruction format description program
When internal relay R20 turns ON, the value expressing the 8-digit BCD data in data registers
DT10 and DT11 is converted to 32-bit data (K constant) and stored in DT20 and DT21.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON if [S] is not BCD data
(ER)

WUME-FPXHPGRG-021 15-41
15.14 F84 INV (16-bit Data Invert)

15.14 F84 INV (16-bit Data Invert)


Inverts 16-bit data.

■ Instruction format

■ Operands
Items Settings
D Area that stores the data to invert

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Inverts 1 (ON) and 0 (OFF) of each bit of the 16-bit data specified by [D].
● This instruction can be used to output to 7-segment display that uses negative logic
operation.

■ Operation example
Operation of instruction format description program
Inverts the contents of data register DT0 when internal relay R20 turns ON.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

15-42 WUME-FPXHPGRG-021
15.15 F85 NEG (16-bit Data Sign Inversion)

15.15 F85 NEG (16-bit Data Sign Inversion)


Takes complement of 2 in hexadecimal data.

■ Instruction format

■ Operands
Items Settings
D Area for storing original data and its complement of 2

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Inverts the content of hexadecimal data specified by [D] and adds +1 (takes complement of
2).
● Useful for inverting the signs of 16-bit data.

■ Operation example
Operation of instruction format description program
Inverts the content of data register DT0 and adds +1 when internal relay R20 turns ON.

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
DT0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
(K3)
R20:ON

DT0: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1
(K-3)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 15-43
15.16 F86 DNEG (32-bit Data Sign Inversion)

15.16 F86 DNEG (32-bit Data Sign Inversion)


Takes complement of 2 in 32-bit data.

■ Instruction format

■ Operands
Items Settings
D Starting number of area for storing original data and its complement of 2

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Inverts the content of 32-bit data specified by [D] and [D+1] and adds +1.
● Useful for inverting the signs of 32-bit data.

■ Operation example
Operation of instruction format description program
Inverts the 32-bit content of DT0 and DT1 and adds +1 when internal relay R20 turns ON.

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
DT0: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1

DT1: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
(K-3)
R20:ON

DT0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

DT1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(K3)

15-44 WUME-FPXHPGRG-021
15.16 F86 DNEG (32-bit Data Sign Inversion)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 15-45
15.17 F87 ABS (Absolute Value of 16-bit Data)

15.17 F87 ABS (Absolute Value of 16-bit Data)


Calculates the absolute value of signed 16-bit data.

■ Instruction format

■ Operands
Items Settings
D Area storing the data for which the absolute value will be calculated

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The absolute value of the signed 16-bit data specified by [D] is calculated and stores in [D].
● This is effective for processing data in which the polarity (+ or - ) changes.

■ Operation example
Operation of instruction format description program
When internal relay R20 turns ON, the absolute value of the value of data register DT0 is
calculated. For instance, regardless of whether the value of DT0 is K1 or K-1, it will be K1 when
this instruction is executed.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the minimum value is negative (H8000)
(ER)
R9009
Turns ON when the value is negative (other than the minimum)
(CY)

15-46 WUME-FPXHPGRG-021
15.18 F88 DABS (Absolute Value of 32-bit Data)

15.18 F88 DABS (Absolute Value of 32-bit Data)


Calculates the absolute value of signed 32-bit data.

■ Instruction format

■ Operands
Items Settings
D Starting number of the area storing the data for which the absolute value will be calculated

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The absolute value of the signed 32-bit data stored in [D] and [D+1] is calculated and stored
in [D] and [D+1].
● This is effective for processing data in which the polarity (+ or - ) changes.

■ Operation example
Operation of instruction format description program
When internal relay R20 turns ON, the absolute value of the signed 32-bit data in DT0 and DT1
is calculated and stored in DT0 and DT1.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the minimum value is negative (H80000000)
(ER)
R9009
Turns ON when the value is negative (other than the minimum)
(CY)

WUME-FPXHPGRG-021 15-47
15.19 F89 EXT (Sign Extension)

15.19 F89 EXT (Sign Extension)


Extends 16-bit data to 32-bit data without changing signs or values.

■ Instruction format

■ Operands
Items Settings
D Area where data for sign extension is stored

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Converts 16-bit data to 32-bit data without changing its signs or values.
● If the sign bit (bit 15) of the 16-bit data specified in [D] is 0, all 16 bits in the area following [D]
become 0. If the sign bit is 1, all 16 bits become 1. Thus, 16-bit data is converted to 32-bit
data without its signs or values being changed.
● After execution of the F89 EXT instruction, double word data starting at [D] can be used as
an operand for a 32-bit operation instruction.

■ Operation example
Operation of instruction format description program
When the internal relay R20 is ON, all 16 bits of DT1 are filled with the content of bit 15 of the
data in DT0. If K-2 is stored in DT0, the data will be as follows.

15-48 WUME-FPXHPGRG-021
15.19 F89 EXT (Sign Extension)

Sign bit (0: Positive, 1: Negative)


15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
DT0: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
K-2 (16-bit data)
R20:ON

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
DT0: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

DT1: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
K-2 (32-bit data)
■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 15-49
15.20 F90 DECO (Decode)

15.20 F90 DECO (Decode)


Decodes the specified data.

■ Instruction format

■ Operands
Items Settings
S Area storing conversion data, or constant data
n Area storing the control data, or constant data
D Starting address of the area storing the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The part of the data specified by [S] is decoded and the decoded result is stored in the area
specified by [D].
● The part to be decoded is specified by control data [n].
● The length of the area required to store the decoded result depends on the length of the data
to be decoded.

■ Operation example
Operation of instruction format description program
When internal relay R20 turns ON, the part of data register DT10 specified by [n] = H404 (H
constant) is decoded and the result is stored in data register DT20.

e.g. When the value (control data) of [n] is H404


Bit 4

DT10: 0 1 0 0 0 1 1 0 0 1 1 1 1 0 0 1

4 bits long

15-50 WUME-FPXHPGRG-021
15.20 F90 DECO (Decode)

The decoded result for the specified part ("0111"= 7) is stored in the 24bit area starting from
DT20.

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
DT20: 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0

Bit 7 of the 24bit area starting from DT20 is turned ON, and the other bits are set to 0.

■ Specifying the data to be decoded (control data [n])


Specify the conversion start bit and conversion effective bit length.

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
n: - - - - 0 0 0 0 - - - - 0 0 0 0

nH (Specifies the conversion start bit)


Bit 0: H0

Bit 15: HF
nL (Specifies the effective
bit length for conversion)
1 bit: H1

8 bits: H8
The effective bit length of the decoded result is 2nLbits.
See the table below for the effective bit length and occupied length of the result.

e.g. When control data [n] is H0404 and the data to be decoded is the 4 bits from bit
4 in the area specified by [S].

Specification of nL and length of result


Effective bit length Occupation length of Effective bit length Value other than
for <nL value> decoded result of decoded result effective bit length in D
conversion
1 1 word 2-bit 0
2 1 word 4-bit 0
3 1 word 8 bits 0
4 1 word 16 bits -

WUME-FPXHPGRG-021 15-51
15.20 F90 DECO (Decode)

Effective bit length Occupation length of Effective bit length Value other than
for <nL value> decoded result of decoded result effective bit length in D
conversion
5 2 words 32 bits -
6 4 words 64 bits -
7 8 words 128 bits -
8 16 words 256 bits -

Conversion example
When decoding 4-bit data (nL = 4), the contents of the conversion data and the decoded result
are as follows.
Conversion data Decoded result
0000 0000000000000001
0001 0000000000000010
0010 0000000000000100
0011 0000000000001000
0100 0000000000010000
0101 0000000000100000
0110 0000000001000000
0111 0000000010000000
1000 0000000100000000
1001 0000001000000000
1010 0000010000000000
1011 0000100000000000
1100 0001000000000000
1101 0010000000000000
1110 0100000000000000
1111 1000000000000000

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when the effective bit length for conversion (nL) is not 1 ≤ nL ≤ 8
R9008 Turns ON (integrity) when the conversion start bit No. (nH) and conversion effective bit
(ER) length (nL) are not 1 ≤ (nH + nL) ≤ 16
Turns ON when the decoded result exceeds the area specified by [D] when stored

15-52 WUME-FPXHPGRG-021
15.21 F91 SEGT (7-segment)

15.21 F91 SEGT (7-segment)


Converts specified 16-bit data to 4-digit data for 7-segment display.

■ Instruction format

■ Operands
Items Settings
S Area storing conversion data, or constant data
D Starting address of the area storing the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Converts 16-bit data specified by [S] to four-digit data for 7-segment display, and stores this
in the area starting from the two-word area specified by [D].
● Refer to the table below for the relationship between the displayed contents, the contents
specified for [S], and the 7-segment display data.

■ Operation example
Operation of instruction format description program
Converts the contents of data register DT0 to 7-segment display data when internal relay R20
turns ON. The converted results are stored in data registers DT10 and DT11. For example, to
display"ABCD", the following would be entered.
1. DT0 is set to H ABCD.

2. When the content of DT0 is converted to 7-segment display data, it is as follows.

WUME-FPXHPGRG-021 15-53
15.21 F91 SEGT (7-segment)

■ Relationship between display content and data


Data for 7-segment display 1 digit [D]
Value 7-segment display
[S] g f e d c b a
0 0 0 0 0 0 0 1 1 1 1 1 1
1 0 0 0 1 0 0 0 0 0 1 1 0
2 0 0 1 0 0 1 0 1 1 0 1 1 LSB
3 0 0 1 1 0 1 0 0 1 1 1 1 a
4 0 1 0 0 0 1 1 0 0 1 1 0 b
5 0 1 0 1 0 1 1 0 1 1 0 1 c a

6 0 1 1 0 0 1 1 1 1 1 0 1 d
f b
7 0 1 1 1 0 0 1 0 0 1 1 1 e g

8 1 0 0 0 0 1 1 1 1 1 1 1 f
e c
9 1 0 0 1 0 1 1 0 1 1 1 1 g
A 1 0 1 0 0 1 1 1 0 1 1 1 d

B 1 0 1 1 0 1 1 1 1 1 0 0 MSB
C 1 1 0 0 0 0 1 1 1 0 0 1
D 1 1 0 1 0 1 0 1 1 1 1 0
E 1 1 1 0 0 1 1 1 1 0 0 1
F 1 1 1 1 0 1 1 1 0 0 0 1

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008 Turns ON when the area is exceeded when conversion results are stored in the area
(ER) specified by [D]

15-54 WUME-FPXHPGRG-021
15.22 F92 ENCO (Encode)

15.22 F92 ENCO (Encode)


Encodes the specified data.

■ Instruction format

■ Operands
Items Settings
S Starting address of the area storing conversion data
n Area storing the control data, or constant data
D Area to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Encodes a section of the data specified in [S], and stores the encoded result in the area
specified in [D].
● The target section to be encoded is specified by the control data [n].
● If multiple bits are ON in the target section for encoding, the higher bit is enabled.
● The content of the 2nLbits starting from the area specified in [S] are encoded. The encoded
result is stored as a decimal, within the 8 bits starting from the bit specified in nH.
● Sections of the area specified in [D] that are not storing the conversion result will be 0.

■ Operation example
Operation of instruction format description program
When the internal relay R20 is ON, the bit area (data register starting at DT10) specified in [n] =
H5 (H constant) is encoded, and the result is stored in DT20.

When the value of [n] (control data) is H5


The effective bits for conversion are the 32-bit section from DT10 (DT10 to DT11). The bit
numbers that are ON in this two-word area are stored as decimals from bit 0 of DT20.

WUME-FPXHPGRG-021 15-55
15.22 F92 ENCO (Encode)

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0
DT10: 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

DT11: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 8 counted from the least
significant bit of DT10 is ON

Result output start bit

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0
DT20: 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

0 is stored Encoding result K8

■ Specifying the target to be encoded (control data [n])


Specifies the effective bit length for conversion and the starting bit for output of the result.

15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
n: - - - - 0 0 0 0 - - - - 0 0 0 0

nH (Specifies the conversion start bit)


Bit 0: H0

Bit 15: HF
nL (Specifies the effective
bit length for conversion)
Effective bit length for conversion nL= bits
2
21 bits: H1

28 bits: H8

e.g. When the control data [n] is H0005


The target to be encoded is the 25bits (32-bit = two words) starting from the area specified by
[S].

S+1 S

Effective bit length


for conversion
The result is stored from bit 0 in the area specified by [D].

15-56 WUME-FPXHPGRG-021
15.22 F92 ENCO (Encode)

Specification of nL and length of result


Value of nL Effective bit length for conversion
1 2-bit
2 4-bit
3 8-bit (one byte)
4 16-bit (one word)
5 32-bit (two words)
6 64-bit (four words)
7 128-bit (eight words)
8 256-bit (16 words)

Conversion example
When encoding 16-bit data (nL = 4), the content of the conversion data and the encoding result
will be as follows.
Conversion data (16-bit) Encoding result
0000 0000 0000 0001 0000
0000 0000 0000 0010 0001
0000 0000 0000 0100 0010
0000 0000 0000 1000 0011
0000 0000 0001 0000 0100
0000 0000 0010 0000 0101
0000 0000 0100 0000 0110
0000 0000 1000 0000 0111
0000 0001 0000 0000 1000
0000 0010 0000 0000 1001
0000 0100 0000 0000 1010
0000 1000 0000 0000 1011
0001 0000 0000 0000 1100
0010 0000 0000 0000 1101
0100 0000 0000 0000 1110
1000 0000 0000 0000 1111

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when the effective bit length for conversion (nL) is not 1 ≤ nL ≤ 8
R9008 Turns ON when the result output start bit no. (nH) and the effective bit length for conversion
(ER) (nL) is not 1 ≤ (nH + nL) ≤ 16 (consistency)
Turns ON when all the data to be encoded is"0"

WUME-FPXHPGRG-021 15-57
15.23 F93 UNIT (Digit Combine)

15.23 F93 UNIT (Digit Combine)


Combines the lower order 4 bits (bits 0 to 3) of 16-bit data.

■ Instruction format

■ Operands
Items Settings
S The starting address of the area that stores the data to be combined
n Area storing the number of data to be combined, or constant data
D Area that stores the combined data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The lower 4 bits of n points of data from the area specified by [S] are stored in order 4 bits at
a time from the lower order of the area specified by [D].
● The number of data areas to be combined [n] can be specified within the range 0 to 4.
● When n = 0, no operation takes place.
● If n < 4, the remainder of [D] is filled with"0".

15-58 WUME-FPXHPGRG-021
15.23 F93 UNIT (Digit Combine)

■ Operation example
Operation of instruction format description program
When internal relay R20 is ON, the lower 4 bits from data register 10, the lower 4 bits from
DT11, and the lower 4 bits from DT12 are each stored from the lower order of DT20 4 bits at a
time.

If [n] is less than 4, the 4 bits corresponding to the output destination are filled with"0".

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON if the number of data areas to be combined [n] is n ≥ 5
(ER)

WUME-FPXHPGRG-021 15-59
15.24 F94 DIST (Digit Distribute)

15.24 F94 DIST (Digit Distribute)


Divides 16-bit data into four 4-bit units and distributes it.

■ Instruction format

■ Operands
Items Settings
S Area storing the 16-bit data to be divided, or constant data
n Area storing the number of data items to be divided, or constant data
D Starting address of the area storing each divided digit

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [S] is divided into 4-bit (1-digit) units, and the digits specified by
[n] are each stored in the lower 4 bits (bit positions 0 to 3) of n areas in order starting from
the area specified by [D].
● The range of the number of data divisions that can be specified [n] is 0 to 4.
● When n = 0, no operation takes place.

15-60 WUME-FPXHPGRG-021
15.24 F94 DIST (Digit Distribute)

■ Operation example
Operation of instruction format description program
When internal relay R20 turns ON, the data of data register DT10 is divided into 4 bits from the
low bit, and 1 digit each is stored in order in the lower 4 bits of data registers DT20 to DT23.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when the number of divided data items [n] is equal to or greater than 5
R9008
(ER) Turns ON when the area is exceeded when distributing n data items to the address
specified by [D]

WUME-FPXHPGRG-021 15-61
15.25 F96 SRC (16-bit Data Search)

15.25 F96 SRC (16-bit Data Search)


Searches for the specified 16-bit data from the area in the specified range (table).

■ Instruction format

■ Operands
Items Settings
S1 Area storing the data to be searched, or constant data
S2 Search table starting address
S3 Search table ending address

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ●

■ Outline of operation
● The search data comprised of the 16-bit data specified by [S1] is searched for in the area
(table) in the range specified by [S2] and [S3].
The search results are stored as follows.
1. The number of registers that have the same value is stored as a decimal number in
special data register DT90037.
2. The position of the first matching register is stored in special data register DT90038 at a
relative position to [S2].
● [S2] specifies the starting address, and [S3] the ending address for the table.
● Specify the same type of memory area for [S2] and [S3]. Additionally, specify values so that
[S2] is equal to or less than [S3].
● Data is searched in the direction from [S2] to [S3].

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, data that is the same content as the data in data register
DT10 is searched in the range of data registers DT20 to DT40.
For example, to search the area of the value H1234, H1234 is written to DT10.

15-62 WUME-FPXHPGRG-021
15.25 F96 SRC (16-bit Data Search)

Search data Search table


DT10 12 34 DT20 12 11 0 [S2]
[S1] DT21 12 FF 1
DT22 12 34 2
DT23 7F FF 3

DT39 12 34 19
DT40 12 34 20 [S3]

Relative position number


If DT22, DT39, and DT40 match the searched data, the following occurs.
1. If the number of registers matching the searched data equals 3
"K3"is stored in DT90037.
2. If the position of the first matching data (the relative position number) equals 2
"K2"is stored in DT90038.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
ON when [S2] > [S3]
(ER)

WUME-FPXHPGRG-021 15-63
15.26 F97 DSRC (32-bit Data Search)

15.26 F97 DSRC (32-bit Data Search)


Searches for specified 32-bit data in any area range (table).

■ Instruction format

■ Operands
Items Settings
S1 Area storing the data to search for, or constant data (32-bit)
S2 Address of the search table starting area (32-bit)
S3 Address of the search table ending area (32-bit)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Searches the area range (table) specified by [S2] and [S3] for the 32-bit search data
specified by [S1].
The search results are stored as follows.
1. The number of registers with the same value is stored in special data register DT90037.
2. The position of the first matching register is stored in special data register DT90038 at a
relative position to [S2].
● [S2] specifies the starting address, and [S3] the ending address for the table.
● Specify the same type of memory area for [S2] and [S3]. Additionally, specify values so that
[S2] is equal to or less than [S3].
● Data is searched in the direction from [S2] to [S3].

■ Operation example
Operation of instruction format description program
Searches data registers DT20 through DT40 for the same data as that in data registers DT10
and DT11 when execution condition R0 turns on.
For example, to search the area for the value "H01234567", write "H01234567" to DT10 and
DT11.

15-64 WUME-FPXHPGRG-021
15.26 F97 DSRC (32-bit Data Search)

Search data Search table


DT11, DT10 01 2 3 4 5 6 7 DT21, DT20 0 1 2 3 5 7 6 4 0 [S2]
[S1] DT23, DT22 1 2 F F 1 2 F F 1
DT25, DT24 0 1 2 3 4 5 6 7 2
DT27, DT26 7 F F F F F F F 3

DT39, DT38 0 1 2 3 4 5 6 7 9
DT41, DT40 0 1 2 3 4 5 6 7 10 [S3]

If "DT24, DT25", "DT38, DT39", and "DT40, DT41" match the searched data, the following
occurs.
1. If the number of registers matching the searched data equals 3
"K3" is stored in DT90037.
2. If the position of the first matching data (the relative position number) equals 2
"K2" is stored in DT90038.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
ON when [S2] > [S3]
(ER)

WUME-FPXHPGRG-021 15-65
15.27 F230 TMSEC (Time data to second conversion)

15.27 F230 TMSEC (Time data to second conversion)


Converts the specified time of day data (year, month, day, hour, minute, second) into number of
seconds.

■ Instruction format

■ Operands
Items Settings
S Area storing the data to be converted, or constant data
D Area to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The input time data [S to S+2] is converted from standard time (*1) to number of seconds
and the conversion result is stored in [D, D+1] as a 32-bit integer value.
(*1): Standard time is 00:00'00" on January 1, '01. The conversion result is output as a binary
value.
● Time data conversion outputs time that takes into account leap years.
1 minute 60 seconds conversion
1 hour 60 minutes conversion
1 day 24 hours conversion
1 year (leap year) 366 days conversion
1 year (regular year) 365 days conversion
Leap year 2/29 (every 4 years)

● The time data (S) must be specified as BCD data and a value within the range must be
registered.

15-66 WUME-FPXHPGRG-021
15.27 F230 TMSEC (Time data to second conversion)

Time data (S) (BCD)


(Higher) (Lower)

S: Minutes (H00 to H59) Seconds (H00 to H59)

S+1: Day (H01 to H31) Hour (H01 to H23)

S+2: Year (H00 to H99) Month (H00 to H12)

Seconds data (D) (32-bit integer)

D: Seconds data (Higher)

D+1: (H00000000 to HBC19137F) (Lower)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the time data of data registers DT10 to DT12 is converted
from standard time to number of seconds and the result is stored in DT20 and DT21.

Example 1)

(Higher) (Lower)
DT10 H37 H26 H039CDD06 DT20
DT11 H03 H12 (Binary value) DT21
DT12 H02 H12 (60, 611, 846 seconds)

(02/12/03 – 12:37:26) (2002)

Example 2)

(Higher) (Lower)
DT10 H59 H59 HBC19137F DT20
DT11 H31 H23 (Binary value) DT21
DT12 H00 H12 (3,155,759,999 seconds)

(00/12/31 - 23:59:59) (2100)

Correspondence between time of day data and second data


Time data (S) Second data (D)
2001 '01/01/01 00:00:00 H00000000
: '01/01/01 00:00:01 H00000001
: : :
: '01/01/01 00:01:00 H0000003C
: : :

WUME-FPXHPGRG-021 15-67
15.27 F230 TMSEC (Time data to second conversion)

Time data (S) Second data (D)


: '01/01/01 01:00:00 H00000E10
: : :
: '01/01/01 00:00:00 H00015180
: : :
2099 '99/12/31 23:59:59 HBA368E7F
2100 '00/01/01 00:00:00 HBA368E80
: : :
2100 '00/12/31 23:59:59 HBC19137F

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when a value other than BCD is specified for [S]
R9008 Turns ON when a value that exceeds the range is specified for any one of month, day, hour,
(ER) minute, or second in the time data of [S]
Turns ON when the data of [S] exceeds the area

15-68 WUME-FPXHPGRG-021
15.28 F231 SECTM (Second to Time Data Conversion)

15.28 F231 SECTM (Second to Time Data Conversion)


The specified number of seconds is changed into time data (year/month/day/hour/minute/
second).

■ Instruction format

■ Operands
Items Settings
S Area storing the number of seconds (32 bits)
D Starting area storing the time data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The input number of seconds [S to S+2] is converted to the time data based on the standard
time (*1), and stored in [D, D+1].
(*1): Standard time is 00:00'00" on January 1, '01.
● Time data conversion outputs time that takes into account leap years.
1 minute 60 seconds conversion
1 hour 60 minutes conversion
1 day 24 hours conversion
1 year (leap year) 366 days conversion
1 year (regular year) 365 days conversion
Leap year 2/29 (every 4 years)

● The number of seconds (S) must be within a range of values that can be expressed in time
data, equaling up to 100 years.
H 0 to H BC19137F Normal conversion
H BC191380 to H FFFFFFFF Conversion error

WUME-FPXHPGRG-021 15-69
15.28 F231 SECTM (Second to Time Data Conversion)

Seconds data (S) (32-bit integer)

S: Seconds data (Lower)

S+1: (H00000000 to HBC19137F) (Higher)

Time of day data (D) (BCD)

(Higher) (Lower)

D: Minutes (H00 to H59) Seconds (H00 to H59)

D+1: Day (H01 to H31) Hour (H01 to H23)

D+2: Year (H00 to H99) Month (H00 to H12)

■ Operation example
Operation of instruction format description program
When the internal relay R0 is ON, the number of seconds for the data registers DT0 and DT1 is
converted to the time data based on the standard time, and stored in DT10 to DT12.

Example 1)

(Higher) (Lower)
DT0 H039D0A6A H51 H06 DT10
DT1 (Binary value) H03 H15 DT11
(60, 623, 466 seconds) H02 H12 DT12

(02/12/03 – 15:51:06) (2002)

Example 2)

(Higher) (Lower)
DT0 HBC19137F H59 H59 DT10
DT1 (Binary value) H31 H23 DT11
(3,155,759,999 seconds) H00 H12 DT12

(00/12/31 - 23:59:59) (2100)

Second conversion
Second data (D) Time data (S)
H00000000 '01/01/01 00:00:00 2001
H00000001 '01/01/01 00:00:01 :
: : :
H0000003C '01/01/01 00:01:00 :
: : :

15-70 WUME-FPXHPGRG-021
15.28 F231 SECTM (Second to Time Data Conversion)

Second data (D) Time data (S)


H00000E10 '01/01/01 01:00:00 :
: : :
H00015180 '01/01/01 00:00:00 :
: : :
HBA368E7F '99/12/31 23:59:59 2099
HBA368E80 '00/01/01 00:00:00 2100
: : :
HBC19137F '00/12/31 23:59:59 2100

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when the number of seconds [S] is [S]≥HBC191380 (number of seconds in 100
R9008
years)
(ER)
Turns ON when the data memory of [D] exceeds the area

WUME-FPXHPGRG-021 15-71
15.29 F235 GRY (16-bit Data to Gray Code Conversion)

15.29 F235 GRY (16-bit Data to Gray Code Conversion)


Converts the specified 16-bit data to gray code.

■ Instruction format

■ Operands
Items Settings
S Area storing the data to be converted, or constant data
D Area to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data in the area specified by [S] is converted to gray code and stored in the area
specified by [D].

● For the gray code, refer the correspondence table in"P.15-75".

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

15-72 WUME-FPXHPGRG-021
15.30 F236 DGRY (32-bit Data to Gray Code Conversion)

15.30 F236 DGRY (32-bit Data to Gray Code Conversion)


Converts specified 32-bit data to gray code.

■ Instruction format

■ Operands
Items Settings
S Area (two word) storing the data to be converted, or constant data
D Area (two word) to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Converts the 32-bit data specified by [S] to gray code, and stores the converted data in the
area specified by [D].

● For the gray code, refer the correspondence table in"P.15-75".

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 15-73
15.31 F237 GBIN (Gray Code to 16-bit Data Conversion)

15.31 F237 GBIN (Gray Code to 16-bit Data Conversion)


Converts the gray code in the specified area to 16-bit binary data.

■ Instruction format

■ Operands
Items Settings
S Area storing the data to be converted, or constant data
D Area to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The gray code of the area specified by [S] is converted to 16-bit binary data and stored in the
area specified by [D].

● For the gray code, refer the correspondence table in"P.15-75".

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

15-74 WUME-FPXHPGRG-021
15.32 F238 DGBIN (Gray Code to 32-bit Data Conversion)

15.32 F238 DGBIN (Gray Code to 32-bit Data Conversion)


The gray code in the specified area is converted to 32-bit binary data.

■ Instruction format

■ Operands
Items Settings
S Area (two word) storing the data to be converted, or constant data
D Area (two words) to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The gray code in the area specified in [S] is converted to 32-bit binary data and stored in the
area specified in [D].

● For the gray code, refer the correspondence table in"P.15-75".

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

BIN/Gray Code Correspondence Table


Decimal Binary Gray code
(Decimal) (Binary) (Gray code)
0 0000 0000 0000 0000 0000 0000 0000 0000
1 0000 0000 0000 0001 0000 0000 0000 0001
2 0000 0000 0000 0010 0000 0000 0000 0011

WUME-FPXHPGRG-021 15-75
15.32 F238 DGBIN (Gray Code to 32-bit Data Conversion)

Decimal Binary Gray code


(Decimal) (Binary) (Gray code)
3 0000 0000 0000 0011 0000 0000 0000 0010
4 0000 0000 0000 0100 0000 0000 0000 0110
5 0000 0000 0000 0101 0000 0000 0000 0111
6 0000 0000 0000 0110 0000 0000 0000 0101
7 0000 0000 0000 0111 0000 0000 0000 0100
8 0000 0000 0000 1000 0000 0000 0000 1100
9 0000 0000 0000 1001 0000 0000 0000 1101
10 0000 0000 0000 1010 0000 0000 0000 1111
11 0000 0000 0000 1011 0000 0000 0000 1110
12 0000 0000 0000 1100 0000 0000 0000 1010
13 0000 0000 0000 1101 0000 0000 0000 1011
14 0000 0000 0000 1110 0000 0000 0000 1001
15 0000 0000 0000 1111 0000 0000 0000 1000
16 0000 0000 0001 0000 0000 0000 0001 1000
17 0000 0000 0001 0001 0000 0000 0001 1001
18 0000 0000 0001 0010 0000 0000 0001 1011
19 0000 0000 0001 0011 0000 0000 0001 1010
20 0000 0000 0001 0100 0000 0000 0001 1110
21 0000 0000 0001 0101 0000 0000 0001 1111
22 0000 0000 0001 0110 0000 0000 0001 1101
23 0000 0000 0001 0111 0000 0000 0001 1100
24 0000 0000 0001 1000 0000 0000 0001 0100
25 0000 0000 0001 1001 0000 0000 0001 1101
26 0000 0000 0001 1010 0000 0000 0001 0111
27 0000 0000 0001 1011 0000 0000 0001 0110
28 0000 0000 0001 1100 0000 0000 0001 0010
29 0000 0000 0001 1101 0000 0000 0001 0011
30 0000 0000 0001 1110 0000 0000 0001 0001
31 0000 0000 0001 1111 0000 0000 0001 0000
32 0000 0000 0010 0000 0000 0000 0011 0000
63 0000 0000 0011 1111 0000 0000 0010 0000
64 0000 0000 0100 0000 0000 0000 0110 0000
: : :
255 0000 0000 1111 1111 0000 0000 1000 0000

15-76 WUME-FPXHPGRG-021
15.33 F240 COLM (Bit Line to Bit Column Conversion)

15.33 F240 COLM (Bit Line to Bit Column Conversion)


Converts a bit line to a bit column.

■ Instruction format

■ Operands
Items Settings
S Area storing the hexadecimal data or constant data
n Area storing the bit position specification, or constant data
D Starting address of the area that will be overwritten by the bit column

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The bit data at the position specified by [n] in the 16-word data area starting from [D] is
rewritten by the 16-bit data of the area specified by [S].
● The contents of the bits of the 16-word data area starting from [D] that are not specified do
not change.
● [n] can be specified in the range of 0 to 15.

WUME-FPXHPGRG-021 15-77
15.33 F240 COLM (Bit Line to Bit Column Conversion)

e.g. When the specified bit position n = 10 (K10)

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON if 0 ≤ [n] ≤ 15 is not true
(ER) Turns ON when the conversion result exceeds the area specified by [D] when stored

15-78 WUME-FPXHPGRG-021
15.34 F241 LINE (Bit Column to Bit Line Conversion)

15.34 F241 LINE (Bit Column to Bit Line Conversion)


Converts a bit column to a bit line.

■ Instruction format

■ Operands
Items Settings
S Starting address of area where bit column will be read
n Area storing the bit position specification, or constant data
D Area to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Reads the bit data at the position specified by [n] from the area specified by [S] and stores it
in the area specified by [D].
● [n] can be specified in the range of 0 to 15.

WUME-FPXHPGRG-021 15-79
15.34 F241 LINE (Bit Column to Bit Line Conversion)

e.g. When the specified bit position n = 10 (K10)

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON if 0 ≤ [n] ≤ 15 is not true
(ER) Turns ON when the conversion range specified by [S] exceeds the area

15-80 WUME-FPXHPGRG-021
16 Data Shift Instruction
16.1 F100 SHR (16-bit Data Right Shift)...................................................16-2
16.2 F101 SHL (16-bit Data Left Shift)......................................................16-4
16.3 F102 DSHR (32-bit Data Right Shift) ................................................16-6
16.4 F103 DSHL (32-bit Data Left Shift) ...................................................16-8
16.5 F105 BSR (16-bit Data 1-Digit Right Shift) .......................................16-10
16.6 F106 BSL (16-bit Data 1-Digit Left Shift) ..........................................16-12
16.7 F108 BITR (Block Area Bitwise Right Shift)......................................16-14
16.8 F109 BITL (Block Area Bitwise Left Shift).........................................16-16
16.9 F110 WSHR (Block Area 1 Word Right Shift) ...................................16-18
16.10 F111 WSHL (Block Area 1 Word Left Shift) ....................................16-20
16.11 F112 WBSR (Block Area 1 Digit Right Shift)...................................16-22
16.12 F113 WBSL (Block Area 1 Digit Left Shift)......................................16-24

WUME-FPXHPGRG-021 16-1
16.1 F100 SHR (16-bit Data Right Shift)

16.1 F100 SHR (16-bit Data Right Shift)


Shifts 16-bit data to the right by a specified number of bits.

■ Instruction format

■ Operands
Items Settings
D Area storing the 16-bit data to be shifted
n Area storing the number of bits to be shifted, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Shifts the 16-bit data specified by [D] by the number of bits (specified in decimal form)
specified by [n] to the right (the lower bit direction).
n
15 0
D:
CY

D: 0 0 0 0

n (padded with "0".)


● When the data is shifted to the right,
1. the n bits from the most significant bit are filled with 0.
2. The content from the least significant bit to the nth bit is stored in the CY (carry) flag
(R9009).
● For [n], only the lower 8 bits of the 16-bit data are valid. The shift amount can be selected
from 1 bit to 255 bits.

16-2 WUME-FPXHPGRG-021
16.1 F100 SHR (16-bit Data Right Shift)

(Note 1) The bits marked with - are invalid.

■ Operation example
Operation of instruction format description program
Shifts the content of DT0 four bits to the right when internal relay R0 turns ON.
The content of bit 3 before the shift is stored in the CY (carry) flag.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009
Turns ON when the content of the least significant bit to the n bit is"1"
(CY)

WUME-FPXHPGRG-021 16-3
16.2 F101 SHL (16-bit Data Left Shift)

16.2 F101 SHL (16-bit Data Left Shift)


Shifts 16-bit data to the left by the specified number of bits.

■ Instruction format

■ Operands
Items Settings
D Area storing the 16-bit data to be shifted
n Area storing the number of bits to be shifted, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [D] is shifted to the left (in the high bit direction) by the number
of bits specified by [n] (specified as a decimal number).

● When the data is shifted to the left,


1. the n bits from the least significant bit are filled with 0.
2. The content from the most significant bit to the nth bit is stored in the CY (carry) flag
(R9009).
● For [n], only the lower 8 bits of the 16-bit data are valid. The shift amount can be selected
from 1 bit to 255 bits.

16-4 WUME-FPXHPGRG-021
16.2 F101 SHL (16-bit Data Left Shift)

(Note 1) The bits marked with - are invalid.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of DT0 shifts four bits to the left.
The content of bit 12 before the shift is stored in the CY (carry) flag.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009
Turns ON when the content of the nth bit from the most significant bit is"1"
(CY)

WUME-FPXHPGRG-021 16-5
16.3 F102 DSHR (32-bit Data Right Shift)

16.3 F102 DSHR (32-bit Data Right Shift)


Shifts 32-bit data (double-word data) n bits to the right.

■ Instruction format

■ Operands
Items Settings
D Area storing the double-word data to be shifted (two words)
n Area storing the number of bits to be shifted, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The double-word data specified by [D, D+1] is shifted to the right (in the low bit direction) by
the number of bits specified by [n] (16-bit K constant).

n bits shifted to the right

● When the data is shifted to the right,


1. the n bits from the most significant bit are filled with 0.
2. The content from the least significant bit to the nth bit is stored in the CY (carry) flag
(R9009).

16-6 WUME-FPXHPGRG-021
16.3 F102 DSHR (32-bit Data Right Shift)

● For [n], only the lower 8 bits of the 16-bit data are valid. The shift amount can be selected
from 1 bit to 255 bits.

(Note 1) The bits marked with - are invalid.


● When [n] = K0, the content of [D, D+1] and the CY flag do not change.
● When [n] is specified as K32 or higher, the content of [D, D+1] changes to 0.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Reflects the content of the nth bit from the least significant bit immediately before the
(CY) instruction is executed.

WUME-FPXHPGRG-021 16-7
16.4 F103 DSHL (32-bit Data Left Shift)

16.4 F103 DSHL (32-bit Data Left Shift)


Shifts 32-bit data (double-word data) n bits to the left.

■ Instruction format

■ Operands
Items Settings
D Area storing the double-word data to be shifted (two words)
n Area storing the number of bits to be shifted, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The double-word data specified by [D, D+1] is shifted to the left (in the high bit direction) by
the number of bits specified by [n] (16-bit K constant).

n bits shifted to the left

● When the data is shifted to the left,


1. the n bits from the least significant bit are filled with 0.
2. The content from the most significant bit to the nth bit is stored in the CY (carry) flag
(R9009).

16-8 WUME-FPXHPGRG-021
16.4 F103 DSHL (32-bit Data Left Shift)

● For [n], only the lower 8 bits of the 16-bit data are valid. The shift amount can be selected
from 1 bit to 255 bits.

(Note 1) The bits marked with - are invalid.


● When [n] = K0, the content of [D, D+1] and the CY flag do not change.
● When [n] is specified as K32 or higher, the content of [D, D+1] changes to 0.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Reflects the content of the nth bit from the most significant bit immediately before the
(CY) instruction is executed.

WUME-FPXHPGRG-021 16-9
16.5 F105 BSR (16-bit Data 1-Digit Right Shift)

16.5 F105 BSR (16-bit Data 1-Digit Right Shift)


Shifts 16-bit data one digit (four bits) to the right.

■ Instruction format

■ Operands
Items Settings
D Area storing the 16-bit data to be shifted

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data (four digits) specified by [D] is shifted one digit (four bits) to the right
(downward direction).

15 12 11 8 7 4 3 0
D: Digit 4 Digit 3 Digit 2 Digit 1

D: 0 Digit 4 Digit 3 Digit 2

Padded with "0".

DT90014: 0 0 0 Digit 1
● When the data is shifted to the right,
1. bits 0 to 3 (Digit 1) before the shift are stored in bits 0 to 3 of special data register
DT90014.
2. After the shift, bits 12 to 15 are filled with 0.

16-10 WUME-FPXHPGRG-021
16.5 F105 BSR (16-bit Data 1-Digit Right Shift)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of DT0 shifts one digit to the right. The content of
bits 0 to 3 before the shift are stored in bits 0 to 3 of DT90014.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 16-11
16.6 F106 BSL (16-bit Data 1-Digit Left Shift)

16.6 F106 BSL (16-bit Data 1-Digit Left Shift)


Shifts 16-bit data one digit (four bits) to the left.

■ Instruction format

■ Operands
Items Settings
D Area storing the 16-bit data to be shifted

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data (four digits) specified by [D] is shifted one digit (four bits) to the left (upward
direction).

15 12 11 8 7 4 3 0
D: Digit 4 Digit 3 Digit 2 Digit 1

D: Digit 3 Digit 2 Digit 1 0


Padded with "0".

DT90014: 0 0 0 Digit 4

● When the data is shifted to the left,


1. bits 12 to 15 before the shift are stored in bits 0 to 3 of special data register DT90014.
2. After the shift, bits 0 to 3 are filled with 0.

16-12 WUME-FPXHPGRG-021
16.6 F106 BSL (16-bit Data 1-Digit Left Shift)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of DT0 shifts one digit to the left. The contents of
bits 12 to 15 before the shift are stored in bits 0 to 3 of DT90014.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 16-13
16.7 F108 BITR (Block Area Bitwise Right Shift)

16.7 F108 BITR (Block Area Bitwise Right Shift)


Shifts a block area to the right in bit units.

■ Instruction format

■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted
n Area storing the number of bits to be shifted, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The area in the range specified by [D1] and [D2] is shifted to the right by the number of bits
specified by [n].
Specified range
D2 D1

n bits
● The starting address of the area to be shifted is specified by [D1] and the ending address is
specified by [D2].
● Specify the same type of area for both [D1] and [D2]. Also, specify values so that D1 is equal
to or smaller than D2.

16-14 WUME-FPXHPGRG-021
16.7 F108 BITR (Block Area Bitwise Right Shift)

● When the data is shifted to the right,


1. the lower n bits of [D1] before the shift are shifted out.
2. After the shift, the upper n bits of [D2] are filled with 0.
● No operation takes place if [n] = 0.
● If [n] is set to a number of bits that exceeds the area in the range specified by [D1] and [D2],
the value of the area from [D1] to [D2] is 0.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the three-word data in DT10 to DT12 is shifted four bits to the
right

3 words
DT12 DT11 DT10
H0212 H0030 H0232
4 bits shifted out

H0021 H2003 H0023

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when [D1] > [D2]
(ER)

WUME-FPXHPGRG-021 16-15
16.8 F109 BITL (Block Area Bitwise Left Shift)

16.8 F109 BITL (Block Area Bitwise Left Shift)


Shifts a block area left in bit units.

■ Instruction format

■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted
n Area storing the number of bits to be shifted, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The area in the range specified by [D1] and [D2] is shifted left by the number of bits specified
by [n].
Specified range
D2 D1

n bits are shifted out

n bits
● The starting address of the area to be shifted is specified by [D1] and the ending address is
specified by [D2].
● Specify the same type of area for both [D1] and [D2]. Also, specify values so that D1 is equal
to or smaller than D2.

16-16 WUME-FPXHPGRG-021
16.8 F109 BITL (Block Area Bitwise Left Shift)

● When the data is shifted to the left,


1. the upper n bits of [D2] before the shift are shifted out.
2. After the shift, the lower n bits of [D1] are filled with 0.
● No operation takes place if [n] = 0.
● If [n] is set to a number of bits that exceeds the area in the range specified by [D1] and [D2],
the value of the area from [D1] to [D2] is 0.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the three-word data in DT10 to DT12 is shifted four bits to the
left.

3 words
DT12 DT11 DT10
H0212 H0030 H0232

"0" is entered in 4 bits

H2120 H0300 H2320

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when [D1] > [D2]
(ER)

WUME-FPXHPGRG-021 16-17
16.9 F110 WSHR (Block Area 1 Word Right Shift)

16.9 F110 WSHR (Block Area 1 Word Right Shift)


Shifts the specified data range one word to the right.

■ Instruction format

■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ●

■ Outline of operation
● The area of the range specified by [D1] and [D2] is shifted one word to the right (downward
direction).
Specified range
D2 D1

Shifted out

H0
"0" is entered
● The starting address of the area to be shifted is specified by [D1] and the ending address is
specified by [D2].
● Specify the same type of area for both [D1] and [D2]. Also, make sure that [D1] address ≤
[D2] address.
● When the data is shifted to the right,
1. the content of [D1] before the shift is lost.
2. After the shift, [D2] is filled with H0.

16-18 WUME-FPXHPGRG-021
16.9 F110 WSHR (Block Area 1 Word Right Shift)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the three-word data in DT0 to DT2 is shifted one word to the
right.
Shift width = 3 words

DT2 DT1 DT0

H0212 H0030 H0232

Shifted out

H0000 H0212 H0030

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the [D1] address > [D2] address
(ER)

WUME-FPXHPGRG-021 16-19
16.10 F111 WSHL (Block Area 1 Word Left Shift)

16.10 F111 WSHL (Block Area 1 Word Left Shift)


Data in the specified range is shifted one word to the left.

■ Instruction format

■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ●

■ Outline of operation
● The range area specified by [D1] and [D2] is shifted to the left (upper direction) by one word.
Specified range
D2 D1

Shifted out

H0
"0" is entered
● The starting address of the area to be shifted is specified by [D1] and the ending address is
specified by [D2].
● Specify the same type of area for both [D1] and [D2]. Also, make sure that [D1] address ≤
[D2] address.
● When the data is shifted to the left,
1. the content of [D2] before the shift is lost.
2. After the shift, [D1] is filled with H0.

16-20 WUME-FPXHPGRG-021
16.10 F111 WSHL (Block Area 1 Word Left Shift)

■ Operation example
Operation of instruction format description program
Three-word data from DT0 to DT2 is shifted one word to the left when internal relay R0 turns
ON.
Shift width = 3 words
DT2 DT1 DT0
H0212 H0030 H0232

H0030 H0232 H0000

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the [D1] address > [D2] address
(ER)

WUME-FPXHPGRG-021 16-21
16.11 F112 WBSR (Block Area 1 Digit Right Shift)

16.11 F112 WBSR (Block Area 1 Digit Right Shift)


Data in the specified range is shifted 1 digit to the right.

■ Instruction format

■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ●

■ Outline of operation
● The area of the range specified in [D1] and [D2] is shifted to the right (lower direction) by 1
digit (4 bits).
D2 D1

Shifted out

"H0" is entered.
● The starting address of the area to be shifted is specified by [D1] and the ending address is
specified by [D2].
● Specify the same type of area for both [D1] and [D2]. Also, make sure that [D1] address ≤
[D2] address.
● When the data is shifted to the right,
1. the content of bits 0 to 3 (Digit 1) of [D1] before the shift is lost.
2. After the shift, bits 12 to 15 of [D2] (Digit 4) are filled with "0".

16-22 WUME-FPXHPGRG-021
16.11 F112 WBSR (Block Area 1 Digit Right Shift)

■ Operation example
Operation of instruction format description program
When internal relay R0 is ON, 10 word data of DT0 to DT9 is shifted 1 digit to the right.

Shift width 10 words = 40 digits

DT9 DT1 DT0


0 2 1 2 0 0 3 0 0 2 3 2

R0:ON Shifted out

0 0 2 1 2 1 0 0 3 0 0 2 3

"H0" is put into the highest digit

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the [D1] address > [D2] address
(ER)

WUME-FPXHPGRG-021 16-23
16.12 F113 WBSL (Block Area 1 Digit Left Shift)

16.12 F113 WBSL (Block Area 1 Digit Left Shift)


Shifts data in a specified range one digit to the left.

■ Instruction format

■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ●

■ Outline of operation
● Shifts an area of a range specified in [D1] and [D2] one digit (4 bits) to the left (toward the
higher digit).
D2 D1

Shifted out

"H0" is entered.
● The starting address of the area to be shifted is specified by [D1] and the ending address is
specified by [D2].
● Specify the same type of area for both [D1] and [D2]. Also, make sure that [D1] address ≤
[D2] address.
● When the data is shifted to the left,
1. the content of bits 12 to 15 (Digit 4) of [D2] before the shift is lost.
2. After the shift, bits 0 to 3 of [D1] (Digit 1) are filled with "0".

16-24 WUME-FPXHPGRG-021
16.12 F113 WBSL (Block Area 1 Digit Left Shift)

■ Operation example
Operation of instruction format description program
When the internal relay R0 is ON, the data of 10 words from DT0 to DT9 is shifted to the left by
one digit.
Shift width 10 words = 40 digits

DT9 DT1 DT0

0 2 1 2 1 0 0 3 0 0 2 3 2

Shifted out
R0:ON

2 1 2 1 0 3 0 0 2 3 2 0

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when the [D1] address > [D2] address
(ER)

WUME-FPXHPGRG-021 16-25
(MEMO)

16-26 WUME-FPXHPGRG-021
17 Data Rotation Instructions
17.1 F120 ROR (16-Bit Data Rotation to the Right)..................................17-2
17.2 F121 ROL (16-Bit Data Rotation to the Left) ....................................17-4
17.3 F122 RCR (16-bit Data Right Rotation with Carry) ...........................17-6
17.4 F123 RCL (16-bit Data Left Rotation with Carry) ..............................17-8
17.5 F125 DROR [32-Bit Data Right Rotation] .........................................17-10
17.6 F126 DROL (32-bit data left rotation)................................................17-12
17.7 F127 DRCR (32-bit Data Right Rotation with Carry) ........................17-14
17.8 F128 DRCL (32-bit Data Left Rotation with Carry) ...........................17-16

WUME-FPXHPGRG-021 17-1
17.1 F120 ROR (16-Bit Data Rotation to the Right)

17.1 F120 ROR (16-Bit Data Rotation to the Right)


Rotates the specified 16-bit data to the right.

■ Instruction format

■ Operands
Items Settings
D Area targeted for rotation
n Area storing the number of bits specified to be rotated, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [D] is rotated to the right (in the low bit direction) by the number
of bits specified by [n].

Example of rotation 1 bit to the right

● When rotated to the right, the content of the bit that is 1 bit below the bit that moves to the
least significant bit when rotated is stored in the CY flag (R9009). This bit is moved to the
most significant bit as a result of rotation.
● For [n], only the lower 8 bits of the 16-bit data are valid.

17-2 WUME-FPXHPGRG-021
17.1 F120 ROR (16-Bit Data Rotation to the Right)

(Note 1) The bits marked with - are invalid.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT0 is rotated 4 bits to the right.

■ Precautions for programming


For the value of n, the operation is the same for every multiple of 16.
e.g.
When n = 16, the operation is the same as when n = 0 (the CY flag does not change either)
When n = 17, the operation is the same as when n = 1
When n = 32, the operation is the same as when n = 0 (the CY flag does not change either)
When n = 33, the operation is the same as when n = 1

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Turns ON when the instruction is executed when the [n]th bit from the least significant bit
(CY) is"1"before execution

WUME-FPXHPGRG-021 17-3
17.2 F121 ROL (16-Bit Data Rotation to the Left)

17.2 F121 ROL (16-Bit Data Rotation to the Left)


Rotates the specified 16-bit data to the left.

■ Instruction format

■ Operands
Items Settings
D Area targeted for rotation
n Area storing the number of bits specified to be rotated, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [D] is rotated to the left (in the high bit direction) by the number
of bits specified by [n].

Example of rotation 1 bit to the left

● When rotated to the left, the content of the bit that is 1 bit above the bit that moves to the
most significant bit when rotated is stored in the CY flag (R9009). This bit is moved to the
least significant bit as a result of rotation.
● For [n], only the lower 8 bits of the 16-bit data are valid.

17-4 WUME-FPXHPGRG-021
17.2 F121 ROL (16-Bit Data Rotation to the Left)

(Note 1) The bits marked with - are invalid.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT0 is rotated 4 bits to the left.

■ Precautions for programming


For the value of n, the operation is the same for every multiple of 16.
e.g.
When n = 16, the operation is the same as when n = 0 (the CY flag does not change either)
When n = 17, the operation is the same as when n = 1
When n = 32, the operation is the same as when n = 0 (the CY flag does not change either)
When n = 33, the operation is the same as when n = 1

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Turns ON when the instruction is executed when the [n]th bit from the most significant bit
(CY) is"1"before execution

WUME-FPXHPGRG-021 17-5
17.3 F122 RCR (16-bit Data Right Rotation with Carry)

17.3 F122 RCR (16-bit Data Right Rotation with Carry)


Rotate 17 bits of data made up of the specified 16-bit data and the carry flag to the right.

■ Instruction format

■ Operands
Items Settings
D Area targeted for rotation
n Area storing the number of bits specified to be rotated, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [D] is rotated to the right (in the low bit direction) by the number
of bits specified by [n], including the CY (carry) flag (R9009).

Example of rotation 1 bit to the right

● When the data is rotated to the right,


1. the content of the bit that is 1 bit lower than the bit that moves to the least significant bit
when rotated is stored in the CY flag (R9009).
2. The content of the CY flag (R9009) before the rotation is stored in the [n]th bit from the
most significant bit.
● For [n], only the lower 8 bits of the 16-bit data are valid.

17-6 WUME-FPXHPGRG-021
17.3 F122 RCR (16-bit Data Right Rotation with Carry)

(Note 1) The bits marked with - are invalid.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT0 is rotated 4 bits to the right.
(The CY value immediately before execution is assumed to be 1.)

■ Precautions for programming


For the value of n, the operation is the same for every multiple of 17.
e.g.
When n = 17, the operation is the same as when n = 0
When n = 18, the operation is the same as when n = 1
When n = 34, the operation is the same as when n = 0
When n = 35, the operation is the same as when n = 1

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Turns ON when the instruction is executed when the [n]th bit from the least significant bit
(CY) is"1"before execution

WUME-FPXHPGRG-021 17-7
17.4 F123 RCL (16-bit Data Left Rotation with Carry)

17.4 F123 RCL (16-bit Data Left Rotation with Carry)


Rotates 17-bit data, consisting of specified 16-bit data with carry flag data added, to the left.

■ Instruction format

■ Operands
Items Settings
D Area targeted for rotation
n Area storing the number of bits specified to be rotated, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Rotates 16-bit data specified by [D], including CY (carry) flag (R9009) data, to the left
(toward higher bits) by the number of bits specified by [n].

Example of rotation 1 bit to the left

● When the data is rotated to the left,


1. the content of the bit that is 1 bit higher than the bit that moves to the most significant bit
when rotated is stored in the CY flag (R9009).
2. The content of the CY flag (R9009) before the rotation is stored in the [n]th bit from the
least significant bit.
● For [n], only the lower 8 bits of the 16-bit data are valid.

17-8 WUME-FPXHPGRG-021
17.4 F123 RCL (16-bit Data Left Rotation with Carry)

(Note 1) The bits marked with - are invalid.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT0 is rotated 4 bits to the left.
(The CY value immediately before execution is assumed to be 1.)

■ Precautions for programming


For the value of n, the operation is the same for every multiple of 17.
e.g.
When n = 17, the operation is the same as when n = 0
When n = 18, the operation is the same as when n = 1
When n = 34, the operation is the same as when n = 0
When n = 35, the operation is the same as when n = 1

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Turns ON when the instruction is executed when the [n]th bit from the most significant bit
(CY) is"1"before execution

WUME-FPXHPGRG-021 17-9
17.5 F125 DROR [32-Bit Data Right Rotation]

17.5 F125 DROR [32-Bit Data Right Rotation]


Rotates "n" bits of 32-bit data (double word data) to the right.

■ Instruction format

■ Operands
Items Settings
D Area to be rotated (two words)
n Area storing the number of bits specified to be rotated, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Rotates a number of bits specified by [n] of double word data specified by [D, D+1], to the
right (toward lower bits).

Example of rotation 1 bit to the right


[D+1] [D]

15 0 15 0
Before
execution
CY

After Content of
execution bit 0 before
execution

● When data is rotated to the right, the data which moves to 1 bit above the least significant bit
position when rotation occurs is stored in the CY flag (R9009). This bit is moved to the most
significant bit position as a result of the rotation.
● For [n], only the lower 8 bits of the 16-bit data are valid.

17-10 WUME-FPXHPGRG-021
17.5 F125 DROR [32-Bit Data Right Rotation]

(Note 1) The bits marked with - are invalid.


● When [n] = K0, the contents of [D, D+1] and the CY flag do not change.

■ Operation example
Operation of instruction format description program
When the internal relay R0 turns ON, the contents of DT11 and DT10 are rotated 4 bits to the
right. The content of bit 3 before execution is stored in the CY flag.

■ Precautions for programming


If n is a multiple of 32, this will result in the same operation as n = 0.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Reflects the content of the nth bit from the least significant bit immediately before the
(CY) instruction is executed.

WUME-FPXHPGRG-021 17-11
17.6 F126 DROL (32-bit data left rotation)

17.6 F126 DROL (32-bit data left rotation)


Rotates 32-bit data (double word data) n bits to the left.

■ Instruction format

■ Operands
Items Settings
D Area to be rotated (two words)
n Area storing the number of bits specified to be rotated, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Rotates double word data specified by [D, D+1] a number of bits specified by [n] to the left
(toward higher bits).

Example of rotation 1 bit to the left


[D+1] [D]

15 0 15 0
Before
execution
CY

Content of most
significant bit
After
before execution execution

● When rotated to the left, the content of the bit that is 1 bit above the bit that moves to the
most significant bit when rotated is stored in the CY flag (R9009). After rotation, this bit
moves to the least significant bit.
● For [n], only the lower 8 bits of the 16-bit data are valid.

17-12 WUME-FPXHPGRG-021
17.6 F126 DROL (32-bit data left rotation)

(Note 1) The bits marked with - are invalid.


● When [n]=K0, the contents of [D, D+1] and the CY flag do not change.

■ Operation example
Operation of instruction format description program
When the internal relay R0 turns ON, the contents of DT11 and DT10 are rotated 4 bits to the
left. The CY flag stores the contents of bit 28 from before execution.

■ Precautions for programming


If n is a multiple of 32, this will result in the same operation as n=0.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Reflects the content of the nth bit from the most significant bit immediately before the
(CY) instruction is executed.

WUME-FPXHPGRG-021 17-13
17.7 F127 DRCR (32-bit Data Right Rotation with Carry)

17.7 F127 DRCR (32-bit Data Right Rotation with Carry)


Rotates 32-bit data (double-word data) n bits to the right together with carry data.

■ Instruction format

■ Operands
Items Settings
D Area to be rotated (two words)
n Area storing the number of bits specified to be rotated, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The double-word data specified by [D, D+1] is rotated to the right (in the low bit direction) by
the number of bits specified by [n], including the CY (carry) flag (R9009).

Example of 1-bit right rotation (with carry)


[D+1] [D]

15 0 15 0
Before CY
execution

Content of
bit 0 before
After execution
execution

● When the data is rotated to the right,


1. the content of the bit that is 1 bit lower than the bit that moves to the least significant bit
when rotated is stored in the CY flag (R9009).
2. The content of the CY flag (R9009) before the rotation is stored in the [n]th bit from the
most significant bit.
● For [n], only the lower 8 bits of the 16-bit data are valid.

17-14 WUME-FPXHPGRG-021
17.7 F127 DRCR (32-bit Data Right Rotation with Carry)

(Note 1) The bits marked with - are invalid.


● When [n] = K0, the contents of [D, D+1] and the CY flag do not change.

■ Operation example
Operation of instruction format description program
When internal relay R10 turns ON, the contents of DT11 and DT10 are rotated 4 bits to the
right.
The content of bit 3 before execution is stored in the CY flag. The content of the CY flag before
execution is stored in bit 28.

■ Precautions for programming


When n = (a multiple of 33), the operation is the same as when n = 0.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Reflects the content of the nth bit from the least significant bit immediately before the
(CY) instruction is executed.

WUME-FPXHPGRG-021 17-15
17.8 F128 DRCL (32-bit Data Left Rotation with Carry)

17.8 F128 DRCL (32-bit Data Left Rotation with Carry)


Rotates 32-bit data (double-word data) n bits to the left with carry data.

■ Instruction format

■ Operands
Items Settings
D Area to be rotated (two words)
n Area storing the number of bits specified to be rotated, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The double-word data specified by [D, D+1] is rotated to the left (in the high bit direction) by
the number of bits specified by [n], including the CY (carry) flag (R9009).

Example of rotation 1 bit to the left (with carry data)


[D+1] [D]

15 0 15 0
Before
CY execution

Content of
most
significant bit After
before execution
execution

● When the data is rotated to the left,


1. the content of the bit that is 1 bit higher than the bit that moves to the most significant bit
when rotated is stored in the CY flag (R9009).
2. The content of the CY flag (R9009) before the rotation is stored in the [n]th bit from the
least significant bit.
● For [n], only the lower 8 bits of the 16-bit data are valid.

17-16 WUME-FPXHPGRG-021
17.8 F128 DRCL (32-bit Data Left Rotation with Carry)

(Note 1) The bits marked with - are invalid.


● When [n] = K0, the contents of [D, D+1] and the CY flag do not change.

■ Operation example
Operation of instruction format description program
When the internal relay R0 turns ON, the contents of DT11 and DT10 are rotated 4 bits to the
left.
The CY flag stores the contents of bit 28 from before execution. The content of the CY flag
before execution is stored in bit 3.

■ Precautions for programming


When n = (a multiple of 33), the same operation is the same as when n = 0.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009 Reflects the content of the nth bit from the most significant bit immediately before the
(CY) instruction is executed.

WUME-FPXHPGRG-021 17-17
(MEMO)

17-18 WUME-FPXHPGRG-021
18 Data Buffer Instruction
18.1 F98 CMPR (Compress Shift Read)...................................................18-2
18.2 F99 CMPW (Compress Shift Write) ..................................................18-6
18.3 How to Use the FIFO (First-in First-out) Buffer .................................18-10
18.4 F115 FIFT (FIFO Buffer Definition) ...................................................18-11
18.5 F116 FIFR (FIFO Data Read) ...........................................................18-14
18.6 F117 FIFW (FIFO Data Write)...........................................................18-18

WUME-FPXHPGRG-021 18-1
18.1 F98 CMPR (Compress Shift Read)

18.1 F98 CMPR (Compress Shift Read)


Reads the data at the highest address in the specified range and compresses the data upward.

■ Instruction format

■ Operands
Items Settings
D1 Starting address of specified range
D2 Final address of specified range
D3 Area storing read data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ●
D3 ● ● ● ● ● ● ● ●

■ Outline of operation
● In the area of the range specified by [D1] and [D2], the content of [D2] (highest address in
the specified range) is transferred to the area specified by [D3].
Non-zero data is shifted (compressed) in sequential order in the direction of the higher
addresses in the specified range.

● The starting address of the area is specified by [D1] and the final address is specified by
[D2].

18-2 WUME-FPXHPGRG-021
18.1 F98 CMPR (Compress Shift Read)

● Specify the same type of area for both [D1] and [D2]. Additionally, specify values so that [D1]
is equal to or less than [D2].
● If all of the content in the range specified by [D1] and [D2] is 0, 0 is stored in [D3].

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT5 is transferred to data register
DT10.
Additionally, the non-zero content in the range of DT0 to DT5 is stored in order from DT5. Any
remaining content becomes"0".
Executing the F98 CMPR instruction
[D1]

DT0 555 0 DT0


Specified range

DT1 444 0
DT2 0 0
DT3 11 555
DT4 0 444
DT5 10 11 DT5

[D2]

10 DT10
[D3]

■ Application example
● This instruction can be combined with the "Compress shift Write" (F99 CMPW) instruction to
use a memory area of any range as a buffer.
1. Executing the F99 CMPW instruction
When data is written to the starting address of the buffer (the area of the specified
range), it accumulates in the buffer in sequential order. The oldest data will be at the final
address of the buffer.

WUME-FPXHPGRG-021 18-3
18.1 F98 CMPR (Compress Shift Read)

31 0
0
0

Specified range
0
31
44
555
11

2. Executing the F98 CMPR instruction


When data at the final address of the buffer (the area of the specified range) is read,
data can be extracted in sequential order, starting from the oldest data. Any remaining
data in the buffer is shifted in the direction of the higher addresses, so the oldest data at
any point will always be stored at the final address.

0 0
0 0
0 0
31 0
44 31
555 44
(11) (555)
11 555
● This can be used to extract valid non-zero data from data written in random order.

0
112 (3)
Specified range

0
0
131 (2)

0
12 (1)

Each time the F98 CMPR instruction is executed, data is extracted in sequential order from
(1) to (3).

18-4 WUME-FPXHPGRG-021
18.1 F98 CMPR (Compress Shift Read)

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when [D1] > [D2]
(ER) Turns ON when [D1] and [D2] are not the same type of area

WUME-FPXHPGRG-021 18-5
18.2 F99 CMPW (Compress Shift Write)

18.2 F99 CMPW (Compress Shift Write)


Writes data to the starting address in the specified range, and compresses the data upward.

■ Instruction format

■ Operands
Items Settings
S Area storing the hexadecimal data or constant data
D1 Starting address of specified range
D2 Final address of specified range

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D1 ● ● ● ● ● ● ● ●
D2 ● ● ● ● ● ● ● ●

■ Outline of operation
● In the area of the range specified by [D1] and [D2], the content of the area specified by [S] is
transferred to [D1] (starting address in the specified range).
Non-zero data is shifted (compressed) in sequential order in the direction of the higher
addresses in the specified range.

● The starting address of the area is specified by [D1] and the final address is specified by
[D2].

18-6 WUME-FPXHPGRG-021
18.2 F99 CMPW (Compress Shift Write)

● Specify the same type of area for both [D1] and [D2]. Additionally, specify values so that [D1]
is equal to or less than [D2].
● If the content of [S] is 0, only a compressed shift is carried out.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the content of data register DT10 is transferred to data
register DT0. Additionally, the non-zero content in the range of DT0 to DT5 is stored in order
from DT5. Any remaining content becomes"0".
Executing the F99 CMPW instruction
[S] [D1]
32
DT10

DT0 555 0
DT1 444 0

Specified range
DT2 0 32
DT3 11 444
DT4 0 11
DT5 10 10

[D2]
(Note 1) Because the content of [S] is written to DT0 first, the original content of DT0 (555 for example) is
overwritten.

■ Application example
● This instruction can be combined with the "Compress shift read" (F98 CMPR) instruction to
use a memory area of the specified range as a buffer.
1. Executing the F99 CMPW instruction
When data is written to the starting address of the buffer (the area of the specified
range), it accumulates in the buffer in sequential order. The oldest data will be at the final
address of the buffer.

WUME-FPXHPGRG-021 18-7
18.2 F99 CMPW (Compress Shift Write)

31 0
0
0

Specified range
0
31
44
555
11

2. Executing the F98 CMPR instruction


When data at the final address of the buffer (the area of the specified range) is read,
data can be extracted in sequential order, starting from the oldest data. Any remaining
data in the buffer is shifted in the direction of the higher addresses, so the oldest data at
any point will always be stored at the final address.

0 0
0 0
0 0
31 0
44 31
555 44
(11) (555)
11 555
● This can be used to extract valid non-zero data from data written in random order.

12 S D1 0
0
0
0
131 0
112
0
0
31 112
131 Effective data
12
D2

Executing the F99 CMPW instruction causes only the valid data to be stored.

18-8 WUME-FPXHPGRG-021
18.2 F99 CMPW (Compress Shift Write)

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when [D1] > [D2]
(ER) Turns ON when [D1] and [D2] are not the same type of area

WUME-FPXHPGRG-021 18-9
18.3 How to Use the FIFO (First-in First-out) Buffer

18.3 How to Use the FIFO (First-in First-out) Buffer


The FIFO buffer is a buffer area that stores data in the order it is written, and starts reading in
order from the first data stored. It is convenient to use the FIFO buffer as a record of the order
of objects on a conveyor line or buffer line.

1. The F115 FIFT instruction defines the area to be used as the FIFO buffer. (Use it just once
before read/write.)

2. Use the F117 FIFW instruction for data write, and the F116 FIFR instruction for read.
Data write
● After data is written, it is stored in the data storage area in order starting from the first written
data. The write pointer indicates the next write area.
● When the data storage area becomes full, it is no longer possible to write.
Data read
● When read is executed, data is transferred in order from the first data that was stored. The
read pointer indicates the area that will be read.
● If read is executed when there is no data written to the data storage area, an error is
returned.

<Example of data storage area>


15 0
Read pointer K100 0
K101 1
K102 2
3 Write pointer
4
As shown in the figure above, when data is written, it is stored in area"3". The write pointer
moves to"4". (Data will next be written to"4".) When a read is executed, data is read from
the"0"area. The read pointer moves to"1". (Data will next be read from"1").

18-10 WUME-FPXHPGRG-021
18.4 F115 FIFT (FIFO Buffer Definition)

18.4 F115 FIFT (FIFO Buffer Definition)


Defines the start and size of the FIFO buffer area.

■ Instruction format

■ Operands
Items Settings
n Area storing the size (number of words) of the FIFO buffer, or constant data
D Starting address for the FIFO buffer area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The area used as the FIFO buffer is defined. A data storage area of n words (n = K1 to
K256) is defined for the area specified by [D].
Definition of the area using the F115 FIFT instruction should be executed only once, before
writing to or reading from the FIFO buffer. Normally, reading and writing are disabled while this
instruction is being executed.
● When the F115 FIFT instruction is executed, the FIFO buffer area is defined as follows.

WUME-FPXHPGRG-021 18-11
18.4 F115 FIFT (FIFO Buffer Definition)

15 0
D Kn FIFO buffer size (n)
D+1 K0 Store data count (words)
D+2 0 0 FIFO pointer
D+3 0
1 15 0

Data storage area


Write pointer
(n words)
(0 to 255/H00 to HFF)
Read pointer
(0 to 255/H00 to HFF)
n-2
D+2+n n-1
● When the F115 FIFT instruction is executed, the following are stored as default values: [D] =
n (the value specified by the F115 FIFT instruction), [D+1] = K0 and [D+2] = H0000.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the area starting from DT0 is defined as the FIFO buffer
area."FIFO buffer size"(K256) is stored in DT0,"number of data items"is stored in DT1 (with a
default value of K0), and"FIFO pointer"(with a default value of H0000) is stored in DT2. When n
= K256, the 256 words from DT3 to DT258 are defined as the data storage area.
15 0
DT0 K256 FIFO buffer size (n)
Can be sent by F0 instruction
DT1 K0 Store data count (words)
(Can be rewritten)
DT2 0 0 FIFO pointer
DT3

Data storage area


(256 words)

DT257
DT258

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.

18-12 WUME-FPXHPGRG-021
18.4 F115 FIFT (FIFO Buffer Definition)

Name Description
Turns ON when n = 0
R9008 Turns ON when n > 256
(ER)
Turns ON when the final address of the FIFO set according to the FIFO size exceeds the
area

WUME-FPXHPGRG-021 18-13
18.5 F116 FIFR (FIFO Data Read)

18.5 F116 FIFR (FIFO Data Read)


Reads the data from the specified FIFO buffer.

■ Instruction format

■ Operands
Items Settings
S Starting address for the FIFO buffer area
D Area storing the data read from the FIFO buffer

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The data is read from the FIFO buffer at the start of the area specified by [S], and is stored in
the area specified by [D]. For [S], specify the start of the FIFO buffer defined by the FIFT
instruction.
● Data is read from the address specified by the read pointer when the instruction is executed.
15 0
S FIFO buffer size (n)
S+1 Store data count (words)
S+2 Address of (high) read pointer
(0)

Data storage area


(n words)

[D]
(n-2)
(n-1)

18-14 WUME-FPXHPGRG-021
18.5 F116 FIFR (FIFO Data Read)

(Note 1) (0) to (n–1) are addresses assigned to the data storage areas.
(Note 2) n is the value specified by the F115 FIFT instruction.
(Note 3) ▶ is the read pointer.
● The read pointer is stored in the upper eight bits of the third word of the FIFO buffer area. It
is indicated by an address in the data storage area. The actual address is the starting
address of the FIFO buffer area specified by [S], plus 3, plus the read pointer value (in which
only the upper byte is a decimal value).
● When a read is executed, 1 is subtracted from the number of stored data and the read
pointer is incremented by 1.

● An error occurs if the instruction is executed when the number of stored data is 0. No data set
for [D].
● A read is only performed when the read pointer is not equal to the write pointer.
● If this instruction is executed while the read pointer is pointing to the ending address of the
FIFO buffer (n defined by the F115 FIFT instruction minus 1), the read pointer becomes 0.

■ Operation example
Operation of instruction format description program
When internal relay R10 turns ON, data is read from the FIFO buffer area at the start of DT0
and stored in DT100.

WUME-FPXHPGRG-021 18-15
18.5 F116 FIFR (FIFO Data Read)

[When the read pointer is 2]


15 0
DT0 K5
DT1 K2
DT2 2 4 (H0204)
DT3 K100 0
Read pointer
DT4 K101 1 DT100
DT5 K102 2
DT6 K103 3
DT7 4 Write pointer

FIFR execution

15 0
DT0 K5
DT1 K1 Store count
DT2 3 4 (H0304)
DT3 K100 0
DT4 K101 1 DT100
DT5 K102 2 K102
DT6 K103 3 Read
DT7 4
1. The content of DT5 indicated by read pointer 2 is transferred to DT100.
2. After reading, 1 is subtracted from the content of DT1 (number of stored data), and the read
pointer moves to 3. (The next time a read is executed, the content of DT6 indicated by 3 is
transferred to DT100.)

■ Precautions for programming


An error occurs if the F116 FIFR instruction is executed when the number of stored data ([S+1])
is 0.

[Reference]
In the program below, the F116 FIFR instruction is not executed when the data storage number
is 0.

18-16 WUME-FPXHPGRG-021
18.5 F116 FIFR (FIFO Data Read)

R0
( DF ) F115 FIFT K256 DT0 FIFO definition

R9010
Check storage
F60 CMP DT1 K0
data count

R2 R900B
( DF ) F116 FIFR DT0 WY4 FIFO read

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
Turns ON when the size of the FIFO specified by [S] (n) is n = 0 or n > 256
Turns ON when the number of data stored in the FIFO is 0
R9007
Turns ON when the number of stored data items of the FIFO is larger than the FIFO size
R9008
(n)
(ER)
Turns ON when the final address of the FIFO based on the FIFO size (n) exceeds the area
Turns ON when the FIFO read pointer is larger than the size of the FIFO (n)
Turns ON when, after reading data, the FIFO read pointer is K256 (H100) or higher

WUME-FPXHPGRG-021 18-17
18.6 F117 FIFW (FIFO Data Write)

18.6 F117 FIFW (FIFO Data Write)


Writes data to the specified FIFO buffer.

■ Instruction format

■ Operands
Items Settings
S Area storing the 16-bit data to write to the FIFO buffer, or constant data
D Starting address for the FIFO buffer area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [S] is stored in the FIFO buffer starting at the area specified by
[D]. Specify the start of the FIFO buffer defined by the FIFT instruction for [D].
● The specified data is written to the address indicated by the write pointer when the
instruction is executed.

18-18 WUME-FPXHPGRG-021
18.6 F117 FIFW (FIFO Data Write)

15 0
D FIFO buffer size (n)
D+1 Store data count (words)
D+2 (Low) write pointer
(0)

Write pointer

Data storage area


(n-2)
(n-1)

[S]
(Note 1) (0) to (n–1) are addresses assigned to the data storage areas.
(Note 2) n is the value specified by the F115 FIFT instruction.
● The write pointer is stored in the lower eight bits of the third word of the FIFO buffer area. It is
indicated by a relative position in the data storage area. The actual address is the starting
address of the FIFO buffer area specified by [D], plus 3, plus the write pointer value (in which
only the lower byte is a decimal value).
● When a write is executed, 1 is added to the number of stored data items, and the write
pointer is incremented 1.

● An error occurs if this instruction is executed when the FIFO buffer is full (the number of stored
data items = size n of the FIFO defined by the F115 FIFT instruction). In this case, the write is
not performed.
● If this instruction is executed when the write pointer is indicating the final address in the FIFO
buffer (the n value defined by the F115 FIFT instruction), the write pointer will be set to 0.

■ Operation example
Operation of instruction format description program
When internal relay R10 turns ON, the contents of DT110 are written to the FIFO buffer area
that starts from by DT0.

WUME-FPXHPGRG-021 18-19
18.6 F117 FIFW (FIFO Data Write)

When the write pointer is 3


15 0
DT0 K5
DT1 K3 Write pointer
DT2 0 3 (H0003)
Read pointer DT3 K100 0
DT4 K101 1 DT110
DT5 K102 2 K103
DT6 K500 3 Write
DT7 4 Write pointer

FIFW execution

15 0
DT0 K5
DT1 K4 Store count
DT2 0 4 (H0004)
DT3 K100 0
DT4 K101 1 DT110
DT5 K102 2 K103
DT6 K103 3
DT7 4 Move write pointer
1. The contents"103"of DT110 are sent to DT6, which is indicated by pointer 3.
2. After the data has been written, 1 is added to the contents of DT1 (the number of stored
data items), and the write pointer moves to 4. (The next time that writing is executed, the
contents of DT110 are written to DT7, which is indicated by 4.)

■ Precautions when using this instruction


If data is received that exceeds the capacity of the buffer, an operation error occurs.

18-20 WUME-FPXHPGRG-021
18.6 F117 FIFW (FIFO Data Write)

Example: If the write pointer is at the end of the FIFO buffer


15 0
DT0 K5
DT1 K4
DT2 0 4
Read pointer DT3 K100 0
DT4 K101 1
DT5 K102 2 WR0
DT6 K103 3 K104
DT7 4 Write

FIFW execution

15 0
DT0 K5
DT1 K5 Store count
DT2 0 0 Write pointer
DT3 K100 0
DT4 K101 1
DT5 K102 2 Move write pointer
DT6 K103 3
DT7 K104 4
When the F117 FIFW instruction is executed, after data is written to the final address (4) in the
buffer, the write pointer becomes the starting address (0).

WUME-FPXHPGRG-021 18-21
18.6 F117 FIFW (FIFO Data Write)

Example: When the write pointer has made one complete cycle
15 0
DT0 K5
DT1 K5
DT2 0 0
Read pointer DT3 K100 0
DT4 K101 1 Write
DT5 K102 2 WR0
DT6 K103 3 K105
DT7 K104 4

FIFW execution

15 0
DT0 K5
DT1 K5
DT2 0 0
DT3 K100 0 Write pointer
1 cycle
DT4 K101 1
DT5 K102 2
DT6 K103 3
DT7 K104 4
An error occurs and processing is not carried out.
Because the number of data items stored in the FIFO buffer (DT1 = 5) exceeds the size of the
FIFO buffer (DT0 = 5), the operation is not executed, and an operation error occurs.

■ Measures to avoid operation errors


1. Do not execute the F117 FIFW instruction using the comparison instruction. Avoid
executing the F117 FIFW instruction when the size of the FIFO buffer (DT0) is equal to the
number of data items stored in the buffer (DT1).

18-22 WUME-FPXHPGRG-021
18.6 F117 FIFW (FIFO Data Write)

2. Execute the F117 FIFW instruction after executing the F116 FIFR instruction.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.

R9007 Turns ON when the size (n) of the FIFO specified by [D] is n = 0, or when n > 256
R9008 Turns ON when the number of stored data items of the FIFO is larger than the FIFO size
(ER) (n)
Turns ON when the final address of the FIFO based on the FIFO size (n) exceeds the area

WUME-FPXHPGRG-021 18-23
18.6 F117 FIFW (FIFO Data Write)

Name Description
Turns ON when the write pointer of the FIFO is larger than the FIFO size (n)
Turns ON when the FIFO write pointer is K256 (H100) or higher after the data is written

18-24 WUME-FPXHPGRG-021
19 Bit Manipulation Instructions
19.1 F130 BTS (Specified Bit Set) ............................................................19-2
19.2 F131 BTR (Specified Bit Reset)........................................................19-4
19.3 F132 BTI (Specified Bit Inversion) ....................................................19-6
19.4 F133 BTT (Specified Bit Test) ...........................................................19-8
19.5 F135 BCU (Count ON Bits in 16-bit Data) ........................................19-10
19.6 F136 DBCU (Count ON Bits in 32-bit Data)......................................19-12

WUME-FPXHPGRG-021 19-1
19.1 F130 BTS (Specified Bit Set)

19.1 F130 BTS (Specified Bit Set)


Turns a bit of the specified 16-bit data ON.

■ Instruction format

■ Operands
Items Settings
D Area in which bit is to be set
n Area storing position of bit to be set, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The bit with the number specified by [n] in the 16-bit data specified by [D] is turned ON. Bits
other than the specified bit do not change.
● Set [n] in the range from K0 to K15. Only the lower 4 bits of the 16-bit data are valid.

(Note 1) The bits marked with - are invalid.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the bit specified by DT2 in the data stored in DT0 is turned
ON. When DT2 = K7, the operation is as shown below.

19-2 WUME-FPXHPGRG-021
19.1 F130 BTS (Specified Bit Set)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 19-3
19.2 F131 BTR (Specified Bit Reset)

19.2 F131 BTR (Specified Bit Reset)


Turns OFF a specified bit of 16-bit data.

■ Instruction format

■ Operands
Items Settings
D Area where the bit will be reset
n Area storing the specification of the bit position to be reset, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Turns OFF a bit specified by the number [n] in the 16-bit data specified by [D]. Bits other than
the specified bit do not change.
● Set [n] in the range from K0 to K15. Only the lower 4 bits of the 16-bit data are valid.

(Note 1) The bits marked with - are invalid.

■ Operation example
Operation of instruction format description program
Turns OFF the bit specified by DT2 in the data stored in DT0 when internal relay R0 turns ON.
When DT2 = K7, the operation is as shown below.

19-4 WUME-FPXHPGRG-021
19.2 F131 BTR (Specified Bit Reset)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 19-5
19.3 F132 BTI (Specified Bit Inversion)

19.3 F132 BTI (Specified Bit Inversion)


Inverts a specific bit in 16-bit data.

■ Instruction format

■ Operands
Items Settings
D Target area for bit inversion
n Area storing the number of the bit to be inverted, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Inverts (OFF -> ON or ON -> OFF) the bit number specified by [n] in the 16-bit data specified
by [D]. Bits other than the specified bit do not change.
● [n] is in the range of K0 to K15. Only the lower 4 bits of the 16-bit data are valid.

(Note 1) The bits marked with - are invalid.

■ Operation example
Operation of instruction format description program
Inverts the bit specified by DT10 in data stored in DT0 when internal relay R0 turns ON. When
DT10 = K7, the operation is as shown below.

19-6 WUME-FPXHPGRG-021
19.3 F132 BTI (Specified Bit Inversion)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

WUME-FPXHPGRG-021 19-7
19.4 F133 BTT (Specified Bit Test)

19.4 F133 BTT (Specified Bit Test)


Tests the specified bit in the specified 16-bit data (to determine whether it is ON or OFF).

■ Instruction format
R0
F133 BTT DT0 DT2

D n
R0 R900B R10

■ Operands
Items Settings
D Target area for bit test
n Area storing the numbers of the bits to be tested, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The bit with the number specified by [n] in the 16-bit data specified by [S] is judged to either
be ON or OFF, and the judgment result is output to special internal relay R900B
["=(ZERO)"flag].
● The judgment result is as follows.
State of specified bit "=(ZERO)" flag (R900B)
ON (1) OFF (0)
OFF (0) ON (1)

● [n] can be specified in the range of K0 to K15. Only the lower 4 bits of the 16-bit data are
valid.

(Note 1) The bits marked with - are invalid.

19-8 WUME-FPXHPGRG-021
19.4 F133 BTT (Specified Bit Test)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the bit specified by DT2 in the data stored in data register
DT0 is determined to either be ON or OFF. If the specified bit is OFF, internal relay R10 turns
ON. If DT2 = K7, then the following happens.

As bit 7 is OFF (0), R900B: ON (test result), so R10: ON

■ Precautions when using the judgment flag (R900B) twice or more


● The judgment flag R900B is updated each time an operation instruction or comparison
instruction is executed.
● Accordingly, when using the judgment flag twice or more,
1. the program using the judgment flag should be inserted immediately after the instruction
that executes the judgment; and
2. the flag should be output to an output relay or internal relay for each instruction.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the test bit (bit n) is"0"
(=)

WUME-FPXHPGRG-021 19-9
19.5 F135 BCU (Count ON Bits in 16-bit Data)

19.5 F135 BCU (Count ON Bits in 16-bit Data)


Counts the number of ON bits in the specified 16-bit data.

■ Instruction format

■ Operands
Items Settings
S Area storing the 16-bit data subject to the bit count, or constant data
D Area storing the number of ON bits

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The number of ON bits (bits with a value of 1) in the 16-bit data specified by [S] is counted,
and the result is stored in the area specified by [D].
● The result is stored as a decimal number.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the number of ON bits in the data stored in DT10 is stored in
DT20.

When R0 turns ON, K5 is stored in DT20.

■ Flag operations
Name Description
R9007
Turns ON when the area is exceeded in index modification.
R9008

19-10 WUME-FPXHPGRG-021
19.5 F135 BCU (Count ON Bits in 16-bit Data)

Name Description
(ER)

WUME-FPXHPGRG-021 19-11
19.6 F136 DBCU (Count ON Bits in 32-bit Data)

19.6 F136 DBCU (Count ON Bits in 32-bit Data)


Counts the number of ON bits in the specified 32-bit data.

■ Instruction format

■ Operands
Items Settings
S Area storing the 32-bit data subject to the bit count, or constant data
D Area storing the number of ON bits

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The number of ON bits (bits with a value of 1) in the 32-bit data specified by [S] and [S+1] is
counted, and the result is stored in the area specified by [D].
● The result is stored as a decimal number.

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the number of ON bits in the data stored in DT10 and DT11 is
stored in DT20.

When R0 turns ON, K9 is stored in DT20.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.

19-12 WUME-FPXHPGRG-021
19.6 F136 DBCU (Count ON Bits in 32-bit Data)

Name Description
R9008
(ER)

WUME-FPXHPGRG-021 19-13
(MEMO)

19-14 WUME-FPXHPGRG-021
20 Special Instructions
20.1 F138 HMSS (Hour, Minute, Second Data to Second Data
Conversion)...........................................................................................20-2
20.2 F139 SHMS (Second Data to Hour, Minute, Second Data
Conversion)...........................................................................................20-4
20.3 F140 STC (Cy Flag Set) ...................................................................20-6
20.4 F141 CLC (Cy Flag Clear) ................................................................20-7
20.5 F143 IORF (Partial I/O refresh).........................................................20-8
20.6 F147 PR (Printout) ............................................................................20-10
20.7 F148 ERR (Self-diagnostic Error Set)...............................................20-15
20.8 F149 MSG (Character Send to Programming Tool)..........................20-17
20.9 F150 READ (Shared Memory Read) ................................................20-18
20.10 F151 WRT (Write to Shared Memory) ............................................20-21
20.11 F157 CADD (Calendar Data Addition) ............................................20-24
20.12 F158 CSUB (Calendar Data Subtraction) .......................................20-27
20.13 F160 DSQR (32-bit Data Square Root) ..........................................20-32

WUME-FPXHPGRG-021 20-1
20.1 F138 HMSS (Hour, Minute, Second Data to Second Data Conversion)

20.1 F138 HMSS (Hour, Minute, Second Data to Second Data


Conversion)
Converts data representing hours, minutes, and seconds into data representing seconds.

■ Instruction format

■ Operands
Items Settings
S Starting address of the area storing the two-word data representing hours/minutes/seconds
D Starting address of the area storing the conversion result (second data)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Converts the 2-word time data (hours/minutes/seconds) starting at the address specified by
[S], converts it to seconds, and then stores the result in the 2-word area starting from the
address specified by [D].

■ Data Structure
● Time data [S] representing hours, minutes, and seconds
• is composed of 2-word BCD (H constant) data.
• Specify it as shown below: hours (4-digit), minutes (2-digit), and seconds (2-digit).
(Can be specified with a maximum of 9999 hours, 59 minutes, and 59 seconds.)
(Higher) (Lower)

S Minutes (H00 to H59) Seconds (H00 to H59)

S+1 Time (H0000 to H9999)

e.g. 3 hours, 45 minutes, and 19 seconds


S = H4519
S+1 = H0003
● Time data [D] representing seconds

20-2 WUME-FPXHPGRG-021
20.1 F138 HMSS (Hour, Minute, Second Data to Second Data Conversion)

• is composed of 2-word BCD (H constant, maximum 8-digit) data.


• It is stored as shown below.

D+1 D
Seconds (H00000000 to H99999999)

e.g. 35,999,999 seconds


D = H9999
D+1 = H3599
Note: As the maximum time data that can be specified is 9999 hours, 59 minutes, and 59
seconds, the actual maximum value for the seconds that will be stored in [D] is 35,999,999
seconds.

■ Operation example
Operation of instruction format description program
The time data representing hours, minutes, and seconds that is stored in data registers DT0
and DT1 is converted to seconds and then stored in DT10 and DT11 when internal relay R0
turns ON.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when the data specified by [S] is not BCD data
R9008
(ER) Turns ON when the portion of [S] representing minutes and seconds is exceeds the range
of 00 to 59

WUME-FPXHPGRG-021 20-3
20.2 F139 SHMS (Second Data to Hour, Minute, Second Data Conversion)

20.2 F139 SHMS (Second Data to Hour, Minute, Second Data


Conversion)
Converts data representing seconds (up to 8 digits) to data representing hours, minutes, and
seconds.

■ Instruction format

■ Operands
Items Settings
S Starting address of the area storing the 2-word data representing seconds
D Starting address of the area that stores the conversion result (hours, minutes, and seconds data)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Converts the 2-word time data (in seconds) starting from the address specified by [S] to time
data expressed in hours, minutes, and seconds (H constant), and stores the result in the 2-
word area whose starting address is specified by [D].

■ Data structure
● Time data representing seconds [S]
• is composed of 2-word BCD (H constant, maximum 8-digit) data.
• Specify it in seconds as shown below.

S+1 S
Seconds (H00000000 to H35999999)

e.g. 35,999,999 seconds


S = H9999
S+1 = H3599

20-4 WUME-FPXHPGRG-021
20.2 F139 SHMS (Second Data to Hour, Minute, Second Data Conversion)

Note: The maximum value that can be stored in [D] is 9,999 hours, 59 minutes and 59
seconds, so the maximum value that can be specified for the time data for the seconds unit
is 35,999,999 seconds.
● Time data representing hours, minutes, and seconds [D]
• is composed of 2-word BCD (H constant) data.
• The time data represents hours (4 digits), minutes (2 digits), and seconds (2 digits) as
shown below.

e.g. 3 hours, 45 minutes, and 19 seconds


D = H4519
D+1 = H0003

■ Operation example
Operation of instruction format description program
Converts the seconds data stored in data registers DT0 to DT1 to hour, minute, and second
data when internal relay R0 turns ON. The converted hour, minute, and second data is stored in
data registers DT10 to DT11.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when the data specified by [S] is not BCD data
(ER) Turns ON when the content of [S] exceeds 35,999,999

WUME-FPXHPGRG-021 20-5
20.3 F140 STC (Cy Flag Set)

20.3 F140 STC (Cy Flag Set)


Turns the CY flag ON.

■ Instruction format

■ Outline of operation
The CY (carry) flag (R9009) is turned ON.

■ Flag operations
Name Description
R9009
Turns ON after this instruction is executed
(CY)

20-6 WUME-FPXHPGRG-021
20.4 F141 CLC (Cy Flag Clear)

20.4 F141 CLC (Cy Flag Clear)


Turns the CY flag OFF.

■ Instruction format

■ Outline of operation
The CY (carry) flag (R9009) is turned OFF.

■ Flag operations
Name Description
R9009
Turns OFF after this instruction is executed
(CY)

WUME-FPXHPGRG-021 20-7
20.5 F143 IORF (Partial I/O refresh)

20.5 F143 IORF (Partial I/O refresh)


The input or output of a specified range is refreshed.

■ Instruction format

Input refresh
R10
F143 IORF WX0 WX0

D1 D2

Output refresh
R20
F143 IORF WY0 WY0

D1 D2

■ Operands
Items Settings
D1 The starting word no. of the I/O to be refreshed
D2 The ending word no. of the I/O to be refreshed

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

D1 ● ● ●
D2 ● ● ●

■ Outline of operation
● An I/O refresh (input / output processing) of the external input X or external output Y is
executed for a range from the number specified in [D1] to the number specified in [D2].
● When refreshing input, specify WX** to [D1] and [D2].
● When refreshing output, specify WY** to [D1] and [D2].
● The input or output range that can be partially refreshed is as shown below.

Objects covered by partial refresh (indicated by ●)


Control unit Extension cassette FP-X / FP-X0 expansion FP0 expansion adapter
● ●

■ Example of operation
Operation of instruction format description program
When internal relay R10 is ON, an I/O refresh of input relay WX0 (X0 to XF) is executed.

20-8 WUME-FPXHPGRG-021
20.5 F143 IORF (Partial I/O refresh)

When internal relay R20 is ON, an I/O refresh of output relay WY0 (Y0 to YF) is executed.

WUME-FPXHPGRG-021 20-9
20.6 F147 PR (Printout)

20.6 F147 PR (Printout)


Outputs text data (ASCII codes) to the printer.

■ Instruction format
R0
( DF ) F147 PR DT0 WY0

S D
R9033

PR instruction
executing flag

■ Operands
Items Settings
S Starting address of the area storing printout data (ASCII codes)
D Area for output of printout data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ●
D ●

■ Outline of operation
● Outputs the ASCII codes (for 12 characters) stored in the six-word area starting with the
address specified by [S] to the area WY specified by [D].

● In the WY area, Y□0 to Y□7 are data signals DATA1 to DATA8, and Y□8 is the strobe signal.
Y□9 to Y□F are not used. When the printout instruction is executed, the printout data is
output from Y0 to Y7 (ASCII code), and the strobe signal is output from Y8.
● ASCII code is output in order from the starting address.

20-10 WUME-FPXHPGRG-021
20.6 F147 PR (Printout)

● Be sure to set the printer control code (LF, CR) as data within the 6-word (12 characters)
area above.
● After the start of execution of a printout instruction, 37 scans are required until 12 characters
complete output. (See the"P.20-13"Time Chart for more details.)

■ Precautions for programming


● Multiple F147 PR instructions cannot be executed at the same time. The program should be
set up so that the printout flag (R9033) is used during execution of a F147 PR instruction to
inhibit simultaneous execution.
● The ASCII code conversion instruction (F95 ASC) can be used to convert character
constants (M) to ASCII codes.
● Character constants can be input only with programming tool software.
● A transistor-type output unit (output board) is necessary.
● When this instruction is executed, zero <OFF> is set for Y□9 to Y□F in the WY area specified
by [D].

■ Operation example
Operation of instruction format description program
The ASCII codes stored in data registers DT0 to DT5 are output to WY0 when internal relay
R10 turns ON.

■ Connection method

Printer
(Centronics connector)

Y0 DATA1
Y1 DATA2
Y2 DATA3
Y3 DATA4
Y4 DATA5
Y5 DATA6
Y6 DATA7
Y7 DATA8
Y8 STROBE

COM GND

WUME-FPXHPGRG-021 20-11
20.6 F147 PR (Printout)

■ Data setting
Set the data to be printed out in order from the lower byte of the first word.

<Example> Outputting 10 characters"ABCDEFGHIJ"to a printer

■ Printer output using eight-point output


● When only eight output points are being used, connections should be made as shown below,
and the program should be set up so that the strobe signal is output from Y7.
However, in this case, only alphanumeric characters can be output.

20-12 WUME-FPXHPGRG-021
20.6 F147 PR (Printout)

Connection example

Printer
(Centronics connector)

Y0 DATA1

Y1 DATA2

Y2 DATA3

Y3 DATA4

Y4 DATA5
Y5 DATA6

Y6 DATA7
Y7 DATA8

STROBE
COM GND

Program example

■ Timing chart
A B C D E CR LF
ASCII code Y0 to Y7
H41 H42 H43 H44 H45 H0D H0A

ON
Strobe signal Y8 OFF
ON
R9033 PR instruction executing OFF

Scan count 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 32 33 34 35 36 37

WUME-FPXHPGRG-021 20-13
20.6 F147 PR (Printout)

■ Flag operations
Name Description
R9007 Turns ON when the six words starting with [S] exceed the range of the area
R9008 Turns ON when another F147 (PR) instruction attempts execution while one F147 (PR)
(ER) instruction is being executed

20-14 WUME-FPXHPGRG-021
20.7 F148 ERR (Self-diagnostic Error Set)

20.7 F148 ERR (Self-diagnostic Error Set)


Detects a self-diagnostic error according to detection conditions that are arbitrarily set.

■ Instruction format
Set self -diagnostic error

R0

F148 ERR K100

Clear self -diagnostic error

R1

F148 ERR K0

■ Operand
Items Settings
n Self-diagnostic error code (0, 100 to 299)

■ Devices that can be specified (indicated by ●)

SW SD ConstantIndex Integer
Operand WX WY WR WL SV EV DT LD I
R T K H M f modifier Device

n ● ●

■ Outline of operation
● Stores the self-diagnostic error code specified by [n] in the special data register (DT90000)
and turns ON the self-diagnostic error flag (R9000). Also, the ERR. LED flashes.
● [n] (self-diagnostic error code) can be set in a range from K100 to K299. Depending on the
setting value, it is determined whether to stop or continue operation when the instruction is
executed.
Setting of [n] Operations when an error occurs
K100 to K199 Operation stops
K200 to K299 Operation continues

● When K200 to K299 is set to [n] and if multiple F148 ERR instructions are processed at the
same time, the lower code is accepted with higher priority.
● When 0 is set to [n] and if F148 ERR is executed, the self-diagnostic error with error code 43
or higher is cleared.
Items Operations when the self-
diagnostic error is cleared
ERR. LED - OFF

WUME-FPXHPGRG-021 20-15
20.7 F148 ERR (Self-diagnostic Error Set)

Items Operations when the self-


diagnostic error is cleared
R9000 Self-diagnostic error flag
R9005 Backup battery error flag (current type)
R9006 Backup battery error flag (hold type)
R9007 Operation error flag (hold type) (ER flag) OFF
R9008 Operation error flag (latest type) (ER flag)
R9109 Memory configuration mismatch detection flag
R9166 SNTP time updating failure
DT90000 self-diagnostic error code
DT90017 Address with operation error (hold type)
DT90018 Address with operation error (latest type)
Cleared to zero.
DT90007 Address in case of system register error
DT90299 Memory configuration mismatch detail
DT90590 Details of network errors

● It is possible to repeatedly write the same F148 ERR instructions with the same error code.

■ Example of operation
Operation of instruction format description program
● When the internal relay R0 is ON, the self-diagnostic error 100 is set. Also, the ERR flashes
and operation stops. (Design the program so that the internal relay R0 turns ON when a
situation occurs where the self-diagnostic error 100 needs to be set.)
● When the internal relay R1 is ON, the self-diagnostic error with error code 43 or higher is
cleared.

■ Checking the self-diagnostic error


● The checking procedure is the same as that for ordinary self-diagnostic errors.
Special data registers No.: DT90000, DT90017, DT90018

■ Flag operation
Name Description
R9007
R9008 Turns ON when the [n] is outside the set range.
(ER)

20-16 WUME-FPXHPGRG-021
20.8 F149 MSG (Character Send to Programming Tool)

20.8 F149 MSG (Character Send to Programming Tool)


Displays a message on the programming tool.

■ Instruction format

■ Operands
Items Settings
S Message (character constant)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●

■ Outline of operation
● The characters specified by [S] are displayed on the programming tool connected to the
controller.
● The message can also be read from"Message display"on the tool software menu.
● The character constant M can only be input by programming tool software.
● The message flag (R9026) turns ON, and the content of [S] is set to special data registers
DT90030 to DT90035.
● If a message is already being displayed, the displayed content does not change even if this
instruction is executed. To clear the message displayed, click the "Cancel" button on the
"Display PLC Message" screen using the programming tool software.

■ Operation example
Operation of instruction format description program
When internal relay R10 turns ON, the message"TEST PROGRAM"is displayed on the
programming tool.

WUME-FPXHPGRG-021 20-17
20.9 F150 READ (Shared Memory Read)

20.9 F150 READ (Shared Memory Read)


Reads data from the memory of the intelligent unit.

■ Instruction format

■ Operands
Items Settings
S1 Slot number and bank number specification
S2 Read start address of the intelligent unit memory
n Read word count
D Starting number of area storing read data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ●
S2 ● ● ●
n ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The number of words [n] of the data stored in the shared memory of the intelligent unit
specified by [S1] is read from the address specified by [S2] and is stored from the area
specified by [D] in the control unit.

■ Operation example
Operation of instruction format description program
When internal relay R10 turns ON, the four-word data at addresses 19 to 22 is read from the
shared memory of the intelligent unit installed in slot number 3 and stored in data registers DT0
to DT3 of the control unit.

20-18 WUME-FPXHPGRG-021
20.9 F150 READ (Shared Memory Read)

Control unit
3 2 1 0

Intelligent unit Control unit


0 DT0
DT1
Four words
DT2
17
DT3
18
DT4
19
DT5
20
21
22
23
24

■ Specifying each item


● Specification of slot number and bank number [S1]
Specify the slot where the intelligent unit is installed. If the memory has a bank, specify the
bank number as well.
● Read start address of the intelligent unit shared memory [S2]
Specify by referring to the shared memory list for each intelligent unit.
e.g. For address 2, specify K2.
● Read word count [n]
Specify with a K constant.
e.g. To read 10 words of data, specify K10.

■ How to specify S1
(1) For intelligent units without banks
Specify the slot number where the target intelligent unit is installed.

WUME-FPXHPGRG-021 20-19
20.9 F150 READ (Shared Memory Read)

(higher byte) (lower byte)


S1

H00 Slot no.: H00 to H1F

(2) For intelligent units with banks


Specify the slot number (H constant) where the target intelligent unit is installed and the bank
number (H constant).

(higher byte) (lower byte)


S1

Bank no.: H00 to HFF Slot no.: H00 to H1F

■ How to specify slot numbers


The slot number of the target intelligent unit is automatically allocated according to the
installation position.
Slots are number from left to right from the control unit side.

Specified 3 2 1 0
number

Control unit

■ Flag operations
Name Description

R9007 Turns ON when the value of [S1] is out of the specified range
R9008 Turns ON when the area is exceeded in index modification.
(ER) Turns ON when the read data exceeds the area [D]

20-20 WUME-FPXHPGRG-021
20.10 F151 WRT (Write to Shared Memory)

20.10 F151 WRT (Write to Shared Memory)


Writes data into the memory in an intelligent unit.

■ Instruction format

■ Operands
Items Settings
S1 Slot number and bank number specification
S2 Starting number of area storing the write data
n Number of words to be written
D Starting address for writing in the memory of the intelligent unit

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ●
● ●
( (
N N
S2 ● ● ● ● ● ● ● ● ● ● ● ●
ot ot
e e
1) 1)

n ● ● ●
D ● ● ●

(Note 1) If K/H constants are specified in [S2], the [S2] stored value (one word) is written to the address
specified by [D]. The number of words to be written is fixed at 1, so any specification of [n] is ignored.

■ Outline of operation
● With the area in the control unit specified by [S2] as the start, [n] words of data are written to
the shared memory of the intelligent unit specified by [S1], starting from the address
specified by [D].

■ Operation example
Operation of instruction format description program
Five words of data from data registers DT10 to DT14 of the control unit are written into the
addresses 0 to 4 of the intelligent unit shared memory (located in slot 0) when internal relay
R10 turns ON.

WUME-FPXHPGRG-021 20-21
20.10 F151 WRT (Write to Shared Memory)

Control unit
3 2 1 0

Control unit Intelligent unit


DT0 0
DT1 1
5 words
2
3
DT10
4
DT11
5
DT12
6
DT13
DT14

■ Specifying each item


● Specification of slot number and bank number [S1]
Specify the slot where the intelligent unit is installed. If the memory has a bank, specify the
bank number as well.
● Number of words to be written [n]
Specify with a K constant.
e.g. To write 10 words of data, specify "K10".
● Starting address [D] for writing in the shared memory of the intelligent unit
Specify by referring to the shared memory list for each intelligent unit.
e.g. To specify address 2, specify "K2".

■ How to specify S1
(1) For intelligent units without banks
Specify the slot number where the target intelligent unit is installed.

(higher byte) (lower byte)


S1

H00 Slot no.: H00 to H1F

20-22 WUME-FPXHPGRG-021
20.10 F151 WRT (Write to Shared Memory)

(2) For intelligent units with banks


Specify the slot number (H constant) where the target intelligent unit is installed and the bank
number (H constant).

(higher byte) (lower byte)


S1

Bank no.: H00 to HFF Slot no.: H00 to H1F

■ How to specify slot numbers


The slot number of the target intelligent unit is automatically allocated according to the
installation position.
Slots are number from left to right from the control unit side.

Specified 3 2 1 0
number

Control unit

■ Flag operations
Name Description

R9007 Turns ON when the value of [S1] is out of the specified range
R9008 Turns ON when the area is exceeded in index modification.
(ER) Turns ON when the range of writing data exceeds the area specified by [S2]

WUME-FPXHPGRG-021 20-23
20.11 F157 CADD (Calendar Data Addition)

20.11 F157 CADD (Calendar Data Addition)


Calculates the date and time after a specified amount of time (hours, minutes, and seconds)
has elapsed since a certain date and time (year, month, day, hour, minute, second).

■ Instruction format

■ Operands
Items Settings
S1 Starting address of area storing date and time data (three words)
S2 Starting address of area storing date and time data (two words), or constant data
D Starting address of area storing addition result date and time data (three words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The three-word date and time data (year, month, day, hour, minute, second) that starts at the
address specified by [S1] and the time data (hours, minutes, and seconds) specified by [S2]
are added together. The result (time of elapsed value) is stored in the three-word area that
starts at the address specified by [D].

20-24 WUME-FPXHPGRG-021
20.11 F157 CADD (Calendar Data Addition)

<Time data> (Higher) (Lower)

[S1] Minutes (H00 to H59) Seconds (H00 to H59)

[S1+1] Day (H01 to H31) Hour (H01 to H23)

[S1]+2 Year (H00 to H99) Month (H00 to H12)

+ (addition)
<Time data> (Higher) (Lower)

[S1] Minutes (H00 to H59) Seconds (H00 to H59)

[S1+1] Time (H0000 to H9999)

<Time data> (Higher) (Lower)

[D] Minutes (H00 to H59) Seconds (H00 to H59)

[D1+1] Day (H01 to H31) Hour (H01 to H23)

[D1]+2 Year (H00 to H99) Month (H00 to H12)

● Specify the values for date and time data [S1] and time data [S2] using BCD data (H
constant).
[Example of date and time data]
14 hours, 23 minutes, and 31 seconds on August 1, 1992
S1 = H2331 (23 hours, 31 minutes)
S1+1 = H0114 (1st of the month, 14th hour)
S1+2 = H9208 (1992, August)
[Example of time data]
32 hours, 50 minutes, and 45 seconds
S2 = H5045 (50 minutes, 45 seconds)
S2+1 = H0032 (32 hours)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the built-in calendar timer reads date and time data and adds
the time data stored in data registers DT10 and DT11. The date and time resulting from the
addition is stored in DT30 to DT32.

WUME-FPXHPGRG-021 20-25
20.11 F157 CADD (Calendar Data Addition)

DT90054 H30 H24


1992, June,17th
DT90055 10 hours
H17 H10 30 minutes
24 seconds
DT90056 H92 H06

+ (addition)

DT10 H45 H00


20 hours
45 minutes later
DT11 H00 H20

DT30 H15 H24


1992, June,18th
7 hours
DT31 H18 H07
15 minutes
24 seconds
DT32 H92 H06

■ Data configuration of built-in calendar timer


(Higher) (Lower)
DT90054 Minutes Seconds

DT90055 Day Hours

DT90056 Year Month

■ Precautions for programming


Special data registers DT90054 to DT90056, in which the values of the built-in calendar timer
are stored, cannot be specified directly for [D]. To change the values of the built-in calendar
timer, store the addition results in a separate memory area, and then use the F0 MV instruction
to transfer the values to DT90054 to DT90056.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.

R9007 Turns ON when the data specified by [S1] and [S2] is not BCD data
R9008 Turns ON when the data specified by [S1] is not date and time data
(ER) Turns ON when the data specified by [S2] is not time data
Turns ON when the specified data exceeds the area

20-26 WUME-FPXHPGRG-021
20.12 F158 CSUB (Calendar Data Subtraction)

20.12 F158 CSUB (Calendar Data Subtraction)


Calculates the date and time a specified amount of time (hours, minutes, and seconds) before a
certain date and time (year, month, day, hour, minute, second).

■ Instruction format

■ Operands
Items Settings
S1 Starting address of area storing date and time data (three words)
S2 Starting address of area storing date and time data (two words), or constant data
D Starting address of area storing subtraction result date and time data (three words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
● The time data (hours, minutes, and seconds) specified by [S2] is subtracted from the three-
word date and time data (year, month, day, hour, minute, second) that starts at the address
specified by [S1]. The result is stored in the three-word area that starts at the address
specified by [D].

WUME-FPXHPGRG-021 20-27
20.12 F158 CSUB (Calendar Data Subtraction)

<Time data> (Higher) (Lower)

[S1] Minutes (H00 to H59) Seconds (H00 to H59)

[S1+1] Day (H01 to H31) Hour (H01 to H23)

[S1+2] Year (H00 to H99) Month (H00 to H12)

- (subtraction)
<Time data> (Higher) (Lower)

[S1] Minutes (H00 to H59) Seconds (H00 to H59)

[S2+1] Time (H0000 to H9999)

<Time data> (Higher) (Lower)

[D] Minutes (H00 to H59) Seconds (H00 to H59)

[D1+1] Day (H01 to H31) Hour (H01 to H23)

[D1+2] Year (H00 to H99) Month (H00 to H12)

● Specify the values for date and time data [S1] and time data [S2] using BCD data (H
constant).
[Example of date and time data]
14 hours, 23 minutes, and 31 seconds on December 1, 1994
S1 = H2331 (23 hours, 31 minutes)
S1+1 = H0114 (1st of the month, 14th hour)
S1+2 = H9412 (1994, December)
[Example of time data]
32 hours, 50 minutes, and 45 seconds
S2 = H5045 (50 minutes, 45 seconds)
S2+1 = H0032 (32 hours)

■ Operation example
Operation of instruction format description program
When internal relay R0 turns ON, the built-in calendar timer reads date and time data and
subtracts the time data stored in data registers DT10 and DT11. The date and time resulting
from the subtraction is stored in DT30 to DT32.

20-28 WUME-FPXHPGRG-021
20.12 F158 CSUB (Calendar Data Subtraction)

DT90054 H30 H24


1992, June,17th
DT90055 10 hours
H17 H10 30 minutes
24 seconds
DT90056 H92 H06

- (subtraction)

DT10 H30 H30 3 hours


30 minutes
DT11 H00 H03 30 second earlier

DT30 H59 H54


1992, June,17th
6 hours
DT31 H17 H06
59 minutes
54 seconds
DT32 H92 H06

■ Precautions for programming


Special data registers DT90054 to DT90056, in which the values of the built-in calendar timer
are stored, cannot be specified directly for [D]. To change the values of the built-in calendar
timer, store the addition results in a separate memory area, and then use the F0 MV instruction
to transfer the values to DT90054 to DT90056.

■ Usage example: Calculating elapsed time


The F158 CSUB instruction can be used to calculate elapsed time. Using the calendar timer,
the starting date and time and the ending date and time are stored in the data memory and the
time that has elapsed between them is calculated.
This is explained using the example of calculating the stopped time for an operation that
stopped at 08 hours, 02 minutes, and 15 seconds and restarted at 10 hours, 30 minutes, and
25 seconds.
This can be thought of as"subtracting 8 hours, 2 minutes, and 15 seconds from 10 hours, 30
minutes, and 25 seconds".

WUME-FPXHPGRG-021 20-29
20.12 F158 CSUB (Calendar Data Subtraction)

Start time 02 15 2 minutes, 15 seconds

23 08 23rd day, 8 hours


[S2]

94 12 1994, December

Start time 30 25 30 minutes, 25 seconds

[S2]
23 10 23rd day, 10 hours

94 12 1994, December

The data to be subtracted is taken from the starting date and time data as is shown below.

2 minutes,
02 15
15 seconds
00 08 8 hours

The part representing "day" is set to 0

CSUB instruction execution

The result will be as follows.

[D] 02 10 2 minutes,10 seconds

23 02 23rd day, 2 hours

94 12 1994, December

■ Data configuration of built-in calendar timer


(Higher) (Lower)
DT90054 Minutes Seconds

DT90055 Day Hours

DT90056 Year Month

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when the data specified by [S1] and [S2] is not BCD data
R9008
Turns ON when the data specified by [S1] is not date and time data
(ER)
Turns ON when the data specified by [S2] is not time data

20-30 WUME-FPXHPGRG-021
20.12 F158 CSUB (Calendar Data Subtraction)

Name Description
Turns ON when the specified data exceeds the area

WUME-FPXHPGRG-021 20-31
20.13 F160 DSQR (32-bit Data Square Root)

20.13 F160 DSQR (32-bit Data Square Root)


Calculates the square root of the specified 32-bit data.

■ Instruction format

■ Operands
Items Settings
S Area storing the data for square root calculation, or constant data
D Area storing the calculated square root

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Calculates the square root of the 32-bit data (K constant) stored in [S] and [S+1], then stores
the result (K constant) in [D] and [D+1]. Fractions are rounded down.
√[S] -> [D]

■ Operation example
Operation of instruction format description program
The square root (√) of the 32-bit data stored in DT10 and DT11 is calculated and the result
stored in DT20 and DT21 when internal relay R0 turns ON. When K64 is stored in DT10 to
DT11, it will be as follows.

DT11 DT10

K64

DT21 DT20

K8

Finds the square root of 64, which is 8.

20-32 WUME-FPXHPGRG-021
20.13 F160 DSQR (32-bit Data Square Root)

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
ON when the data specified by [S] is a negative value
(ER)

WUME-FPXHPGRG-021 20-33
(MEMO)

20-34 WUME-FPXHPGRG-021
21 Serial Communication
Instructions
21.1 [F145 SEND] [F146 RECV] Instructions: Common Items.................21-2
21.2 [F145 SEND] Data Transmission (MEWTOCOL-COM Master)........21-4
21.3 [F146 RECV] Data Reception (MEWTOCOL-COM Master).............21-7
21.4 [F145 SEND] Data Transmission (MODBUS Master: Function
Code Specification) ...............................................................................21-10
21.5 [F146 RECV] Data Reception (MODBUS Master: Function Code
Specification) ........................................................................................21-12
21.6 [F145 SEND] Data Transmission (MODBUS Master).......................21-14
21.7 [F146 RECV] Data Reception (MODBUS Master)............................21-17
21.8 [F159 MTRN] Serial Data Send / Receive Instruction.......................21-20

WUME-FPXHPGRG-021 21-1
21.1 [F145 SEND] [F146 RECV] Instructions: Common Items

21.1 [F145 SEND] [F146 RECV] Instructions: Common Items


Common items for SEND / RECV instructions are indicated.

■ System register settings


Using tool software, specify a communication mode for the COM port to be used.
Mode System register No. 412
MEWTOCOL master Computer link
MODBUS master MODBUS RTU

■ Execution conditions for instructions


● Multiple SEND / RECV instructions cannot be executed at the same time to a single
communication port. Create a program so that an instruction is executed when the SEND /
RECV instruction execution flag is ON (1).

■ Confirmation of execution results of instructions


● While processing SEND / RECV instruction, only a Request to Send is issued. The actual
transmission is performed when ED instruction is executed. Check the SEND / RECV
instruction execution end flag to confirm the completion of transmission.
● When the instruction terminates abnormally, the SEND / RECV done flag turns ON. The error
code is stored in the corresponding special data register. For details of error codes, refer to
the error codes of each protocol.

■ Special relays / special data registers


Operation COM0 COM1 COM2 COM3 COM4
SEND/RECV 0: Not executable R913C R9144
instruction R9134 R914C R9154
1: Executable (R9044) (R904A)
execution flag
SEND/RECV
instruction 0: Successful R913D R9145
R9135 R914D R9155
execution end 1: Unsuccessful (R9045) (R904B)
flag
SEND/RECV When unsuccessful,
instruction end an error code is DT90123 DT90124 DT90125 DT90127 DT90128
code stored.

(Note 1) The Nos. in brackets indicate devices that are compatible with existing FP-X / FPsigma.

■ Timeout time setting


● Error code H73 indicates timeout waiting for a response.
● Timeout time can be changed in the area from 10.0 ms to 81.9 s (by 2.5 ms), using the
system register No. 32. By default, the value is set to 10 s.
● In your program, be sure to wait for approx. the maximum scan time after transmission
complete and before the next transmission, in the case of global transfer (transmission with
H00 specified for unit No.).

21-2 WUME-FPXHPGRG-021
21.1 [F145 SEND] [F146 RECV] Instructions: Common Items

■ Other restrictions
This is not executable for special internal relays (R9000 onward) or for special data register
(DT90000).

WUME-FPXHPGRG-021 21-3
21.2 [F145 SEND] Data Transmission (MEWTOCOL-COM Master)

21.2 [F145 SEND] Data Transmission (MEWTOCOL-COM Master)

■ Instruction format

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW modifier
WX WY WR WL SV EV DT LD In SDT
s R K H (Note 1)

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Operands
Operand Settings Setting range
Specify the starting number of the area (2 words) that stores control data.
Specify the transfer method.
Word transfer: Specify the number of send words. (Note 1)
S1
S1 Bit transfer: Specify the bit number of a master unit and that of a
destination unit.
Specify the COM port No. of a master unit and the unit number of a (Note 2)
S1+1
destination unit.
Specification
S2 of a master Specify the area of a master unit that stores send data.
unit
Specification
Specify the area type of a destination unit that stores send
D of a
data. The number is specified at 0.
destination unit
Specification
Specify the starting address of a destination unit that stores
n of a H0 to HFFFF
send data.
destination unit

(Note 1) To [S1], the following specification should be applied. The specification method differs depending on
word transfer and bit transfer.

21-4 WUME-FPXHPGRG-021
21.2 [F145 SEND] Data Transmission (MEWTOCOL-COM Master)

[S1]: H0

Transfer in Specify the number of send words


word units H001 to H1FB (1 to 507 words)

[S1]: H8 H0 (fixed)

Transfer in Destination bit No. Master unit bit No.


bit units (H0 to HF) (H0 to HF)
(Note 2) To [S1+1], the following specification should be applied.

COM port selection


HF H1 H2 H3 H4
(upper four bits)
Port no. COM0 COM1 COM2 COM3 COM4

■ Specifying the storage area of a destination unit by using [D] and [n]
Specify "0" for [D] as the device No.
Specify the memory area of a destination unit that stores sent data, by combining [D] (type) and
[n] (address).
Example 1: [D]: DT0, [n]: K100

DT100
Example 2: [D]: DT0, [n]: HFFF0

DT65520

■ Flag operations
Name Description
Turns ON when the [S1] / [S1+1] control data value is outside the specified range.
Turns ON when the [S2] or [D] area is exceeded, if the number of words specified in [S1] is
taken during transfer in word units.
R9007
Turns ON when [D]+[n] exceeds the [D] area
R9008
Turns ON when the operation mode of the target COM port is other than computer link.
(ER)
Word unit
● If [D] is DT / LD, turns ON when [n] is not from 0 to 99999.
● If [D] is WY / WR / WL / SV / EV, turns ON when [n] is not from 0 to 9999.

WUME-FPXHPGRG-021 21-5
21.2 [F145 SEND] Data Transmission (MEWTOCOL-COM Master)

Name Description
Bit unit
● Turns ON when [D] is not WY / WR / WL.
● Turns ON when [n] is not from 0 to 999.
Turns ON when the [D] device No. is not 0.
Turns ON when a Communication Cassette is not attached to the target COM port.

21-6 WUME-FPXHPGRG-021
21.3 [F146 RECV] Data Reception (MEWTOCOL-COM Master)

21.3 [F146 RECV] Data Reception (MEWTOCOL-COM Master)

■ Instruction format

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW modifier
WX WY WR WL SV EV DT LD In SDT
s R K H (Note 1)

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Operands
Setting
Operand Settings
range
Specify the starting number of the area (2 words) that stores control data.
Specify the transfer method.
Word transfer: Specify the number of send words. (Note 1)
S1
S1 Bit transfer: Specify the bit number of a master unit and that of a
destination unit.
Specify the COM port No. of a master unit and the unit number of a (Note 2)
S1+1
destination unit.
Specification
Specify the source data area of a destination unit. (Device No.
S2 of a
is fixed to “0”)
destination unit
Specification
Specify the starting address of the device in the source data H0 to
n of a
area of a destination unit. HFFFF
destination unit
Specification
Specify the device starting address of the receive data storage
D of a master
area in the master unit.
unit

(Note 1) To [S1], the following specification should be applied. The specification method differs depending on
word transfer and bit transfer.

WUME-FPXHPGRG-021 21-7
21.3 [F146 RECV] Data Reception (MEWTOCOL-COM Master)

[S1]: H0

Transfer in Specify the number of send words


word units H001 to H1FD (1 to 509 words)

[S1]: H8 H0 (fixed)

Transfer in Destination bit No. Destination unit bit No.


bit units (H0 to HF) (H0 to HF)
(Note 2) To [S1+1], the following specification should be applied.

COM port selection


HF H1 H2 H3 H4
(upper four bits)
Port no. COM0 COM1 COM2 COM3 COM4

■ Specifying [S2] as the starting address of the source data area


Specify “0” for [S2] as the device No. Specify the memory area of a destination unit that stores
sent data, by combining [S2] (type) and [n] (address).
Example 1: [S2]: DT0, [n]: K100

DT100
Example 2: [S2]: DT0, [n]: HFFF0

DT65520

■ Flag operations
Name Description
Turns ON when the [S1] / [S1+1] control data value is outside the specified range.
Turns ON when the [S2] or [D] area is exceeded, if the number of words specified in [S1] is
taken during transfer in word units.

R9007 Turns ON when [S2]+[n] exceeds the [S2] area.


R9008 Turns ON when the operation mode of the target COM port is other than computer link.
(ER)
Word unit
● If [S2] is DT / LD, turns ON when [n] is not from 0 to 99999.
● If [S2] is WX / WY / WR / WL / SV / EV, turns ON when [n] is not from 0 to 9999.
Bit unit

21-8 WUME-FPXHPGRG-021
21.3 [F146 RECV] Data Reception (MEWTOCOL-COM Master)

Name Description
● Turns ON when [S2] is not WX / WY / WR / WL.
● Turns ON when [n] is not from 0 to 999.
Turns ON when the [S2] device No. is not 0.
Turns ON when a Communication Cassette is not attached to the target COM port.

WUME-FPXHPGRG-021 21-9
21.4 [F145 SEND] Data Transmission (MODBUS Master: Function Code
Specification)

21.4 [F145 SEND] Data Transmission (MODBUS Master: Function Code


Specification)

■ Instruction format

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW modifier
WX WY WR WL SV EV DT LD In SDT
s R K H (Note 1)

S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Operands
Item Settings Setting range
Specify the COM port No. of a master unit, MODBUS command to be (Note 1)
S1
sent, and the unit number of a destination unit.
Specification of (Note 2)
S2 Operation memory area that stores data to be sent.
a master unit
Specification of
D a destination Specify a MODBUS address(Note 3) H0 to HFFFF
unit
Specification of 1 to 127 words
n a destination Specify the number of sent data.(Note 2)(Note 4)
unit 1 to 2040 bits

(Note 1) In [S1], specify the combination of the COM port No. of a master unit, MODBUS function code and the
unit number of a destination unit. When the COM port No. is 0, specify HF for the highest digit.
Example: In the case of COM port 1, MODBUS function code 6, and destination unit No. 10, specify
H160A.

21-10 WUME-FPXHPGRG-021
21.4 [F145 SEND] Data Transmission (MODBUS Master: Function Code
Specification)

COM port selection (upper four bits) HF H1 H2 H3


Port no. COM0 COM1 COM2 COM3
(Note 2) Depending on the operation memory type specified in operand [S1] and the number of send data
specified in operand [n], the transfer method and the function code of MODBUS command to be sent
vary.

Send
Device type specified Transfer
in [S2] No. of data MODBUS command to be sent
method
[n]

16-Bit device: 1 Preset single register (06)


Register
WX, WY, WR, WL, DT, transmission HF: Force multiple coils (15)
LD 2 to 127
H10: Preset multiple registers (16)

1-bit device Bit 1 H5: Force single coil (05)


X, Y, R, L transmission 2 to 2040 HF: Force multiple coils (15):
(Note 3) When “0” is specified for the destination unit number, global transfer is applied. In this process, there is
no response message from a destination unit.
(Note 4) For the number of send data [n], specify the number of words in the case of register transfer, and
specify the number of bits in the case of bit transfer.

■ Flag operations
Name Description
Turns ON when the [S1] control data value is outside the specified range.
Turns ON when the COM port specification of control data specified in [S1] is not MODBUS
mode.
R9007
Turns ON when the number of send data [n] is 0.
R9008
Turns ON when the number of send data is negative.
(ER)
Turns ON when the number of send data [n] exceeds the operation memory area specified
in [S2].
Turns ON when the number of send data [n] exceeds limitation in MODBUS specification.

WUME-FPXHPGRG-021 21-11
21.5 [F146 RECV] Data Reception (MODBUS Master: Function Code
Specification)

21.5 [F146 RECV] Data Reception (MODBUS Master: Function Code


Specification)

■ Instruction format

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW modifier
WX WY WR WL SV EV DT LD In SDT
s R K H (Note 1)

S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Operands
Item Settings Setting range
Specify the COM port No. of a master unit, MODBUS command to be (Note 1)
S1
sent, and the unit number of a destination unit.
Specification of
S2 a destination Specify a MODBUS address H0 to HFFFF
unit
Specification of 1 to 127 words
n a destination Specify the number of received data.(Note 2)
unit 1 to 2040 bits

Specification of
D
a master unit Operation memory area that stores receive data. (Note 3)

(Note 1) In [S1], specify the combination of the COM port No. of a master unit, MODBUS function code and the
unit number of a destination unit. When the COM port No. is 0, specify HF for the highest digit.
Example: In the case of COM port No. 1, MODBUS function code 3, and destination unit No. 10,
specify H130A.

21-12 WUME-FPXHPGRG-021
21.5 [F146 RECV] Data Reception (MODBUS Master: Function Code
Specification)

COM port selection (upper four bits) HF H1 H2 H3


Port no. COM0 COM1 COM2 COM3
(Note 2) For the number of receive data [n], specify the number of words in the case of register transfer, and
specify the number of bits in the case of bit transfer.
(Note 3) Depending on the operation memory type specified in operand [D], and the number of receive data
specified in operand [n], the transfer method and the function code of MODBUS command vary.

Device specified in [D] Transfer method MODBUS command to be sent


H1: Read coil state (01)
16-Bit device: Register H2: Read input state (02)
WX, WY, WR, WL, DT, LD transmission H3: Read hold register (03)
H4: Read input register (04)
1-bit device H1: Read coil state (01)
Bit transmission
X, Y, R, L H2: Read input state (02)

■ Flag operations
Name Description
Turns ON when the [S1] control data value is outside the specified range.
Turns ON when the COM port specification of control data specified in [S1] is not MODBUS
mode.
R9007
Turns ON when the number of receive data [n] is 0
R9008
Turns ON when the number of receive data is negative
(ER)
Turns ON when the number of receive data [n] exceeds MODBUS specification
Turns ON when the operation memory area specified in [D] is exceeded if the number of
receive data [n] is received.

WUME-FPXHPGRG-021 21-13
21.6 [F145 SEND] Data Transmission (MODBUS Master)

21.6 [F145 SEND] Data Transmission (MODBUS Master)

■ Instruction format

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW modifier
WX WY WR WL SV EV DT LD In SDT
s R K H (Note 1)

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
D ● ● ●
N ● ● ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Operands
Operand Settings Remarks
Specify the starting number of the area (2 words) that stores control data.
Specify the transfer method.
Word transfer: Specify the number of send words. (Note 1)(Note 4)
S1
S1 Bit transfer: Specify the bit number of a master unit and that of a
destination unit.
Specify the COM port No. of a master unit and the unit number of a (Note 2)(Note 3)
S1+1
destination unit.
Specification
S2 of a master Specify the area of a master unit that stores send data. (Note 4)
unit
Specification
Specify the area type of a destination unit that stores send (Note 5)
D of a
data. The number is specified at 0.
destination unit
Specification
Specify the starting address of a destination unit that stores (Note 5)
n of a
send data.
destination unit

(Note 1) To [S1], the following specification should be applied. The specification method differs depending on
word transfer and bit transfer.

21-14 WUME-FPXHPGRG-021
21.6 [F145 SEND] Data Transmission (MODBUS Master)

[S1]: H0

Transfer in Specify the number of send words


word units H001 to H07F (1 to 127 words)

[S1]: H8 H0 (fixed)

Transfer in Destination bit No. Master unit bit No.


bit units (H0 to HF) (H0 to HF)
(Note 2) To [S1+1], the following specification should be applied.

COM port selection (upper four bits) HF H1 H2 H3


Port no. COM0 COM1 COM2 COM3
(Note 3) When “0” is specified for the destination unit number, global transfer is applied. In this process, there is
no response message from a destination unit.
(Note 4) Depending on the transfer method specified for operand [S1] and the device type specified for
operand [S2], the function code of MODBUS command to be sent varies.

Device type specified in Transfer method


[S2] specified in [S1] MODBUS function code to be sent

16-Bit device: Force multiple coils (15)


Register transmission
WX, WY, WR, WL, DT, LD Preset multiple registers (16)
1-bit device
Bit transmission Force multiple coils (15)
X, Y, R, L
(Note 5) The area of the destination unit is specified by the combination of operands [D] and [n].
When [D] = DT0 and [n] = K100, the memory area of the destination unit starts with DT100.

■ Flag operations
Name Description
Turns ON when the [S1] / [S1+1] control data value is outside the specified range.
Turns ON when the [S2] or [D] area is exceeded, if the number of words specified in [S1] is
taken during transfer in word units.
R9007
R9008 Turns ON when [D]+[n] exceeds the [D] area
(ER) Turns ON when the COM port specification of control data specified in [S1+1] is not
MODBUS mode.
Turns ON when the [D] area is DT during transfer in bit units.

WUME-FPXHPGRG-021 21-15
21.6 [F145 SEND] Data Transmission (MODBUS Master)

Name Description
Turns ON when the [D] device No. is not 0.

● This is convenient to write data into Panasonic’s PLC via MODBUS RTU.
● For MODBUS reference Nos. and device Nos., refer to "Device No. Correspondence Table".

21-16 WUME-FPXHPGRG-021
21.7 [F146 RECV] Data Reception (MODBUS Master)

21.7 [F146 RECV] Data Reception (MODBUS Master)

■ Instruction format

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW modifier
WX WY WR WL SV EV DT LD In SDT
s R K H (Note 1)

S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Operands
Operand Settings Remarks
Specify the starting number of the area (2 words) that stores control data.
Specify the transfer method.
Word transfer: Specify the number of send words. (Note 1)(Note 3)
S1
S1 Bit transfer: Specify the bit number of a master unit and that of a
destination unit.
Specify the COM port No. of a master unit and the unit number of a (Note 2)
S1+1
destination unit.
Specification
Specify the source data area of a destination unit. (Device (Note 4)
S2 of a
No. is fixed to “0”)
destination unit
Specification
Specify the starting address of the device in the source data (Note 4)
n of a
area of a destination unit.
destination unit
Specification
Specify the device starting address of the receive data (Note 3)
D of a master
storage area in the master unit.
unit

(Note 1) To [S1], the following specification should be applied. The specification method differs depending on
word transfer and bit transfer.

WUME-FPXHPGRG-021 21-17
21.7 [F146 RECV] Data Reception (MODBUS Master)

[S1]: H0

Transfer in Specify the number of send words


word units H001 to H07F (1 to 127 words)

[S1]: H8 H0 (fixed)

Transfer in Master unit bit No. Destination bit No.


bit units (H0 to HF) (H0 to HF)
(Note 2) To [S1+1], the following specification should be applied.

COM port selection (upper four bits) HF H1 H2 H3


Port no. COM0 COM1 COM2 COM3
(Note 3) Depending on the transfer method specified for operand [S1] and the device type specified for
operand [D], the function code of MODBUS command to be sent varies.

Device type specified in Transfer method


[D] specified in [S1] MODBUS function code to be sent

H1: Read coil state (01)


16-Bit device: H2: Read input state (02)
Register transmission
WX, WY, WR, WL, DT, LD H3: Read hold register (03)
H4: Read input register (04)
1-bit device H1: Read coil state (01)
Bit transmission
X, Y, R, L H2: Read input state (02)
(Note 4) The area of the destination unit is specified by the combination of operands [S2] and [n].
When [S2] = DT0 and [n] = K100, the memory area of the destination unit starts with DT100.

■ Flag operations
Name Description
Turns ON when the [S1] / [S1+1] control data value is outside the specified range.
Turns ON when the [S2] or [D] area is exceeded, if the number of words specified in [S1] is
taken during transfer in word units.
R9007
R9008 Turns ON when [S2]+[n] exceeds the [S2] area.
(ER) Turns ON when the COM port specification of control data specified in [S1+1] is not
MODBUS mode.
Turns ON when the [S2] area is DT / WL / LD, during transfer in bit units.

21-18 WUME-FPXHPGRG-021
21.7 [F146 RECV] Data Reception (MODBUS Master)

Name Description
Turns ON when the [S2] device No. is not 0.

● This is convenient to read data from Panasonic PLC via MODBUS-RTU.


● For MODBUS reference Nos. and device Nos., refer to "Device No. Correspondence Table".

WUME-FPXHPGRG-021 21-19
21.8 [F159 MTRN] Serial Data Send / Receive Instruction

21.8 [F159 MTRN] Serial Data Send / Receive Instruction

■ Instruction format

■ Devices that can be specified (indicated by ●)


Constan
t Index modifier
Operands WX WY WR WL SV EV DT LD I
(Note 1)
K H
S ● ●
n ● ● ● ● ● ● ● ● ● ● ● ●
D ● ●

(Note 1) A character constant cannot be specified.

■ Operands
Item Settings
S Starting area (data register) of the data table
Area storing the number of bytes of data to be sent, or constant data
● Add the terminator (end code) during transmission when the value is positive.
n
● Do not add the terminator (end code) during transmission when the value is negative.
● In the case of H8000, the purpose of COM port is switched.
D COM port number for sending data (K0: COM0; K1: COM1; K2: COM2; K3: COM3)

■ Outline of operation
Data is sent or received with an external device connected to the COM port. F159 (MTRN)
instruction has the following three functions.
Item Description
In the data register starting with [S], data to be sent to an external device is set as a table in
Send advance. By executing the [F159 MTRN] instruction, data of [n] bytes is sent from the COM
port to an external device.
Data sent to COM port is stored in the receive buffer (data register DT) specified by the
system register. Once the reception is done, the “reception done flag” turns on, and disables
Receive further reception. When the [F159 MTRN] instruction is executed, the “reception done flag”
turns OFF, and enables reception. The F159 (MTRN) instruction is used to turn OFF the
reception done flag for general-purpose communication (i.e. to enable reception).
Operation mode Operation mode of COM port can be switched between “general-purpose communication
switching mode” and “computer link mode”.

21-20 WUME-FPXHPGRG-021
21.8 [F159 MTRN] Serial Data Send / Receive Instruction

■ System register settings


● Using the system register, it is required to set to “general-purpose communication mode” in
COM port.
● Using the system register, it is required to align the baud rate and transmission format with
an external device.
● To secure an area for storing receive data in the data register (DT), it is required to specify
“Receive buffer starting number in general-purpose communication” and “Receive buffer
capacity in general-purpose communication” using the system register.

■ Related flag / system register No.


Operation COM0 COM1 COM2 COM3

Communication error 0: Normal


R9130 R9138 R9140 R9148
flag 1: Error
0: Other than general-purpose
communication
Operation mode flag R9131 R9139 R9141 R9149
1: General-purpose
communication
0: Reception enabled
Reception done flag 1: Reception disabled (reception R9132 R913A R9142 R914A
done)
0: Transmission in progress
Transmission done
1: Transmission done R9133 R913B R9143 R914B
flag
(transmission enabled)
Receive buffer
Specify the DT range to be used No.420 No.416 No.418 No.422
starting number
as a receive buffer, using the
Receive buffer system register. No.421 No.417 No.419 No.423
capacity

■ Creation of send data table [S]


● Send data is stored as follows in a given memory area (e.g. data register DT). The number of
send data bytes [n] is automatically added to the starting word. Send data should be stored
in [S+1] and later.
● Do not include the terminator in the send data. The terminator is added automatically. When
no terminator is to be added during transmission, specify a negative value for [n].
Alternatively, select “None” from the terminator setting in the system register.
● When the header (start code) is set to “STX” in system register, do not add the header to
send data. The header is added automatically.

WUME-FPXHPGRG-021 21-21
21.8 [F159 MTRN] Serial Data Send / Receive Instruction

Example: When 8-byte data “ABCDEFGH” is sent with [S] as DT100

■ Precautions during programming


● F159 (MTRN) instruction should be executed after confirming that the transmission done flag
for the target COM port has turned ON.
● The maximum data that can be sent in a single session is 2,048 bytes.

■ Structure of receive data


Receive data is stored in the receive buffer (data register DT) specified in the system register.
The number of receive data bytes is stored in the starting word.

Example: When 8-byte data “ABCDEFGH” is received


Specify 200 for the “receive buffer starting number”, and 5 for the “receive buffer capacity”, in
the system register.

21-22 WUME-FPXHPGRG-021
21.8 [F159 MTRN] Serial Data Send / Receive Instruction

■ Operations when data is received


When the reception done flag is OFF, operation takes place as follows when data is sent from
an external device.
Item Description
Received data is stored in the receive buffer area (two words) in low byte order.
Storage of receive The terminator of the received data is stored in the receive buffer after removing
(1)
data one byte. If the terminator is two bytes, only one byte is stored in the receive
buffer. The header is not stored.
Reception done flag When the terminator (end code) is received, the reception done flag turns ON.
(2)
ON Reception of any further data is prohibited.
When an F159 (MTRN) instruction is executed, the reception done flag turns
Execute F159 (MTRN)
(3) OFF. The number of received bytes in the receive buffer starting number is
instruction
cleared. Data in the receive buffer is not cleared.
Storage of the Reception is enabled when the reception done flag turns OFF, and the storage of
(4)
following receive data receive data is restarted.

Example 1 Send data ABCDEFGH+CR

Example 2 Send data: ABCDEFGH+CR+LF

● When data with CR+LF as terminator is received, send data with a size that is smaller by more
than one byte than the receive buffer capacity.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification
R9008
Turns ON when the data table exceeds the area in the specification of bytes in [n].
(ER)

WUME-FPXHPGRG-021 21-23
(MEMO)

21-24 WUME-FPXHPGRG-021
22 Sampling Trace Instructions
22.1 Sampling Trace.................................................................................22-2
22.2 F155 SMPL (Sample Set Data) ........................................................22-3
22.3 F156 STRG (Sampling Stop Trigger)................................................22-4

WUME-FPXHPGRG-021 22-1
22.1 Sampling Trace

22.1 Sampling Trace


This is a function used to sample the ON/OFF status of registered contacts and the data stored
in the registers, either periodically or when the appropriate conditions have been established,
and store the results in memory. This function can be used to confirm changes in the data.
● 16 contacts and up to three words for registers can be registered.

1. Specify registration of the data to be sampled and the sampling method (such as the
number of times or the time interval).

2. Instruct the sampling trace to begin.


3. Execute sampling.
Sampling can be executed as periodic sampling or according to the F155 (SMPL)
instruction.

4. Stop the sampling trace.


Apply a stop command trigger by using a programming tool software online operation or by
executing the F156 (STRG) instruction. When the trigger is applied, the sampling trace is
stopped after sampling of the specified delay count is performed. The programming tool
software can also be used to initiate a forced stop.)

5. The programming tool software can be used to read the sampling results from the control
unit, and to monitor and confirm them.

22-2 WUME-FPXHPGRG-021
22.2 F155 SMPL (Sample Set Data)

22.2 F155 SMPL (Sample Set Data)


Performs sampling when a sampling trace is executed.

■ Instruction format

■ Outline of operation
● During a sampling trace, sampling is performed on the specified data (contacts and
registers), and the executed data content is stored in the sampling trace memory.
● If the sampling trace settings and startup have not been specified by using the programming
tool software, processing is not performed even if the internal relay condition is established.

■ Operation example
Operation of instruction format description program
When the internal relay R10 is ON, sampling is performed on previously registered contacts or
registers.

R10

Sampling

Sample
OFF ON ON OFF

Registration of the data to be sampled, specification of the sampling method (such as the cable
and the time interval), and specification of the command to start a sampling trace can only be
performed by using the programming tool software.

WUME-FPXHPGRG-021 22-3
22.3 F156 STRG (Sampling Stop Trigger)

22.3 F156 STRG (Sampling Stop Trigger)


Applies a stop command trigger during sampling trace execution.

■ Instruction format

■ Outline of operation
● This instruction applies a sampling trace stop command trigger. When the trigger is applied,
the sampling trace is stopped after sampling of the specified delay count is performed.
● If the sampling trace settings and startup have not been specified by using the programming
tool software, processing is not performed even if the internal relay condition is established.

■ Operation example
Operation of instruction format description program
When internal relay R10 turns ON, a sampling trace stop command trigger is applied.

R10

Sampling

Delay count

Trigger for specifying stop Sampling trace stops

Registration of the data to be sampled, specification of the sampling method (such as the cable
and the time interval), and specification of the command to start a sampling trace can only be
performed by using the programming tool software.

22-4 WUME-FPXHPGRG-021
23 High-speed Counter
Instruction
23.1 [F0 MV] High-speed Counter Control Instruction ..............................23-2
23.2 [F1 DMV] Elapsed Value Write / Read Instruction ............................23-4
23.3 [F166 HC1S] High-speed Counter Target Value Match ON
Instruction and [F167 HC1R] High-speed Counter Target Value Match
OFF Instruction .....................................................................................23-5
23.4 Sample Program (Positioning Operation With Inverter: Single-
Speed) ..................................................................................................23-7
23.5 Sample Program (Positioning Operation With Inverter: Double-
Speed) ..................................................................................................23-9

WUME-FPXHPGRG-021 23-1
23.1 [F0 MV] High-speed Counter Control Instruction

23.1 [F0 MV] High-speed Counter Control Instruction


Performs the controls such as the software reset, disabling the count and clearing the high-
speed counter instruction.

■ Instruction format

R0
( DF ) F0 MV H1 DT90052

F0 MV H0 DT90052
S
■ Operand
Operand Settings
S Area storing the control code of the high-speed counter or constant data

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Performs the high-speed counter control according to the control code specified by [S].
● This instruction is used when performing the following operations with the high-speed
counter.
1. When performing the software reset
2. When disabling the count
3. When disabling the reset input by an external input temporarily
4. When canceling the control executed by the high-speed counter instruction F165
(CAM0) / F166 (HC1S) / F167 (HC1R) or when clearing the target value match interrupt
● The control codes once written are held until the next writing.
● The control code written by the F0 (MV) instruction is written to the special data register
DT90052. At the same time, it is written to the control code monitor area. The written data is
the data for lower 8 bits only.

■ Precautions during programming


● The setting of disabling the rest input is valid only when allocating the reset input in the
system register.
● In the external reset input setting for the transistor output type, the reset input (X6 or X7)
allocated to the Control Unit input is switched between enable and disable. In the reset input
setting for the relay output type, the pulse I/O cassette reset input (X102 or X202) allocated
in the high-speed counter setting of the system register is switched between enable and
disable.

23-2 WUME-FPXHPGRG-021
23.1 [F0 MV] High-speed Counter Control Instruction

■ Allocation of control codes


● The following bits are allocated according to the specified channel and functions

● When controlling the above functions using external inputs, arbitrary inputs can be allocated.

■ Example of program
The following example shows the program for performing the software reset of the high-speed
counter CH0 using the input X7.

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

WUME-FPXHPGRG-021 23-3
23.2 [F1 DMV] Elapsed Value Write / Read Instruction

23.2 [F1 DMV] Elapsed Value Write / Read Instruction


Writes and reads the elapsed value of the high-speed counter / pulse output.

■ Instruction format

R0
( DF ) F1 DMV K3000 DT90400
S
R1
( DF ) F1 DMV DT90400 DT100
D
■ Operand
Operand Settings
When setting: Area storing the elapsed value (32-bit) set in the high-speed counter / pulse output
S or constant data
K−2,147,483,648 to K2,147,483,647
D When reading: Area reading the elapsed value of the high-speed counter / pulse output

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S ● ● ● ● ● ● ● ● ● ● ● ●
D - ● ● ● ● ● ● ● ● - - ●

■ Outline of operation (Reading elapsed value)


● Reads the content of the special data register storing the elapsed value of the high-speed
counter / pulse output and writes to the area specified by [D].

■ Outline of operation (Setting elapsed value)


● At the same time as writing the value to the elapsed value area of the high-speed counter /
pulse output which uses 32-bit data specified by [S], sets it in the elapsed value area of the
high-speed counter used within the system.

■ Precautions during programming


● Only F1 (DMV) instruction can perform the writing. The writing cannot be performed by other
high-level instructions such as transfer instruction F0 (MV) and arithmetic instructions.
● Specify the memory area of [S] or [D] with the memory area number for the lower 16 bits.

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

23-4 WUME-FPXHPGRG-021
23.3 [F166 HC1S] High-speed Counter Target Value Match ON Instruction and
[F167 HC1R] High-speed Counter Target Value Match OFF Instruction

23.3 [F166 HC1S] High-speed Counter Target Value Match ON


Instruction and [F167 HC1R] High-speed Counter Target Value Match
OFF Instruction
Turns ON or OFF the specified output when the elapsed value of the high-speed counter
matches the target value set by the operand.

■ Instruction format

■ Operand
Operand Settings
n Target channel number of the high-speed counter for the match output
S Target value data of the high-speed counter or the starting number of the area storing data
D Output coil which turns ON or OFF when the values match (Y0 to Y29F)

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

n - - - - - - - - - ● ● -
S ● ● ● ● ● ● ● ● ● ● ● ●
D - - - - - - - - - - - -

■ Outline of operation
● Sets the value specified by [S] as the target value of the high-speed counter, and controls the
specified output [Yn] when the elapsed value matches the target value. This operation is
executed as an interrupt processing.
● In the case of [F166 HC1S] instruction, the output turns ON from OFF. In the case of [F167
HC1R] instruction, the output turns OFF from ON.
● Stores the value of [S] in the target value area when the instruction is executed.
● Clears the setting of the target value and the control of the target value match output when
the value matches the target value.
● For resetting the output turned ON/OFF when the values match, use the RST instruction or
F0 (MV) instruction, or use the F166 (HC1R) instruction and F167 (HC1R) instruction in a
pair.

■ Example of program
The following example shows the program for setting the output Y0 when the elapsed value of
the high-speed counter CH0 matches K10000.

WUME-FPXHPGRG-021 23-5
23.3 [F166 HC1S] High-speed Counter Target Value Match ON Instruction and
[F167 HC1R] High-speed Counter Target Value Match OFF Instruction

■ Precautions during programming


● The high-speed counter control active flag turns ON until the value matches the target value
after the execution condition of the instruction has turned ON. During this processing, the
high-speed counter instruction F165 (CAM0) / F166 (HC1S) / F167 (HC1R) cannot be
executed for the high-speed counter of the same channel.
● When the hardware reset is performed before the elapsed value matches the target value,
the elapsed value will be reset. However, the settings of the target value and the target value
match output will not be cleared.
● For the output Y specified for the target value match output, it is not checked whether the
output is overlapped with the OT, KP and other high-level instructions.
● When describing the same channel in both the normal program and the interrupt program, be
sure to program not to execute them simultaneously.

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

23-6 WUME-FPXHPGRG-021
23.4 Sample Program (Positioning Operation With Inverter: Single-Speed)

23.4 Sample Program (Positioning Operation With Inverter: Single-


Speed)
Counts the feedback signals from the encoder with the high-speed counter. The operation of
the inverter stops when the count value reaches 5000.

■ Wiring example

■ Operation chart

■ I/O allocation table


I/O No. Description I/O No. Description
X0 Encoder input R100 Positioning operation is running
X5 Operation start signal R101 Positioning operation starts
Y0 Inverter operation signal R102 Positioning done pulse
- R9110 High-speed counter CH0 control active flag

WUME-FPXHPGRG-021 23-7
23.4 Sample Program (Positioning Operation With Inverter: Single-Speed)

■ Sample program

(1) Positioning operation is running


(2) Positioning operation starts
(3) Resets the elapsed value of the high-speed counter CH0.
Target value match OFF instruction: Y0 turns OFF when the elapsed value of the high-speed counter
(4)
reaches 5000 pulses.
(5) Sets the inverter operation signal Y0.
(6) Positioning done pulse (0.5 sec)
(7) Sets 0.5 sec with 0.1-second timer.

23-8 WUME-FPXHPGRG-021
23.5 Sample Program (Positioning Operation With Inverter: Double-Speed)

23.5 Sample Program (Positioning Operation With Inverter: Double-


Speed)
Counts the feedback signals from the encoder with the high-speed counter. Switches the
inverter operation to low speed operation when the count value reaches 4500. The operation of
the inverter stops when the count value reaches 5000.

■ Wiring example

■ Operation chart

■ I/O allocation table


I/O No. Description I/O No. Description
X0 Encoder input R100 Positioning operation is running
X5 Operation start signal R101 Arrival at deceleration point
Y0 Inverter operation signal R102 Positioning operation starts
Y1 Inverter high-speed signal R103 Positioning done pulse

WUME-FPXHPGRG-021 23-9
23.5 Sample Program (Positioning Operation With Inverter: Double-Speed)

I/O No. Description I/O No. Description


R900C Comparison instruction < Flag
-
R9110 High-speed counter CH0 control active flag

■ Sample program

(1) Positioning operation is running


(2) Positioning operation starts
(3) Resets the elapsed value of the high-speed counter CH0.
Target value match OFF instruction: Y0 turns OFF when the elapsed value of the high-speed counter
(4)
reaches 5000 pulses.
(5) Sets Y0 (inverter operation signal).
(6) Sets Y1 (inverter high-speed signal).
32-bit data comparison instruction: R900C turns ON when the elapsed value of the high-speed counter
(7)
CH0 is larger than 4500 pulses.
(8) Arrival at deceleration point
(9) Resets Y1 (inverter high-speed signal).
(10) Positioning done pulse (0.5 sec)
(11) 0.1-second timer: Sets K5. It is used as 0.5-second timer.

23-10 WUME-FPXHPGRG-021
24 High-speed Counter Cam
Control Instruction
24.1 [F165 CAM0] High-speed Counter Cam Control Instruction.............24-2
24.2 Sample Program (Upper Limit Control, Reset, Addition) ..................24-7
24.3 Sample Program (Upper Limit Control, Instruction Clear, Addition) .24-9
24.4 Sample Program (Upper Limit Control, Subtraction) ........................24-11

WUME-FPXHPGRG-021 24-1
24.1 [F165 CAM0] High-speed Counter Cam Control Instruction

24.1 [F165 CAM0] High-speed Counter Cam Control Instruction


Performs the cam output up to a maximum of 32 points (ON / OFF) according to the elapsed
value of the high-speed counter.

■ Instruction format

R0
( DF ) F165 CAM0 DT100
S

■ Operand
Operand Settings
S Starting number of data table

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S - - - - - - ● - - - - ●

■ Outline of operation
● Performs the cam output up to a maximum of 32 points (ON/OFF) according to the elapsed
value of the high-speed counter in the pattern specified for the data table starting with [S].
The output device can be selected from internal relay, output relay and link relay.
● The ON set value and OFF set value can be arbitrarily specified as a paired target values for
a single cam output regardless of the magnitude of target values or the order for one cam
output. The pattern of ON/OFF varies according to the setting.

Target value 1
12000 0 ON set value
1000
Target value 2
OFF set value
9000 1000 to 4999
Elapsed R100:ON
value
7000 to 8999
R101:ON

Target value 2 Target value 1


ON set value OFF set value
7000 5000

24-2 WUME-FPXHPGRG-021
24.1 [F165 CAM0] High-speed Counter Cam Control Instruction

■ Upper limit control


With the F165 (CAM0) instruction, the control with a specified upper limit can be performed.
The settings for enabling / disabling the upper limit control and the upper limit are specified in
the data table.
Upper limit control: Enable Upper limit control: Disable
Negative min. value to Positive max.
Counting range 0 to Upper limit
value
When the elapsed value exceeds the
When When the elapsed value exceeds the
Operation positive maximum value, it returns to the
added upper limit, it returns to 0.
when negative minimum value.
exceeding the
counting range When When the elapsed value falls below the
When the elapsed value falls below 0, it
subtracte negative minimum value, it returns to the
returns to the upper limit.
d positive maximum value.

■ Data table settings


Operand Settings Description
Specify the high-speed counter channel where the cam control is
performed and whether or not to execute the upper and lower limit
control as a hexadecimal constant.

High-speed counter
channel
S, S+1
Upper and lower limit
control

Output device type Specify the device type set for the cam output.
S+2, S+3
(Note 1) H0: Link relay (L), H1: Internal relay (R), H2: Output relay (Y)

Starting word no. of Specify the starting word number of the device set for the cam
S+4, S+5
output device output.(Note 2)

S+6, S+7 No. of target values Settable range: K1 to K32(Note 2)


Target value 1: ON set
S+8, S+9
value
Target value 1: ON set
S+10, S+11
value
Set the ON set value and OFF set value according to the number of
Target value 2: ON set target values.
S+12, S+13
value
(Note 3)
Target value 2: ON set Settable range:
S+14, S+15
value
K-2147483647 to K2147483646 (H80000001 to H7FFFFFFE)
------ ------ The cam output described in the next page is acquired according to
S+(m-1)x4+8 the magnitude of the ON set values and elapsed value.
Target value m: ON set
S+(m-1)x4+9 value

S+(m-1)x4+10 Target value m: OFF


S+(m-1)x4+11 set value

S+(m-1)x4+12 Upper limit(Note 4) Settable range:

WUME-FPXHPGRG-021 24-3
24.1 [F165 CAM0] High-speed Counter Cam Control Instruction

Operand Settings Description


S+(m-1)x4+13 K1~K2147483646(H1~H7FFFFFFE)

(Note 1) When specifying the output relay (Y), values are also output to the Control Unit output as well as
operation memories.
(Note 2) When the number of target values [S+6, S+7] is set to 1-16, the cam output is allocated to one word of
output device. When set to 17-32, it is allocated to two words of output device. Refer to the next page
for details.
(Note 3) The number of target values specified after [S+8, S+9] varies according to the number of target values
specified in [S+6, S+7].
(Note 4) The upper limit of the data table end is valid only when the upper limit control is set to "Yes" in [S, S
+1]. This setting can be omitted when the upper limit control is set to "No".
(Note 5) The data table varies in the range of 12 to 138 words according to the number of target values and the
specified upper limit setting

■ Specification of output device: [S+2] to [S+5]


● When the number of target values is set to 1-16, one word is used. When the number of
target values is set to 17-32, two words are used.
● One device is allocated to a paired target values (ON set value and OFF set value).
(Example): When the output device type is set to "Internal relay", the starting word number
of output device is set to "0", and the number of target values is set to "32", R0 to R1F are
allocated as the device for the cam output.

(1) When the elapsed value reaches the target value 1, R0 turns ON or OFF.
(2) When the elapsed value reaches the target value 16, RF turns ON or OFF.
(3) When the elapsed value reaches the target value 18, R11 turns ON or OFF.

■ Specification of target values: From [S+8]


The acquired output varies according to the ON set value and OFF set value.
ON set value < OFF set value ON set value > OFF set value ON set value = OFF set value
When added

24-4 WUME-FPXHPGRG-021
24.1 [F165 CAM0] High-speed Counter Cam Control Instruction

ON set value < OFF set value ON set value > OFF set value ON set value = OFF set value
減算時

When the elapsed value is larger When the elapsed value is


than or equal to the ON set value smaller than the ON set value
Description

and smaller than the OFF set and larger than or equal to the
The corresponding bit always turns
value, the corresponding output OFF set value, the corresponding
off.
bit turns ON. When the elapsed output bit turns off. When the
value is out of the range, the elapsed value is out of the range,
corresponding bit turns off. the corresponding bit turns ON.

■ Notes on programming
● This instruction cannot be used when the high-speed counter function is not used. Allocate
arbitrary channels and contacts in the system register "high-speed counter setting"
● The high-speed counter control active flag corresponding to the specified channel turns ON
until the execution of the high-speed counter control instruction F0 (MV) is cleared after the
execution condition of the F165 (CAM0) instruction has turned ON. When the high-speed
counter control active flag is on, the high-speed counter control instruction F165 (CAM0) /
F166 (HC1S) / F167 (HC1R) for which the same channel is specified cannot be executed.
● This instruction can be activated for up to two channels simultaneously.
● To stop the control of this instruction, execute "Clear high-speed counter instruction" by the
high-speed counter control instruction F0 (MV). Even when executing "Clear high-speed
counter instruction", the output allocated to the cam output is held. Also, the counting of the
high-speed counter continues and the upper limit control becomes disabled.
● Reset or preset the high-speed counter elapsed value before executing the instruction.
● Do not rewrite the elapsed value for the control using the F1 (DMV) instruction after the
execution of the instruction. After the execution of the instruction, the setting of the active
target values do not change even if the operation memory of the specified target values (ON
set value/OFF set value) is changed.
● When controlling the output device using the main program, set each target value so that
"minimum moving time between each target value" is larger than "1 scan time".
● When controlling the output device using an interrupt program, set each target value so that
"minimum moving time between each target value" is larger than "maximum execution time
of interrupt program".
● When the maximum value control and the hardware / software reset is used at the same
time, do not operate them intensively in a short time.
● When hardware / software reset is used, set the minimum target value to an integer value
that is 1 or more.
● When the hardware reset or software reset is executed during the high-speed counter
control, the high-speed counter elapsed value is reset to 0. The output allocated to the cam
output will be the output according to the elapsed value 0.
● It is also possible to start the interrupt program INTn every time the elapsed value reaches
each target value. For this operation, the activation of the interrupt program should be
permitted by the interrupt control instruction ICTL.

WUME-FPXHPGRG-021 24-5
24.1 [F165 CAM0] High-speed Counter Cam Control Instruction

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

24-6 WUME-FPXHPGRG-021
24.2 Sample Program (Upper Limit Control, Reset, Addition)

24.2 Sample Program (Upper Limit Control, Reset, Addition)


The following shows the program for performing two cam outputs (R100, R101) according to
the elapsed value of the high-speed counter CH0. When the elapsed value reaches the target
value (ON set value), the cam output turns ON, and when it reaches the target value (OFF set
value), it turns OFF. When it reaches the target value (ON set value), the interrupt program is
started. When the elapsed value exceeds the upper limit, it returns to 0.

Code Value Description


(a) Upper limit When the elapsed value exceeds the upper limit, it returns to 0.
Target value 2: OFF
(b) The cam output is performed according to the target values.
set value
In this example, the ON set value is smaller than the OFF set value for each
Target value 2: ON set target value.
(c)
value
Therefore, When added: When the elapsed value reaches the ON set value,
Target value 1: OFF the cam output turns ON, and when it reaches the OFF set value, it turns
(d) OFF.
set value
When subtracted: When the elapsed value falls below the OFF set value, the
Target value 1: ON set cam output turns ON, and when it falls below the ON set value, it turns OFF.
(e)
value
When the execution condition turns ON from OFF, the instruction is executed
(1) Execution condition
and the cam control starts.
High-speed counter The high-speed counter instruction active flag turns ON during the execution
(2) instruction of the instruction. Even when the reset signal exists, the execution of the
active flag nstruction continues.

(3) Cam output The output turns ON/OFF according the set values.
When the elapsed value reaches the ON set value, the interrupt program
(4) Interrupt
starts.
When the hardware reset (X2) or software reset DT90052 (bit 0) turns ON,
the elapsed value of the high-speed counter is rest to 0. The outputs
(5) Reset signal
corresponding to the elapsed value 0 (both R100 and R101 in the above
example) become OFF.

(Note 1) It shows the hardware reset input (X2) for the high-speed counter CH0.

WUME-FPXHPGRG-021 24-7
24.2 Sample Program (Upper Limit Control, Reset, Addition)

■ Sample program

Code Description
(1) High-speed counter channel H10: Performs the upper limit control, CH0
(2) Cam output device type K1: Internal relay (R)
(3) Word number of cam output device K10
(4) Specification of the number of target values K2
(5) Target value 1: ON set value K1000
(6) Target value 1: OFF set value K5000
(7) Target value 2: ON set value K7000
(8) Target value 2: ON set value K9000
(9) Upper limit + K11000
(10) Presets 0 as the elapsed value.
(11) Executes the F165 (CAM0) instruction and starts the cam control.

24-8 WUME-FPXHPGRG-021
24.3 Sample Program (Upper Limit Control, Instruction Clear, Addition)

24.3 Sample Program (Upper Limit Control, Instruction Clear, Addition)


The following shows the program for performing two cam outputs (R100, R101) according to
the elapsed value of the high-speed counter CH0. In the case of addition, when the elapsed
value reaches the target value (ON set value), the cam output turns ON, and when it reaches
the target value (OFF set value), it turns OFF. When it reaches the target value (ON set value),
the interrupt program is started. When the elapsed value exceeds the upper limit, it returns to 0.
The instruction is cleared by the high-speed counter control instruction F0 (MV).

Code Value Description


Positive maximum When the instruction clear is executed, the upper limit control is canceled and
(a)
value the counting continues up to the positive maximum value.
(b) Upper limit When the elapsed value exceeds the upper limit, it returns to 0.
Target value 2: OFF
(c) The cam output is performed according to the target values.
set value
In this example, the ON set value is smaller than the OFF set value for each
Target value 2: ON set target value.
(d)
value
Therefore, When added: When the elapsed value reaches the ON set value,
Target value 1: OFF the cam output turns ON, and when it reaches the OFF set value, it turns
(e) OFF.
set value
When subtracted: When the elapsed value falls below the OFF set value, the
Target value 1: ON set cam output turns ON, and when it falls below the ON set value, it turns OFF.
(f)
value
When the execution condition turns ON from OFF, the instruction is executed
(1) Execution condition
and the cam control starts.
High-speed counter The high-speed counter instruction active flag turns ON during the execution
(2) instruction of the instruction. When the high-speed counter control instruction F0 (MV) is
active flag executed, it turns OFF.

(3) Cam output The output turns ON/OFF according the set values.
In the case of addition, when the elapsed value reaches the ON set value,
(4) Interrupt
the interrupt program is started.

WUME-FPXHPGRG-021 24-9
24.3 Sample Program (Upper Limit Control, Instruction Clear, Addition)

Code Value Description

Clear high-speed By the high-speed counter control instruction F0 (MV), when the bit 3 of the
(5) counter instruction special data register DT90052 turns ON from OFF, the executed F165
(CAM0) instruction is cleared.

■ Sample program

Code Description
(1) High-speed counter channel H10: Performs the upper limit control, CH0
(2) Cam output device type K1: Internal relay (R)
(3) Word number of cam output device K10
(4) Specification of the number of target values K2
(5) Target value 1: ON set value K1000
(6) Target value 1: OFF set value K5000
(7) Target value 2: ON set value K7000
(8) Target value 2: ON set value K9000
(9) Upper limit + K11000
(10) Presets 0 as the elapsed value.
(11) Executes the F165 (CAM0) instruction and starts the cam control.
(12) Clears the executed F165 (CAM0) instruction by turning the DT90052 (bit 3) OFF → ON → OFF.

24-10 WUME-FPXHPGRG-021
24.4 Sample Program (Upper Limit Control, Subtraction)

24.4 Sample Program (Upper Limit Control, Subtraction)


The following shows the program for performing three cam outputs (R100-R102) according to
the elapsed value of the high-speed counter CH0. In the case of subtraction, when the elapsed
value falls below the target value (OFF set value), the cam output turns ON, and when it falls
below the target value (ON set value) the cam output turns OFF. When it falls below the target
value (OFF set value), the interrupt program is started. When the elapsed value falls below 0, it
returns to the upper limit.

Code Value Description


When the high-speed counter elapsed value falls below 0, it returns to the
(a) Upper limit
upper limit.
The control is started from the elapsed value when executed. In this example,
(b) Elapsed value
the elapsed value 13000 is preset.
Target value 3: OFF
(c)
set value
Target value 2: OFF
(d)
set value The cam output is performed according to the target values.
Target value 1: OFF In this example, the ON set value is smaller than the OFF set value for each
(e) target value.
set value
When subtracted: When the elapsed value falls below the OFF set value, the
Target value 3: ON set cam output turns ON, and when it falls below the ON set value, it turns OFF.
(f)
value
When added: When the elapsed value reaches the ON set value, the cam
Target value 2: ON set output turns ON, and when it reaches the OFF set value, it turns OFF.
(g)
value
Target value 1: ON set
(h)
value
When the execution condition turns ON from OFF, the instruction is executed
(1) Execution condition
and the cam control starts.
High-speed counter
instruction The high-speed counter instruction active flag turns ON during the execution
(2)
of the instruction.
active flag

WUME-FPXHPGRG-021 24-11
24.4 Sample Program (Upper Limit Control, Subtraction)

Code Value Description


(3) Cam output The output turns ON/OFF according the set values.
Interrupt program In the case of subtraction, when the elapsed value falls below the OFF set
(4)
activation value, the interrupt program is started.

■ Sample program

Code Description
(1) High-speed counter channel H10: Performs the upper limit control, CH0
(2) Cam output device type K1: Internal relay (R)
(3) Word number of cam output device K10
(4) Specification of the number of target values K3
(5) Target value 1: ON set value K1000
(6) Target value 1: OFF set value K7000
(7) Target value 2: ON set value K3000
(8) Target value 2: OFF set value K9000
(9) Target value 3: ON set value K5000
(10) Target value 3: OFF set value K11000
(11) Upper limit value K15000
(12) Presets 13000 as the elapsed value.
(13) Executes the F165 (CAM0) instruction and starts the cam control.

24-12 WUME-FPXHPGRG-021
25 PWM Output Instructions
25.1 [F173 PWMH] PWM Output Instruction (Frequency Specification) ..25-2
25.2 [F173 PWMH] PWM Output Instruction (Control Code
Specification) ........................................................................................25-4

WUME-FPXHPGRG-021 25-1
25.1 [F173 PWMH] PWM Output Instruction (Frequency Specification)

25.1 [F173 PWMH] PWM Output Instruction (Frequency Specification)


The PWM output is performed according to the set parameters.

■ Instruction format

■ Operand
Operand Settings
Starting address of the memory area storing the parameters of the PWM output.
S Specify the control code HFF.
S+1 Specify the output frequency in 2-word 32-bit data.
S S+2 Setting range: K1 to K100000 (1 Hz to 100 kHz: in 1 Hz increments)

Duty ratio (Resolution of 1000 or 100)


For the output frequencies K1 to K70000, Setting range: K0 to K1000 (0.0% to 100.0%)
S+3
For the output frequencies K70001 to K100000, Setting range: K0 to K1000 (0% to
100%)
Channel nos. used for PWM output:
n
K0 (CH0: Y0), K1 (CH1: Y2), K2 (CH3: Y4), K3 (CH4: Y6)

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S - - - - - - ● - - - - ●
n - - - - - - - - - ● ● -

■ Outline of operation
● The PWM output is performed from a specified output. The output is performed when the
execution condition is ON.
● The output frequency and duty ratio are specified in the operands [S1+1] to [S1+3].

■ Precautions during programming


● This instruction cannot be executed when a control active flag corresponding to each
channel is ON.
● The duty may be different from the set ratio according to the load voltage and load current
especially in the vicinity of minimum and maximum values. The duty can be changed for
each scan. However, the control code cannot be changed during the execution of an
instruction.

25-2 WUME-FPXHPGRG-021
25.1 [F173 PWMH] PWM Output Instruction (Frequency Specification)

● When rewriting during RUN is performed during the operation, the PWM output stops while a
program is being rewritten.

■ Example of program
The following sample shows the program for performing the PWM output with 10 kHz and the
duty ratio of 50% from CH0 (Y0).

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

WUME-FPXHPGRG-021 25-3
25.2 [F173 PWMH] PWM Output Instruction (Control Code Specification)

25.2 [F173 PWMH] PWM Output Instruction (Control Code


Specification)
The PWM output is performed according to the set parameters.

■ Instruction format

■ Operand
Operand Settings
Starting address of the memory area storing the parameters of the PWM output.
S Specify the control code. K0 to K30
S Duty ratio (Resolution of 1000 or 100)
S+1 For the control codes K0 to K27, Setting range: K0 to K1000 (0.0% to 100.0%)
For the control codes K28 to K30, Setting range: K0 to K1000 (0% to 100%)
Channel nos. used for PWM output:
n
K0 (CH0: Y0), K1 (CH1: Y2), K2 (CH3: Y4), K3 (CH4: Y6)

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S - - - - - - ● - - - - ●
n - - - - - - - - - ● ● -

■ Outline of operation
● The PWM output is performed from a specified output. The output is performed when the
execution condition is ON.
● The output frequency and cycle are determined by a specified control code. The duty ratio is
specified in the operand [S1+1].

■ Precautions during programming


● This instruction cannot be executed when a control active flag corresponding to each
channel is ON.
● The duty may be different from the set ratio according to the load voltage and load current
especially in the vicinity of minimum and maximum values. The duty can be changed for
each scan. However, the control code cannot be changed during the execution of an
instruction.
● When rewriting during RUN is performed during the operation, the PWM output stops while a
program is being rewritten.

25-4 WUME-FPXHPGRG-021
25.2 [F173 PWMH] PWM Output Instruction (Control Code Specification)

■ Control code
Frequency Frequency Resolutio
S Cycle (ms) Resolution S Cycle (ms)
(Hz) (Hz) n
K0 1.5 666.67 K16 2000.0 0.50
K1 2.0 500.00 K17 3000.0 0.33
K2 4.0 250.00 K18 6000.0 0.17
K3 6.0 166.67 K19 12500.0 0.08
K4 8.0 125.00 K20 15000.0 0.067
K5 10.0 100.00 K21 20000.0 0.050
1000
K6 20.0 50.00 K22 25000.0 0.040
K7 50.0 20.00 K23 30000.0 0.033
1000
K8 100.0 10.00 K24 40000.0 0.025
K9 200.0 5.00 K25 50000.0 0.020
K10 400.0 2.50 K26 60000.0 0.017
K11 500.0 2.00 K27 70000.0 0.0143
K12 700.0 1.48 K28 80000.0 0.0125
K13 1000.0 1.00 K29 90000.0 0.0111 100
K14 1300.0 0.77 K30 100000.0 0.010
K15 1600.0 0.625 -

■ Example of program
The following sample shows the program for performing the PWM output with 1 kHz and the
duty ratio of 50% from CH0 (Y0).

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

WUME-FPXHPGRG-021 25-5
(MEMO)

25-6 WUME-FPXHPGRG-021
26 Character String Instructions
26.1 F95 ASC (Character Constant to ASCII Code Conversion) .............26-2
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String
Conversion)...........................................................................................26-5
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data
Conversion)...........................................................................................26-11
26.4 F252 ACHK (Multiple ASCII Data Strings ASCII Code Check).........26-18
26.5 F253 SSET (Character Constant → ASCII Code Conversion: with
Storage Area Size)................................................................................26-20
26.6 Overview of String Instructions F257 SCMP to F265 SREP.............26-24
26.7 F257 SCMP (Comparing Character Strings) ....................................26-25
26.8 F258 SADD (Character String Addition) ...........................................26-27
26.9 F259 LEN (Character String Length) ................................................26-29
26.10 F260 SSRC (Search for Character String)......................................26-31
26.11 F261 RIGHT (Right Retrieve from Character String) ......................26-33
26.12 F262 LEFT (Left Retrieve from Character String)...........................26-35
26.13 F263 MIDR (Read from Any Position in Character String) .............26-37
26.14 F264 MIDW (Write to Any Position in Character String) .................26-39
26.15 F265 SREP (Replace Character Strings) .......................................26-41

WUME-FPXHPGRG-021 26-1
26.1 F95 ASC (Character Constant to ASCII Code Conversion)

26.1 F95 ASC (Character Constant to ASCII Code Conversion)


Converts the specified character constants into ASCII codes.

■ Instruction format

■ Operands
Items Settings
S Character constants (12 characters)
D Number at the start of the area storing the ACSII codes

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●
D ● ● ● ● ● ● ● ●

■ Outline of operation
The character constants specified by [S] (12 characters) are converted into ASCII codes and
stored in the 6-word area starting from [D].

■ Operation example
Operation of instruction format description program
When internal relay R20 turns ON, the specified character constants (ABC1230 DEF) are
converted into ASCII codes and stored in DT2 to DT7.

If the number of character constants specified by [S] is less than 12, the blanks in the
destination storage area are filled with spaces (H20).

■ Precautions for programming


The character constant M can only be input by programming tool software.
Conversion example

26-2 WUME-FPXHPGRG-021
26.1 F95 ASC (Character Constant to ASCII Code Conversion)

When converting one letter (A), there are three possible input methods.
1. At the start of the specified character constants (1st character)
2. At the end of the specified character constants (12th character)
3. In the middle of the specified character constants (2nd to 11th character)

(1) At the start (1st character)

The letter is input as above. A is only input to the low byte of DT2. The blanks are all filled with
spaces (H20) in the destination storage area.

(2) At the end (12th character)

The letter is input as above. A is only input to the high byte of DT7. DT2 to DT6 and the low
byte of D27 are all filled with spaces (H20) in the destination storage area.

(3) In the middle (7th character)

The letter is input as above. A is only input to the low byte of DT5. The rest of the destination
storage area is filled with spaces (H20).

WUME-FPXHPGRG-021 26-3
26.1 F95 ASC (Character Constant to ASCII Code Conversion)

■ Reference: JIS8 code table


0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Column
b7 b6 b5 b4 b3 b2 b1 b0 Row
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 0 0 0 0 NUL TC7(DEL) (SP) 0 @ P ~ p Undefined ー タ ミ
0 0 0 1 1 TC1(SOH) DC1 ! 1 A Q a q 。 ア チ ム
0 0 1 0 2 TC2(STX) DC2 " 2 B R b r 「 イ ツ メ
0 0 1 1 3 TC3(ETX) DC3 # 3 C S c s 」 ウ テ モ
0 1 0 0 4 TC4(EOT) DC4 $ 4 D T d t 、 エ ト ヤ
0 1 0 1 5 TC5(ENQ) TC8(NAK) % 5 E U e u ・ オ ナ ユ
0 1 1 0 6 TC6(ACK) TC9(SYN) & 6 F V f v ヲ カ ニ ヨ

Undefined

Undefined

Undefined

Undefined
0 1 1 1 7 BEL TC10(ETB) ‘ 7 G W g w ァ キ ヌ ラ
1 0 0 0 8 EE0(BS) CAN ( 8 H X h x ィ ク ネ リ
1 0 0 1 9 EE1(HT) EM ) 9 I Y i y ゥ ケ ノ ル
1 0 1 0 A EE2(LF) SUB * : J Z j z ェ コ ハ レ
1 0 1 1 B EE3(VT) ESC + ; K [ k | ォ サ ヒ ロ
1 1 0 0 C EE4(FF) IS4(FS) , < L \ l | ャ シ フ ワ
1 1 0 1 D EE5(CR) IS3(GS) - = M ] m | ュ ス ヘ ン
1 1 1 0 E SO IS2(RS) . > N ^ n ― ョ セ ホ ゙
1 1 1 1 F SI IS1(US) / ? O _ o DEL ッ ソ マ ゚

(Note 1) Only the character constants in the range indicated by in the table above can be input by
programming tool software.

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area exceeds the 6-word area starting from [D]
(ER)

26-4 WUME-FPXHPGRG-021
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion)

26.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion)
Converts 16-bit/32-bit binary data to an ASCII code character string.

■ Instruction format

■ Operands
Items Settings
S1 Control character string
S2 Starting number of area storing binary data
n Conversion method
D Starting number of the area storing the ASCII code of conversion result

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW SD modifier Integer
WX WY WR WL SV EV DT LD I
s R T K H M f (Note 1) Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Outline of operation
Converts the binary data stored in the area specified by S2 to ASCII data using the conversion
method of n according to the 4 control characters specified by S1. The converted result is
stored in the area specified by D.

■ Specifying each item


Specifying control character strings and their meanings [S1]
"16-D" Converts 16-bit data to decimal ASCII data
"32−D" Converts 32-bit data to decimal ASCII data
"16+H" Converts 16-bit data to hexadecimal ASCII data (normal direction)
"32+H" Converts 32-bit data to hexadecimal ASCII data (normal direction)
"16-H" Converts 16-bit data to hexadecimal ASCII data (reverse direction)
"32−H" Converts 32-bit data to hexadecimal ASCII data (reverse direction)

WUME-FPXHPGRG-021 26-5
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion)

(Note 1) Details of normal and reverse directions are described later

Specifying the conversion method [n]


Example of converting 16-bit data (K1234 and K56) to decimal ASCII codes

S2+1 S2 ←Address of register


FF C8 04 D 2 ←Register content (hexadecimal number)
K-56 K1234 ←Value

Conversion data count


H0 to HFF (0 to 255)

N=H 214
Number of digits in ASCII data Storage starting position
Limited by conversion data (note) The lower byte of D is specified as "0"
H0 to HF (0 to 15)

D+4 D+3 D+2 D+1 D ←Address of register


** 36 35 2D 20 34 33 32 31 ** ←Register content (ASCII code)
"6 5 - _ 4 3 2 1" ←Character string

26-6 WUME-FPXHPGRG-021
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion)

● Number of digits in ASCII data


When the number of digits of the ASCII data is larger than the converted result, a "_" (space) is
stored before the data.
• When converting 16-bit data to hexadecimal ASCII data
Specified range: H1 to H4
When less than H4, the specified number of digits is stored from the lower bytes. If the digit
number of the original data is larger with a specification less than H4, this is an error
• When converting 32-bit data to hexadecimal ASCII data
Specified range: H1 to H8
When less than H8, the specified number of digits is stored from the lower bytes. If the digit
number of the original data is larger with a specification less than H8, this is an error
• When converting to decimal ASCII data
Specified range: H1 to HF
Source data is treated as signed binary data. When it is a negative number, the minus sign
"-" is added.
About normal direction and reverse direction (only when converting to hexadecimal ASCII data)

■ Conversion example
● Converting 16-bit data (K1234 and K56) to decimal ASCII data
DT10 = K 1234 → "1234__56"
DT11 = K 56

Number of converted data is "2", starting position for storage is "0", and size of the storage
area is "4"

● Converting 32-bit data (K1234 and K56789) to decimal ASCII data


DT10,11 = K 1234 → "__1234__56789"

WUME-FPXHPGRG-021 26-7
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion)

DT12,13 = K 56789

Number of converted data is "2", starting position for storage is "1", and size of the storage
area is "7"

● Converting 16-bit data (H0123 and H89AB) to hexadecimal ASCII data


DT10 = H 123 → "2301AB89"
DT11 = H 89AB

Number of converted data is "2", starting position for storage is "1", and size of the storage
area is "4" (normal direction)

26-8 WUME-FPXHPGRG-021
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion)

For the reverse direction (when "16+H" is "16-H")

● Converting 32-bit data (H00000123 and H0089ABCD) to hexadecimal ASCII data (normal
direction)
DT10,11 = H 123 → "230100CDAB89"
DT12,13 = H 89ABCD

Number of converted data is "2", starting position for storage is "0", and size of the storage
area is "6"

For the reverse direction (when "32+H" is "32-H")

■ Flag operations
Name Description
When there is an error in the control string specified by S1
When the conversion format specified by S1 is in decimal, and the direction of converted
R9007 data is changed to the normal direction
R9008 When the conversion format specified by S1 is in hexadecimal, and the size of the area for
(ER) storing ASCII codes specified by N exceeds the rated value
(Rated value for 16-bit data: 4)
(Rated value for 32-bit data: 8)

WUME-FPXHPGRG-021 26-9
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion)

Name Description
When the number of the conversion data specified by N is 0
When the converted result exceeds the size of the area for storing ASCII codes specified
by N
When the converted result exceeds the area
When the area is exceeded in index modification

26-10 WUME-FPXHPGRG-021
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion)

26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data


Conversion)
Converts ASCII code character strings to 16-bit/32-bit binary data.

■ Instruction format

■ Operands
Items Settings
S1 Control character string
S2 Starting number of the area storing the ASCII code
n Conversion method
D Starting number of the area for storing the binary data of the converted result

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW SD modifier Integer
WX WY WR WL SV EV DT LD I
s R T K H M f (Note 1) Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Outline of operation
Converts the ASCII data stored in the area specified by S2 to binary data using the conversion
method in n, according to the four control characters specified in S1. The converted result is
stored in the area specified by D.

■ Specifying each item


● Specifying control character strings and their meanings [S1]
Range of data that can be handled
"D-16" Convert decimal ASCII data to 16-bit data −32,768 to +32767
"D-32" Convert decimal ASCII data to 32-bit data -2,147,483,648 to +2,147,483,647
"H+16" Convert hexadecimal ASCII data to 16-bit data 0 to FFFF
(forward direction)

WUME-FPXHPGRG-021 26-11
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion)

Range of data that can be handled


"H+32" Convert hexadecimal ASCII data to 32-bit data 0 to FFFFFFFF
(forward direction)
"H-16" Convert hexadecimal ASCII data to 16-bit data 0 to FFFF
(reverse direction)
"H-32" Convert hexadecimal ASCII data to 32-bit data 0 to FFFFFFFF
(reverse direction)

(Note 1) Details of normal and reverse directions are described later


● Specifying the conversion method [n]
• Example of converting the ASCII data string "123456789012" to four sets of three decimal
digits
S2+6 S2+5 S2+5 S2+3 S2+2 S2+1 S2 ←Address of register

32 31 30 39 38 37 36 35 34 33 32 31 ←Register content (ASCII code)

"2 1 0 9 8 7 6 5 4 3 2 1" ←Character string

Numerical data count


Number of digits in numerical values Read starting position
H0 to HFF (0 to 255)
Specifies "0" for the lower byte of S2
H0 to HF (0 to 15)

N=H 413

• When converting via the above program


D+3 D+2 D+1 D ←Address of register
00 0C 03 15 01 C8 00 7B ←Register content (hexadecimal number)
K12 K789 K456 K123 ←Value in decimal
● About normal direction and reverse direction (only when converting to hexadecimal ASCII
data)
For hexadecimal ASCII data, conversions in the forward and reverse directions are possible.
Example of converting"0123456789ABCDEF"

26-12 WUME-FPXHPGRG-021
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion)

■ Conversion example
● Example of converting to four sets of three decimal digits (when there is no comma",")
Converts to 16-bit data
“123456789012” → DT100 = K 123
DT101 = K 456
DT102 = K 789
DT103 = K 12

• When the number of numeric data items is"4", starting position for reading is"1", number
of digits is"3"

• When converting to 32-bit data (when"D-16"is"D-32")

WUME-FPXHPGRG-021 26-13
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion)

● Example of converting to three sets of four hexadecimal digits


Converts to 16-bit data in the forward direction
“001209AB000E” → DT100 = K 1200
DT101 = K AB09
DT102 = K 0E00

• When the number of numeric data items is"3", starting position for reading is"1", number
of digits to be converted is"4"

- When converting to 16-bit data in the reverse direction (when"H+16"is"H-16")

- When converting to 32-bit data in the forward direction (when"H+16"is"H+32")

- When converting to 32-bit data in the reverse direction (when"H+16"is"H-32")

● Example of converting to four sets of decimal numbers (when there is a comma","separator)


“12,345,6789,0,” → DT100 = K 12
The character string ends in a DT101 = K 345
comma DT102 = K 6789
DT103 = K 0

• When the number of numeric data items is"4", starting position for reading is"1", number
of digits is"4"(Converts to 16-bit data)

26-14 WUME-FPXHPGRG-021
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion)

(Note 1) Specify the maximum number of digits.


● Example of converting to two sets of five decimal digits with decimal points (when there is no
comma",")
“1234.50006.7” → DT100 = K 12345
DT101 = K 67

• When the number of numeric data items is"2", starting position for reading is"0", number
of digits is"6", when converting to 16-bit data

(Note 1) A decimal point is also counted as a digit


● Example of converting to two sets of decimal digits with decimal points (when there is a
comma","separator)
“1234.5,6.7” → DT100 = K 12345
The character string ends in a DT101 = K 67
comma

WUME-FPXHPGRG-021 26-15
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion)

• When the number of numeric data items is"2", starting position for reading is"0", number
of digits is"6", when converting to 16-bit data

(Note 1) A decimal point is also counted as a digit

■ Particular examples
● If there is numeric data larger than the specified number of digits between commas
(example: four sets of decimal numbers, and number of digits is four)
“1234, 567890, 12, 345” → K 1234
K 5678
K90: The overflowed numbers become one numeric
data
K12
K345: Ignored

● If there is no value between commas (example: four sets of decimal numbers)


“123, 456,, 78” → Operation error

● If there is only a decimal point between commas (example: three sets of decimal numbers
with decimal points)
“1234. 5,.,6.7” → Operation error
*If there is any number, for example "2." or ".2", it is
converted

■ Flag operations
Name Description
When there is an error in the control string specified by S1

R9007 When the conversion format specified by S1 is in decimal, and the direction of converted
data is changed to the normal direction
R9008
(ER) When the conversion format specified by S1 is hexadecimal, and the size of the area for
storing ASCII codes specified by n exceeds the rated value
(Rated value for 16-bit data: 4)

26-16 WUME-FPXHPGRG-021
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion)

Name Description
(Rated value for 32-bit data: 8)
The ASCII code specified by S2 contains any code other than 0 to F, a sign, a space, a dot,
or a comma
The number of converted blocks specified by n is 0
The size of the area for storing ASCII codes specified by n is 0
The ASCII code to be converted exceeds the area
When the converted result exceeds the area
The converted result exceeds the converted data scale specified by n
When the area is exceeded in index modification

WUME-FPXHPGRG-021 26-17
26.4 F252 ACHK (Multiple ASCII Data Strings ASCII Code Check)

26.4 F252 ACHK (Multiple ASCII Data Strings ASCII Code Check)
Checks whether the specified ASCII data is correct.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the control character string, or character string data
S2 Starting number of the area storing the ASCII code
n Area storing the conversion method, or constant data

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW SD modifier Integer
WX WY WR WL SV EV DT LD I
s R T K H M f (Note 1) Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Outline of operation
● This instruction checks whether the ASCII code stored in the area specified by S2 can be
correctly converted using the conversion method specified by n in accordance with the 4-
character control characters specified by S1.
● It checks whether the character string to be converted by the F251 ATOB instruction can be
converted.
This instruction can be executed before the character string is converted by the F251 ATOB
instruction and if an error is found in the data, can control to not execute the F251 ATOB
instruction. Specify S1, S2, and n to be the same values as in the F251 ATOB instruction. As
a result of the check, the special relay R900B turns ON if the data is correct and OFF if there
is an error.

■ Specifying each item


The method to specify S1, S2, and n is the same as for the F251 ATOB instruction, so refer to
the description of F251 ATOB ASCII to Binary Conversion.

26-18 WUME-FPXHPGRG-021
26.4 F252 ACHK (Multiple ASCII Data Strings ASCII Code Check)

■ Flag operations
Name Description
When there is an error in the control string specified by S1
When the conversion format specified by S1 is in decimal, and the direction of converted
data is changed to the normal direction
When the conversion format specified by S1 is hexadecimal, and the size of the area for
storing ASCII codes specified by n exceeds the rated value
R9007
(Rated value for 16-bit data: 4)
R9008
(Rated value for 32-bit data: 8)
(ER)
The number of converted blocks specified by n is 0
The size of the area for storing ASCII codes specified by n is 0
The ASCII code to be converted exceeds the area
When the area is exceeded in index modification

WUME-FPXHPGRG-021 26-19
26.5 F253 SSET (Character Constant → ASCII Code Conversion: with
Storage Area Size)

26.5 F253 SSET (Character Constant → ASCII Code Conversion: with


Storage Area Size)

■ Instruction format

■ Operands
Items Settings
S1 Storage area size (permissible range: K1 to K32767, H8000)
S2 Character constant to be converted (permissible range: 0 to 256 characters)
D Starting device address of the destination

■ Devices that can be specified (indicated by ●)


Constant Index
SW modifier
Operands WX WY WR WL SV EV DT LD I SDT
R K H M (Note 1)

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ●
D ● ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Outline of operation
● When S1 (storage area size) is K1 to K32767:
The storage area size specified in S1 is stored in D.
The character constant specified by S2 is converted into ASCII code. The number of
characters (1 word) is stored in D+1, and ASCII converted character data is stored in D+2
and the subsequent area, in ascending order from lower bytes.
● When S1 (storage area size) is H8000:
The character constant specified by S2 is converted into ASCII code. The number of
characters (1 word) is stored in D, and ASCII converted character data is stored in D+1 and
the subsequent area, in ascending order from lower bytes.
● A character constant is bracketed in “” (double quotation marks).
● Character constants can be set from 0 to 256 characters.
● A string that consists of “” (double quotation marks) only is regarded as NULL characters.
● NULL(00) is not added to the end of characters during setting.

26-20 WUME-FPXHPGRG-021
26.5 F253 SSET (Character Constant → ASCII Code Conversion: with
Storage Area Size)

■ Processing
Example 1) When a string "ABC1230 DEF" (11 characters including a space) is to be
converted
S1...K12 S2... "ABC1230 DEF" D...DT0

(Note 1) Data outside the range in the destination (*) (bytes higher than DT7) does not change.

(1) Storage area size (2) Number of characters

Example 2) With the 16 characters from A to P as one set, when 16 sets (256
characters in total) are to be repeatedly converted
S1...K256 S2... "ABCDEF…KLMNOP" D...DT0

(1) Storage area size (2) Number of characters

Example 3) A string of zero character bracketed by “” (i.e. double quotation marks in


sequel) is converted
S1...K1 S2... “” D...DT0

(Note 1) Data outside the range in the destination (*) (DT2 to DT7) does not change.

WUME-FPXHPGRG-021 26-21
26.5 F253 SSET (Character Constant → ASCII Code Conversion: with
Storage Area Size)

(1) Storage area size (2) Number of characters

Example 4) When a string “ABC1230 DEF” (11 characters including a space) is to be


converted
S1...H8000 S2... “ABC1230 DEF” D...DT0

(Note 1) Data outside the range in the destination (*) (bytes higher than DT6) does not change.

(1) No. of characters

Example 5) With the 16 characters from A to P as one set, when 16 sets (256
characters in total) are to be repeatedly converted
S1...H8000 S2... “ABCDEF・・・・KLMNOP” D...DT0

(1) No. of characters

Example 6) A string of zero character bracketed by “” (i.e. double quotation marks in


sequel) is to be converted
S1...H8000 S2... “” D...DT0

(Note 1) Data outside the range in the destination (*) (DT1 to DT6) does not change.

(1) No. of characters

26-22 WUME-FPXHPGRG-021
26.5 F253 SSET (Character Constant → ASCII Code Conversion: with
Storage Area Size)

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when the accessible range is exceeded if the storage area size starting with D is
R9008 secured.
(ER) Turns ON when a value outside the permissible range is specified for S1.
Turns ON when the number of characters is larger than the storage area size.

WUME-FPXHPGRG-021 26-23
26.6 Overview of String Instructions F257 SCMP to F265 SREP

26.6 Overview of String Instructions F257 SCMP to F265 SREP

■ Data table structure


The character string data table sets the character string size, number of characters, and
character data.

S: String size Maximum number of characters that can be stored

S+1: Character count Number of characters stored in the string.

S+2: Character 2 (byte 1) Character 1 (byte 0)

S+3: Character 4 (byte 3) Character 3 (byte 2)

S+4: Character 6 (byte 5) Character 5 (byte 4) String data

・ ・ ・

・ ・ ・

H L

e.g. When a [character string size (20 characters), number of characters (12
characters), character data “ABCDEFGHIJKL”] data table is specified for DT0
The F253 SSET instruction is used to set the character string data table.

26-24 WUME-FPXHPGRG-021
26.7 F257 SCMP (Comparing Character Strings)

26.7 F257 SCMP (Comparing Character Strings)


Compares two specified character strings, and outputs the judgment result to a special internal
relay.

■ Instruction format

■ Operands
Items Settings
S1 Character string 1 for comparison
S2 Character string 2 for comparison

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The character string specified for [S1] is compared to the character string specified for [S2],
and the judgment result is output to special internal relays R9009 to R900C (judgment flags
for comparison instructions).
● R9009 to R900C are assigned based on whether [S1] or [S2] is larger or smaller, as shown
in the table below.
Flag
Relationship of
R900A R900B R900C R9009
S1 and S2
> = < Carry
S1 < S2 OFF OFF ON Indefinite
S1 = S2 OFF ON OFF OFF
S1 > S2 ON OFF OFF Indefinite

■ Operation example
Operation of instruction format description program
When internal relay R10 is ON, data registers DT1 and DT11 are compared. In this case, it is
determined that [S1] < [S2], and R900C turns ON.

WUME-FPXHPGRG-021 26-25
26.7 F257 SCMP (Comparing Character Strings)

DT0 10 (string size) DT10 8 (string size)

DT1 4 (character count) DT11 5 (character count)


"B" "A" "B" "A"
DT2 (Byte 1) (Byte 0) DT12 (Byte 1) (Byte 0)
"0" "C" "0" "C"
DT3 (Byte 3) (Byte 2) DT13 (Byte 3) (Byte 2)
"E"
DT4 (Byte 5) (Byte 4) DT14 (Byte 5) (Byte 4)
DT5 (Byte 7) (Byte 6) DT15 (Byte 7) (Byte 6)
DT6 H L
(Byte 9) (Byte 8)
H L

■ Precautions for programming


● If the number of characters is different, the greater/lesser relationship is as shown below.
S1 Greater/lesser S2
“ABCDE” = “ABCDE”
“ABCD” < “ABCDE”
“B” > “ABCDE”

● Comparison of character strings is performed in sequence from byte 0, one character at a


time.
● If one character string has fewer characters than the other, it may still be handled as larger if
a large character code is used when the comparison is made.
e.g. "B">"ABCDE"
● To specify a character string, indicate the number of the area in which the character string
size and number of characters have been specified. For detailed information about the table
configuration of the data area, refer to"P.26-24".

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when number of characters is greater than the character string size
(ER)

26-26 WUME-FPXHPGRG-021
26.8 F258 SADD (Character String Addition)

26.8 F258 SADD (Character String Addition)


Concatenates one character string with another.

■ Instruction format

■ Operands
Items Settings
S1 Character string to be concatenated
S2 Character string to be concatenated
D Area in which the concatenated character strings are stored

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The character string specified by [S1] is concatenated with the character string specified by
[S2], and the result is stored in the character string specified by [D].
● At the start of the area for storing results [D], specify the character string size via the user
program.

WUME-FPXHPGRG-021 26-27
26.8 F258 SADD (Character String Addition)

■ Operation example
Operation of instruction format description program

DT0 10 DT10 10
DT1 5 DT11 3
DT2 "B" "A" DT12 "2" "1"
DT3 "D" "C" + DT13 "3"
DT4 "E" DT14
DT5 DT15
DT6 DT16
H L H L

DT20 10 Specify via the user program


DT21 8
DT22 "B" "A"
= DT23 "D" "C"
Area storing the operation results
DT24 "1" "E"
DT25 "3" "2"
DT26
H L

■ Precautions for programming


If the result of the concatenation operation is larger than the character string size of [D], only as
many characters as will fit in [D] are stored.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when number of characters is greater than the character string size
(ER)
R9009 Turns ON when the operation result is greater than the size of the character string specified
(CY) by [D]

26-28 WUME-FPXHPGRG-021
26.9 F259 LEN (Character String Length)

26.9 F259 LEN (Character String Length)


Determines the number of characters stored in a character string.

■ Instruction format

■ Operands
Items Settings
S Character string
D Area that stores the number of characters in the calculation result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
The number of characters in the character string specified by [S] is determined, and the result is
stored in [D].

■ Operation example
Operation of instruction format description program

■ Precautions for programming


If the number of characters is greater than the character string size, an operation error occurs.

WUME-FPXHPGRG-021 26-29
26.9 F259 LEN (Character String Length)

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when number of characters is greater than the character string size
(ER)

26-30 WUME-FPXHPGRG-021
26.10 F260 SSRC (Search for Character String)

26.10 F260 SSRC (Search for Character String)


Searches for the specified character string.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the character data to be searched (character string or character constant)
S2 Character string to be searched
D Area storing the search result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The character data specified by [S1] is searched for the character string specified by [S2].
● The number of characters that are the same based on the search result is stored in [D] and
the first matching relative position (in byte units) is stored in [D+1].

■ Operation example
Operation of instruction format description program
The characters in DT0 are searched from the character string in DT10 and the result is stored in
DT120.

WUME-FPXHPGRG-021 26-31
26.10 F260 SSRC (Search for Character String)

Characters to search for Character table to be searched

DT0 10 (string size) DT10 10 (string size)

DT1 3 (character count) DT11 8 (character count)


Search
"F" "E" "B" "A"
DT2 DT12
(Byte 1) (Byte 0) (Byte 1) (Byte 0)
"G" "D" "C"
DT3 DT13
(Byte 3) (Byte 2) (Byte 3) (Byte 2)
"F" "E"
DT4 DT14
(Byte 5) (Byte 4) (Byte 5) (Byte 4)
"H" "G"
DT5 DT15
(Byte 7) (Byte 6) (Byte 7) (Byte 6)
DT6 DT16
(Byte 9) (Byte 8) (Byte 9) (Byte 8)
H L H L

DT120 1 Quantity of matching character data

DT121 5 Position of first match

■ Precautions for programming


● Specify a number of characters so that [S1] is less than or equal to [S2].
● For [S1+1], the number of characters in the character string on the search side, specify a
value for the number of characters to be searched.

e.g.

4 (string size)
When the character count is 1, searches for the character "A"
1 (character count) When the character count is 2, searches for the characters
"B" "A" "AB" as a single block

"D" "C"

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when number of characters is greater than the character string size
(ER)

26-32 WUME-FPXHPGRG-021
26.11 F261 RIGHT (Right Retrieve from Character String)

26.11 F261 RIGHT (Right Retrieve from Character String)


Retrieves a character string with the specified number of characters from the right side of a
character string.

■ Instruction format

■ Operands
Items Settings
S1 Character string
S2 Area storing the number of characters, or constant data
D Area storing the character string

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The number of characters specified by [S2] are retrieved from the right side of the character
string (the end of character data) specified by [S1], and are transferred to the character string
specified by [D].
● At the start of the area for storing results [D], specify the character string size via the user
program.

■ Operation example
Operation of instruction format description program
Five characters are retrieved from the end of character string DT0 and transferred to DT20.

WUME-FPXHPGRG-021 26-33
26.11 F261 RIGHT (Right Retrieve from Character String)

(*1): Specify via the user program


(*2): Area storing the operation results

■ Precautions for programming


● The character data of [D] prior to the operation is cleared.
● If the number of characters in [S2] is greater than the number of characters in the [S1]
character string, the number of characters of the [S1] character string is sent.
● If the number of characters specified by [S2] is greater than the size of the character string
specified by [D], then the number of characters equal to the size of the character string
specified by [D] are transferred.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when number of characters is greater than the character string size
(ER)
R9009 Turns ON when the operation result is greater than the size of the character string specified
(CY) by [D]

26-34 WUME-FPXHPGRG-021
26.12 F262 LEFT (Left Retrieve from Character String)

26.12 F262 LEFT (Left Retrieve from Character String)


Retrieves the specified number of characters from the left side of a character string.

■ Instruction format

■ Operands
Items Settings
S1 Character string
S2 Area storing the number of characters, or constant data
D Area storing the character string

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The number of characters specified by [S2] are retrieved from the left side of the character
string (the start of character data) specified by [S1], and are transferred to the character
string specified by [D].
● At the start of the area for storing results [D], specify the character string size via the user
program.

■ Operation example
Operation of instruction format description program
Five characters are retrieved from the start of the character string in DT0 and transferred to
DT20.

WUME-FPXHPGRG-021 26-35
26.12 F262 LEFT (Left Retrieve from Character String)

(*1): Specify via the user program


(*2): Area storing the operation results

■ Precautions for programming


● The character data of [D] prior to the operation is cleared.
● If the number of characters specified by [S2] is greater than the number of characters in the
character string specified by [S1], then the number of characters in the character string
specified by [S1] are transferred.
● If the number of characters specified by [S2] is greater than the size of the character string
specified by [D], then the number of characters equal to the size of the character string
specified by [D] are transferred.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when number of characters is greater than the character string size
(ER)
R9009 Turns ON when the operation result is greater than the size of the character string specified
(CY) by [D]

26-36 WUME-FPXHPGRG-021
26.13 F263 MIDR (Read from Any Position in Character String)

26.13 F263 MIDR (Read from Any Position in Character String)


Retrieves a character string of the specified number of characters from the specified position in
a character string.

■ Instruction format

■ Operands
Items Settings
S1 Character string
S2 Area storing the character string position, or constant data
S3 Area storing the number of characters, or constant data
D Area storing the character string

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The number of characters specified by [S3] is retrieved from the position specified by [S2] in
the character string specified by [S1], and is transferred to the character string specified by
[D].
● At the start of the area for storing results [D], specify the character string size via the user
program.

■ Operation example
Operation of instruction format description program
Three characters are retrieved from position byte 1 (2nd character) of the DT0 character string,
and are transferred to DT20.

WUME-FPXHPGRG-021 26-37
26.13 F263 MIDR (Read from Any Position in Character String)

(*1): Specify via the user program


(*2): Area storing the operation results

■ Precautions for programming


● The character data of [D] prior to the operation is cleared.
● If the number of characters specified by [S3] is greater than the number of characters in the
character string specified by [S1] from the position specified by [S2], then the number of
characters in the character string specified by [S1] are transferred.
● If the number of characters of the operation result is greater than the size of the character
string specified by [D], then the number of characters equal to the size of the character string
specified by [D] are transferred.
● The position specified by [S2] has K0 specified for the least significant byte (byte 0), and the
positions are counted in the order of 0, 1, 2, etc., starting from the least significant byte.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when number of characters is greater than the character string size
(ER) Turns ON when the number of characters specified by [S1] is less than [S2]
R9009 Turns ON when the operation result is greater than the size of the character string specified
(CY) by [D]

26-38 WUME-FPXHPGRG-021
26.14 F264 MIDW (Write to Any Position in Character String)

26.14 F264 MIDW (Write to Any Position in Character String)


These instructions write a specified number of characters from a character string to a specified
position in the character string.

■ Instruction format

■ Operands
Items Settings
S1 Character string
S2 Area storing the number of characters, or constant data
D Starting address of the area storing a character string
n Area storing the character string position, or constant data

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW SD modifier Integer
WX WY WR WL SV EV DT LD I
s R T K H M f (Note 1) Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Outline of operation
The number of characters specified by [S2] is retrieved from the character string specified by
[S1], and is transferred to the [n] position of the character string specified by [D].

■ Operation example
Operation of instruction format description program
Retrieves 3 characters from the DT0 character string, and transfers these to the byte 1 position
(second character) of the DT20 character string block.

WUME-FPXHPGRG-021 26-39
26.14 F264 MIDW (Write to Any Position in Character String)

DT0 10
DT1 8
DT2 "B" "A"
DT3 "D" "C"
DT4 "F" "E"
DT20 10 (*1)
DT5 "H" "G"
DT21 8
DT6
"A" "1"
H L DT22
(Byte 1) (Byte 0)
DT23 "C" "B"
DT20 10 (Byte 3) (Byte 2) (*2)
"6" "5"
DT21 8 DT24
(Byte 5) (Byte 4)
"8" "7"
"2" "1" DT25
DT22 (Byte 7) (Byte 6)
(Byte 1) (Byte 0)
"4" "3" DT26
DT23 (Byte 9) (Byte 8)
(Byte 3) (Byte 2)
H L
DT24 "6" "5"
(Byte 5) (Byte 4)
DT25 "8" "7"
(Byte 7) (Byte 6)
DT26 (Byte 9) (Byte 8)
H L
(*1): Specify via the user program
(*2): Area storing the operation results

■ Precautions for programming


● The [D] character data before calculation is not cleared. (This is overwritten.)
● If the number of characters in [S2] is greater than the number of characters in the [S1]
character string, the number of characters of the [S1] character string is sent.
● If the position of [n] is greater than number of characters in the [D] character string, an
operation error occurs.
● If the number of characters in the operation result is greater than the size of the [D] character
string, then replacement is done only within a range the size of the [D] character string.
● The [n] position sets the least significant byte as K0 (byte 0), counting up in the order of 0, 1,
2, etc. starting from the least significant byte.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when number of characters is greater than the character string size
(ER) Turns ON when the number of characters of [D] < [n]
R9009 Turns ON when the operation result is greater than the size of the character string specified
(CY) by [D]

26-40 WUME-FPXHPGRG-021
26.15 F265 SREP (Replace Character Strings)

26.15 F265 SREP (Replace Character Strings)


Replaces the specified number of characters in a character string with the same number of
different characters, starting from the specified position.

■ Instruction format

■ Operands
Items Settings
S Replacement character string
D Starting address of the area storing a character string
p Area storing the first byte position of the characters to be replaced, or constant data
n Area storing the number of characters to be replaced from the source data, or constant data

■ Devices that can be specified (indicated by ●)


Constant Index
Operand SW SD modifier Integer
WX WY WR WL SV EV DT LD I
s R T K H M f (Note 1) Device

S ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
p ● ● ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●

(Note 1) A character constant cannot be specified.

■ Outline of operation
The number of characters specified by [n] are replaced with the character string specified by
[S], starting from position [p] in the character string specified by [D].

■ Operation example
Operation of instruction format description program
The DT0 character string is replaced with the number of characters in DT1 (five characters)
from byte p = 1 in DT20. In this case, n = 3 characters of the data stored in the source are
deleted and replaced.

WUME-FPXHPGRG-021 26-41
26.15 F265 SREP (Replace Character Strings)

DT0 10
DT1 5
DT2 "B" "A"
DT3 "D" "C"
DT4 "E"
DT20 10 (*1)
DT5
DT21 10
DT6
"A" "1"
H L DT22
(Byte 1) (Byte 0)
DT23 "C" "B"
DT20 10 (Byte 3) (Byte 2) (*2)
"E" "D"
DT21 8 DT24
(Byte 5) (Byte 4)
"6" "5"
"2" "1" DT25
DT22 (Byte 7) (Byte 6)
(Byte 1) (Byte 0) "8" "7"
"4" "3" DT26
DT23 (Byte 9) (Byte 8)
(Byte 3) (Byte 2)
H L
DT24 "6" "5"
(Byte 5) (Byte 4)
DT25 "8" "7"
(Byte 7) (Byte 6)
DT26 (Byte 9) (Byte 8)
H L
(*1): Specify via the user program
(*2): Area storing the operation results

■ Precautions for programming


● The character data from [D] prior to the operation is not cleared. (This is overwritten.)
● If the number of characters in [n] is larger than the number of characters in the character
string [S] subsequent to the point specified by [p], the number of characters in character
string [S] subsequent to the point specified by [p] are replaced.
● If the position specified by [p] exceeds the number of characters in the character string
specified by [D], an operation error occurs.
● The position specified by [p] sets the low byte as K0 (byte 0), and the positions are counted
in the order 0, 1, 2, ... starting from the low byte.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when number of characters is greater than the character string size
(ER) Turns ON when the number of characters of [D] is less than [n]
R9009 Turns ON when the operation result is greater than the size of the character string specified
(CY) by [D]

26-42 WUME-FPXHPGRG-021
27 Data Manipulation
Instructions
27.1 F270 MAX (Search Maximum Value from 16-bit Data Block) ...........27-2
27.2 F271 DMAX (Search Maximum Value from 32-bit Data Block) ........27-4
27.3 F272 MIN (Search Minimum Value from 16-bit Data Block) .............27-6
27.4 F273 DMIN (Search Minimum Value from 32-bit Data Block)...........27-8
27.5 F275 MEAN (16-bit Data Sum and Average)....................................27-10
27.6 F276 DMEAN (32-bit Data Sum and Average) .................................27-12
27.7 F277 SORT (16-bit Data Block Sort) ................................................27-14
27.8 F278 DSORT (32-bit Data Block Sort)..............................................27-16
27.9 F282 SCAL (16-bit Data Linearization) .............................................27-18
27.10 F283 DSCAL (32-bit Data Linearization) ........................................27-21
27.11 F284 RAMP (16-bit Data Ramp Output) .........................................27-24
27.12 F285 LIMT (16-bit Data Upper and Lower Limit Control)................27-26
27.13 F286 DLIMT (32-bit Data Upper and Lower Limit Control) .............27-28
27.14 F287 BAND (16-bit Data Deadband Control) .................................27-30
27.15 F288 DBAND (32-bit Data Deadband Control) ...............................27-32
27.16 F289 ZONE (16-bit Data Zone Control) ..........................................27-34
27.17 F290 DZONE (32-bit Data Zone Control) .......................................27-36

WUME-FPXHPGRG-021 27-1
27.1 F270 MAX (Search Maximum Value from 16-bit Data Block)

27.1 F270 MAX (Search Maximum Value from 16-bit Data Block)
Finds the maximum value in the specified memory area range (word data table).

■ Instruction format

■ Operands
Items Settings
S1 Starting area that stores word data
S2 Ending area that stores word data
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Searches for the maximum value in the word data tables from the area specified by [S1] to
the area specified by [S2], stores the result in the area specified by [D], and stores the
relative address value from [S1] in [D+1].

S1: 0 D: Maximum value


S1+1: 1 D+1: Relative address

S2: n
Relative address

27-2 WUME-FPXHPGRG-021
27.1 F270 MAX (Search Maximum Value from 16-bit Data Block)

● If there is multiple data with the same value as the maximum value, the relative address of
the first value found searching from [S1] is stored in [D+1].

■ Precautions for programming


[D+1] will stored even if it overflows the specified device area, so it may corrupt the start of
other device areas. (Area overflow checks are not performed.)

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 ON when [S1] is greater than [S2]
(ER) Turns ON when S1 and S2 are different devices

WUME-FPXHPGRG-021 27-3
27.2 F271 DMAX (Search Maximum Value from 32-bit Data Block)

27.2 F271 DMAX (Search Maximum Value from 32-bit Data Block)
Calculates the maximum value of the specified memory area range (double word data table).

■ Instruction format

■ Operands
Items Settings
S1 Starting area storing double word data
S2 Ending area storing double word data
D Area storing the result of the operation (three words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The maximum value is searched for in the double word data table between the area
specified by [S1] and the area specified by [S2] and the result is stored in the area specified
by [D]. The address relative to [S1] is stored in [D+2].
Double word data table

S1: Lower word 0 D: Lower word


Maximum value
S1+1: Higher word D+1: Higher word

S1+2: 1 D+2: Relative address


S1+3:

S2: Lower word n

S2+1: Higher word Relative address

● If [S2] specifies a high word of double word data, processing will take place over the same
area as if a low word had been specified.

27-4 WUME-FPXHPGRG-021
27.2 F271 DMAX (Search Maximum Value from 32-bit Data Block)

Double word data table

S1: Lower word 0 D: Lower word


Maximum value
S1+1: Higher word D+1: Higher word

S1+2: 1 D+2: Relative address

S1+3:

S2-1: Lower word n

S2: Higher word Relative address

● If there is multiple data with the same value as the maximum value, the relative address of
the first value found searching from [S1] is stored in [D+2].

■ Precautions for programming


● [D+2 will stored even if it overflows the specified device area, so it may corrupt the start of
other device areas. (Area overflow checks are not performed.)
● The stored relative address value is counted in 32-bit units.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 ON when [S1] is greater than [S2]
(ER) Turns ON when S1 and S2 are different devices

WUME-FPXHPGRG-021 27-5
27.3 F272 MIN (Search Minimum Value from 16-bit Data Block)

27.3 F272 MIN (Search Minimum Value from 16-bit Data Block)
Finds the minimum value in the specified memory area range (word data table).

■ Instruction format

■ Operands
Items Settings
S1 Starting area that stores word data
S2 Ending area that stores word data
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Searches for a minimum value in the word data table from the area specified in [S1] to the
area specified in [S2], stores the result in the area specified in [D], and stores the relative
address value from [S1] in [D+1].

27-6 WUME-FPXHPGRG-021
27.3 F272 MIN (Search Minimum Value from 16-bit Data Block)

Word data table

S1: 0 D: Maximum value


S1+1: 1 D+1: Relative address

S2: n
Relative address

● When there is multiple data sharing the same minimum value, the relative address of the first
result found searching from [S1] is stored in [D+1].

■ Precautions for programming


[D+1] will stored even if it overflows the specified device area, so it may corrupt the start of
other device areas. (Area overflow checks are not performed.)

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 ON when [S1] is greater than [S2]
(ER) Turns ON when S1 and S2 are different devices

WUME-FPXHPGRG-021 27-7
27.4 F273 DMIN (Search Minimum Value from 32-bit Data Block)

27.4 F273 DMIN (Search Minimum Value from 32-bit Data Block)
Finds the minimum value of the specified memory area range (double word data table).

■ Instruction format

■ Operands
Items Settings
S1 Starting area storing double word data
S2 Ending area storing double word data
D Area storing the result of the operation (three words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Searches for the minimum value in the double word data table between the area specified by
[S1] and the area specified by [S2] and stores the result in the area specified by [D]. The
relative address value relative to [S1] is stored in [D+2].
Double word data table

S1: Lower word 0 D: Lower word


Minimum value
S1+1: Higher word D+1: Higher word

S1+2: 1 D+2: Relative address


S1+3:

S2: Lower word n

S2+1: Higher word Relative address

● If [S2] specifies a high word of double word data, processing will take place over the same
area as if a low word had been specified.

27-8 WUME-FPXHPGRG-021
27.4 F273 DMIN (Search Minimum Value from 32-bit Data Block)

Double word data table

S1: Lower word 0 D: Lower word


Minimum value
S1+1: Higher word D+1: Higher word

S1+2: 1 D+2: Relative address


S1+3:

S2-1: Lower word n

S2: Higher word Relative address

● When there is multiple data sharing the same minimum value, the relative address of the first
result found searching from [S1] is stored in [D+2].

■ Precautions for programming


● [D+2 will stored even if it overflows the specified device area, so it may corrupt the start of
other device areas. (Area overflow checks are not performed.)
● The stored relative address value is counted in 32-bit units.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 ON when [S1] is greater than [S2]
(ER) Turns ON when S1 and S2 are different devices

WUME-FPXHPGRG-021 27-9
27.5 F275 MEAN (16-bit Data Sum and Average)

27.5 F275 MEAN (16-bit Data Sum and Average)


Calculates the total value and mean value of the specified memory area range (word data).

■ Instruction format

■ Operands
Items Settings
S1 Starting area that stores word data
S2 Ending area that stores word data
D Area storing the result of the operation (three words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The total value and mean value of the word data (signed) from the area specified by [S1] to
the area specified by [S2] are obtained and stored in the area specified by [D].

15 0
D: Total value (32 bits)
D+1:

D+2: Mean value (16 bits)

● For the mean value, the decimal is rounded down to make an integer.

■ Precautions for programming


[D+2 will stored even if it overflows the specified device area, so it may corrupt the start of other
device areas. (Area overflow checks are not performed.)

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.

27-10 WUME-FPXHPGRG-021
27.5 F275 MEAN (16-bit Data Sum and Average)

Name Description
R9008 ON when [S1] is greater than [S2]
(ER) Turns ON when S1 and S2 are different devices
R9009
Turns ON when overflow/underflow occurs during calculation
(CY)

WUME-FPXHPGRG-021 27-11
27.6 F276 DMEAN (32-bit Data Sum and Average)

27.6 F276 DMEAN (32-bit Data Sum and Average)


Calculates the total and mean values of the specified memory area range (double word data).

■ Instruction format

■ Operands
Items Settings
S1 Starting area storing double word data
S2 Ending area storing double word data
D Area storing the operation results (6 words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The total and mean values of the double word data (signed) from the area specified by [S1]
to the area specified by [S2] are stored in the area specified by [D].

15 0
D: Total value (64 bits)
D+1:
D+2:
D+3:
D+4: Mean value (32 bits)
D+5:
● If [S2] specifies a high word of double word data, processing will take place over the same
area as if a low word had been specified.

27-12 WUME-FPXHPGRG-021
27.6 F276 DMEAN (32-bit Data Sum and Average)

Double word data table


S1: Lower word 0
S1+1: Higher word
S1+2: 1
S1+3:
Target area

S2-1: Lower word n


S2: Higher word
● For the mean value, the decimal is rounded down to make an integer.

■ Precautions for programming


[D+5] will stored even if it overflows the specified device area, so it may corrupt the start of
other device areas. (Area overflow checks are not performed.)

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 ON when [S1] is greater than [S2]
(ER) Turns ON when S1 and S2 are different devices
R9009
Turns ON when overflow/underflow occurs during calculation
(CY)

WUME-FPXHPGRG-021 27-13
27.7 F277 SORT (16-bit Data Block Sort)

27.7 F277 SORT (16-bit Data Block Sort)


Sorts the strings (word data) in the specified memory area range into ascending or descending
order.

■ Instruction format

■ Operands
Items Settings
S1 Starting area storing sort data
S2 Ending area storing sort data
S3 Area storing sort conditions, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The word data (signed) from the area specified by [S1] to the area specified by [S2] is sorted
into ascending or descending order.
● When S1 = S2, no operation takes place.
● The sort conditions are specified in [S3].
K0: Ascending order
K1: Descending order
● During sorting, the data from [S1] to [S2] is sorted in sequential order in accordance with the
sort procedure. Note that the number of times data is compared increases proportionally to
the square of the number of data words, and therefore the operation time will increase if
there is a large number of data words to be sorted.

■ Operation example
Operation of instruction format description program
● Ascending order
If data is stored in DT10 to DT19 as shown below and [S3] = K0, the following operation is
performed.

27-14 WUME-FPXHPGRG-021
27.7 F277 SORT (16-bit Data Block Sort)

● Descending order
If data is stored in DT10 to DT19 as shown below and [S3] = K1, the following operation is
performed.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 ON when [S1] is greater than [S2]
(ER) Turns ON when S1 and S2 are different devices

WUME-FPXHPGRG-021 27-15
27.8 F278 DSORT (32-bit Data Block Sort)

27.8 F278 DSORT (32-bit Data Block Sort)


Sorts strings (double word data) in the specified memory area in ascending or descending
order.

■ Instruction format

■ Operands
Items Settings
S1 Starting area storing sort data
S2 Ending area storing sort data
S3 Area storing sort conditions, or constant data

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Sorts the double word data (signed) in the areas specified by [S1] and [S2] into ascending or
descending order.
● When S1 = S2, no operation takes place.
● The sort conditions are specified in [S3].
K0: Ascending order
K1: Descending order
● During sorting, the data from [S1] to [S2] is sorted in sequential order in accordance with the
sort procedure. Note that the number of times data is compared increases proportionally to
the square of the number of data words, and therefore the operation time will increase if
there is a large number of data words to be sorted.
● If [S2] specifies a high word of double word data, processing will take place over the same
area as if a low word had been specified.

27-16 WUME-FPXHPGRG-021
27.8 F278 DSORT (32-bit Data Block Sort)

Double word data table


S1: Lower word 0
S1+1: Higher word
S1+2: 1
S1+3:
Target area

S2-1: Lower word n


S2: Higher word

■ Operation example
Operation of instruction format description program
● Ascending order
If data is stored in DT10 to DT19 as below and [S3] = K0, the following operation will be
performed.

● Descending order
If data is stored in DT10 to DT19 as shown below and [S3] = K1, the following operation is
performed.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 ON when [S1] is greater than [S2]
(ER) Turns ON when S1 and S2 are different devices

WUME-FPXHPGRG-021 27-17
27.9 F282 SCAL (16-bit Data Linearization)

27.9 F282 SCAL (16-bit Data Linearization)


Performs scaling of the given data table and finds output value Y with regards to input value X.

■ Instruction format

■ Operands
Items Settings
S1 Source 16-bit data equivalent to input value X, or the area where it is stored
S2 Starting address of the data table used for scaling (linearization)
D Area where output result Y is stored

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The 16-bit data specified by [S1] is scaled in accordance with the data table specified by
[S2], and the output value for input value X is calculated.
● The number of items in the data table n is determined by the value [n] specified in [S2] at the
top of the data table.

27-18 WUME-FPXHPGRG-021
27.9 F282 SCAL (16-bit Data Linearization)

Structure of the data table used in scaling (linearization) (if S2 = DT10 and n = K10)

(Xn-1,yn-1)
(X4,y4) (Xn,yn)

Y="D"

(X3,y3)

(X2,y2)
(X1,y1) X="S1"
Input value

■ Operation example
Operation of instruction format description program
The data table is referenced starting from DT10, output value Y for the input value stored in
DT0 is calculated, and the result is stored in DT120.

■ Precautions for programming


● Make Xt_1<Xt.
● Create xt and yt as signed 16-bit data.
● If X(S1) < x1, then Y(D) = y1.
● If X(S1) > xn, then Y(D) = yn. n has a maximum of 99.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.

WUME-FPXHPGRG-021 27-19
27.9 F282 SCAL (16-bit Data Linearization)

Name Description
Turns ON when n < 2 or n > 99 in [S2]
R9008
Turns ON when data table in [S2] exceeds area
(ER)
Turns ON when Xn is not in ascending order

27-20 WUME-FPXHPGRG-021
27.10 F283 DSCAL (32-bit Data Linearization)

27.10 F283 DSCAL (32-bit Data Linearization)


Performs scaling of the given data table and finds output value Y with regards to input value X.

■ Instruction format

■ Operands
Items Settings
S1 Original 32-bit data corresponding to input value X, or storage area
S2 Starting address of the data table used for scaling (linearization)
D Area where output result Y is stored

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Performs scaling of the 32-bit data specified in [S1] according to the data table specified in
[S2], and finds output value Y with regards to input value X.
● The number of items in the data table n is determined by the value [n] specified in [S2] at the
top of the data table.

WUME-FPXHPGRG-021 27-21
27.10 F283 DSCAL (32-bit Data Linearization)

Structure of the data table used in scaling (linearization) (if S2 = DT10 and n = K10)

(Xn-1,yn-1)
(X4,y4) (Xn,yn)

Y="D"

(X3,y3)

(X2,y2)
(X1,y1) X="S1"
Input value

■ Operation example
Operation of instruction format description program
Finds output value Y with regards to input value X stored in DT0, with reference to the data
table starting from DT10, and stores the result in DT120 to DT121.

■ Precautions for programming


● Make Xt_1<Xt.
● Create xt and yt as signed 32-bit data.
● If X(S1) < x1, then Y(D) = y1.
● If X(S1) > xn, then Y(D) = yn. n has a maximum of 99.

27-22 WUME-FPXHPGRG-021
27.10 F283 DSCAL (32-bit Data Linearization)

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when n<2 or n>99 in [S2]
R9008
Turns ON when data table in [S2] exceeds area
(ER)
Turns ON when Xn is not in ascending order

WUME-FPXHPGRG-021 27-23
27.11 F284 RAMP (16-bit Data Ramp Output)

27.11 F284 RAMP (16-bit Data Ramp Output)


Linear output is executed based on the elapsed time from the start of execution, by performing
scaling from the output default value, target value, and time width.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the default value, or constant data
S2 Area storing the target value, or constant data
S3 Area storing the time width, or constant data
D Data output area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
Scaling is performed from the 16-bit output default value of the area specified by [S1], the 16-bit
output target value of the area specified by [S2], and the 16-bit output time width (in ms units) of
the area specified by [S3], and linear output is performed according to the elapsed time from
the start of execution.

■ Precautions for programming


It is possible that a maximum error of 1 scan may occur in the output time width.

<Example> If the following values are set in a program


DT0 (default value) = K1000
DT1 (target value) = K5000
DT2 (time width) = K400

27-24 WUME-FPXHPGRG-021
27.11 F284 RAMP (16-bit Data Ramp Output)

R0 (execution condition)

ON
OFF
DT10 (output value)

1000 (initial value)


400 ms (time interval)
400 700 1100
0 Time (ms)

DT0 (default value) = K5000


DT1 (target value) = K1000
DT2 (time width) = K400
R0 (execution condition)

ON
OFF
DT10 (output value)
5000 (default value)

1000 (target value)


400 ms (time interval)
400 700 1100
0 Time (ms)

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
If the output time width specified in S3 is out of range of K1 to K30000
(ER)

WUME-FPXHPGRG-021 27-25
27.12 F285 LIMT (16-bit Data Upper and Lower Limit Control)

27.12 F285 LIMT (16-bit Data Upper and Lower Limit Control)
Performs upper and lower limit control (word data).

■ Instruction format

■ Operands
Items Settings
S1 Area storing the lower limit or lower limit data
S2 Area storing the upper limit or upper limit data
S3 Area storing the input value or input value data
D Area storing the output value

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The output value (word data) stored in the area specified by [D] is controlled according to
whether or not the input value (word data) specified by [S3] falls within the range bounded by
the upper and lower limits specified by [S1] and [S2].
● The output value is determined based on the following conditions.
• If lower limit value [S1] is greater than input value [S3], then lower limit value [S1]
becomes output value [D]
• If upper limit value [S2] is less than input value [S3], then upper limit value [S2] becomes
output value [D]
• If lower limit value [S1] is equal to or less than input value [S3], which is equal to or less
than upper limit value [S2], then input value [S3] becomes output value [D]

27-26 WUME-FPXHPGRG-021
27.12 F285 LIMT (16-bit Data Upper and Lower Limit Control)

Output value [D]

[S2]

Lower limit value [S1]


Input value [S3]
Upper limit value [S2]

[S1]

● For control using only the upper limit value


Specify K-32768 (or H8000) for the lower limit value [S1].
● For control using only the lower limit value
Specify K32767 (or H7FFF) for the upper limit value [S2].

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
ON when [S1] is greater than [S2]
(ER)
R900B
Turns ON when the operation result falls within the upper/lower limit range
(=)

WUME-FPXHPGRG-021 27-27
27.13 F286 DLIMT (32-bit Data Upper and Lower Limit Control)

27.13 F286 DLIMT (32-bit Data Upper and Lower Limit Control)
Performs upper and lower limit control (double word).

■ Instruction format

■ Operands
Items Settings
S1 Area storing the lower limit, or lower limit data (two words)
S2 Area storing the upper limit, or upper limit data (two words)
S3 Area storing the input value, or input value data (two words)
D Area storing the output value (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The output value (double-word data) stored in the area specified by [D] is controlled
according to whether or not the input value (double-word data) specified by [S3] falls within
the range bounded by the upper and lower limits specified by [S1] and [S2].
● The output value is determined based on the following conditions.
• If lower limit value [S1, S1+1] is greater than input value [S3, S3+1], then lower limit value
[S1, S1+1] becomes output value [D, D+1]
• If upper limit value [S2, S2+1] is less than input value [S3, S3+1], then upper limit value
[S2, S2+1] becomes output value [D, D+1]
• If lower limit value [S1, S1+1] is equal to or less than input value [S3, S3+1], which is
equal to or less than upper limit value [S2, S2+1], then input value [S3, S3+1] becomes
output value [D, D+1]

27-28 WUME-FPXHPGRG-021
27.13 F286 DLIMT (32-bit Data Upper and Lower Limit Control)

Output value [D, D+1]

[S2, S2+1]

Input value
Upper limit value [S3, S3+1]
[S2, S2+1]

[S1, S1+1]

● For control using only the upper limit value


Set K-2147483648 (or H80000000) for lower limit [S1, S1+1].
● For control using only the lower limit value
Set K2147483647 (or H7FFFFFFF) for upper limit [S2, S2+1].

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
ON when [S1] is greater than [S2]
(ER)
R900B
Turns ON when the operation result falls within the upper/lower limit range
(=)

WUME-FPXHPGRG-021 27-29
27.14 F287 BAND (16-bit Data Deadband Control)

27.14 F287 BAND (16-bit Data Deadband Control)


Performs deadband control (word).

■ Instruction format

■ Operands
Items Settings
S1 Area storing the lower limit or lower limit data
S2 Area storing the upper limit or upper limit data
S3 Area storing the input value or input value data
D Area storing the output value

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The output value (word data) stored in the area specified by [D] is controlled based in
whether or not the input value (word data) specified by [S3] is inside or outside of the
deadband bounded by the upper and lower limits specified by [S1] and [S2].
● The output value is determined based on the following conditions.
• When the lower limit [S1] is greater than the input value [S3], input value [S3] minus lower
limit [S1] equals output value [D]
• When the upper limit [S2] is less than the input value [S3], input value [S3] minus upper
limit [S2] equals output value [D]
• When the lower limit [S1] is equal to or less than the input value [S3] that is equal to or
less than the upper limit [S2], 0 equals output value [D]

27-30 WUME-FPXHPGRG-021
27.14 F287 BAND (16-bit Data Deadband Control)

Output value [D]

[S2]

Deadband lower limit


[S1]
Input value [S3]
0
Deadband upper limit
[S2]

During this time, 0 is output.

■ Operation example
Operation of instruction format description program
When K-100 is stored in DT10 and K100 in DT20, the following operation will be performed.
Value of DT30 Value stored in DT40
K-300 K-200
K-200 K-100
K-100 to K100 K0
K200 K100
K300 K200

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
ON when [S1] is greater than [S2]
(ER)
R9009
ON when the calculation result overflows or underflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 27-31
27.15 F288 DBAND (32-bit Data Deadband Control)

27.15 F288 DBAND (32-bit Data Deadband Control)


Carries out deadband control (double word).

■ Instruction format

■ Operands
Items Settings
S1 Area storing the lower limit, or lower limit data (two words)
S2 Area storing the upper limit, or upper limit data (two words)
S3 Area storing the input value, or input value data (two words)
D Area storing the output value (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The output value (double word data) stored in the area specified by [D] is controlled
according to whether or not the input value (double word data) specified by [S3] is inside the
range of the upper and lower limits of the deadband specified by [S1] and [S2].
● The output value is determined based on the following conditions.
• When the lower limit [S1, S1+1] > input value [S3, S3+1], the input value [S3, S3+1] - the
lower limit [S1, S1+1] becomes the output value [D, D+1]
• When the upper limit [S2, S2+1] < input value [S3, S3+1], the input value [S3, S3+1] - the
upper limit [S2, S2+1] becomes the output value [D, D+1]
• When the lower limit [S1, S1+1] ≤ input value [S3, S3+1] ≤ the upper limit [S2, S2+1], 0
becomes the output value [D, D+1]

27-32 WUME-FPXHPGRG-021
27.15 F288 DBAND (32-bit Data Deadband Control)

Output value [D, D+1]

Deadband lower limit


[S1, S1+1]
Input value
0 [S3, S3+1]
Deadband upper limit
[S2, S2+1]

During this time, 0 is output.

■ Operation example
Operation of instruction format description program
If K-10000 is stored in DT10 and DT11, and K10000 is stored in DT20 and DT21, the following
operation is performed.
Values of DT30, and DT31 Values stored in DT40 and DT41
K-30000 K-20000
K-20000 K-10000
K-10000 to K10000 K0
K20000 K10000
K30000 K20000

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
ON when [S1] is greater than [S2]
(ER)
R9009
ON when the calculation result overflows or underflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 27-33
27.16 F289 ZONE (16-bit Data Zone Control)

27.16 F289 ZONE (16-bit Data Zone Control)


Performs zone control (word).

■ Instruction format

■ Operands
Items Settings
S1 Area where negative bias value is stored, or negative bias value data
S2 Area where positive bias value is stored, or positive bias value data
S3 Area storing the input value or input value data
D Area storing the output value

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The bias value specified by [S1] or [S2] is added to the input value (word data) specified by
[S3], and the output value is stored in the area specified by [D].
● The output value is determined based on the following conditions.
• When input value [S3] < 0, input value [S3] + negative bias value [S1] → output value [D]
• When input value [S3] = 0, 0 → output value [D]
• When input value [S3] > 0, input value [S3] + positive bias value [S2] → output value [D]

27-34 WUME-FPXHPGRG-021
27.16 F289 ZONE (16-bit Data Zone Control)

Output value [D]

[S2]

Input value [S3]


0
Bias value for negative case
[S1]

■ Operation example
Operation of instruction format description program
When K-100 is stored in DT10, and K100 is stored in DT20
Value of DT30 Value stored in DT40
K-300 K-400
K-200 K-300
K-100 K-200
K0 K0
K100 K200
K200 K300
K300 K400

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009
ON when the calculation result overflows or underflows
(CY)
R900B
Turns ON when the input value is"0"
(=)

WUME-FPXHPGRG-021 27-35
27.17 F290 DZONE (32-bit Data Zone Control)

27.17 F290 DZONE (32-bit Data Zone Control)


Carries out zone control (double word).

■ Instruction format

■ Operands
Items Settings
S1 Area storing negative bias values, or negative bias value data (two words)
S2 Area storing positive bias values, or positive bias value data (two words)
S3 Area storing the input value, or input value data (two words)
D Area storing the output value (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The bias value specified by [S1] or [S2] is added to the input value (double-word data)
specified by [S3], and stored in the area specified by [D].
● The output value is determined based on the following conditions.
• When the input value [S3, S3+1] is less than 0, the input value [S3, S3+1] + the negative
bias value [S1, S1+1] is the output value [D, D+1]
• When the input values [S3, S3+1] equal zero, zero is stored in [D, D+1] as the output
values
• When the input values [S3, S3+1] are greater than zero, the input values [S3, S3+1] plus
the positive bias values [S2, S2+1] are stored in [D, D+1] as the output values

27-36 WUME-FPXHPGRG-021
27.17 F290 DZONE (32-bit Data Zone Control)

Output value [D, D+1]

[S2, S2+1]

Input value
0 [S3, S3+1]
Bias value for negative case
[S1, S1+1]

■ Operation example
Operation of instruction format description program
If K-10000 is stored in DT10 and DT11, and K10000 is stored in DT20 and DT21, the following
operation is performed.
Values of DT30, and DT31 Values stored in DT40 and DT41
K-30000 K-40000
K-20000 K-30000
K-10000 K-20000
K0 K0
K10000 K20000
K20000 K30000
K30000 K40000

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R9009
ON when the calculation result overflows or underflows
(CY)
R900B
Turns ON when the input value is"0"
(=)

WUME-FPXHPGRG-021 27-37
(MEMO)

27-38 WUME-FPXHPGRG-021
28 Floating-point Instruction
28.1 F309 FMV (Floating Point Data Move) .............................................28-3
28.2 F310 F+ (Floating Point Data Addition) ............................................28-5
28.3 F311 F- (Floating Point Data Subtraction) ........................................28-7
28.4 F312 F* (Floating Point Data Multiplication) .....................................28-9
28.5 F313 F% (Floating Point Data Division)............................................28-11
28.6 F314 SIN (Floating Point Data Sine Operation)................................28-13
28.7 F315 COS (Floating Point Data Cosine Operation) ..........................28-15
28.8 F316 TAN (Floating Point Data Tangent Operation) .........................28-17
28.9 F317 ASIN (Floating Point Data Arcsine Operation) ........................28-19
28.10 F318 ACOS (Floating Point Data Arccosine Operation) .................28-21
28.11 F319 ATAN (Floating Point Data Arctangent Operation).................28-23
28.12 F320 LN (Floating Point Data Natural Logarithmic Operation) .......28-25
28.13 F321 EXP (Floating Point Data Exponent Operation) ....................28-27
28.14 F322 LOG (Floating Point Data Logarithm Operation) ...................28-29
28.15 F323 PWR (Floating Point Data Power Operation) ........................28-31
28.16 F324 FSQR (Floating Point Data Square Root Operation).............28-33
28.17 F325 FLT (16-bit Integer to Floating Point Data Conversion) .........28-35
28.18 F326 DFLT (32-bit Integer to Floating Point Data Conversion).......28-36
28.19 F327 INT [Floating Point Data to 16-bit Integer Conversion
(Largest Integer Not Exceeding the Floating-point Data)].....................28-38
28.20 F328 DINT [Floating Point Data to 32-bit Integer Conversion
(Largest Integer Not Exceeding the Floating-point Data)].....................28-40
28.21 F329 FIX [Floating Point Data to 16-bit Integer Conversion
(Round-down)] ......................................................................................28-42
28.22 F330 DFIX [Floating Point Data to 32-bit Integer Conversion
(Round-down)] ......................................................................................28-44
28.23 F331 ROFF [Floating Point Data to 16-bit Integer Conversion
(Round-off)] ...........................................................................................28-46
28.24 F332 DROFF [Floating Point Data to 16-bit Integer Conversion
(Round-off)] ...........................................................................................28-48
28.25 F333 FINT (Floating Point Data Round-down) ...............................28-50
28.26 F334 FRINT (Floating Point Data Round-off) .................................28-52

WUME-FPXHPGRG-021 28-1
28 Floating-point Instruction

28.27 F335 F+/- (Floating Point Data Sign Conversion)...........................28-54


28.28 F336 FABS (Floating Point Data Absolute Value Conversion) .......28-56
28.29 F337 RAD (Degree to Radian Conversion) ....................................28-58
28.30 F338 DEG (Radian to Degree Conversion) ....................................28-60

28-2 WUME-FPXHPGRG-021
28.1 F309 FMV (Floating Point Data Move)

28.1 F309 FMV (Floating Point Data Move)


Transfers the specified real number data to the specified area.

■ Instruction format

■ Operands
Items Settings
S Transfer data: Area storing real number data (32-bit), or constant data
D Destination: Data transfer destination area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The floating-point type real number data (32-bit) specified by [S] is transferred to the memory
area specified by [D].
Specify a lower 16-bit memory area for the memory area.

Floating point real


number data

Real number 15 0
data
D: Lower word
D+1: Higher word
● The range of constants that can be specified in [S] is as follows.
Positive numbers f 0.0000001 to f 9999999
Negative numbers f -9999999 to f -0.000001

■ Operation example
Operation of instruction format description program
When the execution condition R0 is ON, the floating-point type constant value f 1.234 is
transferred to data registers DT10 to DT11.

WUME-FPXHPGRG-021 28-3
28.1 F309 FMV (Floating Point Data Move)

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

28-4 WUME-FPXHPGRG-021
28.2 F310 F+ (Floating Point Data Addition)

28.2 F310 F+ (Floating Point Data Addition)


Adds real number data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing augend data, or augend data (two words)
S2 Area storing addend data, or addend data (two words)
D Area storing the addition result (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The real number data specified by [S1, S1+1] and [S2, S2+1] is added, and the result is
stored in [D, D+1].
[S1, S1+1] + [S2, S2+1] → [D, D+1]
● If [S1] and [S2] are specified with an integer device, the operation occurs after the integer
data is internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

WUME-FPXHPGRG-021 28-5
28.2 F310 F+ (Floating Point Data Addition)

● If a K constant is specified for [S1] or [S2], the same process is performed as if an integer
device was specified.

■ Program example
● When R0 is turned ON, f 4.554 is stored in DT30 and DT31.

● When R0 is turned ON, f 135.795 is stored in DT30 and DT31.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when non-real-number data is specified in [S1, S1+1] or [S2, S2+1]
R9008
(ER) Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)

28-6 WUME-FPXHPGRG-021
28.3 F311 F- (Floating Point Data Subtraction)

28.3 F311 F- (Floating Point Data Subtraction)


Subtracts real number data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the minuend data, or the minuend data (two words)
S2 Area storing the subtrahend data, or the subtrahend data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The subtrahend data specified by [S2, S2+1] is subtracted from the minuend data specified
by [S1, S1+1], and the result is stored in [D, D+1].
[S1, S1+1] - [S2, S2+1] → [D, D+1]
● If [S1] and [S2] are specified with an integer device, the operation occurs after the integer
data is internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

WUME-FPXHPGRG-021 28-7
28.3 F311 F- (Floating Point Data Subtraction)

● If a K constant is specified for [S1] or [S2], the same process is performed as if an integer
device was specified.

■ Program example
● When R0 turns ON, f 0.445 is stored in DT30 and DT31.

● When R0 turns ON, f 100.05 is stored in DT30 and DT31.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when non-real-number data is specified in [S1, S1+1] or [S2, S2+1]
R9008
(ER) Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)

28-8 WUME-FPXHPGRG-021
28.4 F312 F* (Floating Point Data Multiplication)

28.4 F312 F* (Floating Point Data Multiplication)


Multiplies real number data items.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the multiplicand data, or the multiplicand data (two words)
S2 Area storing the multiplier data, or the multiplier data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Multiplies the multiplicand data specified by [S1, S1+1] and the multiplier data specified by
[S2, S2+1], and stores the result in [D, D+1].
[S1, S1+1] × [S2, S2+1] → [D, D+1]
● If [S1] and [S2] are specified with an integer device, the operation occurs after the integer
data is internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

WUME-FPXHPGRG-021 28-9
28.4 F312 F* (Floating Point Data Multiplication)

● If a K constant is specified for [S1] or [S2], the same process is performed as if an integer
device was specified.

■ Program example
The f123.4000 is stored to DT30 and DT31 when the R0 turns ON.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when non-real-number data is specified in [S1, S1+1] or [S2, S2+1]
R9008
(ER) Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)

28-10 WUME-FPXHPGRG-021
28.5 F313 F% (Floating Point Data Division)

28.5 F313 F% (Floating Point Data Division)


Divides real number data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the dividend data, or dividend data (two words)
S2 Area storing the divisor data, or divisor data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Divides the dividend data specified by [S1, S1+1] by the divisor data specified by [S2, S2+1],
and stores the result in [D, D+1].
[S1, S1+1]÷[S2, S2+1] → [D, D+1]
● If [S1] and [S2] are specified with an integer device, the operation occurs after the integer
data is internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

WUME-FPXHPGRG-021 28-11
28.5 F313 F% (Floating Point Data Division)

● If a K constant is specified for [S1] or [S2], the same process is performed as if an integer
device was specified.

■ Program example
When R0 turns ON, f5.432100 is stored to DT30 to DT31.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real-number data is specified in [S1, S1+1] or [S2, S2+1]
R9008 Turns ON when the operation result exceeds the integer range when an integer device is
(ER) specified in [D, D+1]
Turns ON when divided by 0.0
R9009
Turns ON when operation result overflows
(CY)

28-12 WUME-FPXHPGRG-021
28.6 F314 SIN (Floating Point Data Sine Operation)

28.6 F314 SIN (Floating Point Data Sine Operation)


Calculates the trigonometric function sin().

■ Instruction format

■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● sin([S, S+1]) of the angle data specified by [S, S+1] (unit: radian) is calculated, and the result
is stored in [D, D+1].
sin([S, S+1]) → [D, D+1]
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

WUME-FPXHPGRG-021 28-13
28.6 F314 SIN (Floating Point Data Sine Operation)

■ Precautions for programming


The accuracy decreases as the absolute value of the input value increases. Where possible,
use angle data within the range -2π radians ≤ input ≤ 2π radians.

■ Program example
When R0 turns ON, f0.4999999 is stored in DT20 and DT21.

30˚ in radians
R0
F314 SIN f0.5235987 DT20

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real number data is specified in [S, S+1]
R9008 Turns ON when the operation result exceeds the integer range when an integer device is
(ER) specified in [D, D+1]
Turns ON when the absolute value of the input value is 52707176 or higher
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-14 WUME-FPXHPGRG-021
28.7 F315 COS (Floating Point Data Cosine Operation)

28.7 F315 COS (Floating Point Data Cosine Operation)


Operates the trigonometric function cos().

■ Instruction format

■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Calculates cos ([S, S+1]) of angle data (unit: radians) specified in [S, S+1], and stores the
result in [D, D+1].
cos([S, S+1]) → [D, D+1]
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

WUME-FPXHPGRG-021 28-15
28.7 F315 COS (Floating Point Data Cosine Operation)

■ Precautions for programming


The accuracy decreases as the absolute value of the input value increases. Where possible,
use angle data within the range -2π radians ≤ input ≤ 2π radians.

■ Program example
When R0 is ON, f 0.7071068 is stored in DT20 to DT21.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real number data is specified in [S, S+1]
R9008 Turns ON when the operation result exceeds the integer range when an integer device is
(ER) specified in [D, D+1]
Turns ON when the absolute value of the input value is 52707176 or higher
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-16 WUME-FPXHPGRG-021
28.8 F316 TAN (Floating Point Data Tangent Operation)

28.8 F316 TAN (Floating Point Data Tangent Operation)


Calculates the trigonometrical function tan().

■ Instruction format

■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The tan([S and S+1]) of angle data (unit: radians) specified by S and S+1 is calculated and
the result stored in D and D+1.
tan([S, S+1]) -> [D, D+1]
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

WUME-FPXHPGRG-021 28-17
28.8 F316 TAN (Floating Point Data Tangent Operation)

■ Precautions for programming


The accuracy decreases as the absolute value of the input value increases. Where possible,
use angle data within the range -2π radians ≤ input ≤ 2π radians.

■ Program example
f 1.732048 is stored in DT20 and DT21 when R0 turns ON.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real number data is specified in [S, S+1]
R9008 Turns ON when the operation result exceeds the integer range when an integer device is
(ER) specified in [D, D+1]
Turns ON when the absolute value of the input value is 52707176 or higher
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-18 WUME-FPXHPGRG-021
28.9 F317 ASIN (Floating Point Data Arcsine Operation)

28.9 F317 ASIN (Floating Point Data Arcsine Operation)

Calculates the trigonometric function SIN−1().

■ Instruction format

■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Calculates an angle from the SIN value specified in [S, S+1] and stores the result in [D, D+1]
(in radians).
SIN−1([S, S+1])→[D, D+1]
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

WUME-FPXHPGRG-021 28-19
28.9 F317 ASIN (Floating Point Data Arcsine Operation)

■ Precautions for programming


[D, D+1] is stored in the following range:
-π/2 ≤ [D, D+1] ≤ π/2
[radians] [radians]

■ Program example
f0.5235986 (30° radians) is stored in DT20 to DT21 when R0 turns ON.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real number data is specified in [S, S+1]
R9008 Turns ON when [S, S+1] is not within the range -1.0 ≤ [S, S+1] ≤ 1.0
(ER)
Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-20 WUME-FPXHPGRG-021
28.10 F318 ACOS (Floating Point Data Arccosine Operation)

28.10 F318 ACOS (Floating Point Data Arccosine Operation)

Calculates the trigonometric function COS−1().

■ Instruction format

■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The angle from the COS value specified by [S, S+1] is calculated and the result (unit: radian)
is stored in [D, D+1].
COS−1([S, S+1]) → [D, D+1]
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

WUME-FPXHPGRG-021 28-21
28.10 F318 ACOS (Floating Point Data Arccosine Operation)

■ Precautions for programming


[D, D+1] is stored in the following range:
0.0 ≤ [D, D+1] ≤ π
[radians] [radians]

■ Program example
When R0 turns ON, f0.7853980 (45° in radians) is stored in DT20 and DT21.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real number data is specified in [S, S+1]
R9008 Turns ON when [S, S+1] is not -1.0 ≤ [S, S+1] ≤ 1.0
(ER)
Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-22 WUME-FPXHPGRG-021
28.11 F319 ATAN (Floating Point Data Arctangent Operation)

28.11 F319 ATAN (Floating Point Data Arctangent Operation)

Calculates the trigonometrical function TAN−1().

■ Instruction format

■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The angle from the TAN value specified by [S, S+1] is calculated and the result (unit: radian)
is stored in [D, D+1].
TAN−1([S, S+1]) → [D, D+1]
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

WUME-FPXHPGRG-021 28-23
28.11 F319 ATAN (Floating Point Data Arctangent Operation)

■ Precautions for programming


[D, D+1] is stored in the following range:
-π/2 < [D, D+1] < π/2
[radians] [radians]

■ Program example
f1.047197 (60° in radians) is stored in DT20 to DT21 when R0 turns ON.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when non-real number data is specified in [S, S+1]
R9008
(ER) Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-24 WUME-FPXHPGRG-021
28.12 F320 LN (Floating Point Data Natural Logarithmic Operation)

28.12 F320 LN (Floating Point Data Natural Logarithmic Operation)


Calculates the natural logarithm LN().

■ Instruction format

■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The natural logarithm LN ([S, S+1]) is calculated from the operation data specified by [S, S
+1], and the result is stored in [D, D+1].
LN([S, S+1]) → [D, D+1]
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

WUME-FPXHPGRG-021 28-25
28.12 F320 LN (Floating Point Data Natural Logarithmic Operation)

■ Program example
● When R0 turns ON, f1.6094379 is stored in DT20 and DT21.

● When R0 turns ON, f-0.3160815 is stored in DT30 and DT31.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real number data is specified in [S, S+1]
R9008 Turns ON when [S, S+1] is not 0 < [S, S+1]
(ER)
Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-26 WUME-FPXHPGRG-021
28.13 F321 EXP (Floating Point Data Exponent Operation)

28.13 F321 EXP (Floating Point Data Exponent Operation)


Calculates the exponent EXP().

■ Instruction format

■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The exponent EXP ([S, S+1]) is calculated from the operation data specified by [S, S+1], and
the result is stored in [D, D+1].
EXP([S, S+1]) → [D, D+1]
The calculation is performed with exponent base (e) equal to"2.718282".
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

WUME-FPXHPGRG-021 28-27
28.13 F321 EXP (Floating Point Data Exponent Operation)

■ Program example
● When R0 turns ON, f7.389056 is stored in DT20 and DT21.

● When R0 turns ON, f221.406402 is stored in DT30 and DT31.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when non-real number data is specified in [S, S+1]
R9008
(ER) Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-28 WUME-FPXHPGRG-021
28.14 F322 LOG (Floating Point Data Logarithm Operation)

28.14 F322 LOG (Floating Point Data Logarithm Operation)


Calculates the logarithm LOG().

■ Instruction format

■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The logarithm LOG (S and S+1) is calculated using the data specified by S and S+1 and the
result stored in D and D+1.
LOG([S, S+1]) -> [D, D+1]
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

WUME-FPXHPGRG-021 28-29
28.14 F322 LOG (Floating Point Data Logarithm Operation)

■ Program example
● f 1.30103 is stored in DT20 and DT21 when R0 turns ON.

● f 0.0108932 is stored in DT30 and DT31 when R0 turns ON.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real number data is specified in [S, S+1]
R9008 Turns ON when [S, S+1] is not 0 < [S, S+1]
(ER)
Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-30 WUME-FPXHPGRG-021
28.15 F323 PWR (Floating Point Data Power Operation)

28.15 F323 PWR (Floating Point Data Power Operation)


Calculates powers for real number data.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the base data, or base data (two words)
S2 Area storing the power data, or power data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Raises the base data specified by [S1, S1+1] to the power data specified by [S2, S2+1], and
stores the result in [D, D+1].
[S1, S1+1]^[S2, S2+1] → [D, D+1]
● If [S1] and [S2] are specified with an integer device, the operation occurs after the integer
data is internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

WUME-FPXHPGRG-021 28-31
28.15 F323 PWR (Floating Point Data Power Operation)

● If a K constant is specified for [S1] or [S2], the same process is performed as if an integer
device was specified.

■ Program example
● When R0 turns ON, f 625.0 is stored to DT20 to DT21.

● When R0 turns ON, f 30.51758 is stored to DT30 to DT31.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real-number data is specified in [S1, S1+1] or [S2, S2+1]
R9008 Turns ON when the power of negative number data is not an integer
(ER)
Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-32 WUME-FPXHPGRG-021
28.16 F324 FSQR (Floating Point Data Square Root Operation)

28.16 F324 FSQR (Floating Point Data Square Root Operation)


Calculates the square root of real number data.

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The square root of the operation data specified by [S, S+1] is calculated and the result is
stored in [D, D+1].
√[S, S+1] → [D, D+1]
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

WUME-FPXHPGRG-021 28-33
28.16 F324 FSQR (Floating Point Data Square Root Operation)

■ Program example
When R0 turns ON, f1.41421 is stored in DT20 and DT21.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real number data is specified in [S, S+1]
R9008 Turns ON when [S, S+1] is not 0 ≤ [S, S+1]
(ER)
Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

28-34 WUME-FPXHPGRG-021
28.17 F325 FLT (16-bit Integer to Floating Point Data Conversion)

28.17 F325 FLT (16-bit Integer to Floating Point Data Conversion)


Converts 16-bit integer data to real number data.

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
Converts the operation data (signed 16-bit integer data) specified by [S] to real number data,
and stores this in [D].

15 0
Signed 16-bit S:
integer data

Real number 15 0
data
D: Lower word
D+1: Higher word

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-35
28.18 F326 DFLT (32-bit Integer to Floating Point Data Conversion)

28.18 F326 DFLT (32-bit Integer to Floating Point Data Conversion)


Converts 32-bit integers to real number data.

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The operation data (signed 32-bit integer data) specified by [S, S+1] is converted to real
number data and stored in [D, D+1].

15 0
Signed 32-bit S: Lower word
integer data
S+1: Higher word

Real number
data
15 0
D: Lower word
D+1: Higher word

■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)

28-36 WUME-FPXHPGRG-021
28.18 F326 DFLT (32-bit Integer to Floating Point Data Conversion)

Name Description
R9009 Turns ON when the significant digits of the mantissa for the operation result real number
(CY) data cannot be obtained

R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-37
28.19 F327 INT [Floating Point Data to 16-bit Integer Conversion (Largest
Integer Not Exceeding the Floating-point Data)]

28.19 F327 INT [Floating Point Data to 16-bit Integer Conversion


(Largest Integer Not Exceeding the Floating-point Data)]
Converts real number data to 16-bit integers (largest integer not exceeding floating point real
number).

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The real number data (-32767.99 to +32767.99) specified by [S, S+1] is converted to signed 16-
bit integers (largest integer not exceeding floating point real number) and stored in [D].

Real number 15 0
data S: Lower word
S+1: Higher word

Signed 16-bit 15 0
integer data D:

■ Operation example
Operation of instruction format description program
● If the real number 1.234 is stored in DT10 and DT11, the following operation is performed.

28-38 WUME-FPXHPGRG-021
28.19 F327 INT [Floating Point Data to 16-bit Integer Conversion (Largest
Integer Not Exceeding the Floating-point Data)]

● If the real number -1.234 is stored in DT10 and DT11, the following operation is performed.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when non-real number data is specified in [S, S+1]
(ER) Turns ON when [D] exceeds the 16-bit integer range
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-39
28.20 F328 DINT [Floating Point Data to 32-bit Integer Conversion (Largest
Integer Not Exceeding the Floating-point Data)]

28.20 F328 DINT [Floating Point Data to 32-bit Integer Conversion


(Largest Integer Not Exceeding the Floating-point Data)]
Converts real number data to 32-bit integers (largest integer not exceeding floating point real
number).

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The real number data (-2,147,483,000 to +2,147,483,000) specified by [S, S+1] is converted to
signed 32-bit integers (largest integer not exceeding floating point real number) and stored in
[D, D+1].

Real 15 0
number data S: Lower word
S+1: Higher word

Signed 32-bit 15 0
integer data D: Lower word
D+1: Higher word

■ Operation example
Operation of instruction format description program
● If the real number 12345.67 is stored in DT10 and DT11, the following operation is
performed.

28-40 WUME-FPXHPGRG-021
28.20 F328 DINT [Floating Point Data to 32-bit Integer Conversion (Largest
Integer Not Exceeding the Floating-point Data)]

● If the real number -12345.67 is stored in DT10 and DT11, the following operation is
performed.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when non-real number data is specified in [S, S+1]
(ER) Turns ON when [D, D+1] exceeds the 32-bit integer range
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-41
28.21 F329 FIX [Floating Point Data to 16-bit Integer Conversion (Round-
down)]

28.21 F329 FIX [Floating Point Data to 16-bit Integer Conversion


(Round-down)]
Converts real number data to a 16-bit integer (rounded down to the nearest integer).

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
Converts real number data specified in [S, S+1] (-32767.99 to +32767.99) to a signed 16-bit
integer (rounded down to the nearest integer), and stores it in [D].

Real number 15 0
data S: Lower word
S+1: Higher word

Signed 16-bit 15 0
integer data D:

■ Operation example
Operation of instruction format description program
● When the real number 1.234567 is stored in DT10 and DT11, the following operation is
performed.

28-42 WUME-FPXHPGRG-021
28.21 F329 FIX [Floating Point Data to 16-bit Integer Conversion (Round-
down)]

● When the real number -1.234567 is stored in DT10 and DT11, the following operation is
performed.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when non-real number data is specified in [S, S+1]
(ER) Turns ON when [D] exceeds the 16-bit integer range
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-43
28.22 F330 DFIX [Floating Point Data to 32-bit Integer Conversion (Round-
down)]

28.22 F330 DFIX [Floating Point Data to 32-bit Integer Conversion


(Round-down)]
Converts real number data to 32-bit integers (rounding down the decimal point).

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The real number data (-2,147,483,000 to +2,147,483,000) specified by [S, S+1] is converted to
signed 32-bit integers (rounding down the decimal point), and stored in [D, D+1].

15 0
Real number S: Lower word
data Higher word
S+1:

15 0
Signed 32-bit D: Lower word
integer data Higher word
D+1:

■ Operation example
Operation of instruction format description program
● If the real number 123456.7 is stored in DT10 to DT11, the following operation is performed.

28-44 WUME-FPXHPGRG-021
28.22 F330 DFIX [Floating Point Data to 32-bit Integer Conversion (Round-
down)]

● If the real number -123456.7 is stored in DT10 to DT11, the following operation is performed.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when non-real number data is specified in [S, S+1]
(ER) Turns ON when [D, D+1] exceeds the 32-bit integer range
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-45
28.23 F331 ROFF [Floating Point Data to 16-bit Integer Conversion (Round-
off)]

28.23 F331 ROFF [Floating Point Data to 16-bit Integer Conversion


(Round-off)]
Converts real number data to a 16-bit integer (rounded off to the nearest integer).

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
Converts the real number data (-32767.99 to +32767.99) specified in [S, S+1] to a signed 16-bit
integer (rounded off to the nearest integer) and stores it in [D].

15 0
Real number S: Lower word
data
S+1: Higher word

Signed 16-bit 15 0
integer data D:

■ Operation example
Operation of instruction format description program
● When the real number 1234.567 is stored in DT10 and DT11, the following operation will be
performed.

28-46 WUME-FPXHPGRG-021
28.23 F331 ROFF [Floating Point Data to 16-bit Integer Conversion (Round-
off)]

● When the real number -1234.567 is stored in DT10 and DT11, the following operation will be
performed.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when non-real number data is specified in [S, S+1]
(ER) Turns ON when [D] exceeds the 16-bit integer range
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-47
28.24 F332 DROFF [Floating Point Data to 16-bit Integer Conversion (Round-
off)]

28.24 F332 DROFF [Floating Point Data to 16-bit Integer Conversion


(Round-off)]
Converts real number data to 32-bit integers (rounding off at the decimal point).

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The real number data specified by [S, S+1] (-2,147,483,000 to +2,147,483,000) is converted to
signed 32-bit integers (rounding off at the decimal point) and stored in [D, D+1].

Real 15 0
number data S: Lower word
S+1: Higher word

Signed 32-bit 15 0
integer data D: Lower word
D+1: Higher word

■ Operation example
Operation of instruction format description program
● If the real number 45678.51 is stored in DT10 and DT11, the following operation is
performed.

28-48 WUME-FPXHPGRG-021
28.24 F332 DROFF [Floating Point Data to 16-bit Integer Conversion (Round-
off)]

● If the real number -45678.51 is stored in DT10 and DT11, the following operation is
performed.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when non-real number data is specified in [S, S+1]
(ER) Turns ON when [D, D+1] exceeds the 32-bit integer range
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-49
28.25 F333 FINT (Floating Point Data Round-down)

28.25 F333 FINT (Floating Point Data Round-down)


Rounds down real number data at the decimal point. (The largest integer not exceeding the
floating point type data)

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The real number data specified by [S, S+1] is rounded down at the decimal point and the result
is stored in [D, D+1].

Real 15 0
number data S: Lower word
S+1: Higher word

Signed 32-bit 15 0
integer data D: Lower word
D+1: Higher word

■ Operation example
Operation of instruction format description program
● When the real number 1234.567 is stored in DT10 and DT11, the following operation will be
performed.

28-50 WUME-FPXHPGRG-021
28.25 F333 FINT (Floating Point Data Round-down)

● When the real number -1234.567 is stored in DT10 and DT11, the following operation will be
performed.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when non-real number data is specified in [S, S+1]
(ER)
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-51
28.26 F334 FRINT (Floating Point Data Round-off)

28.26 F334 FRINT (Floating Point Data Round-off)


Rounds off real number data to the first decimal place.

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The decimal part of the real number data specified by [S, S+1] is rounded off to the first decimal
place, and the result is stored in [D, D+1].

15 0
Real number data S:
Lower word
S+1: Higher word

15 0
Real number data
D: Lower word
D+1: Higher word

■ Operation example
Operation of instruction format description program
● When the real number 1234.567 is stored in DT10 and DT11, the following operation will be
performed.

28-52 WUME-FPXHPGRG-021
28.26 F334 FRINT (Floating Point Data Round-off)

● When the real number -1234.567 is stored in DT10 and DT11, the following operation will be
performed.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when non-real number data is specified in [S, S+1]
(ER)
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-53
28.27 F335 F+/- (Floating Point Data Sign Conversion)

28.27 F335 F+/- (Floating Point Data Sign Conversion)


Changes the sign of real number data.

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
The sign for the real number data specified by [S, S+1] is changed and the result stored in [D, D
+1].

15 0
Real number data S:
Lower word
S+1: Higher word

15 0
Real number data
D: Lower word
D+1: Higher word

■ Operation example
Operation of instruction format description program
● If the real number "-60000.00" is stored in DT10 to DT11, the following operation will be
performed.

28-54 WUME-FPXHPGRG-021
28.27 F335 F+/- (Floating Point Data Sign Conversion)

● If the real number "-30000.00" is stored in DT10 to DT11, the following operation will be
performed.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when non-real number data is specified in [S, S+1]
(ER)
R9009
Turns ON when operation result overflows
(CY)

WUME-FPXHPGRG-021 28-55
28.28 F336 FABS (Floating Point Data Absolute Value Conversion)

28.28 F336 FABS (Floating Point Data Absolute Value Conversion)


Calculates the absolute value of real number data.

■ Instruction format

■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Calculates the absolute value of the real number data specified in [S, S+1], then stores the
result in [D, D+1].

15 0
Real number data
S: Lower word
S+1: Higher word

15 0
Real number data
D: Lower word
D+1: Higher word
● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.
● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

■ Operation example
Operation of instruction format description program

28-56 WUME-FPXHPGRG-021
28.28 F336 FABS (Floating Point Data Absolute Value Conversion)

● When the real number 1234.567 is stored in DT10 and DT11, the following operation will be
performed.

● When the real number -1234.567 is stored in DT10 and DT11, the following operation will be
performed.

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when non-real number data is specified in [S, S+1]
(ER)
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-57
28.29 F337 RAD (Degree to Radian Conversion)

28.29 F337 RAD (Degree to Radian Conversion)


Converts the unit of an angle from [degrees] to [radians].

■ Instruction format

■ Operands
Items Settings
S Area storing angle [degrees] data, or angle [degrees] (two words)
D Area (two word) to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The angle [degrees] specified by [S, S+1] is converted into an angle [radians] (real number
data), and the result is stored in [D, D+1].

15 0
Angle [degrees]
(Real number data) S: Lower word
S+1: Higher word

15 0
Angle [radians]
(Real number data) D: Lower word
D+1: Higher word

● If [S] is specified with an integer device, the operation occurs after the integer data is
internally converted to real numbers.
● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

■ Program example
When R0 turns ON, f0.7853981 is stored in DT20 and DT21.

28-58 WUME-FPXHPGRG-021
28.29 F337 RAD (Degree to Radian Conversion)

■ Flag operations
Name Description
R9007 Turns ON when the area is exceeded in index modification.
R9008
Turns ON when non-real number data is specified in [S, S+1]
(ER)
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-59
28.30 F338 DEG (Radian to Degree Conversion)

28.30 F338 DEG (Radian to Degree Conversion)


Converts the unit of an angle from radians to degrees.

■ Instruction format

■ Operands
Items Settings
S Area storing angle data (radians), or angle data (radians) (two words)
D Area (two words) to store the conversion result

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The angle data in radians (real number data) specified by [S, S+1] is converted to angle data
in degrees, and the result is stored in [D, D+1].

15 0
Angle [radians]
(Real number data) S: Lower word
S+1: Higher word

15 0
Angle [degrees]
(Real number data) D: Lower word
D+1: Higher word

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

28-60 WUME-FPXHPGRG-021
28.30 F338 DEG (Radian to Degree Conversion)

● If a K constant is specified for [S], the same process is performed as if an integer device was
specified.

■ Program example
When R0 turns to ON, f30.00000 is stored in DT20 and DT21.

■ Precautions for programming


When a constant is specified for [S], an integer device cannot be specified for [D].

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when non-real number data is specified in [S, S+1]
R9008
(ER) Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the calculation result is"0"
(=)

WUME-FPXHPGRG-021 28-61
(MEMO)

28-62 WUME-FPXHPGRG-021
29 Real Number Data
Processing Instructions
29.1 F345 FCMP (Floating Point Data Comparison) ................................29-2
29.2 F346 FWIN (Floating Point Data Band Comparison)........................29-4
29.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control)..........29-6
29.4 F348 FBAND (Floating Point Data Deadband Control) ....................29-8
29.5 F349 FZONE (Floating Point Data Zone Control).............................29-10
29.6 F354 FSCAL (Scaling of real number data)......................................29-12

WUME-FPXHPGRG-021 29-1
29.1 F345 FCMP (Floating Point Data Comparison)

29.1 F345 FCMP (Floating Point Data Comparison)


Compares real number data and outputs the judgment result to special internal relays.

■ Instruction format

■ Operands
Items Settings
S1 Area storing the real number data, or real number data (comparison data 1) (two words)
S2 Area storing the real number data, or real number data (comparison data 2) (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The real number data specified by [S1, S1+1] is compared with the real number data
specified by [S2, S2+1], and the judgment result is output to the special internal relay flags
(R9009 to R900C).
● The size relationship between [S1, S1+1] and [S2, S2+1] affects R9009 to R900C as follows.
Flag
Relationship between [S1,
R900A R900B R900C R9009
S1+1] and [S2, S2+1]
> = < Carry
[S1, S1+1]<[S2, S2+1] OFF OFF ON Indefinite
[S1, S1+1]=[S2, S2+1] OFF ON OFF OFF
[S1, S1+1]>[S2, S2+1] ON OFF OFF Indefinite

● If [S1] and [S2] are specified with an integer device, the operation occurs after the integer
data is internally converted to real numbers.
● If a K constant is specified for [S1] or [S2], the same processing is performed as when an
integer device is specified.

■ Flag operations
Name Description
R9007
Turns ON when the area is exceeded in index modification.
R9008

29-2 WUME-FPXHPGRG-021
29.1 F345 FCMP (Floating Point Data Comparison)

Name Description
(ER) Turns ON when non-real-number data is specified in [S1, S1+1] or [S2, S2+1]

WUME-FPXHPGRG-021 29-3
29.2 F346 FWIN (Floating Point Data Band Comparison)

29.2 F346 FWIN (Floating Point Data Band Comparison)


Compares real number data with a band and outputs the judgment result to special internal
relays.

■ Instruction format

■ Operands
Items Settings
S1 Comparison data: Area storing real number data, or real number data (two words)
S2 Lower limit data: Area storing real number data, or real number data (two words)
S3 Upper limit data: Area storing real number data, or real number data (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● A band comparison is performed on real number data.
The real number data specified by [S1, S1+1] is compared with the range specified by [S2,
S2+1] (lower limit value) and [S3, S3+1] (upper limit value) to determine whether it falls in
that range, and the comparison result is output to the special internal relays R9009 to R900C
(comparison instruction judgment flags).
● The relationship between [S1, S1+1], [S2, S2+1], and [S3, S3+1] affects R9009 to R900C as
follows.
×: Does not change.
Flag
Relationship between [S1,
S1+1], [S2, S2+1], [S3, R900A R900B R900C R9009
S3+1]
> = < Carry
[S1, S1+1] < [S2, S2+1] OFF OFF ON ×
[S2, S2+1] ≤ [S1, S1+1] OFF ON OFF ×
≤ [S3, S3+1]
[S3, S3+1] < [S1, S1+1] ON OFF OFF ×

29-4 WUME-FPXHPGRG-021
29.2 F346 FWIN (Floating Point Data Band Comparison)

● If [S1] to [S3] are specified with an integer device, the operation occurs after the integer data
is internally converted to real numbers.
● If a K constant is specified for [S1], [S2], or [S3], the same process is performed as if an
integer device was specified.

■ Flag operations
Name Description

R9007 Turns ON when the area is exceeded in index modification.


R9008 Turns ON when non-real-number data is specified in [S1, S1+1], [S2, S2+1] or [S3, S3+1]
(ER) Turns ON when [S2, S2+1] is greater than [S3, S3+1]

WUME-FPXHPGRG-021 29-5
29.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control)

29.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control)


Performs upper and lower limit control (real number data).

■ Instruction format

■ Operands
Items Settings
S1 Area storing the lower limit, or lower limit data (two words)
S2 Area storing the upper limit, or upper limit data (two words)
S3 Area storing the input value, or input value data (two words)
D Area storing the output value (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The output value (real number data) stored in the area specified by [D] is controlled
according to whether or not the input value (real number data) specified by [S3] falls within
the range bounded by the upper and lower limits (real number data) specified by [S1] and
[S2].
● The output value is determined based on the following conditions.
• If lower limit value [S1, S1+1] is greater than input value [S3, S3+1], then lower limit value
[S1, S1+1] becomes output value [D, D+1]
• If upper limit value [S2, S2+1] is less than input value [S3, S3+1], then upper limit value
[S2, S2+1] becomes output value [D, D+1]
• If lower limit value [S1, S1+1] is equal to or less than input value [S3, S3+1], which is
equal to or less than upper limit value [S2, S2+1], then input value [S3, S3+1] becomes
output value [D, D+1]

29-6 WUME-FPXHPGRG-021
29.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control)

Output value [D, D+1]

[S2, S2+1]

Input value
Upper limit value [S3, S3+1]
[S2, S2+1]

[S1, S1+1]

● If [S1] to [S3] are specified with an integer device, the operation occurs after the integer data
is internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S1], [S2], or [S3], the same process is performed as if an
integer device was specified.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real-number data is specified in [S1, S1+1], [S2, S2+1] or [S3, S3+1]
R9008 Turns ON when [S1, S1+1] is greater than [S2, S2+1]
(ER)
Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R900B
Turns ON when the operation result falls within the upper/lower limit range
(=)

WUME-FPXHPGRG-021 29-7
29.4 F348 FBAND (Floating Point Data Deadband Control)

29.4 F348 FBAND (Floating Point Data Deadband Control)


Performs dead-band control (real number data).

■ Instruction format

■ Operands
Items Settings
S1 Area storing the lower limit, or lower limit data (two words)
S2 Area storing the upper limit, or upper limit data (two words)
S3 Area storing the input value, or input value data (two words)
D Area storing the output value (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The output value (real number data) stored in the area specified by [D] is controlled
according to whether the input value (real number data) specified by [S3] is within the range
of the upper and lower limits (real number data) of the dead-band specified by [S1] and [S2].
● The output value is determined based on the following conditions.
• When the lower limit [S1, S1+1] > input value [S3, S3+1], the input value [S3, S3+1] - the
lower limit [S1, S1+1] becomes the output value [D, D+1]
• When the upper limit [S2, S2+1] < input value [S3, S3+1], the input value [S3, S3+1] - the
upper limit [S2, S2+1] becomes the output value [D, D+1]
• When the lower limit [S1, S1+1] ≤ input value [S3, S3+1] ≤ the upper limit [S2, S2+1], 0.0
becomes the output value [D, D+1]

29-8 WUME-FPXHPGRG-021
29.4 F348 FBAND (Floating Point Data Deadband Control)

Output value [D, D+1]

Deadband lower limit


[S1, S1+1]
Input value
0 [S3, S3+1]
Deadband upper limit
[S2, S2+1]

During this period, 0.0 is output.

● If [S1] to [S3] are specified with an integer device, the operation occurs after the integer data
is internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S1], [S2], or [S3], the same process is performed as if an
integer device was specified.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007 Turns ON when non-real-number data is specified in [S1, S1+1], [S2, S2+1] or [S3, S3+1]
R9008 Turns ON when [S1, S1+1] is greater than [S2, S2+1]
(ER)
Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the operation result falls within the upper/lower limit range
(=)

WUME-FPXHPGRG-021 29-9
29.5 F349 FZONE (Floating Point Data Zone Control)

29.5 F349 FZONE (Floating Point Data Zone Control)


Performs zone control (real number data).

■ Instruction format

■ Operands
Items Settings
S1 Area storing negative bias values, or negative bias value data (two words)
S2 Area storing positive bias values, or positive bias value data (two words)
S3 Area storing the input value, or input value data (two words)
D Area storing the output value (two words)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The bias value specified in [S1] or [S2] is added to the input value (real number data)
specified in [S3], and the result is stored in the area specified in [D].
● The output value is determined based on the following conditions.
• When the input value [S3, S3+1] is less than 0.0, the input value [S3, S3+1] + the negative
bias value [S1, S1+1] is the output value [D, D+1]
• When the input value [S3, S3+1] is equal to 0.0, 0.0 is the output value [D, D+1]
• When the input value [S3, S3+1] is more than 0.0, the input value [S3, S3+1] + the
positive bias value [S2, S2+1] is the output value [D, D+1]

29-10 WUME-FPXHPGRG-021
29.5 F349 FZONE (Floating Point Data Zone Control)

Output value [D, D+1]

[S2, S2+1]

Input value
0 [S3, S3+1]
Bias value for negative case
[S1, S1+1]

● If [S1] to [S3] are specified with an integer device, the operation occurs after the integer data
is internally converted to real numbers.

● If [D] is specified with an integer device, the real number is converted to integer data and
stored.

● If a K constant is specified for [S1], [S2], or [S3], the same process is performed as if an
integer device was specified.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
R9007
Turns ON when non-real-number data is specified in [S1, S1+1], [S2, S2+1] or [S3, S3+1]
R9008
(ER) Turns ON when the operation result exceeds the integer range when an integer device is
specified in [D, D+1]
R9009
Turns ON when operation result overflows
(CY)
R900B
Turns ON when the input value is"0"
(=)

WUME-FPXHPGRG-021 29-11
29.6 F354 FSCAL (Scaling of real number data)

29.6 F354 FSCAL (Scaling of real number data)


Performs scaling (linearization) using a real number data table and calculates the output (Y) for
the input value (X).

■ Instruction format

■ Operands
Items Settings
S1 Real value or area representing the input value (X)
S2 Starting area of data table used for scaling
D Area storing output value (Y)

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● The input real value [S1] is scaled (linearized) according to the real number data table
specified by [S2], and the output value is stored in [D].
● The section corresponding to the input value [S1] is searched from the table specified by
[S2], the linear interpolation between these two points is calculated, and the output value is
obtained.
When the specified input value is outside the registration range in the table, the start point
(x0) or end point (xn) is stored for the output value (Y0 or Yn).
[S1] ≤ x0 [D] ← y0
[S1] ≥ xn [D] ← yn

■ Operation example
Operation of instruction format description program
The output value Y for the input value stored in DT0 is obtained by referring to the data table
starting from DT10, and the result is stored in DT100.

29-12 WUME-FPXHPGRG-021
29.6 F354 FSCAL (Scaling of real number data)

Registration point
S2: count (m←n+1)
DT10

S2+1: x0 DT11

S2+2: (Real number value) DT12

S2+3: x1 DT13

S2+4: (Real number value) DT14

S2+2n+1: xn DT29

S2+2n+2: (Real number value) DT30

S2+2n+3: y0 DT31

S2+2n+4: (Real number value) DT32

S2+2n+5: y1 DT33

S2+2n+6: (Real number value) DT34

S2+4n+3: yn DT49
S2+4n+4: (Real number value) DT50

Output value (Y)

Yn-1
yn-2
yn

Y=[D]

Y2
y1 X=[S1]
y0

Input value (X)


X0 X1 X2 Xn-2 Xn-1 Xn
● The data table [S2] used for scaling must have two or more sections registered. In addition,
the points must be registered in order from the smallest number on the X axis to the largest
number.
2 ≤ Number of registered points (m) ≤ 99 [Number of registered points (m) = n + 1]
xt - 1 < xt (1 ≤ t ≤ n)
● When the distance between two points on the data table is very large, an operation error will
occur.

WUME-FPXHPGRG-021 29-13
29.6 F354 FSCAL (Scaling of real number data)

(This occurs when the distance between two points cannot be represented by a real
number.)
e.g.
First point: (x0, y0) = (HFF000000, HFF000000) = (-1.7*1034, -1.7*1034)
Second point: (x1,y1) = (H7F000000, H7F000000) = (+1.7*1034, +1.7*1034)
● The measurement error of the output result is proportional to the distance between two
points of the data table.
● When an integer device is specified for the input value [S1], scaling is performed after
converting it to a real value.
● When an integer device is specified for the output value [S2], the output result is converted to
an integer value and stored.

■ Flag operations
Name Description
Turns ON when the area is exceeded in index modification.
Turns ON when a non-real value is entered in [S1]
Turns ON when m < 2 or m > 99 in the registered points of [S2]
R9007 Turns ON when a non-real value is specified for the real value (xt, yt) specified in [S2]
R9008 Turns ON when the data table of [S2] is not registered in ascending order of the X axis
(ER)
Turns ON when data table in [S2] exceeds area
Turns ON when an overflow (calculation not possible) occurs in the scaling calculation
Turns ON when the output result exceeds the integer range when an integer device is
specified in [D]

29-14 WUME-FPXHPGRG-021
30 Process Control Instructions
30.1 F355 PID (PID Operation).................................................................30-2
30.2 F356 EZPID (PID Operation: PWM Output Possible).......................30-9

WUME-FPXHPGRG-021 30-1
30.1 F355 PID (PID Operation)

30.1 F355 PID (PID Operation)


PID operation is performed.

■ Instruction format

■ Operands
Items Settings
S Starting number of parameter area (30 word) for PID operation

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S ●

■ Outline of operation
● PID operation is performed to match and hold the measurement value [S+2] at the setting
value [S+1], and the result is output to [S+3].
● Derivative priority type or proportional-derivative priority type can be selected for PID
operation.
● Set the coefficients (proportional gain, integral time, derivative time) used for PID operation
and the operation type/interval in the parameter table. PID operation will be performed
according to the specified content.

■ Types of PID operation


(1) Reverse operation / Forward operation
The vertical direction of output when there is a change to the process can be selected.
● Specify"Reverse operation"if increasing the output when the measured value falls. (Heating,
etc.)
● Specify"Forward operation"if decreasing the output when the measured value rises. (Cooling,
etc.)
(2) Derivative priority type PID / Proportional-derivative priority type PID
● In general, with"Derivative priority type PID control", there is increased fluctuation in the
output when the set value changes, but convergence is faster.
● In general, with"Proportional-derivative priority type PID control", there is less output
fluctuation when the set value changes, but convergence is slower.

30-2 WUME-FPXHPGRG-021
30.1 F355 PID (PID Operation)

■ Parameter table settings

[S] Control mode


[S+1] Set point value (SP)
[S+2] Measured process value (PV)
[S+3] Output value (MV)
[S+4] Output lower limit
[S+5] Output upper limit
[S+6] Proportional gain (Kp)
[S+7] Integral time (Ti)
[S+8] Derivative time (Td)
[S+9] Control interval (Ts)
[S+10] Auto-tuning progress status
[S+11]

Work area for PID operation

[S+29]

■ Description of each parameter


(1) Control mode [S]
Specify the PID operation type and auto-tuning with H constants.
[S] value
Control mode
When not executing auto-tuning When executing auto-tuning
Reverse H0 H8000
Derivative type
Forward H1 H8001

Proportional- Reverse H2 H8002


derivative type Forward H3 H8003

● Auto-tuning
The optimal values for the PID parameters Kp, Ti, and Td are measured by measuring the
process response.
When auto-tuning is executed, the estimated results are reflected in the parameter area after
auto-tuning is complete. (Depending on the process, execution of auto-tuning may not be
possible. In such cases, the process will return to the original parameter operation.)
For precautions regarding the execution of auto-tuning, please refer to"P.30-5".
● Reverse operation, forward operation
The vertical direction of output when there is a change to the process is determined.
Reverse The output is increased if the measured value of the process falls. (e.g. heating)
Forward The output is increased if the measured value of the process rises. (e.g. cooling)

WUME-FPXHPGRG-021 30-3
30.1 F355 PID (PID Operation)

● Derivative priority type, proportional-derivative priority type PID


There is a change in output when the setting value is changed.
Derivative type Generally, there is significant fluctuation when the setting value is changed, but
convergence is fast.
Proportional- Generally, there is less fluctuation when the setting value is changed, but
derivative type convergence is slow.

(2) Set value (SP) [S+1]


Set the target value for the process control within the following range.
K0 to K10000
(3) Measured value (PV) [S+2]
Use an A/D conversion unit, etc., to input the current value of process control. Make sure it is
within the following range.
K0 to K10000
(4) Output value (MV) [S+3]
The value from PID processing is stored. Use a D/A conversion unit, etc., to output to the
process.
K0 to K10000
(5) Output lower limit [S+4]
K0 to K9999 (< upper limit)
(6) Output upper limit [S+5]
K1 to K10000 (> lower limit)
Specify the output value (MV) range. Values for the specified range are output.
Make sure that 0 ≤ output lower limit < output upper limit ≤ 10000.
(7) Proportional gain (Kp) [S+6]
Specify the coefficient used for PID operation.
The setting value × 0.1 is the actual proportional gain.
The setting value range is K1 to K9999 (0.1 to 999.9, specified in units of 0.1).
If auto-tuning is specified in the operation mode specifications, the setting value is automatically
adjusted and rewritten.
(8) Integral time (Ti) [S+7]
Specify the coefficient used for PID operation.
Actual integral time is set point value × 0.1.
The setting value range is K1 to K30000 (0.1 to 3000 seconds, specified in units of 0.1 second).
If 0 is specified, integration will not be executed.
If auto-tuning is specified in the operation mode specifications, the setting value is automatically
adjusted and rewritten.
(9) Derivative time (Td) [S+8]
Specify the coefficient used for PID operation.
Actual derivative time is set point value × 0.1.
The setting value range is K0 to K10000 (0 to 1000 seconds, specified in units of 0.1 second).
If auto-tuning is specified in the operation mode specifications, the setting value is automatically
adjusted and rewritten.
(10) Control interval (Ts) [S+9]
Specify the interval for executing the PID operation. The setting value × 0.01 is the actual
control interval.

30-4 WUME-FPXHPGRG-021
30.1 F355 PID (PID Operation)

The setting value range is K1 to K6000 (0.01 to 60.0 seconds, specified in units of 0.01
second).
(11) Auto-tuning progress status [S+10]
When auto-tuning is specified in the operation mode, the degree of progress of auto-tuning is
displayed. The values of K1 to K5 are stored according to the progress status from the default
value [0], and are returned to the default value after auto-tuning is completed.
(12) Work area for PID operation [S+11] to [S+29]
The work area used by the system that is required for operations.

■ Precautions when executing auto-tuning


Note the following points if"Auto-tuning Execution"is set in the parameter table (control mode
[S]).
● After auto-tuning is complete, the area of control mode [S] is automatically rewritten from
H8000 to H8003, to H0 to H3. Make sure that it is not rewritten again by the program, etc.
● After auto-tuning is complete, the optimal values for proportional gain [Kp], integral time [Ti],
and derivative time [Td] are stored, but it is necessary to specify appropriate values within
the setting range (for example, the lower limit) before execution.
● After auto-tuning is complete, the optimal values for proportional gain [Kp], integral time [Ti],
and derivative time [Td] are stored. Be careful that the stored values are not rewritten.
● The optimal values for Kp, Ti, and Td are calculated by auto-tuning determining the set point
value (SP) by measuring the change of the measured value (PV) when the output value (MV)
is set to the upper limit, causing the measured value (PV) to fluctuate, and then measuring
the change of the measured value (PV) when the output value (MV) is set to the lower limit.
● The change of the output value (MV) for auto-tuning is completed after a minimum of 3
changes: upper limit output -> lower limit output -> upper limit output. If the auto-tuning
progress status is still at 0 after several changes, shorten the control synchronization Ts and
execute auto-tuning again.

■ Precautions for programming


● Including the work area for operation, a 30 word area is required for the parameter table.
Take care that the values in this area are not rewritten by other instructions.
● Even if the parameter table exceeds the area, an error will not be detected. When specifying
[S], specify a number that is within a minimum of 30 words from the last number.
● Take care that the area is not exceeded by index modification. Even if the area is exceeded,
an error will not be detected.
● Use an A/D conversion unit, etc., to input the current value of the measured value [S+2].
● Use a D/A conversion unit, etc., to output the result of PID processing [S+3} to the process.
● If two or more PID instructions specifying the same table are included in the program, it may
not operate correctly.

<Example>

WUME-FPXHPGRG-021 30-5
30.1 F355 PID (PID Operation)

(Reason) This is because the F355 PID instruction operates internally using the specified
table, even when the execution condition is not met.
In such cases, set the tables to separate addresses.

● See the following operational expressions regarding PID operation.

■ Outline of operation of PID control


PID control is a feedback control method widely used in the instrumentation field to control
process quantities such as temperature, pressure, flow rate, and fluid levels.
(1) Proportional operation
Control operation that produces an output proportional to the size of the input

Set value signal SV + Deviation e


Kp Output MV
-
Measured signal PV

A constant control quantity is maintained.


An offset (regular deviation) remains.
The larger the Kp value, the stronger the action of the proportional operation.
(2) Integral operation
Control operation that produces an output proportional to the integral time of the input.

Set value signal SV + Deviation e


Integrate Output mi
-
Measured signal PV

mi=1/Ti∫edt

30-6 WUME-FPXHPGRG-021
30.1 F355 PID (PID Operation)

The resulting offset is removed by combining with proportional operation or proportional-


derivative operation.
The smaller the Ti value, the stronger the action of the integral operation.
(3) Derivative operation
Control operation that produces an output proportional to the time derivative value of the input.

Set value signal SV + Deviation e


Differentiate Output mD
-
Measured signal PV
mD=TD ・ de
dt

The advancing property of derivative operation reduces the negative effects that the delaying
property of the process has on control.
The larger the Td value, the stronger the action of the derivative operation.
Pure derivative operation becomes temporarily inoperative if noise, etc., is input. This has a
negative effect on the controlled process, so incomplete derivative operation is executed.

(4) PID operation


A combination of proportional, integral, and derivative operation is called PID operation.

WUME-FPXHPGRG-021 30-7
30.1 F355 PID (PID Operation)

+
Set value signal SV + Deviation e +
Integrate Kp Output MV
- +

Differentiate
Measured signal PV

If the parameters in PID control are set to their optimal values, the control quantity can be
quickly matched to the target value and maintained.

■ Flag operations
Name Description
R9007 Turns ON when the parameter setting value is out of range
R9008
Turns ON when the area is exceeded in index modification.
(ER)

30-8 WUME-FPXHPGRG-021
30.2 F356 EZPID (PID Operation: PWM Output Possible)

30.2 F356 EZPID (PID Operation: PWM Output Possible)


Temperature control (PID) can be easily performed using the image of a temperature controller.

■ Instruction format

■ Operands
Items Settings
S1 Control data
S2 Measured process value (PV)
S3 Starting No. of area storing PID control parameters
S4 Starting No. of calculation work area

■ Devices that can be specified (indicated by ●)

Operand SW SD ConstantIndex Integer


WX WY WR WL SV EV DT LD I
s R T K H M f modifier Device

S1 ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ●
S4 ● ● ● ● ● ● ●

■ Outline of operation
● PID processing is performed to hold the measured process value (PV) at the set point value
(SP).
Writing the OUT instruction immediately after this instruction enables the PWM output (ON-
OFF output) similar to a temperature controller.
An auto-tuning function is also available to calculate the PID control parameters
automatically.
It can also be used with analog output as it outputs numerical values as well as PWM output.

■ General explanation of the memory areas used


S1 Starts auto-tuning of the control data (one word) and reports its completion.
Specifying a non-hold type area (e.g. WR) is recommended to allow operation on a per-bit basis.
When bit 0 is 1 Auto-tuning request. This instruction resets the bit if auto-tuning is completed.
Reset this bit to cancel auto-tuning.
When bit 0 is 0 PID control
Bit 1 When auto-tuning has completed successfully, 1 is set.

WUME-FPXHPGRG-021 30-9
30.2 F356 EZPID (PID Operation: PWM Output Possible)

Bit 2 Turn this bit ON to hold the output MV (S4) when the execution condition of this
instruction changes from OFF to ON. When this bit is OFF, MV is cleared.
When bit 3 is 0 Specifies PWM output
When bit 3 is 1 Specifies analog output
When bit 4 is 0 The maximum value and minimum value of the internal output are +20% and -20%
of the output range (output upper limit value - output lower limit value) respectively.
When bit 4 is 1 The maximum value and minimum value of the internal output are the output upper
limit value and output lower limit value respectively.
*The output lower limit value is specified by S4+1, and the output upper limit value
is specified by S4+2.
Bits 5 to F Reserved bits. Normally use 0.
S2 Area storing the measured process value (PV) (one word)
The input WXn of a temperature input unit can be directly specified.
Effective range: K-30000 to K+30000
S3 Area to specify the target value (SP) and control parameters. (Four words)
It is recommended that this area is allocated to hold-type operation memory.
S3 Stores the set point value (SP).
Must be set from the instruction or a display.
Setting range: K-30000 to K+30000
S3+1 Stores the proportional gain (KP).
Actual gain is set point value × 0.1.
Automatically set after auto-tuning is completed.
Setting range: K1 to K9999 (0.1 to 999.9)
S3+2 Stores the integral time (TI)
Actual integral time is set point value × 0.1.
Automatically set after auto-tuning is completed.
Setting range: K0 to K30000 (0 to 3000 s)
S3+3 Stores the derivative time (TD).
Actual derivative time is set point value × 0.1.
Automatically set after auto-tuning is completed.
Setting range: K0 to K10000 (0 to 1000 s)
S4 Divided into output (MV), specified area of control mode, auto-tuning related area, and operation work
area.
The area in the range of S4 to S4+29 is necessary for the instruction. (See below for details.)
It is recommended to allocate it in the non-hold area. Also, do not use the data in this area for other
purposes.

■ Easy usage
<PWM output in reverse operation (heating)>

30-10 WUME-FPXHPGRG-021
30.2 F356 EZPID (PID Operation: PWM Output Possible)

● Specify the set point value (SP) with the instruction or a display before the operation.
● If auto-tuning is requested with a device such as a display, the above auto-tuning request
program is not necessary.
● Work areas DT100 to DT129 return to the default value when R1 turns on. (However, only
DT100 (MV) can be held.)
● The control conditions are as follows: operation cycle 1 s, derivative-type reverse operation
(heating), PWM resolution = 1000.
● PID control starts from the next scan, and PWM output is executed for Y0.
● Program as described above to start auto-tuning with the instruction, and turn ON R1 after
turning ON R0.
● When auto-tuning has completed successfully, R11 turns ON and KP, TI, and TD are set.
● After that, if R1 is ON continuously, it will change to PID control automatically, and PWM
output will be executed for Y0.

● If execution condition R1 has turned OFF during PID control, PWM output Y0 also turns OFF.
However, the output manipulated value MV is held.

■ When changing control conditions


● The area S4+1 to S4+9 must be changed to change control conditions. Change it before the
second execution of the F356 EZPID instruction.
<Details of S4>
S4: Divided into output (MV), specified area of control mode, auto-tuning related area, and
operation work area. It is recommended to allocate it in the non-hold area. Also, do not use the
data in this area for other purposes.

Output (MV) and control mode area (Used with the normal default values.)
Memory Function Default Range:
S4 The output manipulated value (MV) of the calculation result is K0 K-10000 to K10000
stored
S4+1 Specify the lower limit of the output manipulated value (MV) K0 Minimum K-10000
S4+2 Specify the upper limit of the manipulated value (MV) K10000 Maximum K+10000
S4+3 Specify the 100% output band (range where PID control is not K0 K0 to K80 (%)
performed)
S4+4 Specify the control cycle (TS). Setting unit = 10 ms, default K100 K1 to K3000
value = 1 s (0.01 to 30 s)
S4+5 Specify the control mode (see table below) K0 K0 to K3

Control mode Value Example


Derivative type Reverse K0 Heating
Forward K1 Cooling
Proportional-derivative Reverse K2 Heating
type
Forward K3 Cooling

Reverse operation and forward operation


Reverse operation: If the measured process value drops, the
output is increased (example: heating)

WUME-FPXHPGRG-021 30-11
30.2 F356 EZPID (PID Operation: PWM Output Possible)

Memory Function Default Range:


Forward operation: If the measured process value increases,
the output is increased (example: cooling)
Derivative-type and proportional-derivative type
Derivative type: Approaches the set point value faster, but is
more likely to overshoot.
Proportional-derivative type: Approaches the set point value
slower, but is less likely to overshoot.

Auto-tuning related area (Used with the normal default values.)


Memory Function Default Range:
S4+6 Specify the bias value for performing auto-tuning. K0 From K0
S4+7 Specify the correction data (a1) of the auto-tuning result K125 K50 to K500%
(KP).
S4+8 Specify the correction data (a2) of the auto-tuning result K200 K50 to K500%
(TI).
S4+9 Specify the correction data (a3) of the auto-tuning result K100 K50 to K500%
(TD).
S4+10 Stores the status while auto-tuning is being performed. K0 K0 to K5

Operation work area


Memory Function Default Range:
S4+11 The area up to S4+29 is the work area for the PID and 0
to S4+29 auto-tuning operations.

(Note 1) The default value is written when the execution condition turns on.
The output manipulated value (MV) is output only within the range of the upper limit value and lower
limit value.
Configure the settings so that -10000 ≤ lower limit value < upper limit value ≤ 10000.

■ How to output PWM


● The PWM output cycle is determined by the value set for S4+4. The default value is a cycle
of 1 s. The PWM duty cycle is determined by what percentage of K0 to K10000 is comprised
of the output MV (S4).
● When either the lower or upper limit value of output MV, specified by S4+1 and S4+2, is a
negative value, the PMW output is always OFF.
● The PWM output is always OFF when the output MV is K0, and it is always ON when the
output MV is K10000.

■ Explanation of specific usage


1. Only changing control mode with PWM output
● Change the content of the control mode (S4+5) to K1 to K3, using an instruction such as F0
MV.

30-12 WUME-FPXHPGRG-021
30.2 F356 EZPID (PID Operation: PWM Output Possible)

Example: Change the control mode from the default = derivative type to the
proportional-derivative type.

2. Using an analog output unit for output


1. Set the analog output flag (bit 3 of S1) to 1.
2. Set the output lower limit value (S4+1) and the output upper limit value (S4+2) according to
the output range of the analog output unit.
e.g. <Lower limit value=K0, upper limit value=K2000>, <lower limit value=K0, upper
limit value=K4000>
3. Control cycle (TS): Change the value of (S4+4) according to the input update cycle of the
temperature input unit (normally 0.1 s or more)
e.g. TS=K10 (100 ms)
4. Change the control mode if necessary.
5. Transmit the output manipulated value (MV) to WY on the analog output unit.

● When analog output is used for the output, it is not necessary to write an OUT instruction
immediately after this instruction.
Also, when using analog output, PWM output is fixed to OFF.

Example: Control with the output upper limit value (S4+2) set to K4000 and the
control cycle (S4+4) set to 10 s

WUME-FPXHPGRG-021 30-13
30.2 F356 EZPID (PID Operation: PWM Output Possible)

■ More details on setting methods


1. Setting the 100% output band (S4+3)
The 100% output band specifies the percentage of the set value for the measured process
value (PV) to be above when PID control is started.
100% output is performed in the area up to the specified process value.
If the measured process value (PV) is less than the set point value (SP) × this setting, it has the
effect of shortening the time to reach the set point value (SP), during which 100% output is
performed.
For example, if this setting is set to K80, 100% output is performed up to 80% of the set point
value (SP), and PID control starts from there.
If this setting has K0=the default value, PID control is performed from the beginning.
2. Fine adjustment of auto-tuning
1. Correction of auto-tuning results (S4+7, S4+8, and S4+9)
When auto-tuning has completed, the parameters KP, TI, and TD are stored in (S3+1,
S3+2, and S3+3). The result can be corrected with these parameters at this time.
e.g. To correct KP to 2 times its value, set S4+7 to K200 (meaning 200%) and perform
auto-tuning.
To correct TI to 1.25 times its value, set S4+8 to K125 (meaning 125%) and perform auto-
tuning.
To correct TD to 0.75 times its value, set S4+9 to K75 (meaning 75%) and perform auto-
tuning.
2. Auto-tuning bias value (S4+6)
Auto-tuning is executed with the set point value (SP’) as [set point value (SP) - auto-tuning
bias value].
This is used to control excessive temperature rise while auto-tuning is performed.
For the forward operation, auto-tuning is executed with the value set to [set point value (SP)
+ this set value].

30-14 WUME-FPXHPGRG-021
30.2 F356 EZPID (PID Operation: PWM Output Possible)

Temperature

Auto-tuning bias value

(SP’) Auto-tuning during reverse operation

Time

Auto-tuning in progress PID control


KP/TI/TD calculation

Temperature

(SP’) Auto-tuning during forward operation

Auto-tuning bias value

Time

Auto-tuning in progress PID control


KP/TI/TD calculation
(Note 1) Even if auto-tuning is started when the measured process value (PV) is close to the set point value
(SP), auto-tuning is performed with the above SP’.

■ Precautions for programming


● When the execution condition turns on, the area S4 to S4+29 is initialized.
If the values are set to non-default values, write using the always-ON relay R9010 as the
execution condition, with an instruction such as the F0 MV instruction.
● The PID operation instruction always calculates the operation cycle and PWM output timing
internally, so be sure to perform only one operation during a single scan. Additionally, do not
attempt to execute it during a subroutine or interrupt program. This instruction cannot be
written more than once with the same operand specified.
● Do not turn OFF the execution condition during PID processing. Otherwise, PID processing
will be disabled.
● If you do not want to synchronize the PWM output cycle for controlling multiple objects, you
can delay the startup timing, for example by adjusting the startup condition rise time.
● After executing this instruction, the execution conditions will change. This means that
subsequent instructions will not work correctly in the program shown below.

WUME-FPXHPGRG-021 30-15
30.2 F356 EZPID (PID Operation: PWM Output Possible)

R1 Y0
F356 EZPID WR1 WX2 DT32710 DT100

Incorrect

F0 MV K0 DT100

R1 Y0
F356 EZPID WR1 WX2 DT32710 DT100

Correct It is the same even without this OT Y0 instruction.


R1
F0 MV K0 DT100

■ Conditions when operation errors occur


● When the following parameters are out of the setting range: S2: measured process value
(PV), S3: set point value (SP), S3+1: KP, S3+2: TI, S3+3: TD, S4+1 to S4+9
● When the area specified by S3 or S4 exceeds the upper limit of the specified operation
device

■ Internal operation specifications


● When the execution condition turns on, the operation work is initialized.
● If the parameters KP, TI, and TD are all 0 when PID operation starts, they are initialized at 1,
0, and 0 respectively, and the operation is continued.
● At the rising edge of the AT signal, the AT successful completion flag and AT completion
code are cleared.
● The AT set value operates with <set point value (SP) - bias value> as the target value. The
default bias value is 0.
● When AT successfully completes, it stores the result obtained by multiplying the calculation
results KP, TI, and TD by correction data a1, a2, and a3. The default value is 100%.
● When AT successfully completes, the AT successful completion flag is set, and the AT
completion code is stored in AT step.
● If AT terminates abnormally, the parameters KP, TI, and TD are unchanged.
● PWM output is output at the duty cycle when the MV output range is 0 to 10000.
● For analog output (when bit 3 of S1 is 1), the internal calculated value is output in the range
0 to 10000 and converted to the specified range.
● Conversion formula: (upper limit value - lower limit value) × internal calculated value / 10000
+ lower limit value
e.g. When upper limit value = 40000, lower limit value = 0, and internal calculated value =
5000: output manipulated value MV = 2000

■ Precautions when using MV holding function


● When using the MV holding function, use the default upper and lower limit values.

30-16 WUME-FPXHPGRG-021
31 Positioning Control
Instructions (Table Setting
Mode)
31.1 [F380 POSST] Positioning Table Start Instruction ............................31-2
31.2 [F381 JOGST] JOG Operation Start Instruction ...............................31-4
31.3 [F382 ORGST] Home Return Start Instruction .................................31-6
31.4 [F383 MPOST] Positioning Table Simultaneous Start Instruction.....31-8
31.5 [F384 PTBLR] Positioning Parameter Read Instruction ...................31-10
31.6 [F385 PTBLW] Positioning Parameter Write Instruction ...................31-12

WUME-FPXHPGRG-021 31-1
31.1 [F380 POSST] Positioning Table Start Instruction

31.1 [F380 POSST] Positioning Table Start Instruction


Starts the positioning operation according to the data specified in the positioning memory
(positioning table area). This instruction is used to start the E-point control, P-point control, C-
point control, J-point control or linear interpolation control.

■ Instruction format

■ Operand
Operand Settings Setting range
Channel number to start the positioning operation (Unsigned 16-
S1 0 to 5
bit integer)
S2 Table number to start (Unsigned 16-bit integer) 1 to 20
0 (Pulse output), 1
S3 Output assignment
(Calculation only)

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
S3 ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Starts the positioning operation according to the data specified in the positioning memory
(positioning table area).
● When Calculation only is specified for [S3], only the table calculation is executed. When
starting the positioning operation for the same channel and the same table from the next
scan after executing the calculation, the startup time of the positioning control is reduced.

■ Precautions during programming


● If an operand is an out-of-range value, an operation error occurs.
● The stop operation has priority when the conditions of system stop, emergency stop, limit
stop and deceleration stop are satisfied.
● An operation error occurs when the system register of a specified channel is other than
“Pulse output [Table setting mode]”.
● A self-diagnostic error (positioning operation error) occurs when the set value or the value of
the positioning memory (axis setting area) is abnormal.

31-2 WUME-FPXHPGRG-021
31.1 [F380 POSST] Positioning Table Start Instruction

● When the channel to be started has been already operating, the positioning control does not
start and it terminates.

■ Flag operations
Name Description
When the area is exceeded at the time of index modification

R9007 When the [S1] value is outside the set range


R9008 When the [S2] value is outside the set range
(ER) When the [S3] value is outside the set range
When the pulse output (table operation) has not been set in the system register

WUME-FPXHPGRG-021 31-3
31.2 [F381 JOGST] JOG Operation Start Instruction

31.2 [F381 JOGST] JOG Operation Start Instruction


Starts the JOG operation according to the parameters specified in the positioning memory (axis
setting area).

■ Instruction format

■ Operand
Operand Settings Setting range
Channel number to start the JOG operation (Unsigned 16-bit
S1 0 to 5
integer)
S2 Operating direction (Unsigned 16-bit integer) 0 (Forward), 1 (Reverse)

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Executes the JOG operation according to the JOG operation parameters specified in the
positioning memory (axis setting area). While the execution condition is valid, the JOG
operation continues.
● The target speed can be changed by rewriting the positioning parameter area with a user
program. The change is executed after it becomes a constant speed.

■ Precautions during programming


● If an operand is an out-of-range value, an operation error occurs.
● The stop operation has priority when the conditions of system stop, emergency stop, limit
stop and deceleration stop are satisfied.
● An operation error occurs when the system register of a specified channel is other than
“Pulse output [Table setting mode]”.
● A self-diagnostic error (positioning operation error) occurs when the set value or the value of
the positioning memory (axis setting area) is abnormal.
● The JOG operation needs to be stopped for switching between the forward rotation and
reverse rotation.
● In case of changing a speed, when the target speed after the change is an out-of-range
value, the speed change is not executed and the operation continues.

31-4 WUME-FPXHPGRG-021
31.2 [F381 JOGST] JOG Operation Start Instruction

■ Flag operations
Name Description
When the area is exceeded at the time of index modification
R9007
When the [S1] value is outside the set range
R9008
When the [S2] value is outside the set range
(ER)
When the pulse output (table operation) has not been set in the system register

WUME-FPXHPGRG-021 31-5
31.3 [F382 ORGST] Home Return Start Instruction

31.3 [F382 ORGST] Home Return Start Instruction


Starts the home return operation according to the parameters specified in the positioning
memory (axis setting area).

■ Instruction format

■ Operand
Operand Settings Setting range
S Channel number to start the home return (Unsigned 16-bit integer) 0 to 5

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Starts the home return operation according to the home return parameters specified in the
positioning memory (axis setting area).

■ Precautions during programming


● If an operand is an out-of-range value, an operation error occurs.
● The stop operation has priority when the conditions of system stop, emergency stop, limit
stop and deceleration stop are satisfied.
● An operation error occurs when the system register of a specified channel is other than
“Pulse output [Table setting mode]”.
● An operation error occurs when the home return pattern is set to either "DOG method 1",
"DOG method 3", or "Home position method" unless the home input is set in the system
register.
● The home return operation is started when the home return pattern is set to either "DOG
method 2" or "Data set method" even if the home input is not set.
● A self-diagnostic error (positioning operation error) occurs when the set value or the value of
the positioning memory (axis setting area) is abnormal.

■ Flag operations
Name Description
R9007 When the area is exceeded at the time of index modification
R9008
When the [S] value is outside the set range
(ER)

31-6 WUME-FPXHPGRG-021
31.3 [F382 ORGST] Home Return Start Instruction

Name Description
When the pulse output (table operation) has not been set in the system register

WUME-FPXHPGRG-021 31-7
31.4 [F383 MPOST] Positioning Table Simultaneous Start Instruction

31.4 [F383 MPOST] Positioning Table Simultaneous Start Instruction


Starts the positioning tables for multiple axes specified on Configurator PMX. The tables of the
E-point control, P-point control and C-point control can be started.

■ Instruction format

■ Operand
Operand Settings
The starting area of the data register storing the data table numbers (unsigned 16-bit integer) to
S
be started simultaneously

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S - - - - - - ● - - - - ●

■ Outline of operation
● Starts the positioning table numbers of the channels specified in the area starting with [S]
simultaneously.
● Positioning tables that can be specified are those for the single-axis control only.
● Table numbers are specified in the range of 0 to 20. In the case of 0, the table is not
executed simultaneously with other tables.
S Output specification (0: Pulse output, 1: Calculation only)
S+1 CH0 Positioning table number (0 to 20)
S+2 CH1 Positioning table number (0 to 20)
S+3 CH2 Positioning table number (0 to 20)
S+4 CH3 Positioning table number (0 to 20)
S+5 CH4 Positioning table number (0 to 20)
S+6 CH5 Positioning table number (0 to 20)

■ Precautions during programming


● If an operand is an out-of-range value, an operation error occurs.
● The stop operation has priority when the conditions of system stop, emergency stop, limit
stop and deceleration stop are satisfied.
● An operation error occurs when the system register of a specified channel is other than
“Pulse output [Table setting mode]”.

31-8 WUME-FPXHPGRG-021
31.4 [F383 MPOST] Positioning Table Simultaneous Start Instruction

● Only when all the specified channels can be started, they are executed simultaneously.
When the BUSY flag of any channel is on, tables are not started simultaneously and the
process is terminated.
● Use F380 POSST instruction to start linear interpolation. When the table of the interpolation
axis control has been specified with F383 MPOST instruction, a self-diagnostic error
(positioning operation error) occurs.

■ Flag operations
Name Description
When the area is exceeded at the time of index modification
R9007
When the [S] data table exceeds the area
R9008
When the [S] value is outside the set range
(ER)
When the pulse output (table operation) has not been set in the system register

WUME-FPXHPGRG-021 31-9
31.5 [F384 PTBLR] Positioning Parameter Read Instruction

31.5 [F384 PTBLR] Positioning Parameter Read Instruction


Reads the positioning parameter data stored in the positioning memory of the unit to the
operation memory area.

■ Instruction format

■ Operand
Operand Settings
Specification of channel numbers and positioning memory area
(Higher 8 bits) channel no.: H0 to H5
S1
H00 (Common area), H01 (Axis information area), H02 (Axis
(Lower 8 bits) Area no.:
setting area), H03 (Positioning table area)
Starting address of the positioning memory storing read data (offset address)
S2
or operation memory area storing the starting address
n No. of read words
D Operation memory storing read data

(Note 1) When reading the common area, the setting of channel numbers is invalid.
(Note 2) The operand S1 is specified using a combination of hexadecimal numbers. For the axis information
area of channel number 3, specify H301.

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ●
D - ● ● ● ● ● ● ● ● - - ●

■ Outline of operation
● Reads [n] words of the data stored in the positioning memory starting with [S2], and stores it
in the operation memory area starting with [D].
● Channel numbers and the type of positioning memory are specified by [S1].

■ Precautions during programming


● If an operand is an out-of-range value, an operation error occurs.

31-10 WUME-FPXHPGRG-021
31.5 [F384 PTBLR] Positioning Parameter Read Instruction

■ Flag operations
Name Description
When the [S1] value is outside the set range
R9007
When the [S2] value exceeds the positioning area specified by [S1]
R9008
When the no. of read words is "0"
(ER)
When the read data exceeds the area of [D]

WUME-FPXHPGRG-021 31-11
31.6 [F385 PTBLW] Positioning Parameter Write Instruction

31.6 [F385 PTBLW] Positioning Parameter Write Instruction


This instruction is used to write positioning parameters and positioning table data with user
programs.

■ Instruction format

■ Operand
Operand Settings
Specification of channel numbers and positioning memory area
(Higher 8 bits) channel no.: H0 to H5
S1
H00 (Common area), H01 (Axis information area), H02 (Axis
(Lower 8 bits) Area no.:
setting area), H03 (Positioning table area)
S2 Operation memory area storing written data
n No. of written data
Starting address of the positioning memory storing data (offset address)
D
or operation memory area storing the starting address

(Note 1) When writing data to the common area, the setting of channel numbers is invalid.
(Note 2) The operand S1 is specified using a combination of hexadecimal numbers. For the axis setting area of
channel number 3, specify H302.

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● - - ●
n ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ● ● ● ●

■ Outline of operation
● Reads [n] words of the data stored in the area starting with [S2], and stores it in the
positioning memory area starting with [D].
● Channel numbers and the type of positioning memory are specified by [S1].

■ Precautions during programming


● If an operand is an out-of-range value, an operation error occurs.

31-12 WUME-FPXHPGRG-021
31.6 [F385 PTBLW] Positioning Parameter Write Instruction

● For details of positioning memory, refer to "Positioning Memory".

■ Flag operations
Name Description
When the [S1] value is outside the set range

R9007 When the [D] value exceeds the positioning area specified by [S1]
R9008 When the range of the data written from [D] exceeds the positioning area specified by [S1]
(ER) When the no. of written data is "0"
When the written data exceeds the area of [S2]

WUME-FPXHPGRG-021 31-13
(MEMO)

31-14 WUME-FPXHPGRG-021
32 Positioning Control
Instructions (FP-X
Compatible Mode)
32.1 [F1 DMV] Elapsed Value Write / Read Instruction ............................32-2
32.2 [F171 (SPDH)] Pulse Output (Trapezoidal Control)..........................32-3
32.3 [F171 (SPDH)] Pulse Output (Home Return)....................................32-8
32.4 [F172 (PLSH)] Pulse Output (JOG operation) ..................................32-13
32.5 [F174 (SP0H)] Pulse Output (Selectable Data Table Control
Operation) .............................................................................................32-16
32.6 [F175 (SPSH)] Pulse Output (Linear Interpolation) ..........................32-21

WUME-FPXHPGRG-021 32-1
32.1 [F1 DMV] Elapsed Value Write / Read Instruction

32.1 [F1 DMV] Elapsed Value Write / Read Instruction


Writes and reads the elapsed value of the high-speed counter / pulse output.

■ Instruction format

R0
( DF ) F1 DMV K3000 DT90400
S
R1
( DF ) F1 DMV DT90400 DT100
D
■ Operand
Operand Settings
When setting: Area storing the elapsed value (32-bit) set in the high-speed counter / pulse output
S or constant data
K−2,147,483,648 to K2,147,483,647
D When reading: Area reading the elapsed value of the high-speed counter / pulse output

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S ● ● ● ● ● ● ● ● ● ● ● ●
D - ● ● ● ● ● ● ● ● - - ●

■ Outline of operation (Reading elapsed value)


● Reads the content of the special data register storing the elapsed value of the high-speed
counter / pulse output and writes to the area specified by [D].

■ Outline of operation (Setting elapsed value)


● At the same time as writing the value to the elapsed value area of the high-speed counter /
pulse output which uses 32-bit data specified by [S], sets it in the elapsed value area of the
high-speed counter used within the system.

■ Precautions during programming


● Only F1 (DMV) instruction can perform the writing. The writing cannot be performed by other
high-level instructions such as transfer instruction F0 (MV) and arithmetic instructions.
● Specify the memory area of [S] or [D] with the memory area number for the lower 16 bits.

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

32-2 WUME-FPXHPGRG-021
32.2 [F171 (SPDH)] Pulse Output (Trapezoidal Control)

32.2 [F171 (SPDH)] Pulse Output (Trapezoidal Control)


This instruction outputs pulses from a specified pulse output channel according to specified
parameters.

■ Instruction format

■ Operand
Operand Settings
S Starting number of the area in which data tables are registered
n Target channel for pulse output

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S - - - - - - ● - - - - ●
n - - - - - - - - - ● ● -

■ Outline of operation
● Outputs pulses from a specified channel when a corresponding control active flag is OFF
and the execution condition is ON.
● The control code, initial speed, maximum speed, acceleration / deceleration time, and target
value are specified by creating data tables [S] to [S+11] described on the next page using a
user program.
● Switches the frequency from the initial speed to the maximum speed in the specified
acceleration / deceleration time. At the time of deceleration, switches the frequency with the
same inclination as that for acceleration.
● For setting the frequency to 50 kHz or more, specify the duty of 1/4 (25%).

■ Operation mode
Incremental <Relative value control>
Outputs the pulses set with the target value.

WUME-FPXHPGRG-021 32-3
32.2 [F171 (SPDH)] Pulse Output (Trapezoidal Control)

Selection
PLS+SIGN PLS+SIGN
Target value CW / CCW Forward OFF Forward ON Elapsed value
Reverse ON Reverse OFF
Pulse output when Pulse output when
Pulse output from direction output is direction output is
Positive value Addition
CW OFF ON

Pulse output when Pulse output when


Pulse output from direction output is direction output is
Negative value Subtraction
CCW ON OFF

Absolute <Absolute value control>


Outputs the pulses of the difference between the set target value and current value.
Selection
PLS+SIGN PLS+SIGN
Target value CW / CCW Forward OFF Forward ON Elapsed value
Reverse ON Reverse OFF

When target value Pulse output when Pulse output when


Pulse output from direction output is direction output is
is larger than Addition
CW OFF ON
current value

When target value Pulse output when Pulse output when


Pulse output from direction output is direction output is
is smaller than Subtraction
CCW ON OFF
current value

■ Data table settings


f
Fmax

No. of output pulses

Fmin
t
t t
Acceleration time Deceleration time

32-4 WUME-FPXHPGRG-021
32.2 [F171 (SPDH)] Pulse Output (Trapezoidal Control)

S Control code
S+1 ①

S+2 Initial speed


S+3 Fmin(Hz)

S+4 Maximum speed
S+5 Fmax(Hz)

S+6 Acceleration/
S+7
deceleration time ③
t(ms)
S+8 Target value
S+9 ④
(No. of pulses)
S+10 K0 ⑤
S+11

Operand Settings Description


Specify the control code by setting the H constant.

H
0: Fixed
Acceleration/deceleration time setting
0: Normal
1: Acceleration/deceleration time priority
Output setting
0: Pulse output
1: Calculate only
Acceleration/deceleration steps
0: 30 steps
(1) S, S+1 Control code 1: 60 steps
Duty (on width)
0: Duty 1/2 (50%)
1: Duty 1/4 (25%)
Frequency range
Not used
Operation mode and output method
0: Incremental CW/CCW
2: Incremental PLS+SIGN (forward off/reverse on)
3: Incremental PLS+SIGN (forward on/reverse off)
10: Absolute CW/CCW
12: Absolute PLS+SIGN (forward off/reverse on)
13: Absolute PLS+SIGN (forward on/reverse off)

Initial speed The setting range of the settable maximum speed varies according to
S+2, S+3 the setting of the initial speed as shown in the table below.
Fmin (Hz)
Range Initial speed Maximum speed
(2) Low K1 to K49 Initial speed to K22000 (to 22
Maximum speed speed (1 to 49 Hz) kHz)
S+4, S+5
Fmax (Hz)
High- K50 to K100000 Initial speed to K100000 (to
speed (50 Hz to 100 kHz) 100 kHz)

WUME-FPXHPGRG-021 32-5
32.2 [F171 (SPDH)] Pulse Output (Trapezoidal Control)

Operand Settings Description


When the initial speed is set to low speed, an operation error occurs if
a value exceeding K22000 is specified for the maximum speed.
Acceleration / deceleration time (ms)

With 30 steps: K30 to K32760


(Specify in 30 ms increments.)
Acceleration /
(3) S+6, S+7 deceleration time With 60 steps: K60 to K32760
t (ms) (Specify in 60 ms increments.)

(Note 1) When the time is not specified in 30 ms nor 60 ms


increments, it will be automatically corrected to the
multiple value (larger value) of 30 ms or 60 ms.
Target value
(4) S+8, S+9 Target value
K-2147483648 to K2147483647 pulse
(5) S+10, S+11 K0 Set K0 to the last two words of the data table.

■ Example of program

7kHz

No. of output pulses


100,000

1kHz

300ms 300ms

⊿f

⊿t

32-6 WUME-FPXHPGRG-021
32.2 [F171 (SPDH)] Pulse Output (Trapezoidal Control)

● With 30 steps:
∆f = (7000 - 1000) / 30 steps = 200 (Hz)
∆t = 300 ms / 30 steps =10 ms
● With 60 steps:
∆f = (7000 - 1000) / 60 steps = 100 (Hz)
∆t = 300 ms / 60 steps = 5 ms

■ Regarding the specification of acceleration / deceleration time


For specifying acceleration / deceleration time, No. of steps and initial speed, set the value to
be calculated by the formula below. Specify acceleration / deceleration time in 30 ms
increments with 30 steps, and in 60 ms increments with 60 steps. When the time is not
specified in 30 ms nor 60 ms increments, it will be automatically corrected to the multiple value
(larger value) of 30 ms or 60 ms.
Acceleration / deceleration time t [ms] ≥ (No. of steps x 1000) / Initial speed f0 [Hz]
● When "Acceleration / deceleration time priority" is specified for the control code, the initial
speed is corrected according to the time.
The corrected speed is stored in the correction speed area of initial speed of special data
registers (from DT90400).
(Example): When the initial speed is 10 Hz, and acceleration / deceleration time is 1 msec,
the initial speed is corrected to 1000 Hz.
● When the corrected initial speed exceeds the maximum speed, the initial speed is corrected
to the maximum speed.
(Example): When the initial speed is 10 Hz, the maximum speed is 500 Hz, acceleration /
deceleration time is 1 msec, and acceleration / deceleration time priority is specified,
it takes 100 msec for outputting one pulse at the initial speed and it exceeds 1 msec of
acceleration / deceleration time.
Although the initial speed is corrected to 1000 Hz as "Acceleration / deceleration time
priority” is specified, it is corrected to 500 Hz because it exceeds the maximum speed.

■ Supplement to pulse output operation


When outputting pulses with the PLS+SIGN (direction output) method, pulses will be output
approx. 300 μs later after the output of direction signal (SIGN). (The characteristics of a motor
driver are considered.)

■ Precautions during programming


● When describing the same channel in both the normal program and the interrupt program, be
sure to program not to execute them simultaneously.
● This instruction cannot be executed when a control active flag corresponding to each
channel is ON.
● Select "Pulse output" for the channel setting corresponding to the system register no. 402.
● By performing the rewriting during RUN while outputting pulses, more pulses than the setting
may be output.

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

WUME-FPXHPGRG-021 32-7
32.3 [F171 (SPDH)] Pulse Output (Home Return)

32.3 [F171 (SPDH)] Pulse Output (Home Return)


This instruction outputs pulses from a specified pulse output channel according to specified
parameters.

■ Instruction format

■ Operand
Operand Settings
S Starting number of the area in which data tables are registered
n Target channel for pulse output

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S - - - - - - ● - - - - ●
n - - - - - - - - - ● ● -

■ Outline of operation
● Outputs pulses from a specified channel when a corresponding control active flag is OFF
and the execution condition is ON.
● The control code, initial speed, maximum speed, acceleration / deceleration time, and
deviation counter clear signal are specified by creating data table described on the next page
using a user program.
● Switches the frequency from the initial speed to the maximum speed in the specified
acceleration / deceleration time. At the time of deceleration, switches the frequency with the
same inclination as that for acceleration.
● For setting the frequency to 50 kHz or more, specify the duty of 1/4 (25%).

■ Explanation of operation mode


Home return
The pulses are continuously output until the home input (X2 or X5) is enabled. To shift to
deceleration operation when detecting the near home, turn the corresponding bit of special
data register DT90052 to OFF→ON→OFF by the near home input. The value in the elapsed
value area during the home return operation differs from the current value.
Home return mode I (Home return by near home input and home input)
When the near home input is enabled, deceleration will be performed, and the pulse output
will stop after the home input. The operation varies according to the setting of the control code
(low byte) described on the next page.

32-8 WUME-FPXHPGRG-021
32.3 [F171 (SPDH)] Pulse Output (Home Return)

Home input

Fmax

Fmin
t
Home return mode II (Home return by home input only)
When the home input is enabled, the pulse output will stop. Set the control code (low byte) on
the next page to H20 to H27.
f Near home input
Fmax

Home input

Fmin
t

■ Data table settings


S Control code
S+1 ①

S+2 Initial speed


S+3 Fmin(Hz)

S+4 Maximum speed
S+5 Fmax(Hz)

S+6 Acceleration/
S+7
deceleration time ③
t(ms)
S+8 Deviation counter clear
S+9 signal output time tr(ms) ④

Operand Settings Description


(1) S, S+1 Control code Specify the control code by setting the H constant.

WUME-FPXHPGRG-021 32-9
32.3 [F171 (SPDH)] Pulse Output (Home Return)

Operand Settings Description


H
0: Fixed
Acceleration/deceleration time setting
0: Normal
1: Acceleration/deceleration time priority
Output setting
0: Pulse output
1: Calculate only
Acceleration/deceleration steps
0: 30 steps
1: 60 steps
Duty (on width)
0: Duty 1/2 (50%)
1: Duty 1/4 (25%)
Frequency range
Not used
Operation mode and output method
20: Homing mode 1 CW
21: Homing mode 1 CCW
22: Homing mode 1 Directional output off
23: Homing mode 1 Directional output on
24: Homing mode 1 CW + deviation counter reset
25: Homing mode 1 CCW + deviation counter reset
26: Homing mode 1 Direction output off + deviation counter reset
27: Homing mode 1 Direction output on + deviation counter reset
30: Homing mode 2 CW
31: Homing mode 2 CCW
32: Homing mode 2 Directional output off
33: Homing mode 2 Direction output on
34: Homing mode 2 CW + deviation counter reset
35: Homing mode 2 CCW + deviation counter reset
36: Homing mode 2 Direction output off + deviation counter reset
37: Homing mode 2 Direction output on + deviation counter reset

Initial speed The setting range of the settable maximum speed varies
S+2, S+3 according to the setting of the initial speed as shown in the table
Fmin (Hz)
below.

Range Initial speed Maximum speed


Low K1 to K49 Initial speed to K22000 (to 22
(2) speed (1 to 49 Hz) kHz)
Maximum speed
S+4, S+5 High- K50 to K100000 Initial speed to K100000 (to
Fmax (Hz)
speed (50 Hz to 100 kHz) 100 kHz)

When the initial speed is set to low speed, an operation error


occurs if a value exceeding K22000 is specified for the maximum
speed.

Acceleration / Acceleration / deceleration time (ms)


(3) S+6, S+7 deceleration time With 30 steps: K30 to K32760
t (ms) With 60 steps: K60 to K32760
Set the output time of the deviation counter clear signal.
Deviation counter
clear 0.5 ms to 100 ms [K0 to K100] Setting value + error (0.5 ms or
(4) S+8, S+9 less)
signal output time
When this signal is not used or the time is set to less than 0.5 ms,
tr (ms)
specify K0.

32-10 WUME-FPXHPGRG-021
32.3 [F171 (SPDH)] Pulse Output (Home Return)

■ Example of program

■ Regarding the specification of acceleration / deceleration time


For specifying acceleration / deceleration time, No. of steps and initial speed, set the value to
be calculated by the formula below. Specify acceleration / deceleration time in 30 ms
increments with 30 steps, and in 60 ms increments with 60 steps. When the time is not
specified in 30 ms nor 60 ms increments, it will be automatically corrected to the multiple value
(larger value) of 30 ms or 60 ms.
Acceleration / deceleration time t [ms] ≥ (No. of steps x 1000) / Initial speed f0 [Hz]
● When "Acceleration / deceleration time priority" is specified for the control code, the initial
speed is corrected according to the time.
The corrected speed is stored in the correction speed area of initial speed of special data
registers (from DT90400).
(Example): When the initial speed is 10 Hz, and acceleration / deceleration time is 1 msec,
the initial speed is corrected to 1000 Hz.
● When the corrected initial speed exceeds the maximum speed, the initial speed is corrected
to the maximum speed.
(Example): When the initial speed is 10 Hz, the maximum speed is 500 Hz, acceleration /
deceleration time is 1 msec, and acceleration / deceleration time priority is specified,
it takes 100 msec for outputting one pulse at the initial speed and it exceeds 1 msec of
acceleration / deceleration time.
Although the initial speed is corrected to 1000 Hz as "Acceleration / deceleration time
priority” is specified, it is corrected to 500 Hz because it exceeds the maximum speed.

■ Supplement to pulse output operation


When outputting pulses with the PLS+SIGN (direction output) method, pulses will be output
approx. 300 μs later after the output of direction signal (SIGN). (The characteristics of a motor
driver are considered.)

WUME-FPXHPGRG-021 32-11
32.3 [F171 (SPDH)] Pulse Output (Home Return)

■ Precautions during programming


● When the control code (low byte) is H20 to H27 (home return mode I), the home input is
enabled even after the near home input, the completion of deceleration, or in the middle of
deceleration.
● When the control code (low byte) is H30 to H37 (home return mode II), the home input is
enabled only after the near home input and the completion of deceleration up to the value of
initial speed.
● Even when the home input is enabled, the pulse output starts by the execution of this
instruction.
● When the near home input is enabled during acceleration, the deceleration operation will
start.
● When describing the same channel in both the normal program and the interrupt program, be
sure to program not to execute them simultaneously.
● This instruction cannot be executed when a control active flag corresponding to each
channel is ON.
● Select "Pulse output" for the channel setting corresponding to the system register no. 402.
● By performing the rewriting during RUN while outputting pulses, more pulses than the setting
may be output.
● For performing the software reset, disabling the counting, stopping the pulse output or near
home processing, refer to the F0 (MV) instruction, pulse output control.

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

32-12 WUME-FPXHPGRG-021
32.4 [F172 (PLSH)] Pulse Output (JOG operation)

32.4 [F172 (PLSH)] Pulse Output (JOG operation)


This instruction outputs pulses from a specified pulse output channel according to specified
parameters.

■ Instruction format

R0
( DF ) F172 PLSH DT10 K0
S n

■ Operand
Operand Settings
S Starting number of the area in which data tables are registered
n Target channel for pulse output

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S - - - - - - ● - - - - ●
n - - - - - - - - - ● ● -

■ Outline of operation
● Outputs pulses from a specified channel when a corresponding control active flag is OFF
and the execution condition is ON. The output is performed when the execution condition is
ON.
● By specifying the addition counting or subtraction counting mode for the control code, it can
be used for the instruction for activating JOG operation.
● The frequency can be changed in each scan, or the target value can be changed
asynchronously. However, the control code cannot be changed during the execution of an
instruction.
● For setting the frequency to 50 kHz or more, specify the duty of 1/4 (25%).

■ Data table settings


S S
S+1 Control code ① S+1 Control code ①

S+2 S+2
S+3 Frequency ② S+3 Frequency ②

S+4 Target value ③


S+5

WUME-FPXHPGRG-021 32-13
32.4 [F172 (PLSH)] Pulse Output (JOG operation)

Operand Settings Description


Specify the control code by setting the H constant.

H
0: Fixed
Acceleration/deceleration steps
0: Mode with no target value
1: Target value match stop mode
Duty (on width)
0: Duty 1/2 (50%)
1: Duty 1/4 (25%)
(1) S, S+1 Control code
Frequency range
Not used
Output method
00: No counting CW
01: No counting CCW
10: Addition counting CW
12: Addition counting Directional output off
13: Addition counting Directional output on
21: Subtraction counting CW
22: Subtraction counting Directional output off
23: Subtraction counting Directional output on

The setting range of the settable change speed varies according to


the setting of the initial speed as shown in the table below.

Range Initial speed Change speed


Low K1 to K49 K1 to K22000
speed (1 to 49 Hz) (1 Hz to 22 kHz)
(2) S+2, S+3 Frequency
High- K50 to K100000 K1 to K100000
speed (50 Hz to 100 kHz) (1 Hz to 100 kHz)

When the initial speed is set to low speed, it is corrected to 22 kHz


even when specifying a value exceeding K22000 for the change
speed.
Target value (absolute value)
It is used when setting the target value match stop mode. (Absolute
only)
Specify the target value in the following range. If a value outside of
the range is specified, the number of pulses different from the
specified value is output. When specifying the no counting mode, the
target value setting is ignored.
(3) S+4, S+5 Target value
Output
Settable range of target value
method
Addition Values larger than the current value
counting
Subtraction Values smaller than the current value
counting

32-14 WUME-FPXHPGRG-021
32.4 [F172 (PLSH)] Pulse Output (JOG operation)

■ Supplement to pulse output operation


When outputting pulses with the PLS+SIGN (direction output) method, pulses will be output
approx. 300 μs later after the output of direction signal (SIGN). (The characteristics of a motor
driver are considered.)

■ Precautions during programming


● This instruction cannot be executed when a control active flag corresponding to each
channel is ON.
● When describing the same channel in both the normal program and the interrupt program, be
sure to program not to execute them simultaneously.
● Select "Pulse output" for the channel setting corresponding to the system register no. 402.
● When rewriting during RUN is performed during the operation, the pulse output stops while a
program is being rewritten.
● Even if the control code is changed after starting the instruction, the change is invalid. It does
not affect on the operation.
● When the frequency is changed to a value outside of the settable range after executing the
instruction, the operation is performed with the minimum or maximum value in the
specification range without causing an operation error.

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

WUME-FPXHPGRG-021 32-15
32.5 [F174 (SP0H)] Pulse Output (Selectable Data Table Control Operation)

32.5 [F174 (SP0H)] Pulse Output (Selectable Data Table Control


Operation)
This instruction outputs pulses from a specified pulse output channel according to a specified
data table.

■ Instruction format

■ Operand
Operand Settings
S Starting number of the area in which data tables are registered
n Target channel for pulse output

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S - - - - - - ● - - - - ●
n - - - - - - - - - ● ● -

■ Outline of operation
● Outputs pulses from a specified channel according to the settings specified in the data table
starting with the address specified by [S] when a corresponding control active flag is OFF
and the execution condition is ON.
● Switches the pulse frequency when the elapsed value of the high-speed counter reaches the
target value set in the data table. (It is performed by the interrupt processing.)
● Stops the pulse output when the elapsed value reaches the final target value.
● For setting the frequency to 50 kHz or more, specify the duty of 1/4 (25%).

32-16 WUME-FPXHPGRG-021
32.5 [F174 (SP0H)] Pulse Output (Selectable Data Table Control Operation)

■ Data table settings


S
Control code ①

S+2
Frequency 1 ②

S+4 Target value 1



(Pulse number)

S+6
Frequency 2

S+8 Target value 2


(Pulse number)

S+2n
Frequency n

S+2(n+1) Target value n


(Pulse number)

S+2(n+2)
K0 ④

Operand Settings Description


Specify the control code by setting the H constant.

H
0: Fixed
Duty (on width)
0: Duty 1/2 (50%)
1: Duty 1/4 (25%)
Frequency range
Not used
(1) S Control code Operation mode
0: Specify Incremental movement amount (pulse no.).
1: Specify Absolute target value (absolute value).
Output method
0: Addition counting CW
1: Subtraction counting CCW
2: Addition counting PLS+SIGN (forward off)
3: Subtraction counting PLS+SIGN (reverse on)
4: Addition counting PLS+SIGN (forward on)
5: Subtraction counting PLS+SIGN (reverse off)

The setting range of the settable maximum speed varies according to


the setting of the initial speed as shown in the table below.
S+2,
(2) Frequency n Range Initial speed Maximum speed
S+2n
Low K1 to K49 Initial speed to K22000 (to 22
speed (1 to 49 Hz) kHz)

WUME-FPXHPGRG-021 32-17
32.5 [F174 (SP0H)] Pulse Output (Selectable Data Table Control Operation)

Operand Settings Description


Range Initial speed Maximum speed
High- K50 to K100000 Initial speed to K100000 (to 100
speed (50 Hz to 100 kHz) kHz)

When the frequency 1 (initial speed) is the low speed range and the
frequency n is not in the range between 1 Hz to 22 kHz, the pulse
output stops.
When the frequency 1 (initial speed) is the high speed range and the
frequency n is not in the range between 50 Hz to 100 kHz, the pulse
output stops.
Target value (K-2147483648 to K2147483647)
The values of 32-bit data specified as target values should be within
the range as shown in the table below.

Control code setting


Output Settable range of target value
Operation mode
method
S+4, Addition
(3) Target value n Positive values
S+2(n+1) counting
Incremental
Subtraction
Negative values
counting
Addition Values larger than the current
counting value
Absolute
Subtraction Values smaller than the current
counting value

(4) S+2(n+2) K0 End of table (Pulse output stop setting)

■ Example of program
[Operation]
(1) Starts the pulse output at 1000 Hz from the specified channel ch0 when the execution
condition R10 of F174 (SP0H) instruction turns ON.
(2) Switches the frequency to 2500 Hz when 1000 pulses are counted at 1000 Hz.
(3) Switches the frequency to 5000 Hz when 3000 pulses are counted at 2500 Hz.
(4) Switches the frequency to 1000 Hz when 8000 pulses are counted at 5000 Hz.
(5) Stops the pulse output when 10000 pulses are counted.
Frequency (speed) [Hz]

5000

2500

1000
HSC elapsed value
(Movement amount)
0 1000 3000 8000 10000
Execution condition
R10

Control active flag

32-18 WUME-FPXHPGRG-021
32.5 [F174 (SP0H)] Pulse Output (Selectable Data Table Control Operation)

(Note 1) When the execution condition R10 of F174 (SP0H) instruction turns ON, the control active flag will turn
ON. When the elapsed value reaches 10000 and the pulse output stops, the control active flag will
turn OFF.

[Settings and program]


Set the frequency range to 191 Hz to 100 kHz and duty 1/4 (25%), and the operation mode to
Incremental and the output method to CW.

■ Supplement to pulse output operation


When outputting pulses with the PLS+SIGN (direction output) method, pulses will be output
approx. 300 μs later after the output of direction signal (SIGN). (The characteristics of a motor
driver are considered.)

■ Precautions during programming


● The control active flag turns ON until the pulse output stops after the execution condition of
F174 (SP0H) instruction has turned ON.
● This instruction cannot be executed when a control active flag corresponding to each
channel is ON.
● Select "Pulse output" for the channel setting corresponding to the system register no. 402.
● When the control code or frequency 1 is any value outside of the settable range, an
operation error occurs. (When the data of the frequency 1 is 0, nothing is executed and the
operation ends.)

WUME-FPXHPGRG-021 32-19
32.5 [F174 (SP0H)] Pulse Output (Selectable Data Table Control Operation)

● When the frequency after the second step is 0 or outside of the settable range, the pulse
output stops.
● When the table pointer exceeds the area of data registers DT during the pulse output, the
pulse output control will be canceled and the control active flag will turn OFF.
● The target values should be set in the range shown on the next page. If a value outside of
the range is specified, the number of pulses different from the specified value is output.

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

32-20 WUME-FPXHPGRG-021
32.6 [F175 (SPSH)] Pulse Output (Linear Interpolation)

32.6 [F175 (SPSH)] Pulse Output (Linear Interpolation)


Pulses are output from channel for 2 pulse output, in accordance with the parameters in the
designated data table, so that the path to the target position forms a straight line.

■ Instruction format

■ Operand
Operand Settings
S Starting number of the area in which data tables are registered
n 0 or 2

■ Memory area type that can be specified


Constant Index
Operand WX WY WR WL SV EV DT LD I
K H modifier

S - - - - - - ● - - - - ●
n - - - - - - - - - ● ● -

■ Outline of operation
● Outputs pulses from a specified channel when a corresponding control active flag is OFF
and the execution condition is ON.
● The control code, initial speed, maximum speed, acceleration / deceleration time, and target
value are specified by creating data tables [S] to [S+11] described on the next page using a
user program.
● For setting the frequency to 40 kHz or more, specify the duty of 1/4 (25%).

WUME-FPXHPGRG-021 32-21
32.6 [F175 (SPSH)] Pulse Output (Linear Interpolation)

■ Data table settings

S
Control code ①

S+2 Composite speed


Initial speed Fmin(Hz)

S+4 Composite speed Setting area
Maximum speed Fmax(Hz)
Specify by user programs.
S+6 Acceleration/deceleration time

T(ms)

S+8 X-axis
Target value (Movement amount)

Y-axis
S+10
Target value (Movement amount)
X-axis
S+12 Component speed
Initial speed Fmin(Hz)
X-axis
S+14 Component speed
Maximum speed Fmax(Hz)

Y-axis
Component speed
S+16 Operation result storage area
Initial speed Fmin(Hz)
Y-axis Parameters of each axis
Component speed
S+18 component calculated due to
Maximum speed Fmax(Hz) instruction execution are stored.
X-axis
S+20 Frequency range

Y-axis
S+21 Frequency range

S+22 X-axis
Acceleration/deceleration steps

S+23 Y-axis
Acceleration/deceleration steps

Setting area
Operand Settings Description
Specify the control code by setting the H constant.
S+1 S
H
0: Fixed
Duty (on width)
0: Duty 1/2 (50%)
1: Duty 1/4 (25%)
(1) S Control code
0: Fixed
Operation mode and output method
00: Incremental CW/CCW
02: Incremental PLS+SIGN (forward off/reverse on)
03: Incremental PLS+SIGN (forward on/reverse off)
10: Absolute CW/CCW
12: Absolute PLS+SIGN (forward off/reverse on)
13: Absolute PLS+SIGN (forward on/reverse off)

(2) S+2 Composite speed Composite speed (Initial speed, maximum speed) (Hz) <K constant>

32-22 WUME-FPXHPGRG-021
32.6 [F175 (SPSH)] Pulse Output (Linear Interpolation)

Operand Settings Description


Initial speed 1.5 Hz to 100 kHz [K1 to K100000]
Fmin (Hz) (However, for 1.5 Hz, the angle is 0 degree or 90 degrees only. Also,
for specifying 1.5 Hz, specify K1.)
● When the component speed becomes lower than the minimum
speed in each frequency range, it will be a corrected component
speed.
● Do not set 60 kHz or more when using any two of the high-speed
counter, periodical interrupt and PLC link are used simultaneously.
● When the initial speed is set to the maximum speed, the pulse
output is performed without acceleration and deceleration.
● Specify the composite speed to make the component speed of
each axis be 1.5 Hz or more.
Composite speed
S+4 ● Composite speed (Initial speed): 30 kHz or less
Maximum speed
Fmax (Hz) Notes on the specification of composite speed (initial speed)
When each initial component speed of CH0 and CH2 is not 1.5 Hz or
more by the following arithmetic expression, the path may not be
linear. (When the following formula is not satisfied)

∆x: Channel whose distance of (target value - current value) is short


∆y: Channel whose distance of (target value - current value) is long
Acceleration / deceleration time (ms) <K constant>
Acceleration /
(3) S+6 deceleration time K0 to K32767
T (ms) In the case of 0, the pulse output is performed at the initial speed
(composite speed) without acceleration and deceleration.
X-axis K-8388608 to K8388607
S+8 Target value When only one axis is activated;
(Movement 1. For the incremental mode, set the target value of the axis that is
amount) not activated to 0.
(4)
Y-axis 2. For the absolute mode, set the target value of the axis that is not
Target value activated to the same as the current value.
S+10
(Movement (Note): In the case of linear interpolation, infinite rotation cannot be
amount) performed.

Operation result storage area


Settin
Operand Description
gs
X-axis
compo
The component speed (initial speed and maximum speed of each axis) is
nent
stored as 2 words in real type.
S+12 speed
Initial (Composite speed) × (X-axis movement amount)
X-axis component speed =
speed
((X-axis movement amount)2 + (Y-axis movement amount) 2)
(5) Fxmin
(Composite speed) × (Y-axis movement amount)
X-axis Y-axis component speed =
compo ((X-axis movement amount)2 + (Y-axis movement amount) 2)
nent
S+14 speed Example) Even when the initial speed is corrected, the calculated value is
stored as is in the operation result storage area.
Maxim
um

WUME-FPXHPGRG-021 32-23
32.6 [F175 (SPSH)] Pulse Output (Linear Interpolation)

Settin
Operand Description
gs
speed
Fmax
Y-axis
compo
nent
S+16 speed
Initial
speed
Fymin
Y-axis
compo
nent
speed
S+18 Maxim
um
speed
Fmax
(Hz)
X-axis The frequency ranges are automatically selected by the system for the
Frequ components of each axis
S+20
ency 0: Low speed range (1 Hz to 22 kHz)
range 1: High speed range (50 Hz to 100 kHz)
(6) When the initial speed (X / Y axis) is the low speed range and the maximum
Y-axis speed (X / Y axis) exceeds 22 kHz, the initial speed (X / Y axis) is corrected
Frequ to 50 Hz.
S+21
ency When the initial speed (X / Y axis) is less than 1 and the maximum speed (X /
range Y axis) exceeds 22 kHz or less, the initial speed (X / Y axis) is corrected to 1
Hz.
X-axis The acceleration / deceleration steps are automatically calculated by the
Accele system in the range of 0 to 60 steps.
S+22 ration / ● When the operation result is 0, the pulse output is performed at the initial
Decele speed (composite speed) without acceleration and deceleration.
ration ● The acceleration / deceleration steps are calculated by the following
steps formula; Acceleration / deceleration time (ms) x Initial component speed
(Hz).
Example) When the settings are as follows; Incremental, Initial speed = 300
Hz, maximum speed = 5 kHz, Acceleration / deceleration time=0.5 s, CH0
target value = 1000, and CH2 target value = 50.
(7)
Y-axis 300×1000
Accele CH0 Initial component speed = = 299.626 Hz
S+23 ration / (10002+502)
Decele
ration 300×50
CH2 Initial component speed = = 14.981 Hz
steps
(10002+502)

CH0 Acceleration/deceleration steps = 500x10-3x299.626≈147.8 60 steps


CH2 Acceleration/deceleration steps = 500x10-3x14.981≈7.4 7 steps

■ Supplement to pulse output operation


When outputting pulses with the PLS+SIGN (direction output) method, pulses will be output
approx. 300 μs later after the output of direction signal (SIGN). (The characteristics of a motor
driver are considered.)

32-24 WUME-FPXHPGRG-021
32.6 [F175 (SPSH)] Pulse Output (Linear Interpolation)

■ Precautions during programming


● Set the target value and movement amount to be within the following range.
-8,388,608 to +8,388,607
When using this instruction in combination with other positioning instructions such as F171,
also set the target values for those instructions to be within the above range.
● When using this instruction for a purpose for which high accuracy is required, confirm the
operation using a real machine.
● When describing the same channel in both the normal program and the interrupt program, be
sure to program not to execute them simultaneously.
● Select "Pulse output" for the channel setting corresponding to the system register no. 402.
● By performing the rewriting during RUN while outputting pulses, more pulses than the setting
may be output.

● For details of the allocations of I/O and flags, refer to “Allocation of Memory Areas”.

WUME-FPXHPGRG-021 32-25
(MEMO)

32-26 WUME-FPXHPGRG-021
33 Precautions for Programming
33.1 Changing the Set Value of Timer/Counter During RUN ....................33-2
33.1.1 How to Rewrite Constants in the Program ..................................... 33-2
33.1.2 Methods Used to Rewrite a Value in the Set Value Area ............... 33-2
33.2 Use of Duplicate Output....................................................................33-5
33.2.1 Duplicate Output ............................................................................ 33-5
33.2.2 Processing When Output Is Duplicated with OT, KP, SET, and
RST Instructions ............................................................................... 33-5
33.3 Rise Detection Method......................................................................33-7
33.3.1 Rise Detection Instructions ............................................................ 33-7
33.3.2 Operation and Precautions at Run Start Time ............................... 33-8
33.3.3 Precautions When Using Control Instructions ............................... 33-10
33.4 Operation Errors ...............................................................................33-13
33.4.1 Outline of Operation Errors ............................................................ 33-13
33.4.2 Operation Mode when an Operation Error Occurs ........................ 33-13
33.4.3 Handling the Occurrence of Operation Errors................................ 33-14
33.4.4 Points to Review in Program.......................................................... 33-14
33.5 How to Use the Index Register .........................................................33-16
33.5.1 Index Registers .............................................................................. 33-16
33.5.2 Index Modification Applicable Areas .............................................. 33-16
33.5.3 Example of Using an Index Register.............................................. 33-17
33.6 Handling BCD Data...........................................................................33-19
33.7 Precautions for Programming ...........................................................33-21
33.8 Rewrite Function During RUN...........................................................33-23
33.8.1 Operation of Rewrite During RUN.................................................. 33-23
33.8.2 When Rewriting During RUN is not Possible ................................. 33-23
33.8.3 Method and Operation of Rewriting during RUN ........................... 33-25
33.9 Processing During Forced Input/Output ...........................................33-26

WUME-FPXHPGRG-021 33-1
33.1 Changing the Set Value of Timer/Counter During RUN

33.1 Changing the Set Value of Timer/Counter During RUN

33.1.1 How to Rewrite Constants in the Program

Timer set value


X0
TMX5 K30

T5 Y10

Method using programming tool software


Here is an example of changing the set value of timer 5 from K30 to K50.

1. Place the cursor on the timer 5 set value K30.


2. Enter the new constant K50, and press the Enter key.
3. Finalize the program by using [PB conversion] or [project conversion], and write it to the
main unit.
Operation and cautions after the change
● When the program is changed using programming tool software, the timers and counters
in operation will continue to operate unchanged. The program will start operating with the
changed settings after the next execution condition changes from OFF to ON.
● When the constants in the program are rewritten, the program itself is rewritten, so when
the mode is switched and RUN again, or when the power is turned off and on, the
program is preset with the changed settings.

33.1.2 Methods Used to Rewrite a Value in the Set Value Area

Timer set value


X0 Sent to SV area when
TMX5 K30 changes to RUN

SV5
T5 Y10
30

Changing a value in set value area SV


A value in set value area SV can be rewritten under the following conditions.
● Rewriting methods:
1. Method using programming tool software
2. Method using a program (high-level instruction)
Operation and cautions after the change

33-2 WUME-FPXHPGRG-021
33.1 Changing the Set Value of Timer/Counter During RUN

● After the change, the active timer/counter will continue to run. The program will start
operating with the changed settings after the next execution condition changes from OFF to
ON.
● With these methods, the value in set value area SV will change; however, the program itself
is not rewritten. Therefore, when the mode is changed and then set back to RUN, or when
the power is turned back on, the operation will be as follows.
1. When the set value is specified by a K constant
The K constant is preset in set value area SV. After the change, the value will no longer
be valid.
2. When the set value is specified by a set value area number
In the case of a non-hold-type timer/counter, 0 is preset in set value area SV. In the case
of a hold-type timer/counter, the value changed by the method on the previous page is
preset in set value area SV.
Method 1: Using programming tool software
From the menu bar, select:Online>Device Monitor.

Description
(1) No. Displays the line number.
Pressing the<Enter>key or double-clicking in this field displays the device code and device
(2) Device
number.
Current Displays the monitored data value. During online monitoring, data can be changed by
(3)
value pressing the<Enter>key or double-clicking in this field.
Pressing the<Enter>key or double-clicking in this field displays the number base (decimal,
(4) Data type
hexadecimal, binary, ASCII) and number of words to be monitored.
Displays the I/O comments for each register.
Comment
(5) I/O comments can be added for each register by pressing the<Enter>key or double-clicking
s
in this field.

(Note 1) For details, see the FPWIN GR7 help menu.


Method 2: Using a program (high-level instruction)
To change the set value of a timer/counter based on an input condition, etc., use a high-level
instruction as shown below to rewrite the value in set value area SV of the relevant timer or
counter.

WUME-FPXHPGRG-021 33-3
33.1 Changing the Set Value of Timer/Counter During RUN

Example: Changing the set value to K20 when input X0 turns ON

X0
F0 MV K30 SV5

X1 When X0 turns ON,


TMX5 SV5 the timer setting value
changes from 5
seconds to 2 seconds.
T5 Y10

The SV area can also be specified directly in the set value area. The set value can be changed
by changing the value to be transmitted, using the F0 instruction, etc.

33-4 WUME-FPXHPGRG-021
33.2 Use of Duplicate Output

33.2 Use of Duplicate Output

33.2.1 Duplicate Output

● The term “duplicate output” refers to a case where the same output is specified in duplicate
within one sequence program.
● If the same output is specified for the OT instruction and KP instruction, it is considered to be
a duplicate output.
● Even if the same output is used for the SET instruction, RST instruction and a high-level
instruction (such as data transfer), it is not regarded as a duplicate output.
● If the mode is switched to the "RUN mode" while the duplicate output state exists, an error
occurs under normal conditions. (The ERR. LED flashes and the self-diagnostic error flag
R9000 turns ON.)

■ How to check for a duplicate output


You can check for duplicate outputs in the program using the programming tool, by the following
method.
Perform a total check on a project from the menu.
If a duplicate output is detected, an error message [Duplicate use (definition) error] and its
address.

■ Enabling a duplicate output


● If you need to use output repeatedly due to the content of the program, a duplicate output
can be enabled.
● In this case, change the setting of system register No. 20 to “Enable”.
● Once this is done, an error will not occur when the program is executed.

33.2.2 Processing When Output Is Duplicated with OT, KP, SET, and RST
Instructions

■ Status of internal and output relays during operation


If instructions that output to internal and output relays, such as the OT instruction, KP
instruction, SET instruction, RST instruction, and transfer instructions, are executed in
duplicate, the contents are rewritten at each step during operation.

WUME-FPXHPGRG-021 33-5
33.2 Use of Duplicate Output

<Example> Processing when the SET instruction, RST instruction, and OT


instruction are used (X0 to X2 are all ON)

■ Determination of operation result


If the same output is used in duplicate by several instructions such as the OT instruction, KP
instruction, SET instruction, RST instruction, or a transfer instruction, the output obtained when
I/O refresh is performed is determined by the final operation results.

<Example> Output to the same output relay Y10 by the OT instruction, SET
instruction, and RST instruction

When X0 to X2 are all ON, output occurs with Y10 OFF when I/O refresh is performed.

33-6 WUME-FPXHPGRG-021
33.3 Rise Detection Method

33.3 Rise Detection Method

33.3.1 Rise Detection Instructions

■ Instructions for which rise detection is performed


1. DF (rise differential)
2. CT (counter) count input
3. F118 UDC (up-down counter) count input
4. SR (shift register) shift input
5. F119 LRSR (left and right shift register) shift input
6. NSTP (next step)
7. Differential execution type high-level instruction (instruction specified by P and a number)

■ What is rise detection?


Instructions for which rise detection is performed are only executed in the scan when the
execution condition changes from OFF to ON.
1. Normal input detection
ON
OFF

ON
OFF

Executed each scan.

2. Rise detection
ON
OFF

ON
OFF

Only 1 scan is executed.

■ Rise detection method


The previous execution condition is compared with the current execution condition, and the
instruction is executed only when the previous condition was OFF and the current condition is
ON.
The instruction will not be executed otherwise.

■ Precautions for instructions for which rise detection is performed


● When RUN is started, such as when the power is turned on, instructions are not executed
because the change of the execution condition from OFF to ON is not detected. See below.
● Be aware that, if used with instructions that change the order of execution, such as the
instructions in 1 to 6 below, the operation of instructions may change depending on the input
timing.
<Instructions that require caution when using instructions for which rise detection is
performed>
1. MC to MCE instructions
2. JP to LBL instructions

WUME-FPXHPGRG-021 33-7
33.3 Rise Detection Method

3. LOOP to LBL instructions


4. CNDE instruction
5. Step ladder instructions
6. Subroutine instructions

33.3.2 Operation and Precautions at Run Start Time

■ Operation of first scan after RUN begins


● The leading edge detection instruction is not executed when the mode has been switched to
the"RUN mode", or when the power supply is booted in the"RUN mode", if the execution
condition is already ON.

● If you need to execute an instruction when the execution condition is ON prior to switching
to"RUN mode", use the special internal relay R9014 in your program as follows. (R9014 is a
special internal relay which is OFF during the first scan and turns ON from the second scan
onwards.)

Example 1: DF (leading edge differential) instruction


X0 Y10
( DF )

Add R9014

X0 R9014 Y10
( DF )

33-8 WUME-FPXHPGRG-021
33.3 Rise Detection Method

Example 2: CT (counter) instruction


X0
CT200

X1

Add R9014

X0 R9014
CT200

X1

WUME-FPXHPGRG-021 33-9
33.3 Rise Detection Method

33.3.3 Precautions When Using Control Instructions

● Instructions that perform rise detection compare the execution condition from the last time
that instruction was performed with current execution condition, and are only executed when
the condition changes from OFF to ON. They are not executed in any other circumstance.
● When a rise detection instruction is used with an instruction that changes the order in which
instructions are executed, such as MC and MCE, or JP and LBL, the operation of the
instruction may change as follows depending on input timing.

Example 1: When using the differential instruction DF between MC and MCE

[Timing chart 1]

X0

X1

Y10

33-10 WUME-FPXHPGRG-021
33.3 Rise Detection Method

[Timing chart 2]

X0

X1

Y10

Example 2: When using the counter instruction between JP and LBL

[Timing chart 1]

R0

X0

WUME-FPXHPGRG-021 33-11
33.3 Rise Detection Method

[Timing chart 2]

R0

X0

33-12 WUME-FPXHPGRG-021
33.4 Operation Errors

33.4 Operation Errors

33.4.1 Outline of Operation Errors

■ Outline of operation errors


● An operation error is a condition in which operation is impossible when a high-level
instruction is executed.
● When an operation error occurs, the ERR. LED on the control unit will flash and the
operation error flags (R9007 and R9008) will turn ON.
● The operation error code K45 is set at special data register DT90000.
● The error address is stored in special data registers DT90017 and DT90018.

■ Types of operation error


The memory address (number) specified by index modification is outside the area
(1) Address error
which can be used.
Operation is attempted on non-BCD data when an instruction handling BCD is
executed.
(2) BCD error
BCD conversion is attempted on data which is not within the possible conversion
range.
In an instruction requiring the specification of control data, the specified data is outside
(3) Parameter error
the possible range.
(4) Over area error The data manipulated by a block instruction exceeds the memory range.

33.4.2 Operation Mode when an Operation Error Occurs

Normally, the operation stops when an operation error occurs.


To have the operation continue even if an operation error occurs, change system register No.26
to "Continuation".
Implement this change as follows.

1. Set the control unit to "PROG. mode".


2. Select "System register settings".
3. From the "System register settings" menu, select the "Action on error" screen.
4. Clear the system register No.26 check box and change to "RUN".
5. Press [OK] to write the setting to the PLC.

WUME-FPXHPGRG-021 33-13
33.4 Operation Errors

33.4.3 Handling the Occurrence of Operation Errors

■ Procedure
1. Check the location where the error occurred
Refer to the error address stored in DT90017 and DT90018, then check the high-level
instruction for that address.

2. Clear the error status


Clear the error by using the programming tool. (If the mode selection switch is set to RUN,
the system will enter a RUN state when the error is cleared.)
Execute"Clear error"on the"Status display"menu of the programming tool software.
● The error can also be cleared by turning the power on and off in"PROG. mode". Note,
however, that the content of the operation memory other than hold type data will be
cleared.
● The error can also be cleared by using the self-diagnostic error set instruction (F148).

33.4.4 Points to Review in Program

Be sure to review your program by following the points below.


1. Check if an extraordinarily large value or negative value is stored in the index registers.

Example: When a data register is modified using an index register

In this case, the index register modifies the address of data register DT0. If the value of I0 is
too large, it will exceed the specifiable range of the data register. If the data in I0 is larger
than the final address of the data register, an operation error will occur. The same is true
when the data in I0 is a negative value.
2. Check if there is any data that cannot be converted by BCD-BIN data conversion.

Example: When BCD-to-BIN conversion is attempted

In this case, if DT0 contains a hexadecimal number that includes one of the digits A through
F such as"12A4", the data conversion will be impossible and an operation error will result.

33-14 WUME-FPXHPGRG-021
33.4 Operation Errors

Example: When BIN-to-BCD conversion is attempted

In this case, if DT1 contains a negative value or a value greater than K9999, an operation
error will occur.
3. Check if the divisor of a division instruction is"0".

<Example>

In this case, if the content of DT100 is"0", an operation error will occur.

WUME-FPXHPGRG-021 33-15
33.5 How to Use the Index Register

33.5 How to Use the Index Register

33.5.1 Index Registers

● Index registers are used for indirect specification of values to numbers and operands in
relays and memory areas. (This is called "index modification".)
● The range that can be specified is 14 points, and the numbers that can be specified are I0 to
ID.
● Add the index register to the relay, memory area, or constant you want to modify, and then
write the modifying value (16-bit data) to the index register.

<Example> Transferring the contents of data register DT100 to the number specified
by the contents of an index register

X0
F0 MV DT100 I0DT0

Reference memory area

In this example, the number of the destination data register varies depending on the contents of
I0 with DT0 acting as a base. For example, when I0 is K10, the destination will be DT10, and
when the I0 is K20, the destination will be DT20.
● In this way, index registers allow the specification of multiple memory areas with a single
instruction, and thus index registers are very convenient when handling large amounts of
data.

33.5.2 Index Modification Applicable Areas

● Index registers can be used to modify other types of memory areas in addition to data
register DT.
<Example> I0WX10, I2WY1, I3WR0, IASV0, IBEV2
● Constants can also be modified.
<Example> I0K10, I0H1001
● When a 32-bit constant is modified, the index registers of the specified number and the
following number are used in combination to handle the data as 32-bit data. The result of the
modification is 32-bit data.

Upper 16 bits Lower 16 bits

Content of I1 Content of I0

(Note 1) When modifying a 32-bit constant, do not specify the ID. Be aware that a syntax error will not occur
even if this is specified.

33-16 WUME-FPXHPGRG-021
33.5 How to Use the Index Register

33.5.3 Example of Using an Index Register

■ When external data is read successively


<Example> Writing the contents of input WX3 sequentially from data register DT0

(1) When X0 is ON, index register I0 is set to 0.


(2) When X1 turns ON, the content of input WX3 is transferred to the data register specified by I0DT0.
Adds 1 to I0.
In this case, the content of I0 changes in sequential order, so the write destination of the data register
becomes as shown below.

Input of X1 Content of I0 Data writing destination


(3)
1st time 0 DT0
2nd time 1 DT1
3rd time 2 DT2

■ Inputting and outputting data according to the number specified by input


<Example 1> Setting a timer with a number specified by a digital switch

PLC

2 0 7 9 4 Set timer value

WX1 WX0

Digital switches

WUME-FPXHPGRG-021 33-17
33.5 How to Use the Index Register

(1) Timer number data WX1 is converted from BCD data to BIN data, and is set to index register I0.
Timer setting value data WX0 is converted from BCD data to BIN data, and is stored in the timer setting
(2)
value area SV specified by the content of I0.

<Example 2> External output of the timer process value with the number specified
by the digital switch
WX3

Display timer 7-segment display


elapsed value

PLC

Set the timer number 1 Digital switches

WX1

(1) Timer number data WX1 is converted from BCD data to BIN data, and is set to index register I0.
The content of timer process value data EV specified by the content of I0 is converted to BCD data, and
(2)
output to output WY3.

33-18 WUME-FPXHPGRG-021
33.6 Handling BCD Data

33.6 Handling BCD Data


(1) What is BCD?
BCD or binary coded decimal refers to a decimal number that is divided into single digits and
expressed by binary numbers.

<Example> Decimal number expressed in BCD

Decimal 6 45
Each digit is
converted to
binary
BCD
(binary coded 0110 0100 0101→H645
decimal)
(2) Handling of BCD data in the PLC
● When inputting data from a digital switch to the PLC or outputting data to a 7-segment
display (with decoder), the input or output must be BCD data. In this case, use a data
conversion instruction as shown in the examples below.
● BCD arithmetic instructions (F40 through F58) also exist that can operate directly on BCD
data. However, since operations in the PLC are usually processed in BIN, it is more
convenient to use BIN operation instructions (F20 through F38).

■ Inputting from a digital switch


Use the F81 BIN instruction as the BCD to BIN conversion instruction.

Digital switch 1 9 9 2

BCD
PLC ↓(Converted by F81 BIN)
BIN

1 9 9 2

Data read into PLC 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0


(BCD data)

Data processed inside PLC


0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0
(BIN data)
Converted to 1992 in decimal

WUME-FPXHPGRG-021 33-19
33.6 Handling BCD Data

■ Outputting to a 7-segment display (with decoder)


Use the F80 BCD instruction as the BIN to BCD conversion instruction.

BIN
PLC ↓ (Converted by F80 BCD)
BCD

7-segment display

Data processed inside PLC


0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 0
(BIN data)

Data output from PLC


0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0
(BCD data)

1 9 9 2

33-20 WUME-FPXHPGRG-021
33.7 Precautions for Programming

33.7 Precautions for Programming


<Example 1>

Programs that do not execute correctly

● If X1 turns ON first, Y10 does not turn ON even if X0 is ON.

Rewritten Program

<Example 2>

Programs that do not execute correctly

● Regardless of whether X0 is ON or OFF, if X1 is ON, TMX5 becomes active.

Rewritten program

<Example 3>

WUME-FPXHPGRG-021 33-21
33.7 Precautions for Programming

Programs that do not execute correctly

● If X2 is ON first, even if X0 is ON, Y11 does not turn ON.

Rewritten program

● When a combination of contacts are set as the execution condition of a differential instruction
(DF) or timer instruction, do not use an AND stack, push stack, read stack, or pop stack
instruction.

33-22 WUME-FPXHPGRG-021
33.8 Rewrite Function During RUN

33.8 Rewrite Function During RUN

33.8.1 Operation of Rewrite During RUN

■ How Rewrite During RUN Works


A program can be rewritten even during"RUN mode".
When attempting to rewrite a program during RUN, the tool service time is temporarily
extended, the program rewritten, and operation is resumed without changing the mode.
For this reason, the scan time of one scan when rewriting during RUN is extended by several
ms to several hundred ms.

■ Controller Operation During Rewrite


(1) External output (Y) is held.
(2) External input (X) is ignored.
(3) Timer (T) stops the clock.
Rise and fall changes in the inputs of the differential instructions (DF), counter instructions (C), and right/
(4)
left shift registers are ignored.
(5) Interrupt functions are stopped.
(6) Internal clock relays (special internal relays) are also stopped.
(7) Pulse output is stopped for the duration.

■ Setting Values for Timer/Counter Instructions


All set values specified with K constants for timer and counter instructions are preset to the set
value SV area with corresponding numbers. (Values in elapsed value area EV do not change.)

■ Operation of the Rewrite During RUN Completion Flag


The rewrite during RUN completion flag (R9034) is a special internal relay that turns ON only
for the first scan after rewrite during RUN is complete. It can be used instead of the initial pass
relay following a change in a program.

33.8.2 When Rewriting During RUN is not Possible

■ When the timeout message is displayed


Even if the timeout message is displayed, it is likely that the PLC has been rewritten.
The ladder edit remains, so take the system offline, complete the program changes in the tool
software, then change to online mode to check.

■ When timeout occurs using the GT series display unit through mode
Use GTWIN to extend the timeout period of the display unit. (The default value is 5 seconds.)
Select"Transfer"fromFilein the menu bar to open the data transfer screen.
Select"Communication Conditions"from the data transfer screen to open the communication
settings screen. The"Timeout"item displays the number of seconds, so change this value. Click
the[OK]button to complete the setting change.

WUME-FPXHPGRG-021 33-23
33.8 Rewrite Function During RUN

● When Rewriting During RUN is not Possible


1. When the result of rewriting is a syntax error, rewriting is not possible.
[Specific example]
When the rewriting would not form a pair of the following instructions
a) Step ladder instructions (SSTP/STPE)
b) Subroutine instructions (SUB/RET)
c) Interrupt instructions (INT/IRET)
d) JP/LBL
e) LOOP/LBL
f) MC/MCE
Rewriting is not possible in the case of other syntax errors.
2. Rewriting during RUN is not possible during forced input/output operation.
● Interrupt processing restrictions
Do not perform a rewrite during RUN when using interrupt, high-speed counter, pulse output,
or PWM output functions.
Note that when executing a rewrite during RUN, the following operations will occur.
1. Interrupt programs will be disabled. Re-enable with an ICTL instruction.

e.g. When using R9034 (Completion flag for rewrite during RUN)

2. The high-speed counter will continue counting.


Target value match ON/OFF instructions (F166 HC1S/F167 HC1R) will continue.
Matching interrupt programs will be disabled during execution of the F166 HC1S/F167
HC1R instruction.
3. The pulse output and PWM output will be stopped.
Status Instruction number Name
Pulse output (with channel specification)
Continue F171 SPDH
(Home return)
Pulse output (with channel specification)
Stop F172 PLSH
(JOG operation)
Stop F173 PLSH PWM Output (with channel specification)
Pulse output (with channel specification)
Continue F174 SP0H
(Optional data table control operation)
Continue F175 SPSH Pulse output (linear interpolation)
Stop F380 POSST Positioning table start instruction
Stop F381 JOGST JOG operation start instruction
Stop F383 MPOST Positioning table simultaneous start instruction

4. Fixed time sampling trace will not be stopped.

33-24 WUME-FPXHPGRG-021
33.8 Rewrite Function During RUN

33.8.3 Method and Operation of Rewriting during RUN

Items FPWIN GR7 input


Up to 512 steps.
Changes are made in block units.
The program is rewritten online, when PB conversion is executed.

Rewrite method
Block a Block b

If instructions that were written in block a are deleted in block b, the status prior to the
OT/KP
rewriting is held.
● If instructions that were written in block a are deleted in block b, the status prior to the
rewriting is held.
TM/CT ● The set values specified by K constants in TM/CT instructions are preset to the SVs
of all the corresponding numbers in the program.
Unique operation of each instruction

(Elapsed value EV does not change)


Fun high-level If instructions that were written in block a are deleted in block b, the status prior to the
instructions rewriting is held.
MC/MCE Always write MC/MCE instructions as a pair.
CALL/
A subroutine is a program that appears between SUBn and RET instructions.
SUB/
Always write a subroutine to an address that comes after the ED instruction.
RET
An interrupt program is a program that appears between INTn and IRET instructions.
INT/IRET
Always write a subroutine to an address that comes after the ED instruction.
SSTP/ Processes that have the same number cannot be defined in duplicate.
STPE SSTP instructions cannot be written inside subprograms.
JP/
Always write the instruction for setting the number of loops before the LBL-LOOP
LOOP/
instructions.
LBL

WUME-FPXHPGRG-021 33-25
33.9 Processing During Forced Input/Output

33.9 Processing During Forced Input/Output

■ Processing when forced input/output is initiated during RUN

Forced reset/reset processing A


PLC
External input → X
External output → Y
I/O refresh

Forced reset/reset processing B

Operation

Forced reset/reset processing

Peripheral services

1. Processing of external input (X)


● For a contact for which forced input/output is specified, the forced ON/OFF operation
takes precedence regardless of the state of the input from the input device in procedure
B in the above flowchart. The input LED will not blink at this time; however, the area of
input X in the operation memory will be overwritten.
● For contacts for which forced input/output is not specified, the ON/OFF state is read
according to the input state from the input device.
2. Processing of external output (Y)
● For a contact for which forced input/output is specified, the forced ON/OFF operation
takes precedence regardless of the operation result in procedure A in the above
flowchart. The area of output Y in the operation memory will be forcibly overwritten at this
time. External output will occur at the input/output refresh timing in the above figure.
● For contacts for which forced input/output is not specified, the ON/OFF state is
determined by the operation result.
3. Processing of timer (T)/counter (C)
● For a contact for which forced input/output is specified, the forced ON/OFF operation
takes precedence regardless of the input condition of the timer/counter. The contact of
the timer (T)/counter (C) in the operation memory is overwritten at this time.
Timing and counting will not be performed during control.
● For contacts for which forced input/output is not specified, the ON/OFF state is
determined by the contents of the operation result.
Operation during operation
Forcibly controlled internal relay R and output Y are overwritten according to the operation
result.

33-26 WUME-FPXHPGRG-021
Appendix Reference Material
Operation Memory Area.............................................................................App-2
List of System Registers ............................................................................App-4
List of System Registers ............................................................................ App-4
List of Special Relays.................................................................................App-16
List of Special Data Registers....................................................................App-30
Communication Commands.......................................................................App-47
List of MEWTOCOL Supported Commands .............................................. App-47
List of MODBUS Supported Commands.................................................... App-48
Positioning Memory ...................................................................................App-49
Configuration of Memory Map.................................................................... App-49
Common Area (Memory Area No. 0) ......................................................... App-50
Axis Information Area (Memory Area No. 1) .............................................. App-51
Axis Setting Area (Memory Area No. 2) ..................................................... App-52
Positioning Table Area (Memory Area No. 3)............................................. App-54
List of Error Codes .....................................................................................App-56
List of Syntax Check Errors ....................................................................... App-56
Self-diagnostic Errors................................................................................. App-57
List of MEWTOCOL-COM Communication Error Codes ........................... App-58
List of MODBUS Communication Error Codes .......................................... App-59
BIN/HEX/BCD Code Correspondence Table .............................................App-60
ASCII Code Table, JIS8 Code Table ..........................................................App-61

WUME-FPXHPGRG-021 App-1
Operation Memory Area

Operation Memory Area

■ List of operation memory areas


Specifications
Items
C14 C30 / C60

External input (X)(Note 1) 1760 points (X0 to X109F)

External output (Y)(Note 1) 1760 points (Y0 to Y109F)

Internal relay (R)(Note 2) 4096 points (R0 to R255F) or 8192 points (R0 to R511F)

Link relay (L) 2048 points (L0 to L127F)


Relay

1024 points (1008 points for Timer: T0 to T1007, 16 points for


Counter: C1008 to C1023)
Timer / Counter (T/C)
Timer: Can be measured up to (in 1 msec / 10 msec / 100 msec / 1
(Note 3)
sec unit) x 32767.
Counter: Can be measured up to 1 to 32767.
Special internal relay (R) 256 points (R9000 to R915F)
External input (WX) 110 words (WX0 to WX109)
External output (WY) 110 words (WY0 to WY109)

Internal relay (WR) 256 words (WR0 to WR255) or 512 words (WR0 to WR511)(Note 2)
Link relay (WL) 128 words (WL0 to WL127)
12285 words
(DT0 to DT12284)
12285 words 32765 words
Memory area

Data register (DT)(Note 4)


(DT0 to DT12284) (DT0 to DT32764)
65533 words
(DT0 to DT65532)
Special data register (DT) 500 words (DT90000 to DT90499)
Link data register (LD) 256 words (LD0 to LD255)
Timer / counter set value
1024 words (SV0 to SV1023)
area (SV)
Timer / counter elapsed value
1024 words (EV0 to EV1023)
area (EV)
Index register (I) 14 words (I0 to ID)
K-32,768 to K32,767 (for 16-bit operation)
Decimal constants (K)
K-2,147,483,648 to K2,147,483,647 (for 32-bit operation)
Constant

H0 to HFFFF (for 16-bit operation)


Hexadecimal constants (H)
H0 to HFFFFFFFF (for 32-bit operation)

F-1.175494 x 10-38 to F-3.402823 x 1038


Floating point type real numbers (f)
F 1.175494 x 10-38 to F 3.402823 x 1038
1800 words
Positioning memory Out of these words, positioning table area: 20 tables for each
channel, 250 words

App-2 WUME-FPXHPGRG-021
Operation Memory Area

(Note 1) The number of points in the above table is the number of points of operation memory. The number of
points actually available to be used as I/O points is determined by the hardware combination.
(Note 2) Can be selected by the setting of the system register no. 1 (internal relay capacity). To provide
compatibility with the conventional FP-X Series Control Unit, select 4,096 points.
(Note 3) The number of timer / counter points can be changed by the setting of the system register no.5.
(Note 4) When the system register no.0 (sequence program capacity setting) is changed, the data register (DT)
capacity also changes.

Program capacity 24K 32K 40K


Data register capacity C30 / C60 65533 words 32765 words 12285 words
(Note 5) For details on retention and non-retention areas, refer to FP-XH User's Manual (Basic).
(Note 6) For details on the configuration of positioning memory, refer to the FP-XH User’s Manual (Positioning /
PWM Output / High-speed Counter).

WUME-FPXHPGRG-021 App-3
List of System Registers

List of System Registers

List of System Registers

No. Name Default Setting range and description


16 C14: 16K words (fixed)
Memory Allocation

Setting of sequence program area


0
size 32 C30 / C60: 24, 32, 40K words(Note 1)(Note 2)

1 Internal relay area size 8192 4096, 8192(Note 3)

5 Counter starting address 1008 0 to 1024


Hold type area starting address for
6 1008 0 to 1024
timer / counter
Hold type area starting address for
Hold / Non-hold 1

7 504 0 to 512
internal relay
C14:12230 (Note 2)(Note 4)
Hold type area starting address for
8 C30/C60: 0 to 65533
data registers
32450
14 Holding the step ladder Non-hold Hold / Non-hold
Leading edge detection of the
4 differential instruction during MC Hold Hold / Non-hold
holds the previous value
Hold type area starting word
10 address setting for link relays for PC 64 0 to 64
(PLC) link W0-0

Hold type area starting word


Hold / Non-hold 2

11 address setting for link relays for PC 128 64 to 128


(PLC) link W0-1

Hold type area starting word


12 address setting for link data 128 0 to 128
registers for PC (PLC) link W0-0

Hold type area starting word


13 address setting for link data 256 128 to 256
registers for PC (PLC) link W0-1

Disable settings for duplicated


20 Disable Disable / Enable
output
Stop operation when an I/O
23 Stop Stop / Run
verification error occurs
Action on Error

Stop operation when positioning


25 Run Run / Stop
operation error occurs
Stop operation when calculating
26 Stop Stop / Run
error occurs
The self-diagnostic error is not
4 Alarm the battery abnormality No No: notified in case of battery error, and
the "ERR.LED" does not flash.

App-4 WUME-FPXHPGRG-021
List of System Registers

No. Name Default Setting range and description


The self-diagnostic error is notified
Yes: in case of battery error, and the
"ERR.LED" flashes.

(Note 1) The system register no. 0 (Setting of sequence program area size) can be set only in off-line editing.
To make the setting effective, you need to download it to the Control Unit.
(Note 2) If you change the system register no. 0 (Setting of sequence program area size), the size of the data
register DT will be changed.
(Note 3) Select "4096" points for the system register no. 1 (Internal relay area size) to remain compatibility
between the conventional FP-X Control Unit and the hold area when power supply is turned OFF.
(Note 4) The data in the range set by the system register is retained only when a backup battery is installed.
Use the default values as they are when the battery is not installed.

No. Name Default Setting range and description


Waiting time for managing multiple
31 6500.0 ms 10 to 81900 ms (in 2.5 ms unit)
frame
SEND / RECV / RMRD / RMWT 10000.0
32 10 to 81900 ms (in 2.5 ms unit)
instruction waiting time ms
Time setting

Normal 0: Normal scan (in 0.5 ms unit)


34 Constant scan time
scan 0 to 350 ms: Scan at a specified time interval
0 to 10 seconds (in 0.1 second unit)
36 Expansion unit recognition time 0
0: No waiting time

37 Task time priority setting(Note 1) Standard Normal / Operation

40 Size of link relays 0 0 to 64 words


41 Size of link data registers 0 0 to 128 words
Send area starting word address of
42 0 0 to 63
link relay
PC link W0-0 setting

Size of link relays used for send


43 0 0 to 64 words
area
Send area starting address of link
44 0 0 to 127
data register
Size of link data registers used for
45 0 0 to 127 words
send area
46 PC (PLC) link switch flag Normal Normal / Reverse
MEWNET-W0
47 16 1 to 16
PC (PLC) link max. station no.

48 PC (PLC) link baud rate(Note 2) 115200 bps 115200 bps / 230400 bps

50 Size of link relays 0 0 to 64 words


PC link W0-1 setting

51 Size of link data registers 0 0 to 128 words


Send area starting word address of
52 64 64 to 127
link relay
Size of link relays used for send
53 0 0 to 64 words
area
Send area starting address of link
54 128 128 to 255
data register

WUME-FPXHPGRG-021 App-5
List of System Registers

No. Name Default Setting range and description


Size of link data registers used for
55 0 0 to 127 words
send area
MEWNET-W0
57 16 1 to 16
PC (PLC) link max. station no.

(Note 1) By selecting "Operation", the time taken for the communication processing is reduced for one port per
scan. The operation processing takes priority.
(Note 2) The system register no. 48 (PLC link baud rate) is set in the same dialog box for the COM0 port and
COM1 port settings.

■ FP-XH transistor type


No. Name Default Setting range and description
Not Set X0 as High Speed Counter
CH0: Addition input (X0)
Not Set X0 as Subtraction input (X0)
High Speed 2 phase input (X0, X1)
Counter One input (X0, X1)
Direction distinction (X0, X1)
X0: Normal input
Normal input(Note J-point positioning start input of pulse output
4) CH0

CH1: Not Set X1 as High Speed Counter


Control Unit input settings (HSC)

Not Set X1 as Addition input (X1)


High Speed
Counter Subtraction input (X1)

X1: Normal input


High-speed counter setting Normal input(Note J-point positioning start input of pulse output
400 4) CH1
(X0 to X3)
Not Set X2 as High Speed Counter
CH2: Addition input (X2)
Not Set X2 as Subtraction input (X2)
High Speed 2 phase input (X2, X3)
Counter One input (X2, X3)
Direction distinction (X2, X3)
X2: Normal input
Normal input Home input of pulse output CH4 (C60 only)
CH3: Not Set X3 as High Speed Counter
Not Set X3 as Addition input (X3)
High Speed
Counter Subtraction input (X3)

X3: Normal input


Normal input Home input of pulse output CH5 (C60 only)

(Note 1) When the high-speed counter CH0, CH2, CH4 and CH6 are set to one of 2-phase, individual and
direction distinction, the setting of CH1, CH3, CH5 and CH7 are invalid.
(Note 2) The hard reset input of the high-speed counter is available only for CH0 and CH2. X6 can be allocated
to CH0 and X7 can be allocated to CH2.

App-6 WUME-FPXHPGRG-021
List of System Registers

(Note 3) If the same input is set to the high-speed counter, pulse catch, and interrupt input, the priority order is
as follows; 1. High-speed counter, 2. Pulse catch, 3. Interrupt input.
<Example> When the high-speed counter is used in the addition input mode, specifying X0 as
interrupt input or pulse catch input will be invalid, and X0 will be activated as the counter input of the
high-speed counter.
(Note 4) When the positioning control mode setting is set to FP-X compatibility instruction mode, the J-point
positioning start input cannot be selected.

No. Name Default Setting range and description


Not Set X4 as High Speed Counter
CH4: Addition input (X4)
Not Set X4 as Subtraction input (X4)
High Speed 2 phase input (X4, X5)
Counter One input (X4, X5)
Direction distinction (X4, X5)
X4: Normal input
Normal input Home input of pulse output CH0
CH5: Not Set X5 as High Speed Counter
Not Set X5 as
Control Unit input settings (HSC / PLS)

Addition input (X5)


High Speed
Counter Subtraction input (X5)

X5: Normal input


Normal input Home input of pulse output CH1
High-speed counter / pulse
output setting Not Set X6 as High Speed Counter
401
(X4 to X7) CH6: Addition input (X6)
Not Set X6 as Subtraction input (X6)
High Speed 2 phase input (X6, X7)
Counter One input (X6, X7)
Direction distinction (X6, X7)
Normal input
X6:
Home input of pulse output CH2
Normal input
Reset input of high-speed counter CH0
CH7: Not Set X7 as High Speed Counter
Not Set X7 as Addition input (X7)
High Speed
Counter Subtraction input (X7)

Normal input
X7:
Home input of pulse output CH3
Normal input
Reset input of high-speed counter CH2

(Note 1) When the high-speed counter CH0, CH2, CH4 and CH6 are set to one of 2-phase, individual and
direction distinction, the setting of CH1, CH3, CH5 and CH7 are invalid.
(Note 2) The hard reset input of the high-speed counter is available only for CH0 and CH2. X6 can be allocated
to CH0 and X7 can be allocated to CH2.
(Note 3) If the same input is set to the high-speed counter, pulse catch, and interrupt input, the priority order is
as follows; 1. High-speed counter, 2. Pulse catch, 3. Interrupt input.
<Example> When the high-speed counter is used in the addition input mode, specifying X0 as
interrupt input or pulse catch input will be invalid, and X0 will be activated as the counter input of the
high-speed counter.

WUME-FPXHPGRG-021 App-7
List of System Registers

(Note 4) X4 to X7 can be also used as the home input of the pulse output CH0 to CH3. Select this input when
using home input for the home return function of pulse output. In that case, X4 to X7 cannot be set as
the high-speed counter.

■ FP-XH transistor type


No. Name Default Setting range and description

Positioning control start Table setting mode


407 Table setting mode
setting FP-X compatible instruction mode
Normal output (Y0, Y1)
Normal output (Y0, PWM output (Y0), Normal output (Y1)
CH0:
Y1) Pulse output [Table setting mode] (Y0, Y1)
Pulse output (Y0, Y1)
Control Unit output settings 2 (PLS / PWM)

Normal output (Y2, Y3)


Normal output (Y2, PWM output (Y2), Normal output (Y3)
CH1:
Y3) Pulse output [Table setting mode] (Y2, Y3)
Pulse output (Y2, Y3)
Normal output (Y4, Y5)
Normal output (Y4, PWM output (Y4), Normal output (Y5)
Pulse / PWM CH2:
Y5) Pulse output [Table setting mode] (Y4, Y5)
402 output setting
Pulse output (Y4, Y5)
(Y0 to YB)
Normal output (Y6, Y7)
Normal output (Y6, PWM output (Y6), Normal output (Y7)
CH3:
Y7) Pulse output [Table setting mode] (Y6, Y7)
Pulse output (Y6, Y7)
Normal output (Y8, Y9)
Normal output (Y8,
CH4: Pulse output [Table setting mode] (Y8, Y9)
Y9)
Pulse output (Y8, Y9)
Normal output (YA, YB)
Normal output (YA,
CH5: Pulse output (YA, YB)
YB)
PWM output (YA), Normal output (YB)
X0 X1 X2 X3 X4 X5 X6 X7
Interrupt edge setting Interrupt / pulse catch settings

Controller input
403 Pulse catch input setting Not set
The pressed contact is set as pulse catch
input.

X0 X1 X2 X3 X4 X5 X6 X7
Controller input
404 Interrupt input settings Not set
The pressed contact is set as pulse catch
input.

X0 X1 X2 X3 X4 X5 X6 X7
Leading edge
Control Unit input interrupt X0 X1 X2 X3 X4 X5 X6 X7
405 Leading edge
Edge settings Trailing edge
The pressed contacts are set as leading and
trailing edges.

App-8 WUME-FPXHPGRG-021
List of System Registers

(Note 1) If the no. 407 (Positioning control start setting) is changed, the selection of the no. 402 (Pulse / PWM
output setting) will be switched.
(Note 2) For using the pulse output [Table setting mode] function, pulse output function and PWM output
function, the Control Unit output setting must be set. The output specified for the pulse output and
PWM output cannot be used as normal output.
(Note 3) If the same input is set to the high-speed counter, pulse catch, and interrupt input, the priority order is
as follows; 1. High-speed counter, 2. Pulse catch, 3. Interrupt input.
<Example> When the high-speed counter is used in the addition input mode, specifying X0 as
interrupt input or pulse catch input will be invalid, and X0 will be activated as the counter input of the
high-speed counter.
(Note 4) The settings of Nos. 403 to 406 are specified for each contact on the screen.

■ FP-XH relay type


No. Name Default Setting range and description

Positioning control start Table setting mode


407 Table setting mode
setting FP-X compatible instruction mode

Not Set X100 as High Speed Counter


2 phase input (X100,
X101)
2 phase input (X100, Reset input
X101) (X102)
Addition input (X100)
Reset input
Addition input (X100)
(X102)
CH8:
Not Set X100 as Subtraction input (X100)
Pulse I/O cassette setting (HSC / PLS)

High Speed
Reset input
Counter Subtraction input (X100)
(X102)
One input (X100, X101)
Reset input
One input (X100, X101)
(X102)
High-speed counter setting
(X100 to X102) Direction distinction
400 (X100, X101)
Direction distinction Reset input
(X100, X101) (X102)

X100: Normal input


Normal output J-point positioning start input of pulse output
(Note 7) CH0

Not Set X101 as High Speed Counter


Addition input (X101)
CH9:
Reset input
Not Set X101 as Addition input (X101)
(X102)
High Speed
Counter Subtraction input (X101)
Reset input
Subtraction input (X101)
(X102)

CH0:
Pulse output settings Normal output (Y100, Y101)
Normal output

WUME-FPXHPGRG-021 App-9
List of System Registers

No. Name Default Setting range and description


Pulse output [Table setting mode] (Y100,
Y101)
(Y100 to Y101)
Pulse output (Y100, Y101)
PWM output (Y100), Normal output (Y101)

(Note 1) If the no. 407 (Positioning control start setting) is changed, the selection of the no. 400 (Pulse/ PWM
output setting) will be switched.
(Note 2) When the operation mode is set to 2-phase, individual, or direction distinction, the settings of CH9 in
system register no. 400 are invalid.
(Note 3) When the reset input settings are overlapped, priority is given to the setting of CH9 in system register
no.400 and the setting of CHB in no.401.
(Note 4) The CH8, CH9, and CH0 input signals in no. 400 are the signals when the Pulse I/O Cassette (AFPX-
PLS) is installed on the cassette mounting part 1.
(Note 5) The output cannot be used as a normal output if the operation mode is set for the pulse output CH0. If
the operation mode is set to 1 for the pulse output CH0, reset input settings for the high-speed
counters CH8 and CH9 are invalid.
(Note 6) For using the pulse output [Table setting mode] function, pulse output function and PWM output
function, the Control Unit output setting must be set. The output specified for the pulse output and
PWM output cannot be used as normal output.
(Note 7) When the positioning control mode setting is set to FP-X compatibility instruction mode, the J-point
positioning start input cannot be selected.

No. Name Default Setting range and description

Not Set X200 as High Speed Counter


2 phase input (X200,
X201)
2 phase input (X200, Reset input
X201) (X202)
Addition input (X200)
Reset input
Addition input (X200)
Pulse I/O cassette setting (HSC / PLS)

(X202)
CHA:
Not Set X200 as Subtraction input (X200)
High Speed
Reset input
Counter Subtraction input (X200)
(X202)
High-speed counter setting One input (X200, X201)
401
(X200 to X202) Reset input
One input (X200, X201)
(X202)
Direction distinction
(X200, X201)
Direction distinction Reset input
(X200, X201) (X202)

Normal input
X200:
J-point positioning start input of pulse output
Normal input
CH1
CHB:
Not Set X201 as High Speed Counter
Not Set X201 as
High Speed Addition input (X201)
Counter

App-10 WUME-FPXHPGRG-021
List of System Registers

No. Name Default Setting range and description


Reset input
Addition input (X201)
(X202)
Subtraction input (X201)
Reset input
Subtraction input (X201)
(X202)

Normal output (Y200, Y201)


Pulse output [Table setting mode] (Y200,
Pulse output settings CH1:
Y201)
(Y200 to Y201) Normal output
Pulse output (Y200, Y201)
PWM output (Y200), Normal output (Y201)

(Note 1) If the no. 407 (Positioning control start setting) is changed, the selection of the no. 401 (Pulse / PWM
output setting) will be switched.
(Note 2) When the operation mode is set to 2-phase, individual, or direction distinction, the settings of CHB in
system register no. 401 are invalid.
(Note 3) When the reset input settings are overlapped, priority is given to the setting of CH9 in system register
no.400 and the setting of CHB in no.401.
(Note 4) The CHA, CHB, and CH1 input signals in no. 401 are the signals when the Pulse I/O Cassette (AFPX-
PLS) is installed on the cassette mounting part 2.
(Note 5) The output cannot be used as a normal output if the operation mode is set for the pulse output CH1. If
the operation mode is set to 1 for the pulse output CH1, reset input settings for the high-speed
counters CHA and CHB are invalid.
(Note 6) For using the pulse output [Table setting mode] function, pulse output function and PWM output
function, the Control Unit output setting must be set. The output specified for the pulse output and
PWM output cannot be used as normal output.

■ FP-XH relay type


No. Name Default Setting range and description

CH0: Not Set X0 as High Speed Counter


Not Set X0 as Addition input (X0)
High Speed Subtraction input (X0)
Counter 2 phase input (X0, X1)

CH1: Not Set X1 as High Speed Counter


Control Unit input settings (HSC)

Not Set X1 as Addition input (X1)


High Speed Subtraction input (X1)
Counter 2 phase input (X0, X1)

High-speed counter CH2: Not Set X2 as High Speed Counter


402 setting Addition input (X2)
Not Set X2 as
(X0 to X7) High Speed Subtraction input (X2)
Counter 2 phase input (X2, X3)

CH3: Not Set X3 as High Speed Counter


Not Set X3 as Addition input (X3)
High Speed Subtraction input (X3)
Counter 2 phase input (X2, X3)
Not Set X4 as High Speed Counter
CH4: Addition input (X4)
Subtraction input (X4)

WUME-FPXHPGRG-021 App-11
List of System Registers

No. Name Default Setting range and description


Not Set X4 as
High Speed 2 phase input (X4, X5)
Counter

CH5: Not Set X5 as High Speed Counter


Not Set X5 as Addition input (X5)
High Speed Subtraction input (X5)
Counter 2 phase input (X4, X5)

CH6: Not Set X6 as High Speed Counter


Not Set X6 as Addition input (X6)
High Speed Subtraction input (X6)
Counter 2 phase input (X6, X7)

CH7: Not Set X7 as High Speed Counter


Not Set X7 as Addition input (X7)
High Speed Subtraction input (X7)
Counter 2 phase input (X6, X7)

(Note 1) For counting 2-phase inputs, only CH0, CH2, CH4 and CH6 can be used. When specifying 2-phase
input to CH0, CH2, CH4, or CH6, provide the same setting although the setting for CH1, CH3, CH5, or
CH7 that corresponds to each CH number is disregarded.
(Note 2) When system registers Nos. 400 to 404 are set for the same input contact simultaneously, the priority
order is as follows; 1. High-speed counter 2. Pulse catch 3. Interrupt input
<Example> When the high-speed counter is used in the addition input mode, specifying X0 as
interrupt input or pulse catch input will be invalid, and X0 will be activated as the counter input of the
high-speed counter.

No. Name Default Setting range and description


Interrupt / pulse catch settings

Pulse catch input


403 Not set
setting
The pressed contact is set as pulse catch input.

404 Interrupt input settings Not set


The pressed contact is set as interrupt input.

Effective interrupt edge


405 setting for Control Unit Leading edge
Interrupt edge settings

え input
The pressed contacts are set as leading and trailing
edges.

Pulse I/O cassette


406 Leading edge
interrupt edge setting

The pressed contacts are set as leading and trailing


edges.

App-12 WUME-FPXHPGRG-021
List of System Registers

(Note 1) For counting 2-phase inputs, only CH0, CH2, CH4 and CH6 can be used. When specifying 2-phase
input to CH0, CH2, CH4, or CH6, provide the same setting although the setting for CH1, CH3, CH5, or
CH7 that corresponds to each CH number is disregarded.
(Note 2) The settings of Nos. 403 to 406 are specified for each contact on the screen.
(Note 3) When system registers Nos. 400 to 404 are set for the same input contact simultaneously, the priority
order is as follows; 1. High-speed counter 2. Pulse catch 3. Interrupt input
<Example> When the high-speed counter is used in the addition input mode, specifying X0 as
interrupt input or pulse catch input will be invalid, and X0 will be activated as the counter input of the
high-speed counter.

No. Name Default Setting range and description


410
Unit No. 1 1 to 99
411
Computer Link
General-purpose communication
Communication mode Computer Link
412 PC(PLC) Link
MODBUS RTU
Modem connection No Yes / No

Data length: 8 Data length: 7bits / 8bits


bits Parity check: None / Odd / Even
413 Parity check: Stop bit: 1 / 2
Transmission format
414 Odd Terminator selection: Code / Time
Stop bit: Terminator: CR / CR+LF / None
COM0 / COM1 / COM2 / COM3 port setting

1 bit Header: STX not exist. / STX exists


2400 bps, 4800 bps, 9600 bps, 19200 bps,
415 Baud rate 9600 bps 38400 bps, 57600 bps, 115200 bps, 230400
bps
(COM1) Receive buffer
starting address during
416 general-purpose 0 0 to 65532
communication

(COM1)
417 Receive buffer size during 2048 0 to 2048
general-purpose
communication
(COM2) Receive buffer
starting address during
418 general-purpose 2048 0 to 65532
communication

(COM2)
419 Receive buffer size during 2048 0 to 2048
general-purpose
communication
(COM0) Receive buffer
starting address during
420 general-purpose 4096 0 to 65532
communication

421 (COM0) 2048 0 to 2048

WUME-FPXHPGRG-021 App-13
List of System Registers

No. Name Default Setting range and description


Receive buffer size during
general-purpose
communication
(COM3) Receive buffer
starting address during
422 general-purpose 6144 0 to 65532
communication

(COM3)
423 Receive buffer size during 2048 0 to 2048
general-purpose
communication
(COM0)
424 Terminator judgement time 0
(x 0.01 ms)
(COM1)
425 Terminator judgement time 0
(x 0.01 ms) 0 or 1 to 10000 (0.01 ms to 100 ms)
When terminator judgement time is 0,
(COM2) transmission time is that for approx. 4 bytes.
426 Terminator judgement time 0
(x 0.01 ms)
(COM3)
427 Terminator judgement time 0
(x 0.01 ms)

(Note 1) When computer link or MODOBUS RTU is selected by No. 412 (Transmission mode), no. 413
(Transmission format) and no. 415 (Baud rate) can be set.
(Note 2) When selecting only the general-purpose communication in No. 412 (communication mode), you can
set no. 413: transmission format terminal selection, end and start codes. In addition, when selecting
the terminal as time only through no. 413, you can select no. 424 to no. 427.
(Note 3) The PC(PLC) link function is only available for COM0 or COM1 port. The transmission format is as
follows: data length: 8 bits, parity: odd, stop bit: 1 bit (fixed). In addition, select the baud rate in PC link
W0-0 system register no. 48 item.

No. Name Default Setting range and description


Time constant setting of
430 Control Unit input 1
Time constant setting of Control Unit input

X0 to X3
None
Time constant setting of
Control Unit input 1 1 ms
431
X4 to X7 2 ms
4 ms
Time constant setting of
Control Unit input 2 8 ms
432 None
X8 to XB 16 ms
32 ms
Time constant setting of
Control Unit input 2 64 ms
433
XC to XF 128 ms
256 ms
Time constant setting of
434 Control Unit input 3
X10 to X13

App-14 WUME-FPXHPGRG-021
List of System Registers

No. Name Default Setting range and description


Time constant setting of
435 Control Unit input 3
X14 to X17
Time constant setting of
436 Control Unit input 4
X18 to X1B
Time constant setting of
437 Control Unit input 4
X1C to X1F

WUME-FPXHPGRG-021 App-15
List of Special Relays

List of Special Relays


WR900 (Specified in units of words)
Relay no. Name Description
Turns ON when a self-diagnostic error occurs.
R9000 Self-diagnostic error flag
→ The self-diagnostic result is stored in DT90000.
R9001 Not used
Function cassette I/O error Turns ON when an abnormality is detected in the I/O type
R9002
flag Function Cassette.
Turns ON when an abnormality is detected in the Function
R9003 Function cassette error flag
Cassette.
R9004 I/O verification error flag Turns ON when an I/O verification error is detected.
Turns ON when a battery error occurs.
Backup battery error flag
R9005 Even if you choose not to notify battery error in the system
(current type)
register, this is also ON when the battery runs out.
Turns ON when a battery error occurs.
Even if you choose not to notify battery error in the system
Backup battery error flag register, this is also ON when the battery runs out.
R9006
(hold) Once a battery error has been detected, this is held even after
recovery has been made.
→ It goes OFF if the power supply is turned OFF.
Turns ON when an operation error occurs after the unit has
started operating, and remains ON while the unit operation
Operation error flag (hold) continues.
R9007
(ER flag)
→ The address where the error occurred is stored in DT90017.
(It indicates the first operation error that has occurred.)
Turns ON every time an operation error occurs.
Operation error flag (latest) →The address where the operation error occurred is stored in
R9008
(ER flag) DT90018. Every time a new error occurs, the data will be
updated.
This flag is set when the operation result overflow or under flow
R9009 Carry flag (CY flag)
occurs, or when performing a shift system instruction.
Executes a comparison instruction, and turns ON if the result is
R900A > flag
larger.
Executes a comparison instruction, and turns ON if the result is
R900B = flag equal.
Executes operation instruction, and turns ON if the result is ‘0’.
Executes a comparison instruction, and turns ON if the result is
R900C < flag
smaller.
Executes the auxiliary timer instruction (F137 / F138), and turns
R900D Auxiliary timer contact ON after the lapsed of a set time. Turns OFF when the execution
condition turns to OFF.
R900E COM0 port communication Turns ON if a communication error is detected when using the
(R9130) error COM0 port.

Turns ON if the scan time exceeds the set time (system register
R900F Constant scan error flag no. 34) when performing the constant scan.
It also turns ON when 0 is set in the system register no. 34.

App-16 WUME-FPXHPGRG-021
List of Special Relays

(Note 1) The same function is allocated to the special internal relay in parentheses.

WR901 (Specified in units of words)


Relay no. Name Description
R9010 Always ON relay Always on.
R9011 Always OFF relay Always off.
R9012 Scan pulse relay Turns ON and OFF alternately at each scan.
Turns ON for only the first scan after operation (RUN) has been
R9013 Initial pulse relay (ON)
started, and turns OFF for the second and subsequent scans.
Turns OFF for only the first scan after operation (RUN) has been
R9014 Initial pulse relay (OFF)
started, and turns ON for the second and subsequent scans.
Step ladder Turns ON in the first scan only, following startup of any single
R9015
Initial pulse relay (ON) process, during stepladder control.

R9016 Not used


R9017 Not used

R9018 0.01-sec clock pulse relay Clock pulse with a 0.01-second cycle.

R9019 0.02-sec clock pulse relay Clock pulse with a 0.02-second cycle.

R901A 0.1-sec clock pulse relay Clock pulse with a 0.1-second cycle.

R901B 0.2-sec clock pulse relay Clock pulse with a 0.2-second cycle.

R901C 1-sec clock pulse relay Clock pulse with a 1-second cycle.

R901D 2-sec clock pulse relay Clock pulse with a 2-second cycle.

R901E 1-min clock pulse relay Clock pulse with a 1-minute cycle.

R901F Not used

WR902 (Specified in units of words)


Relay no. Name Description
Turns OFF while the mode selector is set to PROG.
R9020 RUN mode flag
Turns ON while the mode selector is set to RUN.
R9021 Not used
R9022 Not used

WUME-FPXHPGRG-021 App-17
List of Special Relays

Relay no. Name Description


R9023 Not used
R9024 Not used
R9025 Not used
Turns ON when the message display instruction (F149) is
R9026 Message flag
executed.
R9027 Not used
R9028 Not used
Turns ON during forced ON / OFF operation for input/output
R9029 Force flag
relays or timer / counter contacts.
R902A Interrupt enable flag Turns ON while the external interrupt trigger is enabled.
R902B Not used
Sampling by instruction = 0 Sampling at constant time intervals
R902C Sample point flag
=1
When the sampling operation stops = 1 When the sampling
R902D Sampling trace end flag
operation starts = 0
When the sampling stop trigger occurs = 1 When the sampling
R902E Sampling stop trigger flag
stop trigger stops = 0
R902F Sampling enable flag When sampling starts = 1 When sampling stops = 0

WR903 (Specified in units of words)


Relay no. Name Description
R9030 Not used
R9031 Not used
Turns ON when using the general-purpose communication
R9032 COM1 port communication mode function.
(R9139) flag Turns OFF when using a function other than the general-
purpose communication.
Off: Not executed
R9033 Print instruction execution flag
On: Being executed
This is a special internal relay which turns ON for only the
R9034 Program edit flag in RUN mode
first scan following the completion of rewriting in RUN mode.
R9035 Not used
R9036 Not used
Turns ON if a transmission error occurs when performing
R9037 COM1 port communication error data communication.
(R9138) flag Turns OFF when a transmission request is made by the
F159 (MTRN) instruction.

R9038 COM1 port reception done flag


Turns ON when the end code is received in the general-
during general-purpose
(R913A) purpose communication.
communication
Turns ON when the transmission ends in the general-
R9039 COM1 port transmission done purpose communication.
flag during general-purpose
(R913B) communication Turns OFF when the transmission is requested in the
general-purpose communication.

App-18 WUME-FPXHPGRG-021
List of Special Relays

Relay no. Name Description


R903A Not used
R903B Not used
R903C Not used
R903D Not used

R903E COM0 port reception done flag


Turns ON when the end code is received in the general-
during general-purpose
(R9132) purpose communication.
communication
Turns ON when the transmission ends in the general-
R903F COM0 port transmission done purpose communication.
flag during general-purpose
(R9133) communication Turns OFF when the transmission is requested in the
general-purpose communication.

(Note 1) R9030 to R903F will change even during one scanning cycle. In addition, the same functions are
allocated to the special internal relays in parentheses.

WR904 (Specified in units of words)


Relay no. Name Description
Turns ON when using the general-purpose communication
R9040 COM0 port communication mode function.
(R9131) flag Turns OFF when using a function other than the general-
purpose communication function.
R9041
COM1 port PC (PLC) link flag Turns ON when using the PC (PLC) link function.
(R913E)
Turns ON when using the general-purpose communication
R9042 COM2 port communication mode function.
(R9141) flag Turns OFF when using a function other than the general-
purpose communication function.
R9043 Not used
Indicates whether the F145 (SEND) or F146 (RECV)
COM1 port instruction can be executed or not for the COM1 port.
R9044
SEND / RECV instruction OFF: Not executable (Instruction is being executed)
(R913C)
execution flag
ON: Executable
Indicates the execution state of the F145 (SEND) or F146
COM1 port (RECV) instruction for the COM1 port.
R9045
SEND / RECV instruction OFF: Normal end
(R913D)
execution end flag ON: Abnormal end (Communication error occurs)
The error code is stored in DT90124.
R9046 Not used
Turns ON if a transmission error occurs when performing
R9047 COM2 port communication error data communication.
(R9140) flag Turns OFF when a transmission request is made by the
F159 (MTRN) instruction.

R9048 COM2 port reception done flag


Turns ON when the end code is received in the general-
during general-purpose
(R9142) purpose communication.
communication

R9049 COM2 port transmission done


Turns ON when the transmission ends in the general-
flag during general-purpose
(R9143) purpose communication.
communication

WUME-FPXHPGRG-021 App-19
List of Special Relays

Relay no. Name Description


Turns OFF when the transmission is requested in the
general-purpose communication.
Indicates whether the F145 (SEND) or F146 (RECV)
COM2 port instruction can be executed or not for the COM2 port.
R904A
SEND / RECV instruction OFF: Not executable (Instruction is being executed)
(R9144)
execution flag
ON: Executable
Indicates the execution state of the F145 (SEND) or F146
COM2 port (RECV) instruction for the COM2 port.
R904B
SEND / RECV instruction OFF: Normal end
(R9145)
execution end flag ON: Abnormal end (Communication error occurs)
The error code is stored in DT90125.
R904C to
Not used
R904F

(Note 1) R9040 to R904F will change even during one scanning cycle. In addition, the same functions are
allocated to the special internal relays in parentheses.

WR905 (Specified in units of words)


Relay no. Name Description
When using MEWNET-W0
MEWNET-W0 Turns ON when a transmission error occurs in the PC (PLC)
R9050 PC (PLC) link transmission error link.
flag Turns ON when there is an error in the setting for the PC
(PLC) area link.
R9051 to
Not used
R905F

WR906 (Specified in units of words)


Relay no. Name Description
Unit no. 1
When normally communicating in the PC (PLC) link mode:
Unit no.
R9060 ON
1
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 2
When normally communicating in the PC (PLC) link mode:
Unit no.
R9061 ON
2
MEWNET-W0 When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Transmission
assurance relay for Unit no. 3
PC (PLC) link 0
When normally communicating in the PC (PLC) link mode:
Unit no.
R9062 ON
3
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 4
When normally communicating in the PC (PLC) link mode:
Unit no.
R9063 ON
4
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF

App-20 WUME-FPXHPGRG-021
List of Special Relays

Relay no. Name Description


Unit no. 5
When normally communicating in the PC (PLC) link mode:
Unit no.
R9064 ON
5
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 6
When normally communicating in the PC (PLC) link mode:
Unit no.
R9065 ON
6
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 7
When normally communicating in the PC (PLC) link mode:
Unit no.
R9066 ON
7
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 8
When normally communicating in the PC (PLC) link mode:
Unit no.
R9067 ON
8
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 9
When normally communicating in the PC (PLC) link mode:
Unit no.
R9068 ON
9
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 10
When normally communicating in the PC (PLC) link mode:
Unit no.
R9069 ON
10
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 11
When normally communicating in the PC (PLC) link mode:
Unit no.
R906A ON
11
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 12
When normally communicating in the PC (PLC) link mode:
Unit no.
R906B ON
12
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 13
When normally communicating in the PC (PLC) link mode:
Unit no.
R906C ON
13
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 14
When normally communicating in the PC (PLC) link mode:
Unit no.
R906D ON
14
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF

WUME-FPXHPGRG-021 App-21
List of Special Relays

Relay no. Name Description


Unit no. 15
When normally communicating in the PC (PLC) link mode:
Unit no.
R906E ON
15
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 16
When normally communicating in the PC (PLC) link mode:
Unit no.
R906F ON
16
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF

WR907 (Specified in units of words)


Relay no. Name Description

Unit no. Turns ON when the unit no. 1 is in RUN mode.


R9070
1 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 2 is in RUN mode.


R9071
2 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 3 is in RUN mode.


R9072
3 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 4 is in RUN mode.


R9073
4 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 5 is in RUN mode.


R9074
5 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 6 is in RUN mode.


R9075
6 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 7 is in RUN mode.


R9076
7 Turns OFF when the unit is in PROG. mode.
MEWNET-W0
Operation mode Unit no. Turns ON when the unit no. 8 is in RUN mode.
R9077
relay for PC (PLC) 8 Turns OFF when the unit is in PROG. mode.
link 0
Unit no. Turns ON when the unit no. 9 is in RUN mode.
R9078
9 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 10 is in RUN mode.


R9079
10 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 11 is in RUN mode.


R907A
11 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 12 is in RUN mode.


R907B
12 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 13 is in RUN mode.


R907C
13 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 14 is in RUN mode.


R907D
14 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 15 is in RUN mode.


R907E
15 Turns OFF when the unit is in PROG. mode.

App-22 WUME-FPXHPGRG-021
List of Special Relays

Relay no. Name Description

Unit no. Turns ON when the unit no. 16 is in RUN mode.


R907F
16 Turns OFF when the unit is in PROG. mode.

WR908 (Specified in units of words)


Relay no. Name Description
Unit no. 1
When normally communicating in the PC (PLC) link mode:
Unit no.
R9080 ON
1
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 2
When normally communicating in the PC (PLC) link mode:
Unit no.
R9081 ON
2
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 3
When normally communicating in the PC (PLC) link mode:
Unit no.
R9082 ON
3
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 4
When normally communicating in the PC (PLC) link mode:
Unit no.
R9083 ON
4
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
MEWNET-W0
Unit no. 5
Transmission
assurance relay for When normally communicating in the PC (PLC) link mode:
Unit no.
R9084 PC (PLC) link 1 ON
5
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 6
When normally communicating in the PC (PLC) link mode:
Unit no.
R9085 ON
6
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 7
When normally communicating in the PC (PLC) link mode:
Unit no.
R9086 ON
7
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 8
When normally communicating in the PC (PLC) link mode:
Unit no.
R9087 ON
8
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 9
Unit no.
R9088 When normally communicating in the PC (PLC) link mode:
9
ON

WUME-FPXHPGRG-021 App-23
List of Special Relays

Relay no. Name Description


When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 10
When normally communicating in the PC (PLC) link mode:
Unit no.
R9089 ON
10
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 11
When normally communicating in the PC (PLC) link mode:
Unit no.
R908A ON
11
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 12
When normally communicating in the PC (PLC) link mode:
Unit no.
R908B ON
12
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 13
When normally communicating in the PC (PLC) link mode:
Unit no.
R908C ON
13
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 14
When normally communicating in the PC (PLC) link mode:
Unit no.
R908D ON
14
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 15
When normally communicating in the PC (PLC) link mode:
Unit no.
R908E ON
15
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF
Unit no. 16
When normally communicating in the PC (PLC) link mode:
Unit no.
R908F ON
16
When stopping, an error occurs or the PC (PLC) link is not
performed: OFF

WR909 (Specified in units of words)


Relay no. Name Description

Unit no. Turns ON when the unit no. 1 is in RUN mode.


R9090
1 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 2 is in RUN mode.


R9091 MEWNET-W0
2 Turns OFF when the unit is in PROG. mode.
Operation mode
relay for PC (PLC) Unit no. Turns ON when the unit no. 3 is in RUN mode.
R9092 link 1 3 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 4 is in RUN mode.


R9093
4 Turns OFF when the unit is in PROG. mode.

App-24 WUME-FPXHPGRG-021
List of Special Relays

Relay no. Name Description

Unit no. Turns ON when the unit no. 5 is in RUN mode.


R9094
5 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 6 is in RUN mode.


R9095
6 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 7 is in RUN mode.


R9096
7 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 8 is in RUN mode.


R9097
8 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 9 is in RUN mode.


R9098
9 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 10 is in RUN mode.


R9099
10 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 11 is in RUN mode.


R909A
11 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 12 is in RUN mode.


R909B
12 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 13 is in RUN mode.


R909C
13 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 14 is in RUN mode.


R909D
14 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 15 is in RUN mode.


R909E
15 Turns OFF when the unit is in PROG. mode.

Unit no. Turns ON when the unit no. 16 is in RUN mode.


R909F
16 Turns OFF when the unit is in PROG. mode.

WR910 to WR912 (Specified in units of words)


Relay no. Name Description
R9100 to
Not used
R910F
R9110 HSC-CH0
R9111 HSC-CH1
R9112 HSC-CH2
R9113 HSC-CH3
R9114 HSC-CH4
Turns ON while the F166 (HC1S) or F167 (HC1R) instruction
R9115 High-speed HSC-CH5 is executed when using the high-speed counter function.
counter control Turns OFF when the operation is completed.
R9116 flag HSC-CH6
(Note 1)
R9117 HSC-CH7
R9118 HSC-CH8
R9119 HSC-CH9
R911A HSC-CHA
R911B HSC-CHB

WUME-FPXHPGRG-021 App-25
List of Special Relays

Relay no. Name Description


R911C PLS-CH0
R911D PLS-CH1 When using the pulse output function or PWM output function
with the F17x instruction, turns ON when the F171 (SPDH),
R911E Pulse output PLS-CH2 F172 (PLSH), F173 (PWMH), F174 (SP0H) or F175 (SPSH)
control flag instruction is executed and the pulse output is performed.
R911F PLS-CH3 Turns OFF when the operation completed.
R9120 PLS-CH4 (Note 2)

R9121 PLS-CH5
R9122
Not used
to R912F

(Note 1) R9118 to R911B are valid only when the pulse output cassette is installed on the relay type Control
Unit.
(Note 2) R9120 to R9121 are valid only for the transistor type Control Unit.

WR913 (Specified in units of words)


Relay no. Name Description
Turns ON if a transmission error occurs when performing
R9130 COM0 port communication error data communication.
(R900E) flag Turns OFF when a transmission request is made by the
F159 (MTRN) instruction.
Turns ON when using the general-purpose communication
R9131 COM0 port communication mode function.
(R9040) flag Turns OFF when using a function other than the general-
purpose communication function.

R9132 COM0 port reception done flag


Turns ON when the end code is received in the general-
during general-purpose
(R903E) purpose communication.
communication
Turns ON when the transmission ends in the general-
R9133 COM0 port transmission done purpose communication.
flag during general-purpose
(R903F) communication Turns OFF when the transmission is requested in the
general-purpose communication.
Indicates whether the F145 (SEND) or F146 (RECV)
COM0 port instruction can be executed or not for the COM0 port.
R9134 SEND / RECV instruction OFF: Not executable (Instruction is being executed)
execution flag
ON: Executable
Indicates the execution state of the F145 (SEND) or F146
COM0 port (RECV) instruction for the COM0 port.
R9135 SEND / RECV instruction OFF: Normal end
execution end flag ON: Abnormal end (Communication error occurs)
The error code is stored in DT90123.
COM0 port
R9136 Turns ON when using the PC (PLC) link function.
PC (PLC) link flag
R9137 Not used
Turns ON if a transmission error occurs when performing
R9138 COM1 port communication error data communication.
(R9037) flag Turns OFF when a transmission request is made by the
F159 (MTRN) instruction.

App-26 WUME-FPXHPGRG-021
List of Special Relays

Relay no. Name Description


Turns ON when using the general-purpose communication
R9139 COM1 port communication mode function.
(R9032) flag Turns OFF when using a function other than the general-
purpose communication function.

R913A COM1 port reception done flag


Turns ON when the end code is received in the general-
during general-purpose
(R9038) purpose communication.
communication
Turns ON when the transmission ends in the general-
R913B COM1 port transmission done purpose communication.
flag during general-purpose
(R9039) communication Turns OFF when the transmission is requested in the
general-purpose communication.
Indicates whether the F145 (SEND) or F146 (RECV)
COM1 port instruction can be executed or not for the COM1 port.
R913C
SEND / RECV instruction OFF: Not executable (Instruction is being executed)
(R9044)
execution flag
ON: Executable
Indicates the execution state of the F145 (SEND) or F146
COM1 port (RECV) instruction for the COM1 port.
R913D
SEND / RECV instruction OFF: Normal end
(R9045)
execution end flag ON: Abnormal end (Communication error occurs)
The error code is stored in DT90124.
R913E
COM1 port PC (PLC) link flag Turns ON when using the PC (PLC) link function.
(R9041)
R913F Not used

(Note 1) R9130 to R913F will change even during one scanning cycle. In addition, the same functions are
allocated to the special internal relays in parentheses to retain compatibility with the conventional
model FP-X Control Unit.

WR914 (Specified in units of words)


Relay no. Name Description
Turns ON if a transmission error occurs when performing
R9140 COM2 port communication error data communication.
(R9047) flag Turns OFF when a transmission request is made by the
F159 (MTRN) instruction.
Turns ON when using the general-purpose communication
R9141 COM2 port communication mode function.
(R9042) flag Turns OFF when using a function other than the general-
purpose communication function.

R9142 COM2 port reception done flag


Turns ON when the end code is received in the general-
during general-purpose
(R9048) purpose communication.
communication
Turns ON when the transmission ends in the general-
R9143 COM2 port transmission done purpose communication.
flag during general-purpose
(R9049) communication Turns OFF when the transmission is requested in the
general-purpose communication.
Indicates whether the F145 (SEND) or F146 (RECV)
COM2 port instruction can be executed or not for the COM2 port.
R9144
SEND / RECV instruction OFF: Not executable (Instruction is being executed)
(R904A)
execution flag
ON: Executable

WUME-FPXHPGRG-021 App-27
List of Special Relays

Relay no. Name Description


Indicates the execution state of the F145 (SEND) or F146
COM2 port (RECV) instruction for the COM2 port.
R9145
SEND / RECV instruction OFF: Normal end
(R904B)
execution end flag ON: Abnormal end (Communication error occurs)
The error code is stored in DT90125.
R9146 Not used
R9147 Not used
Turns ON if a transmission error occurs when performing
COM3 port communication error data communication.
R9148
flag Turns OFF when a transmission request is made by the
F159 (MTRN) instruction.
Turns ON when using the general-purpose communication
COM3 port communication mode function.
R9149
flag Turns OFF when using a function other than the general-
purpose communication function.
COM3 port reception done flag
Turns ON when the end code is received in the general-
R914A during general-purpose
purpose communication.
communication
Turns ON when the transmission ends in the general-
COM3 port transmission done purpose communication.
R914B flag during general-purpose
communication Turns OFF when the transmission is requested in the
general-purpose communication.
Indicates whether the F145 (SEND) or F146 (RECV)
COM3 port instruction can be executed or not for the COM3 port.
R914C SEND / RECV instruction OFF: Not executable (Instruction is being executed)
execution flag
ON: Executable
Indicates the execution state of the F145 (SEND) or F146
COM3 port (RECV) instruction for the COM3 port.
R914D SEND / RECV instruction OFF: Normal end
execution end flag ON: Abnormal end (Communication error occurs)
The error code is stored in DT90127.
R914E Not used
R914F Not used

(Note 1) R9140 to R914F will change even during one scanning cycle. In addition, the same functions are
allocated to the special internal relays in parentheses to retain compatibility with the conventional
model FP-X Control Unit.

WR915 (Specified in units of words)


Relay no. Name Description
Turns ON if a transmission error occurs when performing
COM4 port communication error data communication.
R9150
flag Turns OFF when a transmission request is made by the
F159 (MTRN) instruction.
R9151
Not used
to R9153
Indicates whether the F145 (SEND) or F146 (RECV)
R9154 COM4 port
instruction can be executed or not for the COM4 port.

App-28 WUME-FPXHPGRG-021
List of Special Relays

Relay no. Name Description


SEND / RECV instruction OFF: Not executable (Instruction is being executed)
execution flag ON: Executable
Indicates the execution state of the F145 (SEND) or F146
COM4 port (RECV) instruction for the COM4 port.
R9155 SEND / RECV instruction OFF: Normal end
execution end flag ON: Abnormal end (Communication error occurs)
The error code is stored in DT90128.
R9156
Not used
to R915F

WUME-FPXHPGRG-021 App-29
List of Special Data Registers

List of Special Data Registers

Register R W
Name Description
no.
When a self-diagnostic error occurs, the error
DT90000 Self-diagnosis error code ○ ×
code is stored.
DT90001 Not used × ×
When an error occurs in the Function Cassette,
the corresponding bit turns ON.
Position where the Function
DT90002 ○ ×
Cassette I/O error occurred

DT90003
Not used × ×
to DT90005
When an error occurs in the Function Cassette,
the corresponding bit turns ON.
Position where the Function
DT90006 ○ ×
Cassette error occurred

When there is an inconsistency in the setting of a


DT90007 System register error no. system register, the corresponding system register ○ ×
no. is stored.
The error content when using the COM4 port is
stored.
ON (1): Error, OFF (0): Normal

Communication error flag


DT90008 ○ ×
COM4 port

The error content when using the COM2 / COM3


port is stored. ON (1): Error, OFF (0): Normal

Communication error flag


DT90009 ○ ×
COM2 port / COM3 port

FPX Expansion position of When the installation state of FP-X Expansion I/O
DT90010 I/O verification mismatched Unit changes from the state that it was in when ○ ×
unit the power was turned ON, the bit corresponding to

App-30 WUME-FPXHPGRG-021
List of Special Data Registers

Register R W
Name Description
no.
the unit number turns ON (1). Monitor with BIN
display.
15 11 7 3 2 1 0 (Bit no.)

4 3 2 1 (Unit no.)
ON(1):Abnormal OFF(0):Normal
When the installation state of FP-X Expansion
Cassette changes from the state that it was in
when the power was turned ON, the bit
corresponding to the Expansion Cassette
Expansion Cassette position installation position number turns ON (1). Monitor
DT90011 of verification mismatched with BIN display. ○ ×
unit

DT90012
Not used × ×
to DT90013
As a result of the execution of data shift instruction
F105 (BSR) or F106 (BSL), the overflowed 1-digit
Operation auxiliary register
DT90014 data is stored in bit 0 to bit 3. ○ ○
for data shift instruction
Reading and writing the value is available by the
F0 (MV) instruction.
DT90015 When executing the 16-bit division instruction
F32(%) or F52(B%), the remainder of 16 bits is
stored in DT90015.
Operation auxiliary register When executing the 32-bit division instruction ○ ○
DT90016 for division instruction F33(D%) or F53(DB%), the remainder of 32 bits is
stored in DT90015 to DT90016. Reading and
writing the value is available by the F1 (DMV)
instruction.

Address with operation error The address where the first operation error
DT90017 occurred after starting the operation is stored. ○ ×
(Hold) Monitor using decimal display.

Address with operation error The address where the operation error occurred is
DT90018 stored. It will be updated every time an error ○ ×
(Latest) occurs. Monitor using decimal display.
The stored value is incremented by one every 2.5
ms. (H0 to HFFFF)
RING counter (2.5 ms)(Note
DT90019 Difference between the values of 2 points ○ ×
2)
(absolute value) x 2.5 ms = Elapsed time between
the 2 points
The stored value is incremented by one every
10.67 µs. (H0 to HFFFF)
RING counter (10 μs)(Note 2) Difference between the values of 2 points
DT90020 ○ ×
(Note 3) (absolute value) x 10.00 μs = Elapsed time
between the 2 points
Note) The accurate figure is 10.00 μs.
DT90021 Not used × ×

Scan time (Current value) The current value of scan time is stored.
DT90022 ○ ×
(Note 1) [Stored value (decimal)] x 0.1 ms

WUME-FPXHPGRG-021 App-31
List of Special Data Registers

Register R W
Name Description
no.
Example) For K50, it is within 5 ms.
The minimum value of scan time is stored.
Scan time (Minimum value)
DT90023 [Stored value (decimal)] x 0.1 ms ○ ×
(Note 1)
Example) For K50, it is within 5 ms.
The maximum value of scan time is stored.
Scan time (Maximum value)
DT90024 [Stored value (decimal)] x 0.1 ms ○ ×
(Note 1)
Example) For K125, it is within 12.5 ms.

(Note 1) The scan time display shows the operation cycle time only in RUN mode. In PROG. mode, the scan
time of operation is not displayed. The maximum and minimum values are cleared when switching the
mode between RUN and PROG.
(Note 2) It is updated once at the beginning of every scan.
(Note 3) DT90020 is also updated when executing the F0 (MV), DT90020 and D instructions, therefore, it can
be used for measuring a block time.

Register R W
Name Description
no.
The content set by the ICTL instruction is stored.
Monitor with BIN display.

Interrupt enable (mask) INT0 to INT7: Interrupt input X0 to X7


DT90025 ○ ×
status (INT0 to 13) INT8 to INT10: Interrupt input X100 to X102
INT11 to INT13: Interrupt input X200 to X202
INT0 to INT9: High-speed counter match interrupt
CH0 to CH9
INT11 to INT12: High-speed counter match
interrupt CHA, CHB
DT90026 Not used × ×
The content set by the ICTL instruction is stored.
Periodical interrupt interval K0: Periodical interrupt is not used
DT90027 ○ ×
(INT24) K1 to K3000: 0.1 ms to 0.35 s or 0.5 ms to 1.5 s
or 10 ms to 30 s
K0: Sampling by the SMPL instruction
DT90028 Interval of sampling trace ○ ×
K1 to K3000 (×10 ms): 10 ms to 30 s
DT90029 Not used × ×
DT90030
DT90031
DT90032 Character storage by F149 The content (characters) set by the message
MSG instruction display instruction (F149) is stored. ○ ×
DT90033
DT90034
DT90035
DT90036 Not used × ×

App-32 WUME-FPXHPGRG-021
List of Special Data Registers

Register R W
Name Description
no.
When executing the F96 (SRC) instruction, the
DT90037 Work 1 for search instruction ○ ×
number that matches the search data is stored.
When executing the F96 (SRC) instruction, the
DT90038 Work 2 for search instruction ○ ×
relative position that matches is stored.
DT90039 Not used × ×
The value of potentiometer input (K0 to K4000) is
stored.
DT90040 Potentiometer input ○ ×
It can be applied to the analog timer by reading it
to the data register using a user program.
DT90041
Not used × ×
to DT90043
DT90044 System work Used by the system. ○ ×
DT90045
Not used × ×
to DT90051

Register
Name Description R W
no.
When using the high-speed counter function,
various controls such as resetting the high-speed
counter, disabling the count and clearing the
execution of an instruction can be performed by
writing values with the MV instruction (F0).

High-speed counter control


DT90052 ○ ○
flag

When using the pulse output function with the


F17x instruction, various controls such as near
DT90052 Pulse output control flag home input, stopping the pulse output and ○ ○
canceling an instruction can be performed by
writing values using the MV instruction (F0).

WUME-FPXHPGRG-021 App-33
List of Special Data Registers

Register
Name Description R W
no.

(Note 1) When selecting the positioning function in the table setting mode, the control using the pulse output
control flag by DT90052 cannot be performed.

Register R W
Name Description
no.
The hour and minute data of the real-time clock is
stored.
You can only read, cannot write.
Real-time clock monitoring
DT90053 High byte Low byte ○ ×
(hour and minute)

Hour dataH00 to H23 Minute dataH00 to H59

Real-time clock The year, month, day, hour, minute, second and
DT90054 day-of-the-week data of the real-time clock is
(minute and second)
stored. The built-in real-time clock is applicable
Real-time clock until 2099 and supports leap years.
DT90055
(day and hour) The real-time clock can be set (time synch) by
writing desired values using the programming tool
Real-time clock or a program based on the transfer instruction
DT90056
(year and month) (F0).
High byte Low byte

○ ○
Minute data Second data
DT90054
(H00 to H59) (H00 to H59)
DT90055 Day data Hour data
Real-time clock (H01 to H31) (H00 to H23)
DT90057
(day of week) Year data Month data
DT90056
(H00 to H99) (H01 to H12)
DT90057 Day of week data
ー (H00 to H06)
The day of the week is not set automatically.
Allocate an arbitrary value in the range of H0 to
H6.
It is used to adjust the time of the built-in real-time
clock.
Real-time clock time setting
● Adjust the time by a program
DT90058 and 30-second ○ ○
compensation register By setting the MSB of DT90058 to 1, the time is
adjusted to that written to DT90054 to DT90057
by the F0 instruction. After the execution of the

App-34 WUME-FPXHPGRG-021
List of Special Data Registers

Register R W
Name Description
no.
time adjustment, DT90058 will be cleared to zero.
(It cannot be executed using any other instructions
than F0 instruction.)
<Example> Turn X0 ON to set the time to
12:00:00 on the 5th day.
X0
DF F0 MV, H 0, DT90054 Set 0 minute 0 second.
F0 MV, H 512, DT90055 Set 12th hour 5th day.

F0 MV, H8000, DT90058 Set the time.

● Correct a difference within 30 seconds.


By setting the LSB of DT90058 to 1, the time is
moved up or down to be just 0 second.
After the execution of the correction, DT90058 will
be cleared to zero.
<Example> Turn X0 ON to correct the time to be 0
second.
X0
DF F0 MV, H 1, DT90058 Correct to 0 second.

When the time is 0 to 29 seconds when the


correction is executed, it is moved down. When it
is 30 to 59 seconds, it is moved up. In the above
example, when the time is 5 minutes 29 seconds,
it will be 5 minutes 0 seconds. When the time is 5
minutes 35 seconds, it will be 6 minutes 0
seconds.

(Note 1) When rewriting the values of DT90054 to DT90057 using the programming tool, it is not necessary to
write the data to DT90058 because the time adjustment is performed when rewritten.

Register no. Name Description R W


When a communication error occurs, the error code
is stored.
ON (1): Error, OFF (0): Normal

Communication error
DT90059 code ○ ×
COM0 port / COM1 port

Step ladder process (0 to


DT90060
15)
Indicates the starting status of the step ladder
Step ladder process (16 process. When the process starts, the bit
DT90061 ○ ○
to 31) corresponding to its process number turns ON.
Step ladder process (32 Monitor with BIN display.
DT90062
to 47)

WUME-FPXHPGRG-021 App-35
List of Special Data Registers

Register no. Name Description R W


Step ladder process (48
DT90063
to 63)
Step ladder process (64
DT90064
to 79)
Step ladder process (80
DT90065
to 95)
Step ladder process (96
DT90066
to 111)
Step ladder process (112
DT90067
to 127)
Step ladder process (128
DT90068
to 143)
Step ladder process (144
DT90069
to 159)
Step ladder process (160
DT90070
to 175)
Step ladder process (176
DT90071
to 191)
Step ladder process (192
DT90072
to 207)
Step ladder process (208
DT90073 <Example> 15 11 7 3 0 (Bit no.)
to 223)
DT90060
Step ladder process (224 15 11 7 3 0 (Process no.)
DT90074
to 239) 1:Starting 0:During stop
Step ladder process (240 The data can be written using the programming tool.
DT90075
to 255)
Step ladder process (256
DT90076
to 271)
Step ladder process (272
DT90077
to 287)
Step ladder process (288
DT90078
to 303)
Step ladder process (304
DT90079
to 319)
Step ladder process (320
DT90080
to 335)
Step ladder process (336
DT90081
to 351)
Step ladder process (352
DT90082
to 367)
Step ladder process (368
DT90083
to 383)
Step ladder process (384
DT90084
to 399)
Step ladder process (400
DT90085
to 415)

App-36 WUME-FPXHPGRG-021
List of Special Data Registers

Register no. Name Description R W


Step ladder process (416
DT90086
to 431)
Step ladder process (432
DT90087
to 447)
Step ladder process (448
DT90088
to 463)
Step ladder process (464
DT90089
to 479)
Step ladder process (480
DT90090
to 495)
Step ladder process (496
DT90091
to 511)
Step ladder process (512
DT90092
to 527)
Step ladder process (528
DT90093
to 543)
Step ladder process (544
DT90094
to 559)
Step ladder process (560
DT90095
to 575) Indicates the starting status of the step ladder
Step ladder process (576 process. When the process starts, the bit
DT90096 corresponding to its process number turns ON.
to 591)
Monitor with BIN display.
Step ladder process (592
DT90097 <Example> 15 11 7 3 0 (Bit no.) ○ ○
to 607)
DT90100
Step ladder process (608 655 651 647 643 640(Process no.)
DT90098
to 623) 1:Starting 0:During stop
Step ladder process (624 The data can be written using the programming tool.
DT90099
to 639)
Step ladder process (640
DT90100
to 655)
Step ladder process (656
DT90101
to 671)
Step ladder process (672
DT90102
to 687)
Step ladder process (688
DT90103
to 703)
Step ladder process (704
DT90104
to 719)
Step ladder process (720
DT90105
to 735)
Step ladder process (736
DT90106
to 751)
Step ladder process (752
DT90107
to 767)
Step ladder process (768
DT90108
to 783)

WUME-FPXHPGRG-021 App-37
List of Special Data Registers

Register no. Name Description R W


Step ladder process (784
DT90109
to 799)
Step ladder process (800
DT90110
to 815)
Step ladder process (816
DT90111
to 831)
Step ladder process (832
DT90112
to 847)
Step ladder process (848
DT90113
to 863)
Step ladder process (864
DT90114
to 879)
Step ladder process (880
DT90115
to 895)
Step ladder process (896
DT90116
to 911)
Step ladder process (912
DT90117
to 927)
Step ladder process (928
DT90118
to 943)
Step ladder process (944
DT90119
to 959)
Step ladder process (960
DT90120
to 975)
Step ladder process (976
DT90121
to 991)
Step ladder process (992
DT90122 to 999)
(High byte is not used.)
COM0
DT90123 SEND / RECV instruction ○ ×
end code
COM1
When an error occurs when executing the SEND /
DT90124 SEND / RECV instruction RECV instruction, the error code is stored. ○ ×
end code
COM2
DT90125 SEND / RECV instruction ○ ×
end code
Forced ON/OFF
DT90126 Used by the system. ○ ×
operating station display
COM3
DT90127 SEND / RECV instruction ○ ×
end code When an error occurs when executing the SEND /
COM4 RECV instruction, the error code is stored.
DT90127 SEND / RECV instruction ○ ×
end code

App-38 WUME-FPXHPGRG-021
List of Special Data Registers

Register no. Name Description R W


DT90128 to
Not used × ×
DT90139
DT90140 PLC link 0 No. of times of reception
PC (PLC) link 0 Reception interval (current value)
DT90141
(x2.5 ms)
PC (PLC) link 0 Reception interval (minimum value)
DT90142
(x2.5 ms)
PC (PLC) link 0 Reception interval (maximum value)
DT90143
MEWNET-W0 (x2.5 ms)
○ ×
DT90144 PC (PLC) link 0 status PC (PLC) link 0 No. of times of transmission
PC (PLC) link 0 Transmission interval (current value)
DT90145
(x2.5 ms)
PC (PLC) link 0 Transmission interval (minimum
DT90146
value) (x2.5 ms)
PC (PLC) link 0 Transmission interval (maximum
DT90147
value) (x2.5 ms)
DT90148 PC (PLC) link 1 No. of times of reception
PC (PLC) link 1 reception interval (current value)
DT90149
(x2.5 ms)
PC (PLC) link 1 reception interval (minimum value)
DT90150
(x2.5 ms)
PC (PLC) link 1 reception interval (maximum value)
DT90151
MEWNET-W0 (x2.5 ms)
○ ×
DT90152 PC (PLC) link 1 status PC (PLC) link 1 No. of times of transmission
PC(PLC) link 1 transmission interval (current value)
DT90153
(x2.5 ms)
PC(PLC) link 1 transmission interval (minimum
DT90154
value) (x2.5 ms)
PC(PLC) link 1 transmission interval (maximum
DT90155
value) (x2.5 ms)
PC (PLC) link 0 Work for measuring reception
DT90156
MEWNET-W0 interval
○ ×
PC (PLC) link 0 status PC (PLC) link 0 Work for measuring transmission
DT90157
interval
PC (PLC) link 1 Work for measuring reception
DT90158
MEWNET-W0 interval
○ ×
PC (PLC) link 1 status PC (PLC) link1 work for measuring transmission
DT90159
interval
MEWNET-W0
DT90160 The unit number of PC (PLC) link 0 is stored. ○ ×
PC (PLC) link 0 unit no.
MEWNET-W0
DT90161 The error content of PC (PLC) link 0 is stored. ○ ×
PC (PLC) link 0 Error flag
DT90162 to
Not used × ×
DT90169
DT90170 MEWNET-W0 PC (PLC) link address duplicate destination ○ ×

WUME-FPXHPGRG-021 App-39
List of Special Data Registers

Register no. Name Description R W


DT90171 No. of missing tokens
DT90172 No. of duplicate tokens
DT90173 No. of no signal states
DT90174 No. of times of receptions of undefined commands
DT90175 PC (PLC) link 0 status No. of sum check errors for reception
DT90176 No. of received data format errors
DT90177 Number of transmission errors
DT90178 No. of procedure errors
DT90179 No. of duplicate master units
DT90180
Not used × ×
to DT90218
Unit number switch of
DT90219 0: Unit nos. 1 to 8, 1: Unit nos. 9 to 16 ○ ×
DT90220 to DT90251
System
DT90220 registers
40 and 41
System
DT90221 PC (PLC) registers The settings of the system register related to the PC
link 42 and 43 (PLC) function of each unit number is stored as
Unit no. 1 or System follows.
DT90222 9 registers <Example>
44 and 45 When DT90219 is 0;
System High byte Low byte
DT90223 registers DT90220 to
46 and 47 DT90223
(Unit no. 1)
System
DT90224 registers Settings of
40 and 41 system registers
40, 42, 44, 46
System
DT90225 PC (PLC) registers ○ ×
42 and 43 Settings of
link system registers
Unit no. 2 or System 41, 43, 45, 47
DT90226 10 registers When the system register no. 46 of the home unit is
44 and 45 the standard setting, the values in the home unit will
System be copied for nos. 46 and 47.
DT90227 registers When the system register no. 46 of the home unit is
46 and 47 the reverse setting, the nos. 40 to 45 and 47
corresponding to those of the home unit will be 50 to
System 55 and 57, and 46 will be set as it is.
DT90228 registers
40 and 41 Also, nos. 40 to 45 corresponding to other units will
PC (PLC) be the values after correcting the received values,
System and nos. 46 and 57 of the home unit will be set for
DT90229 link registers nos. 46 and 47.
Unit no. 3 or 42 and 43
11
System
DT90230 registers
44 and 45

App-40 WUME-FPXHPGRG-021
List of Special Data Registers

Register no. Name Description R W


System
DT90231 registers
46 and 47
System
DT90232 registers
40 and 41
System
DT90233 PC (PLC) registers
link 42 and 43
Unit no. 4 or System
DT90234 12 registers
44 and 45
System
DT90235 registers
46 and 47
System
DT90236 registers
40 and 41
System
DT90237 PC (PLC) registers
link 42 and 43
Unit no. 5 or System
DT90238 13 registers
44 and 45
System
DT90239 registers
46 and 47
System
DT90240 registers
40 and 41
System
DT90241 PC (PLC) registers
link 42 and 43
Unit no. 6 or System
DT90242 14 registers
44 and 45
System
DT90243 registers
46 and 47
System
DT90244 registers
40 and 41
System
DT90245 PC (PLC) registers
link 42 and 43
Unit no. 7 or System
DT90246 15 registers
44 and 45
System
DT90247 registers
46 and 47

WUME-FPXHPGRG-021 App-41
List of Special Data Registers

Register no. Name Description R W


System
DT90248 registers
40 and 41
System
DT90249 PC (PLC) registers
link 42 and 43
Unit no. 8 or System
DT90250 16 registers
44 and 45
System
DT90251 registers
46 and 47
DT90252
Not used × ×
to DT90299

Common to FP-XH relay type / transistor type


Register
Name Description R W
no.
Low
DT90300 The counting area of the high-speed ○ ○
Elapsed word
counter Control Unit input CH0 (X0) or
value area High
DT90301 (X0, X1) ○ ○
word
HSC-CH0
Low
DT90302 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90303 value is set. ○ ○
word
Low
DT90304 ○ ○
Elapsed word The counting area of the high-speed
value area High counter Control Unit input (X1).
DT90305 ○ ○
word
HSC-CH1
Low
DT90306 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90307 value is set. ○ ○
word
Low
DT90308 The counting area of the high-speed ○ ○
Elapsed word
counter Control Unit input (X2) or (X2,
value area High
DT90309 X3). ○ ○
word
HSC-CH2
Low
DT90310 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90311 value is set. ○ ○
word
Low
DT90312 ○ ○
Elapsed word The counting area of the high-speed
value area HSC-CH3 counter Control Unit input (X3).
High
DT90313 ○ ○
word

App-42 WUME-FPXHPGRG-021
List of Special Data Registers

Register
Name Description R W
no.
Low
DT90314 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90315 value is set. ○ ○
word
Low
DT90316 The counting area of the high-speed ○ ○
Elapsed word
counter Control Unit input (X4) or (X4,
value area High
DT90317 X5). ○ ○
word
HSC-CH4
Low
DT90318 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90319 value is set. ○ ○
word
Low
DT90320 ○ ○
Elapsed word The counting area of the high-speed
value area High counter Control Unit input (X5).
DT90321 ○ ○
word
HSC-CH5
Low
DT90322 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90323 value is set. ○ ○
word
Low
DT90324 The counting area of the high-speed ○ ○
Elapsed word
counter Control Unit input (X6) or (X6,
value area High
DT90325 X7). ○ ○
word
HSC-CH6
Low
DT90326 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90327 value is set. ○ ○
word
Low
DT90328 ○ ○
Elapsed word The counting area of the high-speed
value area High counter Control Unit input (X7).
DT90329 ○ ○
word
HSC-CH7
Low
DT90330 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90331 value is set. ○ ○
word

(Note 1) Only the F1 (DMV) instruction can perform the reading and writing of elapsed value area.
(Note 2) The target value area is set when the high-speed counter target value match instruction F166 (HC1S)
or F167 (HC1R) is executed. It cannot be written by a user program.

FP-XH relay type


Register
Name Description R W
no.

Low The counting area of the high-speed


DT90332 Elapsed ○ ○
word HSC-CH8 counter input (X100) or (X100, X101)
value area
of the pulse I/O cassette .

WUME-FPXHPGRG-021 App-43
List of Special Data Registers

Register
Name Description R W
no.
High
DT90333 ○ ○
word
Low
DT90334 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90335 value is set. ○ ○
word
Low
DT90336 The counting area of the high-speed ○ ○
Elapsed word
counter input (X101) of the pulse I/O
value area High
DT90337 cassette . ○ ○
word
HSC-CH9
Low
DT90338 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90339 value is set. ○ ○
word
Low
DT90340 The counting area of the high-speed ○ ○
Elapsed word
counter input (X200) or (X200, X201)
value area High
DT90341 of the pulse I/O cassette . ○ ○
word
HSC-CHA
Low
DT90342 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90343 value is set. ○ ○
word
Low
DT90344 The counting area of the high-speed ○ ○
Elapsed word
counter input (X201) of the pulse I/O
value area High
DT90345 cassette . ○ ○
word
HSC-CHB
Low
DT90346 When executing the F166 (HC1S) and ○ ○
Target value word
F167 (HC1R) instructions, the target
area High
DT90347 value is set. ○ ○
word

(Note 1) Only the F1 (DMV) instruction can perform the reading and writing of elapsed value area.
(Note 2) The target value area is set when the high-speed counter target value match instruction F166 (HC1S)
or F167 (HC1R) is executed. It cannot be written by a user program.
(Note 3) DT90332 to DT90347 are valid only when the pulse I/O cassette is installed on the relay type Control
Unit.

FP-XH relay type (FP-X compatible instruction mode)


Register
Name Description R W
no.
Low
DT90348 ○ ○
Elapsed word The counting area of the pulse output
value area High (Y100, Y101) of the pulse I/O cassette.
DT90349 ○ ○
word PLS-CH0

Low When executing the pulse output


DT90350 Target value ○ ○
word instruction (F17x), the target value is
area
set.

App-44 WUME-FPXHPGRG-021
List of Special Data Registers

Register
Name Description R W
no.
High
DT90351 ○ ○
word
Low
DT90352 ○ ○
Elapsed word The counting area of the pulse output
value area High (Y200, Y201) of the pulse I/O cassette.
DT90353 ○ ○
word
PLS-CH1
Low
DT90354 When executing the pulse output ○ ○
Target value word
instruction (F17x), the target value is
area High
DT90355 set. ○ ○
word
DT90356
Not used × ×
to DT90371

(Note 1) Only the F1 (DMV) instruction can perform the reading and writing of elapsed value area.
(Note 2) Only the F1 (DMV) instruction can perform the reading of target value area.
(Note 3) The target value area is set when the pulse output instruction F171(SPDH), F172(PLSH),
F174(SP0H), or F175(SPSH) is executed. It cannot be written by a user program.

FP-XH transistor type (FP-X compatible instruction mode)


Register no. Name Description R W
DT90348 Elapsed Low word The counting area of the pulse output ○ ○
DT90349 value area High word CH0 (Y0, Y1). ○ ○
PLS-CH0
DT90350 Low word When executing the pulse output ○ ○
Target
instruction (F17x), the target value is
DT90351 value area High word ○ ○
set.
DT90352 Elapsed Low word The counting area of the pulse output ○ ○
DT90353 value area High word CH1 (Y2, Y3) ○ ○
PLS-CH1
DT90354 Low word When executing the pulse output ○ ○
Target
instruction (F17x), the target value is
DT90355 value area High word ○ ○
set.
DT90356 Elapsed Low word The counting area of the pulse output ○ ○
DT90357 value area High word CH2 (Y4, Y5) ○ ○
PLS-CH2
DT90358 Low word When executing the pulse output ○ ○
Target
instruction (F17x), the target value is
DT90359 value area High word ○ ○
set.
DT90360 Elapsed Low word The counting area of the pulse output ○ ○
DT90361 value area High word CH3 (Y6, Y7) ○ ○
PLS-CH3
DT90362 Low word When executing the pulse output ○ ○
Target
instruction (F17x), the target value is
DT90363 value area High word ○ ○
set.
DT90364 Elapsed Low word The counting area of the pulse output ○ ○
DT90365 value area High word CH4 (Y8, Y9) ○ ○
PLS-CH4
DT90366 Low word When executing the pulse output ○ ○
Target
instruction (F17x), the target value is
DT90367 value area High word ○ ○
set.

WUME-FPXHPGRG-021 App-45
List of Special Data Registers

Register no. Name Description R W


DT90368 Elapsed Low word The counting area of the pulse output ○ ○
DT90369 value area High word CH5 (YA, YB). ○ ○
PLS-CH5
DT90370 Low word When executing the pulse output ○ ○
Target
instruction (F17x), the target value is
DT90371 value area High word ○ ○
set.

(Note 1) Only the F1 (DMV) instruction can perform the reading and writing of elapsed value area.
(Note 2) Only the F1 (DMV) instruction can perform the reading of target value area.
(Note 3) The target value area is set when the pulse output instruction F171(SPDH), F172(PLSH),
F174(SP0H), or F175(SPSH) is executed. It cannot be written by a user program.

Common to FP-XH relay type / transistor type


Register
Name Description R W
no.
DT90380 HSC-CH0 ○ ×
DT90381 HSC-CH1 ○ ×
When using the high-speed counter
DT90382 HSC-CH2 function, the contents set into the data ○ ×
DT90383 HSC-CH3 register DT90052 by the F0 (MV) ○ ×
instruction are stored for each channel.
DT90384 HSC-CH4 ○ ×
High-speed counter
DT90385 function HSC-CH5 ○ ×
DT90386 control flag monitor HSC-CH6 ○ ×
area
DT90387 HSC-CH7 ○ ×
DT90388 HSC-CH8 ○ ×
DT90389 HSC-CH9 ○ ×
DT90390 HSC-CHA ○ ×
DT90391 HSC-CHB ○ ×

Common to FP-XH relay type / transistor type (FP-X compatible instruction mode)
Register
Name Description R W
no.
DT90392 PLS-CH0 When using the pulse output function, the ○ ×
contents set into the data register DT90052
DT90393 PLS-CH1 by the F0 (MV) instruction are stored for ○ ×
DT90394 PLS-CH2 each channel. ○ ×
DT90395 Pulse output function PLS-CH3 ○ ×
DT90396 control flag monitor PLS-CH4 ○ ×
area

DT90397 PLS-CH5 ○ ×

(Note 1) Only the F1 (DMV) instruction can perform the reading of the area (DT90392 to DT90397).

App-46 WUME-FPXHPGRG-021
Communication Commands

Communication Commands

List of MEWTOCOL Supported Commands

The MEWTOCOL commands that are supported by this product are as follows.

MEWTOCOL-COM

Type of instruction Code Description


RC Reads the ON / OFF status of contacts.
(RCS) ● Specifies only one point.
Read contact area
(RCP) ● Specifies multiple contacts.
(RCC) ● Specifies a range in word units.
WC Turns ON or OFF a contact.
(WCS) ● Specifies only one point.
Write contact area
(WCP) ● Specifies multiple contacts.
(WCC) ● Specifies a range in word units.
Read data area RD Reads the contents of a data area.
Write data area WD Writes data to a data area.
Register or reset contacts monitored MC Registers the contact to be monitored.
Register or reset data monitored MD Registers the data to be monitored.
Monitoring start MG Monitors a registered contact or data using MD and MC.
Preset contact area Fills the area of a specified range with a 16-point ON / OFF
SC
(fill command) pattern.

Preset data area Writes the same contents to the data area of a specified
SD
(fill command) range.

Reads PLC specification, an error code when an error occurs,


Read the status of PLC RT
etc.
Abort AB Aborts communication.

(Note 1) Some devices cannot be accessed due to format limitations of MEWTOCOL-COM communication
commands.

WUME-FPXHPGRG-021 App-47
Communication Commands

List of MODBUS Supported Commands

List of MODBUS Function Codes

■ Supported commands (●: Available, Blank: Not available)


Remarks Corresponding
Code Name (MODBUS) Name functions
(Reference
No.) Slave Master
01 Read Coil Status Read Y / R coils 0X ● ●
02 Read Input Status Read X contact 1X ● ●
03 Read Hold Register Read DT 4X ● ●
04 Read Input Registers Read WL / LD 3X ● ●
05 Force Single Coil Write single Y / R 0X ● ●
06 Preset Single Register Write DT1 word 4X ● ●
08 Diagnostics Loopback test - ●
15 Force Multiple Coils Write multiple Y / R 0X ● ●
16 Preset Multiple Registers Write DT multiple words 4X ● ●
22 Mask Write 4X Register Write DT mask 4X ●
23 Read / Write 4X Registers Read / write DT 4X ●

(Note 1) During master communication, MODBUS function codes 01, 02, 03 and 04 use F146 (RECV)
instruction, while MODBUS function codes 05, 06, 15 and 16 use F145 (SEND) instruction.

Device No. Correspondence Table

■ Correspondence table between MODBUS command reference Nos. and device


Nos.
MODBUS reference Nos. Data on BUS PLC device No.
(hexadecimal)
000001-001760 0000-06DF Y0-Y109F
Coil
002049-010240 0800-27FF R0-R511F
Input 100001-101760 0000-06DF X0-X109F
Holding register 400001-465533 0000-FFFC DT0-DT65532
300001-301028 0000-007F WL0-WL127
Input register
302001-302256 07D0-08CF LD0-LD255

(Note 1) The table above indicates correspondence between MODBUS reference Nos. for accessing PLC
through MODBUS protocol from a higher device and operation device Nos. of PLC.

App-48 WUME-FPXHPGRG-021
Positioning Memory

Positioning Memory

Configuration of Memory Map

The positioning memory consists of four areas.

■ Whole memory map


Area Absolute
address No. of words and configuration
No. Name (Decimal)
Common
0 0000 to 0029 30 words
area
0030 to 0039 For CH0
0040 to 0049 For CH1
Axis 0050 to 0059 For CH2
informatio 10 words for each channel
1 n 0060 to 0069 For CH3
area 0070 to 0079 For CH4
0080 to 0089 For CH5
0090 to 0099 Reserved for system
0100 to 0129 For CH0
0130 to 0159 For CH1
0160 to 0189 For CH2
Axis 30 words for each channel
2 setting 0190 to 0219 For CH3
area
0220 to 0249 For CH4
0250 to 0279 For CH5
0280 to 0299 Reserved for system
For CH0 250 words for each channel
0300 to 0309 Table 1
0300 to 0549 | | 10 words for each table
0490 to 0499 Table 20
Positionin
g 0500 to 0549 Reserved for system
3
table 0550 to 0799 For CH1
area
0800 to 1049 For CH2
1050 to 1299 For CH3 250 words for each channel
1300 to 1549 For CH4
1550 to 1799 For CH5

(Note 1) The addresses in the table are the addresses which indicate the configurations in the positioning
memory. For reading / writing data using user programs, use an area number and offset address in
combination for specification.

WUME-FPXHPGRG-021 App-49
Positioning Memory

■ Reading from positioning memory


● It is possible to read the areas which are shown with "Available" in the "R" column in the
following table using the F384 (PTBLR) instruction in user programs during RUN. The
operand of the instruction is specified using the combination of the channel number, area
number and offset address.

■ Writing to positioning memory


● When the mode changes from PROG. to RUN, the contents set by the tool software
Configurator PMX will be stored.
● It is possible to rewrite the areas which are shown with "Available" in the "W" column in the
following table using the F385 (PTBLW) instruction in user programs during RUN. The
operand of the instruction is specified using the combination of the channel number, area
number and offset address.
● Be sure not to execute writing in the reserved areas for the system.

Common Area (Memory Area No. 0)

●: Available, -: Not available


Address Name Default Description R W
Stores used channels (axes) and usage methods.
Monitor using binary display.

bit no. Settings


0 Not use CH0 (0) / Use CH0 (1)
1 Not use CH1 (0) / Use CH1 (1)
2 Not use CH2 (0) / Use CH2 (1)
3 Not use CH3 (0) / Use CH0 (1)
4 Not use CH4 (0) / Use CH3 (1)
0000 Axis setting H0 ● ●
5 Not use CH5 (0) / Use CH3 (1)
6 to 7 Disable the setting
Use CH0 and CH1 as an interpolation
8 axis
Not use (0) / Use (1)
Use CH2 and CH3 as an interpolation
9 axis
Not use (0) / Use (1)
10 to 15 Disable the setting

Positioning repeat Stores the repeat count in decimal when using the
0001 count K0 repeat control in the position control. ● ●
(CH0)
Set value Operation
Positioning repeat 0 or 1 Not repeat an operation.
0002 count K0 ● ●
Repeat an operation for a specified
(CH1) 2 to 254
number of times.

App-50 WUME-FPXHPGRG-021
Positioning Memory

Address Name Default Description R W


Positioning repeat
0003 count K0 ● ●
(CH2) Set value Operation

Positioning repeat 255 or more Repeat an operation infinitely.


0004 count K0 ● ●
(CH3)
Positioning repeat
0005 count - - ● ●
(CH4)
Positioning repeat
0006 count ● ●
(CH5)
Stores a generated positioning error code in Hex
format (hexadecimal) when using the pulse output
0007 Error code H0 function (table setting mode). ● -
The higher 8 bits indicate channel number.
The lower 8 bits indicate error code.
0008
Reserved for system - - - -
to 0029

Axis Information Area (Memory Area No. 1)

●: Available, -: Not available


Offset
Name Default Description R W
address
Stores the monitor values of the positioning
Active or execution table numbers during the execution or on the
0000 K0 completion of each channel. ● -
done table
Stored value: 0-20
Stores the repeat count during the operation of
each channel. The execution start time is
counted as “1”. When the repeat count exceeds
Repeat count current the upper limit, it returns to “0”. When the repeat
0001 K0 ● -
value operation is not enabled, “0” is stored at the
positioning control start time.
Stored value: 0-65535
Stores the elapsed values (current value
coordinate) of each channel.
0002 Elapsed value (Current Range: -1,073,741,824 to 1,073,741,823
K0 ● ●
-0003 value coordinate) For the interpolation control, the setting range is
as follows.
-8,388,608 to +8,388,607
0004
Reserved for system - - - -
-0009

WUME-FPXHPGRG-021 App-51
Positioning Memory

Axis Setting Area (Memory Area No. 2)

●: Available, -: Not available


Offset
Name Default Description R W
address
Stores the settings of pulse output, home position, near
home position, and limit signal of each channel. Monitor in
binary format.

bitno. Item Settings

Pulse output 0:Pulse/Sign


0
method 1:CW/CCW
0: Elapsed value + Direction
is CW
Pulse output (Forward OFF/Reverse ON)
1
rotation direction 1: Elapsed value + Direction
Pulse output is CCW
0000 H0 (Forward ON/Reverse OFF) ● ●
control code
Home position
2
logic
Home position
3
proximity logic 0: Normal Open (A contact)
Limit (+) switch 1: Normal Close (B contact)
4
logic
Limit (-) switch
5
logic
Disable the
6-15
setting

Stores the settings of the startup speed for each operation


0001 Startup
K100 of each channel in decimal. ● ●
-0002 speed
Setting range: 1 to 100,000
Stores the settings of home return patterns of each channel.
H0: DOG method 1
H1: DOG method 2
H2: DOG method 3
Home return
0003 HFF H3: Setting error ● ●
method
H4: Setting error
H5: Home position method (Z phase method)
H6: Data set method
HFF: Not use
Stores the settings of home return operation direction in
Home return decimal.
0004 K0 ● ●
direction 0: Elapsed value decreasing direction (Limit - direction)
1: Elapsed value increasing direction (Limit + direction)
Stores the settings of the acceleration time for the home
Home return
return of each channel in decimal. It indicates the time from
0005 acceleration K100 the startup speed to the home return target speed. ● ●
time
Setting range: 1-10,000 (ms)

App-52 WUME-FPXHPGRG-021
Positioning Memory

Offset
Name Default Description R W
address
Stores the settings of the deceleration time for the home
Home return
return of each channel in decimal. It indicates the time from
0006 deceleration K100 the home return target speed to the startup speed. ● ●
time
Setting range: 1-10,000 (ms)
Stores the settings of the target speed for the home return
0007 Home return
K1000 of each channel in decimal. ● ●
-0008 target speed
Setting range: 1 to 100,000
Stores the settings of the creep speed for the home return
0009 Home return
K100 of each channel in decimal. ● ●
-0010 creep speed
Setting range: 1 to 100,000
Stores the settings of the deviation counter clear signal ON
time after the completion of home return of each channel in
Deviation decimal.
0011 counter K1 Setting range: 1 to 100 (ms) ● ●
clear time
In the case of 0, no deviation counter clear signal is output.
In the case of 100 or more, the ON time is set to 100 ms.
Stores the elapsed values (current value) after the home
return.
0012 Coordinate
K0 Range: -1,073,741,824 to 1,073,741,823 ● ●
-0013 origin
For the interpolation control, the setting range is as follows.
-8,388,608 to +8,388,607
Stores the settings of the acceleration time for the JOG
JOG operation of each channel in decimal. It indicates the
0014 acceleration K0 acceleration time from startup speed to JOG operation ● ●
time target speed.
Setting range: 0 to 10,000 (ms)
Stores the settings of the deceleration time for the JOG
JOG operation of each channel in decimal. It indicates the
0015 deceleration K0 deceleration time from JOG operation target speed to ● ●
time startup speed.
Setting range: 0 to 10,000 (ms)
Stores the settings of the target speed for the JOG
0016 JOG
K1000 operation of each channel in decimal. ● ●
-0017 target speed
Setting range: 1 to 100,000
J point Stores the settings of the target speed for changing the J-
0018
change K1000 point control speed for each channel in decimal. ● ●
-0019
target speed Setting range: 1 to 100,000
Emergency Stores the settings of the deceleration time for the
stop emergency stop operation of each channel in decimal. It
0020 K100 indicates the deceleration time from 100 kHz to 0 Hz. ● ●
deceleration
time Setting range: 0 to 10,000 (ms)
Stores the settings of the deceleration time for the limit stop
Limit stop
operation of each channel in decimal. It indicates the
0021 deceleration K100 deceleration time from 100 kHz to 0 Hz. ● ●
time
Setting range: 0 to 10,000 (ms)
0022 Reserved
- - - -
-0029 for system

WUME-FPXHPGRG-021 App-53
Positioning Memory

(Note 1) The emergency stop deceleration time and limit stop deceleration time indicates the deceleration time
in the section from 100 kHz to 0 Hz. When the speed during the operation is less than 100 kHz, the
actual deceleration time is shorter than the set time.

Positioning Table Area (Memory Area No. 3)

●: Available, -: Not available


Offset
Name Default Description R W
address
Stores the settings of the position specification method for
the positioning operation.

bit no. Item Settings


0000 Control code H0 Control 0:Increment mode ● ●
0
method 1:Absolute mode
Disable the
1-15
setting

Stores the settings of single axis and interpolation operation


pattern of positioning operation. In the interpolation
operation, the setting for the axis with the smallest number
in an axis group is effective.

bit no. 15 87 0
0 0 0 0 0 0 0

Control Channel specification


0001 H0 H00: Linear interpolation ● ●
pattern
(composite speed)
H01: Linear interpolation
(major axis speed)
Control pattern
H00: E-point control (End point control)
H01: P-point control (Pass point control)
H02: C-point control (Continuance point control)
H03: J-point control (Speed point control)

Stores the settings of the acceleration time for the


Positioning
positioning operation. It indicates the acceleration time from
0002 acceleration K100 the startup speed to the target speed. ● ●
time
Setting range: 1 to 10,000 (ms)
Stores the settings of the deceleration time for the
Positioning
positioning operation. It indicates the deceleration time from
0003 deceleration K100 the target speed to the startup speed. ● ●
time
Setting range: 1 to 10,000 (ms)
Stores the settings of the target speed for the positioning
0004 Positioning operation. In the interpolation operation, the setting for the
K1000 axis with the smallest number in an axis group is effective. ● ●
-0005 target speed
Setting range: 1 to 100,000
Stores the settings of the movement amount for the
Positioning positioning operation.
0006
movement K0 ● ●
-0007 Setting range: -1,073,741,824 to 1,073,741,823
amount
For the interpolation control, the setting range is as follows.

App-54 WUME-FPXHPGRG-021
Positioning Memory

Offset
Name Default Description R W
address
-8,388,608 to +8,388,607
Dwell Stores the setting of dwell time.
0008 K0 ● ●
time Setting range: 0 to 32,767ms
Reserved for
0009 - - - -
system

(Note 1) The offset addresses in the above table are for the table no. 0. They vary according to the table
numbers as described on the next page.

■ Offset addresses

Control Control Positioning Positioning Positioning Dwell


Positioning
Table no. acceleration deceleration movement
code pattern target speed time
time time amount
1 0 1 2 3 4-5 6-7 8
2 10 11 12 13 14-15 16-17 18
3 20 21 22 23 24-25 26-27 28
4 30 31 32 33 34-35 36-37 38
5 40 41 42 43 44-45 46-47 48
6 50 51 52 53 54-55 56-57 58
7 60 61 62 63 64-65 66-67 68
8 70 71 72 73 74-75 76-77 78
9 80 81 82 83 84-85 86-87 88
10 90 91 92 93 94-95 96-97 98
11 100 101 102 103 104-105 106-107 108
12 110 111 112 113 114-115 116-117 118
13 120 121 122 123 124-125 126-127 128
14 130 131 132 133 134-135 136-137 138
15 140 141 142 143 144-145 146-147 148
16 150 151 152 153 154-155 156-157 158
17 160 161 162 163 164-165 166-167 168
18 170 171 172 173 174-175 176-177 178
19 180 181 182 183 184-185 186-187 188
20 190 191 192 193 194-195 196-197 198

(Note 1) For the positioning target speed and positioning movement amount, specify the lower address number
of 2-word area.

WUME-FPXHPGRG-021 App-55
List of Error Codes

List of Error Codes

List of Syntax Check Errors

Error codes 1 to 8
Operat
Code Name Error contents and steps to take
ion
● A sequence program with a syntax error has been written.
E1 Syntax error Stop
● Change to PROG. mode and correct the error.
● The relay is used in the ‘Out’ instruction or ‘Keep’ instruction
more than once. It also occurs when using the same timer /
counter number.
Duplicate use (definition) ● Change to PROG. mode and correct the program so that one
E2 Stop
error(Note 1) relay is not used for two or more instructions. Or, set the
duplicated output to "enable" in the system register no. 20. A
timer / counter instruction double definition error will be
detected even if double output permission has been selected.
● For instructions which must be used in a pair (such as JP and
LBL), one instruction is either missing or in an incorrect
E3 Not paired error Stop position.
● Change to PROG. mode and enter the two instructions which
must be used in a pair in the correct positions.
● An instruction has been written which does not agree with
system register settings. The number setting in a program
Parameter mismatch
E4 Stop does not agree with the timer / counter range setting.
error
● Change to PROG. mode, check the system register settings,
and change so that the settings and the instruction agree.
● An instruction which must be written in a specific area (main
program area or subprogram area) has been written to a
Program area error(Note different area (for example, a subroutine SUB to RET is
E5 Stop placed before an ED instruction).
1)
● Change to PROG. mode and enter the instruction into the
correct area.
● The program is too large to compile in the program memory.
E6 Compile memory full Stop ● Change to PROG. mode and reduce the total number of steps
for the program.
● In the program, high-level instructions, which execute in every
scan and at the leading edge of the trigger, are programmed
High-level instruction to be triggered by one contact.
E7 Stop
type error ● Correct the program so that the high-level instructions
executed in every scan and only at the leading edge are
triggered separately.

High-level instruction ● There is an incorrect operand in an instruction which requires


a specific combination of operands (for example, the
E8 operand combination Stop operands must all be of a certain type).
error ● Enter the correct combination of operands.

(Note 1) The error codes E2 and E5 are detected even when rewriting data with syntax errors in RUN mode. In
this case, nothing will be written into the Control Unit. The operation continues.

App-56 WUME-FPXHPGRG-021
List of Error Codes

Self-diagnostic Errors

Operat
Code Name Error contents and steps to take
ion
● The watchdog timer is activated and the operation stops. A
hardware error or operation congestion occurs.
E20 Watchdog timeout Stop ● Check if an endless loop occurs by a control instruction which
changes the flow of the process of a program (such as JP and
LOOP). If there is no problem in the program, there may be an
error in the hardware.
● There may be an error in the hardware. Please contact your
E22 Hardware error Stop
dealer.
Master memory model ● The models of master memories are different. Use the master
E25 Stop
unmatch error memories created with the same model.
● When the master memory cassette is mounted, the master
memory cassette may be damaged.
● Remove the master memory cassette and check whether the
E26 User ROM error Stop error occurs. If the error does not occur, the master memory is
damaged.
● Rewrite the master memory and use it again. When the error
does not turn off, please contact your dealer.
● The number of the installed units exceeds the limitation.
Restrictions on the
E27 Stop ● Turn off the power and re-configure units referring to the
number of units installed
hardware manual.
● An abnormal unit is installed.
E34 I/O status error Stop ● Check the slot number with DT90036, and replace the
abnormal unit with a normal unit.
● There may be an error in the Function Cassette. Check the
position where the error occurs with the special data register
E40 I/O error Stop DT90002 and fix the error.
● In the tool software, it can also be checked with the [I/O Error]
button in the status display dialog box.
● There may be an error in an intelligent unit. Check the position
where the error occurs with the special data register DT90006
E41 Special unit out of control Stop and fix the error.
● In the tool software, it can also be checked with the [Special
Error] button in the "Status Display" dialog box.
● The I/O unit (Expansion Unit) wiring condition has changed
compared to that at time of power-up.
● Check the I/O unit whose wiring condition has changed with
E42 I/O verification error Select the special data registers DT90010 and DT90011. Or check
the fitting state of the expansion connector.
● In the tool software, it can also be checked with the
[Verification Error] button in the "Status Display” dialog box.
● The error when using the table operation function occurs.
● The set parameter may be incorrect or the limit error may
Positioning operation occur.
E44 error Select ● Check if the parameter is in the settable range.
occurred ● The channel and content where the positioning operation error
occurs can be confirmed by pressing the [Positioning errors]
button in the "Status Display” dialog box.
E45 Operation error occurred Select ● Inexecutable operation error occurs.

WUME-FPXHPGRG-021 App-57
List of Error Codes

Operat
Code Name Error contents and steps to take
ion
● The address of the operation error can be confirmed by either
special data registers DT90017 or DT90018. In the tool
software, it can also be checked with the [Operation errors]
button in the "Status Display” dialog box.
● The setting value of a system register is abnormal. Check the
setting again. Example) The error occurs when the range of
the data registers or internal relays set in the system register
Operati no. 0 or no. 1 are inconsistent with the settings of hold / non-
System register setting
E48 on hold area in the system register no. 7 or no. 8, or the buffer
error stops area setting for the general-purpose communication in the
system register nos. 416 to 423.
● The system register number can be confirmed by the special
register DT90007.
● The power supply to the Expansion Unit was turned ON later
Operati
Expansion unit power than that to the Control Unit. Turn on the power supply to the
E49 on
supply sequence error Expansion Unit earlier or at the same time as the Control Unit
stops
power supply.
● The voltage of the backup battery lowered or the backup
Operati
Battery error battery is not installed in the Control Unit. Check the backup
on
E50 (A battery comes off or battery, and replace or connect it if necessary.
continu
the voltage drops.) ● This self-diagnostic error can be set to be notified or not by the
es
system register no. 4.
E100
to Stop
● An error that has been arbitrarily set by the high-level
E199
Self-diagnostic error set instruction F148 occurs.
E200 by F148 Operati ● Take countermeasures according to the specified detection
to on condition.
continu
E299 es

List of MEWTOCOL-COM Communication Error Codes

Code Name Description of error


A command that cannot be used for global (unit no. FF) was
!26 Unit number setting error
received.
!40 BCC error Transmission error occurred in received data.
!41 Format error Command that does not match the format was received.
!42 NOT support error An unsupported command was received.
!43 Multiframe process error Another command was received during the multiframe processing.
!60 Parameter error Specified parameter does not exist, or cannot be used.
There is an error in the contact, data area, data number, size, range
!61 Data error
or format specification.
The number of registration exceeded the restriction, or operation is
!62 Registration over error
performed without registration.
!63 PC mode error Invalid command was executed in RUN mode.
There is an abnormality in hardware. There may be an abnormality in
!64 External memory error
the internal ROM (F-ROM) / master memory.

App-58 WUME-FPXHPGRG-021
List of Error Codes

Code Name Description of error


At the time of ROM transfer, a specified content exceeds the
capacity.
A reading / writing error occurred.
Write operation was performed to a program or system register when
!65 Protection error the unit is protected (password setting) or when the Master Memory
Cassette is installed.
The code format of address data is incorrect, or the range
!66 Address error
specification is incorrect.
Missing program error Program cannot be read as there is no program in program area or
!67
/ Missing data error an error in memory contents. Or unregistered program was read.

Editing an instruction that cannot be rewritten in RUN mode (ED,


Rewriting is disabled while in
!68 SUB, RET, INT, IRET, SSTP or STPE) is attempted. Nothing is
RUN mode
written to the Control Unit.
A command that cannot be processed simultaneously with the
!71 Exclusive control error
command in process was executed.

List of MODBUS Communication Error Codes

■ Error code details


1. Function code error
2. Device number error (out of range)
3. Device quantity error (out of range)

WUME-FPXHPGRG-021 App-59
BIN/HEX/BCD Code Correspondence Table

BIN/HEX/BCD Code Correspondence Table

Decimal Hexadecimal BIN Binary BCD Binary Coded Decimal (4-Digit)


(Decimal) (Hexadecimal) (Binary) (Binary Coded Decimal)
0 0000 00000000 00000000 0000 0000 0000 0000
1 0001 00000000 00000001 0000 0000 0000 0001
2 0002 00000000 00000010 0000 0000 0000 0010
3 0003 00000000 00000011 0000 0000 0000 0011
4 0004 00000000 00000100 0000 0000 0000 0100
5 0005 00000000 00000101 0000 0000 0000 0101
6 0006 00000000 00000110 0000 0000 0000 0110
7 0007 00000000 00000111 0000 0000 0000 0111
8 0008 00000000 00001000 0000 0000 0000 1000
9 0009 00000000 00001001 0000 0000 0000 1001
10 000A 00000000 00001010 0000 0000 0001 0000
11 000B 00000000 00001011 0000 0000 0001 0001
12 000C 00000000 00001100 0000 0000 0001 0010
13 000D 00000000 00001101 0000 0000 0001 0011
14 000E 00000000 00001110 0000 0000 0001 0100
15 000F 00000000 00001111 0000 0000 0001 0101
16 0010 00000000 00010000 0000 0000 0001 0110
17 0011 00000000 00010001 0000 0000 0001 0111
18 0012 00000000 00010010 0000 0000 0001 1000
19 0013 00000000 00010011 0000 0000 0001 1001
20 0014 00000000 00010100 0000 0000 0010 0000
21 0015 00000000 00010101 0000 0000 0010 0001
22 0016 00000000 00010110 0000 0000 0010 0010
23 0017 00000000 00010111 0000 0000 0010 0011
24 0018 00000000 00011000 0000 0000 0010 0100
25 0019 00000000 00011001 0000 0000 0010 0101
26 001A 00000000 00011010 0000 0000 0010 0110
27 001B 00000000 00011011 0000 0000 0010 0111
28 001C 00000000 00011100 0000 0000 0010 1000
29 001D 00000000 00011101 0000 0000 0010 1001
30 001E 00000000 00011110 0000 0000 0011 0000
31 001F 00000000 00011111 0000 0000 0011 0001
63 003F 00000000 00111111 0000 0000 0110 0011
255 00FF 00000000 11111111 0000 0010 0101 0101
9999 270F 00100111 00001111 1001 1001 1001 1001

App-60 WUME-FPXHPGRG-021
ASCII Code Table, JIS8 Code Table

ASCII Code Table, JIS8 Code Table

■ Reference ASCII code table

WUME-FPXHPGRG-021 App-61
ASCII Code Table, JIS8 Code Table

■ Reference JIS8 code table


0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Column

b7 b6 b5 b4 b3 b2 b1 b0 0 1 2 3 4 5 6 7 8 9 A B C D E F
Row

0 0 0 0 0 NUL TC7 (DEL) (SP) 0 @ P ` p Undefined ー タ ミ


0 0 0 1 1 TC1 (SOH) DC1 ! 1 A Q a q 。 ア チ ム
0 0 1 0 2 TC2 (STX) DC2 " 2 B R b r 「 イ ツ メ
0 0 1 1 3 TC3 (ETX) DC3 # 3 C S c s 」 ウ テ モ
0 1 0 0 4 TC4 (EOT) DC4 $ 4 D T d t 、 エ ト ヤ
0 1 0 1 5 TC5 (ENQ) TC8 (NAK) % 5 E U e u ・ オ ナ ユ
0 1 1 0 6 TC6 (ACK) TC9 (SYN) & 6 F V f v ヲ カ ニ ヨ

Undefined

Undefined

Undefined

Undefined
0 1 1 1 7 BEL ETB ' 7 G W g w ア キ ヌ ラ
1 0 0 0 8 EE0 (BS) CAN ( 8 H X h x イ ク ネ リ
1 0 0 1 9 EE1 (HT) EM ) 9 I Y i y ウ ケ ノ ル
1 0 1 0 A EE2 (LF) SUB * : J Z j z エ コ ハ レ
1 0 1 1 B EE3 (VT) ESC + ; K [ k | オ サ ヒ ロ
1 1 0 0 C EE4 (FF) IS4 (FS) , < L ¥ l | ヤ シ フ ワ
1 1 0 1 D EE5 (CR) IS3 (GS) - = M ] m | ユ ス ヘ ン
1 1 1 0 E SO IS2 (RS) . > N ^ n ¯ ヨ セ ホ "
1 1 1 1 F SI IS1 (US) / ? O _ o DEL ッ ソ マ '

Do not use the undefined parts of the JIS8 code table.

App-62 WUME-FPXHPGRG-021
Record of changes
The manual number is shown at the bottom of the cover page.

Date Manual No. Description of changes


Jul. 2021 WUME-FPXHPGRG-01 1st edition
Apr. 2024 WUME-FPXHPGRG-02 2nd edition
● Change in Corporate name

WUME-FPXHPGRG-021
(MEMO)

WUME-FPXHPGRG-021
(MEMO)

WUME-FPXHPGRG-021
Panasonic Industry Co., Ltd.
Panasonic Industrial Devices SUNX Suzhou Co., Ltd.
No.97 Huoju Road, New District Suzhou, Jiangsu Province, China
https://industry.panasonic.com/
Phone: +86-512-6843-2580
Please visit our website for inquiries and about our sales network.
© Panasonic Industry Co., Ltd. 2021-2024
June, 2024
WUME-FPXHPGRG-021

You might also like