Types of Manuals ● There are different types of users manuals for the FP0H series. Please refer to a relevant manual for the unit and purpose of your use.
Table of Contents 1 List of Instruction Words..............1-1 1.1 List of Basic Instruction Words............1-2 1.2 List of High-level Instructions ..............1-8 2 Sequence Basic Instructions ...............2-1 2.1 ST, ST/ and OT (Start, Start Not and Out) ..........2-2 2.2 DST, DST/ (Direct start, direct start Not)..........2-4 2.3 DOT (direct out) ..................2-7 2.4 / (Not) ....................2-10 2.5 AN, AN/ (AND, AND Not)..............2-11...
Page 7
9.8 ANF=, ANF<>, ANF>, ANF>=, ANF<, ANF<= [Floating point real number data comparison (AND)] ............9-16 9.9 ORF=, ORF<>, ORF>, ORF>=, ORF<, ORF<= [floating point real number data comparison (OR)] ............9-18 10 Transfer Instructions ................10-1 10.1 F0 MV (16-bit Data Transfer) ............10-2 10.2 F0 MV (10 µsec Ring Counter Read) ..........10-4 10.3 F1 DMV (32-bit Data Transfer) ............10-5 10.4 F2 MV/ (16-bit Data Inversion and Transfer) ........10-7...
Page 8
11.15 F36 D+1 (32-bit Data Increment) ............11-32 11.16 F37 -1 (16-bit Data Decrement) ............11-34 11.17 F38 D-1 (32-bit Data Decrement)............11-36 11.18 F39 D*D (32-bit Data Multiplication [S1*S2=D+1, D]) .....11-38 12 BCD Data Arithmetic Instructions .............12-1 12.1 F40 B+ (4-digit BCD Data Addition [D+S=D]) ........12-2 12.2 F41 DB+ (8-digit BCD Data Addition [D+S=D]) ........12-4 12.3 F42 B+ (4-digit BCD Data Addition [S1+S2=D]) .......12-6 12.4 F43 DB+ (8-digit BCD Data Addition [S1+S2=D])......12-8...
Page 9
14.8 F217 DXOR (32-bit Data Exclusive OR)...........14-16 14.9 F218 DXNR (32-bit Data Exclusive NOR) ........14-18 14.10 F219 DUNI [(S1 AND S3) OR (S2 AND S3) = D] (32-bit)....14-20 15 Data Conversion Instructions ............15-1 15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)]....15-3 15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion) .....15-7 15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion) .....15-10 15.4 F73 BCDA (BCD Data to ASCII Code Conversion) ......15-14...
Page 10
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...
Page 11
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-9 20.7 F148 ERR (Self-Diagnostic Error Set) ..........20-14 20.8 F149 MSG (Character Send to Programming Tool)......20-16...
Page 13
26 Data Manipulation Instructions ............26-1 26.1 F270 MAX (Search Maximum Value from 16-bit Data Block) ...26-2 26.2 F271 DMAX (Search Maximum Value from 32-bit Data Block) ..26-4 26.3 F272 MIN (Search Minimum Value from 16-bit Data Block) .....26-6 26.4 F273 DMIN (Search Minimum Value from 32-bit Data Block)...26-8 26.5 F275 MEAN (16-bit Data Sum and Average)........26-10 26.6 F276 DMEAN (32-bit Data Sum and Average) .........26-12 26.7 F277 SORT (16-bit Data Block Sort) ..........26-14...
Page 14
27.20 F328 DINT [Floating Point Data to 32-bit Integer Conversion (Largest Integer Not Exceeding the Floating-point Data)].....27-40 27.21 F329 FIX [Floating Point Data to 16-bit Integer Conversion (Round-down)] ..................27-42 27.22 F330 DFIX [Floating Point Data to 32-bit Integer Conversion (Round-down)] ..................27-44 27.23 F331 ROFF [Floating Point Data to 16-bit Integer Conversion (Round-off)] ...................27-46 27.24 F332 DROFF [Floating Point Data to 16-bit Integer Conversion...
Page 15
33.15 F439 CFREEK (SD Memory Card Free Space Acquisition: Kilobyte Units) ..................33-60 33.16 F440 CFLS (File status acquisition)..........33-62 33.17 F441 PanaSD (Read of lifetime information of Panasonic SD card) ......................33-65 34 Ethernet Instructions ................34-1 34.1 F460 IPv4SET (Ipv4 Address Setting) ..........34-2 34.2 F461 CONSET (Connection Setting) ..........34-7...
Page 17
38.5.4 When Using High-speed Counter Function ........38-57 38.6 FPsigma Mode..................38-59 38.6.1 Overview of FPsigma Mode ............38-59 38.6.2 Converting Projects for FPsigma to Projects for FP0H (FPsigma Mode)....................38-60 38.6.3 Converting Projects for FP0H (FPsigma Mode) to Projects for FP0H (FP0H Mode) ................
1 List of Instruction Words 1.1 List of Basic Instruction Words............1-2 1.2 List of High-level Instructions ..............1-8 WUMJ-FP0HPGR-091...
1.1 List of Basic Instruction Words 1.1 List of Basic Instruction Words ■ Sequence basic instructions Referen Mnemonic Name Steps page: Begins a logic operation with a Form A (normally open) 1 (2) "P.2-2" (Note 1) contact Begins a logic operation with a Form A (normally open) contact: "P.2-4"...
1.1 List of Basic Instruction Words Referen Mnemonic Name Steps page: POPS Reads and clears the operation result stored by PSHS "P.2-29" Rise detection "P.2-33" Fall detection "P.2-33" Rise detection (possible on the first scan) "P.2-38" (Note 1) "P.2-40" Turns ON the output and holds it ON DSET (Note 1) "P.2-43"...
Page 22
1.1 List of Basic Instruction Words ■ Control instructions Referen Mnemonic Name Steps page: Master control relay "P.4-2" Master control relay end "P.4-2" Jumps to specified label "P.4-7" LOOP Jumps to the specified label the number of times specified by D "P.4-11"...
Page 23
1.1 List of Basic Instruction Words Referen Mnemonic Name Steps page: ICTL Interrupt control specification "P.7-8" ■ Program block control instructions Referen Mnemonic Name Steps page: (Note 1) Final point of PBn program EDPB (Note 1) Cannot be input with a programming tool. ■...
Page 24
1.1 List of Basic Instruction Words Referen Mnemonic Name Steps page: OR> 16-bit data compare parallel connection "P.9-6" OR>= 16-bit data compare parallel connection "P.9-6" OR< 16-bit data compare parallel connection "P.9-6" OR<= 16-bit data compare parallel connection "P.9-6" STD= Begins a logical operation to compare 32-bit data "P.9-8"...
Page 25
1.1 List of Basic Instruction Words Referen Mnemonic Name Steps page: ANF= Single-precision floating point data compare serial connection "P.9-16" ANF<> Single-precision floating point data compare serial connection "P.9-16" ANF> Single-precision floating point data compare serial connection "P.9-16" ANF>= Single-precision floating point data compare serial connection "P.9-16"...
1.2 List of High-level Instructions 1.2 List of High-level Instructions ■ Transfer instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. S, D 16-bit data transfer 10-2" "P. DT90020, D 10 µs ring counter read 10-4" "P. S, D 32-bit data transfer 10-5"...
Page 27
1.2 List of High-level Instructions ■ Binary arithmetic instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. S, D 16-bit data addition [D+S=D] 11-2" "P. S, D 32-bit data addition [D+S=D] 11-4" "P. S1, S2, D 16-bit data addition [S1+S2=D] 11-6"...
Page 28
1.2 List of High-level Instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. S, D 8-digit BCD data addition [D+S=D] 12-4" "P. S1, S2, D 4-digit BCD data addition [S1+S2=D] 12-6" "P. S1, S2, D 8-digit BCD data addition [S1+S2=D] 12-8"...
Page 29
1.2 List of High-level Instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. F373 S, D 16-bit data revision detection 13-19" "P. F374 DDTR S, D 32-bit data revision detection 13-21" ■ Boolean instructions Refere Fun no. Mnemonic Operands Name Steps page:...
Page 30
1.2 List of High-level Instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. BINA S1, S2, D Convert 16-bit binary data to ASCII code 15-22" "P. ABIN S1, S2, D Convert ASCII code to 16-bit binary data 15-25" "P. DBIA S1, S2, D Convert 32-bit binary data to ASCII code...
Page 31
1.2 List of High-level Instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. F231 SECTM S, D Second to time conversion 15-69" "P. F235 S, D 16-bit data to gray code conversion 15-72" "P. F236 DGRY S, D 32-bit data to gray code conversion 15-73"...
Page 32
1.2 List of High-level Instructions ■ Data rotation instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. F120 D, n 16-bit data right rotation 17-2" "P. F121 D, n 16-bit data left rotation 17-4" "P. F122 D, n 16-bit data right rotation with carry 17-6"...
Page 33
1.2 List of High-level Instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. F133 S, n Specified bit test 19-8" "P. F135 S, D Count ON bits in 16-bit data 19-10" "P. F136 DBCU S, D Count ON bits in 32-bit data 19-12"...
Page 34
1.2 List of High-level Instructions Reference Fun no. Mnemonic Operand Name Step page Data send instruction [MODBUS master: F145 SEND S1, S2, D, N "P.21-12" Function code specification] Data receive instruction [MODBUS master: F146 RECV S1, S2, N, D "P.21-17" Function code specification] Data send instruction [MODBUS master: No F145...
Page 35
1.2 List of High-level Instructions Reference Fun no. Mnemonic Operand Name Step page Target value match OFF (with channel F167 HC1R n, S, D "P.24-10" specification)) ■ High-speed counter cam control instruction Reference Fun no. Mnemonic Operand Name Step page F165 CAM0 Cam control...
Page 36
1.2 List of High-level Instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. F263 MIDR S1, S2, S3, D Read from any position in character string 25-50" "P. F264 MIDW S1, S2, S3, D Write to any position in character string 25-52"...
Page 37
1.2 List of High-level Instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. F289 ZONE S1, S2, S3, D 16-bit data zone control 26-34" "P. F290 DZONE S1, S2, S3, D 32-bit data zone control 26-36" ■ Floating-point instruction Refere Fun no.
Page 38
1.2 List of High-level Instructions Refere Fun no. Mnemonic Operands Name Steps page: Convert to largest 16-bit integer that does not "P. F327 S, D exceed floating point data 27-38" Convert to largest 32-bit integer that does not "P. F328 DINT S, D exceed floating point data...
Page 39
1.2 List of High-level Instructions ■ Process control instructions Refere Fun no. Mnemonic Operands Name Steps page: "P. F355 PID operation 29-2" "P. F356 EZPID S1, S2, S3, S4 PID operation: PWM output possible 29-9" ■ Positioning control instructions (Table setting mode) Refere Fun no.
Page 40
S, D File status acquisition 6-262 33-62" "P. F441 PanaSD D1, D2, D3 Panasonic SD card lifetime information read 33-65" (Note 1) For instructions F427/F428/F429/F430/F431/F432/F433/F434/F435/F436/F437/F440, the number of steps varies depending on the contents specified in the operand. 1-22 WUMJ-FP0HPGR-091...
Page 41
1.2 List of High-level Instructions ■ Ethernet communication instructions (C32ET only) Refere Fun no. Mnemonic Operands Name Steps page: "P. F460 IPv4SET Ipv4 address setting 4-260 34-2" "P. F461 CONSET S1, S2, D1, D2 Connection setting 10-522 34-7" "P. F462 OPEN Connection open 34-14"...
Page 42
1.2 List of High-level Instructions (Note 2) The F490/F495/F496/F497/F498/F499 instructions can be used with the unit firmware Ver. 1.8 or later. ■ FTP instruction (C32ET only) Refere Fun no. Mnemonic Operand Name Step page: "P. F465 ETSTAT S1, S2, D EtherNet/IP information acquisition: FTP 8-520 36-2"...
2.1 ST, ST/ and OT (Start, Start Not and Out) 2.1 ST, ST/ and OT (Start, Start Not and Out) ■ Instruction format ■ Instruction list Instru Description ction Input contact starting logical operation as Form A (normally open) Input contact starting logical operation as Form B (normally closed) Coil that outputs logical operation ■...
Page 45
2.1 ST, ST/ and OT (Start, Start Not and Out) ■ Precautions for programming ● ST instructions begin from the bus bar. (This is the same for ST/ instructions) ● OT instructions cannot begin directly from the bus bar. ● OT instructions can be used consecutively. ●...
2.2 DST, DST/ (Direct start, direct start Not) 2.2 DST, DST/ (Direct start, direct start Not) ■ Instruction format ■ Instruction list Instru Description ction Input contact starting logical operation as Form A (normally open) DST/ Input contact starting logical operation as Form B (normally closed) ■...
Page 47
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 ST X0 execution <For DST instruction> Ladder diagram ● Timing chart ● *Main unit input constant setting: None WUMJ-FP0HPGR-091...
Page 48
2.2 DST, DST/ (Direct start, direct start Not) n-1 scan n scan n+1 scan DST X0 execution WUMJ-FP0HPGR-091...
2.3 DOT (direct out) 2.3 DOT (direct out) ■ Instruction format ■ Instruction list Instru Description ction Coil that outputs logical operation ■ Devices that can be specified (indicated by ●) Operands Index modifier ● ● ■ Outline of operation Instru Operation ction...
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. ●...
2.5 AN, AN/ (AND, AND Not) 2.5 AN, AN/ (AND, AND Not) ■ Instruction format ■ Instruction list Instru Description ction Form A (normally open) contacts connected in series Form B (normally closed) contacts connected in series ■ Devices that can be specified (indicated by ●) Operands Index modifier ●...
Page 54
2.5 AN, AN/ (AND, AND Not) ● The AN and AN/ instructions can be used consecutively. 2-12 WUMJ-FP0HPGR-091...
2.6 DAN, DAN/ (Direct AND, Direct AND NOT) 2.6 DAN, DAN/ (Direct AND, Direct AND NOT) ■ Instruction format ■ Instruction list Instru Description ction Form A (normally open) contacts connected in series DAN/ Form B (normally closed) contacts connected in series ■...
Page 56
2.6 DAN, DAN/ (Direct AND, Direct AND NOT) Ladder diagram ● Timing chart ● n-1 scan n scan n+1 scan AN X0 execution <For DAN instruction> Ladder diagram ● 2-14 WUMJ-FP0HPGR-091...
Page 57
2.6 DAN, DAN/ (Direct AND, Direct AND NOT) Timing chart ● n-1 scan n scan n+1 scan DAN X0 execution WUMJ-FP0HPGR-091 2-15...
2.7 OR, OR/ (OR, OR Not) 2.7 OR, OR/ (OR, OR Not) ■ Instruction format ■ Instruction list Instru Description ction Form A (normally open) contact connected in parallel Form B (normally closed) contact connected in parallel ■ Devices that can be specified (indicated by ●) Operands Index modifier ●...
Page 59
2.7 OR, OR/ (OR, OR Not) ■ Precautions for programming ● Use the OR instruction when Form A (normally open) contacts are connected in parallel. ● Use the OR/ instruction when Form B (normally closed) contacts are connected in parallel. ●...
2.8 DOR, DOR/ (Direct OR, Direct OR Not) 2.8 DOR, DOR/ (Direct OR, Direct OR Not) ■ Instruction format ■ Instruction list Instru Description ction Form A (normally open) contact connected in parallel DOR/ Form B (normally closed) contact connected in parallel ■...
Page 61
2.8 DOR, DOR/ (Direct OR, Direct OR Not) ■ Comparing the OR instruction and DOR instruction ● A quicker response is possible with a DOR instruction than with an OR instruction. <OR instruction> Ladder diagram ● Timing chart ● n-1 scan n scan n+1 scan OR X0 execution...
Page 62
2.8 DOR, DOR/ (Direct OR, Direct OR Not) Timing chart ● n-1 scan n scan n+1 scan DOR X0 execution 2-20 WUMJ-FP0HPGR-091...
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↓...
Page 64
2.9 ST↑, ST↓, AN↑, AN↓, OR↑, OR↓ (Rise Detection, Fall Detection) 1 scan 1 scan Rising edge Rising edge 2. Output to Y11 takes place for 1 scan only following the change of X2 from the OFF to ON state (rise) when X1 is ON. 1 scan 3.
2.10 ALT (Alternate Out) 2.10 ALT (Alternate Out) ■ Instruction format ■ Instruction list Instru Description ction Coil that controls flip-flops ■ Devices that can be specified (indicated by ●) Operands Index modifier ● ● ● ■ Outline of operation ●...
Page 66
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.
2.11 ANS (And Stack) 2.11 ANS (And Stack) ■ Instruction format ■ Outline of operation ● Blocks that were connected in parallel are connected in series. Blocks stack in series ● The start of each block begins with an ST instruction. ■...
Page 68
2.11 ANS (And Stack) ■ When blocks are consecutive When blocks are consecutive, consider a block division as follows. Block 5 Block 4 Block 1 Block 3 Block 2 ST X OR X ST X OR X ANS・・・・・・・・・・・・(1) ST X OR X ANS・・・・・・・・・・・・(2) 2-26...
2.12 ORS (OR Stack) 2.12 ORS (OR Stack) ■ Instruction format ■ Outline of operation ● Serially connected blocks are connected in parallel. Blocks stack in parallel ● The start of each block begins with an ST instruction. ■ Operation example Operation of instruction format description program When both X0 and X1 turn ON, or when both X2 and X3 turn ON, the result is output to Y10.
Page 70
2.12 ORS (OR Stack) ■ When blocks are consecutive When blocks are consecutive, consider a block division as follows. Block 1 Block 2 Block 3 Block 4 Block 5 Block 1 Block 4 Block 2 Block 5 Block 3 2-28 WUMJ-FP0HPGR-091...
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.
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack) ■ Programming precautions ● Use the RDS instruction when continuing to use the operation result, and use the POPS instruction when finishing. (The POPS instruction must be included.) ● The RDS instruction may be used consecutively as many times as required. 2-30 WUMJ-FP0HPGR-091...
Page 73
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack) ■ Precautions when using thePSHSinstruction consecutively ● The PSHS instruction is limited to a maximum of eight consecutive uses. ● Please note that the program will not run correctly if this limit is exceeded. ST X 0 PSHS …(1) AN X 1...
Page 74
2.13 PSHS, RDS, POPS (Push stack, Read stack, Pop stack) <Continues from above program> POPS…Reads (5) AN X 6 OT Y 11 POPS…Reads (4) AN X 7 OT Y 12 POPS…Reads (3) AN X 8 OT Y 13 2-32 WUMJ-FP0HPGR-091...
2.14 DF, DF/ (Rise Differential,Fall Differential) 2.14 DF, DF/ (Rise Differential,Fall Differential) ■ Instruction format ■ Outline of operation Instruction Operation When an execution condition changes from OFF to ON (rise), outputs only that 1 scan (differential output). When an execution condition changes from ON to OFF (fall), outputs only that 1 scan (differential output).
2.14 DF, DF/ (Rise Differential,Fall Differential) 1 scan 1 scan Rising edge Falling edge ■ Related instructions ● The DFI instruction can be used. Only the first 1 scan is executed. ■ Programming precautions ● For the circuit shown below, the operation is as follows. When X1 is OFF, Y10 remains OFF even if X0 rises.
Page 77
2.14 DF, DF/ (Rise Differential,Fall Differential) R9014 turns ON from the second scan after RUN begins. ● Caution is required when using differential instructions in combination with instructions that change the order of execution of instructions (1 to 6 below), such as the MC/MCE instructions or the JP/LBL instructions.
Page 78
2.14 DF, DF/ (Rise Differential,Fall Differential) <Time chart> ■ Examples of applying differential instructions ● Using differential instructions makes it easy to create and adjust programs. <Example of application to a self-holding circuit> ● Using a differential instruction allows longer input signals to be supported. Y10’...
2.15 DFI [Rise Differential (initial execution type)] 2.15 DFI [Rise Differential (initial execution type)] ■ Instruction format ■ Outline of operation Instruction Operation When an execution condition changes from OFF to ON (rise), outputs only that one scan (differential output). ●...
Page 81
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.
2.16 SET, RST (Set, Reset) 2.16 SET, RST (Set, Reset) ■ Instruction format ■ Instruction list Instru Description ction Output coil Output coil ■ Devices that can be specified (indicated by ●) Operands Index modifier ● ● ● ● ● ●...
Page 83
2.16 SET, RST (Set, Reset) ■ Processing mechanisms when the SET and RST instructions are used ● The output content is overwritten with each step during processing of the operation. e.g. Processing when X0, X1, and X2 are all turned ON ●...
Page 84
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.18 KP (Keep) 2.18 KP (Keep) ■ Instruction format Set input Reset input ■ Instruction list Instru Description ction Output coil ■ Devices that can be specified (indicated by ●) Operands Index modifier ● ● ● ■ Outline of operation ●...
Page 90
2.18 KP (Keep) ■ Precautions for programming ● The state of the output destination is held even during operation of the MC instruction. ● The output is reset when switching from"RUN mode"to"PROG. mode"and when the power is turned OFF. (However, if an internal relay set as a hold type is specified as the output destination, reset does not take place.) 2-48 WUMJ-FP0HPGR-091...
2.19 DKP (Direct Keep) 2.19 DKP (Direct Keep) ■ Instruction format Set input Reset input ■ Instruction list Instru Description ction Output coil ■ Devices that can be specified (indicated by ●) Operands Index modifier ● ■ Outline of operation ●...
2.20 NOP 2.20 NOP ■ Instruction format 1 NOP count ■ 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.
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer) 3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer) ■ Instruction format Timer number Timer units Execution conditions TML5 K300 Set value Timer no. 5 timer contact ■...
Page 97
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer) ■ Precautions for programming ● As subtraction operations are performed during operation, create the program so that it operates once during one scan. If an operation is performed more than once during one scan or cannot be performed even once due to an interrupt processing program or jump/loop instruction, correct results cannot be obtained.
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer) Timing chart ● 3 seconds 2 seconds ■ 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.
Page 100
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.
3.1 TML/TMR/TMX/TMY (0.001 s, 0.01 s, 0.1 s, 1 s On-delay Timer) Ladder diagram ● Timing chart ● 5 seconds 3 seconds 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.
3.2 F137 STMR (16-bit, 0.01 s On-delay Timer) 3.2 F137 STMR (16-bit, 0.01 s On-delay Timer) ■ Instruction format ■ Instruction list Instru Description ction Area storing the setting value, or constant data Process value area ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 104
3.2 F137 STMR (16-bit, 0.01 s On-delay Timer) ■ Setting the timer period 1. The timer period is 0.01 × [timer set value]. 2. The timer set value is set with a K constant within the range of K1 to K32767. "STMR"...
Page 105
3.2 F137 STMR (16-bit, 0.01 s On-delay Timer) DT20 F137 STMR DT10 DT20 R900D F0 MV DT30 DT40 (3) Subtraction operation complete ■ Precautions when using R900D When using multiple auxiliary timers with R900D, ensure that R900D is used on the line after the auxiliary timer instruction.
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer) 3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer) ■ Instruction format ■ Instruction list Instru Description ction Area storing the setting value, or constant data Process value area ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 107
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer) ■ Setting the timer period 1. The timer period is 0.01 × [timer set value]. 2. The timer set value is set as a K constant in the range of K1 to K2147483647. 0.01 to 21474836.47 seconds in units of 0.01 second.
Page 108
3.3 F183 DSTM (32-bit, 0.01 s On-delay Timer) F183 DSTM K500 K500 R900D F0 MV DT50 WR50 (3) Addition operation complete Process value (D, D+1) (R900D) ■ Precautions when using R900D When using multiple auxiliary timers with R900D, ensure that R900D is used on the line after the auxiliary timer instruction.
3.4 CT [Counter (Preset Subtraction Expression)] 3.4 CT [Counter (Preset Subtraction Expression)] ■ Instruction format Count number Count input CT100 Set value Reset input C100 ■ Instruction list Instru Description ction Counter set value ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 111
3.4 CT [Counter (Preset Subtraction Expression)] 10 times C100 ■ Setting the count value The count value can be set to a decimal constant (K constant) in a setting range from K0 to K32767. ■ Counter operation The following are examples of specifying a K constant as the set value. For an explanation of operations when a set value area number is specified, see"P.3-19".
Page 112
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. SV100 EV100 CT100 (4) Subtraction operation end C100 ■ Precautions for programming When combining a counter instruction with an AND stack instruction or POP stack instruction, be careful that the programming is correct.
3.4 CT [Counter (Preset Subtraction Expression)] ■ Related instructions ● Counter instructions also include an up/down counter instruction (F118 UDC). ● An increment instruction (F35+1) can be used to provide the same type of function. ■ Directly specifying a set value area number as a counter set value The set value area number can be specified directly as the set value [n].
Page 114
3.4 CT [Counter (Preset Subtraction Expression)] F0 MV SV100 SV100 CT100 (1) Transfer to SV area SV100 C100 2. When the reset input falls, the value in the set value area "SV" is preset in the elapsed value area "EV" . SV100 EV100 CT100...
Page 115
3.4 CT [Counter (Preset Subtraction Expression)] SV100 EV100 CT100 (4) Subtraction operation end SV100 C100 ■ Examples of applying direct specification of set value area numbers Example 1) Changing set values based on specified conditions The set value is K50 when X0 is ON and K30 when X1 is ON. Ladder diagram ●...
3.4 CT [Counter (Preset Subtraction Expression)] 50 times C100 SV100 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 ●...
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.
Page 119
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.
3.6 SR (Shift Register) 3.6 SR (Shift Register) ■ Instruction format Data input SR WR3 Shift input Reset input ■ Instruction list Instru Description ction Specified register ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index WX WY WR WL SV modifier Device...
Page 121
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.
Page 122
3.6 SR (Shift Register) Shift input Reset input Reset input has priority ● Note that when a hold type memory area is specified for the shift register, an automatic reset is not performed when the power supply is turned ON. ●...
3.7 F119 LRSR (Left/Right Shift Register) 3.7 F119 LRSR (Left/Right Shift Register) ■ Instruction format Left/right shift input (ON: Left, OFF: Right) F119 LRSR Data input Shift input Reset input ■ Instruction list Instru Description ction Starting number of area to be shifted End number of area to be shifted ■...
Page 124
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).
Page 125
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.
3.8 F182 FILTR (Time Literal Process) 3.8 F182 FILTR (Time Literal Process) ■ Instruction format ■ Instruction list Instru Description ction Area storing the 16-bit data that is filter processing target Area storing the filter processing target bits, or constant data Area storing the filter processing time, or constant data Area storing the filter processing result ■...
Page 127
3.8 F182 FILTR (Time Literal Process) ■ Precautions for programming ● When the execution condition rises, all input bits specified by S1 are directly output unconditionally. ● It is possible that an error of up to one scan may occur in the filter processing time. ■...
4.1 MC/MCE (Master Control Relay / Master Control Relay End) 4.1 MC/MCE (Master Control Relay / Master Control Relay End) ■ Instruction format Master control relay number Execution conditions MC 1 Master control relay number MCE 1 ■ Outline of operation ●...
Page 131
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.
Page 132
4.1 MC/MCE (Master Control Relay / Master Control Relay End) Timing chart 1 Timing chart 2 ● 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.
Page 133
4.1 MC/MCE (Master Control Relay / Master Control Relay End) ■ Precautions for programming ● A second MC-MCE instruction pair can be entered (nested) between an initial MC-MCE instruction pair. (There is no limit to the number of nestings.) WUMJ-FP0HPGR-091...
Page 134
4.1 MC/MCE (Master Control Relay / Master Control Relay End) ● The program cannot be executed in the following cases. 1. Either MC or MCE is missing. 2. The order of MC and MCE is reversed. 3. There is duplicated use of the specified number. MC 0 Duplicates used MC 0...
4.2 JP/LBL (Jump/Label) 4.2 JP/LBL (Jump/Label) ■ Instruction format 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. ●...
Page 136
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).
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.
Page 138
4.2 JP/LBL (Jump/Label) Timing chart 2 ● 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.
4.3 LOOP, LBL (Loop, Label) 4.3 LOOP, LBL (Loop, Label) ■ Instruction format F0 MV Label number LBL 1 Label number Loop count LOOP 1 ■ Instruction list Instru Description ction Area storing number of loop operations ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 140
4.3 LOOP, LBL (Loop, Label) F0 MV LBL 1 LOOP 1 If DT0=K5, then after 5 jumps, there are no more jumps even if X1 is ON. ● If the memory area content specified by [S] is 0 from the start, the operation does not jump to a label number, and the next processing is performed.
Page 141
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 the execution condition is ON.
Page 142
4.3 LOOP, LBL (Loop, Label) Example 2: The DT100 value is transferred to DT200 to DT219. ● The LOOP instruction and LBL instruction cannot be used in the step ladder area (SSTP to STPE range). ● It is not possible to jump from a main program to a subprogram (a subroutine or interrupt program after the ED instruction), from a subprogram to a main program, or from a subprogram to another subprogram.
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 Normal program area Subroutine program Interrupt program ●...
4.5 CNDE (Conditional End) 4.5 CNDE (Conditional End) ■ Instruction format Execution conditions CNDE ■ 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.
Page 145
4.5 CNDE (Conditional End) Program that executes when "CNDE" executed CNDE Program that is not executed when "CNDE" executed Execution during normal scan WUMJ-FP0HPGR-091 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. ■...
Page 148
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.
Page 149
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step, Step End) The processes are selected and executed according to conditions. Process 2 Process 1 Process 4 Process 3 3. Parallel branch merge control • Multiple processes are executed simultaneously. •...
Page 150
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step, Step End) Normal ladder area SSTP 1 Step ladder area SSTP n 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.
Page 151
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step, Step End) (Power ON) Shift input Not executing Executing Executing Executing ● Be aware that, if the NSTP instruction is used with instructions that change the order of execution such as the MC to MCE instructions or the JP to LBL instructions (see 1 to 6 below), the operation of instructions may change depending on the instruction execution and execution condition timing.
Page 152
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 ladder area SSTP1...
Page 153
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.
Page 154
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...
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.
Page 156
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step, Step End) Program ● NSTP 10 SSTP 10 Process 10 NSTP 11 SSTP 11 NSTP 12 Process 11 SSTP 12 Process 12 CSTP 12 STPE Timing chart ● Process 10 Start clear Process 11...
Page 157
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step, Step End) (2) Selection branch control of a process This program selects and switches to the next process according to the actions and results of a particular process. Each process loops until its work is completed. ●...
Page 158
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 WUMJ-FP0HPGR-091...
Page 159
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step, Step End) X100 X101 X102 X103 X104 X200 R150 Process 100 Start clear R151 Process 101 R152 R153 Process 200 (3) Parallel branch merge control of a process This program starts multiple processes at the same time.
Page 160
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step, Step End) Process flowchart ● Process 0 Process 10 Process 20 Process 11 Process 30 5-14 WUMJ-FP0HPGR-091...
Page 161
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step, Step End) Program ● NSTP 0 SSTP 0 Process 0 NSTL 10 NSTL 10 NSTL 20 SSTP 10 Process 10 NSTL 11 NSTL 11 SSTP 20 R100 Process 20 SSTP 11 R100 NSTL 30...
Page 162
5.1 SSTP, NSTL (NSTP), CSTP, STPE (Start Step, Next Step, Clear Step, Step End) Timing chart ● X111 Start clear Process 0 Process 0 Process 10 Process 20 Process 11 Process 30 5-16 WUMJ-FP0HPGR-091...
5.2 SCLR (Clear Multiple Processes) 5.2 SCLR (Clear Multiple Processes) ■ Instruction format ■ Outline of operation When the SCLR instruction is executed, all active processes from process n1 through process n2 are cleared. ■ Operation example Operation of instruction format description program When input XF turns ON, active processes from 1 through 3 are cleared.
Page 164
5.2 SCLR (Clear Multiple Processes) Process 0 Process 1 Process 2 Process 3 XF (block area) ■ Precautions for programming ● Specify values so that n1 is equal to or smaller than n2. ● The SCLR instruction can be executed from both normal ladder areas and active processes. 5-18 WUMJ-FP0HPGR-091...
6.1 CALL/SUB/RET (Subroutine Call, Subroutine Entry, Subroutine Return) 6.1 CALL/SUB/RET (Subroutine Call, Subroutine Entry, Subroutine Return) ■ Instruction format CALL 1 Subroutine program number SUB 1 Subroutine program number ■ 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.
Page 167
6.1 CALL/SUB/RET (Subroutine Call, Subroutine Entry, Subroutine Return) (Level 2) SUB0 (Level 3) SUB1 CALL1 (Level 4) SUB2 CALL2 (Level 5) SUB3 CALL3 SUB4 CALL4 Called from within subroutine Example of 5 layer nesting ■ Precautions for programming ● A subroutine program cannot be described in an interrupt program. INT 1 SUB 21 Subroutine...
Page 168
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.
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 WUMJ-FP0HPGR-091...
7.1 INT/IRET (Interrupt / Interrupt Return) 7.1 INT/IRET (Interrupt / Interrupt Return) ■ Instruction format 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.
Page 172
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.
Page 173
7.1 INT/IRET (Interrupt / Interrupt Return) INT 1 SUB 11 Subroutine IRET ● An interrupt program cannot be used in a subroutine program. SUB 11 INT 0 Subroutine Interrupt program IRET ● Another interrupt program cannot be used in an interrupt program. ■...
Page 174
7.1 INT/IRET (Interrupt / Interrupt Return) Main program processing INT1 program processing INT2 program processing INT3 program processing INT1 input INT2 input INT3 input ● When multiple interrupts occur during execution of an interrupt program, they will be executed in order from the smallest program number when the program has finished execution.
Page 175
7.1 INT/IRET (Interrupt / Interrupt Return) ■ Interrupt program execution waiting and clearing ● When multiple interrupts occur simultaneously or when a new interrupt occurs during execution of another interrupt program, the interrupts of lower priority will enter an "execution wait state".
7.2 ICTL (Interrupt Control) 7.2 ICTL (Interrupt Control) ■ Instruction format ■ Operands Items Settings Area storing the control data, or constant data Area storing the control data, or constant data ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 177
7.2 ICTL (Interrupt Control) ■ Description examples Example 1) Setting a periodic interrupt every 10 ms at the start of operation R9013 INT24 executed ICTL every 10 ms (Note 1) R9013 (initial pulse relay) is a relay that turns ON in only the first scan after execution begins. Example 2) Enabling INT0 to 3 when X0 rises Enable INT0 ICTL...
Page 178
7.2 ICTL (Interrupt Control) ■ Precautions for programming Inputs that can actually be used as interrupt inputs. (Refer to the table below) Interrupt program number Interrupt input INT0 INT1 INT2 INT3 INT4 INT5 INT6 INT7 INT8 − INT9 − INT10 −...
Page 179
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 10 9 (INT number) 3.
Page 181
7.2 ICTL (Interrupt Control) ICTL execution (enable) Main program Execution Execution INT0 program Execution INT5 program Execution INT0 input Occurs INT5 input Occurs Disable/Enable Disabled Enabled ■ Example setting to clear interrupts [S1]: H0100 Clears the interrupts from a specified input contact or interrupts matching the target value [S2]: HFE Clears INT0 interrupt (bit 0 is"0"), others are not cleared (Note 1)
Page 182
7.2 ICTL (Interrupt Control) ICTL execution (INT0 clear) Main program Execution Execution INT0 program INT1 program Execution Clear INT0 input INT1 input Disable/Enable Disabled Enabled (Note 1) As INT0 has been cleared, it will not be executed even after being enabled. INT1 has not been cleared, so it will be executed after being enabled.
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 Set the counter via the system register. (It is not necessary to set the external interrupt.) Specify the interrupt program in the program. The high-speed counters correspond to the interrupt programs as indicated in the table below.
8.1 SYS1 (Communication Condition Setting) 8.1 SYS1 (Communication Condition Setting) ■ Instruction format (Note 1) In the example shown in the figure above, the transmission format and baud rate of the COM1 port are set as below. Character bit length: 8; Parity bit: Odd parity; Stop bit: 1 Baud rate: 19200 bps ■...
Page 187
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...
8.1 SYS1 (Communication Condition Setting) First keyword Second keyword Ports to be used Baud rate COM2: COM2 port 4800: 4800 bps 57600: 57600 bps TOOL: COM0 port 9600: 9600 bps 115200: 115200 bps (Note 1) If the baud rate is changed as below, communications passing through all COM ports will be reset. Baud rates of all COM ports: 4800 bps or higher ↔...
Page 189
8.1 SYS1 (Communication Condition Setting) Exampl “COM2No,D0123” Settings (For indirect specification of unit numbers) Port: COM2 / Unit number: Value set in DT0123 ■ Specifying the communication conditions (response time of COM port) ● Specify the response time of a COM port. First keyword Second keyword Ports to be used...
Page 191
8.1 SYS1 (Communication Condition Setting) Setting example Exampl “˽˽˽COM1,RTS1” Settings Port: COM1 / RS (Request to Send) control: Disables communication Exampl “˽˽˽COM1,RTS0” 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.
8.2 SYS1 (Password setting) 8.2 SYS1 (Password setting) ■ Instruction format SYS1 " PASS,ABCD" First keyword Second keyword SYS1 "PAS,abcdefgh" First keyword Second keyword ■ Operands Items Settings Character constant ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index...
Page 193
8.2 SYS1 (Password setting) ■ Precautions for programming ● When this instruction is executed, it takes approximately 100 ms to write to the built-in F- ROM. ● If the specified password is the same as the password that has already been written, the password is not written to the F-ROM.
8.3 SYS1 (Interrupt setting) 8.3 SYS1 (Interrupt setting) ■ Instruction format ■ Operands Items Settings Character constant ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index WX WY WR WL SV modifier Device K H M f ●...
Page 195
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.
8.4 SYS1 [PC (PLC) Link Time Setting] 8.4 SYS1 [PC (PLC) Link Time Setting] ■ Instruction format ■ Operands Items Settings Character constant ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index WX WY WR WL SV modifier Device K H M f...
Page 197
8.4 SYS1 [PC (PLC) Link Time Setting] 2. Error detection time for transmission assurance relay ■ Precautions for programming ● The program should be placed at the beginning of all PLCs being linked, and the same values should be set. ●...
8.5 SYS1 (MEWTOCOL-COM response control) 8.5 SYS1 (MEWTOCOL-COM response control) ■ Instruction format ( ) SYS1 " COM1,WAIT2" First keyword Second keyword ■ Operands Items Settings Character constant ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index WX WY WR WL SV modifier...
Page 199
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) ●...
8.6 SYS1 (Change high-speed counter operation mode) 8.6 SYS1 (Change high-speed counter operation mode) ■ Instruction format ■ Operands Items Settings Character constant ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index WX WY WR WL SV modifier Device K H M f...
Page 201
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.
8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change] 8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change] ■ Instruction format ■ Operands Items Settings Starting number of area storing 16-bit data Starting number of the system register to be specified (K40 to K47, K50 to K57) Ending number of the system register to be specified (K40 to K47, K50 to K57) ■...
8.7 SYS2 [System Register (No.40 to No.48, No.50 to 57) Change] Name Sett values/range W0-1 Range used by link register 0 to 128 words setting Link relay transmission starting No. 64 to 127 Link relay transmission size 0 to 64 words Link register transmission starting No.
Page 204
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 WUMJ-FP0HPGR-091...
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 Comparison data 1: Number of area storing 16-bit data, or constant data Comparison data 2: Number of area storing 16-bit data, or constant data ■...
Page 207
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 ■...
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 Comparison data 1: Number of area storing 16-bit data, or constant data Comparison data 2: Number of area storing 16-bit data, or constant data ■...
Page 209
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.
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 Comparison data 1: Number of area storing 16-bit data, or constant data Comparison data 2: Number of area storing 16-bit data, or constant data ■...
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 ≥...
9.4 STD=, STD<>, STD>, STD>=, STD<, STD<= [32-bit Data Comparison(start)] 9.4 STD=, STD<>, STD>, STD>=, STD<, STD<= [32-bit Data Comparison(start)] ■ Instruction format ■ Operands Items Settings Comparison data 1: Area number storing the 32-bit data, or constant data Comparison data 2: Area number storing the 32-bit data, or constant data ■...
Page 213
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.
9.5 AND=, AND<>, AND>, AND>=, AND<, AND<= [32-bit Data Comparison (AND)] 9.5 AND=, AND<>, AND>, AND>=, AND<, AND<= [32-bit Data Comparison (AND)] ■ Instruction format ■ Operands Items Settings Comparison data 1: Area number storing the 32-bit data, or constant data Comparison data 2: Area number storing the 32-bit data, or constant data ■...
Page 215
9.5 AND=, AND<>, AND>, AND>=, AND<, AND<= [32-bit Data Comparison (AND)] (DT0, DT1) ≥ (DT100, DT101), the external output Y30 turns ON. If X0 is OFF or if (DT0, DT1) is less than (D100, D101), Y30 turns OFF. ■ Precautions for use ●...
9.6 ORD=, ORD<>, ORD>, ORD>=, ORD<, ORD<= [32-bit Data Comparison (OR)] 9.6 ORD=, ORD<>, ORD>, ORD>=, ORD<, ORD<= [32-bit Data Comparison (OR)] ■ Instruction format ■ Operands Items Settings Comparison data 1: Area number storing the 32-bit data, or constant data Comparison data 2: Area number storing the 32-bit data, or constant data ■...
Page 217
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.
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 Area storing real number data, or real number data (comparison data 1) (two words) Area storing real number data, or real number data (comparison data 2) (two words) ■...
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.
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 Area storing real number data, or real number data (comparison data 1) (two words) Area storing real number data, or real number data (comparison data 2) (two words) ■...
Page 221
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. ■...
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 Area storing real number data, or real number data (comparison data 1) (two words) Area storing real number data, or real number data (comparison data 2) (two words) ■...
Page 223
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) ≥...
Page 225
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.1 F0 MV (16-bit Data Transfer) 10.1 F0 MV (16-bit Data Transfer) Transfers the 16-bit data in the specified area number. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area where data is transferred to ■...
Page 227
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) WUMJ-FP0HPGR-091 10-3...
10.2 F0 MV (10 µsec Ring Counter Read) 10.2 F0 MV (10 µsec Ring Counter Read) ■ Instruction format ■ Operands Items Settings Area where data is transferred to ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index WX WY WR WL SV...
10.3 F1 DMV (32-bit Data Transfer) 10.3 F1 DMV (32-bit Data Transfer) Transfers 32-bit data to the specified area number. ■ Instruction format ■ Operands Items Settings Area storing 32-bit data, or constant data Area where data is transferred to ■...
Page 230
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 WUMJ-FP0HPGR-091...
10.4 F2 MV/ (16-bit Data Inversion and Transfer) 10.4 F2 MV/ (16-bit Data Inversion and Transfer) Inverts and transfers 16-bit data at the specified area number. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area where data is transferred to ■...
Page 232
10.4 F2 MV/ (16-bit Data Inversion and Transfer) DT10 DT20 1111 DT11 5555 DT21 DT12 1234 DT22 FFFF R0:ON F2 execution Invert and transfer DT10 DT20 AAAA DT11 5555 DT21 DT12 1234 DT22 FFFF DT11 = "0101 0101 0101 0101" (H5555) ↓Invert and transfer DT20 = "1010 1010 1010 1010"...
10.5 F3 DMV/ (32-bit Data Inversion and Transfer) 10.5 F3 DMV/ (32-bit Data Inversion and Transfer) Inverts the 32-bit data in the specified area number and transfers it. ■ Instruction format ■ Operands Items Settings Area storing 32-bit data, or constant data Area where data is transferred to ■...
Page 234
10.5 F3 DMV/ (32-bit Data Inversion and Transfer) DT10 25AC DT20 1111 DT11 DT21 DT12 FFFD DT22 FFFF R0:ON F3 execution Invert and transfer DT10 25AC DT20 FFFF DT11 DT21 DT12 FFFD DT22 FFFF ■ Flag operations Name Description R9007 R9008 Turns ON when the area is exceeded in index modification.
10.6 F5 BTM (Bit Data Transfer) 10.6 F5 BTM (Bit Data Transfer) Transfers 1-bit data in the specified 16-bit data to the specified bit. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area specifying the transfer method Data destination storage area ■...
Page 238
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 4 bits starting from bit 14 Bits F5 execution Bits Bits 14 to 15 of [S] are sent to bits 2 to 3 of [D]. 0 is stored in bits 4 to 5 of [D].
Page 239
10.6 F5 BTM (Bit Data Transfer) ■ Flag operations Name Description R9007 R9008 Turns ON when the area is exceeded in index modification. (ER) WUMJ-FP0HPGR-091 10-15...
10.7 F6 DGT (Digit Data Transfer) 10.7 F6 DGT (Digit Data Transfer) Transfers the specified 16-bit data in 4-bit (digit) units. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area specifying the transfer method Area where data is transferred to ■...
Page 241
10.7 F6 DGT (Digit Data Transfer) ■ Operation example Operation of instruction format description program DT10 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 Among the DT10 data, only the lower 4 bits are transferred DT20 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 In this example, the content of the...
Page 242
10.7 F6 DGT (Digit Data Transfer) (1) To which digit in the destination 0: 0th digit 1: 1st digit 2: 2nd digit 3: 3rd digit (2) How many digits 0: 1 digit (4 bits) 1: 2 digit (8 bits) 2: 3 digit (12 bits) 3: 4 digit (16 bits) (3) From which digit in the sender 0: 0th digit...
Page 243
10.7 F6 DGT (Digit Data Transfer) Transferring digits 2 and 3 to digits 2 and 3 2 1 0 Set n=H212. 4. Multiple digits are transferred to a non-parallel destination Transferring digits 0 and 1 to digits 2 and 3 2 1 0 Set n=H210.
10.8 F7 MV2 (Two 16-bit Data Transfer to Single Area) 10.8 F7 MV2 (Two 16-bit Data Transfer to Single Area) Two 16-bit data are transferred from the specified area number. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area storing the hexadecimal data or constant data Starting address of the data transfer destination (two words) ■...
Page 245
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) WUMJ-FP0HPGR-091 10-21...
10.9 F8 DMV2 (32-bit 2 Data Transfer) 10.9 F8 DMV2 (32-bit 2 Data Transfer) Two 32-bit data are transferred from the specified area number. ■ Instruction format ■ Operands Items Settings Area storing 32-bit data, or constant data Area storing 32-bit data, or constant data Starting address of the data transfer destination area (four words) ■...
Page 247
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) WUMJ-FP0HPGR-091 10-23...
10.10 F10 BKMV (Data Block Transfer) 10.10 F10 BKMV (Data Block Transfer) Transfers data at the block unit. ■ Instruction format ■ Operands Items Settings Starting address of the source data Final address of the source data Data destination storage area ■...
Page 249
10.10 F10 BKMV (Data Block Transfer) [S1] DT0 K 10 K 11 DT10 K 12 DT11 [S2] DT3 K 13 DT12 K 14 DT13 R0:ON F10 execution [S1] DT0 K 10 K 11 DT10 K 10 K 12 DT11 K 11 [S2] DT3 K 13 DT12...
Page 250
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.
10.11 F11 COPY (16-bit Data Block Copy) 10.11 F11 COPY (16-bit Data Block Copy) Copies the specified data to all areas in the range specified by the block. ■ Instruction format ■ Operands Items Settings Area storing the copy source data, or constant data Starting number of data copy destination area End number of data copy destination area ■...
Page 252
10.11 F11 COPY (16-bit Data Block Copy) K 10 DT10 [D1] [S] DT1 K 11 DT11 K 12 DT12 K 13 DT13 K 14 DT14 [D2] R0:ON F11 execution K 10 DT10 K 11 [D1] [S] DT1 K 11 DT11 K 11 K 12 DT12...
10.12 F12 ICRD (Data Read from F-ROM) 10.12 F12 ICRD (Data Read from F-ROM) Reads the specified data from the F-ROM area. ■ Instruction format ■ Operands Items Settings Starting block number of the F-ROM area (Settable range: K0 to K31) Number of blocks to be read (Settable range: (K1 to K32) Starting number of area storing read data ■...
Page 254
10.12 F12 ICRD (Data Read from F-ROM) System register no.0 Settable range Setting of the program area size DT0 to DT10240 ■ Operation example Operation of instruction format description program When execution condition R0 turns ON, 10 blocks of F-ROM data from block 0 to block 9 are transferred to data registers DT0 to DT20479.
10.13 P13 ICWT (Writing to F-ROM) 10.13 P13 ICWT (Writing to F-ROM) Transfers the specified data to an area in F-ROM. ■ Instruction format ■ Operands Items Settings Starting number of the area storing the write data Number of blocks to be written (Settable range: K1) Starting number of the F-ROM area where data is to be written (Settable range: K0 to K31) ■...
Page 256
10.13 P13 ICWT (Writing to F-ROM) System register no.0 Settable range Setting of the program area size DT0 to DT22528 DT0 to DT10240 ■ Operation example Operation of instruction format description program When execution condition R0 turns ON, one block (2,048 words) of data from data register DT0 is transferred to block 0 in the F-ROM area.
10.14 F15 XCH (16-bit Data Exchange) 10.14 F15 XCH (16-bit Data Exchange) Exchanges 16-bit data of two areas. ■ Instruction format ■ Operands Items Settings Area that stores the 16-bit data to exchange with D2 Area that stores the 16-bit data to exchange with D1 ■...
Page 258
10.14 F15 XCH (16-bit Data Exchange) [D1] DT10 K 10 DT20 K 20 DT11 K 11 DT21 K 21 DT12 K 12 DT22 K 22 [D2] DT13 K 13 DT23 K 23 DT14 K 14 DT24 K 24 R0:ON F15 execution [D1] DT10 K 22 DT20...
10.15 F16 DXCH (32-bit Data Exchange) 10.15 F16 DXCH (32-bit Data Exchange) Exchanges the 32-bit data of two areas. ■ Instruction format ■ Operands Items Settings Area storing the 32-bit data to be exchanged with D2 Area storing the 32-bit data to be exchanged with D1 ■...
10.16 F17 SWAP (Higher/Lower Byte Exchange) 10.16 F17 SWAP (Higher/Lower Byte Exchange) Exchanges higher (8-bit) and lower (8-bit) order bytes in 16-bit data. ■ Instruction format ■ Operands Items Settings Area storing 16-bit data for higher 8-bit and lower 8-bit exchange ■...
Page 262
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 WUMJ-FP0HPGR-091...
10.17 F18 BXCH (Block Exchange) 10.17 F18 BXCH (Block Exchange) Exchanges data in blocks. ■ Instruction format ■ Operands Items Settings Starting address for exchange block 1 Ending address for exchange block 1 Starting address for exchange block 2 ■ Devices that can be specified (indicated by ●) Constant Integer...
Page 264
10.17 F18 BXCH (Block Exchange) DT10 K 10 [D1] DT30 DT11 K 11 DT31 [D3] DT12 K 12 DT32 DT13 K 13 [D2] DT33 DT14 K 14 DT34 DT35 R0:ON F18 execution DT10 [D1] DT30 DT11 DT31 K 10 [D3] DT12 DT32 K 11...
10.18 F190 MV3 (Three 16-bit Data Transfer to Single Area) 10.18 F190 MV3 (Three 16-bit Data Transfer to Single Area) Three 16-bit data items are batch-transferred from the specified area number. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area storing the hexadecimal data or constant data Area storing the hexadecimal data or constant data Starting address of the data transfer destination area (three words)
Page 266
10.18 F190 MV3 (Three 16-bit Data Transfer to Single Area) [S3] 16 bits [S2] 16 bits [S1] 16 bits Content of DT30 Content of DT20 Content of DT10 To DT42 To DT41 To DT40 ■ Related instructions Use the F87 MV2 instruction when batch-transferring two types of 16-bit data. ■...
10.19 F191 DMV3 (32-Bit 3-Data Batch Transfer) 10.19 F191 DMV3 (32-Bit 3-Data Batch Transfer) Three 32-bit data items are batch-transferred from the specified area number. ■ Instruction format ■ Operands Items Settings Area storing 32-bit data, or constant data Area storing 32-bit data, or constant data Area storing 32-bit data, or constant data Starting address of the data transfer destination area (six words) ■...
Page 268
10.19 F191 DMV3 (32-Bit 3-Data Batch Transfer) Upper 16 bits Lower 16 bits Upper 16 bits Lower 16 bits Upper 16 bits Lower 16 bits [S3] [S2] [S1] Content of DT31 Content of DT30 Content of DT21 Content of DT20 Content of DT11 Content of DT10 To DT45 To DT44...
11.1 F20 + (16-bit Data Addition [D+S=D]) 11.1 F20 + (16-bit Data Addition [D+S=D]) 16-bit data is added. ■ Instruction format ■ Operands Items Settings Area storing the 16-bit data to be added, or constant data Area storing the data (16-bit) to be added ■...
11.2 F21 D+ (32-bit Data Addition [D+S=D]) 11.2 F21 D+ (32-bit Data Addition [D+S=D]) 32-bit data is added. ■ Instruction format ■ Operands Items Settings Area storing the 32-bit data to be added, or constant data Area storing the data (32-bit) to be added ■...
Page 273
11.2 F21 D+ (32-bit Data Addition [D+S=D]) Upper 16 bits Lower 16 bits Content of DT11 Content of DT10 The data in the specified memory area and in the following memory area are combined and treated as 32-bit data. (addition) Content of DT1 Content of DT0 (Store result)
11.3 F22 + (16-bit Data Addition [S1+S2=D]) 11.3 F22 + (16-bit Data Addition [S1+S2=D]) This is an instruction that adds 16-bit data. ■ Instruction format ■ Operands Items Settings Area storing the 16-bit data to be added, or constant data Area storing the 16-bit data to be added, or constant data Area storing the addition results ■...
11.4 F23 D+ (32-bit Data Addition [S1+S2=D]) 11.4 F23 D+ (32-bit Data Addition [S1+S2=D]) This is an instruction that adds 32-bit data. ■ Instruction format ■ Operands Items Settings Area storing the 32-bit data to be added, or constant data Area storing the 32-bit data to be added, or constant data Area storing the addition results ■...
Page 277
11.4 F23 D+ (32-bit Data Addition [S1+S2=D]) Upper 16 bits Lower 16 bits Content of DT11 Content of DT10 The data in the specified memory area and in the following memory area are combined and treated as 32-bit data. (addition) Content of DT21 Content of DT20 (Store result)
11.5 F25 - (16-bit Data Subtraction [D-S=D]) 11.5 F25 - (16-bit Data Subtraction [D-S=D]) 16-bit data is subtracted. ■ Instruction format ■ Operands Items Settings Area storing the subtrahend (16-bit data), or constant data Area storing the subtrahend from (16-bit data) ■...
Page 280
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 WUMJ-FP0HPGR-091...
11.6 F26 D-(32-bit Data Subtraction [D-S=D]) 11.6 F26 D-(32-bit Data Subtraction [D-S=D]) Subtracts 32-bit data. ■ Instruction format ■ Operands Items Settings Area that stores subtrahends (32-bit data), or constant data Area storing the number to be subtracted (32-bit data) ■...
Page 282
11.6 F26 D-(32-bit Data Subtraction [D-S=D]) Upper 16 bits Lower 16 bits Content of DT21 Content of DT20 The data in the specified memory area and in the following memory area are combined and treated as 32-bit data. (subtraction) Content of DT11 Content of DT10 (Store result) The lower 16 bits of the subtraction result are stored in DT20 and the...
11.7 F27 - (16-bit Data Subtraction [S1-S2=D]) 11.7 F27 - (16-bit Data Subtraction [S1-S2=D]) 16-bit data is subtracted. ■ Instruction format ■ Operands Items Settings Area storing the number to be subtracted (16-bit data), or constant data Area storing the subtrahend (16-bit data), or constant data Area that stores operation results ■...
Page 285
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) WUMJ-FP0HPGR-091 11-17...
11.8 F28 D- (32-bit Data Subtraction [S1-S2=D]) 11.8 F28 D- (32-bit Data Subtraction [S1-S2=D]) Subtracts 32-bit data. ■ Instruction format ■ Operands Items Settings Area that stores minuends (32-bit data), or constant data Area that stores subtrahends (32-bit data), or constant data Area that stores operation results ■...
Page 287
11.8 F28 D- (32-bit Data Subtraction [S1-S2=D]) Upper 16 bits Lower 16 bits Content of DT11 Content of DT10 The data in the specified memory area and in the following memory area are combined and treated as 32-bit data. (subtraction) Content of DT21 Content of DT20 (Store result)
11.9 F30 * (16-bit Data Multiplication [S1*S2=D+1, D]) 11.9 F30 * (16-bit Data Multiplication [S1*S2=D+1, D]) Multiplies hexadecimal data. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area storing the hexadecimal data or constant data Area storing the multiplication results (32-bit data) ■...
11.10 F31 D* (32-bit Data Multiplication [S1*S2=D+3, D+2, D+1, D] 11.10 F31 D* (32-bit Data Multiplication [S1*S2=D+3, D+2, D+1, D] Multiplies 32-bit data items. ■ Instruction format ■ Operands Items Settings Multiplicand data: Area storing 32-bit data, or constant data Multiplier data: Area storing 32-bit data, or constant data Storage destination: Area storing multiplication result (64-bit data) ■...
Page 291
11.10 F31 D* (32-bit Data Multiplication [S1*S2=D+3, D+2, D+1, D] ■ Operation example Operation of instruction format description program 16 bits 16 bits Content of DT11 Content of DT10 The data in the specified memory area and in the following memory area are combined and treated as 32-bit data.
11.11 F32 % (16-bit Data Subtraction [S1/S2=D]) 11.11 F32 % (16-bit Data Subtraction [S1/S2=D]) Divides 16-bit data. ■ Instruction format ■ Operands Items Settings Dividend data: Area storing 16-bit data, or constant data 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 DT90015) ■...
11.12 F33 D% (32-bit Data Subtraction [S1/S2=D+1, D]) 11.12 F33 D% (32-bit Data Subtraction [S1/S2=D+1, D]) Divides 32-bit data. ■ Instruction format ■ Operands Items Settings Dividend data: Area storing 32-bit data, or constant data 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 DT90015 and DT90016) ■...
Page 295
11.12 F33 D% (32-bit Data Subtraction [S1/S2=D+1, D]) ■ Operation example Operation of instruction format description program Upper 16 bits Lower 16 bits Content of DT11 Content of DT10 ÷ (division) Content of DT21 Content of DT20 (Store result) The quotient is stored in DT30 to DT31. Store to DT31 Store to DT30 The lower 16 bits of the remainder are stored in...
11.13 F34 *W (16-bit Data Multiplication [S1*S2=D]) 11.13 F34 *W (16-bit Data Multiplication [S1*S2=D]) Multiplies 16-bit data and stores the result in a 16-bit, one-word area. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area storing the hexadecimal data or constant data Area storing multiplication result (16-bit data) ■...
Page 297
11.13 F34 *W (16-bit Data Multiplication [S1*S2=D]) ■ Precautions for programming Keep the operation result [D] within the range of K–32768 to K32767. ■ Flag operations Name Description R9007 Turns ON when the area is exceeded in index modification. R9008 Turns ON when the operation result exceeds 16 bits (ER) R900B...
11.14 F35 +1 (16-bit Data Increment) 11.14 F35 +1 (16-bit Data Increment) Adds 1 to 16-bit data. ■ Instruction format ■ Operands Items Settings Area to which 1 is to be added ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 299
11.14 F35 +1 (16-bit Data Increment) ● Ensure that overflows do not occur in normal circumstances. ● If an overflow occurs, use a 32-bit operation instruction. ● If an overflow occurs, the CY flag (special internal relay R9009) turns ON. ■...
11.15 F36 D+1 (32-bit Data Increment) 11.15 F36 D+1 (32-bit Data Increment) Adds 1 to 32-bit data. ■ Instruction format ■ Operands Items Settings The area (32-bit) that +1 is added to ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 301
11.15 F36 D+1 (32-bit Data Increment) ■ Precautions for programming ● With arithmetic operation instructions, in the event that the operation result falls beyond the range of values that can be handled, an overflow occurs. ● Ensure that overflows do not occur in normal circumstances. ●...
11.16 F37 -1 (16-bit Data Decrement) 11.16 F37 -1 (16-bit Data Decrement) Subtracts 1 from 16-bit data. ■ Instruction format ■ Operands Items Settings Area to be decreased by 1 ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index...
Page 303
11.16 F37 -1 (16-bit Data Decrement) ● Under normal circumstances, do not allow an underflow to occur. ● If an underflow occurs, use the 32-bit operation instruction. ● If an underflow occurs, the CY flag (special internal relay R9009) will turn ON. ■...
11.17 F38 D-1 (32-bit Data Decrement) 11.17 F38 D-1 (32-bit Data Decrement) Subtracts 1 from 32-bit data. ■ Instruction format ■ Operands Items Settings Area (32-bit) from which 1 is subtracted ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 305
11.17 F38 D-1 (32-bit Data Decrement) ■ Precautions for programming ● If the result of an arithmetic operation instruction exceeds the numerical range that can be handled, an underflow will result. ● Under normal circumstances, do not allow an underflow to occur. ●...
11.18 F39 D*D (32-bit Data Multiplication [S1*S2=D+1, D]) 11.18 F39 D*D (32-bit Data Multiplication [S1*S2=D+1, D]) Multiplies 32-bit data items and stores the result in the 32-bit two-word area. ■ Instruction format ■ Operands Items Settings Multiplicand data: Area storing 32-bit data, or constant data Multiplier data: Area storing 32-bit data, or constant data Storage destination: Area storing multiplication result (32-bit data) ■...
Page 307
11.18 F39 D*D (32-bit Data Multiplication [S1*S2=D+1, D]) ■ Operation example Operation of instruction format description program Upper 16 bits Lower 16 bits Content of DT11 Content of DT10 The data in the specified memory area and in the following memory area are combined and treated as 32-bit data.
12.1 F40 B+ (4-digit BCD Data Addition [D+S=D]) 12.1 F40 B+ (4-digit BCD Data Addition [D+S=D]) Adds 4-digit BCD data. ■ Instruction format ■ Operands Items Settings Area storing the 4-digit BCD data to be added, or constant data Area storing the 4-digit BCD data to be added to ■...
12.2 F41 DB+ (8-digit BCD Data Addition [D+S=D]) 12.2 F41 DB+ (8-digit BCD Data Addition [D+S=D]) Adds 8-digit BCD data. ■ Instruction format ■ Operands Items Settings Area storing the 8-digit BCD data to be added, or constant data Area storing the 8-digit BCD data to be added to ■...
Page 313
12.2 F41 DB+ (8-digit BCD Data Addition [D+S=D]) Upper 16 bits Lower 16 bits Content of DT11 Content of DT10 The data in the specified memory area and in the following memory area are combined and treated as 32-bit data. (addition) Content of DT1 Content of DT0...
12.3 F42 B+ (4-digit BCD Data Addition [S1+S2=D]) 12.3 F42 B+ (4-digit BCD Data Addition [S1+S2=D]) Adds 4-digit BCD data. ■ Instruction format ■ Operands Items Settings Area storing the 4-digit BCD data to be added, or constant data Area storing the 4-digit BCD data to be added, or constant data Area storing the addition results ■...
Page 315
12.3 F42 B+ (4-digit BCD Data Addition [S1+S2=D]) DT10 (BCD) + (addition) DT20 (BCD) DT30 (BCD) ■ Precautions for programming ● If the result of an arithmetic operation instruction exceeds the maximum value that can be handled, this will result in an overflow. ●...
12.4 F43 DB+ (8-digit BCD Data Addition [S1+S2=D]) 12.4 F43 DB+ (8-digit BCD Data Addition [S1+S2=D]) Adds 8-digit BCD data. ■ Instruction format ■ Operands Items Settings Area storing the 8-digit BCD data to be added, or constant data Area storing the 8-digit BCD data to be added, or constant data Area storing the addition results ■...
Page 317
12.4 F43 DB+ (8-digit BCD Data Addition [S1+S2=D]) Upper 16 bits Lower 16 bits Content of DT11Content of DT10 The data in the specified memory area and in the following memory area are combined and treated as 32 -bit data. (addition) Content of DT21 Content of DT20 (Store result)
12.5 F45 B- (4-digit BCD Data Subtraction [D-S=D]) 12.5 F45 B- (4-digit BCD Data Subtraction [D-S=D]) Subtracts 4-digit BCD data. ■ Instruction format ■ Operands Items Settings Area storing the subtrahend (4-digit BCD data) or constant data Area storing the subtrahend (4-digit BCD data) ■...
12.6 F46 DB- (8-digit BCD Data Subtraction [D-S=D]) 12.6 F46 DB- (8-digit BCD Data Subtraction [D-S=D]) Subtracts 8-digit BCD data. ■ Instruction format ■ Operands Items Settings Area that stores the subtrahend (8-digit BCD data), or constant data Area storing the number to be subtracted (8-digit BCD data) ■...
Page 321
12.6 F46 DB- (8-digit BCD Data Subtraction [D-S=D]) Upper 16 bits Lower 16 bits Content of DT21 Content of DT20 The data in the specified memory area and in the following memory area are combined and treated as 32-bit data. (subtraction) Content of DT11 Content of DT10...
12.7 F47 B- (4-digit BCD Data Subtraction [S1-S2=D]) 12.7 F47 B- (4-digit BCD Data Subtraction [S1-S2=D]) Subtracts 4-digit BCD data. ■ Instruction format ■ Operands Items Settings Area storing the minuend (4-digit BCD data), or constant data Area storing the subtrahend (4-digit BCD data) or constant data Area that stores the calculation result ■...
12.8 F48 DB- (8-digit BCD Data Subtraction [S1-S2=D]) 12.8 F48 DB- (8-digit BCD Data Subtraction [S1-S2=D]) Subtracts 8-digit BCD data. ■ Instruction format ■ Operands Items Settings Area that stores the minuend (8-digit BCD data), or constant data Area that stores the subtrahend (8-digit BCD data), or constant data Area that stores the calculation result ■...
Page 325
12.8 F48 DB- (8-digit BCD Data Subtraction [S1-S2=D]) Upper 16 bits Lower 16 bits Content of DT11 Content of DT10 The data in the specified memory area and in the following memory area are combined and treated as 32-bit data. (subtraction) Content of DT21 Content of DT20...
12.9 F50 B* (4-digit BCD Data Multiplication [S1*S2=D+1, D]) 12.9 F50 B* (4-digit BCD Data Multiplication [S1*S2=D+1, D]) Multiplies 4-digit BCD data. ■ Instruction format ■ Operands Items Settings Area storing 4-digit BCD data, or constant data Area storing 4-digit BCD data, or constant data Area storing multiplication result (8-digit BCD data) ■...
Page 327
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).
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, Multiplies 8-digit BCD data. ■ Instruction format ■ Operands Items Settings Multiplicand data: Area storing 8-digit BCD data, or constant data Multiplier data: Area storing 8-digit BCD data, or constant data Storage destination: Area storing multiplication result (64-bit data) ■...
Page 329
12.10 F51 DB* (8-Digit BCD Data Multiplication [S1*S2=D+3, D+2, D+1, D]) ■ Operation example Operation of instruction format description program Upper 16 bits Lower 16 bits Content of DT11Content of DT10 The data in the specified memory area and in the following memory area are combined and treated as 32 -bit data.
12.11 F52 B% (4-digit BCD Data Subtraction [S1/S2=D]) 12.11 F52 B% (4-digit BCD Data Subtraction [S1/S2=D]) Divides 4-digit BCD data. ■ Instruction format ■ Operands Items Settings Dividend data: Area storing 4-digit BCD data, or constant data 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 DT90015) ■...
12.12 F53 DB% (8-digit BCD Data Subtraction [S1/S2=D+1, D]) 12.12 F53 DB% (8-digit BCD Data Subtraction [S1/S2=D+1, D]) Divides 8-digit BCD data. ■ Instruction format ■ Operands Items Settings Dividend data: Area storing 8-digit BCD data, or constant data 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 DT90015 and DT90016) ■...
Page 333
12.12 F53 DB% (8-digit BCD Data Subtraction [S1/S2=D+1, D]) ■ Operation example Operation of instruction format description program Upper 16 bits Lower 16 bits Content of DT11 Content of DT10 ÷ (division) Content of DT21 Content of DT20 (Store result) The quotient is stored in DT30 to DT31.
12.13 F55 B+1 (4-digit BCD Data Increment) 12.13 F55 B+1 (4-digit BCD Data Increment) Adds 1 to 4-digit BCD data. ■ Instruction format ■ Operands Items Settings Area to which 1 is to be added ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 335
12.13 F55 B+1 (4-digit BCD Data Increment) ● Ensure that overflows do not occur in normal circumstances. ● In the case of an overflow, use an 8-digit arithmetic operation instruction. ● If an overflow occurs, the CY flag (special internal relay R9009) turns ON. ■...
12.14 F56 DB+1 (8-digit BCD Data Increment) 12.14 F56 DB+1 (8-digit BCD Data Increment) Adds 1 to the 8-digit BCD data. ■ Instruction format ■ Operands Items Settings The area (32-bit) that +1 is added to ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 337
12.14 F56 DB+1 (8-digit BCD Data Increment) ■ Precautions for programming ● If the result of an arithmetic operation instruction exceeds the maximum value that can be handled, this will result in an overflow. ● Ensure that overflows do not occur in normal circumstances. ●...
12.15 F57 B-1 (4-digit BCD Data Decrement) 12.15 F57 B-1 (4-digit BCD Data Decrement) Subtracts 1 from 4-digit BCD data. ■ Instruction format ■ Operands Items Settings Area to be decreased by 1 ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 339
12.15 F57 B-1 (4-digit BCD Data Decrement) ■ Precautions for programming ● If the result of an arithmetic operation instruction exceeds the maximum value that can be handled, this will result in an underflow. ● Under normal circumstances, do not allow an underflow to occur. ●...
12.16 F58 DB-1 (8-digit BCD Data Decrement) 12.16 F58 DB-1 (8-digit BCD Data Decrement) Subtracts 1 from 8-digit BCD data. ■ Instruction format ■ Operands Items Settings Area (32-bit) from which 1 is subtracted ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 341
12.16 F58 DB-1 (8-digit BCD Data Decrement) ■ Precautions for programming ● If the result of an arithmetic operation instruction falls below the minimum value which can be handled, an underflow will result. ● Under normal circumstances, do not allow an underflow to occur. ●...
13.1 F60 CMP (16-bit Data Comparison) 13.1 F60 CMP (16-bit Data Comparison) Compares the two specified 16-bit data and outputs the judgment result to special internal relays. ■ Instruction format ■ Operands Items Settings Comparison data 1: Area storing 16-bit data, or constant data Comparison data 2: Area storing 16-bit data, or constant data ■...
13.1 F60 CMP (16-bit Data Comparison) Flag Relationship R900A R900B R900C R9009 between S1 and S2 > < Carry S1 > S2 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". ■...
Page 346
13.1 F60 CMP (16-bit Data Comparison) This program has the same operation as the program example. ■ Precautions when using two or more comparison instructions ● The comparison instruction judgment flags R900A to R900C are updated each time comparison instructions are executed. ●...
Page 347
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).
Page 348
13.1 F60 CMP (16-bit Data Comparison) e.g. Comparing the BCD data in DT0 and DT1 When DT0 is less than DT1, R1 turns ON When DT0 is equal to DT1, R2 turns ON When DT0 is greater than DT1, R3 turns ON ●...
Page 349
13.1 F60 CMP (16-bit Data Comparison) Name Description R9008 (ER) WUMJ-FP0HPGR-091 13-7...
13.2 F61 DCMP (32-bit Data Comparison) 13.2 F61 DCMP (32-bit Data Comparison) Compares two specified 32-bit data, and outputs the result to special internal relays. ■ Instruction format ■ Operands Items Settings Comparison data 1: Area storing 32-bit data, or constant data Comparison data 2: Area storing 32-bit data, or constant data ■...
Page 351
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. ■...
Page 352
13.2 F61 DCMP (32-bit Data Comparison) ■ Precautions when using two or more comparison instructions ● The comparison instruction judgment flags R900A to R900C are updated each time comparison instructions are executed. ● Therefore, when using two or more comparison instructions: 1.
Page 353
13.2 F61 DCMP (32-bit Data Comparison) e.g. Comparing BCD data in DT0 to DT1 with BCD Data in DT10 to DT11 R1 turns ON when (DT1, DT0) < (DT11, DT10) R2 turns ON when (DT1, DT0) = (DT11, DT10) R3 turns ON when (DT1, DT0) > (DT11, DT10) ●...
13.3 F62 WIN (16-bit Data Band Comparison) 13.3 F62 WIN (16-bit Data Band Comparison) Performs a band comparison of signed 16-bit data and outputs the comparison result to special internal relays. ■ Instruction format Lower limit Upper limit F62 WIN DT10 DT20 DT30...
Page 355
13.3 F62 WIN (16-bit Data Band Comparison) Flag Relationship between S1, R900A R900B R900C R9009 S2, and S3 > < Carry S1 < S2 × S2 ≤ S1 ≤ S3 × S3 < S1 × (Note 1) ×: Does not change. ■...
13.4 F63 DWIN (32-bit Data Band Comparison) 13.4 F63 DWIN (32-bit Data Band Comparison) Performs a band comparison of signed 32-bit data and outputs the comparison result to special internal relays. ■ Instruction format Lower limit Upper limit F63 DWIN DT10 DT20 DT30...
Page 357
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 × S2 ≤ S1 ≤ S3 ×...
13.5 F64 BCMP (Block Data Comparison) 13.5 F64 BCMP (Block Data Comparison) Detects matches in two block-specified areas in byte units. ■ Instruction format ■ Operands Items Settings Area storing the control data (4-digit BCD data), or constant data Starting address of comparison block 1 Starting address of comparison block 2 ■...
Page 359
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. ■...
Page 360
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 Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when the content specified by [S1] is not comprised of BCD data...
13.6 F373 DTR (16-bit Data Change Detection) 13.6 F373 DTR (16-bit Data Change Detection) Detects changes in word data numerical values. ■ Instruction format ■ Operands Items Settings Area that detects data changes Area that stores data status during the previous execution ■...
Page 362
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...
13.7 F374 DDTR (32-bit Data Change Detection) 13.7 F374 DDTR (32-bit Data Change Detection) Detects changes in double-word data (32-bit data) values. ■ Instruction format ■ Operands Items Settings Area that detects data changes Area that stores data status during the previous execution ■...
Page 364
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...
14.1 F65 WAN (16-bit Data AND) 14.1 F65 WAN (16-bit Data AND) Calculates the logical conjunction of 16-bit data. ■ Instruction format ■ Operands Items Settings Data 1: Area storing data on which to perform the logical operation, or constant data Data 2: Area storing data on which to perform the logical operation, or constant data Storage location: Area storing the operation result ■...
14.2 F66 WOR (16-bit Data OR) 14.2 F66 WOR (16-bit Data OR) Calculates the OR of 16-bit data. ■ Instruction format ■ Operands Items Settings Data 1: Area storing data on which to perform the logical operation, or constant data Data 2: Area storing data on which to perform the logical operation, or constant data Storage location: Area storing the operation result ■...
14.3 F67 XOR (16-bit Data Exclusive OR) 14.3 F67 XOR (16-bit Data Exclusive OR) Calculates the exclusive OR of 16-bit data. ■ Instruction format ■ Operands Items Settings Data 1: Area storing data on which to perform the logical operation, or constant data Data 2: Area storing data on which to perform the logical operation, or constant data Storage location: Area storing the operation result ■...
14.4 F68 XNR (16-bit Data Exclusive NOR) 14.4 F68 XNR (16-bit Data Exclusive NOR) Calculates the exclusive NOR of 16-bit data. ■ Instruction format ■ Operands Items Settings Data 1: Area storing data on which to perform the logical operation, or constant data Data 2: Area storing data on which to perform the logical operation, or constant data Storage location: Area storing the operation result ■...
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 Area storing data to be combined, or constant data Area storing data to be combined, or constant data Area storing mask data for combining, or constant data Area that stores operation results...
Page 375
14.5 F69 WUNI [(S1 AND S3) OR (S2 AND S3) = D] (16-bit) ■ Operation example Operation of instruction format description program DT10 DT20 1010 1010 1010 1010 0101 0101 0101 0101 DT30 DT30 bit inversion data Inversion 1111 0000 0000 1111 0000...
14.6 F215 DAND (32-bit Data AND) 14.6 F215 DAND (32-bit Data AND) Calculates logical conjunction of double word data. ■ Instruction format ■ Operands Items Settings Area storing the data on which OR operations will be performed, or constant data (two words) Area storing the data on which OR operations will be performed, or constant data (two words) Storage destination: Area that stores calculation results (two words) ■...
Page 377
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" WUMJ-FP0HPGR-091 14-13...
14.7 F216 DOR (32-bit Data OR) 14.7 F216 DOR (32-bit Data OR) Performs OR operations double word data. ■ Instruction format ■ Operands Items Settings Area storing the data on which OR operations will be performed, or constant data (two words) Area storing the data on which OR operations will be performed, or constant data (two words) Storage destination: Area that stores calculation results (two words) ■...
Page 379
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" WUMJ-FP0HPGR-091 14-15...
14.8 F217 DXOR (32-bit Data Exclusive OR) 14.8 F217 DXOR (32-bit Data Exclusive OR) Calculates the exclusive OR of double-word data. ■ Instruction format ■ Operands Items Settings Area storing the data on which OR operations will be performed, or constant data (two words) Area storing the data on which OR operations will be performed, or constant data (two words) Storage destination: Area that stores calculation results (two words) ■...
Page 381
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" WUMJ-FP0HPGR-091 14-17...
14.9 F218 DXNR (32-bit Data Exclusive NOR) 14.9 F218 DXNR (32-bit Data Exclusive NOR) Calculates the exclusive NOR of double word data. ■ Instruction format ■ Operands Items Settings Area storing the data on which OR operations will be performed, or constant data (two words) Area storing the data on which OR operations will be performed, or constant data (two words) Storage destination: Area that stores calculation results (two words) ■...
Page 383
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" WUMJ-FP0HPGR-091 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 Area storing the data to be combined, or constant data (two words) Area storing the data to be combined, or constant data (two words) Area storing mask data for combination, or constant data (two words) Area storing the operation results (two words)
Page 385
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 1010 1010 1010 1010 0101 0101 0101 0101 S2+1 S2+1 1100 1100 1100 1100 0011 0011 0011...
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...
Page 388
15 Data Conversion Instructions 15.31 F237 GBIN (Gray Code to 16-bit Data Conversion) .......15-74 15.32 F238 DGBIN (Gray Code to 32-bit Data Conversion).....15-75 15.33 F240 COLM (Bit Line to Bit Column Conversion) ......15-77 15.34 F241 LINE (Bit Column to Bit Line Conversion) ......15-79 15-2 WUMJ-FP0HPGR-091...
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 Area storing data specifying the calculation method, or constant data Starting address of the area storing target data Area storing the length (number of bytes) of the target data, or constant data Area that stores operation results...
15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)] Specification of control data [S1] 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...
Page 391
15.1 F70 BCC [Block Check Code (ADD, SUB, XOR, CRC)] F70 BCC [S1] Exclusive OR [S2] Start of target data [S3] Length of target data (12 bytes) [D] Calculation result > When this is executed, BCC (H 1D) is stored in the lower byte of DT6 of [D]. ●...
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion) 15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion) Converts hexadecimal numeric values to ASCII code. ■ Instruction format ■ Operands Items Settings Starting number for the area storing the hexadecimal numeric values Area storing the length of the numeric value (number of bytes) to be converted, or constant data Starting number of the area storing the ASCII code of conversion result ■...
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion) ■ Precautions for programming 1. The two characters that make up one byte are interchanged when stored. 2. Converts two bytes as one section. Hexadecimal data (1) (2) (3) (4) (5) (6) (7) (8) S1+1 Hexadecimal data Conversion result...
Page 395
15.2 F71 HEXA (Hexadecimal Data to ASCII Code Conversion) [Hexadecimal data] S1+1 3 bytes HEXA instruction execution (Conversion result) ■ Reference: ASCII code Higher Lower ■ 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...
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion) 15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion) Converts character strings in ASCII code to hexadecimal numbers. ■ Instruction format ■ Operands Items Settings Starting number of the area storing the ASCII code Area storing the number of ASCII codes (number of characters) to be converted, or constant data Number of the start of the area storing the hexadecimal number that is the result of conversion ■...
Page 397
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion) ASCII code (DT1, DT0) H 44 43 42 41 D C B A DT1 DT0 Value in hexadecimal (DT40) H CDAB ■ Precautions for programming 1. Two ASCII code characters are converted into two 1-byte numeric digits. At this time, the upper and lower characters are interchanged.
Page 398
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion) Conversion of seven characters (S2 = K7) Conversion of six characters (S2 = K6) [ASCII code] S1+2 S1+1 6 characters (6 bytes) AHEX instruction execution (Conversion result) (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.
Page 399
15.3 F72 AHEX (ASCII Code to Hexadecimal Data Conversion) ASCII code Conversion range n-1 n-2 "0" is entered. (Odd number value specified with n=S2) ■ Reference: ASCII code Higher Lower ■ 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 area R9007...
15.4 F73 BCDA (BCD Data to ASCII Code Conversion) 15.4 F73 BCDA (BCD Data to ASCII Code Conversion) Converts up to eight digits of BCD data to ASCII code character strings. ■ Instruction format ■ Operands Items Settings Starting number of the area storing the BCD numerical value Area storing data indicating the amount and direction of data to be converted, or constant data Starting number of the area storing the ASCII code of conversion result ■...
Page 401
15.4 F73 BCDA (BCD Data to ASCII Code Conversion) ■ Precautions for programming ● The two characters that make up one byte are interchanged when stored. ● Converts two bytes as one section. Forward Reverse direction direction (1)(2) (3)(4) (1)(2) (3)(4) <Example>...
Page 402
15.4 F73 BCDA (BCD Data to ASCII Code Conversion) Forward conversion of four bytes (S2 = H0004) [BCD data] S1+1 4 bytes BCDA instruction execution Converted from S1+1 Converted from S1 Reverse conversion of four bytes (S2 = H1004) [BCD data] S1+1 4 bytes BCDA instruction execution...
Page 403
15.4 F73 BCDA (BCD Data to ASCII Code Conversion) Higher ■ 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...
15.5 F74 ABCD (ASCII Code to BCD Data Conversion) 15.5 F74 ABCD (ASCII Code to BCD Data Conversion) Converts an ASCII character string to 4-digit BCD data. ■ Instruction format ■ Operands Items Settings 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 constant data Number of the start of the area storing the BCD value that is the result of conversion...
Page 405
15.5 F74 ABCD (ASCII Code to BCD Data Conversion) ■ Precautions for programming ● Two ASCII code characters are converted into 1-byte numeric values (two digits). At this time, the upper and lower characters are interchanged. ● Four characters are stored as one segment of data. ●...
Page 407
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 Turns ON when the number of characters specified by [S2] exceeds the area of [S1]...
15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion) 15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion) Converts 16-bit BIN data expressing a decimal number to an ASCII code character string. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area storing the number of bytes of the area storing the conversion results, or constant data...
Page 409
15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion) ■ Precautions for programming ● If the conversion target is a positive number, a sign code (+) is not added in front of the numeric data. ● If the conversion target is a negative number, a sign code (–: H2D) is added in front of the numeric data.
Page 410
15.6 F75 BINA (16-bit Binary Data to ASCII Code Conversion) When converting a positive number [16-bit data] K1234 (Conversion result) ASCII code Remainder Range specified in [S2] (6 bytes) ■ Reference: ASCII code Higher Lower ■ Flag operations Name Description Turns ON when the area is exceeded in index modification.
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion) 15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion) Converts an ASCII code character string expressing a decimal number to 16-bit BIN data. ■ Instruction format ■ Operands Items Settings Starting number of the area storing the ASCII code to be converted Area storing the number of bytes of data to be converted, or constant data...
Page 412
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion) ■ Precautions for programming ● Store the ASCII code for conversion in the direction of the final address of the specified area. ● Fill the remaining bytes with"0"(H30) or spaces (H20). ●...
Page 413
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion) Example of conversion of an ASCII code expressing a positive number Example (1) [ASCII code] S1+2 S1+1 ASCII code Remainder Range specified in [S2] Example (2) [ASCII code] S1+2 S1+1 ASCII code Remainder Range specified in [S2]...
Page 414
15.7 F76 ABIN (ASCII Code to 16-bit Binary Data Conversion) Higher ■ 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"...
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion) 15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion) Converts 32-bit BIN data expressing a decimal number to an ASCII code character string. ■ Instruction format ■ Operands Items Settings Starting number of the area storing 32-bit data, or constant data Area storing the number of bytes of the area storing the conversion results, or constant data...
Page 416
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion) ■ Precautions for programming ● If the conversion target is a positive number, a sign code (+) is not added in front of the numeric data. ● If the conversion target is a negative number, a sign code (–: H2D) is added in front of the numeric data.
Page 417
15.8 F77 DBIA (32-bit Binary Data to ASCII Code Conversion) When converting a positive number [32-bit data] S1+1 K12345678 ASCII code Range specified in [S2] (8 bytes) ■ Reference: ASCII code Higher Lower ■ 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"...
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion) 15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion) Converts an ASCII code character string expressing a decimal number to 32-bit BIN data. ■ Instruction format ■ Operands Items Settings 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...
Page 419
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion) ■ Precautions for programming ● Store the ASCII code for conversion in the direction of the final address of the specified area. ● Fill the remaining bytes with"0"(H30) or spaces (H20). ●...
Page 420
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion) Example of conversion of an ASCII code expressing a positive number Example (1) [ASCII code] S1+3 S1+2 S1+1 ASCII code Range specified in [S2] (8 bytes) Example (2) [ASCII code] S1+4 S1+3 S1+2...
Page 421
15.9 F78 DABI (ASCII Code to 32-bit Binary Data Conversion) Higher ■ 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] Turns ON when the number of bytes specified by [S2] is"0"...
15.10 F80 BCD (16-bit Binary Data to BCD Data Conversion) 15.10 F80 BCD (16-bit Binary Data to BCD Data Conversion) Converts 16-bit binary data to 4-digit BCD. ■ Instruction format ■ Operands Items Settings Target data: Area storing 16-bit data, or constant data Storage destination: Area storing 4-digit BCD data following conversion ■...
Page 423
15.10 F80 BCD (16-bit Binary Data to BCD Data Conversion) ■ Precautions for programming ● The maximum value of 16-bit data that can be converted is K9999 (H270F). ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when the binary data exceeds the range that can be converted to BCD (when...
15.11 F81 BIN (BCD Data to 16-bit Binary Data Conversion) 15.11 F81 BIN (BCD Data to 16-bit Binary Data Conversion) Converts 4-digit BCD data to 16-bit binary data. ■ Instruction format ■ Operands Items Settings Target data: Area storing 4-digit BCD data, or constant data Storage destination: Area storing converted binary data ■...
Page 425
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) WUMJ-FP0HPGR-091 15-39...
15.12 F82 DBCD (32-bit Binary Data to BCD Data Conversion) 15.12 F82 DBCD (32-bit Binary Data to BCD Data Conversion) Converts 32-bit binary data to 8-digit BCD data. ■ Instruction format ■ Operands Items Settings Target data: Area storing 32-bit data, or constant data Storage destination: Area storing 8-digit BCD data following conversion ■...
15.13 F83 DBIN (BCD Data to 32-bit Binary Data Conversion) 15.13 F83 DBIN (BCD Data to 32-bit Binary Data Conversion) Converts 8-digit BCD data to 32-bit binary data. ■ Instruction format ■ Operands Items Settings Target data: Area storing 8-digit BCD data, or constant data Storage destination: Area storing converted binary data ■...
15.14 F84 INV (16-bit Data Invert) 15.14 F84 INV (16-bit Data Invert) Inverts 16-bit data. ■ Instruction format ■ Operands Items Settings Area that stores the data to invert ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index WX WY WR WL SV...
15.15 F85 NEG (16-bit Data Sign Inversion) 15.15 F85 NEG (16-bit Data Sign Inversion) Takes complement of 2 in hexadecimal data. ■ Instruction format ■ Operands Items Settings Area for storing original data and its complement of 2 ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
15.16 F86 DNEG (32-bit Data Sign Inversion) 15.16 F86 DNEG (32-bit Data Sign Inversion) Takes complement of 2 in 32-bit data. ■ Instruction format ■ Operands Items Settings Starting number of area for storing original data and its complement of 2 ■...
Page 431
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) WUMJ-FP0HPGR-091 15-45...
15.17 F87 ABS (Absolute Value of 16-bit Data) 15.17 F87 ABS (Absolute Value of 16-bit Data) Calculates the absolute value of signed 16-bit data. ■ Instruction format ■ Operands Items Settings Area storing the data for which the absolute value will be calculated ■...
15.18 F88 DABS (Absolute Value of 32-bit Data) 15.18 F88 DABS (Absolute Value of 32-bit Data) Calculates the absolute value of signed 32-bit data. ■ Instruction format ■ Operands Items Settings Starting number of the area storing the data for which the absolute value will be calculated ■...
15.19 F89 EXT (Sign Extension) 15.19 F89 EXT (Sign Extension) Extends 16-bit data to 32-bit data without changing signs or values. ■ Instruction format ■ Operands Items Settings Area where data for sign extension is stored ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
15.20 F90 DECO (Decode) 15.20 F90 DECO (Decode) Decodes the specified data. ■ Instruction format ■ Operands Items Settings Area storing conversion data, or constant data Area storing the control data, or constant data Starting address of the area storing the conversion result ■...
Page 437
15.20 F90 DECO (Decode) The decoded result for the specified part ("0111"= 7) is stored in the 2 bit area starting from DT20. 15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 (bit) 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 DT20: Bit 7 of the 2...
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 2 words 32 bits 4 words 64 bits 8 words 128 bits 16 words 256 bits...
15.21 F91 SEGT (7-segment) 15.21 F91 SEGT (7-segment) Converts specified 16-bit data to 4-digit data for 7-segment display. ■ Instruction format ■ Operands Items Settings Area storing conversion data, or constant data Starting address of the area storing the conversion result ■...
Page 440
15.21 F91 SEGT (7-segment) ■ Relationship between display content and data Data for 7-segment display 1 digit [D] Value 7-segment display ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when the area is exceeded when conversion results are stored in the area (ER) specified by [D] 15-54...
15.22 F92 ENCO (Encode) 15.22 F92 ENCO (Encode) Encodes the specified data. ■ Instruction format ■ Operands Items Settings Starting address of the area storing conversion data Area storing the control data, or constant data Area to store the conversion result ■...
Page 442
15.22 F92 ENCO (Encode) 15 ・ ・ 12 11 ・ ・ 8 7 ・ ・ 4 3 ・ ・ 0 DT10: DT11: Bit 8 counted from the least significant bit of DT10 is ON Result output start bit 15 ・ ・ 12 11 ・ ・ 8 7 ・...
Page 443
15.22 F92 ENCO (Encode) Specification of nL and length of result Value of nL Effective bit length for conversion 2-bit 4-bit 8-bit (one byte) 16-bit (one word) 32-bit (two words) 64-bit (four words) 128-bit (eight words) 256-bit (16 words) Conversion example When encoding 16-bit data (nL = 4), the content of the conversion data and the encoding result will be as follows.
15.23 F93 UNIT (Digit Combine) 15.23 F93 UNIT (Digit Combine) Combines the lower order 4 bits (bits 0 to 3) of 16-bit data. ■ Instruction format ■ Operands Items Settings The starting address of the area that stores the data to be combined Area storing the number of data to be combined, or constant data Area that stores the combined data ■...
Page 445
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.
15.24 F94 DIST (Digit Distribute) 15.24 F94 DIST (Digit Distribute) Divides 16-bit data into four 4-bit units and distributes it. ■ Instruction format ■ Operands Items Settings Area storing the 16-bit data to be divided, or constant data Area storing the number of data items to be divided, or constant data Starting address of the area storing each divided digit ■...
Page 447
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. ■...
15.25 F96 SRC (16-bit Data Search) 15.25 F96 SRC (16-bit Data Search) Searches for the specified 16-bit data from the area in the specified range (table). ■ Instruction format ■ Operands Items Settings Area storing the data to be searched, or constant data Search table starting address Search table ending address ■...
Page 449
15.25 F96 SRC (16-bit Data Search) Search data Search table DT10 DT20 0 [S2] [S1] DT21 DT22 DT23 DT39 DT40 20 [S3] Relative position number If DT22, DT39, and DT40 match the searched data, the following occurs. 1. If the number of registers matching the searched data equals 3 "K3"is stored in DT90037.
15.26 F97 DSRC (32-bit Data Search) 15.26 F97 DSRC (32-bit Data Search) Searches for specified 32-bit data in any area range (table). ■ Instruction format ■ Operands Items Settings Area storing the data to search for, or constant data (32-bit) Address of the search table starting area (32-bit) Address of the search table ending area (32-bit) ■...
Page 451
15.26 F97 DSRC (32-bit Data Search) Search data Search table DT11, DT10 DT21, DT20 0 [S2] [S1] DT23, DT22 F F 1 2 DT25, DT24 DT27, DT26 F F F F F F DT39, DT38 DT41, DT40 10 [S3] If "DT24, DT25", "DT38, DT39", and "DT40, DT41" match the searched data, the following occurs.
15.27 F230 TMSEC (Time data to second conversion) 15.27 F230 TMSEC (Time data to second conversion) Converts the specified time of day data (year, month, day, hour, minute, second) into number of seconds. ■ Instruction format ■ Operands Items Settings Area storing the data to be converted, or constant data Area to store the conversion result ■...
Page 453
15.27 F230 TMSEC (Time data to second conversion) Time data (S) (BCD) (Higher) (Lower) Minutes (H00 to H59) Seconds (H00 to H59) S+1: Day (H01 to H31) Hour (H01 to H23) S+2: Year (H00 to H99) Month (H00 to H12) Seconds data (D) (32-bit integer) (Higher) Seconds data...
Page 454
15.27 F230 TMSEC (Time data to second conversion) Time data (S) Second data (D) '01/01/01 01:00:00 H00000E10 '01/01/01 00:00:00 H00015180 2099 '99/12/31 23:59:59 HBA368E7F 2100 '00/01/01 00:00:00 HBA368E80 2100 '00/12/31 23:59:59 HBC19137F ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. Turns ON when a value other than BCD is specified for [S] R9007 R9008...
15.28 F231 SECTM (Second to Time Data Conversion) 15.28 F231 SECTM (Second to Time Data Conversion) The specified number of seconds is changed into time data (year/month/day/hour/minute/ second). ■ Instruction format ■ Operands Items Settings Area storing the number of seconds (32 bits) Starting area storing the time data ■...
Page 456
15.28 F231 SECTM (Second to Time Data Conversion) Seconds data (S) (32 -bit integer) (Lower) Seconds data (H00000000 to HBC19137F) (Higher) S+1: Time of day data (D) (BCD) (Higher) (Lower) Minutes (H00 to H59) Seconds (H00 to H59) D+1: Day (H01 to H31) Hour (H01 to H23) D+2: Year (H00 to H99)
Page 457
15.28 F231 SECTM (Second to Time Data Conversion) Second data (D) Time data (S) H00000E10 '01/01/01 01:00:00 H00015180 '01/01/01 00:00:00 HBA368E7F '99/12/31 23:59:59 2099 HBA368E80 '00/01/01 00:00:00 2100 HBC19137F '00/12/31 23:59:59 2100 ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. R9007 Turns ON when the number of seconds [S] is [S]≥HBC191380 (number of seconds in 100 R9008...
15.29 F235 GRY (16-bit Data to Gray Code Conversion) 15.29 F235 GRY (16-bit Data to Gray Code Conversion) Converts the specified 16-bit data to gray code. ■ Instruction format ■ Operands Items Settings Area storing the data to be converted, or constant data Area to store the conversion result ■...
15.30 F236 DGRY (32-bit Data to Gray Code Conversion) 15.30 F236 DGRY (32-bit Data to Gray Code Conversion) Converts specified 32-bit data to gray code. ■ Instruction format ■ Operands Items Settings Area (two word) storing the data to be converted, or constant data Area (two word) to store the conversion result ■...
15.31 F237 GBIN (Gray Code to 16-bit Data Conversion) 15.31 F237 GBIN (Gray Code to 16-bit Data Conversion) Converts the gray code in the specified area to 16-bit binary data. ■ Instruction format ■ Operands Items Settings Area storing the data to be converted, or constant data Area to store the conversion result ■...
15.32 F238 DGBIN (Gray Code to 32-bit Data Conversion) 15.32 F238 DGBIN (Gray Code to 32-bit Data Conversion) The gray code in the specified area is converted to 32-bit binary data. ■ Instruction format ■ Operands Items Settings Area (two word) storing the data to be converted, or constant data Area (two words) to store the conversion result ■...
15.33 F240 COLM (Bit Line to Bit Column Conversion) 15.33 F240 COLM (Bit Line to Bit Column Conversion) Converts a bit line to a bit column. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Area storing the bit position specification, or constant data Starting address of the area that will be overwritten by the bit column ■...
Page 464
15.33 F240 COLM (Bit Line to Bit Column Conversion) e.g. When the specified bit position n = 10 (K10) ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON if 0 ≤ [n] ≤ 15 is not true (ER) Turns ON when the conversion result exceeds the area specified by [D] when stored 15-78...
15.34 F241 LINE (Bit Column to Bit Line Conversion) 15.34 F241 LINE (Bit Column to Bit Line Conversion) Converts a bit column to a bit line. ■ Instruction format ■ Operands Items Settings Starting address of area where bit column will be read Area storing the bit position specification, or constant data Area to store the conversion result ■...
Page 466
15.34 F241 LINE (Bit Column to Bit Line Conversion) e.g. When the specified bit position n = 10 (K10) ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON if 0 ≤ [n] ≤ 15 is not true (ER) Turns ON when the conversion range specified by [S] exceeds the area 15-80...
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.1 F100 SHR (16-bit Data Right Shift) 16.1 F100 SHR (16-bit Data Right Shift) Shifts 16-bit data to the right by a specified number of bits. ■ Instruction format ■ Operands Items Settings Area storing the 16-bit data to be shifted Area storing the number of bits to be shifted, or constant data ■...
Page 469
16.1 F100 SHR (16-bit Data Right Shift) (Note 1) The bits marked with - are invalid. ■ Operation example Operation of instruction format description program Shifts the content of DT0 four bits to the right when internal relay R0 turns ON. The content of bit 3 before the shift is stored in the CY (carry) flag.
16.2 F101 SHL (16-bit Data Left Shift) 16.2 F101 SHL (16-bit Data Left Shift) Shifts 16-bit data to the left by the specified number of bits. ■ Instruction format ■ Operands Items Settings Area storing the 16-bit data to be shifted Area storing the number of bits to be shifted, or constant data ■...
Page 471
16.2 F101 SHL (16-bit Data Left Shift) (Note 1) The bits marked with - are invalid. ■ Operation example Operation of instruction format description program When internal relay R0 turns ON, the content of DT0 shifts four bits to the left. The content of bit 12 before the shift is stored in the CY (carry) flag.
16.3 F102 DSHR (32-bit Data Right Shift) 16.3 F102 DSHR (32-bit Data Right Shift) Shifts 32-bit data (double-word data) n bits to the right. ■ Instruction format ■ Operands Items Settings Area storing the double-word data to be shifted (two words) Area storing the number of bits to be shifted, or constant data ■...
Page 473
16.3 F102 DSHR (32-bit Data Right Shift) ● For [n], only the lower 8 bits of the 16-bit data are valid. The shift amount can be selected from 1 bit to 255 bits. (Note 1) The bits marked with - are invalid. ●...
16.4 F103 DSHL (32-bit Data Left Shift) 16.4 F103 DSHL (32-bit Data Left Shift) Shifts 32-bit data (double-word data) n bits to the left. ■ Instruction format ■ Operands Items Settings Area storing the double-word data to be shifted (two words) Area storing the number of bits to be shifted, or constant data ■...
Page 475
16.4 F103 DSHL (32-bit Data Left Shift) ● For [n], only the lower 8 bits of the 16-bit data are valid. The shift amount can be selected from 1 bit to 255 bits. (Note 1) The bits marked with - are invalid. ●...
16.5 F105 BSR (16-bit Data 1-Digit Right Shift) 16.5 F105 BSR (16-bit Data 1-Digit Right Shift) Shifts 16-bit data one digit (four bits) to the right. ■ Instruction format ■ Operands Items Settings Area storing the 16-bit data to be shifted ■...
Page 477
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. ■...
16.6 F106 BSL (16-bit Data 1-Digit Left Shift) 16.6 F106 BSL (16-bit Data 1-Digit Left Shift) Shifts 16-bit data one digit (four bits) to the left. ■ Instruction format ■ Operands Items Settings Area storing the 16-bit data to be shifted ■...
Page 479
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. ■...
16.7 F108 BITR (Block Area Bitwise Right Shift) 16.7 F108 BITR (Block Area Bitwise Right Shift) Shifts a block area to the right in bit units. ■ Instruction format ■ Operands Items Settings Starting address of the area to be shifted Ending address of the area to be shifted Area storing the number of bits to be shifted, or constant data ■...
Page 481
16.7 F108 BITR (Block Area Bitwise Right Shift) ● When the data is shifted to the right, 1. the lower n bits of [D1] before the shift are shifted out. 2. After the shift, the upper n bits of [D2] are filled with 0. ●...
16.8 F109 BITL (Block Area Bitwise Left Shift) 16.8 F109 BITL (Block Area Bitwise Left Shift) Shifts a block area left in bit units. ■ Instruction format ■ Operands Items Settings Starting address of the area to be shifted Ending address of the area to be shifted Area storing the number of bits to be shifted, or constant data ■...
Page 483
16.8 F109 BITL (Block Area Bitwise Left Shift) ● When the data is shifted to the left, 1. the upper n bits of [D2] before the shift are shifted out. 2. After the shift, the lower n bits of [D1] are filled with 0. ●...
16.9 F110 WSHR (Block Area 1 Word Right Shift) 16.9 F110 WSHR (Block Area 1 Word Right Shift) Shifts the specified data range one word to the right. ■ Instruction format ■ Operands Items Settings Starting address of the area to be shifted Ending address of the area to be shifted ■...
Page 485
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 H0212 H0030 H0232...
16.10 F111 WSHL (Block Area 1 Word Left Shift) 16.10 F111 WSHL (Block Area 1 Word Left Shift) Data in the specified range is shifted one word to the left. ■ Instruction format ■ Operands Items Settings Starting address of the area to be shifted Ending address of the area to be shifted ■...
Page 487
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 Shift width = 3 words H0212 H0030 H0232...
16.11 F112 WBSR (Block Area 1 Digit Right Shift) 16.11 F112 WBSR (Block Area 1 Digit Right Shift) Data in the specified range is shifted 1 digit to the right. ■ Instruction format ■ Operands Items Settings Starting address of the area to be shifted Ending address of the area to be shifted ■...
Page 489
16.11 F112 WBSR (Block Area 1 Digit Right Shift) ■ Operation example Operation of instruction format description program When internal relay R0 is ON, 10 word data of DT0 to DT9 is shifted 1 digit to the right. Shift width 10 words = 40 digits 0 2 1 2 0 0 3 0 0 2 3 2 Shifted out...
16.12 F113 WBSL (Block Area 1 Digit Left Shift) 16.12 F113 WBSL (Block Area 1 Digit Left Shift) Shifts data in a specified range one digit to the left. ■ Instruction format ■ Operands Items Settings Starting address of the area to be shifted Ending address of the area to be shifted ■...
Page 491
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.
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.1 F120 ROR (16-Bit Data Rotation to the Right) 17.1 F120 ROR (16-Bit Data Rotation to the Right) Rotates the specified 16-bit data to the right. ■ Instruction format ■ Operands Items Settings Area targeted for rotation Area storing the number of bits specified to be rotated, or constant data ■...
Page 495
17.1 F120 ROR (16-Bit Data Rotation to the Right) (Note 1) The bits marked with - are invalid. ■ Operation example Operation of instruction format description program When internal relay R0 turns ON, the content of data register DT0 is rotated 4 bits to the right. ■...
17.2 F121 ROL (16-Bit Data Rotation to the Left) 17.2 F121 ROL (16-Bit Data Rotation to the Left) Rotates the specified 16-bit data to the left. ■ Instruction format ■ Operands Items Settings Area targeted for rotation Area storing the number of bits specified to be rotated, or constant data ■...
Page 497
17.2 F121 ROL (16-Bit Data Rotation to the Left) (Note 1) The bits marked with - are invalid. ■ Operation example Operation of instruction format description program When internal relay R0 turns ON, the content of data register DT0 is rotated 4 bits to the left. ■...
17.3 F122 RCR (16-bit Data Right Rotation with Carry) 17.3 F122 RCR (16-bit Data Right Rotation with Carry) Rotate 17 bits of data made up of the specified 16-bit data and the carry flag to the right. ■ Instruction format ■...
Page 499
17.3 F122 RCR (16-bit Data Right Rotation with Carry) (Note 1) The bits marked with - are invalid. ■ Operation example Operation of instruction format description program When internal relay R0 turns ON, the content of data register DT0 is rotated 4 bits to the right. (The CY value immediately before execution is assumed to be 1.) ■...
17.4 F123 RCL (16-bit Data Left Rotation with Carry) 17.4 F123 RCL (16-bit Data Left Rotation with Carry) Rotates 17-bit data, consisting of specified 16-bit data with carry flag data added, to the left. ■ Instruction format ■ Operands Items Settings Area targeted for rotation Area storing the number of bits specified to be rotated, or constant data...
Page 501
17.4 F123 RCL (16-bit Data Left Rotation with Carry) (Note 1) The bits marked with - are invalid. ■ Operation example Operation of instruction format description program When internal relay R0 turns ON, the content of data register DT0 is rotated 4 bits to the left. (The CY value immediately before execution is assumed to be 1.) ■...
17.5 F125 DROR [32-Bit Data Right Rotation] 17.5 F125 DROR [32-Bit Data Right Rotation] Rotates "n" bits of 32-bit data (double word data) to the right. ■ Instruction format ■ Operands Items Settings Area to be rotated (two words) Area storing the number of bits specified to be rotated, or constant data ■...
Page 503
17.5 F125 DROR [32-Bit Data Right Rotation] (Note 1) The bits marked with - are invalid. ● When [n] = K0, the contents of [D, D+1] and the CY flag do not change. ■ Operation example Operation of instruction format description program When the internal relay R0 turns ON, the contents of DT11 and DT10 are rotated 4 bits to the right.
17.6 F126 DROL (32-bit data left rotation) 17.6 F126 DROL (32-bit data left rotation) Rotates 32-bit data (double word data) n bits to the left. ■ Instruction format ■ Operands Items Settings Area to be rotated (two words) Area storing the number of bits specified to be rotated, or constant data ■...
Page 505
17.6 F126 DROL (32-bit data left rotation) (Note 1) The bits marked with - are invalid. ● When [n]=K0, the contents of [D, D+1] and the CY flag do not change. ■ Operation example Operation of instruction format description program When the internal relay R0 turns ON, the contents of DT11 and DT10 are rotated 4 bits to the left.
17.7 F127 DRCR (32-bit Data Right Rotation with Carry) 17.7 F127 DRCR (32-bit Data Right Rotation with Carry) Rotates 32-bit data (double-word data) n bits to the right together with carry data. ■ Instruction format ■ Operands Items Settings Area to be rotated (two words) Area storing the number of bits specified to be rotated, or constant data ■...
Page 507
17.7 F127 DRCR (32-bit Data Right Rotation with Carry) (Note 1) The bits marked with - are invalid. ● When [n] = K0, the contents of [D, D+1] and the CY flag do not change. ■ Operation example Operation of instruction format description program When internal relay R10 turns ON, the contents of DT11 and DT10 are rotated 4 bits to the right.
17.8 F128 DRCL (32-bit Data Left Rotation with Carry) 17.8 F128 DRCL (32-bit Data Left Rotation with Carry) Rotates 32-bit data (double-word data) n bits to the left with carry data. ■ Instruction format ■ Operands Items Settings Area to be rotated (two words) Area storing the number of bits specified to be rotated, or constant data ■...
Page 509
17.8 F128 DRCL (32-bit Data Left Rotation with Carry) (Note 1) The bits marked with - are invalid. ● When [n] = K0, the contents of [D, D+1] and the CY flag do not change. ■ Operation example Operation of instruction format description program When the internal relay R0 turns ON, the contents of DT11 and DT10 are rotated 4 bits to the left.
18.1 F98 CMPR (Compress Shift Read) 18.1 F98 CMPR (Compress Shift Read) Reads the data at the highest address in the specified range and compresses the data upward. ■ Instruction format ■ Operands Items Settings Starting address of specified range Final address of specified range Area storing read data ■...
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]. ■...
Page 514
18.1 F98 CMPR (Compress Shift Read) 2. Executing the F98 CMPR instruction When data at the final address of the buffer (the area of the specified range) is read, data can be extracted in sequential order, starting from the oldest data. Any remaining data in the buffer is shifted in the direction of the higher addresses, so the oldest data at any point will always be stored at the final address.
Page 515
18.1 F98 CMPR (Compress Shift Read) ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when [D1] > [D2] (ER) Turns ON when [D1] and [D2] are not the same type of area WUMJ-FP0HPGR-091 18-5...
18.2 F99 CMPW (Compress Shift Write) 18.2 F99 CMPW (Compress Shift Write) Writes data to the starting address in the specified range, and compresses the data upward. ■ Instruction format ■ Operands Items Settings Area storing the hexadecimal data or constant data Starting address of specified range Final address of specified range ■...
Page 517
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. ■...
Page 518
18.2 F99 CMPW (Compress Shift Write) 2. Executing the F98 CMPR instruction When data at the final address of the buffer (the area of the specified range) is read, data can be extracted in sequential order, starting from the oldest data. Any remaining data in the buffer is shifted in the direction of the higher addresses, so the oldest data at any point will always be stored at the final address.
Page 519
18.2 F99 CMPW (Compress Shift Write) ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when [D1] > [D2] (ER) Turns ON when [D1] and [D2] are not the same type of area WUMJ-FP0HPGR-091 18-9...
18.3 How to Use the FIFO (First-in First-out) Buffer 18.3 How to Use the FIFO (First-in First-out) Buffer The FIFO buffer is a buffer area that stores data in the order it is written, and starts reading in order from the first data stored. It is convenient to use the FIFO buffer as a record of the order of objects on a conveyor line or buffer line.
18.4 F115 FIFT (FIFO Buffer Definition) 18.4 F115 FIFT (FIFO Buffer Definition) Defines the start and size of the FIFO buffer area. ■ Instruction format ■ Operands Items Settings Area storing the size (number of words) of the FIFO buffer, or constant data Starting address for the FIFO buffer area ■...
Page 522
18.4 F115 FIFT (FIFO Buffer Definition) FIFO buffer size (n) Store data count (words) FIFO pointer Data storage area Write pointer (n words) (0 to 255/H00 to HFF) Read pointer (0 to 255/H00 to HFF) D+2+n ● When the F115 FIFT instruction is executed, the following are stored as default values: [D] = n (the value specified by the F115 FIFT instruction), [D+1] = K0 and [D+2] = H0000.
Page 523
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 WUMJ-FP0HPGR-091 18-13...
18.5 F116 FIFR (FIFO Data Read) 18.5 F116 FIFR (FIFO Data Read) Reads the data from the specified FIFO buffer. ■ Instruction format ■ Operands Items Settings Starting address for the FIFO buffer area Area storing the data read from the FIFO buffer ■...
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. ▶ is the read pointer. (Note 3) ● 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.
Page 526
18.5 F116 FIFR (FIFO Data Read) [When the read pointer is 2] (H0204) K100 Read pointer K101 DT100 K102 K103 Write pointer FIFR execution Store count (H0304) K100 K101 DT100 K102 K102 K103 Read 1. The content of DT5 indicated by read pointer 2 is transferred to DT100. 2.
Page 527
18.5 F116 FIFR (FIFO Data Read) F115 FIFT K256 FIFO definition R9010 Check storage F60 CMP data count R900B F116 FIFR 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...
18.6 F117 FIFW (FIFO Data Write) 18.6 F117 FIFW (FIFO Data Write) Writes data to the specified FIFO buffer. ■ Instruction format ■ Operands Items Settings Area storing the 16-bit data to write to the FIFO buffer, or constant data Starting address for the FIFO buffer area ■...
Page 529
18.6 F117 FIFW (FIFO Data Write) FIFO buffer size (n) Store data count (words) (Low) write pointer Write pointer Data storage area (n-2) (n-1) (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. ●...
Page 530
18.6 F117 FIFW (FIFO Data Write) When the write pointer is 3 Write pointer (H0003) Read pointer K100 K101 DT110 K102 K103 K500 Write Write pointer FIFW execution Store count (H0004) K100 K101 DT110 K102 K103 K103 Move write pointer 1.
Page 531
18.6 F117 FIFW (FIFO Data Write) Example: If the write pointer is at the end of the FIFO buffer Read pointer K100 K101 K102 K103 K104 Write FIFW execution Store count Write pointer K100 K101 K102 Move write pointer K103 K104 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).
Page 532
18.6 F117 FIFW (FIFO Data Write) Example: When the write pointer has made one complete cycle Read pointer K100 K101 Write K102 K103 K105 K104 FIFW execution K100 Write pointer 1 cycle K101 K102 K103 K104 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.
Page 533
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. Turns ON when the size (n) of the FIFO specified by [D] is n = 0, or when n > 256 R9007 R9008 Turns ON when the number of stored data items of the FIFO is larger than the FIFO size...
Page 534
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 WUMJ-FP0HPGR-091...
19.1 F130 BTS (Specified Bit Set) 19.1 F130 BTS (Specified Bit Set) Turns a bit of the specified 16-bit data ON. ■ Instruction format ■ Operands Items Settings Area in which bit is to be set Area storing position of bit to be set, or constant data ■...
Page 537
19.1 F130 BTS (Specified Bit Set) ■ Flag operations Name Description R9007 R9008 Turns ON when the area is exceeded in index modification. (ER) WUMJ-FP0HPGR-091 19-3...
19.2 F131 BTR (Specified Bit Reset) 19.2 F131 BTR (Specified Bit Reset) Turns OFF a specified bit of 16-bit data. ■ Instruction format ■ Operands Items Settings Area where the bit will be reset Area storing the specification of the bit position to be reset, or constant data ■...
Page 539
19.2 F131 BTR (Specified Bit Reset) ■ Flag operations Name Description R9007 R9008 Turns ON when the area is exceeded in index modification. (ER) WUMJ-FP0HPGR-091 19-5...
19.3 F132 BTI (Specified Bit Inversion) 19.3 F132 BTI (Specified Bit Inversion) Inverts a specific bit in 16-bit data. ■ Instruction format ■ Operands Items Settings Target area for bit inversion Area storing the number of the bit to be inverted, or constant data ■...
Page 541
19.3 F132 BTI (Specified Bit Inversion) ■ Flag operations Name Description R9007 R9008 Turns ON when the area is exceeded in index modification. (ER) WUMJ-FP0HPGR-091 19-7...
19.4 F133 BTT (Specified Bit Test) 19.4 F133 BTT (Specified Bit Test) Tests the specified bit in the specified 16-bit data (to determine whether it is ON or OFF). ■ Instruction format F133 BTT R900B ■ Operands Items Settings Target area for bit test Area storing the numbers of the bits to be tested, or constant data ■...
Page 543
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.
19.5 F135 BCU (Count ON Bits in 16-bit Data) 19.5 F135 BCU (Count ON Bits in 16-bit Data) Counts the number of ON bits in the specified 16-bit data. ■ Instruction format ■ Operands Items Settings Area storing the 16-bit data subject to the bit count, or constant data Area storing the number of ON bits ■...
Page 545
19.5 F135 BCU (Count ON Bits in 16-bit Data) Name Description (ER) WUMJ-FP0HPGR-091 19-11...
19.6 F136 DBCU (Count ON Bits in 32-bit Data) 19.6 F136 DBCU (Count ON Bits in 32-bit Data) Counts the number of ON bits in the specified 32-bit data. ■ Instruction format ■ Operands Items Settings Area storing the 32-bit data subject to the bit count, or constant data Area storing the number of ON bits ■...
Page 547
19.6 F136 DBCU (Count ON Bits in 32-bit Data) Name Description R9008 (ER) WUMJ-FP0HPGR-091 19-13...
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-9 20.7 F148 ERR (Self-Diagnostic Error Set) ..........20-14 20.8 F149 MSG (Character Send to Programming Tool)......20-16...
20.1 F138 HMSS (Hour, Minute, Second Data to Second Data Conversion) 20.1 F138 HMSS (Hour, Minute, Second Data to Second Data Conversion) Converts data representing hours, minutes, and seconds into data representing seconds. ■ Instruction format ■ Operands Items Settings Starting address of the area storing the two-word data representing hours/minutes/seconds Starting address of the area storing the conversion result (second data) ■...
Page 551
20.1 F138 HMSS (Hour, Minute, Second Data to Second Data Conversion) • is composed of 2-word BCD (H constant, maximum 8-digit) data. • It is stored as shown below. Seconds (H00000000 to H99999999) e.g. 35,999,999 seconds D = H9999 D+1 = H3599 Note: As the maximum time data that can be specified is 9999 hours, 59 minutes, and 59 seconds, the actual maximum value for the seconds that will be stored in [D] is 35,999,999 seconds.
20.2 F139 SHMS (Second Data to Hour, Minute, Second Data Conversion) 20.2 F139 SHMS (Second Data to Hour, Minute, Second Data Conversion) Converts data representing seconds (up to 8 digits) to data representing hours, minutes, and seconds. ■ Instruction format ■...
Page 553
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.
20.3 F140 STC (Cy Flag Set) 20.3 F140 STC (Cy Flag Set) Turns the CY flag ON. ■ Instruction format ■ Outline of operation The CY (carry) flag (R9009) is turned ON. ■ Flag operations Name Description R9009 Turns ON after this instruction is executed (CY) 20-6 WUMJ-FP0HPGR-091...
20.4 F141 CLC (Cy Flag Clear) 20.4 F141 CLC (Cy Flag Clear) Turns the CY flag OFF. ■ Instruction format ■ Outline of operation The CY (carry) flag (R9009) is turned OFF. ■ Flag operations Name Description R9009 Turns OFF after this instruction is executed (CY) WUMJ-FP0HPGR-091 20-7...
20.5 F143 IORF (Partial I/O refresh) 20.5 F143 IORF (Partial I/O refresh) The input or output of a specified range is refreshed. ■ Instruction format Input refresh F143 IORF Output refresh F143 IORF ■ Operands Items Settings The starting word no. of the I/O to be refreshed. The ending word no.
20.6 F147 PR (Printout) 20.6 F147 PR (Printout) Outputs text data (ASCII codes) to the printer. ■ Instruction format F147 PR R9033 PR instruction executing flag ■ Operands Items Settings Starting address of the area storing printout data (ASCII codes) Area for output of printout data ■...
Page 558
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.
Page 559
20.6 F147 PR (Printout) ■ Data setting Set the data to be printed out in order from the lower byte of the first word. <Example> Outputting 10 characters"ABCDEFGHIJ"to a printer ■ Printer output using eight-point output ● When only eight output points are being used, connections should be made as shown below, and the program should be set up so that the strobe signal is output from Y7.
Page 561
20.6 F147 PR (Printout) ■ Flag operations Name Description Turns ON when the six words starting with [S] exceed the range of the area R9007 R9008 Turns ON when another F147 (PR) instruction attempts execution while one F147 (PR) (ER) instruction is being executed WUMJ-FP0HPGR-091 20-13...
20.8 F149 MSG (Character Send to Programming Tool) 20.8 F149 MSG (Character Send to Programming Tool) Displays a message on the programming tool. ■ Instruction format ■ Operands Items Settings Message (character constant) ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
20.9 F150 READ (Shared Memory Read) 20.9 F150 READ (Shared Memory Read) Reads data from the memory of the intelligent unit. ■ Instruction format ■ Operands Items Settings Slot number and bank number specification Read start address of the intelligent unit memory Read word count Starting number of area storing read data ■...
Page 566
20.9 F150 READ (Shared Memory Read) Control unit Intelligent unit Control unit Four words ■ Specifying each item ● Specification of slot number and bank number [S1] Specify the slot where the intelligent unit is installed. If the memory has a bank, specify the bank number as well.
Page 567
20.9 F150 READ (Shared Memory Read) (higher byte) (lower byte) Slot no.: H00 to H1F (2) For intelligent units with banks Specify the slot number (H constant) where the target intelligent unit is installed and the bank number (H constant). (higher byte) (lower byte) Bank no.: H00 to HFF...
20.10 F151 WRT (Write to Shared Memory) 20.10 F151 WRT (Write to Shared Memory) Writes data into the memory in an intelligent unit. ■ Instruction format ■ Operands Items Settings Slot number and bank number specification Starting number of area storing the write data Number of words to be written Starting address for writing in the memory of the intelligent unit ■...
Page 569
20.10 F151 WRT (Write to Shared Memory) Control unit Control unit Intelligent unit 5 words DT10 DT11 DT12 DT13 DT14 ■ Specifying each item ● Specification of slot number and bank number [S1] Specify the slot where the intelligent unit is installed. If the memory has a bank, specify the bank number as well.
Page 570
20.10 F151 WRT (Write to Shared Memory) (2) For intelligent units with banks Specify the slot number (H constant) where the target intelligent unit is installed and the bank number (H constant). (higher byte) (lower byte) Bank no.: H00 to HFF Slot no.: H00 to H1F ■...
20.11 F157 CADD (Calendar Data Addition) 20.11 F157 CADD (Calendar Data Addition) Calculates the date and time after a specified amount of time (hours, minutes, and seconds) has elapsed since a certain date and time (year, month, day, hour, minute, second). ■...
Page 572
20.11 F157 CADD (Calendar Data Addition) <Time data> (Higher) (Lower) [S1] Minutes (H00 to H59) Seconds (H00 to H59) [S1+1] Day (H01 to H31) Hour (H01 to H23) [S1]+2 Year (H00 to H99) Month (H00 to H12) + (addition) <Time data> (Higher) (Lower) [S1]...
20.12 F158 CSUB (Calendar Data Subtraction) 20.12 F158 CSUB (Calendar Data Subtraction) Calculates the date and time a specified amount of time (hours, minutes, and seconds) before a certain date and time (year, month, day, hour, minute, second). ■ Instruction format ■...
Page 575
20.12 F158 CSUB (Calendar Data Subtraction) <Time data> (Higher) (Lower) [S1] Minutes (H00 to H59) Seconds (H00 to H59) [S1+1] Day (H01 to H31) Hour (H01 to H23) [S1+2] Year (H00 to H99) Month (H00 to H12) - (subtraction) <Time data> (Higher) (Lower) [S1]...
Page 577
20.12 F158 CSUB (Calendar Data Subtraction) 2 minutes, 15 seconds Start time 23rd day, 8 hours [S2] 1994, December Start time 30 minutes, 25 seconds [S2] 23rd day, 10 hours 1994, December The data to be subtracted is taken from the starting date and time data as is shown below. 2 minutes, 15 seconds 8 hours...
Page 578
20.12 F158 CSUB (Calendar Data Subtraction) Name Description Turns ON when the specified data exceeds the area 20-30 WUMJ-FP0HPGR-091...
20.13 F160 DSQR (32-bit Data Square Root) 20.13 F160 DSQR (32-bit Data Square Root) Calculates the square root of the specified 32-bit data. ■ Instruction format ■ Operands Items Settings Area storing the data for square root calculation, or constant data Area storing the calculated square root ■...
Page 580
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) 20-32 WUMJ-FP0HPGR-091...
21.1 F145 SEND / F146 RECV Instructions: Common Items (Serial Communication) 21.1 F145 SEND / F146 RECV Instructions: Common Items (Serial Communication) ■ System register settings Use tool software to set the communication mode of the COM port used. Mode System register No.
21.1 F145 SEND / F146 RECV Instructions: Common Items (Serial Communication) (Note 1) The numbers inside the parentheses indicate the serial numbers of devices that are compatible with the existing products FP0R, FP-X, and FPsigma. ■ Timeout period setting ● If the error code is H73, it means that a timeout has occurred while waiting for a response. ●...
21.2 F145 SEND [MEWTOCOL Master Send (Serial Communication)] 21.2 F145 SEND [MEWTOCOL Master Send (Serial Communication)] ■ Instruction format For Type without Ethernet Function For Type with Ethernet Function ● When using both the serial communication and Ethernet communication within a program, specify the serial communication port using the F469 (UNITSEL) instruction before executing the F145 (SEND) instruction.
Page 585
21.2 F145 SEND [MEWTOCOL Master Send (Serial Communication)] ■ Devices that can be specified (indicated by ●) Constant Index Operand modifier (Note 1) ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●...
Page 586
21.2 F145 SEND [MEWTOCOL Master Send (Serial Communication)] Destination unit number selection On unit firmware Ver. 1.8 or later, adding a specification of HEE (238) for the destination unit number allows for communication to be carried out regardless of destination unit number. ■...
Page 587
21.2 F145 SEND [MEWTOCOL Master Send (Serial Communication)] Name Description Turns ON when the [D] device No. is not 0. Turns ON when a communication cassette is not attached to the target COM port. WUMJ-FP0HPGR-091 21-7...
21.3 F146 REC [MEWTOCOL Master Receiver (Serial Communication)] 21.3 F146 REC [MEWTOCOL Master Receiver (Serial Communication)] ■ Instruction format For Type without Ethernet Function For Type with Ethernet Function ● When using both the serial communication and Ethernet communication within a program, specify the serial communication port using the F469 (UNITSEL) instruction before executing the F146 (RECV) instruction.
Page 589
21.3 F146 REC [MEWTOCOL Master Receiver (Serial Communication)] ■ Devices that can be specified (indicated by ●) Constant Index Operand modifier (Note 1) ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●...
Page 590
21.3 F146 REC [MEWTOCOL Master Receiver (Serial Communication)] Destination unit number selection On unit firmware Ver. 1.8 or later, adding a specification of HEE (238) for the destination unit number allows for communication to be carried out regardless of destination unit number. ■...
Page 591
21.3 F146 REC [MEWTOCOL Master Receiver (Serial Communication)] Name Description Turns ON when a communication cassette is not attached to the target COM port. WUMJ-FP0HPGR-091 21-11...
21.4 F145 SEND [MODBUS Master Send: Function Code Specification (Serial Communication)] 21.4 F145 SEND [MODBUS Master Send: Function Code Specification (Serial Communication)] ■ Instruction format For Type without Ethernet Function For Type with Ethernet Function ● When using both the serial communication and Ethernet communication within a program, specify the serial communication port using the F469 (UNITSEL) instruction before executing the F145 (SEND) instruction.
Page 593
21.4 F145 SEND [MODBUS Master Send: Function Code Specification (Serial Communication)] Constant Index Operand modifier (Note 1) ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● (Note 1) A character constant cannot be specified. ■...
Page 594
21.4 F145 SEND [MODBUS Master Send: Function Code Specification (Serial Communication)] ■ Specifying a COM port number for the F469 (UNITSEL) instruction (only for the type with Ethernet Function) Specifying HE in the upper four bits of [S1] of F145 (SEND) enables operand [S2] for the F469 (UNITSEL) instruction.
Page 595
21.4 F145 SEND [MODBUS Master Send: Function Code Specification (Serial Communication)] [F145(SEND), H1607, WR3, H7788, K1] (Note 1) Reads WR3 word data and sets it as write data. Command 15 (force multiple coils) ● Example 3) Transfer from COM1 of 64 bits of data from WR3 0th bit to WR6 Fth bit to bit address H7788 of unit number 7 [F145(SEND), H1507, WR3, H7788, K64] [S1]:...
Page 596
21.4 F145 SEND [MODBUS Master Send: Function Code Specification (Serial Communication)] Command 16 (preset multiple registers) ● Example 4) Transfer from COM1 of 3 words of data from DT3 to DT5 to address H7788 in unit number 7 [F145(SEND), H1607, DT3, H7788, K3] (Note 1) If multiple points are specified for n, the command will be corrected automatically.
21.5 F146 RECV [MODBUS Master Receiver: Function Code Specification (Serial Communication)] 21.5 F146 RECV [MODBUS Master Receiver: Function Code Specification (Serial Communication)] ■ Instruction format For Type without Ethernet Function For Type with Ethernet Function ● When using both the serial communication and Ethernet communication within a program, specify the serial communication port using the F469 (UNITSEL) instruction before executing the F146 (RECV) instruction.
Page 599
21.5 F146 RECV [MODBUS Master Receiver: Function Code Specification (Serial Communication)] [S2] of F469 (UNITSEL) Port number COM0 COM1 COM2 ■ MODBUS command specification example Command 01 (read coil state) ● Example 1) Reading 1 bit from unit number 17 bit address H7788 connected to COM1, and writing to master unit DT100 bit 0 [F146(RECV), H1111, H7788, K1, DT100] ●...
Page 600
21.5 F146 RECV [MODBUS Master Receiver: Function Code Specification (Serial Communication)] Command 02 (read input state) ● Example 3) Reading 1 bit from unit number 17 bit address H7788 connected to COM1, and writing to master unit DT100 bit 0 [F146(RECV), H1211, H7788, K1, DT100] ●...
Page 601
21.5 F146 RECV [MODBUS Master Receiver: Function Code Specification (Serial Communication)] Command 04 (read input register) ● Example 6) Reading 6 words from unit number 17 address H7788 connected to COM1, and writing to master unit starting at DT100 [F146(RECV), H1411, H7788, K6, DT100] ■...
21.6 F145 SEND [MODBUS Master Send: No Function Code Specification (Serial Communication)] 21.6 F145 SEND [MODBUS Master Send: No Function Code Specification (Serial Communication)] ■ Instruction format For Type without Ethernet Function For Type with Ethernet Function ● When using both the serial communication and Ethernet communication within a program, specify the serial communication port using the F469 (UNITSEL) instruction before executing the F145 (SEND) instruction.
Page 603
21.6 F145 SEND [MODBUS Master Send: No Function Code Specification (Serial Communication)] ■ Devices that can be specified (indicated by ●) Constant Index Operand modifier (Note 1) ● ● ● ● ● ● ● ● ● ● ● ● ● ●...
Page 604
[S2] of F469 (UNITSEL) Port number COM0 COM1 COM2 ● This is convenient to write data into Panasonic’s PLC via MODBUS RTU. ● For MODBUS reference Nos. and device Nos., see "Device No. Correspondence Table". ■ MODBUS command specification example Sending command 05 (single Y/R write) ●...
Page 605
21.6 F145 SEND [MODBUS Master Send: No Function Code Specification (Serial Communication)] [S1+1]: DT11 H0 fixed COM port selection Unit no. (H00 to H63) (0 to 99) [S1]: DT10 (DT10=8100H, DT11=1007H) MODBUS command [S2]: WR3 (WR3=0007H) Slave address [D]: WY0 [n]: K1 Command (05H) Coil number (H)
Page 606
21.6 F145 SEND [MODBUS Master Send: No Function Code Specification (Serial Communication)] [F145(SEND), DT10, WR3, WY0, K0] [S1]: DT10 Transfer in Specifies the send word units word count (H1 to H7F) [S1+1]: DT11 H0 fixed COM port selection Unit no. (H00 to H63) (0 to 99) [S1]: DT10 (DT10=0004H, DT11=1007H) [S2]: WR3 (WR3=3210H...
Page 607
21.6 F145 SEND [MODBUS Master Send: No Function Code Specification (Serial Communication)] [S1]: DT11 H0 fixed Unit no. (H00 to H63) COM port selection (0 to 99) [S1]: DT10 (DT10=0003H, DT11=1007H) [S2]: WR3 (WR3=0011H MODBUS command WR4=2233H Slave address WR5=4455H) [D]: DT0 Command (10H) [n]: K500...
21.7 F146 RECV [MODBUS Master Receiver: No Function Code Specification (Serial Communication)] 21.7 F146 RECV [MODBUS Master Receiver: No Function Code Specification (Serial Communication)] ■ Instruction format For Type without Ethernet Function For Type with Ethernet Function ● When using both the serial communication and Ethernet communication within a program, specify the serial communication port using the F469 (UNITSEL) instruction before executing the F146 (RECV) instruction.
Page 609
21.7 F146 RECV [MODBUS Master Receiver: No Function Code Specification (Serial Communication)] ■ Devices that can be specified (indicated by ●) Constant Index Operand modifier (Note 1) ● ● ● ● ● ● ● ● ● ● ● ● ● ●...
Page 610
S1=K0 (serial communication port) and S2=K1 (COM1). [S2] of F469 (UNITSEL) Port number COM0 COM1 COM2 ● This is convenient to read data from Panasonic PLC via MODBUS-RTU. ● For MODBUS reference Nos. and device Nos., see "Device No. Correspondence Table". ■ MODBUS command specification example Sending command 01 (Y/R coil read) ●...
Page 611
21.7 F146 RECV [MODBUS Master Receiver: No Function Code Specification (Serial Communication)] [F146(RECV), DT10, WY0, K1, DT100] [S1]: DT10 H0 fixed Transfer in Master unit bit no. Partner unit bit no. bit units (H0 to HF) (H0 to HF) (Note 1) When reading only 1 bit with command 01, set [S1] transfer method specification to bit units (H8).
Page 612
21.7 F146 RECV [MODBUS Master Receiver: No Function Code Specification (Serial Communication)] Sending command 02 (X contact reading) ● Example 3) Sending command from COM1 to read 1 bit (X17) from destination unit number 17 and to transfer read bit data to 5th bit of master unit DT100 [F146(RECV), DT10, WX0, K1, DT100] [S1]: DT10...
Page 613
21.7 F146 RECV [MODBUS Master Receiver: No Function Code Specification (Serial Communication)] (Note 1) When reading word units with command 02, set [S1] transfer method specification to bit units (H0). (Note 2) The read start number specifies the read location coil number. (Destination unit: X10) (Note 3) The read number will be the specified number of words ×...
Page 614
21.7 F146 RECV [MODBUS Master Receiver: No Function Code Specification (Serial Communication)] [S1+1]: DT11 H0 fixed COM port selection Unit no. (H01 to H63) (1 to 99) [S1]: DT10 (DT10=0006H, DT11=1011H) MODBUS command [S2]: WL0 Slave address [n]: K20 [D]: DT100 Command (04H) Read start number (H) Read start number (L)
Page 615
21.7 F146 RECV [MODBUS Master Receiver: No Function Code Specification (Serial Communication)] ■ 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 F159 MTRN [General-purpose Communication Instructions (Serial Communication)] 21.8 F159 MTRN [General-purpose Communication Instructions (Serial Communication)] ■ Instruction format For Type without Ethernet Function For Type with Ethernet Function ● When using both the serial communication and Ethernet communication within a program, specify the serial communication port using the F469 (UNITSEL) instruction before executing the F159 (MTRN) instruction.
Page 617
21.8 F159 MTRN [General-purpose Communication Instructions (Serial Communication)] ■ 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. Items Description In the data register starting with [S], data to be sent to an external device is set as a table in Send advance.
Page 618
21.8 F159 MTRN [General-purpose Communication Instructions (Serial Communication)] [D] Port number COM0 COM1 COM2 Port number specified for the F469 (UNITSEL) instruction ■ Creation of send data table [S] ● Send data is stored as follows in a given memory area (e.g. data register DT). The number of send data bytes [n] is automatically added to the starting word.
Page 619
21.8 F159 MTRN [General-purpose Communication Instructions (Serial Communication)] ■ Operations when data is received When the reception done flag is OFF, operation takes place as follows when data is sent from an external device. Items Description Received data is stored in the receive buffer area (two words) in low byte order. Storage of receive The terminator of the received data is stored in the receive buffer after removing data...
Page 620
21.8 F159 MTRN [General-purpose Communication Instructions (Serial Communication)] Example 2 Send data: ABCDEFGH+CR+LF ● When data with CR+LF as terminator is received, send data with a size that is smaller by more than one byte than the receive buffer capacity. ■...
SEND / RECV done flag turns ON. Also, an error code is stored in the SEND / RECV done code. For details of error codes, refer to the following table. ● To communicate with FP0H or FP7, specify"H1"for the partner station number. The destination is determined by the IP address.
Page 623
22.1 F145 SEND/F146 RECV Common Instruction Items (Ethernet Communication) ■ Special relays / special data registers User connection Name SEND / RECV instruction R9363 R936B R9373 R937B R9383 R938B R9393 R939B R9403 executable flag SEND / RECV R9364 R936C R9374 R937C R9384 R938C...
22.2 F145 SEND [Data Send Instruction (MEWTOCOL Master)] 22.2 F145 SEND [Data Send Instruction (MEWTOCOL Master)] ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No. 1) using F469 (UNITSEL) instruction. ■...
Page 625
22.2 F145 SEND [Data Send Instruction (MEWTOCOL Master)] Transfer in word units [S1]: Transfer in Specify the number of sent words word units MEWTOCOL-COM:H001 to H1FB(1 to 507) MEWTOCOL-DAT:H001 to H3FC(1 to 1020) Transfer in bit units [S1]: H0 fixed Transfer in Destination bit no.
Page 626
22.2 F145 SEND [Data Send Instruction (MEWTOCOL Master)] Name Description When the device number of [D] is not 0 Word unit ● When [n] is not in the range from 0 to 99999 when [D] is DT/LD ● When [n] is not in the range from 0 to 9999 when [D] is WY/WR/WL/SV/EV Bit unit ●...
22.3 F146 RECV [Data Receive Instruction (MEWTOCOL Master)] 22.3 F146 RECV [Data Receive Instruction (MEWTOCOL Master)] ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No. 1) using F469 (UNITSEL) instruction. ■...
Page 628
22.3 F146 RECV [Data Receive Instruction (MEWTOCOL Master)] Specify data quantity in the case of transmission in word units, and specify the location of target bits in the case of transmission in bit units. Transfer in word units [S1]: Specify the number of received words Transfer in MEWTOCOL-COM:H001 to H1FD(1 to 509)...
Page 629
22.3 F146 RECV [Data Receive Instruction (MEWTOCOL Master)] Name Description When the [S2] or [D] area is exceeded, if the number of words specified in [S1] is taken during transfer in word units When [S2]+[n] exceeds the [S2] area When the [S2] device number is not 0 Word unit ●...
22.4 F145 SEND [Data Send Instruction (MODBUS Master: Function Code Specification)] 22.4 F145 SEND [Data Send Instruction (MODBUS Master: Function Code Specification)] ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No.
Page 631
22.4 F145 SEND [Data Send Instruction (MODBUS Master: Function Code Specification)] ● Send data specified by [S2] is sent to the MODBUS address specified by [D], using a MODBUS command. (MODBUS function code 05, 06) ■ [S1]: Specify the port number/sending command/partner unit ●...
22.5 F146 RECV [Data Receive Instruction (MODBUS Master: Function Code Specification)] 22.5 F146 RECV [Data Receive Instruction (MODBUS Master: Function Code Specification)] ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No.
Page 633
22.5 F146 RECV [Data Receive Instruction (MODBUS Master: Function Code Specification)] ■ [S1]: Specify the port number/sending command/partner unit ● Specify a COM port As a LAN port, specify HE (Ethernet communication). ● Set a sending command H1, H2, H3 or H4 can be specified. H1: Read coil state (01) H2: Read input state (02) H3: Read hold register (03)
22.6 F145 SEND [Data Send Instruction (MODBUS Master: No Function Code Specification)] 22.6 F145 SEND [Data Send Instruction (MODBUS Master: No Function Code Specification)] ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No.
Page 635
22.6 F145 SEND [Data Send Instruction (MODBUS Master: No Function Code Specification)] Specify data quantity in the case of transmission in word units, and specify the location of target bits in the case of transmission in bit units. Transfer in word units [S1]: Transfer in Specify the number of transferred words...
Page 636
22.6 F145 SEND [Data Send Instruction (MODBUS Master: No Function Code Specification)] Name Description When the device number of [D] is not 0 When the [D] area is DT during transfer in bit units When the operation mode of the specified user connection is other than MODBUS-TCP 22-16 WUMJ-FP0HPGR-091...
Page 637
22.7 F146 RECV [Data Receive Instruction (MODBUS Master: No Function Code Specification)] 22.7 F146 RECV [Data Receive Instruction (MODBUS Master: No Function Code Specification)] ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No.
Page 638
22.7 F146 RECV [Data Receive Instruction (MODBUS Master: No Function Code Specification)] Specify data quantity in the case of transmission in word units, and specify the location of target bits in the case of transmission in bit units. Transfer in word units [S1]: Specify the number of received words Transfer in word units...
Page 639
22.7 F146 RECV [Data Receive Instruction (MODBUS Master: No Function Code Specification)] Name Description When the [S2] area is DT/WL/LD during transfer in bit units When the operation mode of the specified user connection is other than MODBUS-TCP WUMJ-FP0HPGR-091 22-19...
22.8 F145 SEND [Data Send Instruction (MC Protocol Master)] 22.8 F145 SEND [Data Send Instruction (MC Protocol Master)] ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No. 1) using F469 (UNITSEL) instruction. ■...
Page 641
22.8 F145 SEND [Data Send Instruction (MC Protocol Master)] ■ Specifying [S1] [S1]: Transfer units H0 fixed Specifies Ethernet H0: Bit data Master unit bit communication HF: Word data (H0 to HF) ● For bit data transfer, it is necessary to specify the bit No. of the master unit. ●...
Page 642
22.8 F145 SEND [Data Send Instruction (MC Protocol Master)] Code Timing of occurrence Command search: There is no command that matches the receive data command in the MC C059 protocol command table. C059 The subcommand is outside the specified range. C05B The device code is outside the specified range.
22.9 F146 RECV [Data Receive Instruction (MC Protocol Master)] 22.9 F146 RECV [Data Receive Instruction (MC Protocol Master)] ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No. 1) using F469 (UNITSEL) instruction. ■...
Page 644
22.9 F146 RECV [Data Receive Instruction (MC Protocol Master)] ■ Specifying [S1] [S1]: Transfer units H0 fixed Specifies Ethernet H0: Bit data Master unit bit communication HF: Word data (H0 to HF) ● For bit data transfer, it is necessary to specify the bit No. of the master unit. ●...
Page 645
22.9 F146 RECV [Data Receive Instruction (MC Protocol Master)] Device specified by [D] Transfer Number of sent Remarks method data [n] 1-Bit device: Bit transfer 1 to 4054 When the number of receive data is an odd number, a four-bit dummy X, Y, R, L code H0 is added.
22.10 F159 MTRN (General-purpose Communication Instruction) 22.10 F159 MTRN (General-purpose Communication Instruction) ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No. 1) using F469 (UNITSEL) instruction. ■ Operands Items Settings Starting area (data register) of the data table Area storing the number of bytes of data to be sent, or constant data...
22.10 F159 MTRN (General-purpose Communication Instruction) ■ Ethernet Settings ● It is necessary to set the operation mode setting to"General-Purpose Communication"in user connection settings. ● It is necessary to match the port No. and IP address with the connecting external device in user connection settings.
Page 648
22.10 F159 MTRN (General-purpose Communication Instruction) ■ Creation of send data table [S] Send data is stored as follows in a given memory area (e.g. data register DT). The number of send data bytes [n] is automatically added to the starting word. Sent data should be stored in [S +1] and after.
Page 649
22.10 F159 MTRN (General-purpose Communication Instruction) Stores the received byte count each time data is stored. DT200 DT201 H42(B) H41(A) H44(D) H43(C) DT202 Received data is stored in order from the lower byte. Binary data can also be received. H46(F) H45(E) DT203 DT204...
23.1 Sampling Trace 23.1 Sampling Trace This is a function used to sample the ON/OFF status of registered contacts and the data stored in the registers, either periodically or when the appropriate conditions have been established, and store the results in memory. This function can be used to confirm changes in the data. ●...
23.2 F155 SMPL (Sample Set Data) 23.2 F155 SMPL (Sample Set Data) Performs sampling when a sampling trace is executed. ■ Instruction format ■ Outline of operation ● During a sampling trace, sampling is performed on the specified data (contacts and registers), and the executed data content is stored in the sampling trace memory.
23.3 F156 STRG (Sampling Stop Trigger) 23.3 F156 STRG (Sampling Stop Trigger) Applies a stop command trigger during sampling trace execution. ■ Instruction format ■ Outline of operation ● This instruction applies a sampling trace stop command trigger. When the trigger is applied, the sampling trace is stopped after sampling of the specified delay count is performed.
24.1 [F0 MV] High-speed Counter Control Instruction 24.1 [F0 MV] High-speed Counter Control Instruction Performs the controls such as the software reset, disabling the count and clearing the high- speed counter instruction. ■ Instruction format DT90052 ( ) F0 MV DT90052 F0 MV ■...
Page 657
24.1 [F0 MV] High-speed Counter Control Instruction FP0H mode FPsigma mode ● 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.
24.2 F1 DMV (Pulse Output Elapsed Value Write/Read) 24.2 F1 DMV (Pulse Output Elapsed Value Write/Read) Writes and reads the elapsed value of the high-speed counter. ■ Instruction format F1 DMV K3000 DT90400 ( ) F1 DMV DT90400 DT100 ( )...
24.3 [F165 CAM0] High-speed Counter Cam Control Instruction 24.3 [F165 CAM0] High-speed Counter Cam Control Instruction Performs the cam output up to a maximum of 32 points (ON/OFF) according to the elapsed value of the high-speed counter. ■ Instruction format (...
Page 660
24.3 [F165 CAM0] High-speed Counter Cam Control Instruction ■ Upper limit control With the F165 (CAM0) instruction, the control with a specified upper limit can be performed. The settings for enabling/disabling the upper limit control and the upper limit are specified in the data table.
Page 661
24.3 [F165 CAM0] High-speed Counter Cam Control Instruction Operand Settings Description S+(m-1)x4+12 Settable range: (Note 4) Upper limit S+(m-1)x4+13 K1 to K2147483646 (H1 to H7FFFFFFE) (Note 1) When specifying the output relay (Y), values are also output to the CPU output as well as operation memories.
Page 662
24.3 [F165 CAM0] High-speed Counter Cam Control Instruction ON set value < OFF set value ON set value > OFF set value ON set value = OFF set value When the elapsed value is larger When the elapsed value is than or equal to the ON set value smaller than the ON set value and smaller than the OFF set...
Page 663
24.3 [F165 CAM0] High-speed Counter Cam Control Instruction ● For details of the allocations of I/O and flags, refer to "38.5.4 When Using High-speed Counter Function". ● For details of the FPsigma mode, refer to "38.6 FPsigma Mode". WUMJ-FP0HPGR-091 24-9...
24.4 [F166 HC1S] High-speed Counter Target Value Match ON Instruction [F167 HC1R] High-speed Counter Target Value Match OFF Instruction 24.4 [F166 HC1S] High-speed Counter Target Value Match ON Instruction [F167 HC1R] High-speed Counter Target Value Match OFF Instruction Turns on or off the specified output when the elapsed value of the high-speed counter matches the target value set by the operand.
Page 665
24.4 [F166 HC1S] High-speed Counter Target Value Match ON Instruction [F167 HC1R] High-speed Counter Target Value Match OFF Instruction ■ Precautions during programming ● The high-speed counter control flag turns on until the value matches the target value after the execution condition of the instruction has turned on. During this processing, the high- speed counter instruction F165 (CAM0)/F166 (HC1S)/F167 (HC1R) cannot be executed for the high-speed counter of the same channel.
For the output frequencies K70001 to K100000, Setting range: K0 to K1000 (0% to 100%) Channel nos. used for PWM output: FP0H mode: 0 (CH0: Y0), 1 (CH1: Y3), 2 (CH2: Y8), 3 (CH3: YB) FPsigma mode: 0 (CH0: Y0), 2 (CH2: Y3) ■...
Page 667
24.5 [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).
25.1 F95 ASC (Character Constant to ASCII Code Conversion) 25.1 F95 ASC (Character Constant to ASCII Code Conversion) Converts the specified character constants into ASCII codes. ■ Instruction format ■ Operands Items Settings Character constants (12 characters) Number at the start of the area storing the ACSII codes ■...
Page 673
25.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.
25.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion) 25.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 Control character string Starting number of area storing binary data Conversion method Starting number of the area storing the ASCII code of conversion result...
Page 676
25.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion) (Note 1) Details of normal and reverse directions are described later Specifying the conversion method [n] Example of converting 16-bit data (K1234 and K56) to decimal ASCII codes S2+1 ←Address of register F F C 8 0 4 D 2...
Page 677
25.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion) ● Number of digits in ASCII data When the number of digits of the ASCII data is larger than the converted result, a "_" (space) is stored before the data. •...
Page 678
25.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion) DT12,13 = K 56789 Number of converted data is "2", starting position for storage is "1", and size of the storage area is "7" ● Converting 16-bit data (H0123 and H89AB) to hexadecimal ASCII data DT10 = H 123 →...
Page 679
25.2 F250 BTOA (Multiple Binary Data to ASCII Data String Conversion) For the reverse direction (when "16+H" is "16-H") ● Converting 32-bit data (H00000123 and H0089ABCD) to hexadecimal ASCII data (normal direction) DT10,11 = H 123 → "230100CDAB89" DT12,13 = H 89ABCD Number of converted data is "2", starting position for storage is "0", and size of the storage area is "6"...
Page 680
25.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...
25.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion) 25.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion) Converts ASCII code character strings to 16-bit/32-bit binary data. ■ Instruction format ■ Operands Items Settings Control character string Starting number of the area storing the ASCII code Conversion method Starting number of the area for storing the binary data of the converted result...
Page 682
25.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion) Range of data that can be handled "H+32" Convert hexadecimal ASCII data to 32-bit data 0 to FFFFFFFF (forward direction) "H-16" Convert hexadecimal ASCII data to 16-bit data 0 to FFFF (reverse direction) "H-32"...
Page 683
25.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...
Page 684
25.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion) ● Example of converting to three sets of four hexadecimal digits Converts to 16-bit data in the forward direction “001209AB000E” → DT100 = K 1200 DT101 = K AB09 DT102 = K 0E00 •...
Page 685
25.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion) (Note 1) Specify the maximum number of digits. ● Example of converting to two sets of five decimal digits with decimal points (when there is no comma",") “1234.50006.7” → DT100 = K 12345 DT101 = K 67 •...
Page 686
25.3 F251 ATOB (Multiple ASCII Data Strings to Binary Data Conversion) • When the number of numeric data items is"2", starting position for reading is"0", number of digits is"6", when converting to 16-bit data (Note 1) A decimal point is also counted as a digit ■...
Page 687
25.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...
25.4 F252 ACHK (Multiple ASCII Data Strings ASCII Code Check) 25.4 F252 ACHK (Multiple ASCII Data Strings ASCII Code Check) Checks whether the specified ASCII data is correct. ■ Instruction format ■ Operands Items Settings Area storing the control character string, or character string data Starting number of the area storing the ASCII code Area storing the conversion method, or constant data ■...
Page 689
25.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...
25.5 F253 SSET (Character Constant → ASCII Code Conversion: with Storage Area Size) 25.5 F253 SSET (Character Constant → ASCII Code Conversion: with Storage Area Size) ■ Instruction format ■ Operands Items Settings Storage area size (permissible range: K1 to K32767, H8000) Character constant to be converted (permissible range: 0 to 256 characters) Starting device address of the destination ■...
Page 691
25.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. Storage area size Number of characters Example 2) With the 16 characters from A to P as one set, when 16 sets (256...
Page 692
25.5 F253 SSET (Character Constant → ASCII Code Conversion: with Storage Area Size) Storage area size Number of characters Example 4) When a string “ABC1230 DEF” (11 characters including a space) is to be converted S1...H8000 S2... “ABC1230 DEF” D...DT0 (Note 1) Data outside the range in the destination (*) (bytes higher than DT6) does not change.
Page 693
25.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 secured.
25.6 F254 PRINT (Create Text) 25.6 F254 PRINT (Create Text) Specifies the create text form and the data to be output in text format and creates text in ASCII code. The F254 PRINT instruction can be used with the unit firmware Ver. 1.7 or later. ■...
Page 695
25.6 F254 PRINT (Create Text) ● When not specifying the storage area size, specify H8000. ■ Operand S2 setting ● Specify the address of the device storing the create text form or a character constant (maximum 256 characters). ● The create text form consists of a body text, conversion form (%d, %e, etc.), line break code (\n), and tab code (\t).
Page 696
25.6 F254 PRINT (Create Text) SSET H8000 "AB12" DT110 S1 = H8000 S2 = "%d %u %x %b %f %e %g %s" S3 = DT100 Transfer result: -1 32767 FFFF 1000 123.4567 1.234567e+02 123.457 AB12 DT100 Data for %d DT101 K32767 Data for %u DT102...
Page 697
25.6 F254 PRINT (Create Text) ■ Setting examples Example 1: When creating the following text ・Text image Floor A humidity: 25 %. Floor B humidity: 28 %. ・Set value S1=K50 S2="Floor A humidity: %d %%.¥nFloor B humidity: %d %%." S3=DT100 D=DT200 DT100 K 25...
Page 698
25.6 F254 PRINT (Create Text) Example 2: When creating the following text ・Text image Production volume: 5 ・Set value S1=H8000 S2="Production volume: %d" S3=DT1 D=DT50 DT150 20 (Number of characters) DT151 H72(r) H50(P) DT152 H64(d) H6F(o) H63(c) H75(u) DT153 H79(i) H84(t) DT154 H6E(n)
Page 699
25.6 F254 PRINT (Create Text) Example 4: When creating the following text ・Text image Location: Nagoya, Aichi ・Set value S1=H8000 S2="Location: %s, %s" S3=DT1 D=DT50 DT50 23 (Number of characters) H61(a) H4E(N) DT51 H6F(o) H4C(L) H6F(o) H67(g) DT52 H61(a) H63(c) H61(a) H79(y) H69(i)
Page 700
25.6 F254 PRINT (Create Text) Example 5: When the specified number of characters is larger than the number of characters ・Text image Location: [ ˽ ˽ Nagoya], [Aichi˽ ˽ ˽ ] (Note 1) (Note 2) Right align Left align ・Set value S1=K30 S2="Location: %-8s, %8s"...
Page 701
25.6 F254 PRINT (Create Text) Example 6: When the created text exceeds the storage area size specified in D and CY is set ・Text image Nagoya humidity : 25 % (Note 1) ・Set value S1=K20 S2="%s humidity : %d %%" S3=DT1 D=DT50 DT50...
25.6 F254 PRINT (Create Text) ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. Turns ON when the accessible range is exceeded if the storage area size starting with D is secured. Turns ON when a value outside the settable range is specified for S1. R9007 Turns ON when conversion data that is not real number is specified for the conversion form R9008...
Page 703
25.6 F254 PRINT (Create Text) ■ Conversion form table Conversio Before conversion After conversion Usage example n form Binary data ASCII data "%d" or 16-bit data (signed integer) Decimal ASCII data "%d" , "%5d" , "%+5d" , "%i" "%-5d" , "%05d" , "%10.5d" , "% d"...
Page 704
25.6 F254 PRINT (Create Text) Items Conve Before After Description rsion conversion conversion form Binary data ASCII data When specifying the number of display digits with [f , e , E ], be sure to specify the number of characters below the decimal point. Specification of K100 "100"...
Page 705
25.6 F254 PRINT (Create Text) Items Conve Before After Description rsion conversion conversion form Binary data ASCII data Even if space (␣) is added when specifying %␣8.3f SF-123.4567 "-123.457" %u, %x, %b or %s, it will not be reflected in %␣10.3 SF1234.567 "␣1.235e+03"...
Page 706
25.6 F254 PRINT (Create Text) Conversi Before conversion After conversion Remarks on form Binary data ASCII data Example 1: %␣+d K100 → Output data is "100” with no space or sign. Example 2: %+␣d K100 → Output data is "+100” with (+) sign.
25.7 Overview of String Instructions F257 SCMP to F265 SREP 25.7 Overview of String Instructions F257 SCMP to F265 SREP ■ Data table structure The character string data table sets the character string size, number of characters, and character data. String size Maximum number of characters that can be stored S+1:...
25.8 F257 SCMP (Comparing Character Strings) 25.8 F257 SCMP (Comparing Character Strings) Compares two specified character strings, and outputs the judgment result to a special internal relay. ■ Instruction format ■ Operands Items Settings Character string 1 for comparison Character string 2 for comparison ■...
25.9 F258 SADD (Character String Addition) 25.9 F258 SADD (Character String Addition) Concatenates one character string with another. ■ Instruction format ■ Operands Items Settings Character string to be concatenated Character string to be concatenated Area in which the concatenated character strings are stored ■...
Page 711
25.9 F258 SADD (Character String Addition) ■ Operation example Operation of instruction format description program DT10 DT11 "B" "A" DT12 "2" "1" "D" "C" DT13 "3" "E" DT14 DT15 DT16 DT20 Specify via the user program DT21 DT22 "B" "A" DT23 "D"...
25.10 F259 LEN (Character String Length) 25.10 F259 LEN (Character String Length) Determines the number of characters stored in a character string. ■ Instruction format ■ Operands Items Settings Character string Area that stores the number of characters in the calculation result ■...
Page 713
25.10 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) WUMJ-FP0HPGR-091 25-43...
25.11 F260 SSRC (Search for Character String) 25.11 F260 SSRC (Search for Character String) Searches for the specified character string. ■ Instruction format ■ Operands Items Settings Area storing the character data to be searched (character string or character constant) Character string to be searched Area storing the search result ■...
Page 715
25.11 F260 SSRC (Search for Character String) Characters to search for Character table to be searched 10 (string size) 10 (string size) DT10 3 (character count) DT11 8 (character count) Search "F" "E" "B" "A" DT12 (Byte 1) (Byte 0) (Byte 1) (Byte 0) "G"...
25.12 F261 RIGHT (Right Retrieve from Character String) 25.12 F261 RIGHT (Right Retrieve from Character String) Retrieves a character string with the specified number of characters from the right side of a character string. ■ Instruction format ■ Operands Items Settings Character string Area storing the number of characters, or constant data...
Page 717
25.12 F261 RIGHT (Right Retrieve from Character String) (*1): Specify via the user program (*2): Area storing the operation results ■ Precautions for programming ● The character data of [D] prior to the operation is cleared. ● If the number of characters in [S2] is greater than the number of characters in the [S1] character string, the number of characters of the [S1] character string is sent.
25.13 F262 LEFT (Left Retrieve from Character String) 25.13 F262 LEFT (Left Retrieve from Character String) Retrieves the specified number of characters from the left side of a character string. ■ Instruction format ■ Operands Items Settings Character string Area storing the number of characters, or constant data Area storing the character string ■...
Page 719
25.13 F262 LEFT (Left Retrieve from Character String) (*1): Specify via the user program (*2): Area storing the operation results ■ Precautions for programming ● The character data of [D] prior to the operation is cleared. ● If the number of characters specified by [S2] is greater than the number of characters in the character string specified by [S1], then the number of characters in the character string specified by [S1] are transferred.
25.14 F263 MIDR (Read from Any Position in Character String) 25.14 F263 MIDR (Read from Any Position in Character String) Retrieves a character string of the specified number of characters from the specified position in a character string. ■ Instruction format ■...
Page 721
25.14 F263 MIDR (Read from Any Position in Character String) (*1): Specify via the user program (*2): Area storing the operation results ■ Precautions for programming ● The character data of [D] prior to the operation is cleared. ● If the number of characters specified by [S3] is greater than the number of characters in the character string specified by [S1] from the position specified by [S2], then the number of characters in the character string specified by [S1] are transferred.
25.15 F264 MIDW (Write to Any Position in Character String) 25.15 F264 MIDW (Write to Any Position in Character String) These instructions write a specified number of characters from a character string to a specified position in the character string. ■...
Page 723
25.15 F264 MIDW (Write to Any Position in Character String) "B" "A" "D" "C" "F" "E" (*1) DT20 "H" "G" DT21 "A" "1" DT22 (Byte 1) (Byte 0) "C" "B" DT23 DT20 (Byte 3) (Byte 2) (*2) "6" "5" DT24 DT21 (Byte 5) (Byte 4)
25.16 F265 SREP (Replace Character Strings) 25.16 F265 SREP (Replace Character Strings) Replaces the specified number of characters in a character string with the same number of different characters, starting from the specified position. ■ Instruction format ■ Operands Items Settings Replacement character string Starting address of the area storing a character string...
26 Data Manipulation Instructions 26.1 F270 MAX (Search Maximum Value from 16-bit Data Block) ...26-2 26.2 F271 DMAX (Search Maximum Value from 32-bit Data Block) ..26-4 26.3 F272 MIN (Search Minimum Value from 16-bit Data Block) .....26-6 26.4 F273 DMIN (Search Minimum Value from 32-bit Data Block)...26-8 26.5 F275 MEAN (16-bit Data Sum and Average)........26-10 26.6 F276 DMEAN (32-bit Data Sum and Average) .........26-12 26.7 F277 SORT (16-bit Data Block Sort) ..........26-14...
26.1 F270 MAX (Search Maximum Value from 16-bit Data Block) 26.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 Starting area that stores word data Ending area that stores word data Area storing the operation results (two words)
Page 729
26.1 F270 MAX (Search Maximum Value from 16-bit Data Block) ● If there is multiple data with the same value as the maximum value, the relative address of the first value found searching from [S1] is stored in [D+1]. ■ Precautions for programming [D+1] will stored even if it overflows the specified device area, so it may corrupt the start of other device areas.
26.2 F271 DMAX (Search Maximum Value from 32-bit Data Block) 26.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 Starting area storing double word data Ending area storing double word data...
Page 731
26.2 F271 DMAX (Search Maximum Value from 32-bit Data Block) Double word data table Lower word Lower word Maximum value Higher word Higher word S1+1: D+1: S1+2: D+2: Relative address S1+3: S2-1: Lower word Relative address Higher word ● 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].
26.3 F272 MIN (Search Minimum Value from 16-bit Data Block) 26.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 Starting area that stores word data Ending area that stores word data Area storing the operation results (two words)
Page 733
26.3 F272 MIN (Search Minimum Value from 16-bit Data Block) Word data table Maximum value Relative address S1+1: D+1: 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]. ■...
26.4 F273 DMIN (Search Minimum Value from 32-bit Data Block) 26.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 Starting area storing double word data Ending area storing double word data...
Page 735
26.4 F273 DMIN (Search Minimum Value from 32-bit Data Block) Double word data table Lower word Lower word Minimum value Higher word Higher word S1+1: D+1: S1+2: D+2: Relative address S1+3: S2-1: Lower word Relative address Higher word ● 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].
26.5 F275 MEAN (16-bit Data Sum and Average) 26.5 F275 MEAN (16-bit Data Sum and Average) Calculates the total value and mean value of the specified memory area range (word data). ■ Instruction format ■ Operands Items Settings Starting area that stores word data Ending area that stores word data Area storing the result of the operation (three words) ■...
Page 737
26.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) WUMJ-FP0HPGR-091 26-11...
26.6 F276 DMEAN (32-bit Data Sum and Average) 26.6 F276 DMEAN (32-bit Data Sum and Average) Calculates the total and mean values of the specified memory area range (double word data). ■ Instruction format ■ Operands Items Settings Starting area storing double word data Ending area storing double word data Area storing the operation results (6 words) ■...
Page 739
26.6 F276 DMEAN (32-bit Data Sum and Average) Double word data table Lower word Higher word S1+1: S1+2: S1+3: Target area S2-1: Lower word Higher word ● For the mean value, the decimal is rounded down to make an integer. ■...
26.7 F277 SORT (16-bit Data Block Sort) 26.7 F277 SORT (16-bit Data Block Sort) Sorts the strings (word data) in the specified memory area range into ascending or descending order. ■ Instruction format ■ Operands Items Settings Starting area storing sort data Ending area storing sort data Area storing sort conditions, or constant data ■...
Page 741
26.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 Turns ON when the area is exceeded in index modification. R9007 R9008 ON when [S1] is greater than [S2]...
26.8 F278 DSORT (32-bit Data Block Sort) 26.8 F278 DSORT (32-bit Data Block Sort) Sorts strings (double word data) in the specified memory area in ascending or descending order. ■ Instruction format ■ Operands Items Settings Starting area storing sort data Ending area storing sort data Area storing sort conditions, or constant data ■...
Page 743
26.8 F278 DSORT (32-bit Data Block Sort) Double word data table Lower word Higher word S1+1: S1+2: S1+3: Target area S2-1: Lower word Higher word ■ Operation example Operation of instruction format description program ● Ascending order If data is stored in DT10 to DT19 as below and [S3] = K0, the following operation will be performed.
26.9 F282 SCAL (16-bit Data Linearization) 26.9 F282 SCAL (16-bit Data Linearization) Performs scaling of the given data table and finds output value Y with regards to input value X. ■ Instruction format ■ Operands Items Settings Source 16-bit data equivalent to input value X, or the area where it is stored Starting address of the data table used for scaling (linearization) Area where output result Y is stored ■...
26.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.
Page 746
26.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 26-20 WUMJ-FP0HPGR-091...
26.10 F283 DSCAL (32-bit Data Linearization) 26.10 F283 DSCAL (32-bit Data Linearization) Performs scaling of the given data table and finds output value Y with regards to input value X. ■ Instruction format ■ Operands Items Settings Original 32-bit data corresponding to input value X, or storage area Starting address of the data table used for scaling (linearization) Area where output result Y is stored ■...
Page 748
26.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.
Page 749
26.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 WUMJ-FP0HPGR-091...
26.11 F284 RAMP (16-bit Data Ramp Output) 26.11 F284 RAMP (16-bit Data Ramp Output) Linear output is executed based on the elapsed time from the start of execution, by performing scaling from the output default value, target value, and time width. ■...
26.12 F285 LIMT (16-bit Data Upper and Lower Limit Control) 26.12 F285 LIMT (16-bit Data Upper and Lower Limit Control) Performs upper and lower limit control (word data). ■ Instruction format ■ Operands Items Settings Area storing the lower limit or lower limit data Area storing the upper limit or upper limit data Area storing the input value or input value data Area storing the output value...
Page 753
26.12 F285 LIMT (16-bit Data Upper and Lower Limit Control) Output value [D] [S2] Lower limit value [S1] Input value [S3] Upper limit value [S2] [S1] ● For control using only the upper limit value Specify K-32768 (or H8000) for the lower limit value [S1]. ●...
26.13 F286 DLIMT (32-bit Data Upper and Lower Limit Control) 26.13 F286 DLIMT (32-bit Data Upper and Lower Limit Control) Performs upper and lower limit control (double word). ■ Instruction format ■ Operands Items Settings Area storing the lower limit, or lower limit data (two words) Area storing the upper limit, or upper limit data (two words) Area storing the input value, or input value data (two words) Area storing the output value (two words)
Page 755
26.13 F286 DLIMT (32-bit Data Upper and Lower Limit Control) Output value [D, D+1] [S2, S2+1] Input value Upper limit value [S3, S3+1] [S2, S2+1] [S1, S1+1] ● For control using only the upper limit value Set K-2147483648 (or H80000000) for lower limit [S1, S1+1]. ●...
26.14 F287 BAND (16-bit Data Deadband Control) 26.14 F287 BAND (16-bit Data Deadband Control) Performs deadband control (word). ■ Instruction format ■ Operands Items Settings Area storing the lower limit or lower limit data Area storing the upper limit or upper limit data Area storing the input value or input value data Area storing the output value ■...
Page 757
26.14 F287 BAND (16-bit Data Deadband Control) Output value [D] [S2] Deadband lower limit [S1] Input value [S3] Deadband upper limit [S2] During this time, 0 is output. ■ Operation example Operation of instruction format description program When K-100 is stored in DT10 and K100 in DT20, the following operation will be performed. Value of DT30 Value stored in DT40 K-300...
26.15 F288 DBAND (32-bit Data Deadband Control) 26.15 F288 DBAND (32-bit Data Deadband Control) Carries out deadband control (double word). ■ Instruction format ■ Operands Items Settings Area storing the lower limit, or lower limit data (two words) Area storing the upper limit, or upper limit data (two words) Area storing the input value, or input value data (two words) Area storing the output value (two words) ■...
Page 759
26.15 F288 DBAND (32-bit Data Deadband Control) Output value [D, D+1] Deadband lower limit [S1, S1+1] Input value [S3, S3+1] Deadband upper limit [S2, S2+1] During this time, 0 is output. ■ Operation example Operation of instruction format description program If K-10000 is stored in DT10 and DT11, and K10000 is stored in DT20 and DT21, the following operation is performed.
26.16 F289 ZONE (16-bit Data Zone Control) 26.16 F289 ZONE (16-bit Data Zone Control) Performs zone control (word). ■ Instruction format ■ Operands Items Settings Area where negative bias value is stored, or negative bias value data Area where positive bias value is stored, or positive bias value data Area storing the input value or input value data Area storing the output value ■...
Page 761
26.16 F289 ZONE (16-bit Data Zone Control) Output value [D] [S2] Input value [S3] Bias value for negative case [S1] ■ Operation example Operation of instruction format description program When K-100 is stored in DT10, and K100 is stored in DT20 Value of DT30 Value stored in DT40 K-300...
26.17 F290 DZONE (32-bit Data Zone Control) 26.17 F290 DZONE (32-bit Data Zone Control) Carries out zone control (double word). ■ Instruction format ■ Operands Items Settings Area storing negative bias values, or negative bias value data (two words) Area storing positive bias values, or positive bias value data (two words) Area storing the input value, or input value data (two words) Area storing the output value (two words) ■...
Page 763
26.17 F290 DZONE (32-bit Data Zone Control) Output value [D, D+1] [S2, S2+1] Input value [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.
27 Floating-point Instruction 27.1 F309 FMV (Floating Point Data Move) ..........27-3 27.2 F310 F+ (Floating Point Data Addition) ..........27-5 27.3 F311 F- (Floating Point Data Subtraction) ........27-7 27.4 F312 F* (Floating Point Data Multiplication) ........27-9 27.5 F313 F% (Floating Point Data Division)..........27-11 27.6 F314 SIN (Floating Point Data Sine Operation)........27-13 27.7 F315 COS (Floating Point Data Cosine Operation) ......27-15 27.8 F316 TAN (Floating Point Data Tangent Operation) ......27-17...
Page 766
27 Floating-point Instruction 27.27 F335 F+/- (Floating Point Data Sign Conversion)......27-54 27.28 F336 FABS (Floating Point Data Absolute Value Conversion) ..27-56 27.29 F337 RAD (Degree to Radian Conversion) ........27-58 27.30 F338 DEG (Radian to Degree Conversion) ........27-60 27-2 WUMJ-FP0HPGR-091...
27.1 F309 FMV (Floating Point Data Move) 27.1 F309 FMV (Floating Point Data Move) Transfers the specified real number data to the specified area. ■ Instruction format ■ Operands Items Settings Transfer data: Area storing real number data (32-bit), or constant data Destination: Data transfer destination area ■...
Page 768
27.1 F309 FMV (Floating Point Data Move) ■ Flag operations Name Description R9007 R9008 Turns ON when the area is exceeded in index modification. (ER) 27-4 WUMJ-FP0HPGR-091...
27.2 F310 F+ (Floating Point Data Addition) 27.2 F310 F+ (Floating Point Data Addition) Adds real number data. ■ Instruction format ■ Operands Items Settings Area storing augend data, or augend data (two words) Area storing addend data, or addend data (two words) Area storing the addition result (two words) ■...
Page 770
27.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. ●...
27.3 F311 F- (Floating Point Data Subtraction) 27.3 F311 F- (Floating Point Data Subtraction) Subtracts real number data. ■ Instruction format ■ Operands Items Settings Area storing the minuend data, or the minuend data (two words) Area storing the subtrahend data, or the subtrahend data (two words) Area storing the operation results (two words) ■...
Page 772
27.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. ●...
27.4 F312 F* (Floating Point Data Multiplication) 27.4 F312 F* (Floating Point Data Multiplication) Multiplies real number data items. ■ Instruction format ■ Operands Items Settings Area storing the multiplicand data, or the multiplicand data (two words) Area storing the multiplier data, or the multiplier data (two words) Area storing the operation results (two words) ■...
Page 774
27.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. ■...
27.5 F313 F% (Floating Point Data Division) 27.5 F313 F% (Floating Point Data Division) Divides real number data. ■ Instruction format ■ Operands Items Settings Area storing the dividend data, or dividend data (two words) Area storing the divisor data, or divisor data (two words) Area storing the operation results (two words) ■...
Page 776
27.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. ■...
27.6 F314 SIN (Floating Point Data Sine Operation) 27.6 F314 SIN (Floating Point Data Sine Operation) Calculates the trigonometric function sin(). ■ Instruction format ■ Operands Items Settings Area storing angle data, or angle data (two words) Area storing the operation results (two words) ■...
Page 778
27.6 F314 SIN (Floating Point Data Sine Operation) ■ Precautions for programming The accuracy decreases as the absolute value of the input value increases. Where possible, use angle data within the range -2π radians ≤ input ≤ 2π radians. ■ Program example When R0 turns ON, f0.4999999 is stored in DT20 and DT21.
27.7 F315 COS (Floating Point Data Cosine Operation) 27.7 F315 COS (Floating Point Data Cosine Operation) Operates the trigonometric function cos(). ■ Instruction format ■ Operands Items Settings Area storing angle data, or angle data (two words) Area storing the operation results (two words) ■...
Page 780
27.7 F315 COS (Floating Point Data Cosine Operation) ■ Precautions for programming The accuracy decreases as the absolute value of the input value increases. Where possible, use angle data within the range -2π radians ≤ input ≤ 2π radians. ■ Program example When R0 is ON, f 0.7071068 is stored in DT20 to DT21.
27.8 F316 TAN (Floating Point Data Tangent Operation) 27.8 F316 TAN (Floating Point Data Tangent Operation) Calculates the trigonometrical function tan(). ■ Instruction format ■ Operands Items Settings Area storing angle data, or angle data (two words) Area storing the operation results (two words) ■...
Page 782
27.8 F316 TAN (Floating Point Data Tangent Operation) ■ Precautions for programming The accuracy decreases as the absolute value of the input value increases. Where possible, use angle data within the range -2π radians ≤ input ≤ 2π radians. ■ Program example f 1.732048 is stored in DT20 and DT21 when R0 turns ON.
27.9 F317 ASIN (Floating Point Data Arcsine Operation) 27.9 F317 ASIN (Floating Point Data Arcsine Operation) −1 Calculates the trigonometric function SIN ■ Instruction format ■ Operands Items Settings Area storing angle data, or angle data (two words) Area storing the operation results (two words) ■...
Page 784
27.9 F317 ASIN (Floating Point Data Arcsine Operation) ■ Precautions for programming [D, D+1] is stored in the following range: -π/2 ≤ [D, D+1] ≤ π/2 [radians] [radians] ■ Program example f0.5235986 (30° radians) is stored in DT20 to DT21 when R0 turns ON. ■...
27.10 F318 ACOS (Floating Point Data Arccosine Operation) 27.10 F318 ACOS (Floating Point Data Arccosine Operation) −1 Calculates the trigonometric function COS ■ Instruction format ■ Operands Items Settings Area storing angle data, or angle data (two words) Area storing the operation results (two words) ■...
Page 786
27.10 F318 ACOS (Floating Point Data Arccosine Operation) ■ Precautions for programming [D, D+1] is stored in the following range: 0.0 ≤ [D, D+1] ≤ π [radians] [radians] ■ Program example When R0 turns ON, f0.7853980 (45° in radians) is stored in DT20 and DT21. ■...
27.11 F319 ATAN (Floating Point Data Arctangent Operation) 27.11 F319 ATAN (Floating Point Data Arctangent Operation) −1 Calculates the trigonometrical function TAN ■ Instruction format ■ Operands Items Settings Area storing angle data, or angle data (two words) Area storing the operation results (two words) ■...
Page 788
27.11 F319 ATAN (Floating Point Data Arctangent Operation) ■ Precautions for programming [D, D+1] is stored in the following range: -π/2 < [D, D+1] < π/2 [radians] [radians] ■ Program example f1.047197 (60° in radians) is stored in DT20 to DT21 when R0 turns ON. ■...
27.12 F320 LN (Floating Point Data Natural Logarithmic Operation) 27.12 F320 LN (Floating Point Data Natural Logarithmic Operation) Calculates the natural logarithm LN(). ■ Instruction format ■ Operands Items Settings Area storing angle data, or angle data (two words) Area storing the operation results (two words) ■...
Page 790
27.12 F320 LN (Floating Point Data Natural Logarithmic Operation) ■ Program example ● When R0 turns ON, f1.6094379 is stored in DT20 and DT21. ● When R0 turns ON, f-0.3160815 is stored in DT30 and DT31. ■ Flag operations Name Description Turns ON when the area is exceeded in index modification.
27.13 F321 EXP (Floating Point Data Exponent Operation) 27.13 F321 EXP (Floating Point Data Exponent Operation) Calculates the exponent EXP(). ■ Instruction format ■ Operands Items Settings Area storing angle data, or angle data (two words) Area storing the operation results (two words) ■...
Page 792
27.13 F321 EXP (Floating Point Data Exponent Operation) ■ Program example ● When R0 turns ON, f7.389056 is stored in DT20 and DT21. ● When R0 turns ON, f221.406402 is stored in DT30 and DT31. ■ Flag operations Name Description Turns ON when the area is exceeded in index modification.
27.14 F322 LOG (Floating Point Data Logarithm Operation) 27.14 F322 LOG (Floating Point Data Logarithm Operation) Calculates the logarithm LOG(). ■ Instruction format ■ Operands Items Settings Area storing angle data, or angle data (two words) Area storing the operation results (two words) ■...
Page 794
27.14 F322 LOG (Floating Point Data Logarithm Operation) ■ Program example ● f 1.30103 is stored in DT20 and DT21 when R0 turns ON. ● f 0.0108932 is stored in DT30 and DT31 when R0 turns ON. ■ Flag operations Name Description Turns ON when the area is exceeded in index modification.
27.15 F323 PWR (Floating Point Data Power Operation) 27.15 F323 PWR (Floating Point Data Power Operation) Calculates powers for real number data. ■ Instruction format ■ Operands Items Settings Area storing the base data, or base data (two words) Area storing the power data, or power data (two words) Area storing the operation results (two words) ■...
Page 796
27.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. ●...
27.16 F324 FSQR (Floating Point Data Square Root Operation) 27.16 F324 FSQR (Floating Point Data Square Root Operation) Calculates the square root of real number data. ■ Instruction format ■ Operands Items Settings Area storing operation data, or operation data (two words) Area storing the operation results (two words) ■...
Page 798
27.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 ≤...
27.17 F325 FLT (16-bit Integer to Floating Point Data Conversion) 27.17 F325 FLT (16-bit Integer to Floating Point Data Conversion) Converts 16-bit integer data to real number data. ■ Instruction format ■ Operands Items Settings Area storing operation data, or operation data (two words) Area storing the operation results (two words) ■...
27.18 F326 DFLT (32-bit Integer to Floating Point Data Conversion) 27.18 F326 DFLT (32-bit Integer to Floating Point Data Conversion) Converts 32-bit integers to real number data. ■ Instruction format ■ Operands Items Settings Area storing operation data, or operation data (two words) Area storing the operation results (two words) ■...
Page 801
27.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 data cannot be obtained (CY) R900B Turns ON when the calculation result is"0" WUMJ-FP0HPGR-091 27-37...
27.19 F327 INT [Floating Point Data to 16-bit Integer Conversion (Largest Integer Not Exceeding the Floating-point Data)] 27.19 F327 INT [Floating Point Data to 16-bit Integer Conversion (Largest Integer Not Exceeding the Floating-point Data)] Converts real number data to 16-bit integers (largest integer not exceeding floating point real number).
Page 803
27.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 Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when non-real number data is specified in [S, S+1]...
27.20 F328 DINT [Floating Point Data to 32-bit Integer Conversion (Largest Integer Not Exceeding the Floating-point Data)] 27.20 F328 DINT [Floating Point Data to 32-bit Integer Conversion (Largest Integer Not Exceeding the Floating-point Data)] Converts real number data to 32-bit integers (largest integer not exceeding floating point real number).
Page 805
27.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 Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when non-real number data is specified in [S, S+1]...
27.21 F329 FIX [Floating Point Data to 16-bit Integer Conversion (Round- down)] 27.21 F329 FIX [Floating Point Data to 16-bit Integer Conversion (Round-down)] Converts real number data to a 16-bit integer (rounded down to the nearest integer). ■ Instruction format ■...
Page 807
27.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 Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when non-real number data is specified in [S, S+1]...
27.22 F330 DFIX [Floating Point Data to 32-bit Integer Conversion (Round- down)] 27.22 F330 DFIX [Floating Point Data to 32-bit Integer Conversion (Round-down)] Converts real number data to 32-bit integers (rounding down the decimal point). ■ Instruction format ■ Operands Items Settings Area storing operation data, or operation data (two words)
Page 809
27.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 Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when non-real number data is specified in [S, S+1]...
27.23 F331 ROFF [Floating Point Data to 16-bit Integer Conversion (Round- off)] 27.23 F331 ROFF [Floating Point Data to 16-bit Integer Conversion (Round-off)] Converts real number data to a 16-bit integer (rounded off to the nearest integer). ■ Instruction format ■...
Page 811
27.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 Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when non-real number data is specified in [S, S+1]...
27.24 F332 DROFF [Floating Point Data to 16-bit Integer Conversion (Round- off)] 27.24 F332 DROFF [Floating Point Data to 16-bit Integer Conversion (Round-off)] Converts real number data to 32-bit integers (rounding off at the decimal point). ■ Instruction format ■ Operands Items Settings...
Page 813
27.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 Turns ON when the area is exceeded in index modification. R9007 R9008 Turns ON when non-real number data is specified in [S, S+1]...
27.25 F333 FINT (Floating Point Data Round-down) 27.25 F333 FINT (Floating Point Data Round-down) Rounds down real number data at the decimal point. (The largest integer not exceeding the floating point type data) ■ Instruction format ■ Operands Items Settings Area storing operation data, or operation data (two words) Area storing the operation results (two words) ■...
Page 815
27.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)
27.26 F334 FRINT (Floating Point Data Round-off) 27.26 F334 FRINT (Floating Point Data Round-off) Rounds off real number data to the first decimal place. ■ Instruction format ■ Operands Items Settings Area storing operation data, or operation data (two words) Area storing the operation results (two words) ■...
Page 817
27.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)
27.27 F335 F+/- (Floating Point Data Sign Conversion) 27.27 F335 F+/- (Floating Point Data Sign Conversion) Changes the sign of real number data. ■ Instruction format ■ Operands Items Settings Area storing operation data, or operation data (two words) Area storing the operation results (two words) ■...
Page 819
27.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)
27.28 F336 FABS (Floating Point Data Absolute Value Conversion) 27.28 F336 FABS (Floating Point Data Absolute Value Conversion) Calculates the absolute value of real number data. ■ Instruction format ■ Operands Items Settings Area storing operation data, or operation data (two words) Area storing the operation results (two words) ■...
Page 821
27.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.
27.29 F337 RAD (Degree to Radian Conversion) 27.29 F337 RAD (Degree to Radian Conversion) Converts the unit of an angle from [degrees] to [radians]. ■ Instruction format ■ Operands Items Settings Area storing angle [degrees] data, or angle [degrees] (two words) Area (two word) to store the conversion result ■...
Page 823
27.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"...
27.30 F338 DEG (Radian to Degree Conversion) 27.30 F338 DEG (Radian to Degree Conversion) Converts the unit of an angle from radians to degrees. ■ Instruction format ■ Operands Items Settings Area storing angle data (radians), or angle data (radians) (two words) Area (two words) to store the conversion result ■...
27.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. ■...
28 Real Number Data Processing Instructions 28.1 F345 FCMP (Floating Point Data Comparison) ........28-2 28.2 F346 FWIN (Floating Point Data Band Comparison)......28-4 28.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control)..28-6 28.4 F348 FBAND (Floating Point Data Deadband Control) ....28-8 28.5 F349 FZONE (Floating Point Data Zone Control)......28-10 28.6 F354 FSCAL (Scaling of real number data)........28-12 WUMJ-FP0HPGR-091...
28.1 F345 FCMP (Floating Point Data Comparison) 28.1 F345 FCMP (Floating Point Data Comparison) Compares real number data and outputs the judgment result to special internal relays. ■ Instruction format ■ Operands Items Settings Area storing the real number data, or real number data (comparison data 1) (two words) Area storing the real number data, or real number data (comparison data 2) (two words) ■...
Page 829
28.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] WUMJ-FP0HPGR-091 28-3...
28.2 F346 FWIN (Floating Point Data Band Comparison) 28.2 F346 FWIN (Floating Point Data Band Comparison) Compares real number data with a band and outputs the judgment result to special internal relays. ■ Instruction format ■ Operands Items Settings Comparison data: Area storing real number data, or real number data (two words) Lower limit data: Area storing real number data, or real number data (two words) Upper limit data: Area storing real number data, or real number data (two words) ■...
Page 831
28.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.
28.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control) 28.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control) Performs upper and lower limit control (real number data). ■ Instruction format ■ Operands Items Settings Area storing the lower limit, or lower limit data (two words) Area storing the upper limit, or upper limit data (two words) Area storing the input value, or input value data (two words) Area storing the output value (two words)
Page 833
28.3 F347 FLIMT (Floating Point Data Upper/Lower Limit Control) Output value [D, D+1] [S2, S2+1] Input value Upper limit value [S3, S3+1] [S2, S2+1] [S1, S1+1] ● If [S1] to [S3] are specified with an integer device, the operation occurs after the integer data is internally converted to real numbers.
28.4 F348 FBAND (Floating Point Data Deadband Control) 28.4 F348 FBAND (Floating Point Data Deadband Control) Performs dead-band control (real number data). ■ Instruction format ■ Operands Items Settings Area storing the lower limit, or lower limit data (two words) Area storing the upper limit, or upper limit data (two words) Area storing the input value, or input value data (two words) Area storing the output value (two words)
Page 835
28.4 F348 FBAND (Floating Point Data Deadband Control) Output value [D, D+1] Deadband lower limit [S1, S1+1] Input value [S3, S3+1] Deadband upper limit [S2, S2+1] During this period, 0.0 is output. ● If [S1] to [S3] are specified with an integer device, the operation occurs after the integer data is internally converted to real numbers.
28.5 F349 FZONE (Floating Point Data Zone Control) 28.5 F349 FZONE (Floating Point Data Zone Control) Performs zone control (real number data). ■ Instruction format ■ Operands Items Settings Area storing negative bias values, or negative bias value data (two words) Area storing positive bias values, or positive bias value data (two words) Area storing the input value, or input value data (two words) Area storing the output value (two words)
Page 837
28.5 F349 FZONE (Floating Point Data Zone Control) Output value [D, D+1] [S2, S2+1] Input value [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.
28.6 F354 FSCAL (Scaling of real number data) 28.6 F354 FSCAL (Scaling of real number data) Performs scaling (linearization) using a real number data table and calculates the output (Y) for the input value (X). ■ Instruction format ■ Operands Items Settings Real value or area representing the input value (X)
Page 839
28.6 F354 FSCAL (Scaling of real number data) Registration point DT10 count (m←n+1) S2+1: DT11 (Real number value) S2+2: DT12 S2+3: DT13 (Real number value) S2+4: DT14 DT29 S2+2n+1: (Real number value) S2+2n+2: DT30 DT31 S2+2n+3: (Real number value) DT32 S2+2n+4: S2+2n+5: DT33...
Page 840
28.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*10 , -1.7*10 Second point: (x1,y1) = (H7F000000, H7F000000) = (+1.7*10 , +1.7*10 ●...
29.1 F355 PID (PID Operation) 29.1 F355 PID (PID Operation) PID operation is performed. ■ Instruction format ■ Operands Items Settings Starting number of parameter area (30 word) for PID operation ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
Page 843
29.1 F355 PID (PID Operation) ■ Parameter table settings Control mode [S+1] Set point value (SP) Measured process value (PV) [S+2] [S+3] Output value (MV) [S+4] Output lower limit [S+5] Output upper limit [S+6] Proportional gain (Kp) Integral time (Ti) [S+7] [S+8] Derivative time (Td)
Page 844
29.1 F355 PID (PID Operation) ● Derivative priority type, proportional-derivative priority type PID There is a change in output when the setting value is changed. Derivative type Generally, there is significant fluctuation when the setting value is changed, but convergence is fast. Proportional- Generally, there is less fluctuation when the setting value is changed, but derivative type...
Page 845
29.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.
Page 846
29.1 F355 PID (PID Operation) (Reason) This is because the F355 PID instruction operates internally using the specified table, even when the execution condition is not met. In such cases, set the tables to separate addresses. ● See the following operational expressions regarding PID operation. ■...
Page 847
29.1 F355 PID (PID Operation) The resulting offset is removed by combining with proportional operation or proportional- derivative operation. The smaller the Ti value, the stronger the action of the integral operation. (3) Derivative operation Control operation that produces an output proportional to the time derivative value of the input. Set value signal SV Deviation e Differentiate...
Page 848
29.1 F355 PID (PID Operation) Set value signal SV Deviation e Integrate 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. ■...
29.2 F356 EZPID (PID Operation: PWM Output Possible) 29.2 F356 EZPID (PID Operation: PWM Output Possible) Temperature control (PID) can be easily performed using the image of a temperature controller. ■ Instruction format ■ Operands Items Settings Control data Measured process value (PV) Starting No.
Page 850
29.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...
Page 851
29.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.
Page 852
29.2 F356 EZPID (PID Operation: PWM Output Possible) Memory Function Default Range: Forward operation: If the measured process value increases, the output is increased (example: cooling) Derivative-type and proportional-derivative type Derivative type: Approaches the set point value faster, but is more likely to overshoot.
Page 853
29.2 F356 EZPID (PID Operation: PWM Output Possible) Example: Change the control mode from the default = derivative type to the proportional-derivative type. 2. Using an analog output unit for output 1. Set the analog output flag (bit 3 of S1) to 1. 2.
Page 854
29.2 F356 EZPID (PID Operation: PWM Output Possible) ■ More details on setting methods 1. Setting the 100% output band (S4+3) The 100% output band specifies the percentage of the set value for the measured process value (PV) to be above when PID control is started. 100% output is performed in the area up to the specified process value.
Page 855
29.2 F356 EZPID (PID Operation: PWM Output Possible) Temperature Auto-tuning bias value (SP’) Auto-tuning during reverse operation Time Auto-tuning in progress PID control KP/TI/TD calculation Temperature (SP’) Auto-tuning during forward operation Auto-tuning bias value Time Auto-tuning in progress PID control KP/TI/TD calculation (Note 1) Even if auto-tuning is started when the measured process value (PV) is close to the set point value...
Page 856
29.2 F356 EZPID (PID Operation: PWM Output Possible) F356 EZPID DT32710 DT100 Incorrect F0 MV DT100 F356 EZPID DT32710 DT100 It is the same even without this OT Y0 instruction. Correct F0 MV DT100 ■ Conditions when operation errors occur ●...
30.1 F380 POSST (Positioning Table Start) 30.1 F380 POSST (Positioning Table Start) Starts the positioning operation according to the data specified in the positioning memory (positioning table area). This instruction is used to start the E point control, P point control, C point control, J point control or linear interpolation control.
Page 859
30.1 F380 POSST (Positioning Table Start) ● When the channel to be started has been already operating, the positioning control does not start and it terminates. ■ Flag operations Name Explanation When the area is exceeded at the time of index modification When the [S1] value is outside the set range R9007 R9008...
30.2 F381 JOGST (JOG Operation Start) 30.2 F381 JOGST (JOG Operation Start) Starts the JOG operation according to the parameters specified in the positioning memory (axis setting area). ■ Instruction format ■ Operand Operand Settings Setting range Channel number to start the JOG operation (Unsigned 16-bit 0 to 3 integer) Operating direction (Unsigned 16-bit integer)
Page 861
30.2 F381 JOGST (JOG Operation Start) ■ Flag operations Name Explanation 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 WUMJ-FP0HPGR-091...
30.3 F382 ORGST (Home Return Start) 30.3 F382 ORGST (Home Return Start) Starts the home return operation according to the parameters specified in the positioning memory (axis setting area). ■ Instruction format ■ Operand Operand Settings Setting range Channel number to start the home return (Unsigned 16-bit integer) 0 to 3 ■...
30.4 F383 MPOST (Positioning Simultaneous Start) 30.4 F383 MPOST (Positioning Simultaneous Start) Starts the positioning tables for multiple axes specified on Configurator PMX. The tables of the E point control, P point control and C point control can be started. ■...
Page 864
30.4 F383 MPOST (Positioning Simultaneous Start) ● 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 Explanation When the area is exceeded at the time of index modification...
30.5 F384 PTBLR (Positioning Parameter Read) 30.5 F384 PTBLR (Positioning Parameter Read) Reads the positioning parameter data stored in the positioning memory of the unit to the operation memory area. ■ Instruction format ■ Operand Operand Settings Specification of channel numbers and positioning memory area (Higher 8 bits) channel no.: H0 to H3 H00 (Common area), H01 (Axis information area), H02 (Axis...
Page 866
30.5 F384 PTBLR (Positioning Parameter Read) ■ Flag operations Name Explanation 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] 30-10...
30.6 F385 PTBLW (Positioning Parameter Write) 30.6 F385 PTBLW (Positioning Parameter Write) This instruction is used to write positioning parameters and positioning table data with user programs. ■ Instruction format ■ Operand Operand Settings Specification of channel numbers and positioning memory area (Higher 8 bits) channel no.: H0 to H3 (Not save in FROM), H80 to H83 (Save in FROM) H00 (Common area), H01 (Axis information area), H02 (Axis...
Page 868
30.6 F385 PTBLW (Positioning Parameter Write) ● When specifying [H80 to H83 (Save in FROM)] for the higher 8 bits of operand [S1] (the most significant bit is1), specified data is written into the F-ROM of the control unit. Writing to F- ROM can be performed up to 10000 times.
31.1 F1 DMV (Pulse Output Elapsed Value Write/Read) 31.1 F1 DMV (Pulse Output Elapsed Value Write/Read) Writes and reads the elapsed value of the high-speed counter. ■ Instruction format F1 DMV K3000 DT90400 ( ) F1 DMV DT90400 DT100 ( )...
31.2 [F171(SPDH)] Pulse Output (Trapezoidal Control) 31.2 [F171(SPDH)] Pulse Output (Trapezoidal Control) This instruction outputs pulses from a specified pulse output channel according to specified parameters. ■ Instruction format ■ Operand Operand Settings Starting number of the area in which data tables are registered Target channel for pulse output ■...
Page 872
31.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 direction output is direction output is Pulse output when Pulse output when Pulse output from When minus Subtraction direction output is direction output is Absolute <Absolute value control>...
Page 873
31.2 [F171(SPDH)] Pulse Output (Trapezoidal Control) Control code ① Initial speed Fmin(Hz) ② Maximum speed Fmax(Hz) Acceleration/ ③ deceleration time t(ms) Target value ④ (No. of pulses) S+10 ⑤ S+11 Operand Settings Description Specify the control code by setting the H constant. 0: Fixed Acceleration/deceleration time setting 0: Normal...
Page 874
31.2 [F171(SPDH)] Pulse Output (Trapezoidal Control) Operand Settings Description (Note 1) If the initial speed is set to a value less than K1 or if the maximum speed is set to a value exceeding K100000, an operation error occurs. (Note 2) If the initial speed is set to the low-speed range and if the maximum speed is set to a value exceeding K22000, an operation error occurs.
Page 875
31.2 [F171(SPDH)] Pulse Output (Trapezoidal Control) 7kHz No. of output pulses 100,000 1kHz 300ms 300ms ⊿f ⊿t ● 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 ■...
Page 876
● This instruction cannot be executed when a control flag corresponding to each channel is on. ● For the FP0H mode, select "Pulse output" for the channel setting corresponding to the system register no. 402.
31.3 [F171(SPDH)] Pulse Output (Home Return) 31.3 [F171(SPDH)] Pulse Output (Home Return) This instruction outputs pulses from a specified pulse output channel according to specified parameters. ■ Instruction format ■ Operand Operand Settings Starting number of the area in which data tables are registered Target channel for pulse output ■...
Page 878
31.3 [F171(SPDH)] Pulse Output (Home Return) Home input Fmax Fmin Home return mode II (Home return by near home input and home input) When the near home input is enabled, deceleration will be performed, and the pulse output will stop after the home input. The operation varies according to the setting of the control code (low byte) described on the next page to H30 to H37.
Page 879
31.3 [F171(SPDH)] Pulse Output (Home Return) Operand Settings Description 0: Fixed Acceleration/deceleration time setting 0: Normal 1: Acceleration/deceleration time priority Output setting 0: Pulse output 1: Calculate only Acceleration/deceleration steps 0: 30 steps 1: 60 steps Duty (on width) 0: Duty 1/2 (50%) 1: Duty 1/4 (25%) Frequency range Not used...
Page 880
31.3 [F171(SPDH)] Pulse Output (Home Return) Operand Settings Description When this signal is not used or the time is set to less than 0.5 ms, tr(ms) specify K0. ■ Example of program ■ Regarding the specification of acceleration/deceleration time For specifying acceleration/deceleration time, No. of steps and initial speed, set the value to be calculated by the formula below.
Page 881
● This instruction cannot be executed when a control flag corresponding to each channel is on. ● For the FP0H mode, select "Pulse output" for the channel setting corresponding to the system register no. 402.
31.4 [F172(PSLH)] Pulse Output (JOG Operation) 31.4 [F172(PSLH)] Pulse Output (JOG Operation) Outputs the pulse of a specified parameter from a specified channel. ■ Instruction format ( ) F172 PLSH DT10 ■ Operand Operand Settings Starting number of the area in which data tables are registered Target channel for pulse output ■...
Page 883
31.4 [F172(PSLH)] Pulse Output (JOG Operation) Operand Settings Description 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%) Frequency range Not used Output method 00: No counting CW 01: No counting CCW...
Page 884
● When describing the same channel in both the normal program and the interrupt program, be sure to program not to execute them simultaneously. ● For the FP0H mode, select "Pulse output" for the channel setting corresponding to the system register no. 402.
31.5 [F174(SP0H)] Pulse Output (Selectable Data Table Control Operation) 31.5 [F174(SP0H)] Pulse Output (Selectable Data Table Control Operation) Outputs pulses from a specified pulse output channel according to a specified data table. ■ Instruction format ■ Operand Operand Settings Starting number of the area in which data tables are registered Target channel for pulse output ■...
Page 886
31.5 [F174(SP0H)] Pulse Output (Selectable Data Table Control Operation) ■ Data table settings ① Control code ② Frequency 1 Target value 1 ③ (Pulse number) Frequency 2 Target value 2 (Pulse number) S+2n Frequency n S+2(n+1) Target value n (Pulse number) S+2(n+2) ④...
31.5 [F174(SP0H)] Pulse Output (Selectable Data Table Control Operation) Operand Settings Description Range Initial speed Maximum speed High K50 to K100000 K50 to K100000(50Hz to speed 100kHz) (50Hz to 100kHz) 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.
Page 888
F174(SP0H) instruction has turned ON. ● This instruction cannot be executed when a control flag corresponding to each channel is ● For the FP0H mode, select "Pulse output" for the channel setting corresponding to the system register no. 402. ● For the FPsigma mode, select "Do not use high-speed counter" for the channel setting corresponding to the system register nos.
Page 889
31.5 [F174(SP0H)] Pulse Output (Selectable Data Table Control Operation) ● When the control code or frequency 1 is any value outside of the settable range, an operation error occurs. (When the data of the frequency 1 is 0, nothing is executed and the operation ends.) ●...
■ Instruction format ■ Operand Operand Settings Starting number of the area in which data tables are registered FP0H mode: 0 or 2, FPsigma mode: 0 (Fixed) ■ Memory area type that can be specified Constant Index Operand modifier ●...
Page 891
31.6 [F175(SPSH)] Pulse Output (Linear Interpolation) ■ Data table settings ① Control code Composite speed Initial speed Fmin(Hz) ② Composite speed Setting area Maximum speed Fmax(Hz) Specify by user programs. Acceleration/deceleration time ③ T(ms) X-axis Target value (Movement amount) ④ Y-axis S+10 Target value (Movement amount)
Page 892
31.6 [F175(SPSH)] Pulse Output (Linear Interpolation) Operand Settings Description Fmin(Hz) (However, for 1.5 Hz, the angle is 0 degree or 90 degrees only. Also, for specifying 1.5 Hz, specify K1.) ● When the component speed becomes lower than the minimum speed in each frequency range, it will be a corrected component speed.
Page 893
31.6 [F175(SPSH)] Pulse Output (Linear Interpolation) Settin Operand Description Y-axis Comp onent S+16 speed Initial speed Fymin Y-axis Comp onent speed S+18 Maxim speed Fymax X-axis The frequency ranges are automatically selected by the system for the components of each axis. Frequ S+20 ency...
Page 894
● When describing the same channel in both the normal program and the interrupt program, be sure to program not to execute them simultaneously. ● For the FP0H mode, select "Pulse output" for the channel setting corresponding to the system register no. 402.
32.1 F420 LOGST (Logging trace start request) 32.1 F420 LOGST (Logging trace start request) Requests to start a logging trace. ■ Instruction format ■ Operands Items Settings Number of logging trace requested to start ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
32.2 F421 LOGED (Logging trace stop request) 32.2 F421 LOGED (Logging trace stop request) Requests to stop a logging trace. ■ Instruction format ■ Operands Items Settings Number of logging trace requested to stop ■ Devices that can be specified (indicated by ●) Constant Integer Operand...
32.3 F422 LOGSMPL (Sampling Trace) 32.3 F422 LOGSMPL (Sampling Trace) Requests data logging for logging trace. ■ Instruction format ■ Operands Items Settings Logging trace number for data logging ■ Devices that can be specified (indicated by ●) Constant Integer Operand Index WX WY WR WL SV...
33.1 Common Precautions for SD Memory Card Access Instructions 33.1 Common Precautions for SD Memory Card Access Instructions ■ Instruction operation ● At the start of instruction execution, checks are conducted to confirm whether a SD memory card is inserted or not, if the cover is closed, and whether the card is write-protected or not. ●...
Page 901
33.1 Common Precautions for SD Memory Card Access Instructions Code Name Description Related instructions Code that cannot be specified for a file name is used. Folder access and file access Specified file name error instructions There are too many hierarchies for the specified folder.
Page 902
33.1 Common Precautions for SD Memory Card Access Instructions ● When specifying a non-existent folder when using instructions F437 CWT, F429 CMKDIR or F433 CPR, only a subfolder directly under the parent folder can be automatically created. Two or more new folders cannot be created by one instruction. If specifying more than two folders, a no specified file error occurs.
Page 903
33.1 Common Precautions for SD Memory Card Access Instructions <Example> When specifying 5 for the number of characters, and "ABCDE" for the character data table "B" "A" "D" "C" "E" Byte address Higher Lower ● Include the extension in the file name specification. WUMJ-FP0HPGR-091 33-5...
33.2 F425 CDTWT (File Write of Operation Memory in BIN Format) 33.2 F425 CDTWT (File Write of Operation Memory in BIN Format) ■ Instruction format ■ Operands Items Settings Starting address of the operation memory device storing the data to be written. Number of data items to be written.
Page 905
33.2 F425 CDTWT (File Write of Operation Memory in BIN Format) [S] …DT110 [n] …K5 [D] …10 H 0108 DT108 File dt010.bin (16-bit binary format) H 0109 DT109 DT110 H 0110 1001110112 0113011401 H 0111 DT111 H 0112 DT112 DT113 H 0113 DT114 H 0114...
33.3 F426 CDTRD (Read from BIN Format File to Operation Memory) 33.3 F426 CDTRD (Read from BIN Format File to Operation Memory) ■ Instruction format ■ Operands Items Settings Number of the file (three digits) in the SD memory card on which the data to be read is stored. Range: 0 to 999 Number of data items to be read.
Page 907
33.3 F426 CDTRD (Read from BIN Format File to Operation Memory) [S] …10 [n] …K5 [D] …DT110 H 0108 DT108 H 0108 DT108 File dt010.bin (16-bit binary format) H 0109 H 0109 DT109 DT109 DT110 H 0110 DT110 H 0225 25022602270228022902 H 0111 H 0226...
33.4 F427 CWT (File Data Write Instruction) 33.4 F427 CWT (File Data Write Instruction) ■ Instruction format ■ Operands Items Settings Starting address of the device storing the data to be written (data format: unsigned 16-bit integer) Number of write data items (data format: unsigned 16-bit integer) Starting address of the device storing the path name and number of characters of the file to be written Specify the number of characters in [D1] and the path name (folder name + file name: maximum 256 characters) in [D1+1] and following addresses...
Page 909
33.4 F427 CWT (File Data Write Instruction) 2: When rewriting a file, a 0-byte file is created. 3: When appending to a file, only the file date is changed. ■ [D1]: Specification of folder and file name Setting device Description Specifies the number of characters used in the folder name and file name of the file to be written.
Page 910
33.4 F427 CWT (File Data Write Instruction) ■ [D2+1]: Specification of write mode Set value of D2+1 Description Deletes the file contents and then writes data. When no file exists, a new one 0: New file mode is created. Writes additional data from the end of the file. When no file exists, a new one is 1: Add mode created.
Page 911
33.4 F427 CWT (File Data Write Instruction) Specified Description bits 1 to 255: Line breaks are inserted in comma-separated data the specified number of times. [D2] When K10 ASCII or K11 BIN is specified for the save format, the line break setting is invalid.
Page 912
33.4 F427 CWT (File Data Write Instruction) [D2] Write format Zero suppression: ON (zero suppression Zero suppression: OFF (no performed) zero suppression) ␣␣␣␣␣␣␣␣␣- 1 -0000000001 ␣␣␣␣␣␣␣␣␣␣␣␣ 0 ␣000000000000 ␣␣␣␣␣␣␣␣␣␣␣ - 1 -000000000001 Floating point real number ␣␣␣␣␣␣␣␣1E-10 ␣00000001E-10 32bit ␣␣␣␣␣1.234567 ␣00001.234567 -3.402823E+38 -3.402823E+38...
Page 913
33.4 F427 CWT (File Data Write Instruction) Write mode Operation Data is written from the end of the file unconditionally. Add mode The writing position (file pointer) is not stored after the writing process is completed. ■ [D2+5], [D2+6]: Number of data items that could be written ●...
Page 914
33.4 F427 CWT (File Data Write Instruction) Example 2) ● Five items of unsigned 32-bit integer data (10 words) are read from the area starting from device DT4. The read data is written to the file "\abc\data1.csv" in the SD memory card in new file mode.
Page 915
33.4 F427 CWT (File Data Write Instruction) [D1] …"¥abc¥data1.csv" [D2] …DT100 [S] …DT2 [n] …K5 DT1 K123 ・・・Head of device to be K1234 read K12345 K567 K5678 K56789 Written file: data1.csv DT100 ・・・Writing format 00123,01234,12345 (0Dh)(0Ah) H 0000 DT101 ・・・Writing mode 00005,00056 (0Dh)(0Ah) DT102 H 0003...
Page 916
Example 6) ● 10,000 items of signed 16-bit integer data (10,000 words) are read from the area starting from device DT10000. The read data is written to "\FP0H\DT.CSV" in the SD memory card in new file mode. ● A blank line is inserted in the data through zero suppression, and a line break (0Dh+0Ah) is inserted at the 10th data separation and at the end of the file.
Page 918
33.4 F427 CWT (File Data Write Instruction) [D1] …"¥abc¥data1.bin" [D2] …DT100 [S] …DT2 [n] …K5 DT1 K123 ・・・Head of K1234 device to be read K12345 K567 K5678 K56789 Written file: data1.bin DT100 ・・・Writing format H 0000 DT101 ・・・Writing mode 7B00D204393005003800 DT102 H 0000 ・・・Option (*)
Page 919
33.4 F427 CWT (File Data Write Instruction) [D1] …"¥abc¥data1.bin" [D2] …DT100 [S] …DT2 [n] …K5 DT1 K123 ・・・Head of device to be K1234 read K12345 K567 K5678 K56789 Written file: data1.bin 111122227 B00D2043930050038008888 DT100 ・・・Writing format DT101 H 0002 ・・・Writing mode File pointer DT102 H 0000...
Page 920
33.4 F427 CWT (File Data Write Instruction) Name Description Turns ON when a value outside the specifiable range is specified in the area reserved for the system. 33-22 WUMJ-FP0HPGR-091...
33.5 F428 CRD (Read File Data) 33.5 F428 CRD (Read File Data) ■ Instruction format ■ Operands Items Description Starting address of the device storing the path name and number of characters in the file from which to read data Specify number of characters in [S1] and the path name in [S1+1] and later (folder name + filename: maximum 256 characters) Starting address of the device where parameters related to data to be read are stored...
Page 922
33.5 F428 CRD (Read File Data) Setting device Description Specify the file path of the file to be read. S1+1 to S1+128 ● Specify the full path, up to 256 characters including the folder name and file name (Note 1) When using the tool software FPWIN GR7, you can directly enter the path name (folder name and file name) as character constants.
Page 923
33.5 F428 CRD (Read File Data) ■ [S2+1]: Specification of reading mode Set value of S2+1 Description 0: Normal mode Always reads data from the beginning of the file. Always reads data from the beginning of the file. 1: Normal mode *The same operation as mode 0.
33.5 F428 CRD (Read File Data) Example 2: When the number of data items to be read is 40 and 30 data items exist in the file, the first 30 data items read from the beginning of the file are stored. Example 3: When the number of read characters is 40 and 100 characters exist in the file, the first 40 characters read from the beginning of the file are stored.
Page 925
33.5 F428 CRD (Read File Data) ● As the "Reading position specification mode 1" is selected, the file pointer moves after reading. [n] …K5 [D] …DT102 [S1] …"¥abc¥data1.csv" [S2] …DT50 DT50 ・・・Reading format H 0002 DT51 ・・・Reading mode DT52 H 0000 ・・・Reserved for system DT53 H 00000000...
Page 926
33.5 F428 CRD (Read File Data) [n] …K5 [D] …DT102 [S1] …"¥abc¥data1.csv" [S2] …DT50 DT50 ・・・Reading format H 0002 DT51 ・・・Reading mode DT52 H 0000 ・・・Reserved for system DT53 H 00000000 ・・・Reading position DT54 DT55 ・・・No. of read data DT56 Data content of file "data1.csv"...
Page 927
File pointer Example 5) ● Read 10000 data items from the file "\FP0H\DT.CSV" in an SD memory card. The read data is stored in the area starting from DT10000 (10000 words) as 16-bit signed integer data. ● As the "Normal mode 0" is selected, data is always read from the beginning of the file.
Page 928
33.5 F428 CRD (Read File Data) [S1] …"¥FP0H¥DT.CSV" [S2] …DT50 [n] …K10000 [D] …DT10000 DT50 ・・・Reading format H 0000 DT51 ・・・Reading mode DT52 H 0000 ・・・Reserved for system DT53 H 00000000 ・・・Reading position DT54 DT55 ・・・No. of read data DT56 Data content of file "DT.CSV“...
Page 929
33.5 F428 CRD (Read File Data) ● When reading ASCII data, correct processing may not be possible if there are delimiters (commas and/or line break codes) in the data. ● Specify the points at which each data is separated for [S2+3] and [S2+4] reading positions (file pointers).
33.6 F429 CMKDIR (create directory) 33.6 F429 CMKDIR (create directory) ■ Instruction format ■ Operands Items Settings Starting address of device storing the path name and number of characters of the folder to be created Specify number of characters in [S] and path name in [S+1] onwards (folder name: maximum 256 characters) ■...
Page 931
33.6 F429 CMKDIR (create directory) ■ Processing examples Example 1) When creating folder "\abc" within the SD memory card ・・・ No. of characters of folder name “a” “¥” ・・・ Folder name “c” “b” H 0000 H 0000 H 0000 Byte address High memory memory...
Page 932
33.6 F429 CMKDIR (create directory) ● The SD memory card access instruction execution in progress flag (R917A) turns ON from when the execution condition turns ON to when execution of the instruction is complete. During this time other SD memory card access instructions cannot be executed. ●...
33.7 F430 CRMDIR/F431 CRMDIRFL (Directory Deletion) 33.7 F430 CRMDIR/F431 CRMDIRFL (Directory Deletion) ■ Instruction format ■ Operands Items Settings Starting address of the device storing the path name and number of characters of the folder to be deleted Specify the number of characters in [S] and the path name in [S+1] and later (folder name: maximum 256 characters) ■...
Page 934
33.7 F430 CRMDIR/F431 CRMDIRFL (Directory Deletion) Setting device Description Specifies the name of the folder to be deleted. (Full path specification of folder name up to S+1 to S+128 256 characters) (Note 1) Path names (folder names) can be directly input with character constants using the tool software FPWIN GR7.
Page 935
33.7 F430 CRMDIR/F431 CRMDIRFL (Directory Deletion) Example 2: When deleting folder "\abc\def" from the SD memory card ・・・No. of characters of folder name “a” “¥” ・・・ Folder name “b” “c” “d” “¥” “f” “e” H 0000 High Byte address memory memory card card...
Page 936
33.7 F430 CRMDIR/F431 CRMDIRFL (Directory Deletion) Name Description R9007 Turns ON if the specified destination is an out-of-range device R9008 when the device specification is indirect access (index modification). (ER) 33-38 WUMJ-FP0HPGR-091...
33.8 F432 CFDEL (delete file) 33.8 F432 CFDEL (delete file) ■ Instruction format ■ Operands Items Settings Starting address of the device storing the path name and number of characters of the file to be deleted Specify number of characters in [S] and path name in [S+1] onwards (folder name + file name: maximum 256 characters) ■...
Page 938
33.8 F432 CFDEL (delete file) ■ Processing examples e.g. Deleting the file "\abc\data1.csv" within the SD memory card ① “a” “¥” “c” “b” “d” “¥” ② “t” “a” “1” “a” “c” “.” “v” “s” Byte address High ¥abc ¥abc data1.csv ■...
33.9 F433 CPR (ASCII Data Write into File) 33.9 F433 CPR (ASCII Data Write into File) ■ Instruction format ■ Operands Items Description Starting address of the device that stores the string data to be written, or the string Specify the number of characters in [S] and the string data (maximum 4096 characters) in [S+1] and following addresses Starting address of the device that stores the path name of the file to be written to and the number of characters...
Page 940
33.9 F433 CPR (ASCII Data Write into File) Setting device Description Specify the number of characters of the file name to be written. (Full path specification) Specify the file to be written. D+1 to D+128 ● The full path configuration is up to a maximum of 256 characters including the folder name + filename ■...
Page 941
33.9 F433 CPR (ASCII Data Write into File) ■ Precautions for programming ● Also refer to section "33.1 Common Precautions for SD Memory Card Access Instructions". ● The SD memory card access instruction execution in progress flag (R917A) turns ON from when the execution condition turns ON to when execution of the instruction is complete.
33.10 F434 CRD1 (Read one line from file) 33.10 F434 CRD1 (Read one line from file) ■ Instruction format ■ Operands Items Settings Starting address of the device storing the path name and number of characters in the file from which to read data Specify number of characters in [S] and the path name in [S+1] and later (folder name + filename: maximum 256 characters)
Page 943
33.10 F434 CRD1 (Read one line from file) ■ [D2] to [D2+3]: Specification of read position and upper limit Setting device Settings Details Specifies the byte position from the start of the file. Line break characters [CR(0DH) or LF(0AH)] are each counted as one character. After the instruction is executed, [D2, D2+1] is updated with a read Read position pointer value that has had the number of bytes that were read added...
Page 944
33.10 F434 CRD1 (Read one line from file) ■ Processing examples Example 1: When file"\data1.txt" is read with file start set as the read position [S] …DT0 [D1] …DT100 [D2] …DT50 H 0000 DT100 DT50 H 00000000 ・・・From the head of file “d”...
Page 945
33.10 F434 CRD1 (Read one line from file) Example 2: When file"\data1.txt" is read with the 4th byte from the file start set as the read position [S] …DT0 [D1] …DT100 [D2] …DT50 H 0000 DT100 DT50 ・・・Position of 4th byte H 00000004 “d”...
Page 946
33.10 F434 CRD1 (Read one line from file) Example 3: When file"\abc\data1.txt" is read with the 10th byte from the file start set as the read position [S] …DT0 [D1] …DT100 [D2] …DT50 DT100 H 0000 DT50 ・・・ Position of 9th byte H 0000000A “a”...
Page 947
33.10 F434 CRD1 (Read one line from file) ■ Flag operations Name Description R917A (SD memory card access instruction Turns ON when instruction execution starts. Turns OFF when execution in progress) instruction execution is complete. R917B (SD memory card access instruction Turns OFF when instruction execution starts.
33.11 F435 CREN (Rename File) 33.11 F435 CREN (Rename File) ■ Instruction format ■ Operands Items Settings Starting address of the device storing the path name and number of characters of the file to be renamed Specify number of characters in [S1] and the path name in [S1+1] and later (folder name + filename: maximum 256 characters) Starting address of the device storing the path name and number of characters of the renamed file Specify number of characters in [S2] and the path name in [S2+1] and later (folder name + filename:...
Page 949
33.11 F435 CREN (Rename File) ① ① DT50 “a” “¥” DT51 “a” “d” “c” “b” DT52 “a” “t” ② “d” “¥” DT53 “.” “2” ② “t” “a” DT54 “s” “c” “1” “a” “v” DT55 “c” “.” DT56 “v” “s” Byte address High Byte address High...
33.12 F436 CCOPY (File Copy) 33.12 F436 CCOPY (File Copy) ■ Instruction format ■ Operands Items Settings Starting address of the device storing the path name and number of characters of the copy source file Specify number of characters in [S1], path name in [S1+1] and later (folder name + filename: maximum 256 characters) Starting address of the device storing the path name and number of characters of the copy destination file...
Page 951
33.12 F436 CCOPY (File Copy) Setting device Description Set the number of characters of the name of the file to be copied. (Full path specification) Specify the file to be copied. S1+1 to S1+128 ● The full path configuration is up to a maximum of 256 characters including the folder name + filename ■...
Page 952
33.12 F436 CCOPY (File Copy) ① ① DT50 H 0000 DT90 “a” “¥” DT51 “d” “¥” “c” “b” DT52 “f” “e” DT53 “d” “¥” “t” “¥” ② ② “t” “a” DT54 “s” “e” “1” “a” DT55 “1” “t” “c” “.” “c”...
33.13 F437 CMV (File Transfer) 33.13 F437 CMV (File Transfer) ■ Instruction format ■ Operands Items Settings Starting address of the device that stores the path name and number of characters of the file to be transferred Specify number of characters in [S1], path name in [S1+1] and later (folder name + filename: maximum 256 characters) Starting address of the device that stores the path name and number of characters of the destination file...
Page 954
33.13 F437 CMV (File Transfer) Setting device Description Set the number of characters in the name of the file to be transferred. (Full path specification) Specify the file to be transferred. S1+1 to S1+128 ● The full path configuration is up to a maximum of 256 characters including the folder name + filename ■...
Page 955
33.13 F437 CMV (File Transfer) ① ① DT50 H 0000 DT90 “a” “¥” DT51 “d” “¥” “c” “b” DT52 “f” “e” ② ② DT53 “d” “¥” “t” “¥” “t” “a” DT54 “s” “e” “1” “a” DT55 “2” “t” Byte address Byte address High High...
33.14 F438 CFREE (SD memory card free space acquisition: byte units) 33.14 F438 CFREE (SD memory card free space acquisition: byte units) ■ Instruction format ■ Operands Items Settings Starting address of the device storing the acquired free space in byte units ■...
Page 957
33.14 F438 CFREE (SD memory card free space acquisition: byte units) Name Description Indicates the execution results when instruction execution is R917C (SD memory card access instruction complete. execution results) Normal end = 0, abnormal end = 1 R9007 Turns ON if the specified destination is an out-of-range device R9008 when the device specification is indirect access (index modification).
33.15 F439 CFREEK (SD Memory Card Free Space Acquisition: Kilobyte Units) 33.15 F439 CFREEK (SD Memory Card Free Space Acquisition: Kilobyte Units) ■ Instruction format ■ Operands Items Settings Starting address of the device storing the acquired free space in kilobyte units ■...
Page 959
33.15 F439 CFREEK (SD Memory Card Free Space Acquisition: Kilobyte Units) Name Description Indicates the execution results when instruction execution is R917C (SD memory card access instruction complete. execution results) Normal end = 0, abnormal end = 1 R9007 Turns ON if the specified destination is an out-of-range device R9008 when the device specification is indirect access (index modification).
33.16 F440 CFLS (File status acquisition) 33.16 F440 CFLS (File status acquisition) ■ Instruction format ■ Operands Items Settings Starting address of the device storing the path name and number of characters to acquire from the file from which the file status is to be read. Specify number of characters in [S] and the path name in [S+1] and later (folder name + filename: maximum 256 characters) Starting address of the device storing the acquired file status...
Page 961
33.16 F440 CFLS (File status acquisition) Device storing acquired Acquired contents result File size: Stored as a decimal number. Year (0 to 99) Month (1 to 12) Day (1 to 31) Last modified: Stored as a decimal number. Hours (0 to 23) Minutes (0 to 59) Seconds (0 to 59) ■...
Page 962
33.16 F440 CFLS (File status acquisition) ■ Flag operations Name Description R917A (SD memory card access instruction Turns ON when instruction execution starts. Turns OFF when execution in progress) instruction execution is complete. R917B (SD memory card access instruction Turns OFF when instruction execution starts. Turns ON when execution complete) instruction execution is complete.
● It is recommended to avoid frequent execution of this instruction and to execute it as a differential instruction. ● This is a dedicated instruction for use with SD memory cards manufactured by Panasonic. It cannot be used with any other SD memory cards. The Panasonic SD memory card series compatible with this instruction are shown below.
Page 964
33.17 F441 PanaSD (Read of lifetime information of Panasonic SD card) ■ Execution result storage area Operands Items Description Stores the execution result code. HFFFF: Executing Execution result H0: Normal end code [D1] H1: Dual-boot error (Note 1) H2: SD memory card cover open error...
Page 965
33.17 F441 PanaSD (Read of lifetime information of Panasonic SD card) ■ Flag operations Name Description R9007 Set when the [D2] to [D2+2] range exceeds the accessible range. R9008 Set when executed in an interrupt program. (ER) WUMJ-FP0HPGR-091 33-67...
34.1 F460 IPv4SET (Ipv4 Address Setting) 34.1 F460 IPv4SET (Ipv4 Address Setting) ■ Instruction format R9341 F469 K100 ( ) UNITSEL F460 “IP=192.168.1.5,MASK=255.255.255.0, IPv4SET GWIP=192.168.1.1” (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No.
Page 969
34.1 F460 IPv4SET (Ipv4 Address Setting) ● If this instruction is executed when IP address is outside the permissible range, a special relay R9009 (carry flag CY) is set, and no operation is performed. Check"List of usable IP addresses". ● This instruction can be executed when the Ethernet initialization in progress flag (R9341) is OFF.
34.1 F460 IPv4SET (Ipv4 Address Setting) ● Once initialization is requested, the unit will close all connections and disconnect communication. ● The unit turns OFF the IP address established flag (R9342) and initializes the Ethernet unit with the value specified in the system work area. ●...
Page 972
34.1 F460 IPv4SET (Ipv4 Address Setting) Name Description To be set when executed in an interrupt program. Set when the number of characters for operand specifying character constant exceeds 256. Set in the case of execution while IP address is incorrect. The detailed code to be set in DT90529 is"1: Incorrect IP address specification".
34.2 F461 CONSET (Connection Setting) 34.2 F461 CONSET (Connection Setting) ■ Instruction format (Note 1) Specify S1=K100 (Ethernet communication) in advance using F469 UNITSEL instruction. (Note 2) By copying & pasting the following text into the instruction list box of FPWIN GR7, the operand section of the program example above can be entered.
Page 974
34.2 F461 CONSET (Connection Setting) ● If the connection within the range specified byD1andD2includes the connection of a multi- connection server, an operation error occurs. ● If an incorrect IP address is specified, a special relay R9009 (carry flag CY) is set, and no operation is performed.
Page 975
34.2 F461 CONSET (Connection Setting) Items Settings MEWDAT : Specify MEWTOCOL-DAT. MC3EBIN : Specify MC Protocol (3E BINARY). : Specify general-purpose communication. Specify protocol options. Available options differ according to operation modes. OPTAV: Option available; OPTNAV: Option not available Option is not Operation mode selection Option is available.
Page 976
34.2 F461 CONSET (Connection Setting) Open method (Automatic / Manual): Open automatically, Communication type: TCP/IP Exampl “GP,OPTNAV,SV,AUTO,TCP” Operation mode setting: GP, Option setting: Option not available, Settings Open method (Server / Client): Server (any destination unit), Open method (Automatic / Manual): Open automatically, Communication type: TCP/IP ■...
Page 977
34.2 F461 CONSET (Connection Setting) Items Settings * When specifying IPv4, 000.000.000.000 (0.0.0.0) cannot be specified. * When specified, CY flag (R9009) turns ON and “1” (IP address error) is set to (Essential) DT90529, and the process is terminated. * An operation error does not occur. The setting is not made. Destination Specify the port No.
Page 978
34.2 F461 CONSET (Connection Setting) ● When the operation mode of S1 is set to general-purpose communication, a general-purpose receive buffer can be set. Perform setting by adding a general-purpose receive buffer size to the general-purpose receive buffer starting address, from the setting start connection number to the setting end connection number.
Page 979
34.2 F461 CONSET (Connection Setting) ■ OperandD1setting ● Specify either the device address storing a setting start connection number, or a constant. Items Settings Setting range Setting start connection No. Specify a setting start connection No. 1 to max. 9 ■...
34.3 F462 OPEN (Connection Open) 34.3 F462 OPEN (Connection Open) ■ Instruction format (Note 1) Specify S1=K100 (Ethernet communication) in advance using F469 UNITSEL instruction. ■ Operand Items Settings Either the device address storing a connection number to be opened, or a constant. ■...
Page 981
34.3 F462 OPEN (Connection Open) ● This instruction is not available in interrupt programs. ■ Operand S setting Specify either the device address storing a connection number to be opened, or a constant. Setting Items Settings range Connection No. Specify a connection No. 1 to 9 ■...
34.4 F463 CLOSE (Connection Close) 34.4 F463 CLOSE (Connection Close) ■ Instruction format (Note 1) Specify S1=K100 (Ethernet communication) in advance using F469 UNITSEL instruction. ■ Operand Items Settings Either the device address storing a connection number to be closed, or a constant. ■...
Page 983
34.4 F463 CLOSE (Connection Close) ■ Precautions for programming ● Immediately before this instruction, insert F469 (UNITSEL) instruction, and specify the unit (Ethernet communication) and connection No. ● This instruction is not available in interrupt programs. ■ Operand S setting Specify either the device address storing a connection number to be closed, or a constant.
34.5 F464 RDET (Ethernet Status Read) 34.5 F464 RDET (Ethernet Status Read) ■ Instruction format (Note 1) Specify S1=K100 (Ethernet communication) in advance using F469 UNITSEL instruction. ■ Operand Items Settings Stored in the starting 7-word area (D to D+6) that stores status information. ■...
Page 985
34.5 F464 RDET (Ethernet Status Read) ■ Ethernet status information Operan Data name Stored data Lower word 0: Other than Connection status “Connected” summary Higher word The data is stored in the 1: Connected corresponding bit allocated in Lower word 0: Close the table below.
Page 986
34.5 F464 RDET (Ethernet Status Read) Name Description When connection specified by F469 (UNITSEL) does not exist, or the value is outside the range (ER) The device to store parameters specified by D is incorrect. 34-20 WUMJ-FP0HPGR-091...
34.6 F465 ETSTAT (EtherNet Information Acquisition) 34.6 F465 ETSTAT (EtherNet Information Acquisition) ■ Instruction format (Note 1) The figure above shows the case of specifying S1=K100 (Ethernet communication) and S2=K1 (connection No. 1) using F469 (UNITSEL) instruction. (Note 2) By copying & pasting the the following text into the instruction list box of FPWIN GR7, the operand section of the program example above can be entered.
Page 988
34.6 F465 ETSTAT (EtherNet Information Acquisition) ■ Precautions for programming ● Immediately before this instruction, insert F469 (UNITSEL) instruction, and specify the unit (Ethernet communication) and connection No. ● InS1andS2, specify either the starting address of a device that stores string data representing information to be read, or a character constant.
Page 989
34.6 F465 ETSTAT (EtherNet Information Acquisition) Storage Number Form S1S2 Name Description destination of words Master unit IP address Deci DtoD+3 Master unit IPv4 address (IPv4) Deci D+4toD+7 Subnet mask (IPv4) Subnet mask Deci S1: “IPv4” D+8toD+11 Default gateway (IPv4) Default gateway “CONNECT”...
Page 990
34.6 F465 ETSTAT (EtherNet Information Acquisition) Value Description H00C0 (K192) H00A8 (K168) The master unit IPv4 address is stored. Example) In the case of 192.168.5.30: H0005 (K5) H001E (K30) H00FF (K255) H00FF (K255) The subnet mask is stored. Example) In the case of 255.255.255.0: H00FF (K255) H0000 (K0) H00C0 (K192)
34.7 P466 NTPcREQ (Time Adjustment Request) 34.7 P466 NTPcREQ (Time Adjustment Request) The P466 NTPcREQ instruction can be used with the unit firmware Ver. 1.80 or later. ■ Instruction format R9362 F469 UNITSEL K100 P466 NPTcREQ (Note 1) The figure above shows the case of specifying K1=U100 (Ethernet communication) and S2=K1 (connection No.
Page 992
34.7 P466 NTPcREQ (Time Adjustment Request) ● Store the execution result of the time adjustment in the area starting withD. ● Set the time adjustment timeout usingF467 NTPcSV instruction or Ethernet setting>SNTP>Timeout period. If the number of processing times is set to more than one, the next request is started after an elapse of the timeout period + processing intervalS2seconds.
Page 993
34.7 P466 NTPcREQ (Time Adjustment Request) ■ Execution result codeD ● In the case of a request error (10 to 15), the time adjustment request set when the instruction is executed is aborted. ● The communication error (20) occurs when no response is returned from the server after time adjustment is requested.
Page 994
34.7 P466 NTPcREQ (Time Adjustment Request) When instruction is executed Time is being adjusted. Time adjustment response timeout Value Value Value DT10 HFFFF DT10 HFFFF DT10 DT11 DT11 DT11 Timeout in 41 secondsS1*3+(S2*(S1-1)) seconds ● Total timeout period = 3 seconds × 3 ●...
Page 995
34.7 P466 NTPcREQ (Time Adjustment Request) 1) Normal execution Instruction execution Number of processing times (S1) = 2 Number of processing times= 2 Waiting for NTP request 1st request 2nd request processing interval Execution result area H FFFF H0 or H20 or H30 2) Process cancellation while the NTP request is being made Instruction execution Number of processing...
Page 996
34.7 P466 NTPcREQ (Time Adjustment Request) ■ Flag operations Name Description Turns ON when the area is exceeded in index modification. R9007 R9008 Set when the unit specified by F469 UNITSEL is not the built-in Ethernet unit. (ER) Set when executed in an interrupt program. 34-30 WUMJ-FP0HPGR-091...
34.8 F467 NTPcSV (NTP Destination Server Setting) 34.8 F467 NTPcSV (NTP Destination Server Setting) The F467 NTPcSV instruction can be used with the unit firmware Ver. 1.80 or later. ■ Instruction format R9341 F469 UNITSEL K100 ( ) “IPv4=192.168.1.1, F467 NTPcSV “DAY0900”...
34.8 F467 NTPcSV (NTP Destination Server Setting) ● If the settings have already been made by the Ethernet configuration data, the data becomes invalid. The NTP time acquisition request is executed at the timing specified by this instruction. ● The settings remain valid until the power is turned OFF. Even when the settings are changed by the following operation, they remain valid until the mode is changed from the PROG mode to the RUN mode.
Page 999
34.8 F467 NTPcSV (NTP Destination Server Setting) Example 4 "" Settings NTP server (Ipv4): Not change, Time zone: Not change ■ Setting of operandS2 Specify the starting address storing the time acquisition timing setting parameter or a character constant. ● A part of parameters can be omitted. The settings are not changed when parameters are omitted partially.
Page 1000
34.8 F467 NTPcSV (NTP Destination Server Setting) Example 3 ",WEEK=01234" Settings Specified time once a day: Not change, Specified day of the week once a week: Once a week on Sunday at 12:34, Specified date and time once a month: Not change Example 4 ",,MONTH=112233"...
Need help?
Do you have a question about the FP0H and is the answer not in the manual?
Questions and answers