FP-XH PGRG e
FP-XH PGRG e
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
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
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
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
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
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
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
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
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
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
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
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
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-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"
DSET Turns ON the output and holds it ON: Direct input(Note 1) 3 "P.2-43"
DRST Turns OFF the output and holds it OFF: Direct input(Note 1) 3 "P.2-43"
(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"
(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).
■ 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"
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"
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
■ 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"
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"
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"
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"
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"
■ 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"
WUME-FPXHPGRG-021 1-13
1.2 List of High-level Instructions
(Note 1) For the F253 instruction, the number of steps varies according to the content specified for the
operand.
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"
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
1-16 WUME-FPXHPGRG-021
1.2 List of High-level Instructions
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)
■ 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
■ 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)
● 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)
■ 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)
■ 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.
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)
X0
R0
DST X0 execution
2-6 WUME-FPXHPGRG-021
2.3 DOT (direct out)
■ Instruction format
■ Instruction list
Instru
Description
ction
DOT Coil that outputs logical operation
■ 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.
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)
■ 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
■ 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.
WUME-FPXHPGRG-021 2-11
2.5 AN, AN/ (AND, AND Not)
2-12 WUME-FPXHPGRG-021
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
■ 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.
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)
■ 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
■ 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)
WUME-FPXHPGRG-021 2-17
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
■ 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.
2-18 WUME-FPXHPGRG-021
2.8 DOR, DOR/ (Direct OR, Direct OR Not)
● 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
■ 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
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)
■ Instruction format
■ Instruction list
Instru
Description
ction
ALT Coil that controls flip-flops
■ 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
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)
■ Instruction format
■ Outline of operation
● Blocks that were connected in parallel are connected in series.
■ 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.
Block 1 Block 2
WUME-FPXHPGRG-021 2-25
2.11 ANS (And Stack)
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)
■ Instruction format
■ Outline of operation
● Serially connected blocks are connected in parallel.
■ 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.
Block 1 Block 2
WUME-FPXHPGRG-021 2-27
2.12 ORS (OR Stack)
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.)
2-30 WUME-FPXHPGRG-021
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack)
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)
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)
■ 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).
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
■ 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.
● 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.
2-34 WUME-FPXHPGRG-021
2.14 DF, DF/ (Rise Differential,Fall Differential)
● 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
WUME-FPXHPGRG-021 2-35
2.14 DF, DF/ (Rise Differential,Fall Differential)
<Time chart>
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)]
■ 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)
■ Instruction format
■ Instruction list
Instru
Description
ction
SET Output coil
RST Output coil
■ 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.
● 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).
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.)
2-42 WUME-FPXHPGRG-021
2.17 DSET/DRST (Direct Set/Direct Reset)
■ Instruction format
■ Instruction List
Instruct
Description
ion
DSET Output coil
DRST Output coil
■ 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.
WUME-FPXHPGRG-021 2-43
2.17 DSET/DRST (Direct Set/Direct Reset)
● 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
● 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
■ 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
WUME-FPXHPGRG-021 2-47
2.18 KP (Keep)
2-48 WUME-FPXHPGRG-021
2.19 DKP (Direct Keep)
■ Instruction format
R0
Set input
DKP
R1
Reset input Y0
■ Instruction list
Instru
Description
ction
DKP Output coil
■ 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.
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)
■ Instruction format
Timer number
X0 Execution conditions Timer units
TML5 K300
T5 Set value R0
■ Instruction list
Instru
Description
ction
n Timer set value
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.
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)
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" .
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)
● Timing chart
X0
T0
3 seconds
T1
2 seconds
Y10
Y11
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.
TMX5 SV5
● 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 ".
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
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
Control unit
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)
■ Instruction format
■ Instruction list
Instru
Description
ction
S Area storing the setting value, or constant data
D Process value area
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.)
WUME-FPXHPGRG-021 3-9
3.2 F137 STMR (16-bit, 0.01 s On-delay Timer)
R0 R5
DT10
F137 STMR DT10 DT20
K500 S
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
<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)
■ Instruction format
■ Instruction list
Instru
Description
ction
S Area storing the setting value, or constant data
D Process value area
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.)
3-12 WUME-FPXHPGRG-021
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer)
R0 R5
F183 DSTM K500 DT5 0
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
ON
R0
OFF
R5
(R900D)
<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)]
■ 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
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
■ 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
Count input
● 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.
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
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
● 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
WX0
Digital switches
● Ladder diagram
3-22 WUME-FPXHPGRG-021
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
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
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
● 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)
■ Instruction format
X0
Data input
SR WR3
D
X1
Shift input
X2
Reset input
■ Instruction list
Instru
Description
ction
D Specified register
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.
WUME-FPXHPGRG-021 3-27
3.6 SR (Shift Register)
Shift input
Reset input
Rn
Shift input
■ 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)
■ Instruction format
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
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
■ 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)
■ 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
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.
3-32 WUME-FPXHPGRG-021
3.8 F182 FILTR (Time Literal Process)
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)
■ Instruction format
Execution conditions Master control relay number
X0
( MC 1 )
X1 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
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)
WUME-FPXHPGRG-021 4-5
4.1 MC/MCE (Master Control Relay / Master Control Relay End)
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)
■ 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)
( 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.
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)
■ Instruction format
X0
F0 MV K5 DT0
Label number
( LBL 1 )
■ Instruction list
Instru
Description
ction
S Area storing number of loop operations
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
● 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.
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)
● 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
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)
■ 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)
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.
5-2 WUME-FPXHPGRG-021
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step,
Step End)
Process 2
Process 1 Process 4
Process 3
Process 2
Process 1 Process 4
Process 3
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
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
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.
Execution
Normal ladder area Y10
SSTP 1
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.
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)
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
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)
X100
X101 X102
X103 X104
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
R152
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
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)
■ 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
XF (block area)
End
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)
■ 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 )
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
( 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)
■ 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).
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.
● 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.
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.
INT2 input
(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.
WUME-FPXHPGRG-021 7-5
7.1 INT/IRET (Interrupt / Interrupt Return)
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.
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)
e.g.
INT1 input
INT2 input
e.g.
ICTL execution (INT2 clear)
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)
■ Instruction format
■ Operands
Items Settings
S1 Area storing the control data, or constant data
S2 Area storing the control data, or constant data
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.
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 3) Clearing interrupts other than INT0 when the INT0 program ends
( IRET )
S1
WUME-FPXHPGRG-021 7-9
7.2 ICTL (Interrupt Control)
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
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)
[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)
INT0 program
Clear
INT0 input
INT1 input
(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.
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)
INT24 program
15 seconds 15 seconds
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)
■ 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
S ●
■ 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.
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
WUME-FPXHPGRG-021 8-3
8.1 SYS1 (Communication Condition Setting)
(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
(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
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
(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
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
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)
■ 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
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
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
S Character constant
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
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
WUME-FPXHPGRG-021 8-11
8.4 SYS1 [PC (PLC) Link Time Setting]
■ Instruction format
■ Operands
Items Settings
S Character constant
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]
■ 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)
■ Instruction format
R0
( DF ) SYS1 " COM1,WAIT2"
S
First keyword Second keyword
■ Operands
Items Settings
S Character constant
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
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".
■ 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)
■ Instruction format
■ Operands
Items Settings
S Character constant
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"
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]
■ 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)
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].
8-18 WUME-FPXHPGRG-021
8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change]
■ Program example
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
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
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
■ 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
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
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
■ 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
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
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
■ 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)]
■ 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
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.
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.
■ 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)]
■ 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
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.
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.
■ 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)]
■ 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
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.
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.
■ 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)
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.
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.
■ 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)
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.
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.
■ 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)
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.
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.
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing the hexadecimal data or constant data
D Area where data is transferred to
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)
■ Instruction format
■ Operands
Items Settings
D Area where data is transferred to
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)
■ Instruction format
■ Operands
Items Settings
S Area storing 32-bit data, or constant data
D Area where data is transferred to
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.
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)
■ Instruction format
■ Operands
Items Settings
S Area storing the hexadecimal data or constant data
D Area where data is transferred to
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)
R0:ON F2 execution
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing 32-bit data, or constant data
D Area where data is transferred to
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)
R0:ON F3 execution
■ 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)
■ 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
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
n=H
(1) Bit position in destination [D]
(Range: 0 to F)
For example, specify A to specify bit 10. When transferring bit 4 of [S] to bit 12 of [D], n = HC04.
10-12 WUME-FPXHPGRG-021
10.6 F5 BTM (Bit Data Transfer)
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
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
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
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
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
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
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)
■ 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
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
■ 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
WUME-FPXHPGRG-021 10-17
10.7 F6 DGT (Digit Data Transfer)
n=H
If (1) or (2) is 0, such as"H000"in the program example on the previous page, use the short
form"H0".
3 2 1 0
S
Set n=H101.
D
2. One digit is transferred to a non-parallel destination
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)
3 2 1 0
S
Set n=H212.
D
4. Multiple digits are transferred to a non-parallel destination
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)
■ 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)
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]
[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)
■ 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)
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
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)
■ Instruction format
■ Operands
Items Settings
S1 Starting address of the source data
S2 Final address of the source data
D Data destination storage area
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)
Destination
DT1 K 11 DT10 K0
DT2 K 12 DT11 K0
[S2] DT3 K 13 DT12 K0
DT4 K 14 DT13 K0
■ 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)
■ 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
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)
■ 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)
■ 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
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
WUME-FPXHPGRG-021 10-29
10.12 F12 ICRD (F-ROM Read)
■ 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.
■ 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)
■ 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
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
WUME-FPXHPGRG-021 10-31
10.13 P13 ICWT (F-ROM Write)
■ 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.
■ 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)
■ 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
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)
■ 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)
■ 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
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area storing 16-bit data for higher 8-bit and lower 8-bit exchange
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
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)
■ 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
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].
■ 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)
■ Flag operations
Name Description
10-40 WUME-FPXHPGRG-021
10.18 F190 MV3 (Three 16-bit Data Transfer to Single Area)
■ 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)
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)
[D]
■ 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)
■ 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)
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
Content of DT31 Content of DT30 Content of DT21 Content of DT20 Content of DT11 Content of DT10
[D]
■ 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])
■ 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
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
■ 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])
■ 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
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])
(Store result)
The lower 16 bits of the addition result are stored in DT10 and the
higher 16 bits are stored in DT11.
■ 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])
■ 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
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
■ 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])
■ 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
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])
(Store result)
The lower 16 bits of the addition result are stored in DT30 and the
higher 16 bits are stored in D31.
■ 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])
■ 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)
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
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])
■ 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)
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])
(Store result)
The lower 16 bits of the subtraction result are stored in DT20 and the
higher 16 bits are stored in DT21.
■ 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])
■ 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
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
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])
■ 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
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])
(Store result)
The lower 16 bits of the subtraction result are stored in DT30 and the
higher 16 bits are stored in 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"
(=)
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])
■ 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)
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]
■ 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)
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
16 bits 16 bits
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.
■ 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])
■ 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)
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])
■ 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)
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
(Store result)
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])
■ 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)
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])
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area to which 1 is to be added
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
11-30 WUME-FPXHPGRG-021
11.14 F35 +1 (16-bit Data Increment)
■ 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)
■ Instruction format
■ Operands
Items Settings
D The area (32-bit) that +1 is added to
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.
+1
11-32 WUME-FPXHPGRG-021
11.15 F36 D+1 (32-bit Data Increment)
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area to be decreased by 1
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
11-34 WUME-FPXHPGRG-021
11.16 F37 -1 (16-bit Data Decrement)
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area (32-bit) from which 1 is subtracted
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.
-1
11-36 WUME-FPXHPGRG-021
11.17 F38 D-1 (32-bit Data Decrement)
■ 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])
■ 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)
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
(Store result)
■ 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])
■ 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
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)
■ 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])
■ 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
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])
(Store result)
The lower 16 bits of the addition result are stored in DT10 and the higher
16 bits are stored in DT11.
■ 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])
■ 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
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)
■ 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])
■ 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
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])
(Store result)
The lower 16 bits of the addition result are stored in DT30
and the higher 16 bits are stored in 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"
(=)
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])
■ 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)
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)
■ 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])
■ 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)
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])
(Store result)
■ 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])
■ 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
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)
■ 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])
■ 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
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])
(Store result)
The lower 16 bits of the subtraction result are stored in DT30 and the
higher 16 bits are stored in 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"
(=)
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])
■ 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)
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)
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
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.
×
■ 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])
■ 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)
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
WUME-FPXHPGRG-021 12-23
12.12 F53 DB% (8-digit BCD Data Subtraction [S1/S2=D+1, D])
■ 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)
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
÷
(division)
(Store result)
The lower 16 bits of the remainder are stored in DT90015 and the
higher 16 bits are stored in DT90016.
■ Flag operations
Name Description
WUME-FPXHPGRG-021 12-25
12.13 F55 B+1 (4-digit BCD Data Increment)
■ Instruction format
■ Operands
Items Settings
D Area to which 1 is to be added
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.
12-26 WUME-FPXHPGRG-021
12.13 F55 B+1 (4-digit BCD Data Increment)
■ 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)
■ Instruction format
■ Operands
Items Settings
D The area (32-bit) that +1 is added to
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.
+1
12-28 WUME-FPXHPGRG-021
12.14 F56 DB+1 (8-digit BCD Data Increment)
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area to be decreased by 1
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area (32-bit) from which 1 is subtracted
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.
-1
12-32 WUME-FPXHPGRG-021
12.16 F58 DB-1 (8-digit BCD Data Decrement)
■ 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)
■ 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
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.
e.g.
WUME-FPXHPGRG-021 13-3
13.1 F60 CMP (16-bit Data Comparison)
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).
WUME-FPXHPGRG-021 13-5
13.1 F60 CMP (16-bit Data Comparison)
● 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)
■ 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
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.
e.g.
WUME-FPXHPGRG-021 13-9
13.2 F61 DCMP (32-bit Data Comparison)
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).
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
● 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)
■ Instruction format
Lower limit Upper limit
R0
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
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 ×
■ 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.
■ 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)
■ Instruction format
Lower limit Upper limit
R0
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
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 ×
■ 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
■ 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)
■ 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
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.
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
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
13-18 WUME-FPXHPGRG-021
13.6 F373 DTR (16-bit Data Change Detection)
■ Instruction format
■ Operands
Items Settings
S Area that detects data changes
D Area that stores data status during the previous execution
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.
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)
■ Instruction format
■ Operands
Items Settings
S Area that detects data changes
D Area that stores data status during the previous execution
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.
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)
■ 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
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
■ 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)
■ 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
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
■ 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)
■ 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
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)
■ 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
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
■ 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
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
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)
■ 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)
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)
■ 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)
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)
■ 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)
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)
■ 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)
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)
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
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-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
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)]
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)]
[S1] Exclusive OR
> 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)
■ 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
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
WUME-FPXHPGRG-021 15-7
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion)
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)
■ Conversion example
The following shows the conversion of hexadecimal number data to ASCII code.
4 bytes
15-8 WUME-FPXHPGRG-021
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion)
3 bytes
■ 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)
■ 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
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)
C D A B
■ Conversion example
● ASCII codes are converted into hexadecimal data as shown below.
32 31 46 45 44 43 42 41
8 characters (8 bytes)
12 EF CD AB
WUME-FPXHPGRG-021 15-11
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion)
46 45 44 43 42 41
F E D C B A
6 characters (6 bytes)
(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)
44 n n-1 n-2
n 0 n-1 n-2
"0" is entered.
(Odd number value specified with n=S2)
■ 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)
■ 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
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.
Conversion range
0: Forward direction
1: Reverse direction
15-14 WUME-FPXHPGRG-021
15.4 F73 BCDA (BCD Data to ASCII Code Conversion)
S1 S1
(1)(2) (3)(4) (1)(2) (3)(4)
■ 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)
4 bytes
4 bytes
38 37 36 35 34 33 32 31
8 7 6 5 4 3 2 1
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)
■ 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
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.
Conversion range
0: Forward direction
1: Reverse direction
15-18 WUME-FPXHPGRG-021
15.5 F74 ABCD (ASCII Code to BCD Data Conversion)
(2) (1) (4) (3) ASCII code (4) (3) (2) (1)
<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
■ 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)
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)
■ 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
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)
■ Conversion example
The conversion from a 16-bit decimal number to ASCII code is performed as follows.
FF 9C
K-100
D+2 D+1 D
30 30 31 2D 20 20
0 0 1 -
WUME-FPXHPGRG-021 15-23
15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion)
04 D2
K1234
34 33 32 31 20 20
4 3 2 1
■ 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)
■ 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
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
WUME-FPXHPGRG-021 15-25
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion)
■ Conversion example
Conversion of ASCII code to a 16-bit decimal number is performed as shown below.
(Conversion result) D
FF 9C
K-100
15-26 WUME-FPXHPGRG-021
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion)
30 30 31 2B 30 30
0 0 1 +
[ASCII code]
S1+2 S1+1 S1
30 30 31 2D 30 30
0 0 1
D
00 64
K100
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)
■ 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
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
WUME-FPXHPGRG-021 15-29
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion)
■ Conversion example
The following shows conversion of a 32-bit decimal number to ASCII codes.
K-12345678
15-30 WUME-FPXHPGRG-021
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion)
K12345678
ASCII code
■ 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)
■ 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
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
15-32 WUME-FPXHPGRG-021
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion)
■ Conversion example
Conversion of ASCII code to a 32-bit decimal number is performed as shown below.
K-12345678
WUME-FPXHPGRG-021 15-33
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion)
38 37 36 35 34 33 32 31
8 7 6 5 4 3 2 1
ASCII code
[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 +
D+1 D
00 BC 61 4E
K12345678
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)
■ 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
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.
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)
■ 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)
■ 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
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
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)
■ 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
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.
■ 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)
■ 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
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)
■ Instruction format
■ Operands
Items Settings
D Area that stores the data to invert
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)
■ Instruction format
■ Operands
Items Settings
D Area for storing original data and its complement of 2
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)
■ Instruction format
■ Operands
Items Settings
D Starting number of area for storing original data and its complement of 2
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)
■ Instruction format
■ Operands
Items Settings
D Area storing the data for which the absolute value will be calculated
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)
■ Instruction format
■ Operands
Items Settings
D Starting number of the area storing the data for which the absolute value will be calculated
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)
■ Instruction format
■ Operands
Items Settings
D Area where data for sign extension is stored
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)
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)
■ 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
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.
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.
15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
n: - - - - 0 0 0 0 - - - - 0 0 0 0
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].
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)
■ Instruction format
■ Operands
Items Settings
S Area storing conversion data, or constant data
D Starting address of the area storing the conversion result
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.
WUME-FPXHPGRG-021 15-53
15.21 F91 SEGT (7-segment)
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)
■ 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
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.
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
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
15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit)
n: - - - - 0 0 0 0 - - - - 0 0 0 0
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
S+1 S
15-56 WUME-FPXHPGRG-021
15.22 F92 ENCO (Encode)
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)
■ 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
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)
■ 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
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)
■ 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
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)
DT39 12 34 19
DT40 12 34 20 [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 15-63
15.26 F97 DSRC (32-bit Data Search)
■ 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)
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)
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)
■ Instruction format
■ Operands
Items Settings
S Area storing the data to be converted, or constant data
D Area to store the conversion result
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)
■ 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)
Example 2)
(Higher) (Lower)
DT10 H59 H59 HBC19137F DT20
DT11 H31 H23 (Binary value) DT21
DT12 H00 H12 (3,155,759,999 seconds)
WUME-FPXHPGRG-021 15-67
15.27 F230 TMSEC (Time data to second conversion)
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing the number of seconds (32 bits)
D Starting area storing the time data
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)
(Higher) (Lower)
■ 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
Example 2)
(Higher) (Lower)
DT0 HBC19137F H59 H59 DT10
DT1 (Binary value) H31 H23 DT11
(3,155,759,999 seconds) H00 H12 DT12
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing the data to be converted, or constant data
D Area to store the conversion result
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].
■ 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)
■ 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
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].
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing the data to be converted, or constant data
D Area to store the conversion result
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].
■ 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)
■ 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
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].
■ Flag operations
Name Description
R9007
R9008 Turns ON when the area is exceeded in index modification.
(ER)
WUME-FPXHPGRG-021 15-75
15.32 F238 DGBIN (Gray Code to 32-bit Data Conversion)
15-76 WUME-FPXHPGRG-021
15.33 F240 COLM (Bit Line to Bit Column Conversion)
■ 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
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)
■ Flag operations
Name Description
15-78 WUME-FPXHPGRG-021
15.34 F241 LINE (Bit Column to Bit Line Conversion)
■ 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
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)
■ Flag operations
Name Description
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)
■ 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
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
16-2 WUME-FPXHPGRG-021
16.1 F100 SHR (16-bit Data Right Shift)
■ 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)
■ 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
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).
16-4 WUME-FPXHPGRG-021
16.2 F101 SHL (16-bit Data Left Shift)
■ 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)
■ 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
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).
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.
■ 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)
■ 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
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).
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.
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area storing the 16-bit data to be shifted
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
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)
■ Instruction format
■ Operands
Items Settings
D Area storing the 16-bit data to be shifted
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
DT90014: 0 0 0 Digit 4
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)
■ 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
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)
■ 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
■ 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)
■ 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
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
● 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)
■ 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
■ 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)
■ Instruction format
■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted
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
Shifted out
■ 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)
■ Instruction format
■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted
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
■ 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)
■ Instruction format
■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted
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.
0 0 2 1 2 1 0 0 3 0 0 2 3
■ 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)
■ Instruction format
■ Operands
Items Settings
D1 Starting address of the area to be shifted
D2 Ending address of the area to be shifted
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
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)
■ Instruction format
■ Operands
Items Settings
D Area targeted for rotation
n Area storing the number of bits specified to be rotated, or constant data
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].
● 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)
■ 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.
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area targeted for rotation
n Area storing the number of bits specified to be rotated, or constant data
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].
● 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)
■ 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.
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area targeted for rotation
n Area storing the number of bits specified to be rotated, or constant data
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).
17-6 WUME-FPXHPGRG-021
17.3 F122 RCR (16-bit Data Right Rotation with Carry)
■ 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.)
■ 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)
■ Instruction format
■ Operands
Items Settings
D Area targeted for rotation
n Area storing the number of bits specified to be rotated, or constant data
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].
17-8 WUME-FPXHPGRG-021
17.4 F123 RCL (16-bit Data Left Rotation with Carry)
■ 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.)
■ 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]
■ 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
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).
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]
■ 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.
■ 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)
■ 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
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).
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)
■ 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.
■ 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)
■ 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
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).
15 0 15 0
Before CY
execution
Content of
bit 0 before
After execution
execution
17-14 WUME-FPXHPGRG-021
17.7 F127 DRCR (32-bit Data Right Rotation with Carry)
■ 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.
■ 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)
■ 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
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).
15 0 15 0
Before
CY execution
Content of
most
significant bit After
before execution
execution
17-16 WUME-FPXHPGRG-021
17.8 F128 DRCL (32-bit Data Left Rotation with Carry)
■ 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.
■ 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)
■ Instruction format
■ Operands
Items Settings
D1 Starting address of specified range
D2 Final address of specified range
D3 Area storing read data
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]
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
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
WUME-FPXHPGRG-021 18-5
18.2 F99 CMPW (Compress Shift Write)
■ 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
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
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
WUME-FPXHPGRG-021 18-9
18.3 How to Use the FIFO (First-in First-out) Buffer
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.
18-10 WUME-FPXHPGRG-021
18.4 F115 FIFT (FIFO Buffer Definition)
■ 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
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
■ 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
DT257
DT258
■ Flag operations
Name Description
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)
■ Instruction format
■ Operands
Items Settings
S Starting address for the FIFO buffer area
D Area storing the data read from the FIFO buffer
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)
[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)
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.)
[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)
■ 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
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
[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)
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.)
18-20 WUME-FPXHPGRG-021
18.6 F117 FIFW (FIFO Data 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.
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)
■ 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
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.
■ 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)
■ 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
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.
■ 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)
■ 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
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.
■ 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)
■ 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
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.
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.
■ 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)
■ 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
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.
■ 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)
■ 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
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.
■ 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)
■ 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)
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)
20-2 WUME-FPXHPGRG-021
20.1 F138 HMSS (Hour, Minute, Second Data to Second Data Conversion)
D+1 D
Seconds (H00000000 to H99999999)
■ 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)
■ 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)
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)
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.
■ 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
WUME-FPXHPGRG-021 20-5
20.3 F140 STC (Cy Flag Set)
■ 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)
■ 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)
■ 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
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.
■ 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)
■ 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
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.)
■ 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.
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)
■ Instruction format
Set self -diagnostic error
R0
R1
F148 ERR K0
■ Operand
Items Settings
n Self-diagnostic error code (0, 100 to 299)
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)
● 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.
■ 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)
■ Instruction format
■ Operands
Items Settings
S Message (character constant)
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)
■ 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
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
■ 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)
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)
■ 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
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
■ How to specify S1
(1) For intelligent units without banks
Specify the slot number where the target intelligent unit is installed.
20-22 WUME-FPXHPGRG-021
20.10 F151 WRT (Write to Shared Memory)
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)
■ 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)
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)
+ (addition)
<Time data> (Higher) (Lower)
● 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)
+ (addition)
■ 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)
■ 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)
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)
- (subtraction)
<Time data> (Higher) (Lower)
● 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)
- (subtraction)
WUME-FPXHPGRG-021 20-29
20.12 F158 CSUB (Calendar Data Subtraction)
94 12 1994, December
[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
94 12 1994, December
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing the data for square root calculation, or constant data
D Area storing the calculated square root
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
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
(Note 1) The Nos. in brackets indicate devices that are compatible with existing FP-X / FPsigma.
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)
■ Instruction format
S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●
■ 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
[S1]: H8 H0 (fixed)
■ 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)
■ Instruction format
S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●
■ 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
[S1]: H8 H0 (fixed)
■ 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.
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)
■ Instruction format
S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●
■ 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)
Send
Device type specified Transfer
in [S2] No. of data MODBUS command to be sent
method
[n]
■ 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)
■ Instruction format
S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●
■ 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)
■ 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)
■ Instruction format
S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ●
D ● ● ●
N ● ● ● ● ● ● ● ● ● ●
■ 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
[S1]: H8 H0 (fixed)
■ 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)
■ Instruction format
S1 ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ●
■ 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
[S1]: H8 H0 (fixed)
■ 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.
WUME-FPXHPGRG-021 21-19
21.8 [F159 MTRN] Serial Data Send / Receive Instruction
■ Instruction format
■ 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
WUME-FPXHPGRG-021 21-21
21.8 [F159 MTRN] Serial Data Send / Receive Instruction
21-22 WUME-FPXHPGRG-021
21.8 [F159 MTRN] Serial Data Send / Receive Instruction
● 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
1. Specify registration of the data to be sampled and the sampling method (such as the
number of times or the time interval).
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)
■ 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)
■ 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
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
■ 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
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.
23-2 WUME-FPXHPGRG-021
23.1 [F0 MV] High-speed Counter Control Instruction
● 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
■ 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
S ● ● ● ● ● ● ● ● ● ● ● ●
D - ● ● ● ● ● ● ● ● - - ●
● 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
■ 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)
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
● 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)
■ Wiring example
■ Operation chart
WUME-FPXHPGRG-021 23-7
23.4 Sample Program (Positioning Operation With Inverter: Single-Speed)
■ Sample program
23-8 WUME-FPXHPGRG-021
23.5 Sample Program (Positioning Operation With Inverter: Double-Speed)
■ Wiring example
■ Operation chart
WUME-FPXHPGRG-021 23-9
23.5 Sample Program (Positioning Operation With Inverter: Double-Speed)
■ Sample program
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
■ Instruction format
R0
( DF ) F165 CAM0 DT100
S
■ Operand
Operand Settings
S Starting number of data table
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
24-2 WUME-FPXHPGRG-021
24.1 [F165 CAM0] High-speed Counter Cam Control Instruction
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)
WUME-FPXHPGRG-021 24-3
24.1 [F165 CAM0] High-speed Counter Cam Control Instruction
(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
(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.
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
減算時
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)
(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)
(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)
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)
WUME-FPXHPGRG-021 24-11
24.4 Sample Program (Upper Limit Control, Subtraction)
■ 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)
■ 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)
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].
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)
■ 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)
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].
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)
■ Instruction format
■ Operands
Items Settings
S Character constants (12 characters)
D Number at the start of the area storing the ACSII codes
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).
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)
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.
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.
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)
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
S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
■ 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.
WUME-FPXHPGRG-021 26-5
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion)
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)
26-6 WUME-FPXHPGRG-021
26.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion)
■ 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"
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"
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)
● 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"
■ 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)
■ 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
S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
■ 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.
WUME-FPXHPGRG-021 26-11
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion)
N=H 413
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"
WUME-FPXHPGRG-021 26-13
26.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion)
• When the number of numeric data items is"3", starting position for reading is"1", number
of digits to be converted is"4"
• 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)
• 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
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
■ 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 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
S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
■ 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.
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)
■ 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
S1 ● ● ● ● ● ● ● ● ● ● ● ●
S2 ●
D ● ● ● ● ● ● ● ● ●
■ 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.
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
(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)
(Note 1) Data outside the range in the destination (*) (bytes higher than DT6) does not change.
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
(Note 1) Data outside the range in the destination (*) (DT1 to DT6) does not change.
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
・ ・ ・
・ ・ ・
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)
■ Instruction format
■ Operands
Items Settings
S1 Character string 1 for comparison
S2 Character string 2 for comparison
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)
■ 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)
■ 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
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
■ 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)
■ Instruction format
■ Operands
Items Settings
S Character string
D Area that stores the number of characters in the calculation result
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
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)
■ 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
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)
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)
■ Instruction format
■ Operands
Items Settings
S1 Character string
S2 Area storing the number of characters, or constant data
D Area storing the character string
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
S1 Character string
S2 Area storing the number of characters, or constant data
D Area storing the character string
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)
■ 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)
■ 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
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)
■ Flag operations
Name Description
26-38 WUME-FPXHPGRG-021
26.14 F264 MIDW (Write to Any Position in 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
S1 ● ● ● ● ● ● ● ● ● ● ● ● ●
S2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
■ 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
■ Flag operations
Name Description
26-40 WUME-FPXHPGRG-021
26.15 F265 SREP (Replace Character Strings)
■ 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
S ● ● ● ● ● ● ● ● ● ● ● ● ●
D ● ● ● ● ● ● ● ● ●
p ● ● ● ● ● ● ● ● ● ● ● ● ● ●
n ● ● ● ● ● ● ● ● ● ● ● ● ● ●
■ 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
■ Flag operations
Name Description
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)
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].
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].
■ Flag operations
Name Description
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)
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
● 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)
S1+3:
● 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].
■ Flag operations
Name Description
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)
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)
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].
■ Flag operations
Name Description
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)
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
● 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)
● 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].
■ Flag operations
Name Description
WUME-FPXHPGRG-021 27-9
27.5 F275 MEAN (16-bit Data Sum and Average)
■ 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)
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:
● For the mean value, the decimal is rounded down to make an integer.
■ Flag operations
Name Description
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)
■ 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)
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)
■ Flag operations
Name Description
WUME-FPXHPGRG-021 27-13
27.7 F277 SORT (16-bit Data Block Sort)
■ 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
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
WUME-FPXHPGRG-021 27-15
27.8 F278 DSORT (32-bit Data Block Sort)
■ 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
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)
■ 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
WUME-FPXHPGRG-021 27-17
27.9 F282 SCAL (16-bit Data Linearization)
■ 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
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.
■ Flag operations
Name Description
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)
■ 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
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.
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)
■ 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
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.
27-24 WUME-FPXHPGRG-021
27.11 F284 RAMP (16-bit Data Ramp Output)
R0 (execution condition)
ON
OFF
DT10 (output value)
ON
OFF
DT10 (output value)
5000 (default value)
■ 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
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)
[S2]
[S1]
■ 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)
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)
[S2, S2+1]
Input value
Upper limit value [S3, S3+1]
[S2, S2+1]
[S1, S1+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)
■ 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
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)
[S2]
■ 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)
■ 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)
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)
■ 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)
■ 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
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)
[S2]
■ 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)
■ 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)
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)
[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-2 WUME-FPXHPGRG-021
28.1 F309 FMV (Floating Point Data Move)
■ Instruction format
■ Operands
Items Settings
S Transfer data: Area storing real number data (32-bit), or constant data
D Destination: Data transfer destination area
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.
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)
■ 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)
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.
■ 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)
■ 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)
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.
■ 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)
■ 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)
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)
■ 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)
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)
■ Instruction format
■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)
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)
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)
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.
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)
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.
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing angle data, or angle data (two words)
D Area storing the operation results (two words)
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.
■ 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)
■ 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)
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.
■ 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)
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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)
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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)
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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)]
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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
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)]
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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
WUME-FPXHPGRG-021 28-41
28.21 F329 FIX [Floating Point Data to 16-bit Integer Conversion (Round-
down)]
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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
WUME-FPXHPGRG-021 28-43
28.22 F330 DFIX [Floating Point Data to 32-bit Integer Conversion (Round-
down)]
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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
WUME-FPXHPGRG-021 28-45
28.23 F331 ROFF [Floating Point Data to 16-bit Integer Conversion (Round-
off)]
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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
WUME-FPXHPGRG-021 28-47
28.24 F332 DROFF [Floating Point Data to 16-bit Integer Conversion (Round-
off)]
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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
WUME-FPXHPGRG-021 28-49
28.25 F333 FINT (Floating Point Data Round-down)
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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)
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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)
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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)
■ Instruction format
■ Operands
Items Settings
S Area storing operation data, or operation data (two words)
D Area storing the operation results (two words)
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)
■ 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
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)
■ 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
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.
■ 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)
■ 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)
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)
■ 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)
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
WUME-FPXHPGRG-021 29-5
29.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control)
■ 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)
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)
[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)
■ 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)
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)
● 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)
■ 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)
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)
[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)
■ 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)
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+3: x1 DT13
S2+2n+1: xn DT29
S2+2n+3: y0 DT31
S2+2n+5: y1 DT33
S2+4n+3: yn DT49
S2+4n+4: (Real number value) DT50
Yn-1
yn-2
yn
Y=[D]
Y2
y1 X=[S1]
y0
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)
■ Instruction format
■ Operands
Items Settings
S Starting number of parameter area (30 word) for PID operation
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.
30-2 WUME-FPXHPGRG-021
30.1 F355 PID (PID Operation)
[S+29]
● 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)
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.
<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.
mi=1/Ti∫edt
30-6 WUME-FPXHPGRG-021
30.1 F355 PID (PID Operation)
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.
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)
■ 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
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.
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.
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
WUME-FPXHPGRG-021 30-11
30.2 F356 EZPID (PID Operation: PWM Output Possible)
(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.
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.
● 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)
30-14 WUME-FPXHPGRG-021
30.2 F356 EZPID (PID Operation: PWM Output Possible)
Temperature
Time
Temperature
Time
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
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
■ 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)
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.
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
WUME-FPXHPGRG-021 31-3
31.2 [F381 JOGST] JOG Operation Start Instruction
■ 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)
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.
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
■ Instruction format
■ Operand
Operand Settings Setting range
S Channel number to start the home return (Unsigned 16-bit integer) 0 to 5
S ● ● ● ● ● ● ● ● ● ● ● ●
■ Outline of operation
● Starts the home return operation according to the home return parameters specified in the
positioning memory (axis setting area).
■ 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
■ 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
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)
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
■ 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.
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].
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
■ 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.
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].
31-12 WUME-FPXHPGRG-021
31.6 [F385 PTBLW] Positioning Parameter Write Instruction
■ 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
■ 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
S ● ● ● ● ● ● ● ● ● ● ● ●
D - ● ● ● ● ● ● ● ● - - ●
● 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)
■ Instruction format
■ Operand
Operand Settings
S Starting number of the area in which data tables are registered
n Target channel for pulse output
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
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+6 Acceleration/
S+7
deceleration time ③
t(ms)
S+8 Target value
S+9 ④
(No. of pulses)
S+10 K0 ⑤
S+11
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)
■ Example of program
7kHz
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
● 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)
■ Instruction format
■ Operand
Operand Settings
S Starting number of the area in which data tables are registered
n Target channel for pulse output
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%).
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
S+6 Acceleration/
S+7
deceleration time ③
t(ms)
S+8 Deviation counter clear
S+9 signal output time tr(ms) ④
WUME-FPXHPGRG-021 32-9
32.3 [F171 (SPDH)] Pulse Output (Home Return)
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.
32-10 WUME-FPXHPGRG-021
32.3 [F171 (SPDH)] Pulse Output (Home Return)
■ Example of program
WUME-FPXHPGRG-021 32-11
32.3 [F171 (SPDH)] Pulse Output (Home Return)
● 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)
■ 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
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%).
S+2 S+2
S+3 Frequency ② S+3 Frequency ②
WUME-FPXHPGRG-021 32-13
32.4 [F172 (PLSH)] Pulse Output (JOG operation)
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
32-14 WUME-FPXHPGRG-021
32.4 [F172 (PLSH)] Pulse Output (JOG operation)
● 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)
■ Instruction format
■ Operand
Operand Settings
S Starting number of the area in which data tables are registered
n Target channel for pulse output
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)
S+2
Frequency 1 ②
S+6
Frequency 2
S+2n
Frequency n
S+2(n+2)
K0 ④
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)
WUME-FPXHPGRG-021 32-17
32.5 [F174 (SP0H)] Pulse Output (Selectable Data Table Control Operation)
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.
■ 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
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.
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)
■ Instruction format
■ Operand
Operand Settings
S Starting number of the area in which data tables are registered
n 0 or 2
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)
S
Control code ①
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)
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)
32-24 WUME-FPXHPGRG-021
32.6 [F175 (SPSH)] Pulse Output (Linear Interpolation)
● 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
T5 Y10
SV5
T5 Y10
30
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.
WUME-FPXHPGRG-021 33-3
33.1 Changing the Set Value of Timer/Counter During RUN
X0
F0 MV K30 SV5
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
● 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.)
33.2.2 Processing When Output Is Duplicated with OT, KP, SET, and RST
Instructions
WUME-FPXHPGRG-021 33-5
33.2 Use of Duplicate Output
<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
ON
OFF
2. Rise detection
ON
OFF
ON
OFF
WUME-FPXHPGRG-021 33-7
33.3 Rise Detection Method
● 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.)
Add R9014
X0 R9014 Y10
( DF )
33-8 WUME-FPXHPGRG-021
33.3 Rise Detection Method
X1
Add R9014
X0 R9014
CT200
X1
WUME-FPXHPGRG-021 33-9
33.3 Rise Detection Method
● 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.
[Timing chart 1]
X0
X1
Y10
33-10 WUME-FPXHPGRG-021
33.3 Rise Detection Method
[Timing chart 2]
X0
X1
Y10
[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
WUME-FPXHPGRG-021 33-13
33.4 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.
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.
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
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
● 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
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.
● 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.
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
PLC
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
PLC
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
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).
Digital switch 1 9 9 2
BCD
PLC ↓(Converted by F81 BIN)
BIN
1 9 9 2
WUME-FPXHPGRG-021 33-19
33.6 Handling BCD Data
BIN
PLC ↓ (Converted by F80 BCD)
BCD
7-segment display
1 9 9 2
33-20 WUME-FPXHPGRG-021
33.7 Precautions for Programming
Rewritten Program
<Example 2>
Rewritten program
<Example 3>
WUME-FPXHPGRG-021 33-21
33.7 Precautions for Programming
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
■ 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
e.g. When using R9034 (Completion flag for rewrite during RUN)
33-24 WUME-FPXHPGRG-021
33.8 Rewrite Function During RUN
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
WUME-FPXHPGRG-021 33-25
33.9 Processing During Forced Input/Output
Operation
Peripheral services
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
Internal relay (R)(Note 2) 4096 points (R0 to R255F) or 8192 points (R0 to R511F)
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
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.
WUME-FPXHPGRG-021 App-3
List of System Registers
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
App-4 WUME-FPXHPGRG-021
List of System Registers
(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.
48 PC (PLC) link baud rate(Note 2) 115200 bps 115200 bps / 230400 bps
WUME-FPXHPGRG-021 App-5
List of System Registers
(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.
(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.
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.
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.
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)
CH0:
Pulse output settings Normal output (Y100, Y101)
Normal output
WUME-FPXHPGRG-021 App-9
List of System Registers
(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.
(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
(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.
WUME-FPXHPGRG-021 App-11
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) 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.
え input
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.
(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
WUME-FPXHPGRG-021 App-13
List of System Registers
(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.
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
WUME-FPXHPGRG-021 App-15
List of Special Relays
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.
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.
WUME-FPXHPGRG-021 App-17
List of Special Relays
App-18 WUME-FPXHPGRG-021
List of Special Relays
(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.
WUME-FPXHPGRG-021 App-19
List of Special Relays
(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.
App-20 WUME-FPXHPGRG-021
List of Special Relays
WUME-FPXHPGRG-021 App-21
List of Special Relays
App-22 WUME-FPXHPGRG-021
List of Special Relays
WUME-FPXHPGRG-021 App-23
List of Special Relays
App-24 WUME-FPXHPGRG-021
List of Special Relays
WUME-FPXHPGRG-021 App-25
List of Special Relays
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.
App-26 WUME-FPXHPGRG-021
List of Special Relays
(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.
WUME-FPXHPGRG-021 App-27
List of Special Relays
(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.
App-28 WUME-FPXHPGRG-021
List of Special Relays
WUME-FPXHPGRG-021 App-29
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
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.
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).
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)
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.
(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.
Communication error
DT90059 code ○ ×
COM0 port / COM1 port
WUME-FPXHPGRG-021 App-35
List of Special Data Registers
App-36 WUME-FPXHPGRG-021
List of Special Data Registers
WUME-FPXHPGRG-021 App-37
List of Special Data Registers
App-38 WUME-FPXHPGRG-021
List of Special Data Registers
WUME-FPXHPGRG-021 App-39
List of Special Data Registers
App-40 WUME-FPXHPGRG-021
List of Special Data Registers
WUME-FPXHPGRG-021 App-41
List of Special Data Registers
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.
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.
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.
WUME-FPXHPGRG-021 App-45
List of Special Data Registers
(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 (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
The MEWTOCOL commands that are supported by this product are as follows.
MEWTOCOL-COM
Preset data area Writes the same contents to the data area of a specified
SD
(fill command) range.
(Note 1) Some devices cannot be accessed due to format limitations of MEWTOCOL-COM communication
commands.
WUME-FPXHPGRG-021 App-47
Communication Commands
(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.
(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
(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
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
WUME-FPXHPGRG-021 App-51
Positioning Memory
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.
bit no. 15 87 0
0 0 0 0 0 0 0
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
(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
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.
(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
App-58 WUME-FPXHPGRG-021
List of Error Codes
WUME-FPXHPGRG-021 App-59
BIN/HEX/BCD Code Correspondence Table
App-60 WUME-FPXHPGRG-021
ASCII Code Table, JIS8 Code Table
WUME-FPXHPGRG-021 App-61
ASCII Code Table, JIS8 Code Table
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
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 ッ ソ マ '
App-62 WUME-FPXHPGRG-021
Record of changes
The manual number is shown at the bottom of the cover page.
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