Panasonic FP7 Series Command Reference Manual

Panasonic FP7 Series Command Reference Manual

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

Quick Links

WUME-FP7CPUPGR-12
2022.11
panasonic.net/id/pidsx/global
PROGRAMMABLE CONTROLLER
FP7 CPU Unit
Command Reference Manual
[Applicable Models]
FP7 CPU Unit
● CPS4RE/CPS3RE/CPS3R/CPS2R
● CPS4RES/CPS3RES/CPS3RS

Advertisement

Table of Contents
loading

Summary of Contents for Panasonic FP7 Series

  • Page 1 PROGRAMMABLE CONTROLLER FP7 CPU Unit Command Reference Manual [Applicable Models] FP7 CPU Unit ● CPS4RE/CPS3RE/CPS3R/CPS2R ● CPS4RES/CPS3RES/CPS3RS WUME-FP7CPUPGR-12 2022.11 panasonic.net/id/pidsx/global...
  • Page 2 (MEMO) WUME-FP7CPUPGR-12...
  • Page 3 Types of Manual ● There are different types of user’s manual for the FP7 series, as listed below. Please refer to a relevant manual for the unit and purpose of your use.
  • Page 4 Unit name or purpose of Manual name Manual code FP7 Positioning Unit FP7 Positioning Unit User’s Manual WUME-FP7POSP FP7 Serial Communication FP7 Series User’s Manual (SCU Communication) WUME-FP7COM Unit FP7 Multi-wire Link Unit FP7 Multi-wire Link Unit User’s Manual WUME-FP7MW FP7 Motion Control Unit FP7 Motion Control Unit User’s Manual...
  • Page 5 Copyright and Trademarks ● Panasonic Industrial Devices SUNX Co., Ltd. owns the copyright of this manual. ● Unauthorized copying of this document is strictly prohibited. ● Windows, is a registered trademark of the Microsoft Corporation in the USA and in other nations.
  • Page 6 Indicates supplemental information. Indicates details about the subject in question or information useful to remember. Indicates operation procedures. WUME-FP7CPUPGR-12...
  • Page 7: Table Of Contents

    Table of Contents 1 List of Instructions................1-1 1.1 List of Basic Instructions ..............1-2 1.2 List of High-level Instructions ..............1-8 2 Overview of Instructions ..............2-1 2.1 Structure of Instructions ..............2-3 2.1.1 Structural patterns of basic instructions ........... 2-3 2.1.2 Structural patterns of high-level instructions ........2-4 2.2 Operation unit ..................2-10 2.3 Operation device list ................2-12 2.4 Specification of Device Numbers ............2-15...
  • Page 8 2.9 Range of data that can be handled in the PLC ........2-47 2.10 Overflow and Underflow..............2-49 3 Basic Instructions .................3-1 3.1 ST, ST/, OT (START, START NOT, OUT) ...........3-3 3.2 AN, AN/ (AND, AND NOT)..............3-5 3.3 OR, OR/ (OR, OR NOT) ..............3-6 3.4 ST↑, ST↓...
  • Page 9 3.35 SBL (Subroutine Label), RET (Subroutine Return)......3-109 3.36 CALL (Local Subroutine Call), FCALL (Output OFF Type Local Subroutine Call) ..................3-111 3.37 ECALL (Subroutine Call (with PB No. Specification)) .......3-113 3.38 EFCALL (Forced Output OFF Type Subroutine Call (with PB No. Specification)) ..................3-115 3.39 INTPG (Unit Interruption Program Start), IRET (Unit Interruption Program End)..................3-117...
  • Page 10 5.18 PUSHIX (Index Register Backup) .............5-42 5.19 POPIX (Index Register Recovery) ............5-44 6 High-level Instructions (Arithmetic/Logic Operations) .....6-1 6.1 ADD (Addition) ..................6-2 6.2 SUB (Subtraction) ................6-4 6.3 MUL (Multiplication) ................6-6 6.4 MLCLIP (Saturation Multiplication) .............6-9 6.5 DIV (Division) ..................6-11 6.6 DIVMOD (Division (With a remainder))..........6-13 6.7 DIVFP2 (Division (FP2 Compatible)) ..........6-15 6.8 INC (Increment) ..................6-18 6.9 DEC (Decrement) ................6-20...
  • Page 11 7.15 GBIN (Conversion: Gray Code → BIN)..........7-34 7.16 COLM (Conversion: Bit Line → Bit Column)........7-36 7.17 LINE (Conversion: Bit Column → Bit Line) ........7-38 8 High-level Instructions (Data Shift and Rotation) ......8-1 8.1 SHR (Right Shift for n Bits) ..............8-2 8.2 SHL (Left Shift for n Bits) ..............8-4 8.3 BSR (Right Shift for n Digits) ..............8-6 8.4 BSL (Left Shift for n Digits) ..............8-8...
  • Page 12 10.4 MIN (Acquiring the Minimum Value) ..........10-13 10.5 MEAN (Acquiring the Total and the Mean Value)......10-19 10.6 SORT (Sort) ..................10-24 10.7 SCAL (Linearization).................10-27 10.8 STDDEV (Acquiring the Variance and Standard Deviation) .....10-30 10.9 EVENTC (Instruction to Count the Number of Events) .....10-33 10.10 EVENTT (Instruction to Count the Time of Events) ......10-36 10.11 PID (PID Operation) ................10-39 10.12 EZPID (PID Operation: PWM Output Available) ......10-45...
  • Page 13 11.22 STOD (Conversion: Single-precision Real Number Data → Double-precision Real Number)............11-45 11.23 DTOS (Conversion: Double-precision Real Number Data → Single-precision Real Number) .............11-47 11.24 DISF (Separation of Mantissa and Exponent of Single-precision or Double-precision Real Number Data) ..........11-49 11.25 UNIF (Combining of Mantissa and Exponent, and Conversion of Single-precision or Double-precision Real Number) ......11-52 11.26 FLT (Conversion: Integer →...
  • Page 14 13.7 OPHSAVE (Operation History Save to SD Card) ......13-11 13.8 ERR (Self-Diagnostic Error Code Set)..........13-13 13.9 WDTRES (Watchdog Timer Reset) ..........13-15 13.10 SCOPY (System Area Copy) ............13-16 13.11 GETSTNO (Acquiring Starting Word Number of Specified Slot)..13-18 13.12 POSSET (Setting of Positioning Starting Table) ......13-19 13.13 PSTRD (Acquiring Axis Status) ............13-21 13.14 PERRD (Acquiring Error/Warning in the Positioning Unit)....13-23 13.15 UCLR (Error/Warning Clear) ............13-26...
  • Page 15 14.28 ETIMEstr (Date and Time Character String Conversion: With Storage Area Size)................14-115 14.29 ESCMP (String Compare: With Storage Area Size) .......14-119 14.30 ESADD (String Addition: With Storage Area Size) ......14-122 14.31 ELEN (Obtainment of String Length: With Storage Area Size)..14-124 14.32 ESSRC (String Search: With Storage Area Size) ......14-126 14.33 ERIGHT (Takeout of the Right Side of a String: With Storage Area Size) .....................14-130...
  • Page 16 17.4 IPv4SET (IP Address Setting)............17-23 17.5 pPINGREQ (PING Request).............17-28 17.6 CONSET (User Connection Setting)..........17-32 17.7 OPEN (Connection Open) ..............17-39 17.8 CLOSE (Connection Close) ..............17-41 17.9 NTPcSV (NTP Destination Server Setting Instruction) .....17-43 17.10 pNTPcREQ (Time Adjustment Request Instruction).......17-47 17.11 FTPcSV (FTP Client Connected Server Setting) ......17-52 17.12 FTPcSET (FTP Client Transfer Setting) .........17-59 17.13 FTPcLOG (FTP Client Logging/Trace Transfer Setting) ....17-69 17.14 FTPcREQ (FTP Client Transfer Request) ........17-73...
  • Page 17 18.13 CFREE (Acquiring SD Memory Card Free Space) ......18-56 18.14 CFREEK (Acquiring SD Memory Card Free Space).......18-58 18.15 CFLS (Acquiring File Status) ............18-60 18.16 PanaSD (Panasonic SD Memory Card Lifetime Information Read)18-63 19 Precautions for programming ............19-1 19.1 Common precautions................19-2 19.2 Clock and Time Data ................19-3...
  • Page 18 (MEMO) xviii WUME-FP7CPUPGR-12...
  • Page 19: List Of Instructions

    1 List of Instructions 1.1 List of Basic Instructions ..............1-2 1.2 List of High-level Instructions ..............1-8 WUME-FP7CPUPGR-12...
  • Page 20: List Of Basic Instructions

    1.1 List of Basic Instructions 1.1 List of Basic Instructions ■ Sequence Basic Instructions Mnemon Page Name Symbol Function overview Begins a logic operation with a normally open Start "P.3-3" contact. Begins a logic operation with a normally closed Start Not "P.3-3"...
  • Page 21 1.1 List of Basic Instructions Mnemon Page Name Symbol Function overview AND Stack Connects the multiple blocks serially. "P.3-18" OR Stack Connects the multiple blocks in parallel. "P.3-20" Push Stack PSHS Stores the operated result up to this instruction. "P.3-22" Reads the operated result stored by the PSHS Read Stack "P.3-22"...
  • Page 22 1.1 List of Basic Instructions Mnemon Page Name Symbol Function overview [S] is specified as 32-bit data (U1 to U4294967295). Down counter For CT16, [S] is specified as 16-bit data (U1 to CT16 "P.3-63" U65535). (16 bit) Increments or decrements from the preset Up/down value [S] based on up/down input.
  • Page 23 1.1 List of Basic Instructions ■ Step ladder instructions Mnemon Page Name Symbol Function overview Header for program "n" which is managed as a Start Step SSTP "P.3-95" process. Starts the specified process "n" and clears Next Step NSTL other running processes. (Every scan execution "P.3-95"...
  • Page 24 1.1 List of Basic Instructions ■ Interrupt Control Instructions Mnemon Page Name Symbol Function overview Interrupt INTPG Head of the interrupt program. "P.3-117" Program Definition Interrupt IRET End of the interrupt program. "P.3-117" Return CPU Interrupt Disables the interrupt to the CPU unit. "P.3-122"...
  • Page 25 1.1 List of Basic Instructions Operatio Mnemon Page Name Symbol Function overview n unit Begins a logic operation in the ST >= "P.3-133" conducting contact if S1 ≥ S2. Begins a logic operation in the ST < "P.3-133" conducting contact if S1 < S2. Begins a logic operation in the ST <= "P.3-133"...
  • Page 26: List Of High-Level Instructions

    1.2 List of High-level Instructions 1.2 List of High-level Instructions ■ Data comparison instructions Operatio Page Name Mnemonic Operand Function overview Unit Compares [S1] and [S2] and outputs the results to the system relay (SRA to SRC). US, SS, (S1) > (S2) → SRA:ON Data compare UL, SL, S1, S2...
  • Page 27 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit US, SS, S, D1, Transfers the data for [S1] to all of the Block Copy UL, SL, COPY "P.5-13" areas between [D1] and [D2]. SF, DF US, SS, Transfers the data between bit addresses Bit Block S1, S2,...
  • Page 28 1.2 List of High-level Instructions ■ Index Register Operation Instructions Operatio Page Name Mnemonic Operand Function overview Unit Index UL, SL PUSHIX (I0) to (IE) → (D) to (D + 29) "P.5-42" Register Backup Index UL, SL POPIX (S) to (S + 29) → (I0) to (IE) "P.5-44"...
  • Page 29 1.2 List of High-level Instructions ■ BCD Data Arithmetic Instructions Operatio Page Name Mnemonic Operand Function overview Unit BCD data S1, S2, US, UL BCDADD (P) (S1) + (S2) → (D) "P.6-22" Addition BCD data S1, S2, US, UL BCDSUB (P) (S1) - (S2) →...
  • Page 30 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit Converts the 16-bit BIN data for [S] to 32- Sign extension US, SS S, D bit BIN data while maintaining the signs, "P.7-8" and stores it in (D+1, D). Converts the BIN data specified with [S] to BCD data, and stores it in the area starting Conversion:...
  • Page 31 1.2 List of High-level Instructions ■ Data shift instruction Operatio Page Name Mnemonic Operand Function overview Unit US, SS, n bits shifted to D, n Shifts [n] bits of the data of [D] to the right. "P.8-2" the right UL, SL US, SS, n bits shifted to D, n...
  • Page 32 1.2 List of High-level Instructions ■ Data buffer instruction Operatio Page Name Mnemonic Operand Function overview Unit Transfer [D2] to [D3]. Any parts of the data D1, D2, Compress shift between [D1] and [D2] that are 0 are US, SS CMPR "P.8-30"...
  • Page 33 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit Carry-Flag − Turns OFF the carry flag (SR9). "P.9-11" Reset ■ Data Processing Instructions Operatio Page Name Mnemonic Operand Function overview Unit Searches for the data of [S1] from the data US, SS, stored in [S2] to [S3], and stores the S1, S2,...
  • Page 34 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit Instruction to Records the ON time in seconds units for "P.10-36" S1, S2, Count the EVENTT the [n] bits of the data specified by [S1], n, D (Note 1) Time of Events and stores it in the area starting with [D].
  • Page 35 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit When (S1) ≤ (S3) ≤ (S2), 0 → (D) Depending on the range of input value [S3], adds up the biases specified by [S1] or US, SS, [S2], and stores the result in [D].
  • Page 36 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit Hyperbolic Tangent SF, DF TANH S, D TANH (S) → (D) "P.11-21" Operation Exponential SF, DF S, D EXP (S) → (D) "P.11-23" Operation Natural Logarithmic SF, DF S, D LN (S) →...
  • Page 37 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit Floating point Determines the absolute values of the real Real number SF, DF FABS S, D numbers stored in [S], and stores them in "P.11-43" data [D]. Absolute Value Conversion: Single-...
  • Page 38 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit (The largest integer not exceeding the floating point type data) Conversion: Double- Precision Real Number Data Converts [S] (real data) to a signed-32-bit → Integer US, SS, DINT S, D integer (maximum value cannot be...
  • Page 39 1.2 List of High-level Instructions ■ Clock/Calendar Instructions Operatio Page Name Mnemonic Operand Function overview Unit Conversion: Time Data Converts the BIN data stored in [S] to [S+2] (Hours, which indicates the hour, minute, second − HMSS S, D "P.12-2" Minutes and into seconds units, and stores it in (D+1, Seconds) →...
  • Page 40 1.2 List of High-level Instructions ■ Special instructions Operatio Page Name Mnemonic Operand Function overview Unit Sets the arbitrary error code [n] with the Self-diagnostic user program. Stores the self-diagnostic error error code in the system data register "P.13-13" (SD0). Sets the self-diagnosis error Code Set occurrence flag (SR0).
  • Page 41 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit Code it in the area starting with [D]. The S3, D Calculation calculation method is specified by [S1]. Calculates the CRC code for the data CRC Code S1, S2, specified by [S2] and [S3], and stores it in US, SS...
  • Page 42 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit US, SS, Checks whether ASCII data converted with ASCII data S1, S2, UL, SL, ACHK ATOB instruction can be converted under "P.14-44" Check normal conditions. SF, DF Converts the ASCII data stored in the area US, SS, Conversion:...
  • Page 43 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit Retrieves the character strings of [S2] Takeout of the number of characters from the left side (the S1, S2, Left Side of a − LEFT side where the device address is smaller) "P.14-94"...
  • Page 44 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit Couples the character string of [S1] with S1, S2, String Addition − ESADD the character string of [S2], and stores it in "P.14-122" [D]. The number of characters stored in the Obtainment of −...
  • Page 45 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit n Send SCU unit (SCU: COM port, ET-LAN: Instruction connection). General- Transfers the [n] bytes of data stored in the Purpose "P.15-4" area starting with [S] to external devices via Communicatio US, SS GPSEND (P)
  • Page 46 1.2 List of High-level Instructions (Note 1) For GPSEND instruction, it is necessary to set the execution condition to ON from the time when the instruction is started to the time when the sending flag turns OFF. (Note 2) For PMSET instruction, it is necessary to set the execution condition to ON from the time when the instruction is started to the time when the processing flag turns OFF.
  • Page 47 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit process is performed when the scan is finished. ■ Special Instruction (When Using FP7 Multi-Wire Link Unit) Operatio Page Name Mnemonic Operand Function overview Unit Error Clear Clears internal errors for the FP7 multi-wire (When Using link unit.
  • Page 48 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit Time "P.17-47" S1, S2, adjustment − pNTPcREQ Requests the time adjustment. (Note 1) request (Note 1) Can be used with CPU units CPS4RE*/CPS3RE*. ■ Ethernet Communication Instruction (FTP Client) Operatio Page Name...
  • Page 49 1.2 List of High-level Instructions ■ Ethernet Communication (SMTP Mail Sending) Instruction Operatio Page Name Mnemonic Operand Function overview Unit "P.17-102" Mail Text SMTPcB Sets the text specified by [S2] into the mail − S1, S2 Setting text of the number specified by [S1]. (Note 1) "P.17-105"...
  • Page 50 1.2 List of High-level Instructions Operatio Page Name Mnemonic Operand Function overview Unit "P.17-186" EtherNet/IP S1, S2, Refreshes the input for the connections − EIP_IN input refresh targeted to be refreshed. (Note 1) "P.17-191" EtherNet/IP S1, S2, Refreshes the output for the connections −...
  • Page 51 ([D] to [D]+9) from [D]. Panasonic SD Memory Card D1, D2, Reads the lifetime information of a Lifetime − PanaSD "P.18-63" Panasonic SD memory card. Information Read (Note 1) SD card control instructions cannot be used for CPU unit CPS2R. WUME-FP7CPUPGR-12 1-33...
  • Page 52 (MEMO) 1-34 WUME-FP7CPUPGR-12...
  • Page 53: Overview Of Instructions

    2 Overview of Instructions 2.1 Structure of Instructions ..............2-3 2.1.1 Structural patterns of basic instructions ........... 2-3 2.1.2 Structural patterns of high-level instructions ........2-4 2.2 Operation unit ..................2-10 2.3 Operation device list ................2-12 2.4 Specification of Device Numbers ............2-15 2.5 Explanations about Relays ..............2-17 2.5.1 X External input................
  • Page 54 2 Overview of Instructions 2.7.6 "" Character constant ............... 2-45 2.8 Global Devices and Local Devices .............2-46 2.9 Range of data that can be handled in the PLC ........2-47 2.10 Overflow and Underflow..............2-49 WUME-FP7CPUPGR-12...
  • Page 55: Structure Of Instructions

    2.1 Structure of Instructions 2.1 Structure of Instructions 2.1.1 Structural patterns of basic instructions ■ Sequence Basic Instructions ● Basic instructions are a group of the most essential instructions based on the relay sequence circuit, used for logic operation by the unit of bits. As indicated below, they are expressed by a combination of relay coils and contacts.
  • Page 56: Structural Patterns Of High-Level Instructions

    2.1 Structure of Instructions In this example, a 0.1-second timer with the timer number 5 is set to 3.0 seconds. It starts counting time when X100 is ON, and the contact T5 turns ON when the timer reaches 3.0 seconds. ■...
  • Page 57 2.1 Structure of Instructions ● Operands indicate the targets of operation and/or methods for operation processes. There are three types of operands: [S], [D], and [n]. The number and types of operands that need to be specified vary by instruction. Mnemonic Operation unit Operand...
  • Page 58 2.1 Structure of Instructions Internal relay Executed High-level instruction Single scan ■ Input of differential execution type instruction ● To input a differential execution type instruction using the tool software FPWINGR, press the [Shift] key and [F6] key, and then select an instruction from the instruction list dialog box. ●...
  • Page 59 2.1 Structure of Instructions (3) LOOP to LBL instructions (4) CNDE instruction (5) Step ladder instructions (6) Subroutine instructions ● For details, refer to "19.7 Rise Detection Method". ● Please take care that the program is not described incorrectly when combining the differential execution type high-level instruction with the AND stack instruction or pop stack instruction.
  • Page 60 2.1 Structure of Instructions ■ Cautions on omitting the internal relay ● If every scan execution type instruction and differential execution type instruction are being mixed for one internal relay, perform the programming in the following manner. Example 1) Define every scan execution type and differential execution type separately.
  • Page 61 2.1 Structure of Instructions Example 2) Use PSHS, RDS, or POPS instruction WUME-FP7CPUPGR-12...
  • Page 62: Operation Unit

    2.2 Operation unit 2.2 Operation unit ■ What are operation units? ● They specify basic units for operation triggered by respective instructions. ● Operation result of the same instruction may vary by the specified operation unit. The range of operand targeted by operation and/or the number of words to store the operation result also vary.
  • Page 63 2.2 Operation unit Symbol Name Available range Signed 32-bit data -2147483548 to +2147483547 -1.175494E-38 to -3.402823E+38 Single-precision floating point real number data +1.175494E-38 to +3.402823E+38 -2.2250738585072014E-308 to -1.7976931348623158E+308 Double-precision floating point real number data +2.2250738585072014E-308 to +1.7976931348623158E+308 ■ Operation units and available constants (●: Available) Operation unit K constant U constant...
  • Page 64: Operation Device List

    2.3 Operation device list 2.3 Operation device list ■ Operation device list Symbol Name Points Range: Description Local Global bits External Turns ON or OFF based on external 8192 points 0 to 511F input input. External 8192 points 0 to 511F Externally outputs ON or OFF state.
  • Page 65 2.3 Operation device list Symbol Name Points Range: Description Local Global bits Maximum 0 to Data register Data memory used in program 1M words 999423 Shared data memory used for a PLC Link register 16384 words 0 to 16383 link Device for accessing the unit memory Maximum 0 to...
  • Page 66 2.3 Operation device list (Note 4) The number of usable data registers (DT) varies according to the type of CPU unit and memory configuration settings. However, data registers (DT) that can be used as hold type are a maximum of 262,144 words (DT0 to DT262143) for CPS4R*/CPS3R*.
  • Page 67: Specification Of Device Numbers

    2.4 Specification of Device Numbers 2.4 Specification of Device Numbers ■ For external input (X), external output (Y), internal relay (R), link relay (L), pulse relay (P), system relay (SR), direct input (IN), direct output (OT) Since relays may be handled in units of 16 points, their numbers should be expressed as a combination of decimal and hexadecimal numbers.
  • Page 68 2.4 Specification of Device Numbers ■ Bit specification of word devices (DT*.n, LD*.n) ● As for data register DT and link register LD, specific bits in 16-bit data can be extracted and used as bit data, by specifying the device type, device number, and bit number. ●...
  • Page 69: Explanations About Relays

    2.5 Explanations about Relays 2.5 Explanations about Relays 2.5.1 X External input ■ How external input (X) works ● External input is used to feed signals to the programmable controller from an external input device such as a limit switch or a sensor connected to an input point. ■...
  • Page 70: R Internal Relay

    2.5 Explanations about Relays 2.5.3 R Internal relay ■ How internal relay (R) works ● An internal relay only operates within a program. Its ON or OFF state is not externally output. ● Once the operation result is output and switched ON (Coil: ON), the same relay used as a contact is also switched ON.
  • Page 71: Sr System Relay

    2.5 Explanations about Relays 2.5.4 SR System relay ■ How system relay (SR) works ● A system relay turns ON or OFF under specific conditions. ● Its ON or OFF state is not externally output. It only operates within a program. ■...
  • Page 72: C Counter

    2.5 Explanations about Relays 2.5.6 C Counter ■ How counter (C) works ● When the decrement-type preset counter is activated and the counter value reaches zero, the counter contact with the same number as the counter turns ON. ● When the counter's reset input is turned ON, the counter contact turns OFF. ●...
  • Page 73 2.5 Explanations about Relays ■ Range used by link relay ● The range of link relays that can be used varies depending on the type of network and unit combinations. ● It is necessary to set the range of use and the number of points for each individual network. ■...
  • Page 74: P Pulse Relay

    2.5 Explanations about Relays 2.5.8 P Pulse relay ■ How pulse relay (P) works ● Pulse relay is a relay that is only turned ON for one scan. Its ON or OFF state is not externally output. It only operates within a program. ●...
  • Page 75: E Error Alarm Relay

    2.5 Explanations about Relays ● As a rule, when you specify the relay as an output destination for an OT↑ or OT↓ instruction, the specification is limited to once in a program. (Double output is prohibited) ● When used as contacts, there are no restrictions on the number of times that can be used. ●...
  • Page 76 2.5 Explanations about Relays <Example> If R0 goes ON when an error occurs No. of error alarm relays in the ON SD60 state SD61 Relay numbers of error alarm relays SD62 in the ON state SD63 SD64 SD65 ■ Reset program for a given error alarm relay ●...
  • Page 77: In Direct Input

    2.5 Explanations about Relays <Example> When the content of SD61 is deleted with RST instruction RST.US SD60 Storage buffer 1 SD60 K1 SD60 K2 Storage buffer 2 SD61 K2 SD61 K3 Storage buffer 3 SD62 K3 SD62 K4 Storage buffer 4 SD63 K4 SD63...
  • Page 78: Dt*.N Data Register (Bit Specification)

    2.5 Explanations about Relays ● When using direct output (OT), it is necessary to select the setting to exclude this unit from the target for I/O refresh when configuring the settings for the I/O map. 2.5.12 DT*.n Data register (bit specification) ●...
  • Page 79: Description Of The Memory Area

    2.6 Description of the memory area 2.6 Description of the memory area 2.6.1 DT Data register ■ How data register (DT) works ● Data registers are memory areas which are handled in word (16-bit) units, and are used to store data such as numerical data that consists of 16 bits. DTn 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 [Example of program to write numerical values into DTn] MV.US...
  • Page 80: Dt*.N Data Register (Bit Specification)

    2.6 Description of the memory area 2.6.2 DT*.n Data register (bit specification) ■ How bit specification of data register (DT*.n) works ● For the data register, specific bits of word data (16-bit data) can be extracted and used as bit data by using bit specification.
  • Page 81: Ld*.N Link Register (Bit Specification)

    2.6 Description of the memory area ■ Range used by link register ● The range of link registers that can be used varies depending on the network type and the combination of units. ● It is necessary to set the range of use and the number of points for each individual network. ■...
  • Page 82: Um Unit Memory

    2.6 Description of the memory area ■ Precautions for use ● If the ON/OFF status changes for any of the bit data of the link register (LD*.n), the value of the link register (LD) also changes. 2.6.5 UM Unit memory ■...
  • Page 83: Wx, Wy, Wr, Wl

    2.6 Description of the memory area ■ Types of system data registers (SD) Classification Function The operation statuses of the PLC specified with the configuration data and the various Environment settings, types of instructions are stored. operation status Example) Scan time Information such as information of a unit in which an abnormality occurred is stored.
  • Page 84: Wi, Wo

    2.6 Description of the memory area ● All of the relays can be used to monitor 16-bit words. ■ Precautions for use ● If an ON or OFF status of one of the relays composing the memory area changes, the memory area value will also change.
  • Page 85: Ts, Cs Timer/ Counter Setting Value Register

    2.6 Description of the memory area ■ WI, WO usage example ● When WI/WO is specified or when an operation is executed, input and output processing are performed. ● When using WI/WO, it is necessary to select the setting to exclude this unit from the target for I/O refresh when configuring the settings for the I/O map on the programming tool.
  • Page 86 Process value area ⁞ ⁞ ⁞ T4095 TS4095 TE4095 ⁞ ⁞ ⁞ C1023 CS1023 CE1023 ● Timer/counter settings for FP7 series can be specified using unsigned constants (U constants). ● The set value area (TS, CS) occupies a 32-bit area. 2-34 WUME-FP7CPUPGR-12...
  • Page 87: Te, Ce Timer/Counter Elapsed Value Register

    ● Reading and writing of values can also be performed with the programming tool. ■ Precautions for programming ● Timer/counter settings for FP7 series can be specified using unsigned constants (U constants). ● The elapsed value area (TE, CE) occupies a 32-bit area.
  • Page 88: I0 To Ie Index Registers

    2.6 Description of the memory area 2.6.11 I0 to IE Index registers ■ How index registers work ● Index registers are used to indirectly specify constants and memory area addresses. ● Depending on the values of the index register, changes to addresses and constants are called "index modification".
  • Page 89 2.6 Description of the memory area Example) When the value in DT0 is K10, the value in DT100 is written into DT210. <Example 2> Modifying a transfer destination The address in the data register (DT) for the transfer destination varies according to the value of DT0.
  • Page 90 2.6 Description of the memory area ■ Modifying a constant Constant = basic address + value of I0 to IE I0K100 I0H10 Standard value I0 value Constant Standard value I0 value Constant K100 K100 K100 K100 K100 K-10 ■ Notes on index modification of a relay number ●...
  • Page 91 2.6 Description of the memory area Value of index register Post-modification relay number ⁞ ⁞ ⁞ ⁞ ⁞ ⁞ X100 X101 ⁞ ⁞ ⁞ X15F X160 X161 ⁞ ⁞ ⁞ X16A X16B ⁞ ⁞ ⁞ ■ Modification of No. of basic instruction Object Modification examples Timer number...
  • Page 92 2.6 Description of the memory area TMXI0 0 Specified by a constant ■ Limitations for modifying DT.n (bit specification of data register) When modifying DT.n (bit specification of data register), the maximum number of DT that can be specified is 32767. ■...
  • Page 93: Explanation Of Constants

    2.7 Explanation of constants 2.7 Explanation of constants 2.7.1 K Signed decimal constant ■ How signed decimal constant (K) works ● The constant is a value which has been converted from binary data into decimal data. When entering the constant, specify "K" before the numerical value. ●...
  • Page 94: H Hexadecimal Constant

    2.7 Explanation of constants ● The constant is primarily used to specify data sizes and quantities such as the setting values for the timer. ● In the PLC, the decimal constant (U) is processed as binary (BIN) data in units of 16 bits, as shown below.
  • Page 95: Sf Single-Precision Floating Point Real Number Constant

    2.7 Explanation of constants ■ Format for hexadecimal constant (H) <Example> Hexadecimal "2A" (H2A) ■ Range that can be specified for a hexadecimal constant (H) Operation Available range 16-bit operation H0 to HFFFF 32-bit operation H0 to HFFFFFFFF 2.7.4 SF Single-precision floating point real number constant ■...
  • Page 96: Df Double-Precision Floating Point Real Number Constant

    2.7 Explanation of constants <Example> If SF is set for the operation unit of the instruction code, 2 words of data are included in DT. MV.SF DT 0 DT 10 Source Destination 1.234567 1.234567 DT10-DT11 DT0-DT1 2.7.5 DF Double-precision floating point real number constant ■...
  • Page 97: Character Constant

    2.7 Explanation of constants <Example> If DF is set for the operation unit of the instruction code, 4 words of data are included in DT. MV.DF DT 0 DT 10 Source Destination 1.234567 1.234567 DT10-DT13 DT0-DT3 2.7.6 "" Character constant ■...
  • Page 98: Global Devices And Local Devices

    2.8 Global Devices and Local Devices 2.8 Global Devices and Local Devices ■ Global devices ● While a global device has a unique number throughout the entire program, a local device has a unique number inside each program block. ● For example, "Global device DT100" refers to the same data memory in program blocks A and B.
  • Page 99: Range Of Data That Can Be Handled In The Plc

    2.9 Range of data that can be handled in the PLC 2.9 Range of data that can be handled in the PLC ■ 16-bit data Decimal conversion Hexa- decimal Data handled in the PLC (binary 16-bit) conversion Unsigned Signed 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 U32767 K32767 H7FFF...
  • Page 100 2.9 Range of data that can be handled in the PLC ■ Representation of decimals in the PLC ● Decimals are processed as either 16-bit or 32-bit binary data. ● Signed data is processed as follows: 1. If the highest-order bit is a sign bit and a positive number, the value is "0", or if it is negative, the value is "1".
  • Page 101: Overflow And Underflow

    2.10 Overflow and Underflow 2.10 Overflow and Underflow ■ What are overflow and underflow? ● A value resulting from operation instruction sometimes fails to satisfy the range that can be handled. ● When a value is larger than the maximum value it is called "overflow" and when a value is lower than the minimum value it is called "underflow".
  • Page 102 2.10 Overflow and Underflow Example 1) 16-bit binary operation Unsigned Overflow Max. value U 65,535 H FFFF U 32,768 H 8000 Max. value and min. value U 32,767 H 7FFF are linked Min. value Underflow Signed Overflow Max. value K 32,767 H 7FFF Max.
  • Page 103 2.10 Overflow and Underflow Example 2) 16-bit BCD operation Overflow Max. value H 9999 Max. value and min. value are linked Min. value Underflow WUME-FP7CPUPGR-12 2-51...
  • Page 104 (MEMO) 2-52 WUME-FP7CPUPGR-12...
  • Page 105: Basic Instructions

    3 Basic Instructions 3.1 ST, ST/, OT (START, START NOT, OUT) ...........3-3 3.2 AN, AN/ (AND, AND NOT)..............3-5 3.3 OR, OR/ (OR, OR NOT) ..............3-6 3.4 ST↑, ST↓ (Leading and Trailing Contact Instructions) ......3-8 3.5 AN↑, AN↓ (Leading and Trailing Contact Instructions)......3-9 3.6 OR↑, OR↓...
  • Page 106 3 Basic Instructions 3.30 CNDE (Conditional End) ..............3-93 3.31 EJECT....................3-94 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) .....................3-95 3.33 ZRST (Clear Multiple Processes) .............3-105 3.34 Common Information for Subroutine Instructions ......3-107 3.35 SBL (Subroutine Label), RET (Subroutine Return)......3-109 3.36 CALL (Local Subroutine Call), FCALL (Output OFF Type Local Subroutine Call) ..................3-111...
  • Page 107: St, St/, Ot (Start, Start Not, Out)

    3.1 ST, ST/, OT (START, START NOT, OUT) 3.1 ST, ST/, OT (START, START NOT, OUT) ■ Ladder diagram Y110 Y111 ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier DT.n LD.n ST, ST/...
  • Page 108 3.1 ST, ST/, OT (START, START NOT, OUT) ■ Precautions for programming ● The "ST" and "ST/" instructions are initiated from the bus bar. ● When an external switch (e.g., emergency stop switch) is a Form B (normally closed), be sure to use the ST instruction in the program.
  • Page 109: An, An/ (And, And Not)

    3.2 AN, AN/ (AND, AND NOT) 3.2 AN, AN/ (AND, AND NOT) ■ Ladder diagram Y110 X100 ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier DT.n LD.n AN, AN/ ●...
  • Page 110: Or, Or/ (Or, Or Not)

    3.3 OR, OR/ (OR, OR NOT) 3.3 OR, OR/ (OR, OR NOT) ■ Ladder diagram Y110 X100 ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier DT.n LD.n OR, OR/ ●...
  • Page 111 3.3 OR, OR/ (OR, OR NOT) X100 Y110 ■ Precautions for programming ● The "OR" and "OR/" instructions are initiated from the bus bar. ● The "OR" and "OR/" instructions can be used consecutively. WUME-FP7CPUPGR-12...
  • Page 112: St↑, St↓ (Leading And Trailing Contact Instructions)

    3.4 ST↑, ST↓ (Leading and Trailing Contact Instructions) 3.4 ST↑, ST↓ (Leading and Trailing Contact Instructions) ■ Ladder diagram Y110 ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier DT.n LD.n ●...
  • Page 113: An↑, An↓ (Leading And Trailing Contact Instructions)

    3.5 AN↑, AN↓ (Leading and Trailing Contact Instructions) 3.5 AN↑, AN↓ (Leading and Trailing Contact Instructions) ■ Ladder diagram Y110 X100 ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier DT.n LD.n ●...
  • Page 114: Or↑, Or↓ (Leading And Trailing Contact Instructions)

    3.6 OR↑, OR↓ (Leading and Trailing Contact Instructions) 3.6 OR↑, OR↓ (Leading and Trailing Contact Instructions) ■ Ladder diagram Y110 X100 ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier DT.n LD.n ●...
  • Page 115: (Not)

    3.7 / (NOT) 3.7 / (NOT) ■ Ladder diagram ■ Outline of operation ● The / instruction inverts the preceding operation result. ■ Operation Example When X100 is ON, Y110 is ON and Y111 is OFF. X100 Y110 Y111 WUME-FP7CPUPGR-12 3-11...
  • Page 116: Df, Df/ (Leading Edge Differential, Trailing Edge Differential), Dfi (Leading Edge Differential (Initial Execution Type))

    3.8 DF, DF/ (Leading Edge Differential, Trailing Edge Differential), DFI (Leading Edge Differential (Initial Execution Type)) 3.8 DF, DF/ (Leading Edge Differential, Trailing Edge Differential), DFI (Leading Edge Differential (Initial Execution Type)) ■ Ladder diagram ■ Outline of operation Type of Operation instruction The DF instruction only generates output (differential output) for a single scan where the execution...
  • Page 117 3.8 DF, DF/ (Leading Edge Differential, Trailing Edge Differential), DFI (Leading Edge Differential (Initial Execution Type)) 5) Step ladder instructions 6) Subroutine instructions ● When a differential instruction is combined with an AND stack instruction or a pop stack instruction, take care that the syntax is correct. ■...
  • Page 118 3.8 DF, DF/ (Leading Edge Differential, Trailing Edge Differential), DFI (Leading Edge Differential (Initial Execution Type)) (1) Example 1 using DF instruction When the leading edge differential is set between input information (X100, X101) X100 X101 Y110 X100 X101 Y110 ①...
  • Page 119 3.8 DF, DF/ (Leading Edge Differential, Trailing Edge Differential), DFI (Leading Edge Differential (Initial Execution Type)) (3) Example 3 using DF instruction → When the leading edge differential is set for each input information (X100, X101) X100 Y110 X101 ■ Examples of applying differential instructions ●...
  • Page 120 3.8 DF, DF/ (Leading Edge Differential, Trailing Edge Differential), DFI (Leading Edge Differential (Initial Execution Type)) X100 X101 Y110 Y110 If there is no differential instruction in above ladder diagram <Application example for alternating circuit> ● Differential instructions can also be applied to an alternating circuit which uses a single signal to hold and release the circuit.
  • Page 121 3.8 DF, DF/ (Leading Edge Differential, Trailing Edge Differential), DFI (Leading Edge Differential (Initial Execution Type)) <Example 2> X100 Y110 Y110 Y110 WUME-FP7CPUPGR-12 3-17...
  • Page 122: Ans (And Stack)

    3.9 ANS (AND stack) 3.9 ANS (AND stack) ■ Ladder diagram ■ Outline of operation ● Blocks that were connected in parallel are connected in series. ● Each block should start with the ST instruction. ■ Operation Example In the above ladder diagram, when X100 or X101 is ON and X102 or X103 is ON, the signal is output to Y110.
  • Page 123 3.9 ANS (AND stack) WUME-FP7CPUPGR-12 3-19...
  • Page 124: Ors (Or Stack)

    3.10 ORS (OR Stack) 3.10 ORS (OR Stack) ■ Ladder diagram ■ Outline of operation ● Serially connected blocks are connected in parallel. ● Each block should start with the ST instruction. ■ Operation Example In the above ladder diagram, when X100 and X101 are ON or X102 and X103 are ON, the signal is output to Y110.
  • Page 125 3.10 ORS (OR Stack) WUME-FP7CPUPGR-12 3-21...
  • Page 126: Pshs (Push Stack), Rds (Read Stack), Pops (Pop Stack)

    3.11 PSHS (Push stack), RDS (Read stack), POPS (Pop stack) 3.11 PSHS (Push stack), RDS (Read stack), POPS (Pop stack) ■ Ladder diagram ■ Outline of operation Type of Operation instruction The operation result immediately before the PSHS instruction is stored and operation continues PSHS from the next step.
  • Page 127 3.11 PSHS (Push stack), RDS (Read stack), POPS (Pop stack) ■ Precautions for programming ● Use the RDS instruction when the operation result will be further used and the POPS instruction if it will not be used any more. (Be sure to use the POPS instruction at the end of a series of instructions.) ●...
  • Page 128 3.11 PSHS (Push stack), RDS (Read stack), POPS (Pop stack) ■ Precaution when using PSHS instruction repeatedly ● There is a limit on the number of times the PSHS instruction can be used repeatedly. The maximum number of times it can be used repeatedly before using the next POPS instruction is eight.
  • Page 129 3.11 PSHS (Push stack), RDS (Read stack), POPS (Pop stack) WUME-FP7CPUPGR-12 3-25...
  • Page 130: Nop

    3.12 NOP 3.12 NOP ■ Ladder diagram Number of NOPs Y110 X100 X101 X102 ■ Outline of operation ● This instruction has no effect on the operation results to that point. The program will operate in the same manner whether or not the NOP instruction is used. ●...
  • Page 131: Ot, ↓Ot (Leading, Trailing Edge Out)

    3.13 ↑OT, ↓OT (Leading, Trailing Edge Out) 3.13 ↑OT, ↓OT (Leading, Trailing Edge Out) ■ Ladder diagram ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier SR IN OT DT.n LD.n ●...
  • Page 132 3.13 ↑OT, ↓OT (Leading, Trailing Edge Out) ■ Operation Example (1) Program operation for “ OT” in ladder diagram Outputs to the pulse relay P0 only for a single scan where X100 changes from the OFF state to the ON state (i.e., rises). Also outputs to P0 even if X100 is ON for the first scan.
  • Page 133: Kp (Keep)

    3.14 KP (Keep) 3.14 KP (Keep) ■ Ladder diagram ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier SR IN OT DT.n LD.n ● ● ● ● ● ● ●...
  • Page 134 3.14 KP (Keep) ■ Precautions for programming ● The output destination holds the state even while the MC instruction is in operation. ● The state will be reset when the operation mode is switched from RUN to PROG. or the power is turned off.
  • Page 135: Set, Rst (Set, Reset)

    3.15 SET, RST (Set, Reset) 3.15 SET, RST (Set, Reset) ■ Ladder diagram ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier SR IN OT DT.n LD.n ● ● ●...
  • Page 136 3.15 SET, RST (Set, Reset) ● Using relays with the SET and RST instructions does not result in duplicate output. Even if Total Check is implemented, it is not treated as a syntax error. ● The RST instruction can be used to turn off the relay. ●...
  • Page 137 3.15 SET, RST (Set, Reset) (2) Processing is done with Y110 to be OFF. (3) Processing is done with Y110 to be ON. ■ Use SET and RST instructions with differential instructions ● Putting the differential DF instructions before the SET and RST instructions makes it easy to create and adjust the program.
  • Page 138: Alt (Alternate Out)

    3.16 ALT (Alternate out) 3.16 ALT (Alternate out) ■ Ladder diagram ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device Operand Index modifier SR IN OT DT.n LD.n ● ● ● ● ●...
  • Page 139 3.16 ALT (Alternate out) 4) CNDE instruction 5) Step ladder instructions 6) Subroutine instructions WUME-FP7CPUPGR-12 3-35...
  • Page 140: Tm (Timer)

    3.17 TM (Timer) 3.17 TM (Timer) ■ Ladder diagram ■ List of operands Operand Description Timer number Timer set value ■ Devices that can be specified (indicated by ●) 32-Bit Real Str- 16-Bit device: Integer device: number ing Index mod- Ope- ifier rand...
  • Page 141 3.17 TM (Timer) ■ Regarding the specification of timer time ● The timer set time is (timer unit) × (timer set value). ● The timer set value [S] is specified within the range between U1 to U4294967295, using a decimal constant. "TMS"...
  • Page 142 3.17 TM (Timer) 2) When the timer execution condition changes from OFF to ON (i.e., rises), the timer set value is transferred from the set value area "TS" to the elapsed value area "TE" with the same number. (This is also true when the operation mode is switched to RUN while the execution condition is ON.) 3) For each scan, the value in the elapsed value area "TE"...
  • Page 143 3.17 TM (Timer) ■ Regarding how to directly specify the set value area number to the timer set value ● The following program directly sets the timer set value to the timer set value area. ● Be sure to specify the same number as the timer number in [n] for the setting area "TS." ●...
  • Page 144 3.17 TM (Timer) 2) When the timer execution condition changes from OFF to ON (i.e., rises), the timer set value is transferred from the set value area "TS" to the elapsed value area "TE" with the same number. (This is also true when the operation mode is switched to RUN while the execution condition is ON.) 3) For each scan, the value in the elapsed value area "TE"...
  • Page 145 3.17 TM (Timer) 4) When the value in the elapsed value area "TE" becomes 0, the timer contact "T" with the same number turns ON. WUME-FP7CPUPGR-12 3-41...
  • Page 146 3.17 TM (Timer) ■ Application example of timer instructions (serial connection of timers) 3-42 WUME-FP7CPUPGR-12...
  • Page 147 3.17 TM (Timer) ■ Application example of timer instructions (parallel connection of timers) WUME-FP7CPUPGR-12 3-43...
  • Page 148 3.17 TM (Timer) ■ Application example of timer instructions (When the set value area number is specified directly) <Example> Switching set values according to the condition 3-44 WUME-FP7CPUPGR-12...
  • Page 149 3.17 TM (Timer) ■ Timer number and timer setting value combinations Timer Timer Ladder diagram Description number value Setting both the timer Constant Constant number and timer setting value with a constant Setting a constant for the Device timer number, and a Constant device number for the timer setting value...
  • Page 150: Tm16 (16-Bit Timer)

    3.18 TM16 (16-bit Timer) 3.18 TM16 (16-bit Timer) ■ Ladder diagram ■ List of operands Operand Description Timer number (Available range: 0 to 4095 *For the default memory configuration) Timer setting value (Available range: U0 to U65535) ■ Devices that can be specified (indicated by ●) Real 32-Bit 16-Bit device:...
  • Page 151 3.18 TM16 (16-bit Timer) "TM16Y" is specified within the range from 0 to 65535 seconds, in units of 1 seconds. ■ Precautions for programming ● The timer set value area TS and timer elapsed value area TE both occupy 32-bit areas. ●...
  • Page 152 3.18 TM16 (16-bit Timer) TM16 instruction (When specifying operand S=constant) U100 is set in the setting value area TS0 when compiling the program. The setting value area TS0 is set in the elapsed value area TE0 when the input of R0 rises. The setting range of a constant is U0 to U65535.
  • Page 153: Sptm (Unsigned 32-Bit Incremental Auxiliary Timer)

    3.19 SPTM (Unsigned 32-bit Incremental Auxiliary Timer) 3.19 SPTM (Unsigned 32-bit Incremental Auxiliary Timer) ■ Ladder diagram ■ List of operands Operand Description Timer set value Timer elapsed value ■ Devices that can be specified (indicated by ●) Real 32-Bit 16-Bit device: Integer numbe...
  • Page 154 3.19 SPTM (Unsigned 32-bit Incremental Auxiliary Timer) ● The timer set value is specified within the range from U1 (H1) to U4294967295 (HFFFFFFFF), using a U constant. "SPTM" is specified within the range from 0.01 to 42949672.95 seconds, in units of 0.01 seconds. Example) When the set value is U500, the set time is 0.01 x 500 = 5 seconds.
  • Page 155 3.19 SPTM (Unsigned 32-bit Incremental Auxiliary Timer) ■ How the auxiliary timer works 1) When the internal relay changes from OFF to ON, "0" is transferred to the elapsed value area [D,D+1]. 2) For each scan, the value in the elapsed value area [D, D+1] increments if the internal relay is ON.
  • Page 156 3.19 SPTM (Unsigned 32-bit Incremental Auxiliary Timer) <Example> ● A correct operation cannot be obtained if specified as shown below. 3-52 WUME-FP7CPUPGR-12...
  • Page 157: Ct (Down Counter)

    3.20 CT (Down Counter) 3.20 CT (Down Counter) ■ Ladder diagram ■ List of operands Operand Description Counter number Counter set value ■ Devices that can be specified (indicated by ●) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan modifie U...
  • Page 158 3.20 CT (Down Counter) ● If the count input and reset input both turn ON at the same time, the reset input is given priority. ● If the count input rises and the reset input falls at the same time, the count input is ignored and preset is executed.
  • Page 159 3.20 CT (Down Counter) (Power on) Count input Instruction operation Counted Not counted ● Be careful when using this instruction with an instruction that changes the order of instruction execution such as MC - MCE or JP - LBL (1 to 6, shown below), because the operation of the instruction may change depending on the timing of the instruction execution and count input.
  • Page 160 3.20 CT (Down Counter) 3) Whenever the count input X100 turns ON, the value in the elapsed value area "CE" is decremented. 4) When the value in the elapsed value area "CE" becomes 0, the counter contact "C" with the same number turns ON.
  • Page 161 3.20 CT (Down Counter) ■ How to specify the set value area number directly to the down counter setting value ● The program described above, which specifies CS100 for the set value, operates as follows. (1) When the execution condition X100 is ON, the data transfer instruction MV is executed to start decrementing with U30 set to CS100.
  • Page 162 3.20 CT (Down Counter) ■ Mechanism of down counter operation (When the set value area number is specified directly) 1) When the execution condition of the high-level instruction is ON, the value is set in the set value area "CS." The following shows an example of using the MV instruction.
  • Page 163 3.20 CT (Down Counter) 3) Whenever the count input X101 turns ON, the value in the elapsed value area "CE" is decremented. 4) When the value in the elapsed value area "CE" becomes 0, the counter contact "C" with the same number turns ON. WUME-FP7CPUPGR-12 3-59...
  • Page 164 3.20 CT (Down Counter) ■ Application example of counter instructions (When the set value area number is specified directly) <Example> Switching set values according to the condition 3-60 WUME-FP7CPUPGR-12...
  • Page 165 3.20 CT (Down Counter) ■ Counter number and setting value combinations Counter Counter Ladder diagram Description number value Setting a constant for both the counter Constant Constant number and the counter setting value Setting a constant for the counter number, Device Constant and a device number...
  • Page 166 3.20 CT (Down Counter) Counter Counter Ladder diagram Description number value Setting a constant with index modification for the counter number, and a device number for the counter setting value Counter On FPWIN GR7, input number Device the counter instruction with Index in the following order: modificatio...
  • Page 167: Ct16 (16-Bit Counter)

    3.21 CT16 (16-bit Counter) 3.21 CT16 (16-bit Counter) ■ Ladder diagram ■ List of operands Operand Description Counter number (Available range: 4 to 1023 *For the default memory configuration) Counter setting value (Available range: U0 to U65535) ■ Devices that can be specified (indicated by ●) Real 32-Bit 16-Bit device:...
  • Page 168 3.21 CT16 (16-bit Counter) ● If the count input rises and the reset input falls at the same time, the count input is ignored and preset is executed. ● An OT instruction can be entered immediately after a counter instruction. ■...
  • Page 169 3.21 CT16 (16-bit Counter) ● When a 32-bit value is written into the elapsed value area CE while the counter is being operated using an instruction such as MV instruction, the timer operates with the written 32-bit value. CT instruction (When specifying operand S=constant) U100 is set in the setting value area CS0 when compiling the program.
  • Page 170: Udc (Up/Down Counter)

    3.22 UDC (Up/Down Counter) 3.22 UDC (Up/Down Counter) ■ Ladder diagram ■ List of operands Operand Description Counter number Counter set value ■ Devices that can be specified (indicated by ●) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan modifie "...
  • Page 171 3.22 UDC (Up/Down Counter) ● The preset value in [S] is transferred to [CEn] when the reset input changes from ON to OFF. ● When the count input changes from OFF to ON, the counter starts counting from the value set in [CEn].
  • Page 172 3.22 UDC (Up/Down Counter) ■ Precautions for programming ● If a hold type memory area is specified for the elapsed value area, the elapsed value acts in accordance with the content being held. ● Be aware that the default value when starting operation is not automatically preset to the elapsed value area.
  • Page 173: Sr (Shift Register)

    3.23 SR (Shift Register) 3.23 SR (Shift Register) ■ Ladder diagram ■ List of operands Operand Description Shifted device ■ Devices that can be specified (indicated by ●) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan modifie " " U...
  • Page 174 3.23 SR (Shift Register) 2) Upon shifting, sets 1 or 0 to the blank bit (least significant bit) if the data input is ON or OFF, respectively. 3) When the reset input turns ON, the specified register contents will be cleared. 3-70 WUME-FP7CPUPGR-12...
  • Page 175 3.23 SR (Shift Register) ■ Operation Example 1) When X101 turns ON while X102 is OFF, the contents of WR3 (internal relays R30 to R3F) are shifted by 1 bit to the left. 2) In the bit that has become blank due to left shifting (R30), 1 is set when X100 is ON and 0 is set when X100 is OFF.
  • Page 176 3.23 SR (Shift Register) ■ Precautions for shift input detection ● The SR instruction performs a shift when an OFF to ON rise is detected. ● While the shift input remains ON, shifting is performed at the leading edge only and not performed later.
  • Page 177: Lrsr (Left/Right Shift Register)

    3.24 LRSR (Left/Right Shift Register) 3.24 LRSR (Left/Right Shift Register) ■ Ladder diagram ■ List of operands Operand Description Shift starting position Shift ending position ■ Devices that can be specified (indicated by ●) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan...
  • Page 178 3.24 LRSR (Left/Right Shift Register) ■ Operation of LRSR (left/right shift register) 1. When the shift input changes from OFF to ON (the reset input is OFF), the contents of the area specified by [D1] and [D2] are shifted one bit to the left or right. 2.
  • Page 179 3.24 LRSR (Left/Right Shift Register) (Power on) Shift input Instruction operation Shifted Not shifted ● Be careful when using this instruction with an instruction that changes the order of instruction execution such as MC - MCE or JP - LBL (1 to 6, shown below), because the operation of the instruction may change depending on the timing of the instruction execution and shift input.
  • Page 180: Mc (Master Control Relay), Mce (Master Control Relay End)

    3.25 MC (Master Control Relay), MCE (Master Control Relay End) 3.25 MC (Master Control Relay), MCE (Master Control Relay End) ■ Ladder diagram Execution condition X100 X101 Y131 Y131 X102 Y132 Y132 ■ Outline of operation ● When the execution condition is ON, this instruction runs the program code between the MC and MCE instructions.
  • Page 181 3.25 MC (Master Control Relay), MCE (Master Control Relay End) 1) DF (leading edge differential) instruction 2) Count input for CT (counter) instruction 3) Count input for UDC (up-down counter) instruction 4) Shift input for SR (shift register) instruction 5) Shift input for LRSR (left and right shift register) instruction 6) Differential execution type high-level instruction (instruction specified by p and instruction name) ■...
  • Page 182 3.25 MC (Master Control Relay), MCE (Master Control Relay End) X100 X101 Y110 <Timing Chart 1> X100 Execution conditions X101 Y110 Since the execution condition X101 for the differential Last differential instruction has not changed from the last execution, no instruction execution differential output is obtained.
  • Page 183 3.25 MC (Master Control Relay), MCE (Master Control Relay End) ■ Precautions for Programming ● A pair of the MC and MCE instructions can be nested within another pair of the MC and MCE instructions. (Up to 30 levels of nesting are allowed for MC and MCE.) WUME-FP7CPUPGR-12 3-79...
  • Page 184 3.25 MC (Master Control Relay), MCE (Master Control Relay End) ● The program cannot be executed in the following cases. (1) "MC" or "MCE" is missing in a pair. (2) The order of "MC" and "MCE" is reversed. 3-80 WUME-FP7CPUPGR-12...
  • Page 185: Jp/Lbl (Jump/Label)

    3.26 JP/LBL (Jump/Label) 3.26 JP/LBL (Jump/Label) ■ Ladder diagram ■ List of operands Operand Description Label number (relative jump pointer to LBL) ■ Devices that can be specified (indicated by ●) Real 16-Bit 16-Bit device: Integer numbe device: Index Operan U...
  • Page 186 3.26 JP/LBL (Jump/Label) X101: ON Program X101 JP 1 Program LBL 1 Program ■ Precautions for programming ● The JP instruction specifying the same label number can be used more than once. ● The LBL instruction specifying the same number can only be written once in a single program.
  • Page 187 3.26 JP/LBL (Jump/Label) 2) Count input for CT (counter) instruction 3) Count input for UDC (up-down counter) instruction 4) Shift input for SR (shift register) instruction 5) Shift input for LRSR (left and right shift register) instruction 6) Differential execution type high-level instruction (instruction specified by p and instruction name) ■...
  • Page 188 3.26 JP/LBL (Jump/Label) X100 JP 1 X101 Y110 LBL 1 <Timing Chart 1> X100 X101 Y110 Since the execution condition X101 for the differential Final timing with no instruction has not changed from t he final timing with no execution of the last JP instruction execution of the last JP instruction, no differential output is obtained.
  • Page 189 3.26 JP/LBL (Jump/Label) X100 JP 1 X101 Y110 LBL 1 <Timing Chart 1> X100 X101 Y110 Since the execution condition X101 for the differential Final timing with no instruction has not changed from t he final timing with no execution of the last JP instruction execution of the last JP instruction, no differential output is obtained.
  • Page 190 3.26 JP/LBL (Jump/Label) 3-86 WUME-FP7CPUPGR-12...
  • Page 191: Loop, Lbl (Loop, Label)

    3.27 LOOP, LBL (LOOP, Label) 3.27 LOOP, LBL (LOOP, Label) ■ Ladder diagram ■ List of operands Operand Description Label number Loop count ■ Devices that can be specified (indicated by ●) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan modifie "...
  • Page 192 3.27 LOOP, LBL (LOOP, Label) X100 MV.US U 10 DT 0 LBL 1 If DT0 = K5, jumps five times and stop jumping X101 even if X101 is on. LOOP 1 DT 0 ● If the value in the memory area specified in [S] is 0 from the first time, the program does not jump to the specified label but instead performs the next process.
  • Page 193 3.27 LOOP, LBL (LOOP, Label) ■ Operation Example 1 is subtracted from the value stored in LBL 2 DT0. If the result is not 0, the instruction jumps to LBL2 and the code between LBL2 and LOOP2 is repeated. X101 LOOP 2 DT 0 ■...
  • Page 194 3.27 LOOP, LBL (LOOP, Label) LBL 1 Executes repeatedly when the execution condition is on. X100 LOOP 1 DT 0 1) TM instruction: Multiple timings occur during a single scan, therefore the time cannot be guaranteed. 2) CT instruction: If the state of the count input does not change during the scan, it will operate in the usual way.
  • Page 195: Ed (End)

    3.28 ED (End) 3.28 ED (End) ■ Ladder diagram ■ Outline of operation ● This instruction writes the ED instruction at the end of the regular program area. Normal program area Subroutine program ● The program area is divided into the regular program area (main program) and the "subroutine"...
  • Page 196: Edpb (End Program Block)

    3.29 EDPB (End Program Block) 3.29 EDPB (End Program Block) ■ Ladder diagram ■ Outline of operation ● This instruction indicates the end of PB (program block). 3-92 WUME-FP7CPUPGR-12...
  • Page 197: Cnde (Conditional End)

    3.30 CNDE (Conditional End) 3.30 CNDE (Conditional End) ■ Ladder diagram X100 X101 Y130 Y130 Execution condition X103 CNDE X102 Y131 ■ Outline of operation ● Ends arithmetic processing of the program at the specified address. ● When the execution condition turns ON, the program terminates operation and begins other processing such as I/O.
  • Page 198: Eject

    3.31 EJECT 3.31 EJECT ■ Ladder diagram ■ Outline of operation ● When creating and printing out program code with the tool software, a page break will be added where this instruction is inserted. ● Similarly to the NOP instruction, no program processing will occur. ■...
  • Page 199: Sstp (Start Step) / Nstl (Next Step) / Cstp (Clear Step) / Stpe (Step End)

    3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) ■ Ladder diagram Output setting Output setting X101 NSTL Y110 SSTP...
  • Page 200 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) ● Program code between the SSTP instruction and the next SSTP instruction or the STPE instruction is handled as a single process. ● These instructions make it easy to execute sequence control, selection branch control, parallel branch merge control, and similar operations.
  • Page 201 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) ■ Operation Example Starts the process 1 by NSTL. X101 NSTL Y110 SSTP Starts the process X102 2 by NSTL. NSTL Process 1 (Program) Y111 SSTP (Program)
  • Page 202 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) ● The same process number cannot be defined for more than one process. ● The OUT instruction can be connected directly from the bus bar immediately after the SSTP instruction.
  • Page 203 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) Starts the process X101 (process 1). NSTL Y110 SSTP Starts the next process X102 (process 2). NSTL Process 1 (Program) Y111 SSTP (Program) Clears the process (process 2).
  • Page 204 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) ● In the program, write the instruction to start the process to be executed next in each process. The next process is selected and program execution is transferred according to the execution conditions.
  • Page 205 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) ■ Example (3) Parallel branch/join control of processes ● This program starts multiple processes at the same time. When the work is completed in each of the branched processes, they merge again before transferring execution to the next process.
  • Page 206 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) Starts the process X101 (process 1). NSTL Y110 SSTP Process 1 X102 NSTL Starts the next processes (processes 2 and NSTL 4) in parallel. (Program) Y111 SSTP...
  • Page 207 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) X101 X102 X103 X104 X110 Y110 Process 1 Process 1 Y111 Process 2 Y112 Process 3 Y113 Process 4 Process 5 Y114 ■ Precautions for programming ●...
  • Page 208 3.32 SSTP (Start Step) / NSTL (Next Step) / CSTP (Clear Step) / STPE (Step End) ● When a process starts and the first scan is in progress, the step initial pulse relay (SR15) turns ON. It turns OFF for the second and subsequent scans. This relay can be used to reset counters and shift registers.
  • Page 209: Zrst (Clear Multiple Processes)

    3.33 ZRST (Clear Multiple Processes) 3.33 ZRST (Clear Multiple Processes) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Process clear start number Process clear end number ■ Devices that can be specified (indicated by ●) Specification of bit of Bit device word device...
  • Page 210 3.33 ZRST (Clear Multiple Processes) ■ Operation Example Y101 X101 Starts the process 1 (Y101). NSTL Y102 Starts the process 2 (Y102). NSTL Y108 Starts the process 8 (Y108). NSTL Y101 SSTP Process 1 (Program) Y102 SSTP Process 2 (Program) Y108 SSTP Process 8...
  • Page 211: Common Information For Subroutine Instructions

    3.34 Common Information for Subroutine Instructions 3.34 Common Information for Subroutine Instructions ■ Program configuration ● Subroutine instructions are configured from a subroutine call instruction and a subroutine program. ● Describe subroutine programs in subprogram areas, and use the SBL instruction and RET instruction to indicate the start and end positions of the subroutine program.
  • Page 212 3.34 Common Information for Subroutine Instructions ① X100 CALL n ③ ・・・・・・・・・・・・・・・・・ SBL n ② Subroutine program n When CALL n is executed, ① to ③ are executed in order 3-108 WUME-FP7CPUPGR-12...
  • Page 213: Sbl (Subroutine Label), Ret (Subroutine Return)

    3.35 SBL (Subroutine Label), RET (Subroutine Return) 3.35 SBL (Subroutine Label), RET (Subroutine Return) ■ Ladder diagram ■ List of operands Operand Description Subroutine program number Available data specification range: 0 to 65535/1 PB (It is recommended to specify sequentially from ■...
  • Page 214 3.35 SBL (Subroutine Label), RET (Subroutine Return) SBL 0 (Level 2) CALL 1 (Level 3) SBL 1 (Level 4) SBL 2 CALL 2 (Level 5) SBL 3 CALL 3 SBL 4 CALL 4 Call from within subroutine Example of 5 levels of nesting 3-110 WUME-FP7CPUPGR-12...
  • Page 215: Call (Local Subroutine Call), Fcall (Output Off Type Local Subroutine Call)

    3.36 CALL (Local Subroutine Call), FCALL (Output OFF Type Local Subroutine Call) 3.36 CALL (Local Subroutine Call), FCALL (Output OFF Type Local Subroutine Call) ■ Ladder diagram ■ List of operands Operand Description Local subroutine program number within the same PB Available data specification range: 0 to 65535 (It is recommended to specify sequentially from 0.) ■...
  • Page 216 3.36 CALL (Local Subroutine Call), FCALL (Output OFF Type Local Subroutine Call) Type of FCALL CALL instruction Operates in the same way as differential instructions used between MC and MCE. Differential Same as on the left. instruction Refer to "Operation of differential instructions between MC and MCE".
  • Page 217: Ecall (Subroutine Call (With Pb No. Specification))

    3.37 ECALL (Subroutine Call (with PB No. Specification)) 3.37 ECALL (Subroutine Call (with PB No. Specification)) ■ Ladder diagram ■ List of operands Operand Description Subroutine number: 0 to 65535/1 PB Target PB number: The number of PB where the subroutine specified by n is stored ■...
  • Page 218 3.37 ECALL (Subroutine Call (with PB No. Specification)) Type of instruction ECALL Holds the state Clocking is not performed. Note that the time cannot be guaranteed if clocking is not performed once during a scan. Holds the current progress. Operates in the same way as differential instructions used between MC and MCE. Differential instruction Refer to "Operation of differential instructions between MC and MCE".
  • Page 219: Efcall

    3.38 EFCALL (Forced Output OFF Type Subroutine Call (with PB No. Specification)) 3.38 EFCALL (Forced Output OFF Type Subroutine Call (with PB No. Specification)) ■ Ladder diagram ■ List of operands Operand Description Subroutine number: 0 to 65535/1 PB Target PB number: The number of PB where the subroutine specified by n is stored ■...
  • Page 220 3.38 EFCALL (Forced Output OFF Type Subroutine Call (with PB No. Specification)) ■ Operation when the execution condition of the EFCALL instruction is OFF ● When the execution condition turns OFF, the operation of the current subroutine stops. (It is also true for calls from the master control or step ladder.) In this case, the operation of each instruction used in the subroutine is as follows.
  • Page 221: Intpg (Unit Interruption Program Start), Iret

    3.39 INTPG (Unit Interruption Program Start), IRET (Unit Interruption Program End) 3.39 INTPG (Unit Interruption Program Start), IRET (Unit Interruption Program End) ■ Ladder diagram ■ Outline of operation ● These instructions are described in subprogram areas in the same PB to indicate the start and end positions of interruption program.
  • Page 222 3.39 INTPG (Unit Interruption Program Start), IRET (Unit Interruption Program End) Corresponding interruption program No. Comparison match flag of unit Slot 1 Slot 2 Slot 3 ----- ----- Slot 15 Slot 16 CH1 Comparison INTPG 12 INTPG 22 INTPG 32 ----- ----- INTPG 152...
  • Page 223 3.39 INTPG (Unit Interruption Program Start), IRET (Unit Interruption Program End) Main program process INT11 program process INT12 program process INT12 input ■ Control when multiple interrupts occur simultaneously ● The priority order when multiple interruptions have occurred simultaneously is as follows: Unit interruption: INTPG0 >...
  • Page 224 3.39 INTPG (Unit Interruption Program Start), IRET (Unit Interruption Program End) Main program process INT11 program process INT12 program process INT13 program process INT14 program process INT11 input INT12 input INT13 input INT14 input ■ Interrupt program execution waiting and clearing ●...
  • Page 225 3.39 INTPG (Unit Interruption Program Start), IRET (Unit Interruption Program End) Executes ICLR (INT12 clear) Main program process INT11 program process INT12 program process INT11 input INT12 input ■ Precautions for programming ● Always use the INTPG n and IRET instructions in combination. A syntax error occurs if either "INTPG"...
  • Page 226: Di (Cpu Interruption Disable), Ei (Cpu Interruption Enable)

    3.40 DI (CPU Interruption Disable), EI (CPU Interruption Enable) 3.40 DI (CPU Interruption Disable), EI (CPU Interruption Enable) ■ Ladder diagram ■ Outline of operation ● This instruction disables all interruption programs INTPG and the acceptance of interruption of fixed cycle execution type PB at the same time as the execution of the instruction. At this time, the unit in which interruption has occurred suspends the detected interruption.
  • Page 227: Imask (Unit Interruption Disable/Enable Setting)

    3.41 IMASK (Unit Interruption Disable/Enable Setting) 3.41 IMASK (Unit Interruption Disable/Enable Setting) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Control data specifying INTPG number to disable/enable the unit interruption: H0 to HFF Slot number (U constant) or device number where slot number is stored ■...
  • Page 228 3.41 IMASK (Unit Interruption Disable/Enable Setting) ■ Precautions for programming ● To enable the interruption of the unit, the interruption to the CPU unit must be enabled using the El instruction. ● When a unit in which interruption occurs is not installed in the specified slot, an operation error occurs.
  • Page 229: Iclr (Unit Interruption Clear)

    3.42 ICLR (Unit Interruption Clear) 3.42 ICLR (Unit Interruption Clear) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Control data specifying INTPG number to clear interruption: HFF00 to HFFFF Slot number (U constant) or device number where slot number is stored ■...
  • Page 230 3.42 ICLR (Unit Interruption Clear) ■ Precautions for programming ● When a unit in which interruption occurs is not installed in the specified slot, an operation error occurs. ● The suspension of the interruption of a bit on which the interruption is disabled is also cleared.
  • Page 231: Startpg (Pbn Execution Start), Stoppg (Pbn Execution Stop)

    3.43 STARTPG (PBn Execution Start), STOPPG (PBn Execution Stop) 3.43 STARTPG (PBn Execution Start), STOPPG (PBn Execution Stop) ■ Ladder diagram ■ List of operands Operand Description Target PB number (1 to 468) (Note 1) The maximum value for the PB number varies depending on the type of CPU unit and the settings for the program memory.
  • Page 232 3.43 STARTPG (PBn Execution Start), STOPPG (PBn Execution Stop) ■ Operation of system relays (SR) Standby Active process Active SR state Waiting Waiting 2nd and later 1st scan 1st scan scans (Note 1) ON at the start of PBn execution. (Note 2) (Note 2) SR16...
  • Page 233 3.43 STARTPG (PBn Execution Start), STOPPG (PBn Execution Stop) ■ Timing chart Active Waiting Active Waiting Active Scan 1 Scan 2 Scan 4 Scan 3 Scan 6 Scan 5 PB1 PB3 PB1 PB3 PB3 PB1 PB3 PB1 PB1 PB3 X 100 R 100 R 101 Y 100...
  • Page 234: Gpb (Global Pb Number Setting)

    3.44 GPB (Global PB Number Setting) 3.44 GPB (Global PB Number Setting) ■ Ladder diagram ■ List of operands Operand Description Global PB number (1000 to 1999) ■ Outline of operation ● A fixed PB number can be used for the global PB number, even if the PB position is changed.
  • Page 235 3.44 GPB (Global PB Number Setting) Example 2) Example when not using GPB Calls the subroutine for PB1 from PB2. PB1 program PB2 program Program example WUME-FP7CPUPGR-12 3-131...
  • Page 236: Comout (Comment Out) / Endcom(Comment Out End)

    3.45 COMOUT (Comment Out) / ENDCOM(Comment Out End) 3.45 COMOUT (Comment Out) / ENDCOM(Comment Out End) ■ Ladder diagram ■ Outline of operation This instruction comments out text between the COMOUT and ENDCOM instructions. ■ Input method On the program edit screen, select the network you want to comment out, right-click on it and select "Target/Detarget This Network For Conversion"...
  • Page 237: St=, St<>, St>, St>=, St<, St<= (Data Comparison: Start)

    3.46 ST=, ST<>, ST>, ST>=, ST<, ST<= (Data Comparison: Start) 3.46 ST=, ST<>, ST>, ST>=, ST<, ST<= (Data Comparison: Start) ■ Ladder diagram Y130 DT 0 >=. SS K 70 ■ Available operation units (●: Available) Operatio n unit ● ●...
  • Page 238 3.46 ST=, ST<>, ST>, ST>=, ST<, ST<= (Data Comparison: Start) ■ Outline of operation Compares signed data specified in [S1] with signed data specified in [S2]. Begins a logic operation as a contact connected when the comparison result is in the specified state (such as =, <, or >).
  • Page 239 3.46 ST=, ST<>, ST>, ST>=, ST<, ST<= (Data Comparison: Start) Name Description (ER) WUME-FP7CPUPGR-12 3-135...
  • Page 240: An=, An<>, An>, An>=, An<, An<= (Data Comparison: And)

    3.47 AN=, AN<>, AN>, AN>=, AN<, AN<= (Data Comparison: AND) 3.47 AN=, AN<>, AN>, AN>=, AN<, AN<= (Data Comparison: AND) ■ Ladder diagram Y130 X100 DT 0 >=. SS K 70 ■ Available operation units (●: Available) Operatio n unit ●...
  • Page 241 3.47 AN=, AN<>, AN>, AN>=, AN<, AN<= (Data Comparison: AND) ■ Outline of operation Compares signed data specified in [S1] with signed data specified in [S2]. Connects in serial as a contact connected when the comparison result is in the specified state (such as =, <, or >).
  • Page 242 3.47 AN=, AN<>, AN>, AN>=, AN<, AN<= (Data Comparison: AND) ■ Flag operations Name Description ON if the specified address using the index modification exceeds a limit. (ER) 3-138 WUME-FP7CPUPGR-12...
  • Page 243: Or=, Or<>, Or>, Or>=, Or<, Or<= (Data Comparison (Or))

    3.48 OR=, OR<>, OR>, OR>=, OR<, OR<= (Data Comparison (OR)) 3.48 OR=, OR<>, OR>, OR>=, OR<, OR<= (Data Comparison (OR)) ■ Ladder diagram Y130 X100 DT 0 >=. SS K 70 ■ Available operation units (●: Available) Operatio n unit ●...
  • Page 244 3.48 OR=, OR<>, OR>, OR>=, OR<, OR<= (Data Comparison (OR)) (Note 7) Can be specified only when the operation unit is a single-precision floating point real number (SF). (Note 8) Can be specified only when the operation unit is a double-precision floating point real number (DF). ■...
  • Page 245 3.48 OR=, OR<>, OR>, OR>=, OR<, OR<= (Data Comparison (OR)) ● Since BCD data is assumed to be a negative value during comparison if the most significant bit is 1, the comparison result may become incorrect. In such a case, use the BIN instruction to convert the data into binary before comparison.
  • Page 246 (MEMO) 3-142 WUME-FP7CPUPGR-12...
  • Page 247: High-Level Instructions(Data Comparison)

    4 High-level Instructions(Data Comparison) Applicable Models: All Models 4.1 CMP (Data Compare) .................4-2 4.2 WIN (Band Compare) .................4-6 4.3 BCMP (Block Comparison) ..............4-9 WUME-FP7CPUPGR-12...
  • Page 248: Cmp (Data Compare)

    4.1 CMP (Data Compare) 4.1 CMP (Data Compare) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Comparison data 1 (device address or constant) Comparison data 2 (device address or constant) ■...
  • Page 249 4.1 CMP (Data Compare) ■ Outline of operation ● According to the operation unit [i], two pieces of data that are stored in two different areas that start from [S1] and [S2] respectively are compared. ● The comparison result is output to the system relays SRA to SRC (assessment flags for comparison flags).
  • Page 250 4.1 CMP (Data Compare) Example 3) Operation unit: Unsigned 16 bits (US) (SRB (=) ON) [i]…US [S1]…DT0 [ S2]…DT1 Hexadecimal Unsigned decimal Signed decimal H 1234 K 4660 K 4660 H 1234 K 4660 K 4660 Flag operations during execution SRA( >...
  • Page 251 4.1 CMP (Data Compare) Name Description SRA (>) SRB (=) Depending on the comparison result SRC (<) WUME-FP7CPUPGR-12...
  • Page 252: Win (Band Compare)

    4.2 WIN (Band Compare) 4.2 WIN (Band Compare) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Comparison data (device address or constant) Lower limit (device address or constant) Upper limit (device address or constant) ■...
  • Page 253 4.2 WIN (Band Compare) ■ Outline of operation ● According to the operation unit [i], [S1] (comparison data) is checked to determine if it is within the range between [S2] (lower limit) and [S3] (upper limit). ● The comparison result is output to the system relays SRA to SRC (assessment flags for comparison flags).
  • Page 254 4.2 WIN (Band Compare) Example 3) Operation unit: Signed 16 bits (SS) (operation error) [i]…SS [S1] DT0 [S2]…DT1 [S3]…DT2 … Hexadecimal Unsigned decimal Signed decimal H 6000 K 32768 K -32767 H 7000 K 28672 K 28672 H 9000 K 36864 K -28671 Flag operations during execution SRA( >...
  • Page 255: Bcmp (Block Comparison)

    4.3 BCMP (Block Comparison) 4.3 BCMP (Block Comparison) ■ Ladder diagram ■ List of operands Operand Description Area that stores control data, or the constant data Number of data to be compared (device address or constant) (available range: 1 to 4096) Starting address (device address) of comparison block 1 Starting address (device address) of comparison block 2 ■...
  • Page 256 4.3 BCMP (Block Comparison) ■ Processing Example 1) Comparison between 5 bytes that start from a low byte in block 1 and 5 bytes that start from a low byte in block 2 [S1]...H0 [S2]...U5 [S3]...DT1 [S4]...DT10 → SRB:ON Block 1 Block 2 High High...
  • Page 257 4.3 BCMP (Block Comparison) Name Description To be set when the comparison range is outside the accessible range. To be set when the control data is outside the range. (ER) To be set when the block length is outside the available range. To be set when the comparison blocks of [S3] and [S4] match.
  • Page 258 (MEMO) 4-12 WUME-FP7CPUPGR-12...
  • Page 259: High-Level Instructions (Data Transfer)

    5 High-level Instructions (Data Transfer) Applicable Models: All Models 5.1 MV (Data Transfer) ................5-2 5.2 MV/ (Inversion and Transfer) ..............5-4 5.3 MV2 (2 Data Transfer) ................5-6 5.4 MV3 (3 Data Transfer) ................5-8 5.5 BKMV (Block Transfer) ...............5-10 5.6 COPY (Block Copy) ................5-13 5.7 BTM (Bit Block Transfer)..............5-16 5.8 DGT (Digit Data Transfer)..............5-18 5.9 RST (Reset) ..................5-22...
  • Page 260: Mv (Data Transfer)

    5.1 MV (Data Transfer) 5.1 MV (Data Transfer) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description The source device address or the constant Destination device address ■...
  • Page 261 5.1 MV (Data Transfer) ■ Outline of operation ● This instruction transfers the operation unit data specified by [i] from the device address or the constant specified by [S] to the device address specified by [D]. [S] → [D] ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) When the operation unit is 32-bit (UL, SL, SF)
  • Page 262: Mv/ (Inversion And Transfer)

    5.2 MV/ (Inversion and Transfer) 5.2 MV/ (Inversion and Transfer) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description The source device address or the constant Destination device address ■...
  • Page 263 5.2 MV/ (Inversion and Transfer) ■ Outline of operation ● This instruction logically inverts and transfers the specified operation unit data [i] from the device address or the constant specified by [S] to the device address specified by [D]. /[S] → [D] ■...
  • Page 264: Mv2 (2 Data Transfer)

    5.3 MV2 (2 Data Transfer) 5.3 MV2 (2 Data Transfer) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description The device address of the source 1 or the constant The device address of the source 2 or the constant Destination device address ■...
  • Page 265 5.3 MV2 (2 Data Transfer) ■ Outline of operation ● This instruction transfers two data specified by [S1] and [S2] to the area starting from [D] all at once according to the operation unit specified by [i]. ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) When the operation unit is 32-bit (UL, SL, SF) ■...
  • Page 266: Mv3 (3 Data Transfer)

    5.4 MV3 (3 Data Transfer) 5.4 MV3 (3 Data Transfer) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description The device address of the source 1 or the constant The device address of the source 2 or the constant The device address of the source 3 or the constant Destination device address...
  • Page 267 5.4 MV3 (3 Data Transfer) (Note 8) Can be specified only when the operation unit is a double-precision floating point real number (DF). ■ Outline of operation ● This instruction transfers three data specified by [S1], [S2] and [S3] to the area starting from [D] all at once according to the operation unit specified by [i].
  • Page 268: Bkmv (Block Transfer)

    5.5 BKMV (Block Transfer) 5.5 BKMV (Block Transfer) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Starting device address of source data Ending device address of source data Destination starting device address to transfer data ■...
  • Page 269 5.5 BKMV (Block Transfer) ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) When the operation unit is 32-bit (UL, SL, SF) ■ Precautions for programming ● In the case of a direct address and index modification address, specify the same device for [S1] and [S2].
  • Page 270 5.5 BKMV (Block Transfer) Name Description To be set when [S1] is larger than [S2]. (ER) To be set when the destination range is outside the accessible range. 5-12 WUME-FP7CPUPGR-12...
  • Page 271: Copy (Block Copy)

    5.6 COPY (Block Copy) 5.6 COPY (Block Copy) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description The device address or the constant of the source data Starting device address of destination area End device address of the destination area ■...
  • Page 272 5.6 COPY (Block Copy) ■ Outline of operation This instruction copies data specified by [S] to the areas of [D1] to [D2]. ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) Operation unit: 32 bits (UL, SL, SF) ■...
  • Page 273 5.6 COPY (Block Copy) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when [D1] is larger than [D2]. (ER) WUME-FP7CPUPGR-12 5-15...
  • Page 274: Btm (Bit Block Transfer)

    5.7 BTM (Bit Block Transfer) 5.7 BTM (Bit Block Transfer) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Starting bit address of the source data End bit address of the source data Starting bit address of the data destination ■...
  • Page 275 5.7 BTM (Bit Block Transfer) ■ Processing Example 1) Transfer X1 through X8 to Y6 through YD [S1]…X1 [S2]…X8 [D]…Y6 F E D C B A 9 8 7 6 5 4 3 2 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 1 1 F E D C B A 9 8 7 6 5 4 3 2 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 Example 2) Transfer X1 through X8 to YD through Y14...
  • Page 276: Dgt (Digit Data Transfer)

    5.8 DGT (Digit Data Transfer) 5.8 DGT (Digit Data Transfer) ■ Ladder diagram ■ List of operands Operand Description The device address or the constant of the source data Transfer starting digit in the source (Available data range: 0 to 3) Digits to be transferred (Available data range: 1 to 4) The device address of the destination data Transfer starting digit in the destination (Available data range: 0 to 3)
  • Page 277 5.8 DGT (Digit Data Transfer) F E D C B A 9 8 7 6 5 4 3 2 1 0 Digit 3 Digit 2 Digit 1 Digit 0 WUME-FP7CPUPGR-12 5-19...
  • Page 278 5.8 DGT (Digit Data Transfer) ■ Processing Example 1) Transfer from Digit 1 to Digit 1 [S]…WX0 [S1]…U1(H1) [n]…U1(H1) [D]…WY0 [D1]…U1(H1) F E D C B A 9 8 7 6 5 4 3 2 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 1 1 F E D C B A 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 Example 2) Shift by one digit and transfer...
  • Page 279 5.8 DGT (Digit Data Transfer) Example 4) Shift and transfer multiple digits [S]…WX0 [S1]…U0(H0) [n]…U2(H2) [D]…WY0 [D1]…U2(H2) F E D C B A 9 8 7 6 5 4 3 2 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 1 1 F E D C B A 9 8 7 6 5 4 3 2 1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 Example 5) Transfer four digits...
  • Page 280: Rst (Reset)

    5.9 RST (Reset) 5.9 RST (Reset) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Target of reset ■ Available devices (●: Available) 32-Bit Real device: 16-Bit device: Integer...
  • Page 281 5.9 RST (Reset) ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) When the operation unit is 32-bit (UL, SL, SF) [i]…UL,SL,SF [D]…DT6 H 11223344 H 11223344 DT0・DT1 DT0・DT1 H 55667788 H 55667788 DT2・DT3 DT2・DT3 H 9900AABB H 9900AABB DT4・DT5...
  • Page 282: Zrst (Block Clear)

    5.10 ZRST (Block Clear) 5.10 ZRST (Block Clear) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Starting bit address of the reset data End bit address of the reset data ■...
  • Page 283 5.10 ZRST (Block Clear) ■ Processing Example 1) Reset Y1 through Y8 [D1]…Y1 [D2]…Y8 F E D C B A 9 8 7 6 5 4 3 2 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 F E D C B A 9 8 7 6 5 4 3 2 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 Example 2) Reset YD through Y14...
  • Page 284: Bkext (16-Bit Data Sign-Extended Block Transfer)

    5.11 BKEXT (16-bit Data Sign-extended Block Transfer) 5.11 BKEXT (16-bit Data Sign-extended Block Transfer) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The starting address of the device storing the data that sign extension is performed. The ending address of the device storing the data that sign extension is performed.
  • Page 285 5.11 BKEXT (16-bit Data Sign-extended Block Transfer) Example 2) Operation unit: unsigned 16-bit (US) [S1]...DT0 [S2]...DT3 [D]...TS0 ■ Precautions for programming ● In the case of a direct address and index modification address, specify the same device for [S1] and [S2]. At the same time, specify [S2] to be greater than or equal to [S1]. ●...
  • Page 286: Bkmv16 (Block Transfer (32-Bit Data To 16-Bit Data))

    5.12 BKMV16 (Block Transfer (32-bit Data to 16-bit Data)) 5.12 BKMV16 (Block Transfer (32-bit Data to 16-bit Data)) ■ Ladder diagram ■ List of operands Operand Description Starting device address of source data Ending device address of source data Destination starting device address to transfer data ■...
  • Page 287 5.12 BKMV16 (Block Transfer (32-bit Data to 16-bit Data)) ■ Precautions for programming ● In the case of a direct address and index modification address, specify the same device for [S1] and [S2]. At the same time, specify [S2] to be greater than or equal to [S1]. ■...
  • Page 288: Xch (Data Exchange)

    5.13 XCH (Data Exchange) 5.13 XCH (Data Exchange) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Device address of exchanged data 1 Device address of exchanged data 2 ■...
  • Page 289 5.13 XCH (Data Exchange) ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) When the operation unit is 32-bit (UL, SL, SF) ■ Precautions for programming ● Ensure that the ranges of the exchanged data do not overlap. ■...
  • Page 290: Swap (Exchange Of High Bytes And Low Bytes)

    5.14 SWAP (Exchange of High Bytes and Low Bytes) 5.14 SWAP (Exchange of High Bytes and Low Bytes) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Device address of the source where high bytes and low bytes should be exchanged Device address of destination of the exchanged data ■...
  • Page 291 5.14 SWAP (Exchange of High Bytes and Low Bytes) ■ Processing Example) Operation unit: 16 bits (US, SS) [i]…US,SS [S]…DT2 [D]…DT4 H 0011 H 0011 H 2233 H 2233 H 4455 H 4455 H 6677 H 6677 H 8899 H 5544 ■...
  • Page 292: Bswap (High /Low Byte In N Block Exchange)

    5.15 BSWAP (High /Low Byte in n Block Exchange) 5.15 BSWAP (High /Low Byte in n Block Exchange) ■ Ladder diagram ■ List of operands Operand Description The starting address of the device to exchange the high and low bytes The number of words to exchange the high and low bytes Device address of destination of the exchanged data ■...
  • Page 293 5.15 BSWAP (High /Low Byte in n Block Exchange) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the transfer range is outside the accessible range. (ER) WUME-FP7CPUPGR-12 5-35...
  • Page 294: Lcwt (Specified Pb Local Device Write)

    5.16 LCWT (Specified PB Local Device Write) 5.16 LCWT (Specified PB Local Device Write) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Starting address of a source device Number of written devices (Available range: 1 to 65535) Destination PB number (Available range: 1 to Max.
  • Page 295 5.16 LCWT (Specified PB Local Device Write) ● For [D], specify a local device that is in the program block of the PB number specified for [PBm]. ● Subroutine arguments can be specified by combining this instruction with the ECALL instruction.
  • Page 296: Lcrd (Specified Pb Local Device Read)

    5.17 LCRD (Specified PB Local Device Read) 5.17 LCRD (Specified PB Local Device Read) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Source PB number (Available range: 1 to Max. number of PB) Starting address of source local device Number of read devices (Available range: 1 to 65535) Starting address of readout destination device...
  • Page 297 5.17 LCRD (Specified PB Local Device Read) ● Either a global device or a local device (of the PB in which this instruction is executed) can be specified for [D]. ● Subroutine arguments can be specified by combining this instruction with the ECALL instruction.
  • Page 298 5.17 LCRD (Specified PB Local Device Read) ECALL preprocessing Sets arguments and PB number MV.US _DT10 Argument 1 MV.US _DT11 Argument 2 MV.US _WX2 Flag MV.US _DT100 PB No. ECALL processing Gives arguments to SBL, and acquires return values after execution. LCWT.US _DT10 _DT100...
  • Page 299 5.17 LCRD (Specified PB Local Device Read) ■ Example of processing: Presetting of specified PB local devices The following example shows how to initialize the local devices of PBs that are specified in one ● Executes the instruction in PB1, and sets to initialize devices to the local devices of PB2 to 4 collectively.
  • Page 300: Pushix (Index Register Backup)

    5.18 PUSHIX (Index Register Backup) 5.18 PUSHIX (Index Register Backup) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Start of device address of the backup destination ■ Available devices (●: Available) Real 32-Bit 16-Bit device:...
  • Page 301 5.18 PUSHIX (Index Register Backup) ■ Processing Example) Specify DT0 for the 1st operand [D] After backup Before backup H 00112233 H 00000000 H 00112233 H 00000000 H 44556677 H 44556677 H 00000000 H 8899AABB H 8899AABB Backup H CCDDEEFF DT24 H 00000000 H CCDDEEFF...
  • Page 302: Popix (Index Register Recovery)

    5.19 POPIX (Index Register Recovery) 5.19 POPIX (Index Register Recovery) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Start of device address of the recovery source ■ Available devices (●: Available) Real 32-Bit 16-Bit device:...
  • Page 303 5.19 POPIX (Index Register Recovery) ■ Processing Example) Specify DT0 for the 1st operand [S] After recovery Before recovery H 00112233 H 00000000 H 00112233 H 44556677 H 00000000 H 44556677 H 00000000 H 8899AABB H 8899AABB Recovery DT24 H CCDDEEFF H 00000000 H CCDDEEFF H 12345678...
  • Page 304 (MEMO) 5-46 WUME-FP7CPUPGR-12...
  • Page 305 6 High-level Instructions (Arithmetic/Logic Operations) Applicable Models: All Models 6.1 ADD (Addition) ..................6-2 6.2 SUB (Subtraction) ................6-4 6.3 MUL (Multiplication) ................6-6 6.4 MLCLIP (Saturation Multiplication) .............6-9 6.5 DIV (Division) ..................6-11 6.6 DIVMOD (Division (With a remainder))..........6-13 6.7 DIVFP2 (Division (FP2 Compatible)) ..........6-15 6.8 INC (Increment) ..................6-18 6.9 DEC (Decrement) ................6-20 6.10 BCDADD (BCD Data Addition) ............6-22...
  • Page 306: Add (Addition)

    6.1 ADD (Addition) 6.1 ADD (Addition) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 307 6.1 ADD (Addition) ■ Outline of operation ● This instruction adds the values [S1] and [S2] according to the operation unit [i]. ● The calculation result is stored in the address starting with [D]. [S1] + [S2] → [D] ■ Processing Example 1) Operation unit: 16 bits (US, SS) Example 2) Operation unit: 32 bits (UL, SL, SF)
  • Page 308: Sub (Subtraction)

    6.2 SUB (Subtraction) 6.2 SUB (Subtraction) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 309 6.2 SUB (Subtraction) ■ Outline of operation ● This instruction subtracts the value [S2] from [S1] according to the operation unit [i]. ● The calculation result is stored in the address starting with [D]. [S1] - [S2] → [D] ■ Processing Example 1) Operation unit: 16 bits (US, SS) Example 2) Operation unit: 32 bits (UL, SL, SF)
  • Page 310: Mul (Multiplication)

    6.3 MUL (Multiplication) 6.3 MUL (Multiplication) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 311 6.3 MUL (Multiplication) ■ Outline of operation ● This instruction multiplies the values [S1] and [S2] according to the operation unit [i]. ● The calculation result is stored in the address starting with [D]. [S1] × [S2] → ([D] to [D]+1) ●...
  • Page 312 6.3 MUL (Multiplication) Example 4) Operation unit: 64 bits (DF) ■ Precautions for programming When the operation units are US, SS, UL, or SL, the area where the operation result is stored has twice the size of the operation unit. Allocate the memory area so that other areas will not be overwritten.
  • Page 313: Mlclip (Saturation Multiplication)

    6.4 MLCLIP (Saturation Multiplication) 6.4 MLCLIP (Saturation Multiplication) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 314 6.4 MLCLIP (Saturation Multiplication) ● As for the signed operation, if the result exceeds the operation unit, it is corrected to the maximum or minimum value. ■ Processing Example 1) Operation unit: 16 bits (US, SS) Example 2) Operation unit: 32 bits (UL, SL, SF) Example 3) When the operation unit is unsigned 16-bit (US) and exceeds the maximum value...
  • Page 315: Div (Division)

    6.5 DIV (Division) 6.5 DIV (Division) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 316 6.5 DIV (Division) ■ Outline of operation ● This instruction divides the value [S1] with [S2] according to the operation unit [i]. ● The calculation result is stored in the address starting with [D]. [S1] / [S2] → Quotient ([D]) ●...
  • Page 317: Divmod (Division (With A Remainder))

    6.6 DIVMOD (Division (With a remainder)) 6.6 DIVMOD (Division (With a remainder)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 318 6.6 DIVMOD (Division (With a remainder)) ■ Processing Example 1) Operation unit: 16 bits (US, SS) Example 2) Operation unit: 32 bits (UL, SL) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when a non-real number is specified for [S1] or [S2], and the operation unit is a real number (SF).
  • Page 319: Divfp2 (Division (Fp2 Compatible))

    6.7 DIVFP2 (Division (FP2 Compatible)) 6.7 DIVFP2 (Division (FP2 Compatible)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 320 6.7 DIVFP2 (Division (FP2 Compatible)) ● Calculation results are stored as follows according to the operation unit [i]. US·SS: (S1) ÷ (S2) → Quotient (D), Remainder (SD15) UL·SL: (S1+1, S1) ÷ (S2+1, S2) → Quotient (D+1, D), Remainder (SD16, SD15) ●...
  • Page 321 6.7 DIVFP2 (Division (FP2 Compatible)) Name Description (ER) WUME-FP7CPUPGR-12 6-17...
  • Page 322: Inc (Increment)

    6.8 INC (Increment) 6.8 INC (Increment) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Calculation result data (device address) ■ Available devices (●: Available) 32-Bit Real device:...
  • Page 323 6.8 INC (Increment) ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) When the operation unit is 32-bit (UL, SL, SF) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when a non-real number is specified for [D], and the operation unit is a real (ER) number (SF).
  • Page 324: Dec (Decrement)

    6.9 DEC (Decrement) 6.9 DEC (Decrement) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Calculation target data (device address) ■ Available devices (●: Available) 32-Bit Real device:...
  • Page 325 6.9 DEC (Decrement) ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) When the operation unit is 32-bit (UL, SL, SF) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when a non-real number is specified for [D], and the operation unit is a real (ER) number (SF).
  • Page 326: Bcdadd (Bcd Data Addition)

    6.10 BCDADD (BCD Data Addition) 6.10 BCDADD (BCD Data Addition) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) (Available data: H0 to H9 for each digit) Calculation target data 2 (device address or constant) (Available data: H0 to H9 for each digit) Calculation result data (device address) ■...
  • Page 327 6.10 BCDADD (BCD Data Addition) ■ Processing Example 1) Operation unit: 16 bits (US) Example 2) Operation unit: 32 bits (UL) Example 3) Operation unit: 16 bits (US) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when data other than BCD are specified for the calculation target data [S1] or [S2].
  • Page 328: Bcdsub (Bcd Data Subtraction)

    6.11 BCDSUB (BCD Data Subtraction) 6.11 BCDSUB (BCD Data Subtraction) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) (Available data: H0 to H9 for each digit) Calculation target data 2 (device address or constant) (Available data: H0 to H9 for each digit) Calculation result data (device address) ■...
  • Page 329 6.11 BCDSUB (BCD Data Subtraction) ■ Processing Example 1) Operation unit: 16 bits (US) Example 2) Operation unit: 32 bits (UL) Example 3) Operation unit: 16 bits (US) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when data other than BCD are specified for the calculation target data [S1] or [S2].
  • Page 330: Bcdmul (Bcd Data Multiplication)

    6.12 BCDMUL (BCD Data Multiplication) 6.12 BCDMUL (BCD Data Multiplication) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) (Available data: H0 to H9 for each digit) Calculation target data 2 (device address or constant) (Available data: H0 to H9 for each digit) Calculation result data (device address) ■...
  • Page 331 6.12 BCDMUL (BCD Data Multiplication) ■ Processing Example 1) Operation unit: 16 bits (US) Example 2) Operation unit: 32 bits (UL) ■ Precautions for programming If the ending area of the operation device is specified for [D], the memory for the subsequent device may be overwritten by an area twice the size of the operation unit.
  • Page 332: Bcddiv (Bcd Data Division)

    6.13 BCDDIV (BCD Data Division) 6.13 BCDDIV (BCD Data Division) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) (Available data: H0 to H9 for each digit) Calculation target data 2 (device address or constant) (Available data: H0 to H9 for each digit) Calculation result data (device address) ■...
  • Page 333 6.13 BCDDIV (BCD Data Division) ■ Processing Example 1) Operation unit: 16 bits (US) Example 2) Operation unit: 32 bits (UL) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when '0' is specified for [S2]. (ER) To be set when data other than BCD are specified for the calculation target data [S1] or [S2].
  • Page 334: Bcdinc (Bcd Data Increment)

    6.14 BCDINC (BCD Data Increment) 6.14 BCDINC (BCD Data Increment) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data (device address) ■ Available devices (●: Available) 32-Bit Real device:...
  • Page 335 6.14 BCDINC (BCD Data Increment) ■ Processing Example 1) Operation unit: 16 bits (US) Example 2) Operation unit: 32 bits (UL) Example 3) Operation unit: 16 bits (US) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when data other than BCD are specified for the calculation target data [D].
  • Page 336: Bcddec (Bcd Data Decrement)

    6.15 BCDDEC (BCD Data Decrement) 6.15 BCDDEC (BCD Data Decrement) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data (device address) ■ Available devices (●: Available) 32-Bit Real device:...
  • Page 337 6.15 BCDDEC (BCD Data Decrement) ■ Processing Example 1) Operation unit: 16 bits (US) Example 2) Operation unit: 32 bits (UL) Example 3) Operation unit: 16 bits (US) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when data other than BCD are specified for the calculation target data [D].
  • Page 338: And (Logical Conjunction)

    6.16 AND (Logical Conjunction) 6.16 AND (Logical Conjunction) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 339 6.16 AND (Logical Conjunction) ■ Logical conjunction (AND) [S1] bit [S2] bit Logical conjunction ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) Operation unit: 32 bits (UL, SL) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) WUME-FP7CPUPGR-12 6-35...
  • Page 340: Or (Logical Disjunction)

    6.17 OR (Logical Disjunction) 6.17 OR (Logical Disjunction) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 341 6.17 OR (Logical Disjunction) ■ Logical disjunction (OR) [S1] bit [S2] bit Logical disjunction ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) Operation unit: 32 bits (UL, SL) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) WUME-FP7CPUPGR-12 6-37...
  • Page 342: Xor (Exclusive Or)

    6.18 XOR (Exclusive OR) 6.18 XOR (Exclusive OR) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 343 6.18 XOR (Exclusive OR) ■ Exclusive OR (XOR) [S1] bit [S2] bit Exclusive OR ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) Operation unit: 32 bits (UL, SL) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) WUME-FP7CPUPGR-12 6-39...
  • Page 344: Xnr (Exclusive Nor)

    6.19 XNR (Exclusive NOR) 6.19 XNR (Exclusive NOR) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Calculation target data 1 (device address or constant) Calculation target data 2 (device address or constant) Calculation result data (device address) ■...
  • Page 345 6.19 XNR (Exclusive NOR) ■ Exclusive NOR (XNR) [S1] bit [S2] bit Exclusive NOR ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) Operation unit: 32 bits (UL, SL) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) WUME-FP7CPUPGR-12 6-41...
  • Page 346: Comb (Combination)

    6.20 COMB (Combination) 6.20 COMB (Combination) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Combined data 1 (device address or constant) Combined data 2 (device address or constant) Combination mask data (device address or constant) Combination result data (device address) ■...
  • Page 347 6.20 COMB (Combination) ● The calculation result is stored in the address starting with [D]. ● When the mask data specified for [S3] is ON for the bit, the combination starts from [S1]. When it is OFF, the combination starts from [S2]. { [S1] ˄...
  • Page 348 (MEMO) 6-44 WUME-FP7CPUPGR-12...
  • Page 349: High-Level Instructions (Data Conversion)

    7 High-level Instructions (Data Conversion) Applicable Models: All Models 7.1 INV (Data Inversion) ................7-2 7.2 NEG (Sign Inversion) ................7-4 7.3 ABS (Absolute Value) .................7-6 7.4 EXT (Sign Extension)................7-8 7.5 BCD (Conversion: BCD Data).............7-10 7.6 BIN (Conversion: BCD → BIN) ............7-12 7.7 DECO (Decoding) ................7-14 7.8 SEGT (7-Segment Decoding) .............7-17 7.9 ENCO (Encoding) ................7-20...
  • Page 350: Inv (Data Inversion)

    7.1 INV (Data Inversion) 7.1 INV (Data Inversion) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Device address where the data to be inverted are stored ■...
  • Page 351 7.1 INV (Data Inversion) Example 1) Operation unit: 16 bits (US, SS) Example 2) Operation unit: 32 bits (UL, ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) WUME-FP7CPUPGR-12...
  • Page 352: Neg (Sign Inversion)

    7.2 NEG (Sign Inversion) 7.2 NEG (Sign Inversion) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the data whose sign is to be inverted are stored, or the constant Storage device address ■...
  • Page 353 7.2 NEG (Sign Inversion) ■ Processing Example 1) Operation unit: 16 bits (SS) Example 2) Operation unit: 32 bits (SL) ■ Precautions for programming ● The result should be the minimum negative value if it has been specified. ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification).
  • Page 354: Abs (Absolute Value)

    7.3 ABS (Absolute Value) 7.3 ABS (Absolute Value) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description The device address where the data for taking an absolute value are stored, or the constant Storage device address ■...
  • Page 355 7.3 ABS (Absolute Value) Example 1) Operation unit: Signed 16 bits (SS) Example 2) Operation unit: Signed 32 bits (SL) ■ Precautions for programming ● The same value for unsigned integers (US, UL) is stored. ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification).
  • Page 356: Ext (Sign Extension)

    7.4 EXT (Sign Extension) 7.4 EXT (Sign Extension) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the data for sign extension are stored, or the constant Storage device address ■...
  • Page 357 7.4 EXT (Sign Extension) ■ Processing Example 1) Operation unit: Signed 16 bits (SS) [i]…SS [S]…DT0 [D]…DT0 K -2(H FFFE) K-2(H FFFFFFFE) DT0・DT1 K 0(H 0000) Example 2) Operation unit: Unsigned 16 bits (US) [i]…US [S]…DT0 [D]…DT0 H FFFE DT0・DT1 H 0000FFFFE H 1234 ■...
  • Page 358: Bcd (Conversion: Bcd Data)

    7.5 BCD (Conversion: BCD Data) 7.5 BCD (Conversion: BCD Data) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the binary data to be converted is stored, or the constant Device address to store the conversion result ■...
  • Page 359 7.5 BCD (Conversion: BCD Data) ■ Processing Example 1) Operation unit: 16 bits (US) [i]…US [S]…DT0 [D]…DT10 H 0010 DT10 H 0016 (K 16) DT11 Example 2) Operation unit: 32 bits (UL) [i]…UL [S]…DT0 [D]…DT10 H 614E DT10 H 5678 (K 12345678) H 00BC DT11...
  • Page 360: Bin (Conversion: Bcd → Bin)

    7.6 BIN (Conversion: BCD → BIN) 7.6 BIN (Conversion: BCD → BIN) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the BCD data to be converted is stored, or the constant Device address to store the conversion result ■...
  • Page 361 7.6 BIN (Conversion: BCD → BIN) ■ Processing Example 1) Operation unit: 16 bits (US) [i]…US [S]…DT0 [D]…DT10 DT10 H 0016 H 0010 (K 16) DT11 Example 2) Operation unit: 32 bits (UL) [i]…UL [S]…DT0 [D]…DT10 DT10 (K 12345678) H 5678 H 614E DT11 H 1234...
  • Page 362: Deco (Decoding)

    7.7 DECO (Decoding) 7.7 DECO (Decoding) ■ Ladder diagram ■ List of operands Operand Description The device address where the data for decoding are stored, or the constant The device address where the control data (specification of the conversion starting bit, specification of the conversion-enabled bit length) are stored, or the constant Storage device address ■...
  • Page 363 7.7 DECO (Decoding) ■ Specification of control data [N] 12 11 0000 0000 ・・・・ ・・・・ Ignore the bits indicated with '・'. nH (Specify the nL (Specify the conversion- conversion start bit) enabled bit length) Bit 0: H0 1 bit: H1 |...
  • Page 364 7.7 DECO (Decoding) ■ Processing Example) Decode 4 bits from Bit 4 [S]…DT1 [n]…H 0404 [D]…DT2 * Store the result of decoding the specified portion (“0111 ”=7) into the 16-bit -bit) device address starting with DT2. * The 16-bit area starting with DT2 turns ON, while the other bits become '0'. 0000 0000 0111 0000 0000 0000 1000 0000 4 bits...
  • Page 365: Segt (7-Segment Decoding)

    7.8 SEGT (7-Segment Decoding) 7.8 SEGT (7-Segment Decoding) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description The device address where the data for decoding are stored, or the constant Storage device address ■...
  • Page 366 7.8 SEGT (7-Segment Decoding) ■ Precautions for programming ● If an unsigned constant U is specified for [S], it should be converted as HEX data. ■ Notation and corresponding data Conversion data 1 1-digit data for 7-segment notation [D] digit 7-segment display ■...
  • Page 367 7.8 SEGT (7-Segment Decoding) Name Description To be set if, when the conversion result is stored in the device address specified by [D], it (ER) exceeds the area. WUME-FP7CPUPGR-12 7-19...
  • Page 368: Enco (Encoding)

    7.9 ENCO (Encoding) 7.9 ENCO (Encoding) ■ Ladder diagram ■ List of operands Operand Description The device address where the data for encoding are stored, or the constant The device address where control data (specification of the result output start bit, and specification of the conversion-enabled bit length) are stored, or the constant Storage device address ■...
  • Page 369 7.9 ENCO (Encoding) ■ Specification of control data [N] 1211 0000 0000 ・・・・ ・・・・ Ignore the bits indicated with '・'. nH (Specify the result nL (Specify the conversion- output start bit) enabled bit length) Bit 0: H0 bits: H1 | |...
  • Page 370 7.9 ENCO (Encoding) ■ Processing Example) [S]…DT10 [n]…H 0005 [D]…DT20 DGT S , S1 , n , D , D1 Transfer [n] digits from the [S1]th digit of the area specified by [S], to the [D1] digit of the 16-bit data specified by [D].
  • Page 371: Unit (Digit Unification)

    7.10 UNIT (Digit Unification) 7.10 UNIT (Digit Unification) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description The device address where the data to be unified are stored, or the constant (data format: unsigned 16-bit integer) The device address where the number of data to be unified is stored, or the constant (data format: unsigned 16-bit integer)
  • Page 372 7.10 UNIT (Digit Unification) ■ Processing [i]…US [S]…DT10 [n]…U3 [D]…DT20 15・・・12 11・・・8 7・・・4 3・・・0 DT10 0000 0000 0000 0001 DT11 0000 0000 0000 0010 DT12 0000 0000 0000 0100 DT20 15・・・12 11・・・8 7・・・4 3・・・0 0000 0100 0010 0001 Padded with '0'. ■...
  • Page 373: Dist (Digit Disintegration)

    7.11 DIST (Digit Disintegration) 7.11 DIST (Digit Disintegration) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description The device address where the data to be broken down are stored, or the constant (data format: according to the operation unit) The device address where the number of points into which the data is broken down is stored, or the constant (data format: unsigned 16-bit integer)
  • Page 374 7.11 DIST (Digit Disintegration) ■ Processing Example) Operation unit: 16 bits (US) [i]…US [S]…DT10 [n]…U4 [D]…DT20 DT10 15・・・12 11・・・8 7・・・4 3・・・0 0100 0011 0001 0000 0000 0000 0000 0000 DT20 0000 0000 0000 0001 DT21 DT22 0000 0000 0000 0011 0000 0000 0000...
  • Page 375: Buni (Byte Data Unification)

    7.12 BUNI (Byte Data Unification) 7.12 BUNI (Byte Data Unification) ■ Ladder diagram ■ List of operands Operand Description The device address where the data to be unified are stored, or the constant (data format: unsigned 16-bit integer) The device address where the number of data to be unified is stored, or the constant (data format: unsigned 16-bit integer) Available range: 0 to 65535 Storage device address...
  • Page 376 7.12 BUNI (Byte Data Unification) ■ Processing Example 1) [S]…DT10 [n]…U2 [D]…DT20 15・・・・・・8 7・・・・・・0 DT10 00000000 00010001 00000000 00010010 DT11 DT20 15・・・・・・8 7・・・・・・0 00010010 00010001 Example 2) [S]…DT10 [n]…U3 [D]…DT20 15・・・・・・8 7・・・・・・0 DT10 00000000 00010001 00000000 00010010 DT11 DT12 00000000 00010011 DT21 DT20...
  • Page 377: Bdis (Byte Data Disintegration)

    7.13 BDIS (Byte Data Disintegration) 7.13 BDIS (Byte Data Disintegration) ■ Ladder diagram ■ List of operands Operand Description The device address where the data to be broken down are stored, or the constant The device address where the number of points into which the data is broken down is stored, or the constant Storage device address ■...
  • Page 378 7.13 BDIS (Byte Data Disintegration) ■ Processing Example 1) [S]…DT10 [n]…U2 [D]…DT20 DT10 15・・・・・・8 7・・・・・・0 00010010 00010001 DT20 00000000 00010001 DT21 00000000 00010010 Example 2) [S]…DT10 [n]…U4 [D]…DT20 DT11 DT10 31・・・・・・24 23・・・・・・16 15・・・・・・8 7・・・・・・0 00010010 00010011 00010010 00010011 DT20 00000000 00010011 DT21 00000000...
  • Page 379: Gry (Conversion: Binary → Gray Code)

    7.14 GRY (Conversion: Binary → Gray Code) 7.14 GRY (Conversion: Binary → Gray Code) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the data for conversion are stored, or the constant Storage device address (Note 1) For gray codes, refer to the "Correspondence Table: BIN / Gray Code."...
  • Page 380 7.14 GRY (Conversion: Binary → Gray Code) ■ Processing Example 1) Operation unit: 16 bits (US) [i]…US [S]…DT0 [D]…DT10 0000000000011000 DT10 0000000000010100 Example 2) Operation unit: 32 bits (UL) [i]…UL [S]…DT0 [D]…DT10 DT0, DT1 00000000000000000000000000011111 DT10, DT11 00000000000000000000000000010000 ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification).
  • Page 381 7.14 GRY (Conversion: Binary → Gray Code) Decimal Binary Gray code Decimal Binary Gray code 0000 0000 0001 0010 0000 0000 0001 1011 0000 0000 0001 0011 0000 0000 0001 1010 0000 0000 0001 0100 0000 0000 0001 1110 0000 0000 0001 0101 0000 0000 0001 1111 0000 0000 0001 0110 0000 0000 0001 1101...
  • Page 382: Gbin (Conversion: Gray Code → Bin)

    7.15 GBIN (Conversion: Gray Code → BIN) 7.15 GBIN (Conversion: Gray Code → BIN) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the data for conversion are stored, or the constant Storage device address (Note 1) For gray codes, refer to the "Correspondence Table: BIN / Gray Code."...
  • Page 383 7.15 GBIN (Conversion: Gray Code → BIN) ■ Processing Example 1) Operation unit: 16 bits (US) Example 2) Operation unit: 32 bits (UL) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) WUME-FP7CPUPGR-12 7-35...
  • Page 384: Colm (Conversion: Bit Line → Bit Column)

    7.16 COLM (Conversion: Bit Line → Bit Column) 7.16 COLM (Conversion: Bit Line → Bit Column) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description The device address where the data for conversion are stored, or the constant The device address where the specification for the bit position is stored, or the constant (available data range: 0 to 15) Starting address of the device whose bit column is rewritten...
  • Page 385 7.16 COLM (Conversion: Bit Line → Bit Column) [S]...DT1 [n]...U10 [D]...DT10 ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the specification for the bit position [n] is not in the following range: 0 ≤ n ≤ (ER) To be set if, when the conversion result is stored in the device address specified by [D], it exceeds the area.
  • Page 386: Line (Conversion: Bit Column → Bit Line)

    7.17 LINE (Conversion: Bit Column → Bit Line) 7.17 LINE (Conversion: Bit Column → Bit Line) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Starting address of the device whose bit column is read. The device address where the specification for the bit position is stored, or the constant (available data range: 0 to 15) Storage device address...
  • Page 387 7.17 LINE (Conversion: Bit Column → Bit Line) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the specification for the bit position [n] is not in the following range: 0 ≤ n ≤ (ER) To be set when the conversion range specified by [S] exceeds the device address.
  • Page 388 (MEMO) 7-40 WUME-FP7CPUPGR-12...
  • Page 389 8 High-level Instructions (Data Shift and Rotation) Applicable Models: All Models 8.1 SHR (Right Shift for n Bits) ..............8-2 8.2 SHL (Left Shift for n Bits) ..............8-4 8.3 BSR (Right Shift for n Digits) ..............8-6 8.4 BSL (Left Shift for n Digits) ..............8-8 8.5 BITR (Right Shift of Multiple Devices for n Bits) .........8-10 8.6 BITL (Left Shift of Multiple Devices for n Bits) ........8-12 8.7 WSHR (Right Shift of Block Area for n Words) ........8-14...
  • Page 390: Shr (Right Shift For N Bits)

    8.1 SHR (Right Shift for n Bits) 8.1 SHR (Right Shift for n Bits) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description The device address where the data to be shifted is stored The device address where the number of shift bits is stored, or the constant ■...
  • Page 391 8.1 SHR (Right Shift for n Bits) ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) Operation unit: 32 bits (UL, SL) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) To be reset if the [n] (no.
  • Page 392: Shl (Left Shift For N Bits)

    8.2 SHL (Left Shift for n Bits) 8.2 SHL (Left Shift for n Bits) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description The device address where the data to be shifted is stored The device address where the number of shift bits is stored, or the constant ■...
  • Page 393 8.2 SHL (Left Shift for n Bits) ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) Operation unit: 32 bits (UL, SL) Isn't the shift destination for 11 ... 8 "0110"? ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification).
  • Page 394: Bsr (Right Shift For N Digits)

    8.3 BSR (Right Shift for n Digits) 8.3 BSR (Right Shift for n Digits) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description The device address where the data to be shifted is stored The device address where the number of shift digits is stored, or the constant ■...
  • Page 395 8.3 BSR (Right Shift for n Digits) ● If the operation unit is 16 bits (US, SS), the amount of shift is specified between 1 to 4 digits. ● If the operation unit is 32 bits (UL, SL), the amount of shift is specified between 1 to 8 digits. ■...
  • Page 396: Bsl (Left Shift For N Digits)

    8.4 BSL (Left Shift for n Digits) 8.4 BSL (Left Shift for n Digits) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description The device address where the data to be shifted is stored The device address where the number of shift digits is stored, or the constant ■...
  • Page 397 8.4 BSL (Left Shift for n Digits) ● If the operation unit is 16 bits (US, SS), the amount of shift is specified between 1 to 4 digits. ● If the operation unit is 32 bits (UL, SL), the amount of shift is specified between 1 to 8 digits. ■...
  • Page 398: Bitr (Right Shift Of Multiple Devices For N Bits)

    8.5 BITR (Right Shift of Multiple Devices for n Bits) 8.5 BITR (Right Shift of Multiple Devices for n Bits) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Starting address of the devices to be shifted (data format: according to the operation unit) End address of the devices to be shifted (data format: according to the operation unit) The device address where the number of shift bits is stored, or the constant ■...
  • Page 399 8.5 BITR (Right Shift of Multiple Devices for n Bits) ● Once the data is shifted, the pre-shift lower [n] bits of [D1] vanish. The post-shift higher [n] bits of [D2] are padded with 0. ● The setting range of [n] is from 0 to 65535 (0 to 15 for CPU units older than Version 4.32). When [n] is 0, no shift takes place.
  • Page 400: Bitl (Left Shift Of Multiple Devices For N Bits)

    8.6 BITL (Left Shift of Multiple Devices for n Bits) 8.6 BITL (Left Shift of Multiple Devices for n Bits) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Starting address of the devices to be shifted (data format: according to the operation unit) End address of the devices to be shifted (data format: according to the operation unit) The device address where the number of shift bits is stored, or the constant ■...
  • Page 401 8.6 BITL (Left Shift of Multiple Devices for n Bits) ● Once the data is shifted, the pre-shift higher [n] bits of [D1] vanish. The post-shift lower [n] bits of [D2] are padded with 0. ● The setting range of [n] is from 0 to 65535 (0 to 15 for CPU units older than Version 4.32). When [n] is 0, no shift takes place.
  • Page 402: Wshr (Right Shift Of Block Area For N Words)

    8.7 WSHR (Right Shift of Block Area for n Words) 8.7 WSHR (Right Shift of Block Area for n Words) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Starting address of the shift target End address of the shift target Number of words to be shifted to the right (Available data range: 0 to 255 words)
  • Page 403 8.7 WSHR (Right Shift of Block Area for n Words) ● If the specified number of shift words is larger than the shift target range, the entire shift target range is padded with H0000. ■ Processing Example 1) Operation unit: 16 bits (US) [i]…US [D1]…DT1 [D2]…DT7 [n]…U3 5678...
  • Page 404: Wshl (Left Shift Of Block Area For N Words)

    8.8 WSHL (Left Shift of Block Area for n Words) 8.8 WSHL (Left Shift of Block Area for n Words) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Starting address of the shift target End address of the shift target Number of words to be shifted to the left (Available data range: 0 to 255 words)
  • Page 405 8.8 WSHL (Left Shift of Block Area for n Words) ● If the specified number of shift words is larger than the shift target range, the entire shift target range is padded with H0000. ■ Processing Example 1) Operation unit: 16 bits (US) [i]…US [D1]…DT0 [D2]…DT6...
  • Page 406: Wbsr (Right Shift Of Block Area For N Digits)

    8.9 WBSR (Right Shift of Block Area for n Digits) 8.9 WBSR (Right Shift of Block Area for n Digits) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Starting address of the shift target End address of the shift target Number of digits to be shifted to the right (Available data range: 0 to 255 digits)
  • Page 407 8.9 WBSR (Right Shift of Block Area for n Digits) ● If the specified number of shift digits is larger than the shift target range, the entire shift target range is padded with H0000. ■ Processing Example 1) Operation unit: 16 bits (US) ↑The shifted digits are padded with H0 Example 2) Operation unit: 16 bits (SS) ↑The shifted digits are padded with H0...
  • Page 408: Wbsl (Left Shift Of Block Area For N Digits)

    8.10 WBSL (Left Shift of Block Area for n Digits) 8.10 WBSL (Left Shift of Block Area for n Digits) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Starting address of the shift target End address of the shift target Number of digits to be shifted to the left (Available data range: 0 to 255 digits)
  • Page 409 8.10 WBSL (Left Shift of Block Area for n Digits) ● If the specified number of shift digits is larger than the shift target range, the entire shift target range is padded with H0000. ■ Processing Example 1) Operation unit: 16 bits (US) ↑The shifted digits are padded with H0 Example 2) Operation unit: 16 bits (SS) ↑The shifted digits are padded with H0...
  • Page 410: Ror (Right Rotation Of Data)

    8.11 ROR (Right Rotation of Data) 8.11 ROR (Right Rotation of Data) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the data to be rotated is stored The device address where the number of rotation bits is stored, or the constant (Available data range: 0 to 255) ■...
  • Page 411 8.11 ROR (Right Rotation of Data) ■ Processing Example 1) Operation unit: 16 bits (US) Output bit 3 of the pre-operation data to CY. (Output bit 15 of the post-operation data to CY) Example 2) Operation unit: 32 bits (UL) Output bit 7 of the pre-operation data to CY.
  • Page 412: Rol (Left Rotation Of Data)

    8.12 ROL (Left Rotation of Data) 8.12 ROL (Left Rotation of Data) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the data to be rotated is stored The device address where the number of rotation bits is stored, or the constant (Available data range: 0 to 255) ■...
  • Page 413 8.12 ROL (Left Rotation of Data) ■ Processing Example 1) Operation unit: 16 bits (US) Output bit 12 of the pre-operation data to CY. (Output bit 0 of the post-operation data to CY) Example 2) Operation unit: 32 bits (UL) Output bit 24 of the pre-operation data to CY.
  • Page 414: Rcr (Right Rotation Of Data With Carry-Flag Data)

    8.13 RCR (Right Rotation of Data with Carry-Flag Data) 8.13 RCR (Right Rotation of Data with Carry-Flag Data) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the data to be rotated is stored The device address where the number of rotation bits is stored, or the constant (Available data range: 0 to 255) ■...
  • Page 415 8.13 RCR (Right Rotation of Data with Carry-Flag Data) ■ Processing Example 1) Operation unit: 16 bits (US) Output bit 3 of the pre-operation data to CY. Output CY of the pre-operation data to bit 12 Example 2) Operation unit: 32 bits (UL) Output bit 7 of the pre-operation data to CY.
  • Page 416: Rcl (Left Rotation Of Data With Carry-Flag Data)

    8.14 RCL (Left Rotation of Data with Carry-Flag Data) 8.14 RCL (Left Rotation of Data with Carry-Flag Data) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address where the data to be rotated is stored The device address where the number of rotation bits is stored, or the constant (Available data range: 0 to 255) ■...
  • Page 417 8.14 RCL (Left Rotation of Data with Carry-Flag Data) ■ Processing Example 1) Operation unit: 16 bits (US) Output bit 12 of the pre-operation data to CY. Output CY of the pre-operation data to bit 3 Example 2) Operation unit: 32 bits (UL) Output bit 24 of the pre-operation data to CY.
  • Page 418: Cmpr (Data Table Shift-Out And Compress)

    8.15 CMPR (Data Table Shift-Out and Compress) 8.15 CMPR (Data Table Shift-Out and Compress) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Starting address of the buffer End address of the buffer Device address to store the read data ■...
  • Page 419 8.15 CMPR (Data Table Shift-Out and Compress) Example of data table shift-out and compress when DT10, DT17 and DT20 are respectively specified for [D1], [D2] and [D3]. [D1] DT10 DT10 [D1] DT11 DT11 DT12 DT12 DT13 DT13 DT14 DT14 DT15 DT15 DT16 DT16...
  • Page 420: Cmpw (Data Table Shift-In And Compress)

    8.16 CMPW (Data Table Shift-In and Compress) 8.16 CMPW (Data Table Shift-In and Compress) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Write data Starting address of the buffer End address of the buffer ■...
  • Page 421 8.16 CMPW (Data Table Shift-In and Compress) Example of data table shift-out and compress when DT10, DT17 and DT20 are respectively specified for [D1], [D2] and [D3]. DT10 DT10 DT11 DT11 DT12 DT12 DT13 DT13 DT14 DT14 DT15 DT15 DT16 DT16 DT17 DT17...
  • Page 422: Defbuf (Buffer Definition)

    8.17 DEFBUF (Buffer Definition) 8.17 DEFBUF (Buffer Definition) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address which specifies the buffer size, or the constant (available data range: 1 to 4096) Starting device address of the data buffer ■...
  • Page 423 8.17 DEFBUF (Buffer Definition) ■ Format of data buffer (FIFO buffer) Buffer size ・・・Size of the data buffer area Default: [n] (buffer size) [D]+1 Stored data amount Default: H 0000 ・・・Stored data amount (by operation unit) [D]+2 Default: H 0000 Reading pointer ・・・Relative number from [D]+4 Default: H 0000...
  • Page 424 8.17 DEFBUF (Buffer Definition) Name Description To be set when the range [D] (buffer start) + [n] (buffer size) is out of the available range. 8-36 WUME-FP7CPUPGR-12...
  • Page 425: Fifr (Data Read (First-In-First-Out))

    8.18 FIFR (Data Read (First-In-First-Out)) 8.18 FIFR (Data Read (First-In-First-Out)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Starting device address of the data buffer Device address of the read data ■...
  • Page 426 8.18 FIFR (Data Read (First-In-First-Out)) ● According to the operation unit [i], the data of the area specified by "[S]+2" (read pointer) are set to [D]. ● "[S]+2" (read pointer) is incremented (+1). ● After incrementing (+1), if "[S]+2" (read pointer) is [S] (buffer size), 0 is set to "[S]+2" (read pointer).
  • Page 427 8.18 FIFR (Data Read (First-In-First-Out)) Name Description To be set when "[S]+1" (stored data amount) is larger than [S] (buffer size). To be set when "[S] +2" (read pointer) is greater than or equal to [S] (buffer size). To be set when the buffer area exceeds the upper limit of a specified device. WUME-FP7CPUPGR-12 8-39...
  • Page 428: Bufw (Data Write)

    8.19 BUFW (Data Write) 8.19 BUFW (Data Write) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description The device address of the write data, or the constant Starting device address of the data buffer ■...
  • Page 429 8.19 BUFW (Data Write) ● According to the operation unit [i], [S] is set to the area specified by "[D]+3" (write pointer). ● "[D]+3" (write pointer) is incremented (+1). ● After incrementing, if "[D]+3 (write pointer) is equal to [S] (buffer size)", [D]+3 (write pointer) is set to 0.
  • Page 430: Lifr (Data Read (Last-In-First-Out))

    8.20 LIFR (Data Read (Last-In-First-Out)) 8.20 LIFR (Data Read (Last-In-First-Out)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Starting device address of the data buffer Device address of the read data ■...
  • Page 431 8.20 LIFR (Data Read (Last-In-First-Out)) ● If "[S]+3" (LIFO pointer) is 0, set [S] (buffer size) to "[S]+3" (LIFO pointer). ● "[S]+3" (LIFO pointer) is decremented (-1). ● According to the operation unit [i], the data of the area specified by "[S]+3" (LIFO pointer) are set to [D].
  • Page 432 8.20 LIFR (Data Read (Last-In-First-Out)) Name Description To be set when [S] +3 (LIFO pointer) is greater than or equal to [S] (buffer size). To be set when the buffer area exceeds the upper limit of a specified device. 8-44 WUME-FP7CPUPGR-12...
  • Page 433: Defrbuf (Ring Buffer Definition)

    8.21 DEFRBUF (Ring Buffer Definition) 8.21 DEFRBUF (Ring Buffer Definition) ■ Ladder diagram ■ List of operands Operand Description Device address storing the buffer size or the constant (available range: 1 to 30000) Starting device address of a ring buffer ■...
  • Page 434 8.21 DEFRBUF (Ring Buffer Definition) Name Data type Description The relative number from [D+7] is stored. The value is reset to 0 when the DEFRBUF instruction is executed. The value is Unsigned 16-bit [D+6] Write pointer incremented when data is written by the RBUFW instruction. integer The value returns to 0 when the RBUFW instruction is executed at the end of the data area.
  • Page 435: Rbufw (Write To Ring Buffer, Calculation Of Total Value And Moving Average Value)

    8.22 RBUFW (Write to Ring Buffer, Calculation of Total Value and Moving Average Value) 8.22 RBUFW (Write to Ring Buffer, Calculation of Total Value and Moving Average Value) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ●...
  • Page 436 8.22 RBUFW (Write to Ring Buffer, Calculation of Total Value and Moving Average Value) beginning of the ring buffer area. However, the area [D+1] for the stored data amount is not changed. ■ Precautions for programming ● According to the operation unit [i], set the value of [S] that is written to the buffer data area. ■...
  • Page 437 8.22 RBUFW (Write to Ring Buffer, Calculation of Total Value and Moving Average Value) Example 3) When data is written six times by the RBUFW instruction with the buffer size of 5 [S]...DT20 [D]...DT0 Buffer size [D+1] Amount of stored data [D+1] [D+2] [D+2]...
  • Page 438 (MEMO) 8-50 WUME-FP7CPUPGR-12...
  • Page 439: High-Level Instructions (Bit Manipulation)

    9 High-level Instructions (Bit Manipulation) Applicable Models: All Models 9.1 BTS (16-bit Data Specified Bit Set).............9-2 9.2 BTR (16-bit Data Specified Bit Reset) ..........9-4 9.3 BTI (Bit Inversion) ................9-6 9.4 BTT (Bit Test) ..................9-8 9.5 STC (Carry-Flag Set) ................9-10 9.6 CLC (Carry-Flag Reset) ..............9-11 WUME-FP7CPUPGR-12...
  • Page 440: Bts (16-Bit Data Specified Bit Set)

    9.1 BTS (16-bit Data Specified Bit Set) 9.1 BTS (16-bit Data Specified Bit Set) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Device address of target data Bit number (device address or constant) (available range: 0 to 15) ■...
  • Page 441 9.1 BTS (16-bit Data Specified Bit Set) Bits F E D C B A 9 8 7 6 5 4 3 2 1 0 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 0 Bits F E D C B A 9 8 7 6 5 4 3 2 1 0 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 0...
  • Page 442: Btr (16-Bit Data Specified Bit Reset)

    9.2 BTR (16-bit Data Specified Bit Reset) 9.2 BTR (16-bit Data Specified Bit Reset) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Device address of target data Bit number (device address or constant) (available range: 0 to 15) ■...
  • Page 443 9.2 BTR (16-bit Data Specified Bit Reset) F E D C B A 9 8 7 6 5 4 3 2 1 0 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 0 F E D C B A 9 8 7 6 5 4 3 2 1 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 Example 2) Specifying a device for the bit number [D]...DT1 [n]...DT0...
  • Page 444: Bti (Bit Inversion)

    9.3 BTI (Bit Inversion) 9.3 BTI (Bit Inversion) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Inversion target data (device address) Bit number (device address or constant) (available data range: 0 to 15) ■...
  • Page 445 9.3 BTI (Bit Inversion) ■ Processing Example) Operation unit: 16 bits (US) [i]…US [D]…DT0 [n]…U7 <Invert Bit 7> F E D C B A 9 8 7 6 5 4 3 2 1 0 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 0 F E D C B A 9 8 7 6 5 4 3 2 1 0 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 0 ■...
  • Page 446: Btt (Bit Test)

    9.4 BTT (Bit Test) 9.4 BTT (Bit Test) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Test target data (device address) Bit number (device address or constant) (available data range: 0 to 15) ■...
  • Page 447 9.4 BTT (Bit Test) ■ Processing Example 1) Operation unit: 16 bits (US) (SRB is OFF) [i]…US [D]…DT0 [n]…U3 Flag operation during execution SRB(=) State of the specified bit F E D C B A 9 8 7 6 5 4 3 2 1 0 ON(1) OFF(0) 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0...
  • Page 448: Stc (Carry-Flag Set)

    9.5 STC (Carry-Flag Set) 9.5 STC (Carry-Flag Set) ■ Ladder diagram ■ Outline of operation This instruction turns ON SR9 (CY). ■ Flag operations Name Description SR9 (CY) To be set after this instruction is executed. 9-10 WUME-FP7CPUPGR-12...
  • Page 449: Clc (Carry-Flag Reset)

    9.6 CLC (Carry-Flag Reset) 9.6 CLC (Carry-Flag Reset) ■ Ladder diagram ■ Outline of operation This instruction turns OFF SR9 (CY). ■ Flag operations Name Description SR9 (CY) To be reset after this instruction is executed. WUME-FP7CPUPGR-12 9-11...
  • Page 450 (MEMO) 9-12 WUME-FP7CPUPGR-12...
  • Page 451: High-Level Instruction (Data Processing Control)

    10 High-Level Instruction (Data Processing Control) Applicable Models: All Models 10.1 SRC (Data Search) ................10-2 10.2 BCU (ON Bits Count) ................10-5 10.3 MAX (Acquiring the Maximum Value) ..........10-7 10.4 MIN (Acquiring the Minimum Value) ..........10-13 10.5 MEAN (Acquiring the Total and the Mean Value)......10-19 10.6 SORT (Sort) ..................10-24 10.7 SCAL (Linearization).................10-27 10.8 STDDEV (Acquiring the Variance and Standard Deviation) .....10-30...
  • Page 452: Src (Data Search)

    10.1 SRC (Data Search) 10.1 SRC (Data Search) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Device address where the search data is stored, or the constant (data format: according to the operation unit) Starting position of the search range (data format: according to the operation unit) End position of the search range (data format: according to the operation unit)
  • Page 453 10.1 SRC (Data Search) (Note 7) Can be specified only when the operation unit is a single-precision floating point real number (SF). (Note 8) Can be specified only when the operation unit is a double-precision floating point real number (DF). ■...
  • Page 454 10.1 SRC (Data Search) Example 2) When the operation unit is 32-bit (UL, SL, SF) [i]…UL,SL,SF [S1]…DT0 [S2]…DT10 [S3]…DT90 [D]…DT100 Relative <Search data> <Search range> position H 11223344 DT10・DT11 H 1111111 1 DT0・DT1 H CCDDEEFF DT12・DT13 H 9900AABB DT14・DT15 H 11223344 DT16・DT17 H 55667788 DT86・DT87...
  • Page 455: Bcu (On Bits Count)

    10.2 BCU (ON Bits Count) 10.2 BCU (ON Bits Count) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Target device address or the constant (data format: according to the operation unit) Device address to store the result (data format: unsigned 16-bit integer) ■...
  • Page 456 10.2 BCU (ON Bits Count) ■ Processing Example 1) Operation units: 16 bits (US) Example 2) Operation units: 32 bits (UL) (specify a 16-bit device for [S]) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) 10-6 WUME-FP7CPUPGR-12...
  • Page 457: Max (Acquiring The Maximum Value)

    10.3 MAX (Acquiring the Maximum Value) 10.3 MAX (Acquiring the Maximum Value) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Starting position of the search range for the maximum value (data format: according to the operation unit) End position of the search range for the maximum value (data format: according to the operation unit)
  • Page 458 10.3 MAX (Acquiring the Maximum Value) ● The relative address storage position ([D]+[n]) varies with the operation unit. ● The maximum amount of data that can be specified is 30000. ● [D] is in the following format according to the operation unit. Operation 16 bits (US, SS) 32 bits (UL, SL, SF)
  • Page 459 10.3 MAX (Acquiring the Maximum Value) ■ Processing Example 1) Operation unit: 16 bits (US) [i]…US [S1]…DT10 [S2]…DT20 [D]…DT100 <Max. value search range> Relative position <Output result> H 1211 DT10 H 3412 ([D] ) DT100 ① H 0101 DT11 * Unsigned 16-bit integer H 3412 DT12 H 1234...
  • Page 460 10.3 MAX (Acquiring the Maximum Value) Example 3) Operation unit: 32 bits (UL) (specify a 32-bit device) [i]…UL [S1]…TS10 [S2]…TS50 [D]…TS100 <Max. value search range> Relative position <Output result> H 1111111 1 H FFFFFFFF ([D] ) TS10 TS100 H CCDDEEFF TS11 * Unsigned 32-bit integer H 9900AABB...
  • Page 461 10.3 MAX (Acquiring the Maximum Value) Example 6) Operation unit: 32 bits (SL) (specify a 16-bit device) [i]…SL [S1]…DT10 [S2]…DT30 [D]…DT100 <Max. value search range> Relative position <Output result> DT100・DT101 DT10・DT11 K -10 K 200 ([D] , [D]+1 ) DT12・DT13 K -20 * Signed 32-bit integer ①...
  • Page 462 10.3 MAX (Acquiring the Maximum Value) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when [S1] is larger than [S2]. (ER) To be set when the [S1] device and the [S2] device differ. 10-12 WUME-FP7CPUPGR-12...
  • Page 463: Min (Acquiring The Minimum Value)

    10.4 MIN (Acquiring the Minimum Value) 10.4 MIN (Acquiring the Minimum Value) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Starting position of the search range for the minimum value (data format: according to the operation unit) End position of the search range for the minimum value (data format: according to the operation unit)
  • Page 464 10.4 MIN (Acquiring the Minimum Value) ● The relative address storage position ([D]+[n]) varies with the operation unit. ● The maximum amount of data that can be specified is 30000. ● [D] is in the following format according to the operation unit. Operatio 16 bits (US, SS) 32 bits (UL, SL, SF)
  • Page 465 10.4 MIN (Acquiring the Minimum Value) ■ Processing Example 1) Operation unit: 16 bits (US) [i]…US [S1]…DT10 [S2]…DT20 [D]…DT100 <Min. value search range> Relative position <Output result> ① H 1211 DT100 H 0101 ([D] ) DT10 H 0101 DT11 * Unsigned 16-bit integer H 3412 DT12 ②...
  • Page 466 10.4 MIN (Acquiring the Minimum Value) Example 3) Operation unit: 32 bits (UL) (specify a 32-bit device) [i]…UL [S1]…TS10 [S2]…TS50 [D]…TS100 ① <Min. value search range> Relative position <Output result> H 1111111 1 TS100 H 1111111 1 ([D] ) TS10 TS11 H CCDDEEFF * Unsigned 32-bit integer...
  • Page 467 10.4 MIN (Acquiring the Minimum Value) Example 6) Operation unit: 32 bits (SL) (specify a 16-bit device) [i]…SL [S1]…DT10 [S2]…DT30 [D]…DT100 <Max. value search range> Relative position <Output result> K -500 DT10・DT11 DT100・DT101 ([D] , [D]+1 ) K -10 DT12・DT13 K -20 ①...
  • Page 468 10.4 MIN (Acquiring the Minimum Value) Example) When the operation unit is specified as 32 bits, the min. value search range becomes the same whether a higher or lower address is specified for the [S2] device address. [S1]…DT2 [S2]…DT6 [S1]…DT2 [S2]…DT7 H 11223344 H 11223344...
  • Page 469: Mean (Acquiring The Total And The Mean Value)

    10.5 MEAN (Acquiring the Total and the Mean Value) 10.5 MEAN (Acquiring the Total and the Mean Value) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Starting position of the target area (data format: according to the operation unit)
  • Page 470 10.5 MEAN (Acquiring the Total and the Mean Value) ● The total value uses twice the area size of the operation unit, and the mean value uses the same area size as the operation unit. Note that, in the case of floating point real number (SF), the total value also uses the same area size as the operation units.
  • Page 471 10.5 MEAN (Acquiring the Total and the Mean Value) Example 3) Operation unit: 32 bits (UL) (specify a 32-bit device) Total value is given in 64-bit data, and the mean value is given in 32-bit data. [i]…UL [S1]…TS10 [S2]…TS14 [D]…TS100 <Total/mean calculation range>...
  • Page 472 10.5 MEAN (Acquiring the Total and the Mean Value) Example 6) Operation unit: 32 bits (SL) (specify a 16-bit device) Total value is given in 64-bit data, and the mean value is given in 32-bit data. [i]…SL [S1]…DT10 [S2]…DT16 [D]…DT100 <Total/mean calculation range>...
  • Page 473 10.5 MEAN (Acquiring the Total and the Mean Value) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when [S1] is larger than [S2]. (ER) To be set when the [S1] device and the [S2] device differ. WUME-FP7CPUPGR-12 10-23...
  • Page 474: Sort (Sort)

    10.6 SORT (Sort) 10.6 SORT (Sort) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Starting position of the target area (data format: according to the operation unit) End position of the target area (data format: according to the operation unit) Sort condition (data format: unsigned 16-bit integer) ■...
  • Page 475 10.6 SORT (Sort) ■ Processing Example 1) Operation unit: 16 bits (US) [i]…US [S1]…DT10 [S2]…DT19 [S3]…U0 (Ascending order) <Before sort> <After sort> H 0123 H 0000 DT10 DT10 H 111 1 H 0123 DT11 DT11 H 3210 H 111 1 DT12 DT12 H 2222...
  • Page 476 10.6 SORT (Sort) Example 5) Operation unit: Single-precision, floating-point real number (SF) [i]…SF [S1]…DT10 [S2]…DT19 [S3]…U1 (Descending order) <Before sort> <After sort> DT10・DT11 SF 3.33 DT10・DT11 SF 1111 .1 DT12・DT13 SF 11.11 DT12・DT13 SF 11.11 DT14・DT15 SF 2.22 DT14・DT15 SF 4.44 DT16・DT17 SF 1111 .1 DT16・DT17...
  • Page 477: Scal (Linearization)

    10.7 SCAL (Linearization) 10.7 SCAL (Linearization) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Data equivalent to the input value X, or the area to store it (data format: according to the operation unit) Starting address of the data table used for scaling (linearization) (data format: according to the operation unit)
  • Page 478 10.7 SCAL (Linearization) ■ Outline of operation ● The data specified by [S1] are scaled according to the data table specified by [S2]. The result is stored in the device area specified by [D]. ■ Processing ● Regardless of the operation unit, the output value Y for [D], corresponding to the input value X for [S1], is calculated.
  • Page 479 10.7 SCAL (Linearization) [S2] Number for the data table (Available range: 2 to 256) Operation unit: 16 bits Operation unit: 64 bits Operation unit: 32 bits (1-word data) (4-word data) (2-word data) [S2+1] [S2+1] [S2+1] [S2+2] [S2+2] [S2+2] [S2+3] [S2+3] [S2+4] [S2+4] x1 to xn...
  • Page 480: Stddev (Acquiring The Variance And Standard Deviation)

    10.8 STDDEV (Acquiring the Variance and Standard Deviation) 10.8 STDDEV (Acquiring the Variance and Standard Deviation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Specify the starting position of a target area (data format: according to the operation unit). Specify the number of target data (data format: unsigned 16-bit integer).
  • Page 481 10.8 STDDEV (Acquiring the Variance and Standard Deviation) 16-Bit device: Output content [D], [D]+1 Stores variance. [D]+2, [D]+3 Stores standard deviation. ■ Processing Method for calculating variance and standard deviation (Conditions) N data x ,...x 1. Mean value + ... + x 2.
  • Page 482 10.8 STDDEV (Acquiring the Variance and Standard Deviation) ● Variance of S to S+4 is stored in (D, D+1). ● Standard deviation of S to S+4 is stored in (D+2, D+3). ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when [S+n] exceeds the device address.
  • Page 483: Eventc (Instruction To Count The Number Of Events)

    10.9 EVENTC (Instruction to Count the Number of Events) 10.9 EVENTC (Instruction to Count the Number of Events) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Starting address of the counting starting position Starting address of the working area for counting Number of bits to be counted Starting device address to store the count result...
  • Page 484 10.9 EVENTC (Instruction to Count the Number of Events) [(Bits to be counted -1)/16] + 1 Rounded down to the nearest integer ● The number of bits to be counted that is specified by [n] is 1 to 65535. However, this range must not exceed the device area.
  • Page 485 10.9 EVENTC (Instruction to Count the Number of Events) Example 2) Carry out counting for 17 points from WX0 [i]…UL [S1]…WX0 [S2]…DT0 [n]…U 17 [D]…DT10 [S1] Targeted bits: 17 bits from X0 to X10 [S2] Working area for counting DT10 X0 counted value DT11 DT12...
  • Page 486: Eventt (Instruction To Count The Time Of Events)

    10.10 EVENTT (Instruction to Count the Time of Events) 10.10 EVENTT (Instruction to Count the Time of Events) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Starting address of the counting starting position Starting address of the working area for counting Number of bits to be counted Starting device address to store the count result...
  • Page 487 10.10 EVENTT (Instruction to Count the Time of Events) ● The number of bits to be counted that is specified by [n] is 1 to 65535. However, this range must not exceed the device area. ■ Processing Example 1) Carry out counting for 8 points from WX0 [i]…UL [S1]…WX0 [S2]…DT0...
  • Page 488 10.10 EVENTT (Instruction to Count the Time of Events) Example 2) Carry out counting for 17 points from WX0 [i]…UL [S1]…WX0 [S2]…DT0 [n]…U 17 [D]…DT10 [S1] Targeted bits: 17 bits from X0 to X10 [S2] Working area for counting DT10 X0 counted value DT11 DT12...
  • Page 489: Pid (Pid Operation)

    10.11 PID (PID Operation) 10.11 PID (PID Operation) ■ Ladder diagram ■ List of operands Operand Description Starting number of the PID operation parameter area (30 words) ■ Available devices (●: Available) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan modifie U...
  • Page 490 10.11 PID (PID Operation) Items Description By measuring process response, the respective optimal values for Kp, Ti and Td as PID Auto-tuning parameters are measured. When auto-tuning is executed, the estimated results are reflected in the parameter area after auto-tuning is complete. ■...
  • Page 491 10.11 PID (PID Operation) Operand Parameter name Setting range Setting method Specify the coefficient used for PID operation. Actual integral K1 to K30000 time is set point value × 0.1. The integral operation is not [S+7] Integral time (Ti) (0.1 to 3000 s) (Note 1) executed if 0 is specified.
  • Page 492 10.11 PID (PID Operation) ● After auto-tuning is completed, the respective optimal values are stored for proportional gain [Kp], integral time [Ti], and derivative time [Td]. Before execution, it is necessary to specify appropriate values (e.g. lower limits) within the respective setting ranges. ●...
  • Page 493 10.11 PID (PID Operation) Setting signal SV + Deviation e Integral Output mi Measurement signal PV mi=1/Ti ∫edt ● 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.
  • Page 494 10.11 PID (PID Operation) Setting signal SV + Deviation e Output MV Integral Derivative Measurement 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. ■...
  • Page 495: Ezpid (Pid Operation: Pwm Output Available)

    10.12 EZPID (PID Operation: PWM Output Available) 10.12 EZPID (PID Operation: PWM Output Available) ■ Ladder diagram ■ List of operands Operand Description 1-word area for setting control data that determine methods for auto-tuning and output 1-word area for inputting the process value (PV) 4-word area for setting the set point value (SV), proportional gain (Kp), integral time (Ti), and derivative time (Td).
  • Page 496 10.12 EZPID (PID Operation: PWM Output Available) ■ Types of PID operation Items Description Select the upward/downward direction of output in the case of change to the process. Specify "reverse operation" if output is increased when the process value decreases Reverse operation/ (e.g.
  • Page 497 10.12 EZPID (PID Operation: PWM Output Available) Operand Parameter Setting Setting method name range Input the current value for process control amount using an analog input unit, etc. Process K -30000 to [S2] value (PV) K 30000 It is also possible to directly specify the input data area WXn of the analog input unit.
  • Page 498 10.12 EZPID (PID Operation: PWM Output Available) Operand Parameter name Default Setting range Setting method reaches 80% of the set point value (SP). Once the 80% is exceeded, PID control is initiated. If the set point value is K0 (default), PID control is executed from the beginning.
  • Page 499 10.12 EZPID (PID Operation: PWM Output Available) [S1] WR1 bit1 ( ( ) ) Request auto-tuning Y180 EZPID instruction EZPID WR1 WX10 DT100 execution ● Set the set point value (SP) to the operand [S3] area, using an instruction or a display. ●...
  • Page 500 10.12 EZPID (PID Operation: PWM Output Available) Example) Switch to proportional plus derivative control mode and carry out PWM output. Y180 EZPID instruction EZPID WR1 WX10 DT100 execution [S4+5] DT5 MV.US Control mode ■ Sample program (analog output) Example) In analog output, change the output upper limit [S4+2] to K4000, and the control interval [S4+4] to K1000 (10 seconds).
  • Page 501 10.12 EZPID (PID Operation: PWM Output Available) Conversion formula: (Output upper limit - Output lower limit) x (Internal calculated value) / 10000 + (Output lower limit) ● If [S4] is allocated to a hold type area, the manipulated value (MV) is retained even if the execution condition of the EZPID instruction is switched OFF.
  • Page 502 10.12 EZPID (PID Operation: PWM Output Available) Temperature Auto-tuning in (SP’) forward operation Auto-tuning offset value Set point value (SP) Time Auto-tuning PID control Calculate Kp, Ti and Td ■ Precautions for programming ● The operand [S4] through [S4+29] areas are initialized when the execution condition is switched on.
  • Page 503 10.12 EZPID (PID Operation: PWM Output Available) ■ Precautions when executing auto-tuning ● Auto-tuning may not be executable depending on the process. In that case, the system returns to the original parameter operation. ● After auto-tuning is completed, the respective optimal values are stored for proportional gain [Kp], integral time [Ti], and derivative time [Td].
  • Page 504 10.12 EZPID (PID Operation: PWM Output Available) ● After auto-tuning is correctly completed, bit 1 of [S1] (auto-tuning completion flag) and the auto-tuning completion code are stored in [S4+10]. If unsuccessful, the parameters for proportional gain [Kp], integral time [Ti], and derivative time [Td] are not updated. ●...
  • Page 505: Dtr (Data Revision Detection)

    10.13 DTR (Data Revision Detection) 10.13 DTR (Data Revision Detection) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Device address to detect revision of a data value Device address to store the data value from the previous execution ■...
  • Page 506 10.13 DTR (Data Revision Detection) ■ Processing Example 1) When the operation unit is 16-bit (US, SS) Example 2) When the operation unit is 32-bit (UL, SL, SF) ■ Precautions for programming ● Even when the operation unit is SF or DF, only data changes are checked. Type check for non-real numbers is not executed.
  • Page 507: Ramp (Ramp Output)

    10.14 RAMP (Ramp Output) 10.14 RAMP (Ramp Output) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Device address where the default is stored, or constant Device address where the target value is stored, or constant Device address that stores the time width, or the constant (data available range: 1 to 30000) Output storage device address...
  • Page 508 10.14 RAMP (Ramp Output) (Note 8) Can be specified only when the operation unit is a double-precision floating point real number (DF). ■ Outline of operation ● Scaling is carried out from the output default value, output target value, and output time (in ms) specified by [S1], [S2], and [S3], and linear output is executed in accordance with the time elapsed from the execution start.
  • Page 509: Limt (Upper And Lower Limit Control)

    10.15 LIMT (Upper and Lower Limit Control) 10.15 LIMT (Upper and Lower Limit Control) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Device address where the lower limit is stored, or lower limit data Device address where the upper limit is stored, or upper limit data Device address where the input value is stored, or the input value data Output storage device address...
  • Page 510 10.15 LIMT (Upper and Lower Limit Control) (Note 8) Can be specified only when the operation unit is a double-precision floating point real number (DF). ■ Outline of operation ● The output value, to be stored in the device address specified by [D], is controlled based on whether or not the input value specified by [S3] falls within the range bounded by the upper and lower limits set in [S1] and [S2].
  • Page 511 10.15 LIMT (Upper and Lower Limit Control) Example 3) Operation units: Single precision floating point real number (SF) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when [S1] is larger than [S2]. (ER) WUME-FP7CPUPGR-12 10-61...
  • Page 512: Band (Deadband Control)

    10.16 BAND (Deadband Control) 10.16 BAND (Deadband Control) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Device address where the lower limit is stored, or lower limit data Device address where the upper limit is stored, or upper limit data Device address where the input value is stored, or the input value data Output storage device address...
  • Page 513 10.16 BAND (Deadband Control) ■ Outline of operation ● The output value, to be stored in the device address specified by [D], is controlled based on whether or not the input value specified by [S3] falls within the range bounded by the upper and lower limits set in [S1] and [S2].
  • Page 514: Zone (Zone Control)

    10.17 ZONE (Zone Control) 10.17 ZONE (Zone Control) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Device address that stores the negative bias value at input, or bias value data Device address that stores the positive bias value at input, or bias value data Device address where the input value is stored, or the input value data Output storage device address...
  • Page 515 10.17 ZONE (Zone Control) (Note 8) Can be specified only when the operation unit is a double-precision floating point real number (DF). ■ Outline of operation ● The bias value specified by [S1] or [S2] is added to the input value specified by [S3]. The resulting value is stored in the device address specified by [D].
  • Page 516 10.17 ZONE (Zone Control) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) 10-66 WUME-FP7CPUPGR-12...
  • Page 517: Filtr (Time Constant Processing)

    10.18 FILTR (Time Constant Processing) 10.18 FILTR (Time Constant Processing) ■ Ladder diagram ■ List of operands Operand Description Filtering targeted data (device address) Filtering targeted bit (device address or constant) (data available range: H0000 to HFFFF) Filtering time (device address or constant) (data available range: 0 to 30000, in ms) Filtering result (device address) ■...
  • Page 518 10.18 FILTR (Time Constant Processing) ① Default conditions Operand Description Device Setting value [S1] Targeted data H FFFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [S2] Targeted bit H FF00 [S3] Filtering time K500 Processing result...
  • Page 519 10.18 FILTR (Time Constant Processing) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the filtering time [S3] is out of the range. (ER) WUME-FP7CPUPGR-12 10-69...
  • Page 520 (MEMO) 10-70 WUME-FP7CPUPGR-12...
  • Page 521: High-Level Instructions (Real Number)

    11 High-level Instructions (Real Number) Applicable Models: All Models 11.1 SIN (Sine Operation).................11-3 11.2 COS (Cosine Operation) ..............11-5 11.3 TAN (Tangent Operation) ..............11-7 11.4 ASIN (Arcsine Operation)..............11-9 11.5 ACOS (Arccosine Operation) ............11-11 11.6 ATAN (Arctangent Operation)............11-13 11.7 ATAN2 (Conversion: Coordinate Data → Angle Radian) ....11-15 11.8 SINH (Hyperbolic Sine Operation) ............11-17 11.9 COSH (Hyperbolic Cosine Operation) ..........11-19 11.10 TANH (Hyperbolic Tangent Operation)..........11-21...
  • Page 522 11 High-level Instructions (Real Number) 11.25 UNIF (Combining of Mantissa and Exponent, and Conversion of Single-precision or Double-precision Real Number) ......11-52 11.26 FLT (Conversion: Integer → Floating Point Real Number Data)..11-55 11.27 DFLT (Conversion: Integer → Double-precision Real Number Data) .....................11-58 11.28 INT (Conversion: Floating Point Real Number Data →...
  • Page 523: Sin (Sine Operation)

    11.1 SIN (Sine Operation) 11.1 SIN (Sine Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (units: radian) Calculation result (device address) ■...
  • Page 524 11.1 SIN (Sine Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 30° radian for [S]) [i]…SF [S]…DT10 [D]…DT2 Angle Value (radians) Value DT10・DT11 SF 0.000000E+00 30° SF 5.235988E- - 01 DT0・DT1 DT12・DT13 60° DT2・DT3 SF 5.000000E- - 01 SF 1.047198E+00 DT14・DT15 90°...
  • Page 525: Cos (Cosine Operation)

    11.2 COS (Cosine Operation) 11.2 COS (Cosine Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (units: radian) Calculation result (device address) ■...
  • Page 526 11.2 COS (Cosine Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 30° radian for [S]) [i]…SF [S]…DT10 [D]…DT2 Angle Value (radians) Value 30° DT10・DT11 SF 5.235988E- - 01 SF 0.000000E+00 DT0・DT1 60° SF 1.047198E+00 SF 8.660254E- - 01 DT12・DT13 DT2・DT3 SF 0.000000E+00...
  • Page 527: Tan (Tangent Operation)

    11.3 TAN (Tangent Operation) 11.3 TAN (Tangent Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (units: radian) Calculation result (device address) ■...
  • Page 528 11.3 TAN (Tangent Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 30° radian for [S]) [i]…SF [S]…DT10 [D]…DT2 Angle Value (radians) Value DT10・DT11 30° SF 5.235988E- - 01 DT0・DT1 SF 0.000000E+00 SF 1.047198E+00 SF 5.773503E- - 01 DT12・DT13 60°...
  • Page 529: Asin (Arcsine Operation)

    11.4 ASIN (Arcsine Operation) 11.4 ASIN (Arcsine Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (SIN value) (data available range: -1.0 to +1.0) Calculation result (device address) (units: radian) ■...
  • Page 530 11.4 ASIN (Arcsine Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 15 SIN value for [S]) [i]…SF [S]…DT10 [D]…DT2 Angle Value (radians) Value DT10・DT11 SF2.588190Eー ー 01 DT0・DT1 SF0.000000E+00 SF2.617994Eー ー 01 DT12・DT13 SF1.047198E+00 DT2・DT3 SF0.000000E+00 DT14・DT15 SF1.570796E+00 DT4・DT5...
  • Page 531: Acos (Arccosine Operation)

    11.5 ACOS (Arccosine Operation) 11.5 ACOS (Arccosine Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (COS value) (data available range: -1.0 to +1.0) Calculation result (device address) (units: radian) ■...
  • Page 532 11.5 ACOS (Arccosine Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 15° COS value for [S]) [i]…SF [S]…DT10 [D]…DT2 Angle Value (radians) Value DT10・DT11 15ー SF9.659258E- - 01 DT0・DT1 SF0.000000E+00 SF2.617994E- - 01 DT12・DT13 30ー SF1.047198E+00 DT2・DT3 SF1.570796E+00 SF0.000000E+00...
  • Page 533: Atan (Arctangent Operation)

    11.6 ATAN (Arctangent Operation) 11.6 ATAN (Arctangent Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (TAN value) Calculation result (device address) (units: radian) ■...
  • Page 534 11.6 ATAN (Arctangent Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 15° TAN value for [S]) [i]…SF [S]…DT10 [D]…DT2 Angle Value (radians) Value DT10・DT11 SF 2.679392E- - 01 SF 0.000000E+00 15° DT0・DT1 SF 2.617994E- - 01 DT12・DT13 30°...
  • Page 535: Atan2 (Conversion: Coordinate Data → Angle Radian)

    11.7 ATAN2 (Conversion: Coordinate Data → Angle Radian) 11.7 ATAN2 (Conversion: Coordinate Data → Angle Radian) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Dividend of angle data (device address or constant) (Y coordinate) Angle data divisor (device address or constant) (X coordinate) Calculation result (device address) (units: radian) ■...
  • Page 536 11.7 ATAN2 (Conversion: Coordinate Data → Angle Radian) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 1.0 for [S1] (Y coordinate) and [S2] (X coordinate)) [i]…SF [S1]…DT10 [S2]…DT12 [D]…DT2 Value Value DT10・DT11 SF 1.000000E+ + 00 SF 0.000000E+00 DT0・DT1 SF 7.853982E-...
  • Page 537: Sinh (Hyperbolic Sine Operation)

    11.8 SINH (Hyperbolic Sine Operation) 11.8 SINH (Hyperbolic Sine Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (units: radian) Calculation result (device address) ■...
  • Page 538 11.8 SINH (Hyperbolic Sine Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 30° radian for [S]) [i]…SF [S]…DT10 [D]…DT2 Angle Value (radians) Value DT10・DT11 30° SF 5.235988E- - 01 SF 0.000000E+00 DT0・DT1 60° SF 1.047198E+00 SF 5.478535E- - 01 DT12・DT13 DT2・DT3 SF 0.000000E+00...
  • Page 539: Cosh (Hyperbolic Cosine Operation)

    11.9 COSH (Hyperbolic Cosine Operation) 11.9 COSH (Hyperbolic Cosine Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (units: radian) Calculation result (device address) ■...
  • Page 540 11.9 COSH (Hyperbolic Cosine Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 30° radian for [S]) [i]...SF [S]...DT10 [D]…DT2 Angle Value (radians) Value DT10・DT11 30° SF 5.235988E- - 01 SF 0.000000E+00 DT0・DT1 DT12・DT13 60° SF 1.047198E+00 DT2・DT3 SF 1.140238E+...
  • Page 541: Tanh (Hyperbolic Tangent Operation)

    11.10 TANH (Hyperbolic Tangent Operation) 11.10 TANH (Hyperbolic Tangent Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (units: radian) Calculation result (device address) ■...
  • Page 542 11.10 TANH (Hyperbolic Tangent Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 30° radian for [S]) [i]…SF [S]…DT10 [D]…DT2 Angle Value (radians) Value DT10・DT11 30° SF 5.235988E- - 01 DT0・DT1 SF 0.000000E+00 60° SF 4.804728E- - 01 DT12・DT13 SF 1.047198E+00 DT2・DT3...
  • Page 543: Exp (Exponential Operation)

    11.11 EXP (Exponential Operation) 11.11 EXP (Exponential Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data (device address or constant) (real number value) Calculation result (device address) ■...
  • Page 544 11.11 EXP (Exponential Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) [i]…SF [S]…DT10 [D]…DT2 Value (radians) Value DT10・DT11 SF 3.000000E+ + 00 DT0・DT1 SF 0.000000E+00 SF 2.008554E+ + 01 DT12・DT13 SF 4.000000E+00 DT2・DT3 SF 5.000000E+00 SF 0.000000E+00 DT14・DT15 DT4・DT5 ■...
  • Page 545: Ln (Natural Logarithmic Operation)

    11.12 LN (Natural Logarithmic Operation) 11.12 LN (Natural Logarithmic Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data (device address or constant) (real number value) Calculation result (device address) ■...
  • Page 546 11.12 LN (Natural Logarithmic Operation) Example) Operation unit: Single-precision, floating-point real number (SF) [i]…SF [S]…DT10 [D]…DT2 Value (radians) Value DT10・DT11 SF 3.000000E+ + 00 DT0・DT1 SF 0.000000E+00 DT12・DT13 SF 4.000000E+00 DT2・DT3 SF 1.098612E+ + 00 SF 5.000000E+00 DT14・DT15 DT4・DT5 SF 0.000000E+00 ■...
  • Page 547: Log (Common Logarithmic Operation)

    11.13 LOG (Common Logarithmic Operation) 11.13 LOG (Common Logarithmic Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data (device address or constant) (real number value) Calculation result (device address) ■...
  • Page 548 11.13 LOG (Common Logarithmic Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) [i]…SF [S]…DT10 [D]…DT2 Value (radians) Value DT10・DT11 SF 3.000000E+ + 00 SF 0.000000E+00 DT0・DT1 DT12・DT13 SF 4.000000E+00 DT2・DT3 SF 4.771213E- - 01 DT14・DT15 SF 0.000000E+00 SF 5.000000E+00 DT4・DT5 ■...
  • Page 549: Pwr (Power Operation)

    11.14 PWR (Power Operation) 11.14 PWR (Power Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Data to be powered (device address or constant) (real number value) Powering data (device address or constant) (real number value) Calculation result (device address) ■...
  • Page 550 11.14 PWR (Power Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) [i]…SF [S1]…DT10 [S2]…DT12 [D]…DT2 Value (radians) Value DT10・DT11 SF 3.000000E+ + 00 DT0・DT1 SF 0.000000E+00 SF 4.000000E+ + 00 SF 8.100000E+ + 01 DT12・DT13 DT2・DT3 DT14・DT15 SF 5.000000E+00 DT4・DT5 SF 0.000000E+00...
  • Page 551: Sqr (Square Root Operation)

    11.15 SQR (Square Root Operation) 11.15 SQR (Square Root Operation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data (device address or constant) (real number value) Calculation result (device address) ■...
  • Page 552 11.15 SQR (Square Root Operation) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) [i]…SF [S]…DT10 [D]…DT2 Value (radians) Value DT10・DT11 SF 3.000000E+ + 00 DT0・DT1 SF 0.000000E+00 DT12・DT13 SF 4.000000E+00 DT2・DT3 SF 1.732051E+ + 00 SF 0.000000E+00 SF 5.000000E+00 DT14・DT15 DT4・DT5 ■...
  • Page 553: Rad (Conversion: Degrees → Radian)

    11.16 RAD (Conversion: Degrees → Radian) 11.16 RAD (Conversion: Degrees → Radian) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (units: degrees) Angle data (device address) (units: radian) ■...
  • Page 554 11.16 RAD (Conversion: Degrees → Radian) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 30 (degrees) for [S]) [i]…SF [S]…DT10 [D]…DT2 Value (degrees) Value (radians) DT10・DT11 SF 3.000000E+01 DT0・DT1 SF 0.000000E+00 SF 6.000000E+01 SF 5.235988E- - 01 DT12・DT13 DT2・DT3 DT14・DT15...
  • Page 555: Deg (Conversion: Radian → Degrees)

    11.17 DEG (Conversion: Radian → Degrees) 11.17 DEG (Conversion: Radian → Degrees) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Angle data (device address or constant) (units: radian) Angle data (device address) (units: degrees) ■...
  • Page 556 11.17 DEG (Conversion: Radian → Degrees) ■ Processing Example) Operation unit: Single-precision, floating-point real number (SF) (Designate 30° radian for [S]) [i]…SF [S]…DT10 [D]…DT2 Angle Value (radians) Value (degrees) DT10・DT11 30° SF 0.000000E+00 SF 5.235988E- - 01 DT0・DT1 60° SF 3.000000E+01 DT12・DT13 SF 1.047198E+00 DT2・DT3...
  • Page 557: Fint (Floating Point Real Number Data - Rounding The First Decimal Point Down)

    11.18 FINT (Floating Point Real Number Data - Rounding the First Decimal Point Down) 11.18 FINT (Floating Point Real Number Data - Rounding the First Decimal Point Down) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ●...
  • Page 558 11.18 FINT (Floating Point Real Number Data - Rounding the First Decimal Point Down) ■ Processing Example 1) Operation unit: Single-precision, floating-point real number (SF) (positive real number) [i]…SF [S]…DT10 [D]…DT2 DT10・DT11 SF 1.234560E+ + 02 DT0・DT1 SF 0.000000E+00 DT12・DT13 SF 3.456780E+02 DT2・DT3 SF 1.230000E+...
  • Page 559: Frint (Floating Point Real Number Data - Rounding The First Decimal Point Off)

    11.19 FRINT (Floating Point Real Number Data - Rounding the First Decimal Point Off) 11.19 FRINT (Floating Point Real Number Data - Rounding the First Decimal Point Off) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ●...
  • Page 560 11.19 FRINT (Floating Point Real Number Data - Rounding the First Decimal Point Off) ■ Processing Example 1) Operation unit: Single-precision, floating-point real number (SF) (positive real number) [i]…SF [S]…DT10 [D]…DT2 DT10・DT11 SF 0.000000E+00 SF 1.234560E+ + 02 DT0・DT1 DT12・DT13 SF 3.456780E+02 DT2・DT3 SF 1.230000E+...
  • Page 561: Fneg (Floating Point Real Number Data - Sign Changes (Negative/Positive Conversion))

    11.20 FNEG (Floating Point Real Number Data - Sign Changes (Negative/ Positive Conversion)) 11.20 FNEG (Floating Point Real Number Data - Sign Changes (Negative/Positive Conversion)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description...
  • Page 562 11.20 FNEG (Floating Point Real Number Data - Sign Changes (Negative/ Positive Conversion)) ■ Processing Example 1) Operation unit: Single-precision, floating-point real number (SF) (positive real number) [i]…SF [S]…DT10 [D]…DT2 DT10・DT11 SF 1.234560E+ + 02 DT0・DT1 SF 0.000000E+00 DT12・DT13 DT2・DT3 SF -1.234560E+...
  • Page 563: Fabs (Floating Point Real Number Data - Absolute Value)

    11.21 FABS (Floating Point Real Number Data - Absolute Value) 11.21 FABS (Floating Point Real Number Data - Absolute Value) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Calculation target data (device address or constant) Calculation result (device address) ■...
  • Page 564 11.21 FABS (Floating Point Real Number Data - Absolute Value) ■ Processing Example 1) Operation unit: Single-precision, floating-point real number (SF) (positive real number) [i]…SF [S]…DT10 [D]…DT2 DT10・DT11 SF 0.000000E+00 SF 1.234560E+ + 02 DT0・DT1 DT12・DT13 DT2・DT3 SF 1.234560E+ + 02 SF 3.456780E+02 SF 0.000000E+00 DT14・DT15...
  • Page 565: Stod (Conversion: Single-Precision Real Number Data → Double-Precision Real Number)

    11.22 STOD (Conversion: Single-precision Real Number Data → Double- precision Real Number) 11.22 STOD (Conversion: Single-precision Real Number Data → Double-precision Real Number) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Starting address of the device where the target data to be converted is stored or the constant...
  • Page 566 11.22 STOD (Conversion: Single-precision Real Number Data → Double- precision Real Number) ■ Example of processing ■ Flag operations Name Description To be set in case of out-of-range values in indirect access (index modification). To be set when a non-real number is specified for [S]. (ER) 11-46 WUME-FP7CPUPGR-12...
  • Page 567: Dtos (Conversion: Double-Precision Real Number Data → Single-Precision Real Number)

    11.23 DTOS (Conversion: Double-precision Real Number Data → Single- precision Real Number) 11.23 DTOS (Conversion: Double-precision Real Number Data → Single-precision Real Number) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Starting address of the device where the target data to be converted is stored or the constant...
  • Page 568 11.23 DTOS (Conversion: Double-precision Real Number Data → Single- precision Real Number) ■ Example of processing ■ Flag operations Name Description To be set in case of out-of-range values in indirect access (index modification). To be set when a non-real number is specified for [S]. (ER) 11-48 WUME-FP7CPUPGR-12...
  • Page 569: Disf (Separation Of Mantissa And Exponent Of Single-Precision Or Double-Precision Real Number Data)

    11.24 DISF (Separation of Mantissa and Exponent of Single-precision or Double-precision Real Number Data) 11.24 DISF (Separation of Mantissa and Exponent of Single-precision or Double-precision Real Number Data) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ●...
  • Page 570 11.24 DISF (Separation of Mantissa and Exponent of Single-precision or Double-precision Real Number Data) ■ Outline of operation ● This instruction separates the floating point real number data stored in the area starting with [S] into mantissa and exponent according to the operation unit [i]. ●...
  • Page 571 11.24 DISF (Separation of Mantissa and Exponent of Single-precision or Double-precision Real Number Data) ■ Flag operations Name Description To be set in case of out-of-range values in indirect access (index modification). To be set when a non-real number is specified for [S]. (ER) WUME-FP7CPUPGR-12 11-51...
  • Page 572: Unif (Combining Of Mantissa And Exponent, And Conversion Of Single-Precision Or Double-Precision Real Number)

    11.25 UNIF (Combining of Mantissa and Exponent, and Conversion of Single- precision or Double-precision Real Number) 11.25 UNIF (Combining of Mantissa and Exponent, and Conversion of Single-precision or Double-precision Real Number) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ●...
  • Page 573 11.25 UNIF (Combining of Mantissa and Exponent, and Conversion of Single- precision or Double-precision Real Number) ● The conversion result is stored in the area starting with [D]. ■ Conversion example Example 1) Operation units: Single-precision real number (SF) (positive real number) [S1]…DT2 [S2]…DT4...
  • Page 574 11.25 UNIF (Combining of Mantissa and Exponent, and Conversion of Single- precision or Double-precision Real Number) Name Description To be set when an out-of-range value is specified for [S1] (mantissa). (ER) To be set when an out-of-range value is specified for [S2] (exponent). 11-54 WUME-FP7CPUPGR-12...
  • Page 575: Flt (Conversion: Integer → Floating Point Real Number Data)

    11.26 FLT (Conversion: Integer → Floating Point Real Number Data) 11.26 FLT (Conversion: Integer → Floating Point Real Number Data) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Conversion target data (device address or constant (data format: according to the operation unit))
  • Page 576 11.26 FLT (Conversion: Integer → Floating Point Real Number Data) ■ Processing Example 1) Unsigned 16 bits (US) [i]…US [S]…DT0 [D]…DT10 SF 1.230000E+ + 02 U 123 DT10・DT11 SF 0.000000E+00 U 456 DT12・DT13 SF 0.000000E+00 U 789 DT14・DT15 Example 2) Signed 16 bits (SS) (positive value) [i]…SS [S]…DT20 [D]…DT10...
  • Page 577 11.26 FLT (Conversion: Integer → Floating Point Real Number Data) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) WUME-FP7CPUPGR-12 11-57...
  • Page 578: Dflt (Conversion: Integer → Double-Precision Real Number Data)

    11.27 DFLT (Conversion: Integer → Double-precision Real Number Data) 11.27 DFLT (Conversion: Integer → Double-precision Real Number Data) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Starting address of the device where the target data to be converted is stored or the constant (data format: according to the operation unit) Starting address of the device where conversion results are stored (data format: double-precision...
  • Page 579 11.27 DFLT (Conversion: Integer → Double-precision Real Number Data) ■ Conversion example Example 1) Unsigned 16 bits (US) Example 2) Signed 16 bits (SS) (positive value) Example 3) Signed 16 bits (SS) (negative value) Example 4) Unsigned 32 bits (UL) Example 5) Signed 32 bits (SL) (positive value) WUME-FP7CPUPGR-12 11-59...
  • Page 580 11.27 DFLT (Conversion: Integer → Double-precision Real Number Data) Example 6) Signed 32 bits (SL) (negative value) ■ Flag operations Name Description To be set in case of out-of-range values in indirect access (index modification). (ER) 11-60 WUME-FP7CPUPGR-12...
  • Page 581: Int (Conversion: Floating Point Real Number Data → Integer (Round Down))

    11.28 INT (Conversion: Floating Point Real Number Data → Integer (Round Down)) 11.28 INT (Conversion: Floating Point Real Number Data → Integer (Round Down)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■...
  • Page 582 11.28 INT (Conversion: Floating Point Real Number Data → Integer (Round Down)) Operation unit Minimum value Maximum value 0.00 65535.99 -32768.00 32767.99 0.00 4294967295.99 -2147483648.00 2147483647.99 ■ Processing Example 1) Unsigned 16 bits (US) (positive value) [i]…US [S]…DT10 [D]…DT0 DT10・DT11 U 234 SF 2.345670E+...
  • Page 583 11.28 INT (Conversion: Floating Point Real Number Data → Integer (Round Down)) Example 6) Unsigned 32 bits (UL) (negative value) [i]…UL [S]…DT10 [D]…DT0 DT10・DT11 SF -1.234567E+ + 05 DT0・DT1 DT12・DT13 SF -2.468000E+02 DT2・DT3 DT14・DT15 SF -1.357000E+02 DT4・DT5 * Operation error occurs if an unsigned integer is specified for the operation unit and a negative value is converted.
  • Page 584: Dint (Conversion: Double-Precision Real Number Data → Integer (Round Down))

    11.29 DINT (Conversion: Double-precision Real Number Data → Integer (Round Down)) 11.29 DINT (Conversion: Double-precision Real Number Data → Integer (Round Down)) ■ Ladder diagram DINT.US DT10 ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■...
  • Page 585 11.29 DINT (Conversion: Double-precision Real Number Data → Integer (Round Down)) Operation unit Minimum value Maximum value 0.00 65535.99 -32768.00 32767.99 0.00 4294967295.99 -2147483648.00 2147483647.99 ■ Example of processing Example 1) Unsigned 16 bits (US) (positive value) Example 2) Unsigned 16 bits (US) (negative value) Operation error occurs if an unsigned integer is specified for the operation unit and a negative value is converted.
  • Page 586 11.29 DINT (Conversion: Double-precision Real Number Data → Integer (Round Down)) Example 4) Signed 16 bits (SS) (negative value) Example 5) Unsigned 32 bits (UL) (positive value) Example 6) Unsigned 32 bits (UL) (negative value) Operation error occurs if an unsigned integer is specified for the operation unit and a negative value is converted.
  • Page 587 11.29 DINT (Conversion: Double-precision Real Number Data → Integer (Round Down)) Example 8) Signed 32 bits (SL) (negative value) ■ Flag operations Name Description To be set in case of out-of-range values in indirect access (index modification). To be set when a non-real number is specified for [S]. (ER) To be set when an out-of-range value is specified for [S] (conversion target data).
  • Page 588: Fix (Conversion: Floating Point Real Number Data → Integer (Round Decimal Digits))

    11.30 FIX (Conversion: Floating Point Real Number Data → Integer (Round Decimal Digits)) 11.30 FIX (Conversion: Floating Point Real Number Data → Integer (Round Decimal Digits)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ●...
  • Page 589 11.30 FIX (Conversion: Floating Point Real Number Data → Integer (Round Decimal Digits)) Operation unit Minimum value Maximum value 0.00 65535.99 -32768.00 32767.99 0.00 4294967295.99 -2147483648.00 2147483647.99 ■ Processing Example 1) Unsigned 16 bits (US) (positive value) [i]…US [S]…DT10 [D]…DT0 U 234 DT10・DT11 SF 2.345670E+...
  • Page 590 11.30 FIX (Conversion: Floating Point Real Number Data → Integer (Round Decimal Digits)) Example 6) Unsigned 32 bits (UL) (negative value) [i]…UL [S]…DT10 [D]…DT0 DT10・DT11 SF -1.234567E+ + 05 DT0・DT1 DT12・DT13 SF -2.468000E+02 DT2・DT3 SF -1.357000E+02 DT14・DT15 DT4・DT5 * Operation error occurs if an unsigned integer is specified for the operation unit and a negative value is converted.
  • Page 591: Dfix (Conversion: Double-Precision Real Number Data → Integer (Round Decimal Digits))

    11.31 DFIX (Conversion: Double-precision Real Number Data → Integer (Round Decimal Digits)) 11.31 DFIX (Conversion: Double-precision Real Number Data → Integer (Round Decimal Digits)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■...
  • Page 592 11.31 DFIX (Conversion: Double-precision Real Number Data → Integer (Round Decimal Digits)) Operation unit Minimum value Maximum value 0.00 65535.99 -32768.00 32767.99 0.00 4294967295.99 -2147483648.00 2147483647.99 ■ Conversion example Example 1) Unsigned 16 bits (US) (positive value) Example 2) Unsigned 16 bits (US) (negative value) Operation error occurs if an unsigned integer is specified for the operation unit and a negative value is converted.
  • Page 593 11.31 DFIX (Conversion: Double-precision Real Number Data → Integer (Round Decimal Digits)) Example 4) Signed 16 bits (SS) (negative value) Example 5) Unsigned 32 bits (UL) (positive value) Example 6) Unsigned 32 bits (UL) (negative value) Operation error occurs if an unsigned integer is specified for the operation unit and a negative value is converted.
  • Page 594 11.31 DFIX (Conversion: Double-precision Real Number Data → Integer (Round Decimal Digits)) Example 8) Signed 32 bits (SL) (negative value) ■ Flag operations Name Description To be set in case of out-of-range values in indirect access (index modification). To be set when a non-real number is specified for [S]. (ER) To be set when an out-of-range value is specified for [S] (conversion target data).
  • Page 595: Roff (Conversion: Floating Point Real Number Data → Integer (Round To The Nearest Unit))

    11.32 ROFF (Conversion: Floating Point Real Number Data → Integer (Round to the Nearest Unit)) 11.32 ROFF (Conversion: Floating Point Real Number Data → Integer (Round to the Nearest Unit)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ●...
  • Page 596 11.32 ROFF (Conversion: Floating Point Real Number Data → Integer (Round to the Nearest Unit)) Operation unit Minimum value Maximum value 0.00 65535.49 -32768.49 32767.49 0.00 4294967295.49 -2147483648.49 2147483647.49 ■ Processing Example 1) Unsigned 16 bits (US) (positive value) [i]…US [S]…DT10 [D]…DT0 DT10・DT11...
  • Page 597 11.32 ROFF (Conversion: Floating Point Real Number Data → Integer (Round to the Nearest Unit)) Example 6) Unsigned 32 bits (UL) (negative value) [i]…UL [S]…DT10 [D]…DT0 DT10・DT11 SF -1.234567E+ + 05 DT0・DT1 DT12・DT13 SF -2.468000E+02 DT2・DT3 DT14・DT15 SF -1.357000E+02 DT4・DT5 * Operation error occurs if an unsigned integer is specified for the operation unit and a negative value is converted.
  • Page 598: Droff (Conversion: Double-Precision Real Number → Integer (Round To The Nearest Unit))

    11.33 DROFF (Conversion: Double-precision Real Number → Integer (Round to the Nearest Unit)) 11.33 DROFF (Conversion: Double-precision Real Number → Integer (Round to the Nearest Unit)) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ●...
  • Page 599 11.33 DROFF (Conversion: Double-precision Real Number → Integer (Round to the Nearest Unit)) Operation unit Minimum value Maximum value 0.00 65535.49 -32768.49 32767.49 0.00 4294967295.49 -2147483648.49 2147483647.49 ■ Example of processing Example 1) Unsigned 16 bits (US) (positive value) Example 2) Unsigned 16 bits (US) (negative value) Operation error occurs if an unsigned integer is specified for the operation unit and a negative value is converted.
  • Page 600 11.33 DROFF (Conversion: Double-precision Real Number → Integer (Round to the Nearest Unit)) Example 4) Signed 16 bits (SS) (negative value) Example 5) Unsigned 32 bits (UL) (positive value) Example 6) Unsigned 32 bits (UL) (negative value) Operation error occurs if an unsigned integer is specified for the operation unit and a negative value is converted.
  • Page 601 11.33 DROFF (Conversion: Double-precision Real Number → Integer (Round to the Nearest Unit)) Example 8) Signed 32 bits (SL) (negative value) ■ Flag operations Name Description To be set in case of out-of-range values in indirect access (index modification). To be set when a non-real number is specified for [S]. (ER) To be set when an out-of-range value is specified for [S] (conversion target data).
  • Page 602 (MEMO) 11-82 WUME-FP7CPUPGR-12...
  • Page 603: High-Level Instructions (Time)

    12 High-level Instructions (Time) Applicable Models: All Models 12.1 HMSS (Conversion: Time Data (Hours, Minutes and Seconds) → Seconds Data) ..................12-2 12.2 SHMS (Conversion: Seconds Data → Time Data (Hours, Minutes and Seconds))..................12-4 12.3 CADD (Clock Addition) ..............12-6 12.4 CSUB (Clock Subtraction) ..............12-8 12.5 TMSEC (Calculation: Clock Data →...
  • Page 604: Hmss (Conversion: Time Data (Hours, Minutes And Seconds) → Seconds Data)

    12.1 HMSS (Conversion: Time Data (Hours, Minutes and Seconds) → Seconds Data) 12.1 HMSS (Conversion: Time Data (Hours, Minutes and Seconds) → Seconds Data) ■ Ladder diagram ■ List of operands Operand Description Starting device address of time data (available data range: 0 to 9999 (hours), 0 to 59 (minutes), 0 to 59 (seconds)) Device address of seconds data (Note 1)
  • Page 605 12.1 HMSS (Conversion: Time Data (Hours, Minutes and Seconds) → Seconds Data) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the time data range is exceeded. (ER) WUME-FP7CPUPGR-12 12-3...
  • Page 606: Shms (Conversion: Seconds Data → Time Data (Hours, Minutes And Seconds))

    12.2 SHMS (Conversion: Seconds Data → Time Data (Hours, Minutes and Seconds)) 12.2 SHMS (Conversion: Seconds Data → Time Data (Hours, Minutes and Seconds)) ■ Ladder diagram ■ List of operands Operand Description Device address of seconds data (available data range: 0 to 35,999,999) Starting device address of time data (Note 1) For details of time data, refer to...
  • Page 607 12.2 SHMS (Conversion: Seconds Data → Time Data (Hours, Minutes and Seconds)) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the seconds data range is exceeded. (ER) WUME-FP7CPUPGR-12 12-5...
  • Page 608: Cadd (Clock Addition)

    12.3 CADD (Clock Addition) 12.3 CADD (Clock Addition) ■ Ladder diagram ■ List of operands Operand Description Starting device address of clock data Starting device address of time data Starting device address of addition result (Note 1) For details of clock data and time data, refer to “"19.2 Clock and Time Data"”...
  • Page 609 12.3 CADD (Clock Addition) ■ Processing Example) Add 20 hours, 23 minutes and 45 seconds to 08:54:19, January 1, 2012 [S1] [S2] DT10 DT20 … … … K 12 (year) (year) DT20 K 12 (month) (month) DT21 (day) (day) DT22 (hours) K 20 (hours)
  • Page 610: Csub (Clock Subtraction)

    12.4 CSUB (Clock Subtraction) 12.4 CSUB (Clock Subtraction) ■ Ladder diagram ■ List of operands Operand Description Starting device address of clock data Starting device address of time data Starting device address of subtraction result (Note 1) For details of clock data and time data, refer to "19.2 Clock and Time Data"...
  • Page 611 12.4 CSUB (Clock Subtraction) ■ Processing Example) Subtract 20 hours, 23 minutes and 45 seconds from 08:54:19, January 1, 2012 [S1]…DT0 [S2]…DT10 [D]…DT20 K 12 (year) DT20 (year) K 11 (month) DT21 (month) K 12 DT22 (day) (day) K 31 -...
  • Page 612: Tmsec (Calculation: Clock Data → Seconds Data From The Base Time)

    12.5 TMSEC (Calculation: Clock Data → Seconds Data from the Base Time) 12.5 TMSEC (Calculation: Clock Data → Seconds Data from the Base Time) ■ Ladder diagram ■ List of operands Operand Description Starting device address of clock data (available data range: 2000/1/1 00:00:00 to 2099/12/31 23:59:59) Device address of seconds data from the base time (Note 1)
  • Page 613 12.5 TMSEC (Calculation: Clock Data → Seconds Data from the Base Time) ■ Processing Example) Calculate seconds data against the base time, from 08:54:19, January 1, 2012 [S]…DT0 [D]…DT10 * 1 word * 2 words (year) DT10・DT11 K 347100859 (Source seconds data) K 12 (month) (day)
  • Page 614: Sectm (Calculation: Seconds Data From The Base Time → Clock Data)

    12.6 SECTM (Calculation: Seconds Data from the Base Time → Clock Data) 12.6 SECTM (Calculation: Seconds Data from the Base Time → Clock Data) ■ Ladder diagram ■ List of operands Operand Description Device address of seconds data from the base time Starting device address of clock data (available data range: 2000/1/1 00:00:00 to 2099/12/31 23:59:59) (Note 1)
  • Page 615 12.6 SECTM (Calculation: Seconds Data from the Base Time → Clock Data) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the clock data range is exceeded. (ER) WUME-FP7CPUPGR-12 12-13...
  • Page 616: Timewt (Setting Of Clock/Calendar)

    12.7 TIMEWT (Setting of Clock/Calendar) 12.7 TIMEWT (Setting of Clock/Calendar) ■ Ladder diagram ■ List of operands Operand Description Starting device address of clock data (Note 1) Only this instruction comprises 7 words in total, including day of week. For details of clock data, refer "19.2 Clock and Time Data"...
  • Page 617 12.7 TIMEWT (Setting of Clock/Calendar) ■ Processing Example) Specify 08:54:19, January 1, 2012 [S]…DT0 * 1 word (year) K 12 (year) K 12 (month) (month) (day) (day) (hours) (hours) Update (minutes) (minutes) K 54 K 54 (seconds) (seconds) K 19 K 19 (day of week) (day of week)
  • Page 618: Summer (Daylight Saving Time Acquisition)

    12.8 SUMMER (Daylight Saving Time Acquisition) 12.8 SUMMER (Daylight Saving Time Acquisition) ■ Ladder diagram ■ List of operands Operand Description Starting address of the device that stores clock data when daylight saving time starts (Specify the clock data in the standard time.) * The formats of the clock data of S1/S2 are the following four words.
  • Page 619 12.8 SUMMER (Daylight Saving Time Acquisition) ■ Available devices (●: Available) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan modifie " " U ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●...
  • Page 620 12.8 SUMMER (Daylight Saving Time Acquisition) ■ Setting example When the daylight saving time period is from 02:00 on March 8 to 01:59 on November 1, and 60 minutes is specified for the time difference [S1]...DT0 [S2]...DT10 [S3]...DT20 [D]...DT100 Descripti Value Month [S1] (Time to start daylight saving time)
  • Page 621 12.8 SUMMER (Daylight Saving Time Acquisition) Descripti Descripti Value Value SD55 Seconds DT104 Hours Day of DT105 Minutes SD56 the week DT106 Seconds Day of DT107 the week ■ Flag operations Name Description To be set in case of out-of-range values in indirect access (index modification). To be set when [S1] or [S2] (clock data) is out of the range.
  • Page 622 (MEMO) 12-20 WUME-FP7CPUPGR-12...
  • Page 623: High-Level Instructions (Special)

    13 High-level Instructions (Special) Applicable Models: All Models 13.1 LOGST (Logging Trace Start Request) ..........13-2 13.2 LOGED (Logging Trace Stop Request) ..........13-4 13.3 SMPL (Sampling Trace)..............13-6 13.4 OPHST (Operation History Start Request) ........13-8 13.5 OPHED (Operation History End Request) ........13-9 13.6 OPHCLR (Operation History Clearing) ..........13-10 13.7 OPHSAVE (Operation History Save to SD Card) ......13-11 13.8 ERR (Self-Diagnostic Error Code Set)..........13-13...
  • Page 624: Logst (Logging Trace Start Request)

    13.1 LOGST (Logging Trace Start Request) 13.1 LOGST (Logging Trace Start Request) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Number of logging trace requested to start ■ Devices that can be specified (indicated by ●) Real 32-Bit...
  • Page 625 13.1 LOGST (Logging Trace Start Request) ■ Flag operations Name Description To be set when a request by a communication command has been accepted (logging trace start/ logging trace stop/logging trace registration). To be set when the logging trace stop has been requested. (ER) To be set in case of out-of-range values in indirect access (index modification).
  • Page 626: Loged (Logging Trace Stop Request)

    13.2 LOGED (Logging Trace Stop Request) 13.2 LOGED (Logging Trace Stop Request) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Number of logging trace requested to stop ■ Available devices (●: Available) Real 32-Bit...
  • Page 627 13.2 LOGED (Logging Trace Stop Request) ■ Flag operations Name Description To be set when a request by a communication command has been accepted (logging trace start/ logging trace stop/logging trace registration). To be set when the logging trace start has been requested. (ER) To be set in case of out-of-range values in indirect access (index modification).
  • Page 628: Smpl (Sampling Trace)

    13.3 SMPL (Sampling Trace) 13.3 SMPL (Sampling Trace) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Logging trace number for which data is stored ■ Devices that can be specified (indicated by ●) Real 32-Bit 16-Bit device:...
  • Page 629 13.3 SMPL (Sampling Trace) ■ Flag operations Name Description To be set when the data logging condition of logging trace number is set to other than "Instruction". To be set in case of out-of-range values in indirect access (index modification). (ER) To be set when the logging trace stops.
  • Page 630: Ophst (Operation History Start Request)

    13.4 OPHST (Operation History Start Request) 13.4 OPHST (Operation History Start Request) ■ Ladder diagram ■ Available operation units No operation unit. ■ List of operands Operand Description Operation history group number for which startup is requested (0 to 7) ■...
  • Page 631: Ophed (Operation History End Request)

    13.5 OPHED (Operation History End Request) 13.5 OPHED (Operation History End Request) ■ Ladder diagram ■ Available operation units No operation unit. ■ List of operands Operand Description Operation history group number for which stoppage is requested (0 to 7) ■...
  • Page 632: Ophclr (Operation History Clearing)

    13.6 OPHCLR (Operation History Clearing) 13.6 OPHCLR (Operation History Clearing) ■ Ladder diagram ■ Available operation units No operation unit. ■ List of operands Operand Description Operation history group number for which initialization is to be performed (0 to 7) ■...
  • Page 633: Ophsave (Operation History Save To Sd Card)

    13.7 OPHSAVE (Operation History Save to SD Card) 13.7 OPHSAVE (Operation History Save to SD Card) ■ Ladder diagram ■ Available operation units No operation unit. ■ List of operands Operand Description Group number whose operation histories are output to SD card (0 to 7) Order in which operation histories are output to SD card (0: Ascending order of occurrence time, 1: Descending order of occurrence time) Language number for to SD card output (0 to 3)
  • Page 634 13.7 OPHSAVE (Operation History Save to SD Card) OPH0 ├OpeHis0(180619_112345).csv ├OpeHis0(180619_113412).csv └OpeHis0(180619_114630).csv ・・・ OPH7 ├OpeHis7(180620_112345).csv ├・・・ └OpeHis7(180624_114630).csv Output file directories are named for each group, as below. \OPHx\ x: Group number Output files are named as below. OpeHisx(YYMMDD_HHMMSS).csv x: Group number YYMMDD: File creation date (year/month/day) HHMMSS: File creation time (hour/minute/second) ●...
  • Page 635: Err (Self-Diagnostic Error Code Set)

    13.8 ERR (Self-Diagnostic Error Code Set) 13.8 ERR (Self-Diagnostic Error Code Set) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Specify a self-diagnostic error code. ■ Available devices (●: Available) Real 32-Bit 16-Bit device:...
  • Page 636 13.8 ERR (Self-Diagnostic Error Code Set) Operation Self-diagnostic errors are cleared. The system relays (SR), system data (SD), and system monitors (SM) that are shown below are also cleared at the same time. ● When self-diagnostic errors are cleared, the following system relays (SR), system data (SD), and system monitors (SM) are also cleared at the same time.
  • Page 637: Wdtres (Watchdog Timer Reset)

    13.9 WDTRES (Watchdog Timer Reset) 13.9 WDTRES (Watchdog Timer Reset) ■ Ladder diagram ■ Outline of operation The watchdog timer is reset. ■ Flag operations No change occurs. WUME-FP7CPUPGR-12 13-15...
  • Page 638: Scopy (System Area Copy)

    13.10 SCOPY (System Area Copy) 13.10 SCOPY (System Area Copy) ■ Ladder diagram ■ List of operands Operand Description Always zero (Device address storing the system area number to be copied or constant) The device address storing the starting number of system area or constant The device address storing the terminating number of system area or constant Starting device address of destination area ■...
  • Page 639 13.10 SCOPY (System Area Copy) [S1]...U0 [S2]...U0 [S3]...U400 [D]...DT0 ■ Precautions for programming ● [S1] is always zero. An operation error occurs when numbers other than zero are specified. ● Specify [S3] to be larger than [S2]. ● When [S3] exceeds the upper limit of the system area, an operation error does not occur. The area from [S2] to the upper limit of the system area is copied.
  • Page 640: Getstno (Acquiring Starting Word Number Of Specified Slot)

    13.11 GETSTNO (Acquiring Starting Word Number of Specified Slot) 13.11 GETSTNO (Acquiring Starting Word Number of Specified Slot) ■ Ladder diagram ■ List of operands Operand Description Specify the starting address of the device that stores the slot number or a constant. Specify the starting address of a readout destination device.
  • Page 641: Posset (Setting Of Positioning Starting Table)

    13.12 POSSET (Setting of Positioning Starting Table) 13.12 POSSET (Setting of Positioning Starting Table) ■ Ladder diagram ■ List of operands Operand Description Slot number where the positioning unit is attached (unsigned 16-bit integer) Axis number to start up the positioning table (unsigned 16-bit integer); 1 to 4: Axis 1 to 4; 8: Virtual axis Table number to start up the position control (unsigned 16-bit integer);...
  • Page 642 13.12 POSSET (Setting of Positioning Starting Table) ■ Program example X100 X104 X160 Operation enabled condition 1st axis error Ready Tool Operation positioning operation enabled flag Specify slot number, axis POSSET number, and table Positioning Slot Axis Table number. control start number number number...
  • Page 643: Pstrd (Acquiring Axis Status)

    13.13 PSTRD (Acquiring Axis Status) 13.13 PSTRD (Acquiring Axis Status) ■ Ladder diagram ■ List of operands Operand Description Slot number where the positioning unit is attached (unsigned 16-bit integer) Axis number to read the axis status information (unsigned 16-bit integer); 1 to 4: Axis 1 to 4; 8: Virtual axis Device address to store the axis status information (unsigned 16-bit integer) ■...
  • Page 644 13.13 PSTRD (Acquiring Axis Status) ■ Allocation of axis status information to be stored in [D] Status Axis 1 Axis 2 Axis 3 Axis 4 Virtual axis information Tool operation Error annunciation Warning annunciation BUSY Operation done Home return done (Note 1) The I/O numbers in the above table show relative addresses based on the base word number.
  • Page 645: Perrd (Acquiring Error/Warning In The Positioning Unit)

    13.14 PERRD (Acquiring Error/Warning in the Positioning Unit) 13.14 PERRD (Acquiring Error/Warning in the Positioning Unit) ■ Ladder diagram ■ List of operands Operand Description Slot number where the positioning unit is attached (unsigned 16-bit integer) Axis number to read the error/warning information (unsigned 16-bit integer); 1 to 4: Axis 1 to 4; 8: Virtual axis Device address to store the error/warning code (unsigned 16-bit integer) ■...
  • Page 646 13.14 PERRD (Acquiring Error/Warning in the Positioning Unit) Classification Name UM (Hex) Value ・Storage location Error Three-axis error code UM 0015A H 4022 [D]……DT0 H 4022 information Alarm buffer 1 [D+1]…DT1 H B010 Warning Three-axis warning UM 001E2 H B010 information code Alarm buffer 1 ■...
  • Page 647 13.14 PERRD (Acquiring Error/Warning in the Positioning Unit) Unit memory number (HEX) Name Axis 1 Axis 2 Axis 3 Axis 4 Virtual axis UM001C8 UM001D8 UM001E8 UM001F8 UM00238 Warning code annunciation buffer 4 UM001C9 UM001D9 UM001E9 UM001F9 UM00239 UM001CA UM001DA UM001EA UM001FA UM0023A...
  • Page 648: Uclr (Error/Warning Clear)

    13.15 UCLR (Error/Warning Clear) 13.15 UCLR (Error/Warning Clear) ■ Ladder diagram ■ List of operands Operand Description Specify the slot number (unsigned 16-bit integer) ■ Available devices (●: Available) Real 32-Bit 16-Bit device: Integer numbe Index device: modifie Operan (Note 1) "...
  • Page 649 13.15 UCLR (Error/Warning Clear) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the slot number and/or the axis number is out of the available range. (ER) WUME-FP7CPUPGR-12 13-27...
  • Page 650 (MEMO) 13-28 WUME-FP7CPUPGR-12...
  • Page 651: High-Level Instructions (Strings)

    14 High-level Instructions (Strings) Applicable Models: All Models 14.1 BCC (Block Check Code Calculation)..........14-3 14.2 CRC (CRC Code Calculation)............14-6 14.3 HEXA (Conversion: HEX → Hexadecimal ASCII) ......14-10 14.4 AHEX (Conversion: Hexadecimal ASCII → HEX) ......14-13 14.5 BCDA (Conversion: BCD → Decimal ASCII)........14-16 14.6 ABCD (Conversion: Decimal ASCII →...
  • Page 652 14 High-level Instructions (Strings) 14.29 ESCMP (String Compare: With Storage Area Size) .......14-119 14.30 ESADD (String Addition: With Storage Area Size) ......14-122 14.31 ELEN (Obtainment of String Length: With Storage Area Size)..14-124 14.32 ESSRC (String Search: With Storage Area Size) ......14-126 14.33 ERIGHT (Takeout of the Right Side of a String: With Storage Area Size) .....................14-130 14.34 ELEFT (Takeout of the Left Side of a String: With Storage Area...
  • Page 653: Bcc (Block Check Code Calculation)

    14.1 BCC (Block Check Code Calculation) 14.1 BCC (Block Check Code Calculation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Area storing data specifying the calculation method, or constant data Starting address of the area storing target data The area that stores the length (number of bytes) of the targeted data, or the constant Area that stores operation results...
  • Page 654 14.1 BCC (Block Check Code Calculation) ● The block check code (BCC) for the targeted data, which is the number of bytes specified by [S3] starting from the calculation start position specified by [S2], is calculated with the calculation method specified by [S1]. ●...
  • Page 655 14.1 BCC (Block Check Code Calculation) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). (ER) WUME-FP7CPUPGR-12 14-5...
  • Page 656: Crc (Crc Code Calculation)

    14.2 CRC (CRC Code Calculation) 14.2 CRC (CRC Code Calculation) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Area storing data specifying the calculation method, or constant data Starting address of the area storing target data The area that stores the length (number of bytes) of the targeted data, or the constant Area that stores operation results...
  • Page 657 14.2 CRC (CRC Code Calculation) ● The block check code (BCC) for the targeted data, which is the number of bytes specified by [S3] starting from the calculation start position specified by [S2], is calculated with the CRC calculation method which is specified by [S1]. ●...
  • Page 658 14.2 CRC (CRC Code Calculation) Example 1) Operation unit: 16 bits (SS) / Calculation method: CRC-16; Initial value = FFFFH; Right shift; XOR = 0000H [CRC.SS H 0 , DT0 , U12 , DT6 ] [S1] CRC-16 [S2] Header of target data [S3] Length of target data (12 bytes) Calculation result (Characters)
  • Page 659 14.2 CRC (CRC Code Calculation) Example 3) Operation unit: 16 bits (SS) / Calculation method: CRC-16; Initial value = 0000H; Right shift; XOR = 0000H [CRC.SS H 2 , DT0 , U12 , DT6 ] [S1] CRC16 [S2] Header of target data [S3] Length of target data (12 bytes) Calculation result (Characters)
  • Page 660: Hexa (Conversion: Hex → Hexadecimal Ascii)

    14.3 HEXA (Conversion: HEX → Hexadecimal ASCII) 14.3 HEXA (Conversion: HEX → Hexadecimal ASCII) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Starting number for the area storing the hexadecimal numeric values The area that stores the length (number of bytes) to be converted, or the constant Starting number of the area that stores the ASCII code as the conversion result ■...
  • Page 661 14.3 HEXA (Conversion: HEX → Hexadecimal ASCII) ● The result (ASCII code) should have twice the size of the source data. ■ Conversion example Example 1) Operation unit: 16 bits (US, SS) [i]…US,SS [S1]…DT0 [S2]…DT1 [D]…DT10 (characters) DT10 H 4443 [S1]…DT0 H ABCD DT11...
  • Page 662 14.3 HEXA (Conversion: HEX → Hexadecimal ASCII) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the number of bytes specified by [S2] exceeds the area of the conversion range.
  • Page 663: Ahex (Conversion: Hexadecimal Ascii → Hex)

    14.4 AHEX (Conversion: Hexadecimal ASCII → HEX) 14.4 AHEX (Conversion: Hexadecimal ASCII → HEX) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Starting number of the area that stores an ASCII code The area that stores the number of ASCII codes (number of characters) to be converted, or the constant Starting number of the area that stores the hexadecimal figure as the conversion result...
  • Page 664 14.4 AHEX (Conversion: Hexadecimal ASCII → HEX) ■ Conversion example Example 1) Operation unit: 16 bits (US, SS) [i]…US,SS [S1]…DT0 [S2]…DT2 [D]…DT10 (characters) H 4241 [S1]…DT0 DT10 H CDAB H 4443 DT11 H 0004 [S2]…DT2 DT12 DT13 DT14 Example 2) Operation unit: 32 bits (UL, SL) [i]…UL,SL [S1]…DT0 [S2]…DT2...
  • Page 665 14.4 AHEX (Conversion: Hexadecimal ASCII → HEX) ■ Precautions for programming ● Two characters of ASCII code are converted into two 1-byte numerical digits. At this time, the upper and lower characters are interchanged. ● Four characters are converted as one segment of data. [S1+3] [S1+2] [S1+1]...
  • Page 666: Bcda (Conversion: Bcd → Decimal Ascii)

    14.5 BCDA (Conversion: BCD → Decimal ASCII) 14.5 BCDA (Conversion: BCD → Decimal ASCII) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Starting number of the area storing the BCD numerical value The area that stores the data that express data size to be converted or conversion direction, or the constant Starting number of the area that stores the ASCII code as the conversion result...
  • Page 667 14.5 BCDA (Conversion: BCD → Decimal ASCII) ● Since the amount of data to be converted is specified in bytes, it is also possible to convert only the low byte of one word data. ■ Setting the conversion data amount and conversion direction [S2] Specify the value with a four-digit H constant.
  • Page 668 14.5 BCDA (Conversion: BCD → Decimal ASCII) Example 4) Operation unit: 32 bits (UL) [i]…UL [S1]…DT0 [S2]…DT2 [D]…DT10 Reverse direction, four bytes (characters) DT10 H 3231 [S1]…DT0 H 5678 H 3433 DT11 H 1234 DT12 [S2]…DT2 H 1004 H 3635 DT13 H 3837 ■...
  • Page 669: Abcd (Conversion: Decimal Ascii → Bcd)

    14.6 ABCD (Conversion: Decimal ASCII → BCD) 14.6 ABCD (Conversion: Decimal ASCII → BCD) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ■ List of operands Operand Description Starting number of the area that stores an ASCII code The area that stores the data that express the number of ASCII codes to be converted and conversion direction, or the constant Number of the start of the area storing the BCD value that is the result of conversion...
  • Page 670 14.6 ABCD (Conversion: Decimal ASCII → BCD) ● Since the amount of data to be converted is specified in bytes, it is also possible to convert only the low byte of one word data. ● If the data size to be converted is an odd number, bits of the final data of the conversion result are padded with '0'.
  • Page 671 14.6 ABCD (Conversion: Decimal ASCII → BCD) Example 3) Operation unit: 32 bits (UL) [i]...UL [S1]...DT0 [S2]...DT4 [D]...DT10 Forward direction/ 8 characters (Characters) [S1]...DT0 H 3231 DT10 H 3412 DT11 H 7856 H 3433 DT12 H 3635 DT13 H 3837 [S2]...DT4 H 0008 Example 4) Operation unit: 32 bits (UL)
  • Page 672 14.6 ABCD (Conversion: Decimal ASCII → BCD) [Forward direction] [S1+3] [S1+2] [S1+1] [S1] ① ③ ⑤ ⑦ ② ④ ⑥ ⑧ ASCII Code [D+1] ③④ ⑤⑥ ⑦⑧ ①② [Reverse direction] [S1+3] [S1+2] [S1+1] [S1] ⑧ ⑦ ⑥ ④ ③ ② ⑤...
  • Page 673: Bina (Conversion: Bin → Decimal Ascii)

    14.7 BINA (Conversion: BIN → Decimal ASCII) 14.7 BINA (Conversion: BIN → Decimal ASCII) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description The area that stores the BIN data that express a decimal figure, or the constant The area that stores the number of bytes of the area to store the conversion result, or the constant Starting number of the area that stores the ASCII code as the conversion result ■...
  • Page 674 14.7 BINA (Conversion: BIN → Decimal ASCII) ● If the number of bytes of the resulting ASCII code (including the negative sign) is larger than the number of bytes specified by [S2], an operation error occurs. ● For [S2], specify the number of digits for the conversion target including the sign. ■...
  • Page 675 14.7 BINA (Conversion: BIN → Decimal ASCII) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the number of bytes specified by [S2] exceeds the [D] area. To be set when the conversion result exceeds the area.
  • Page 676: Abin (Conversion: Decimal Ascii → Bin)

    14.8 ABIN (Conversion: Decimal ASCII → BIN) 14.8 ABIN (Conversion: Decimal ASCII → BIN) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ■ List of operands Operand Description Starting number of the area that stores the ASCII code to be converted The area that stores the number of bytes to be converted, or the constant Area to store the conversion result ■...
  • Page 677 14.8 ABIN (Conversion: Decimal ASCII → BIN) ● The ASCII code that express a decimal figure equivalent to the number of bytes (i.e. number of characters) specified by [S2], starting from the area specified by [S1], is converted into a decimal figure and stored in the area specified by [D].
  • Page 678 14.8 ABIN (Conversion: Decimal ASCII → BIN) ■ Conversion example Example 1) Operation unit: 16 bits (US) [i]…US [S1]…DT0 [S2]…DT3 [D]…DT10 (characters) [S1]…DT0 H 3620 DT10 H FF9C (U 65436) H 3435 DT11 H 3633 [S2]…DT3 H 0006 DT0 to DT2: "65436" → DT10: H FF9C (U 65436) Example 2) Operation unit: 16 bits (SS) [i]…SS [S1]…DT0...
  • Page 679 14.8 ABIN (Conversion: Decimal ASCII → BIN) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the number of bytes specified by [S2] exceeds the [D] area. To be set when the conversion result exceeds the area.
  • Page 680: Btoa (Conversion: Bin → Ascii)

    14.9 BTOA (Conversion: BIN → ASCII) 14.9 BTOA (Conversion: BIN → ASCII) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Control string (2 to 16 characters) Starting address of the device that stores binary data Conversion method Starting address of the device that stores the ASCII code as the conversion result...
  • Page 681 14.9 BTOA (Conversion: BIN → ASCII) ● The maximum number of characters after conversion for a single datum is 32. An operation error occurs when it exceeds 32 characters. ● To directly specify a character constant for the operand [S1], enter the constant in the "Instruction list"...
  • Page 682 14.9 BTOA (Conversion: BIN → ASCII) ■ Setting conversion data for the control string [S1] Data format Control Available character operation Usage example BIN data before ASCII data after string units conversion conversion 16-bit data (signed integer) Decimal ASCII data "%d"...
  • Page 683 14.9 BTOA (Conversion: BIN → ASCII) Conv Oper ersio Control ation character Binary data ASCII data Description unit direct string Rever When %b is specified, the result is %+10.7b H 0123 "␣␣␣0000123" not signed. If an 8-character string is converted Forwa %8.5X, H 0123...
  • Page 684 14.9 BTOA (Conversion: BIN → ASCII) Items Control Binary data ASCII data Description character string %-5d K 100 "100␣␣" %-5x H 12A "12a␣␣" Specification Default is right align. To set to left align, of right align %-5b H 123 "123␣␣" add minus (-) before the specification of and left align digit number.
  • Page 685 14.9 BTOA (Conversion: BIN → ASCII) ■ Conversion example Example 1) Converting unsigned 16-bit binary data (2 data) to decimal ASCII data (6 digits + comma) x 2 The high byte of DT100 is set as the beginning of the storage area. It is left-aligned (low word side), and a comma is added before the data is stored.
  • Page 686 14.9 BTOA (Conversion: BIN → ASCII) Example 3) Converting signed 32-bit binary data (2 data) to decimal ASCII data (number of digits not specified) The low byte of DT100 is set as the beginning of the storage area. For a positive number, a space is inserted.
  • Page 687 14.9 BTOA (Conversion: BIN → ASCII) Example 5) Converting unsigned 16-bit binary data (2 data) to decimal ASCII data (10 digits x 2) The low byte of DT100 is set as the beginning of the storage area. 5 digits are stored as significant figures.
  • Page 688 14.9 BTOA (Conversion: BIN → ASCII) [i]…UL [S1]…"%-12u" Convert 32-bit data into decimal ASCII data (12 digits) (left align) : [S2]…DT0 [N]…H 0002 00 01 ①ASCII data (reverse direction) : [D]…DT100 ②Storage start position (0) [D]+0 bytes ③Conversion data amount (2) Convert [S2] and [S2]+2 ③...
  • Page 689 14.9 BTOA (Conversion: BIN → ASCII) [i]…US [S1]…"%8.5X, " Convert 16-bit data into hexadecimal ASCII data (8 digits) : [S2]…DT0 [N]…H 0002 00 00 ① ASCII data (forward direction) : [D]…DT100 ② Storage start position (0) [D]+0 bytes ③ Conversion data amount (2) Convert [S2] and [S2]+1 ③...
  • Page 690 14.9 BTOA (Conversion: BIN → ASCII) Example 9) Converting unsigned 16-bit BCD data (2 data) to decimal ASCII data (5 digits x 2) The low byte of DT100 is set as the beginning of the storage area. It is stored left-aligned (low word side) for 5 significant figures.
  • Page 691 14.9 BTOA (Conversion: BIN → ASCII) [i]…UL [S1]…"%10.7b" Convert 32-bit BCD data into decimal ASCII data (10 digits) : [S2]…DT0 [N]…H 0002 00 01 ① ASCII data (reverse direction) : [D]…DT100 ② Storage start position (0) [D]+0 bytes ③ Conversion data amount (2) Convert [S2] and [S2]+2 ③...
  • Page 692 14.9 BTOA (Conversion: BIN → ASCII) Example 12) Converting 32-bit single-precision floating point real number data (2 data) to exponential notation ASCII data (10 digits x 2) The low byte of DT100 is set as the beginning of the storage area. 2 digits after the decimal point.
  • Page 693 14.9 BTOA (Conversion: BIN → ASCII) [i]…SF [S1]…"%#9.7g" : Convert 32-bit single precision real number data into exponential ASCII data (9 digits) or floating point ASCII data, whichever is shorter in the relevant notation [S2]…DT0 [N]…H 0002 01 01 ① ASCII data (reverse direction) :...
  • Page 694: Achk (Ascii Data Check)

    14.10 ACHK (ASCII Data Check) 14.10 ACHK (ASCII Data Check) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Control string (2 to 16 characters) Starting number of the area that stores an ASCII code Conversion method ■...
  • Page 695 14.10 ACHK (ASCII Data Check) ● The operations for the maximum length of ASCII string and for the valid range of conversion data values are the same as the ATOB instruction. ● To directly specify a character constant for the operand [S1], enter the constant in the "Instruction list"...
  • Page 696: Atob (Conversion: Ascii → Bin)

    14.11 ATOB (Conversion: ASCII → BIN) 14.11 ATOB (Conversion: ASCII → BIN) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ● ● ● ● ● ■ List of operands Operand Description Control string (2 to 16 characters) Starting number of the area that stores the ASCII data targeted for conversion Conversion method Starting number of the area for storing the binary data of the converted result...
  • Page 697 14.11 ATOB (Conversion: ASCII → BIN) ■ Format of ASCII data ● Data is processed for the number of data specified for [N], or considering a NULL character as the end of the ASCII string data to be converted. ● If a comma (",") is included in the string data, it is processed as a separator for the data. ●...
  • Page 698 14.11 ATOB (Conversion: ASCII → BIN) Control Format of data for conversion Available charact operation Data range ASCII data before BIN data after conversion units conversion string 1.797693134862231E+308 Floating point real 64-bit double-precision to 2.2250738585072014E-308 number (including floating point real number exponential notation) -2.2250738585072014E-308 data...
  • Page 699 14.11 ATOB (Conversion: ASCII → BIN) [i]…US [S1]…"%4x" Converts hexadecimal ASCII data (4-digit) to 16-bit data : [S2]…DT0 [N]…H 0002 00 01 : ① ASCII data (reverse direction) [D]…DT100 ② Conversion starting position (0) → [S2]+0 byte ③ Amount of conversion data (2) → Converts two 4-digit data ②...
  • Page 700 14.11 ATOB (Conversion: ASCII → BIN) Example 3) Converting two hexadecimal ASCII data (6 digits) to two 32-bit binary data (hexadecimal) The conversion starts from the low byte of DT0. It is converted in reverse direction (the low word side of [S2] is considered as high-order numerical data). For empty digits of the storage area, zeros (0) are inserted.
  • Page 701 14.11 ATOB (Conversion: ASCII → BIN) [i]…US [S1]…"%d" Converts decimal ASCII data to 16-bit data (Data end: ',') : [S2]…DT0 [N]…H 0002 01 01 ① ASCII data (reverse direction) : [D]…DT100 ② Conversion starting position (1) → [S2]+1 bytes ③ Amount of conversion data (2) → 2 data separated by a comma ②...
  • Page 702 14.11 ATOB (Conversion: ASCII → BIN) [i]…US [S1]… "%4b" Converts decimal ASCII data to 16-bit BCD data (Data end: ',') : [S2]…DT0 [N]…H 0002 00 01 ① ASCII data (reverse direction) : [D]…DT100 ② Conversion starting position (0) → [S2]+0 byte ③...
  • Page 703 14.11 ATOB (Conversion: ASCII → BIN) Example 8) Converting two exponential notation ASCII data (with comma delimiters) to two 32-bit single-precision real numbers The conversion starts from the high byte of DT0. If there is no specification for the number of digits, it is processed considering commas as the data delimiter.
  • Page 704 14.11 ATOB (Conversion: ASCII → BIN) [i]…US [S1]… "%5d" Converts decimal ASCII data (5-digits) to 16-bit data (unsigned) : [S2]…DT0 [N]…H 0002 01 01 ① ASCII data (reverse direction) : [D]…DT100 ② Conversion starting position (1) → [S2]+1 byte ③ Amount of conversion data (2) → two 5-digit data ②...
  • Page 705 14.11 ATOB (Conversion: ASCII → BIN) [i]…UL [S1]…"%10d" Converts decimal ASCII data (10-digit) to 32-bit data : [S2]…DT0 : [N]…H 0002 00 01 ① ASCII data (reverse direction) [D]…DT100 ② Conversion starting position (0) → [S2]+0 byte ③ Amount of conversion data (2) → two 10-digit data ②...
  • Page 706 14.11 ATOB (Conversion: ASCII → BIN) Example 13) Converting two hexadecimal ASCII data (4 digits) to two 16-bit binary data (hexadecimal) The conversion starts from the low byte of DT0. It is converted in forward direction (the high word side of [S2] is considered as high-order numerical data). [i]…US [S1]…"%4x"...
  • Page 707 14.11 ATOB (Conversion: ASCII → BIN) Example 15) Converting two decimal ASCII data (7 digits) to two 32-bit BCD data The conversion starts from the low byte of DT0. It is converted in reverse direction (the low word side of [S2] is considered as high-order numerical data). For empty digits of the storage area, zeros (0) are inserted.
  • Page 708 14.11 ATOB (Conversion: ASCII → BIN) [i]…SF [S1]… "%10f" : Converts floating point ASCII data (10 characters) to 32-bit real number data [S2]…DT0 : [N]…H 0002 01 01 ① ASCII data (reverse direction) [D]…DT100 ② Conversion starting position (1) → [S2]+1 byte ③...
  • Page 709 14.11 ATOB (Conversion: ASCII → BIN) Example 18) Converting two hexadecimal ASCII data (separated by commas, with spaces) to two 16-bit binary data (hexadecimal) The conversion starts from the high byte of DT0. It is converted in reverse direction (the low word side of [S2] is considered as high-order numerical data).
  • Page 710: Sset (Conversion: Character Constant → Ascii Code)

    14.12 SSET (Conversion: Character Constant → ASCII Code) 14.12 SSET (Conversion: Character Constant → ASCII Code) ■ Ladder diagram ■ List of operands Operand Description Source string Destination starting device address ■ Available devices (●: Available) Real 32-Bit 16-Bit device: Integer numbe device:...
  • Page 711 14.12 SSET (Conversion: Character Constant → ASCII Code) ■ Processing Example 1) Setting the 11 characters of the string "ABC1230 DEF" in DT0 11 (Number of characters) “ABC1230 DEF” H 42 H 41 H 31 H 43 H 33 H 32 H 20 H 30 H 45...
  • Page 712 14.12 SSET (Conversion: Character Constant → ASCII Code) 9. Press either the [Overwrite] or [Insert] button. 14-62 WUME-FP7CPUPGR-12...
  • Page 713 14.12 SSET (Conversion: Character Constant → ASCII Code) ■ Reference Table: ASCII Codes ■ Reference Table: JIS8 Codes   0   0    0    0     0     1   0   1   0   1   0  ...
  • Page 714: Print (Text Creation)

    14.13 PRINT (Text Creation) 14.13 PRINT (Text Creation) ■ Ladder diagram ■ List of operands Operand Description Starting address of the device storing the string data which indicates the create text form or a character constant Starting address of the device storing the data to be output in text format Starting address of the device storing the text ■...
  • Page 715 14.13 PRINT (Text Creation) This example includes a tab code, a body (a conversion form for 1 datum is inserted), and a linefeed code. “¥t Floor A is %d degrees C.¥n Line feed code Conversion form Text Tab code ● Tab code (\t) is converted to ASCII code HT (09h). ●...
  • Page 716 14.13 PRINT (Text Creation) Example: SSET "Floor" DT112 S1 = "%d %u %x %b %f %e %Lg %s" S2 = DT100 Result: -1 65535 ffff 1000 123.4567 123.4567 123.456789 Floor DT100 H FFFF Data for %d DT101 H FFFF Data for %u DT102 H FFFF Data for %x...
  • Page 717 14.13 PRINT (Text Creation) - Image of mail text Floor A: 25 degrees C. Floor B: 28 degrees C. - Setting values S1="Floor A: %d degrees C.¥nFloor B: %d degrees C." S2=DT100 D=DT200 DT100 K 25 DT200 H002D The number of bytes is stored. Data for %d DT101 K 28...
  • Page 718 14.13 PRINT (Text Creation) Example 2) - Image of mail text Production volume: 5 - Setting values S1="Production volume: %d" S2=DT1 D=DT50 U 14 No. of bytes DT50 DT51 H 72 (r) H 50 (P) DT52 H64 (d) H 6f (o) H 63 (c) H 75 (u) DT53...
  • Page 719 14.13 PRINT (Text Creation) Example 4) - Image of mail text Location: Nagoya, Aichi - Setting values S1="Location: %s, %s" S2=DT1 D=DT50 U 17 No. of bytes DT50 H 61 (a) H 4E (N) H 6F (o) H 4C (L) DT51 H 6F (o) H 67 (g)
  • Page 720: Print/Eprint Instruction Shared Conversion Form Table

    14.14 PRINT/EPRINT Instruction Shared Conversion Form Table 14.14 PRINT/EPRINT Instruction Shared Conversion Form Table This table indicates the format for the "Conversion Form" that can be inserted in the "Text Creation Form" to be specified for operand [S1] from the PRINT instruction or the EPRINT instruction.
  • Page 721 14.14 PRINT/EPRINT Instruction Shared Conversion Form Table Data format Conversio Usage example ASCII data after n form Data before conversion conversion "%b" , "%5b" , "%-5b" , "%05b" , "%b" 16-bit BCD data Decimal ASCII data "%10.5b" "%Lb" , "%5Lb" , "%-5Lb" , "%Lb"...
  • Page 722 14.14 PRINT/EPRINT Instruction Shared Conversion Form Table Conversion BIN data before ASCII data after Items Description form conversion conversion n: Total number of characters, m: H 12A "12a" Number of characters of precision H 12A "␣␣12a" <Number of characters of precision> [d , ld , i , Li , u , Lu , x , Lx , X , LX , b , %10.5x H 12A...
  • Page 723 14.14 PRINT/EPRINT Instruction Shared Conversion Form Table Conversion BIN data before ASCII data after Items Description form conversion conversion %#10.0e SF 1234.567 "␣␣␣␣1.e+03" When specifying %u, %#10.3E SF 1234.567 "␣␣␣␣1.E+03" %x, or %b, existence of %#9.0g SF 1234 "␣␣␣1234.0" "." is always added, "#"...
  • Page 724 14.14 PRINT/EPRINT Instruction Shared Conversion Form Table String data Conversion ASCII data after Items before Description form conversion conversion Specify the number of digits per byte (equivalent to 1-byte character). For 2- byte characters, the number of digits is of display 2.
  • Page 725: Timestr (Date And Time Character String Conversion)

    14.15 TIMEstr (Date and Time Character String Conversion) 14.15 TIMEstr (Date and Time Character String Conversion) ■ Ladder diagram ■ List of operands Operand Description Starting address of the device that stores date and time information (7 words) Starting address of the device that stores conversion patterns (hex data, 1 word) Starting address of the device that stores the string data as the conversion result ■...
  • Page 726 14.15 TIMEstr (Date and Time Character String Conversion) Example) A setting of February 31 is not treated as an error. When SD50 is specified, the combination of year, month, day, or day of the week is correct. ● Always store the data in the order mentioned in the table below regardless of the conversion pattern of [S2].
  • Page 727 14.15 TIMEstr (Date and Time Character String Conversion) ■ [S2]: Specification of conversion pattern The conversion pattern is specified by 4-digit hex data. (First digit) (Second digit) (Third digit) (Fourth digit) Items Description Specify the output pattern for the string after conversion. Refer to the table below for ways to display the month and day of the week.
  • Page 728 14.15 TIMEstr (Date and Time Character String Conversion) (Note 3) When specifying 5 or 6 for the first digit, which is the delimiter, the specification of the addition of the day of the week is processed as "0" (No). (Note 4) When specifying 2 for the third digit, which is for the specification of date and time, the specification of addition of the day of the week is processed as "0"...
  • Page 729 14.15 TIMEstr (Date and Time Character String Conversion) Conversion Output image Output content pattern mmddyyyy_hhmmss 09052014_050632 (Note 3) H7016 hhmmss 050632 (Note 4) H5216 ddmmyyyy_hhmmss 05092014_050632 (Note 5) H4014 (Note 1) When specifying 5 or 6 for the first digit, which is the delimiter, output pattern 5 is automatically corrected to pattern 4 for processing.
  • Page 730 14.15 TIMEstr (Date and Time Character String Conversion) Example 2) [S1]...DT100 [S2]...DT0 [D]...DT150 ・Output example Wed̺ 08-06-2020̺ 23:20:05 DT100 U 20 DT150 U 23 No. of bytes Year DT101 DT151 H 65 (e) H 57(W) Month DT102 DT152 H 20 (̺ ) H 64 (d) DT103 U 23...
  • Page 731: Scmp (String Compare)

    14.16 SCMP (String Compare) 14.16 SCMP (String Compare) ■ Ladder diagram ■ List of operands Operand Description Character string 1 for comparison Example 1 Character string 2 for comparison ■ Available devices (●: Available) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan...
  • Page 732 14.16 SCMP (String Compare) ■ Processing Example) Comparing strings "ABCD" and "ABCDE", which are stored in the data register [S1]...DT0 [S2]...DT10 SRA...OFF SRB...OFF SRC...ON Character count ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the string range specified by [S1] or [S2] is out of the accessible range.
  • Page 733: Sadd (String Addition)

    14.17 SADD (String Addition) 14.17 SADD (String Addition) ■ Ladder diagram ■ List of operands Operand Description Starting device address of String 1 to be connected Starting device address of String 2 to be connected Starting device address to store the connected string ■...
  • Page 734 14.17 SADD (String Addition) ■ Precautions for programming ● The character data of the [D] area from before performing the operation is overwritten. ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the string range specified by [S1] or [S2] is out of the accessible range.
  • Page 735: Len (Obtainment Of String Length)

    14.18 LEN (Obtainment of String Length) 14.18 LEN (Obtainment of String Length) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the string Starting device address to store the string length ■ Available devices (●: Available) Real 32-Bit 16-Bit device:...
  • Page 736 14.18 LEN (Obtainment of String Length) Name Description To be set when the string range specified by [S] is out of the accessible range. 14-86 WUME-FP7CPUPGR-12...
  • Page 737: Length (Search String Length (Terminating Null))

    14.19 LENGTH (Search String Length (Terminating NULL)) 14.19 LENGTH (Search String Length (Terminating NULL)) ■ Instruction format ■ List of operands Operand Description The starting address of the string to be searched is specified. The starting device address for storing the maximum searched string length or a constant is specified.
  • Page 738 14.19 LENGTH (Search String Length (Terminating NULL)) ■ Example of processing [S1] … DT0, [S2] … U10, [D] … DT100 Example 1) With NULL  Example 2) Without NULL [S1] device content Processing result [S1] device content Processing result "0123456789" String length … 10 "0123456"...
  • Page 739: Ssrc (String Search)

    14.20 SSRC (String Search) 14.20 SSRC (String Search) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the string data to be searched for Starting device address of the string to be searched Starting device address to store the search result ■...
  • Page 740 14.20 SSRC (String Search) Area in which the string to be searched for is (b) String table that is searched stored (1) Character count (2) Number of matching strings (3) Relative position of matching string (Note 1) Using the low byte of DT11 at the beginning of the string table as a reference, the relative position of the low byte of DT13 is calculated as a value 5, based on where it matches with string "EFG".
  • Page 741 14.20 SSRC (String Search) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the number of characters [S1] is larger than [S2]. (ER) To be set when the string range specified by [S1] or [S2] is out of the accessible range. WUME-FP7CPUPGR-12 14-91...
  • Page 742: Right (Takeout Of The Right Side Of A String)

    14.21 RIGHT (Takeout of the Right Side of a String) 14.21 RIGHT (Takeout of the Right Side of a String) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source data Number of characters to be taken out (available data range: 1 to 4096) Starting device address to store the result that is taken out ■...
  • Page 743 14.21 RIGHT (Takeout of the Right Side of a String) ■ Processing Example 1) Taking out the last five characters from the DT0 string to transfer them to DT20 [S1]...DT0 [S2]...U5 [D]...DT20 Characters to search String table that is searched 8 (No.
  • Page 744: Left (Takeout Of The Left Side Of A String)

    14.22 LEFT (Takeout of the Left Side of a String) 14.22 LEFT (Takeout of the Left Side of a String) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source data Number of characters to be taken out (available data range: 1 to 4096) Starting device address to store the result that is taken out ■...
  • Page 745 14.22 LEFT (Takeout of the Left Side of a String) ■ Processing Example 1) Taking out the first five characters from the DT0 string to transfer them to DT20 [S2]...U5 [S1]...DT0 [D]...DT20 Characters to search String table that is searched DT20 5 (No.
  • Page 746: Midr (Data Read From A Given Position In The String)

    14.23 MIDR (Data Read from a Given Position in the String) 14.23 MIDR (Data Read from a Given Position in the String) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source data Starting position (available data range: 0 to 4095) Number of characters to be taken out (available data range: 1 to 4096) Starting device address to store the result that is taken out ■...
  • Page 747 14.23 MIDR (Data Read from a Given Position in the String) ■ Processing Example 1) Taking out three characters from the first byte (second character) of the DT0 string to transfer them to DT20 [D]...DT20 [S2]...U1 [S3]...U3 [S1]...DT0 Characters to search String table that is searched DT20 3 (No.
  • Page 748: Midw (Rewrite From A Given Position In The String)

    14.24 MIDW (Rewrite from a Given Position in the String) 14.24 MIDW (Rewrite from a Given Position in the String) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source data Number of characters (available data range: 1 to 4096) Destination starting device address Starting position of the destination string (available data range: 0 to 4095) ■...
  • Page 749 14.24 MIDW (Rewrite from a Given Position in the String) ■ Processing Example 1) Taking out three characters from the DT0 string to transfer them to the first byte (second character) of the DT20 string [S1]...DT0 [S2]...U3 [D]...DT20 [n]...U1 Character string 8 (No.
  • Page 750 14.24 MIDW (Rewrite from a Given Position in the String) ■ Precautions for programming ● The character data of the [D] area from before performing the operation is overwritten. ● If the number of characters in [S2] is greater than the number of characters in the [S1] character string, the number of characters of the [S1] character string is sent.
  • Page 751: Srep (Replacement Of A String)

    14.25 SREP (Replacement of a String) 14.25 SREP (Replacement of a String) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source string Starting device address of the destination string Replacement start position of the destination string (available data range: 0 to 4095) Number of characters to be replaced (available data range: 1 to 4096) ■...
  • Page 752 14.25 SREP (Replacement of a String) ■ Processing Example 1) Replacing the DT0 string with three characters from the 1st byte (2nd character) of DT20 [S1]...DT0 [D]...DT20 [p]...U1 [n]...U3 Character string 5 (No. of characters) "B" "A" "D" "C" "E" Transfer destination after execution DT20 10 (No.
  • Page 753 14.25 SREP (Replacement of a String) ■ Precautions for programming ● Character data of the [D] area from before performing the operation is not cleared. (It is overwritten.) ● If the number of characters [n] is larger than the number of characters in the string of [S1] as from the position specified by [p], then the replacement is performed for the number of characters of the string [S1] as from the position specified by [p].
  • Page 754: Esset (Conversion: Character Constant → Ascii Code: With Storage Area Size)

    14.26 ESSET (Conversion: Character Constant → ASCII Code: With Storage Area Size) 14.26 ESSET (Conversion: Character Constant → ASCII Code: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Storage area size (available range: U1 to U65534) Character constant to be converted (available range: 0 to 256 characters) Destination starting device address ■...
  • Page 755 14.26 ESSET (Conversion: Character Constant → ASCII Code: With Storage Area Size) (Note 1) The data (*) out of the destination range, the high byte of DT7, does not change. Storage area size Character count Example 2) Setting 256 characters to DT0, repeating a set of the 16 characters from A to P [S1]...U256 [S2]...
  • Page 756 14.26 ESSET (Conversion: Character Constant → ASCII Code: With Storage Area Size) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when securing a storage area large enough to store the area starting with D causes the size to be out of the accessible range.
  • Page 757: Eprint (Text Creation: With Storage Area Size)

    14.27 EPRINT (Text Creation: With Storage Area Size) 14.27 EPRINT (Text Creation: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting address of the device storing the string data which indicates the create text form or a character constant Starting address of the device storing the data to be output in text format Starting address of the device storing the text...
  • Page 758 14.27 EPRINT (Text Creation: With Storage Area Size) Example of the create text form This example includes a tab code, a body (a conversion form for 1 datum is inserted), and a linefeed code. “¥t Floor A is %d degrees C.¥n Line feed code Conversion form Text...
  • Page 759 14.27 EPRINT (Text Creation: With Storage Area Size) ■ Setting example Example 1) When inserting into the text two conversion forms (%d) that represent 16-bit signed integers and a linefeed code (\n) In the place of the conversion form (%d), the ASCII code that is equivalent to the integer data specified by [S2] is inserted.
  • Page 760 14.27 EPRINT (Text Creation: With Storage Area Size) (Note 1) The start area (storage area size) for [D] is set before executing this instruction. (Note 2) The data out of the destination range does not change. Example 2) When inserting into the text a conversion form (%d) that represents a 16- bit signed integer In the place of the conversion form (%d), the ASCII code that is equivalent to the integer data specified by [S2] is inserted.
  • Page 761 14.27 EPRINT (Text Creation: With Storage Area Size) - Image of mail text Normal operation - Setting values S1=“¥tNormal operation" S2=DT1 D=DT50 (*3) U 18 DT50 Storage area size (*1) (*3) U 17 No. of bytes DT51 (*3) DT52 H 4e (N) H 09 (HT) DT53 H 72 (r)
  • Page 762 14.27 EPRINT (Text Creation: With Storage Area Size) Example 5) When inserting into the text two conversion forms (%s) that represent strings In the place of the conversion form (%s), the ASCII code that is equivalent to the string data specified by [S2] is inserted.
  • Page 763 14.27 EPRINT (Text Creation: With Storage Area Size) - Image of mail text Category: A-1-a - Setting values S1="Category: %s-%d-%s" S2=DT1 D=DT50 Storage area size (*1) DT50 U 16 U 15 No. of bytes DT51 H 41 (A) H 61 (a) H 43 (C) DT52 H0001...
  • Page 764 14.27 EPRINT (Text Creation: With Storage Area Size) ■ Flag operations Name Description To be set in case of out-of-range values in indirect access (index modification). Set when a value outside the range is specified for the parameter. To be set when the text creation form exceeds 4096 characters. To be set when texts exceed 4096 bytes.
  • Page 765: Etimestr (Date And Time Character String Conversion: With Storage Area Size)

    14.28 ETIMEstr (Date and Time Character String Conversion: With Storage Area Size) 14.28 ETIMEstr (Date and Time Character String Conversion: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting address of the device that stores date and time information (7 words) Starting address of the device that stores conversion patterns (hex data, 1 word) Starting address of the device that stores the string data as the conversion result ■...
  • Page 766 14.28 ETIMEstr (Date and Time Character String Conversion: With Storage Area Size) ● Checking the combination of year, month, day, or day of the week is not performed. Example) A setting of February 31 is not treated as an error. When SD50 is specified, the combination of year, month, day, or day of the week is correct.
  • Page 767 14.28 ETIMEstr (Date and Time Character String Conversion: With Storage Area Size) Output image ... Wed␣08-06-2020␣23:20:05 [S1]...DT100 [S2]...DT0 [D]...DT150 ・Output example Wed̺ 08-06-2020̺ 23:20:05 U 20 DT100 Year DT150 U 24 Storage area size (*1) DT101 Month DT151 U 23 Number of bytes DT102 DT152...
  • Page 768 14.28 ETIMEstr (Date and Time Character String Conversion: With Storage Area Size) Name Description To be set when the parameter of [S2] is out of the setting range. Set when the [S1] to [S1+6] range exceeds the accessible range. To be set when the destination range is outside the accessible range. To be set when created character strings are larger than the storage area size for [D].
  • Page 769: Escmp (String Compare: With Storage Area Size)

    14.29 ESCMP (String Compare: With Storage Area Size) 14.29 ESCMP (String Compare: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description String 1 to be compared (available range: 0 to 65534; for character constant: 0 to 256 characters) String 2 to be compared (available range: 0 to 65534;...
  • Page 770 14.29 ESCMP (String Compare: With Storage Area Size) ● If "NULL" is included in the comparison, it is processed as follows. [S1] [S2] NULL NULL NULL < "ABCDE" "B" > NULL ■ Processing Example 1) Comparing strings "ABCD" and "ABCDE", which are stored in the data register [S1]...DT0 [S2]...DT10 SRA...OFF SRB...OFF SRC...ON Example 2) Comparing the string "ABCD"...
  • Page 771 14.29 ESCMP (String Compare: With Storage Area Size) Example 4) Comparing the NULL character and the empty string that are stored in the data register [S1]...DT0 [S2]...DT10 SRA...ON SRB...OFF SRC...OFF Storage area size Character count ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification).
  • Page 772: Esadd (String Addition: With Storage Area Size)

    14.30 ESADD (String Addition: With Storage Area Size) 14.30 ESADD (String Addition: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting device address of String 1 to be connected (available range: 0 to 65534; for character constant: 0 to 256 characters) Starting device address of String 2 to be connected (available range: 0 to 65534;...
  • Page 773 14.30 ESADD (String Addition: With Storage Area Size) (Note 1) The content of the data (*) DT26 does not change when it is out of the range of the destination. Storage area size Character count Example 2) When the size of the connected strings exceeds the storage area size for The strings are stored up to the range allowed by the storage area size, and carry flag SR9 (CY) is set.
  • Page 774: Elen (Obtainment Of String Length: With Storage Area Size)

    14.31 ELEN (Obtainment of String Length: With Storage Area Size) 14.31 ELEN (Obtainment of String Length: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the string (available range: 0 to 65534) Starting device address to store the string length ■...
  • Page 775 14.31 ELEN (Obtainment of String Length: With Storage Area Size) Storage area size Character count ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the string range specified by [S] is out of the accessible range. To be set when the number of characters is larger than the storage area size for [S].
  • Page 776: Essrc (String Search: With Storage Area Size)

    14.32 ESSRC (String Search: With Storage Area Size) 14.32 ESSRC (String Search: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the string data to be searched for (available range: 0 to 65534; for character constant: 0 to 256 characters) Starting search position of the string to be searched for (available range: 1 to 65534) Starting device address of the string to be searched (available range: 1 to 65534;...
  • Page 777 14.32 ESSRC (String Search: With Storage Area Size) Area in which the string to be searched for is (b) String table that is searched stored (1) Storage area size (3) Number of matching strings (2) Character count (4) Relative position of matching string (Note 1) Using the low byte of DT12 at the beginning of the string table as a reference, the relative position of the low byte of DT14 is calculated as a value 5, based on where it matches with string "EFG".
  • Page 778 14.32 ESSRC (String Search: With Storage Area Size) (Note 1) Using the low byte of DT12 at the beginning of the string table as a reference, the relative position for the low byte of DT15 is calculated as a value 7, based on where it matches with string "EF" first. Example 4) When 0 is specified for the number of characters for the string data to be searched for For both the number and the relative position, 0 is stored.
  • Page 779 14.32 ESSRC (String Search: With Storage Area Size) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the number of characters [S1] is larger than [S2]. To be set when [p] is larger than the number of characters of [S2]. To be set when the string range specified by [S1] or [S2] is out of the accessible range.
  • Page 780: Eright (Takeout Of The Right Side Of A String: With Storage Area Size)

    14.33 ERIGHT (Takeout of the Right Side of a String: With Storage Area Size) 14.33 ERIGHT (Takeout of the Right Side of a String: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source data (available range: 0 to 65534; for character constant: 0 to 256 characters) Number of characters to be taken out (available range: 0 to 65534) Starting device address to store the result that is taken out...
  • Page 781 14.33 ERIGHT (Takeout of the Right Side of a String: With Storage Area Size) (Note 1) The data (*) that is out of the destination range, starting from the high byte of DT24 and ending with DT26, does not change. (a) Area in which the string to be taken out is stored (b) Area in which the string that is taken out is stored (1) Storage area size...
  • Page 782 14.33 ERIGHT (Takeout of the Right Side of a String: With Storage Area Size) (a) Area in which the string to be taken out is stored (b) Area in which the string that is taken out is stored (1) Storage area size (2) Character count ■...
  • Page 783: Eleft (Takeout Of The Left Side Of A String: With Storage Area Size)

    14.34 ELEFT (Takeout of the Left Side of a String: With Storage Area Size) 14.34 ELEFT (Takeout of the Left Side of a String: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source data (available range: 0 to 65534; for character constant: 0 to 256 characters) Number of characters to be taken out (available range: 0 to 65534) Starting device address to store the result that is taken out...
  • Page 784 14.34 ELEFT (Takeout of the Left Side of a String: With Storage Area Size) (Note 1) The data (*) that is out of the destination range, starting from the high byte of DT24 and ending with DT26, does not change. (a) Area in which the string to be taken out is stored (b) Area in which the string that is taken out is stored (1) Storage area size...
  • Page 785 14.34 ELEFT (Takeout of the Left Side of a String: With Storage Area Size) (a) Area in which the string to be taken out is stored (b) Area in which the string that is taken out is stored (1) Storage area size (2) Character count ■...
  • Page 786: Emidr (Data Read From A Given Position In The String: With Storage Area Size)

    14.35 EMIDR (Data Read from a Given Position in the String: With Storage Area Size) 14.35 EMIDR (Data Read from a Given Position in the String: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source data (available range: 0 to 65534; for character constant: 0 to 256 characters) Starting position (available range: 0 to 65533) Number of characters to be taken out (available range: 0 to 65534)
  • Page 787 14.35 EMIDR (Data Read from a Given Position in the String: With Storage Area Size) ■ Processing Example 1) Taking out the three characters "BCD" from the 1st byte (2nd character) of the string "ABCDE123" to store them as string data with storage area in DT20 and later [S1]...DT0 [S2]...U1 [S3]...U3 [D]...DT20 (Note 1)
  • Page 788 14.35 EMIDR (Data Read from a Given Position in the String: With Storage Area Size) Area in which the string that is taken out is Area in which the string to be taken out is stored stored Storage area size Character count ■...
  • Page 789: Emidw (Rewrite From A Given Position In The String: With Storage Area Size)

    14.36 EMIDW (Rewrite from a Given Position in the String: With Storage Area Size) 14.36 EMIDW (Rewrite from a Given Position in the String: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source data (available range: 0 to 65534; for character constant: 0 to 256 characters) Number of characters (available range: 0 to 65534) Destination starting device address...
  • Page 790 14.36 EMIDW (Rewrite from a Given Position in the String: With Storage Area Size) (Note 1) The data (*) for DT26 that is out of the destination range does not change. Area in which the string to Destination area (before Destination area (after be taken out is stored transferring)
  • Page 791 14.36 EMIDW (Rewrite from a Given Position in the String: With Storage Area Size) Area in which the string to Destination area (before Destination area (after be taken out is stored transferring) transferring) Storage area size Character count ■ Precautions for programming ●...
  • Page 792: Esrep (Replacement Of A String: With Storage Area Size)

    14.37 ESREP (Replacement of a String: With Storage Area Size) 14.37 ESREP (Replacement of a String: With Storage Area Size) ■ Ladder diagram ■ List of operands Operand Description Starting device address of the source string (available range: 0 to 65534; for character constant: 0 to 256 characters) Starting device address of the destination string (available range: 1 to 65534) Replacement start position of the destination string (available range: 0 to 65533)
  • Page 793 14.37 ESREP (Replacement of a String: With Storage Area Size) (Note 1) The data "234", from the 2nd to the 4th character in the destination area (before transferring), is deleted, and the data "5678", from the 5th to the 8th character, is shifted. Area in which the string to Destination area (before Destination area (after...
  • Page 794 14.37 ESREP (Replacement of a String: With Storage Area Size) Area in which the string to Destination area (before Destination area (after be taken out is stored transferring) transferring) Storage area size Character count ■ Precautions for programming ● If the number of characters [n] is larger than the number of characters in the string [S1] as from the position specified by [p], then the replacement is performed for the number of characters of the string [S] as from the position specified by [p].
  • Page 795: High-Level Instructions (Communication)

    15 High-level Instructions (Communication) Applicable Models: All Models 15.1 UNITSEL (Specification of a Communication Unit Slot Port)....15-2 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction)............15-4 15.3 GPRECV (General-Purpose Communication Receive Instruction) ..15-15 15.4 SEND (MEWTOCOL Master / MODBUS Master)......15-21 15.5 RECV (MEWTOCOL Master / MODBUS Master)......15-29 15.6 SEND (MODBUS Master: Function Code Specification) ....15-37 15.7 RECV (MODBUS Master: Function Code Specification) ....15-44...
  • Page 796: Unitsel (Specification Of A Communication Unit Slot Port)

    15.1 UNITSEL (Specification of a Communication Unit Slot Port) 15.1 UNITSEL (Specification of a Communication Unit Slot Port) ■ Ladder diagram ■ List of operands Operand Description Slot number of the unit COM port number or user connection number ■ Available devices (●: Available) Real 32-Bit...
  • Page 797 15.1 UNITSEL (Specification of a Communication Unit Slot Port) ● If no error occurs, the values of [S1] and [S2] should be set to system data register (SD40, SD41) of the CPU unit. ■ Specification of [S1] and [S2] ● Specify a slot number of the unit in [S1]. The set value for [S1] should be stored in system data register SD40.
  • Page 798: Gptrns / Pgpsend /Gpsend (General-Purpose Communication Send Instruction)

    15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) ■ Ladder diagram (GPTRNS) ■ Ladder diagram (pGPSEND) ■ Ladder diagram (GPSEND) (Note 1) The above figure shows the case that S1=U0 (CPU unit with built-in SCU) and S2=U1 (port number 1) are specified by the UNITSEL instruction.
  • Page 799 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) ■ List of operands Operand Description Starting number for the device for storing the sent data Number of bytes of the sent data, or starting number of the device where the amount of sent data is stored Starting number of the device that stores the processing result (1 word) ■...
  • Page 800 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) ● The case of SCU shows the case that it is used in the following combination. • COM.0 port equipped in the CPU unit • Communication cassettes attached to the CPU unit (COM.1 to COM.2 ports) •...
  • Page 801 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) ● The figure below shows the case where the string "ABCDE" is converted with the SSET instruction. Once the SSET instruction is executed, the number of characters is set in the starting word. Then, the characters that are converted are stored in the following area.
  • Page 802 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) Status Value that is set When starting the transmission request When transmission is completed Number of transmitted bytes When an error occurs HFFFF ■ Precautions for programming ● To perform communication, setup is required in the configuration menu of the tool software. ●...
  • Page 803 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) ● The maximum volume of data that can be sent in a single instance with GPTRNS, pGPSEND, and GPSEND instructions is 16,384 bytes. ■ Sample program (in the case of SCU) ●...
  • Page 804 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) GPSEND instruction R101 R100 GPSEND execution condition X80: Clear to send flag: ON Y80: Send active flag: OFF R100 Data conversion S1: Sent data R100 S2: Sent data storage DT100: Number of sent characters SSET "ABCDE"...
  • Page 805 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) ■ I/O allocation (in the case of CPU with built-in SCU) COM Port No. Name Description General-purpose Turns ON when the unit is set to the general-purpose communication clear to communication mode. send flag Turns ON when sending with general-purpose communication General-purpose...
  • Page 806 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) ● Using the SSET instruction, convert any given message into an ASCII string. Set the number of sent characters to the data register DT100, and the sent message to the data register DT101.
  • Page 807 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) ● For the GPSEND instruction, it is necessary to turn ON the execution condition until the end of data sending, and turn OFF the execution condition at a scan in which the end of data sending is confirmed.
  • Page 808 15.2 GPTRNS / pGPSEND /GPSEND (General-Purpose Communication Send Instruction) Name Description The connection specified with UNITSEL is closed (other than "Connect"). The communication mode of the communication port specified with UNITSEL is not "General-purpose communication." When the data device specified by [S] exceeds the area When the number of sent data specified by [n] is 0.
  • Page 809: Gprecv (General-Purpose Communication Receive Instruction)

    15.3 GPRECV (General-Purpose Communication Receive Instruction) 15.3 GPRECV (General-Purpose Communication Receive Instruction) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U0 (CPU unit with built-in SCU) and S2=U1 (port number 1) are specified by the UNITSEL instruction. ■...
  • Page 810 15.3 GPRECV (General-Purpose Communication Receive Instruction) ● In the case of SCU, data received from the partner are stored in 8 receive buffers for each COM port. By executing the GPRECV instruction, data in the receive buffer can be copied to a given operation memory.
  • Page 811 15.3 GPRECV (General-Purpose Communication Receive Instruction) ■ Sample program (in the case of SCU) ● When the received flag (X0) turns ON, the reception program is started up by the GPRECV instruction. ● Using the UNITSEL instruction, specify the slot number (U0) and the COM. port number (U1).
  • Page 812 15.3 GPRECV (General-Purpose Communication Receive Instruction) ■ I/O allocation (in the case of CPU with built-in SCU) COM Port No. Name Description General-purpose Turns ON when the receiving process is completed in communication received the general-purpose communication mode. flag Turns ON when the GPRECV instruction is executed General-purpose and the received data have been copied into the communication received...
  • Page 813 15.3 GPRECV (General-Purpose Communication Receive Instruction) ● In the case of a direct address and an index modification address, specify the same device for D1 and D2. At the same time, specify the addresses so that D1 is less than D2. ■...
  • Page 814 15.3 GPRECV (General-Purpose Communication Receive Instruction) ● Depending on the communication format of an external device, if a header and a terminator are contained, they are stored in the operation memory as part of receive data. When necessary, insert a program to extract data content. ●...
  • Page 815: Send (Mewtocol Master / Modbus Master)

    15.4 SEND (MEWTOCOL Master / MODBUS Master) 15.4 SEND (MEWTOCOL Master / MODBUS Master) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U0 (CPU unit with built-in SCU) and S2=U1 (port number 1) are specified by the UNITSEL instruction. ■...
  • Page 816 15.4 SEND (MEWTOCOL Master / MODBUS Master) (Note 1) When the destination unit is FP7, only global devices can be specified. (Local devices cannot be specified.) (Note 2) In the MODBUS mode, this cannot be specified as the receiver. ■ Available bit devices (●: Available) Specification of bit of Bit device...
  • Page 817 15.4 SEND (MEWTOCOL Master / MODBUS Master) Transfer Communication Amount of sent Note method Mode data n During MEWTOCOL-DAT, contact information write MEWTOCOL-DAT Fixed at 1 bit 52H is used. MODBUS 1 to 2040 Use the force multiple coils command 15. (Note 1) The transfer method varies according to the device type specified for operands [S] and [D2].
  • Page 818 15.4 SEND (MEWTOCOL Master / MODBUS Master) (Note 1) It occurs when an abnormal telegram is received. When there is a format error in the header of an individual protocol, the communication discards the received data and a response reception timeout occurs.
  • Page 819 15.4 SEND (MEWTOCOL Master / MODBUS Master) ● The case of SCU shows the case that it is used in the following combination. • COM.0 port equipped in the CPU unit • Communication cassettes attached to the CPU unit (COM.1 to COM.2 ports) •...
  • Page 820 15.4 SEND (MEWTOCOL Master / MODBUS Master) ● Another SEND/RECV instruction cannot be executed for a communication port where master communication is in progress. Confirm that the "master communication sending flags" (YC to YF) are OFF, and execute the instruction. ●...
  • Page 821 15.4 SEND (MEWTOCOL Master / MODBUS Master) ■ Time chart (in the case of CPU with built-in ET-LAN) SEND instruction executable Master communication conditions clear to send flag Clear to send flag (X90 - X9F): ON Check that (X90 - X9F) Sending flag (Y90 - Y9F): OFF the flag is ON Check that the...
  • Page 822 15.4 SEND (MEWTOCOL Master / MODBUS Master) ● As the communication cassette (Ethernet type) has an Ethernet-serial conversion function, the internal interface operates with similar programs as the case of the CPU with built-in SCU. The setting method and programming method are different from those for the CPU with built-in ET- LAN.
  • Page 823: Recv (Mewtocol Master / Modbus Master)

    15.5 RECV (MEWTOCOL Master / MODBUS Master) 15.5 RECV (MEWTOCOL Master / MODBUS Master) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U0 (CPU unit with built-in SCU) and S2=U1 (port number 1) are specified by the UNITSEL instruction. ■...
  • Page 824 15.5 RECV (MEWTOCOL Master / MODBUS Master) ■ Available bit devices (●: Available) Specification of bit of Bit device Index word device Operand modifier DT.n LD.n (Not (Note 1) (Note 3) (Note 3) ● ● ● ● e 2) ● ●...
  • Page 825 15.5 RECV (MEWTOCOL Master / MODBUS Master) Transfer method Communication Mode Address range MEWTOCOL-DAT 0 to 65535F MODBUS 0 to 65535 (H FFFF) MEWTOCOL-COM 0 to 999F Bit transfer MEWTOCOL-DAT 0 to 65535 (H FFFF) MODBUS 0 to 65535 (H FFFF) (Note 1) When the receiver is the file register FL, specify a constant.
  • Page 826 15.5 RECV (MEWTOCOL Master / MODBUS Master) (Note 1) It occurs when an abnormal telegram is received. When there is a format error in the header of an individual protocol, the communication discards the received data and a response reception timeout occurs.
  • Page 827 15.5 RECV (MEWTOCOL Master / MODBUS Master) ● The case of SCU shows the case that it is used in the following combination. • COM.0 port equipped in the CPU unit • Communication cassettes attached to the CPU unit (COM.1 to COM.2 ports) •...
  • Page 828 15.5 RECV (MEWTOCOL Master / MODBUS Master) ● Another SEND/RECV instruction cannot be executed for a communication port where master communication is in progress. Confirm that the "master communication sending flags" (YC to YF) are OFF, and execute the instruction. ●...
  • Page 829 15.5 RECV (MEWTOCOL Master / MODBUS Master) ■ Time chart (in the case of CPU with built-in ET-LAN) RECV instruction executable Master communication conditions clear to send flag Clear to send flag (X90 - X9F): ON Check that the (X90 - X9F) Sending flag (Y90 - Y9F): OFF flag is ON Check that the...
  • Page 830 15.5 RECV (MEWTOCOL Master / MODBUS Master) ● As the communication cassette (Ethernet type) has an Ethernet-serial conversion function, the internal interface operates with similar programs as the case of the CPU with built-in SCU. The setting method and programming method are different from those for the CPU with built-in ET- LAN.
  • Page 831: Send (Modbus Master: Function Code Specification)

    15.6 SEND (MODBUS Master: Function Code Specification) 15.6 SEND (MODBUS Master: Function Code Specification) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U0 (CPU unit with built-in SCU) and S2=U1 (port number 1) are specified by the UNITSEL instruction. ■...
  • Page 832 15.6 SEND (MODBUS Master: Function Code Specification) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan modifie U " " ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● (Note 1) When the destination unit is FP7, only global devices can be specified. (Local devices cannot be specified.) ■...
  • Page 833 15.6 SEND (MODBUS Master: Function Code Specification) Types of device to be Transfer Number of sent Value that can be specified for high bytes specified for [S] method data [n] of [D1] H6: Preset single register (06) HF: Force multiple coils (15) 16-Bit device: Register H10: Preset multiple registers (16)
  • Page 834 15.6 SEND (MODBUS Master: Function Code Specification) ● Using the UNITSEL instruction, specify the slot number (U0) and the COM. port number (U1). ● In the SEND instruction, specify and execute PLC's starting address (DT100) and data amount (U2), MODBUS function code to be used (16: H10), and partner station number (H01) and starting address (H0).
  • Page 835 15.6 SEND (MODBUS Master: Function Code Specification) ● The case of SCU shows the case that it is used in the following combination. • COM.0 port equipped in the CPU unit • Communication cassettes attached to the CPU unit (COM.1 to COM.2 ports) •...
  • Page 836 15.6 SEND (MODBUS Master: Function Code Specification) ● A SEND/RECV instruction cannot be executed for a port where slave communication is in progress. ● If there is no response, the "master communication sending flags" (YC to YF) remain ON during the time-out period set in the CPU configuration. ●...
  • Page 837 15.6 SEND (MODBUS Master: Function Code Specification) ■ I/O allocations I/O number Name Description Master communication Turns ON when a connection is established in the master X90 to X9F clear to send flag communication. Turns ON during sending data based on the SEND/RECV instruction.
  • Page 838: Recv (Modbus Master: Function Code Specification)

    15.7 RECV (MODBUS Master: Function Code Specification) 15.7 RECV (MODBUS Master: Function Code Specification) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U0 (CPU unit with built-in SCU) and S2=U1 (port number 1) are specified by the UNITSEL instruction. ■...
  • Page 839 15.7 RECV (MODBUS Master: Function Code Specification) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan modifie U " " ● ● ● ● ● ● ● ● ● ● ● ● ● ● (Note 1) Only in the case of "direct address specification" (main instruction) in the MODBUS mode, an integer can be specified for the sender address.
  • Page 840 15.7 RECV (MODBUS Master: Function Code Specification) Device to be specified for Transfer Value that can be specified for high bytes of [S1] [D1] method H1: Read coil state (01) 16-Bit device: H2: Read input state (02) Register transfer WX, WY, WR, WL, DT, LD H3: Read hold register (03) H4: Read input register (04) 1-Bit device:...
  • Page 841 15.7 RECV (MODBUS Master: Function Code Specification) R100 RECV execution start conditions Clear to send flag: ON ( ( ) ) Sending flag: OFF Master Master RECV communication communication execution Settings for the communication R100 clear to send flag sending flag port S1: Slot 0 (U0) UNITSEL...
  • Page 842 15.7 RECV (MODBUS Master: Function Code Specification) ■ I/O allocation (in the case of CPU with built-in SCU) COM Port No. Name Description Master Turns ON when MEWTOCOL-COM, MEWTOCOL7, or MODBUS- communication RTU is set for the communication mode, and the unit is in the clear to send flag RUN mode.
  • Page 843 15.7 RECV (MODBUS Master: Function Code Specification) ● After it is confirmed that connection 1 is established in master mode (X90) and no transmissions are currently being executed for the same port (Y90), the RECV instruction is started. ● The UNITSEL instruction is used to specify a slot number (LAN port: U100) and the connection number (U1).
  • Page 844 15.7 RECV (MODBUS Master: Function Code Specification) I/O number Name Description Reports completion result of sending data in genera-purpose communication or master communication. Y70 to Y7F Sent flag (Normal completion: 0, Abnormal completion: 1) (Note 1) Each contact is used for reading the operation state. Do not write over it with a user program. ■...
  • Page 845: Pmset / Ppmset (Change Of Scu Parameters)

    15.8 PMSET / pPMSET (Change of SCU Parameters) 15.8 PMSET / pPMSET (Change of SCU Parameters) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U0 (CPU unit with built-in SCU) and S2=U1 (port number 1) are specified by the UNITSEL instruction. ■...
  • Page 846 15.8 PMSET / pPMSET (Change of SCU Parameters) ■ Precautions for programming ● Describe UNITSEL instruction immediately before the PMSET/pPMSET instruction, and specify the slot and COM port numbers of the unit the parameters of which are changed. ● Checking of the processing result should be carried out when bit 15 (process in-progress flag) of the area specified by [D] is switched from 1 to 0.
  • Page 847 15.8 PMSET / pPMSET (Change of SCU Parameters) Operand Parameter Range Settings PLC link: U1 to U16 (Default: 0) U0: 300, U1: 600, U2: 1200, U3: 2400, U4: 4800, U5: [S+2] Baud rate setting U0 to U10 9600, U6: 19200, U7: 38400, U8: 57600, U9: 115200, U10: 230400 bps [S+3] Data length setting...
  • Page 848 15.8 PMSET / pPMSET (Change of SCU Parameters) Operand Parameter Range Settings Specify the range of link registers used for [S+17] Range of link registers U0 to U128 communication (relative values within the specified block) Link relay sending start number (specification by Link relay transmission [S+18] U0 to U63...
  • Page 849 15.8 PMSET / pPMSET (Change of SCU Parameters) Communication mode Unit no. setting Baud rate setting Data length setting Parity setting Stop bit length setting RS/CS valid or invalid Send waiting time Header STX Terminator setting Terminator judgment time DT10 Modem initialization DT11 Higher byte Lower byte...
  • Page 850 15.8 PMSET / pPMSET (Change of SCU Parameters) ● For the PMSET instruction, it is necessary to turn ON the execution condition of the PMSET instruction until the end of processing, and turn OFF the execution condition at a scan in which the end of data transmission is confirmed.
  • Page 851 15.8 PMSET / pPMSET (Change of SCU Parameters) Name Description To be set when the device specified for [S] to set the parameters is invalid. To be set when the number of words specified by [n] is out of the available range. To be set when the device specified for [D] to store the processing result is invalid.
  • Page 852: Pmget (Acquiring Scu Parameters)

    15.9 PMGET (Acquiring SCU Parameters) 15.9 PMGET (Acquiring SCU Parameters) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U0 (CPU unit with built-in SCU) and S2=U1 (port number 1) are specified by the UNITSEL instruction. ■ List of operands Operand Description...
  • Page 853 15.9 PMGET (Acquiring SCU Parameters) [S] value Type of acquired data Number of stored data Communication parameter 26 word Communication monitoring area information 7 word PLC link status flag information 8 word PLC link error frequency information 9 word PLC link time interval information 8 word PLC link settings parameter monitoring information 192 word...
  • Page 854 15.9 PMGET (Acquiring SCU Parameters) Storage Items Range: Description location PLC link W0 maximum [D+15] U2 to U16 Values out of the range are handled as "16". station number Specify the range of link relays used for communication [D+16] Range of link relays U0 to U64 (specification by number of words, relative values within the specified block)
  • Page 855 15.9 PMGET (Acquiring SCU Parameters) Storage Items Range: Description location Bit 15 to 10: 0 (fixed) Number of U0 to [D+3] occurrences of The number of times reception errors were detected is stored. U65535 reception error The bits corresponding to when an error occurs turn ON. (0: Normal, 1: Error) Bit 0: Mode setting/change abnormality (A mode number that cannot be set or changed is specified)
  • Page 856 15.9 PMGET (Acquiring SCU Parameters) Storage locatio Items Range: Description Bit 6: Transmission error (0 = Normal, 1 = Error) Bit 7: Procedural error (0 = Normal, 1 = Error) Bit 15 to 8: Not used Bit 0: Link 0 (0 = Normal, 1 = Error) H0000 to [D+3] Transmission error flag...
  • Page 857 15.9 PMGET (Acquiring SCU Parameters) ■ Acquired data (PLC link time interval information): When [S] = 4 Storage locatio Items Range: Description RING counter for the U0 to The number of receptions is stored. When the value exceeds number of receptions U65535 65535, it returns to 0.
  • Page 858 15.9 PMGET (Acquiring SCU Parameters) (Note 1) The storage destinations shown above are for station number 1. 12 words are assigned to each station and are stored in a 192-word area in order starting from the information for station number 1. In addition, they occupy the 192-word area.
  • Page 859: Config (Change Configuration)

    15.10 CONFIG (Change Configuration) 15.10 CONFIG (Change Configuration) ■ Ladder diagram ■ List of operands Operand Description Specify the character constant or the starting address of the device storing the string data that indicates the configuration type. Specify the character constant or the starting address of the device storing the string data that indicates the contents of change of the configuration.
  • Page 860 15.10 CONFIG (Change Configuration) ■ Flag operations Settings FL=DTx Assign FL0 to the address DTx. MEWTOCOL FL=LDx Assign FL0 to the address LDx. ENABLE The TCP-NODELAY option is enabled. TCP-NODELAY DISABLE The TCP-NODELAY option is disabled. ■ Precautions for programming ●...
  • Page 861: High-Level Instructions (Multi-Wire Link Communication)

    16 High-level instructions (Multi- wire Link Communication) 16.1 SEND (When FP7 Multi-wire Link Unit Is Used) .......16-2 16.2 RECV (When FP7 Multi-wire Link Unit Is Used) .......16-6 16.3 PMGET (Acquiring MEWNET-W Parameters)........16-10 16.4 PMGET (Acquiring MEWNET-W2 Parameters)........16-14 16.5 PMGET (Acquiring MEWNET-F Parameters) ........16-18 16.6 PMSET / pPMSET (Change of MEWNET-W Parameters) ....16-20 16.7 PMSET / pPMSET (Change of MEWNET-W2 Parameters) .....16-23 16.8 ERR (When FP7 Multi-wire Link Unit Is Used) .........16-27...
  • Page 862: Send (When Fp7 Multi-Wire Link Unit Is Used)

    16.1 SEND (When FP7 Multi-wire Link Unit Is Used) 16.1 SEND (When FP7 Multi-wire Link Unit Is Used) ■ Ladder diagram (Note 1) The above figure shows the case that the FP7 multi-wire link unit for S1=U1 (slot number 1) is specified by the UNITSEL instruction.
  • Page 863 16.1 SEND (When FP7 Multi-wire Link Unit Is Used) ■ Available bit devices (●: Available) Specification of bit of Bit device Index word device Operand modifier DT.n LD.n ● ● ● ● ● ● ● (Note 1) ● ● ● ●...
  • Page 864 16.1 SEND (When FP7 Multi-wire Link Unit Is Used) Transfer method Communication Mode Address range W2 mode W mode Bit transfer 0 to 65535F W2 mode (Note 1) When the receiver is the file register FL, specify a constant. Example) For FL100, specify U100. For the file register, only bank 0 can be specified.
  • Page 865 16.1 SEND (When FP7 Multi-wire Link Unit Is Used) ● For FP7 multi-wire link unit, only one of those instructions can be executed for one unit at a time. ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification). To be set when the source range is outside the accessible range.
  • Page 866: Recv (When Fp7 Multi-Wire Link Unit Is Used)

    16.2 RECV (When FP7 Multi-wire Link Unit Is Used) 16.2 RECV (When FP7 Multi-wire Link Unit Is Used) ■ Ladder diagram (Note 1) The above figure shows the case that the FP7 multi-wire link unit for S1=U1 (slot number 1) is specified by the UNITSEL instruction.
  • Page 867 16.2 RECV (When FP7 Multi-wire Link Unit Is Used) ■ Available bit devices (●: Available) Specification of bit of Bit device Index word device Operand modifier DT.n LD.n (Note 1) ● ● ● ● ● ● ● ● ● ● ●...
  • Page 868 16.2 RECV (When FP7 Multi-wire Link Unit Is Used) ■ Setting the amount of received data [n] Transfer method Communication Mode Amount of sent data n W mode 1 to 56 words Register transfer W2 mode 1 to 1020 words W mode Bit transfer Fixed at 1 bit...
  • Page 869 16.2 RECV (When FP7 Multi-wire Link Unit Is Used) ● Up to 16 send instructions can be performed to different COM ports and connections simultaneously. (The total of simultaneous usage of SEND, RECV, pPSEND, GPTRNS, and pPMSET instructions) ● For FP7 multi-wire link unit, only one of those instructions can be executed for one unit at a time.
  • Page 870: Pmget (Acquiring Mewnet-W Parameters)

    16.3 PMGET (Acquiring MEWNET-W Parameters) 16.3 PMGET (Acquiring MEWNET-W Parameters) ■ Ladder diagram (Note 1) The above figure shows the case that the FP7 multi-wire link unit for S1=U1 (slot number 1) is specified by the UNITSEL instruction. ■ List of operands Operand Description Type of acquired data...
  • Page 871 16.3 PMGET (Acquiring MEWNET-W Parameters) Number of stored [S] value Type of acquired data Storage location data PLC link communication state 3 word [D] to [D+2] Network participation state 3 word [D] to [D+2] W link communication error information 15 word [D] to [D+14] PLC link refresh operation monitoring [D] to [D+7]...
  • Page 872 16.3 PMGET (Acquiring MEWNET-W Parameters) Storag Items Range: Description locatio Number of occurrences of synchronous [D+3] abnormality Number of occurrences of transmission [D+4] answer NACK Number of occurrences of three [D+5] consecutive transmission answers NACK Number of occurrences of transmission [D+6] answer WACK Number of occurrences of three...
  • Page 873 16.3 PMGET (Acquiring MEWNET-W Parameters) Storage locatio Items Range: Description Minimum send interval [D+6] (x 1 ms) Maximum send interval [D+7] (x 1 ms) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification, pointer access). To be set when the destination range is outside the accessible range.
  • Page 874: Pmget (Acquiring Mewnet-W2 Parameters)

    16.4 PMGET (Acquiring MEWNET-W2 Parameters) 16.4 PMGET (Acquiring MEWNET-W2 Parameters) ■ Ladder diagram (Note 1) The above figure shows the case that the FP7 multi-wire link unit for S1=U1 (slot number 1) is specified by the UNITSEL instruction. ■ List of operands Operand Description Type of acquired data...
  • Page 875 16.4 PMGET (Acquiring MEWNET-W2 Parameters) Number of stored [S] value Type of acquired data Storage location data PLC link communication state 6 word [D] to [D+5] Network participation state 5 word [D] to [D+4] W2 link error system counter type error area 18 word [D] to [D+17] W2 link error system error register area 10 word...
  • Page 876 16.4 PMGET (Acquiring MEWNET-W2 Parameters) ■ Acquired data (W2 link error system counter type error area): When [S] = 2 Storag Items Range: Description locatio Number of lost tokens [D+1] Number of duplicate tokens Number of occurrences of non-signal [D+2] state Number of occurrences of synchronous [D+3]...
  • Page 877 16.4 PMGET (Acquiring MEWNET-W2 Parameters) ■ Acquired data (W2 link error system error register area): When [S] = 3 Storage locatio Items Description Bit no. 15 Error counter U0-U255 State of error currently occurs Error code When the same error occurs, the error counter of high byte will be updated.
  • Page 878: Pmget (Acquiring Mewnet-F Parameters)

    16.5 PMGET (Acquiring MEWNET-F Parameters) 16.5 PMGET (Acquiring MEWNET-F Parameters) ■ Ladder diagram (Note 1) The above figure shows the case that the FP7 multi-wire link unit for S1=U1 (slot number 1) is specified by the UNITSEL instruction. ■ List of operands Operand Description Type of acquired data...
  • Page 879 16.5 PMGET (Acquiring MEWNET-F Parameters) Number of stored [S] value Type of acquired data Storage location data Number of F link services 1 word F link operation state monitor 10 word [D] to [D+9] ■ Acquired data (number of F link services): When [S] = 0 Storage Items Range:...
  • Page 880: Pmset / Ppmset (Change Of Mewnet-W Parameters)

    16.6 PMSET / pPMSET (Change of MEWNET-W Parameters) 16.6 PMSET / pPMSET (Change of MEWNET-W Parameters) ■ Ladder diagram (Note 1) The above figure shows the case that the FP7 multi-wire link unit for S1=U1 (slot number 1) is specified by the UNITSEL instruction. ■...
  • Page 881 16.6 PMSET / pPMSET (Change of MEWNET-W Parameters) ■ Precautions for programming ● The station number of the FP7 multi-wire link unit can be set by the PMSET/pPMSET instruction only when the station number selector on the unit is set to 0. ●...
  • Page 882 16.6 PMSET / pPMSET (Change of MEWNET-W Parameters) Operand Parameter Range Settings Link relay transmission [S+6] U0 to U63 Link relay transmission start number start number Link relay transmission [S+7] U0 to U64 Link relay transmission size size Link register [S+8] transmission start U0 to U127...
  • Page 883: Pmset / Ppmset (Change Of Mewnet-W2 Parameters)

    16.7 PMSET / pPMSET (Change of MEWNET-W2 Parameters) 16.7 PMSET / pPMSET (Change of MEWNET-W2 Parameters) ■ Ladder diagram (Note 1) The above figure shows the case that the FP7 multi-wire link unit for S1=U1 (slot number 1) is specified by the UNITSEL instruction. ■...
  • Page 884 16.7 PMSET / pPMSET (Change of MEWNET-W2 Parameters) ■ Precautions for programming ● The station number of the FP7 multi-wire link unit can be set by the PMSET/pPMSET instruction only when the rotary switch on the front panel of the unit is set to 0. ●...
  • Page 885 16.7 PMSET / pPMSET (Change of MEWNET-W2 Parameters) Bit no. 15 0 0 0 0 0 0 Execution result code Process in-progress flag 0: Normal completion 1: The communication port specified by UNITSEL instruction 0: Process done is invalid 1: In-progress 2: Setting error 3: Mode change error Execution result flag...
  • Page 886 16.7 PMSET / pPMSET (Change of MEWNET-W2 Parameters) ■ Flag operations Name Description To be set in the case of out-of-range in indirect access (index modification, pointer access). To be set when the FP7 multi-wire link unit does not exist in the slot that is specified by UNITSEL.
  • Page 887: Err (When Fp7 Multi-Wire Link Unit Is Used)

    16.8 ERR (When FP7 Multi-wire Link Unit Is Used) 16.8 ERR (When FP7 Multi-wire Link Unit Is Used) ■ Ladder diagram ■ Available operation units (●: Available) Operatio n unit ● ■ List of operands Operand Description Specify a self-diagnostic error code. (0: Clear the self-diagnostic error.) ■...
  • Page 888 16.8 ERR (When FP7 Multi-wire Link Unit Is Used) Device No. Application FP7 multi-wire link unit 1 error (High-order 8 bits = Error code, Low-order 8 bits = Unit SD90 number) FP7 multi-wire link unit 2 error (High-order 8 bits = Error code, Low-order 8 bits = Unit SD91 number) FP7 multi-wire link unit 3 error (High-order 8 bits = Error code, Low-order 8 bits = Unit...
  • Page 889: High-Level Instructions (Ethernet Communication)

    17 High-level Instructions (Ethernet Communication) Applicable Models: CPS4RE*/CPS3RE* 17.1 RDET (ET-LAN Status Read) ............17-3 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) 17-5 17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) ...17-15 17.4 IPv4SET (IP Address Setting)............17-23 17.5 pPINGREQ (PING Request).............17-28 17.6 CONSET (User Connection Setting)..........17-32 17.7 OPEN (Connection Open) ..............17-39 17.8 CLOSE (Connection Close) ..............17-41 17.9 NTPcSV (NTP Destination Server Setting Instruction) .....17-43...
  • Page 890 17 High-level Instructions (Ethernet Communication) 17.30 EIPMSATT (EIP Message Send Destination Setting).....17-152 17.31 EIPMBODY (EIP Message Body Setting)........17-155 17.32 EIPMSEND (EIP Message Send) ...........17-158 17.33 CIPMSET [CIP Message Data Setting (Merging)] ......17-162 17.34 CIPMGET (CIP Message Data Getting) .........17-168 17.35 EIPSTART (Cyclic Communication Start Request)......17-180 17.36 EIPSTOP (Cyclic Communication Stop Request)......17-183 17.37 EIP_IN (EtherNet/IP Input Refresh) ..........17-186 17.38 EIP_OT (EtherNet/IP Output Refresh)..........17-191...
  • Page 891: Rdet (Et-Lan Status Read)

    17.1 RDET (ET-LAN Status Read) 17.1 RDET (ET-LAN Status Read) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. ■...
  • Page 892 17.1 RDET (ET-LAN Status Read) ■ ET-LAN status information Operand Data name Data to be stored Lower word 0: Other than Connection status connected They are stored in the summary [D+1] Higher word 1: Connected corresponding bits as allocated in the following table. [D+2] Lower word 0: Close...
  • Page 893: Etstat (Acquiring Ethernet Unit Information: Ip/Mac/Destination)

    17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 894 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) ■ Precautions for programming ● Insert the UNITSEL instruction immediately before this instruction and specify the unit (built- in ET-LAN in the CPU unit) and the connection number. ● For [S1] and [S2], specify the starting address of the device area that stores the string data that indicates the information to be read, or a character constant.
  • Page 895 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) Storage Number Forma [S1][S2] Name Description location of words Decim [D+4]- [D+7] Subnet mask (IPv4) Subnet mask [D+8]- [D Decim Default gateway (IPv4) Default gateway +11] Decim The master unit port number in [D+12] Master unit port number Destination IP address...
  • Page 896 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) Storage Number Forma [S1][S2] Name Description location of words [D+33] - [D Hexad Default gateway (IPv6) Default gateway +40] ecimal [D+41] - [D Hexad Master unit MAC address Master unit MAC address +43] ecimal Total number of words Master unit IP address 1...
  • Page 897 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) (Note 1) For IPv6, a hexadecimal number is stored in each area of the storage. Example) When the master unit IP address is fe80::1234:5678:1234:5678, the IP address is stored as follows: [D]=HFE80, [D+1]=H0, [D+2]=H0, [D+3]=H0, [D+4]=H1234, [D+5]=H5678, [D+6]=H1234, [D +7]=H5678 (Note 2) The value that is set by the FP7 CPU unit is stored in the area for the master unit IPv6 address (link...
  • Page 898 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) Value Description DT13 HCCDD Example) AA-BB-CC-DD-EE-FF DT14 HEEFF Example 2) When specifying IPv4 address and the destination IP address of a specified connection The results are stored in the 17-word area that starts with [D]. [S1]...
  • Page 899 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) Value Description The master unit IPv6 address (link local) is stored. -DT15 DT16 When [Automatically acquire IPv6 address] - [Acquire from router] is selected, the master unit IPv6 address is stored. For manual setting, "0" is stored. -DT23 DT24 When [Automatically acquire IPv6 address] - [Acquire from DHCP] is selected,...
  • Page 900 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) Value Description -DT15 DT16 When [Automatically acquire IPv6 address] - [Acquire from router] is selected, the master unit IPv6 address is stored. For manual setting, "0" is stored. -DT23 DT24 When [Automatically acquire IPv6 address] - [Acquire from DHCP] is selected, the master unit IPv6 address is stored.
  • Page 901 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) Value Description DT35 H00A8 (U168) Example) 192.168.5.1 DT36 H0005 (U5) DT37 H000B (U11) The destination port number is stored. DT38 H8001 (U32769) Example) 32769 Example 6) When specifying the destination port number for a specified IPv6 connection The results are stored in the 52-word area that starts with [D].
  • Page 902 17.2 ETSTAT (Acquiring Ethernet Unit Information: IP/MAC/Destination) Value Description DT45 H2233 DT46 H4455 DT47 H6677 DT48 H8899 DT49 H99AA DT50 HCCDD The destination port number is stored. DT51 H8001 (U32769) Example) 32769 ■ Flag operations Name Description To be set when the read area is out of the range. To be set when the read type (S1) is set to an item other than "IPv4", "IPv6", "FTPc", "HTTPc", or "SMTPc".
  • Page 903: Etstat (Acquiring Ethernet Unit Information: Ftp/Http/Smtp)

    17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) 17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 904 17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) ■ Precautions for programming ● Insert the UNITSEL instruction immediately before this instruction and specify the unit (built- in ET-LAN in the CPU unit) and the connection number. ● For [S1] and [S2], specify the starting address of the device area that stores the string data that indicates the set parameters, or a character constant.
  • Page 905 17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) Storage Number [S2] Name Description location of words Latest transfer Year, month, day, hour, minute and second when [D+4]- [D+9] success time the last transfer succeeded [D+10]- [D Latest transfer Year, month, day, hour, minute and second when +15] failure time the last transfer failed...
  • Page 906 17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) ■ Execution example Example 1) When specifying a transfer number The 7-word status for the transfer number that is specified by [S2] is read. [S1]... "FTPc" [S2]... "ID5" [D]...DT0 Control relay Execution done code Transfer done code DT3-DT4 Number of successful transfers (individual)
  • Page 907 17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) Transfer result Latest transfer success DT4-DT9 time Latest transfer failure DT10-DT15 time Number of transfer DT16-DT17 successes (Whole) Number of transfer DT18-DT19 failures (Whole) DT20 LOG transfer setting Only the bit for each ID number that is set is turned ON. DT21-DT27 Status of LOG0 The status data (7 words) for each of the 16 LOG numbers is read.
  • Page 908 17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) Code Name Description To be set when the transfer disable relay is "1=Transfer disabled" for the Transfer disabled error transfer number that is specified during the execution of a transfer request instruction. To be set when the transfer cancel request relay is changed from "0" to "1" Transfer canceled error (the leading edge OFF to ON) which means a request to cancel.
  • Page 909 17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) Error code Description Multiple pages can be used. This address was moved to another address. This address is temporarily placed in another address. Refer to another page. Although the access was permitted, the target document has not been updated. Only the access via the proxy of Location field can be permitted.
  • Page 910 17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/HTTP/SMTP) ■ List of transfer done codes (SMTP error codes) Error code Description Normal end Not available. Failed because mailbox is not available (temporarily). Server error Memory shortage Unknown command Command argument error Command is not implemented. Command sequence is incorrect.
  • Page 911: Ipv4Set (Ip Address Setting)

    17.4 IPv4SET (IP Address Setting) 17.4 IPv4SET (IP Address Setting) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 912 17.4 IPv4SET (IP Address Setting) ● If this instruction is executed with an IP address that is out of the available range, the system relay SR9 (carry flag CY) is set and the instruction is terminated without being executed. Refer to the range of available IP addresses. ●...
  • Page 913 17.4 IPv4SET (IP Address Setting) Setting item Settings Specify a subnet mask. Specify the keyword “MASK=” at the beginning. Subnet mask MASK=255.255.255.0 Specify an IP address for default gateway. Specify the keyword “GWIP=” at the beginning. Default gateway GWIP=111.122.133.4 Specify "0" when default gateway is not to be used. (Note 1) Setting parameters should be entered with each setting parameter separated by a comma “,”.
  • Page 914 17.4 IPv4SET (IP Address Setting) Examp “IP=192.168.1.5” le 3 Settings IP address: 192.168.1.5; Subnet mask: Not change; Default gateway: Not change ■ Program example ● After confirming that the Ethernet initialization active flag (X61) is OFF, the instruction is executed. ●...
  • Page 915 17.4 IPv4SET (IP Address Setting) Ethernet initialization active (X61) IP address established (X62) FTP server preparation done (X64) FTP client preparation done (X65) HTTP client preparation done (X68) SMTP client preparation done (X69) Master communication clear to send flag General-purpose communication clear to send flag About 3 sec.
  • Page 916: Ppingreq (Ping Request)

    17.5 pPINGREQ (PING Request) 17.5 pPINGREQ (PING Request) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. ■ List of operands Operand Description Number of requests to send PING (Available range: 1 to 10 times)
  • Page 917 17.5 pPINGREQ (PING Request) ■ Precautions for programming ● Insert the UNITSEL instruction immediately before this instruction and specify the unit (built- in ET-LAN in the CPU unit) and the connection number. ● If the partner unit IP address is not set, an error occurs. ●...
  • Page 918 17.5 pPINGREQ (PING Request) ■ Example of processing Example 1) Once, when PING request, send and response has been completed successfully (when the response time is 10 ms) When instruction is executed PING is being executed. PING response is completed. Example 2) Three times, when the PING request, transmission, and response have been completed successfully (when the response time is 10, 13, or 22 ms) When instruction is executed...
  • Page 919 17.5 pPINGREQ (PING Request) Example 4) When PING request abended (Disconnection detection) When instruction is executed PING is being executed. PING response is completed. ■ Program example ● The UNITSEL instruction is used to specify a slot number (LAN port: U100) and a connection number (U1 to U16 for general-purpose communication).
  • Page 920: Conset (User Connection Setting)

    17.6 CONSET (User Connection Setting) 17.6 CONSET (User Connection Setting) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 921 17.6 CONSET (User Connection Setting) ■ Processing ● This instruction sets the connection setting parameters that are specified by [S1] and [S2], for the connections which are in the range specified by [D1] and [D2]. ● If an incorrect IP address is specified, the system relay SR9 (carry flag CY) is set and the instruction is terminated without being executed.
  • Page 922 17.6 CONSET (User Connection Setting) ■ Operand [S1] setting ● Specify the starting address of the device area that stores the string data that indicates the parameters for operation setting, or a character constant. ● When "INITIAL" is specified instead of parameters, the instruction operates according to the table of special keywords.
  • Page 923 17.6 CONSET (User Connection Setting) Setting Settings item (Essential) Specify communication method (TCP/UDP). Communication TCP: TCP/IP setting, UDP: UDP/IP setting method setting * An operation error occurs if UDP is specified when GP_LARGE is specified for (Essential) the operation mode setting. (Note 1) For operation settings, input each setting parameter separated by a comma ",".
  • Page 924 17.6 CONSET (User Connection Setting) Operating mode setting: MEWTOCOL-COM, Option setting: Option not available, Settings Open type (Server/Client): Client, Open type (Automatic/Manual): Open automatically, Communication type: TCP/IP ■ Operand [S2] setting ● Specify the starting address of the device area that stores the string data that indicates the parameters for port setting, or a character constant.
  • Page 925 17.6 CONSET (User Connection Setting) Partner unit IP address: 1111:1222::1555:0:0:1999, Partner unit port number: 10000, Unused Settings connection disconnect time: 30000 Examp "IPv4=192.255.100.11,PORT=2500,DISCONT=50" le 3 Partner unit IP address: 192.255.100.11, Partner unit port number: 2500, Unused connection Settings disconnect time: 50 <When specifying Server (when connecting to FP7)>...
  • Page 926 17.6 CONSET (User Connection Setting) Setting Settings Setting range item Setting end connection Specify setting end connection number. 1 to 216 number (maximum) ■ Flag operations Name Description To be set when [D1] is larger than [D2]. To be set when [D1] and [D2] exceed the number of user connection information settings. Set when a value outside the range is specified for the parameter.
  • Page 927: Open (Connection Open)

    17.7 OPEN (Connection Open) 17.7 OPEN (Connection Open) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. ■ List of operands Operand Description Device address storing the connection number to be opened or a constant.
  • Page 928 17.7 OPEN (Connection Open) ● To open connections for a multi connection server, specify the first connection. If this instruction is executed for a connection other than the first connection, an operation error occurs. ■ Precautions for programming ● Insert the UNITSEL instruction immediately before this instruction and specify the unit (built- in ET-LAN in the CPU unit) and the connection number.
  • Page 929: Close (Connection Close)

    17.8 CLOSE (Connection Close) 17.8 CLOSE (Connection Close) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. ■ List of operands Operand Description Device address storing the connection number to be closed or a constant.
  • Page 930 17.8 CLOSE (Connection Close) ● To close connections for a multi connection server, specify the first connection. If this instruction is executed for a connection other than the first connection, an operation error occurs. ■ Precautions for programming ● Insert the UNITSEL instruction immediately before this instruction and specify the unit (built- in ET-LAN in the CPU unit) and the connection number.
  • Page 931: Ntpcsv (Ntp Destination Server Setting Instruction)

    17.9 NTPcSV (NTP Destination Server Setting Instruction) 17.9 NTPcSV (NTP Destination Server Setting Instruction) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 932 17.9 NTPcSV (NTP Destination Server Setting Instruction) ● The settings remain valid until the power is turned OFF. Also, the setting is valid until PROG. mode changes to RUN mode after a project is copied using an SD card and a communication command (download of project, backup/restoration of project, writing of configuration fixed area, forced cancel of security, initialization of system (factory default setting)) is executed.
  • Page 933 17.9 NTPcSV (NTP Destination Server Setting Instruction) Setting example "IPv4=111.122.133.144,TIMEZONE=+0900" Exam ple 1 Settings NTP server (IPv4): 111.122.133.144, Time zone: GMT+09:00 Setting example when omitting a part of a keyword "HOST=ntp.pidsx.com" Exam ple 2 Settings NTP server (Host name): ntp.pidsx.com, Time zone: Unchanged ",TIMEZONE=+0900"...
  • Page 934 17.9 NTPcSV (NTP Destination Server Setting Instruction) Setting example when omitting a part of a keyword “DAY=1234” Exam Once daily/specified time: Once daily at 12:34, Once weekly/specified day of the week ple 2 Settings and time: Unchanged, Once monthly/specified date and time: Unchanged ",WEEK=01234"...
  • Page 935: Pntpcreq (Time Adjustment Request Instruction)

    17.10 pNTPcREQ (Time Adjustment Request Instruction) 17.10 pNTPcREQ (Time Adjustment Request Instruction) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. ■...
  • Page 936 17.10 pNTPcREQ (Time Adjustment Request Instruction) ● The timeout period for one time adjustment attempt is fixed to three seconds. When multiple time adjustment attempts are specified, a new request starts after the timeout period elapses (3 seconds) plus [S2] seconds (the processing interval). ●...
  • Page 937 17.10 pNTPcREQ (Time Adjustment Request Instruction) Code Execution result Processing interval setting The specified processing interval is out of the range. error (Note The time adjustment response exceeds the specified time Response timeout error Ethernet task response timeout It occurs when no response is returned from the Ethernet task. (Note 1) The instruction with the number of processing times set to 0 to cancel the time adjustment request instruction does not cause a double startup error.
  • Page 938 17.10 pNTPcREQ (Time Adjustment Request Instruction) Example 4) When the time adjustment request ends abnormally (Number of processing times setting error) [S1]...U2 [S2]...U21 [D]...DT10 When instruction is executed ■ Cancelation of the time adjustment request ● When the number of processing times is set to zero and the pNTPcREQ instruction is executed, a time adjustment request that is being executed is canceled.
  • Page 939 17.10 pNTPcREQ (Time Adjustment Request Instruction) 3) Cancelation of the processing during the processing interval of an NTP request Instruction execution No. of processing times (S1)=2 No. of processing No. of processing times = 2 times = 0 Interruption of waiting for NTP request First request processing interval...
  • Page 940: Ftpcsv (Ftp Client Connected Server Setting)

    17.11 FTPcSV (FTP Client Connected Server Setting) 17.11 FTPcSV (FTP Client Connected Server Setting) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 941 17.11 FTPcSV (FTP Client Connected Server Setting) ● The instruction can be executed when the transfer request relays of the FTPc control relay and the FTPc logging/trace control relay are OFF (0: No request). As an execution condition of the instruction, insert a program that checks the state of the transfer request relay. The states of the transfer request relay and the logging transfer request relay can be read with the ETSTAT instruction.
  • Page 942 17.11 FTPcSV (FTP Client Connected Server Setting) ● It is prohibited to specify the same keyword redundantly. An error is caused in the case of redundant specification. Setting Settings item FTP server Specify FTP servers. Specify the following keywords. number SV0: Server 0, SV1: Server 1, SV2: Server 2, SV3: Server 3 (Essential) Specify IP address or host name.
  • Page 943 1 Settings User name: root, Password: pidsx Exam "USER=PANASONIC,PASS=SUNX" ple 2 Settings User name: PANASONIC, Password: SUNX ■ Operand [S2]: user name and password setting Patterns How to specify Specify user name: Delete password "USER=xxx,PASS=" Delete user name: Specify password "USER=,PASS=xxx"...
  • Page 944 17.11 FTPcSV (FTP Client Connected Server Setting) Settings User name: Delete, Password: Delete Exam "USER=root" ple 4 Settings User name: root, Password: Not change Exam ",PASS=SUNX" ple 5 Settings User name: Not change, Password: SUNX ■ Special keyword of operand [S2] setting Special keyword Description INITIAL...
  • Page 945 17.11 FTPcSV (FTP Client Connected Server Setting) (Note 4) The retry interval can be specified in 10-second units. It is rounded down to the nearest 10. (Example: When specifying 38 seconds, it becomes 30 seconds.) Setting example Exam “TOUT=30,RTRY=2,RTTM=500” ple 1 Settings Timeout period: 30 seconds, No.
  • Page 946 17.11 FTPcSV (FTP Client Connected Server Setting) (Note 1) For details of the error codes stored in the system data SD29, refer to "20.2 List of System Data Registers". 17-58 WUME-FP7CPUPGR-12...
  • Page 947: Ftpcset (Ftp Client Transfer Setting)

    17.12 FTPcSET (FTP Client Transfer Setting) 17.12 FTPcSET (FTP Client Transfer Setting) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 948 17.12 FTPcSET (FTP Client Transfer Setting) Real 32-Bit 16-Bit device: Integer numbe device: Index Operan modifie U " " ● ● ● ● ● ● ● ● ● ● ● ● ● ● ■ Outline of operation ● This instruction configures the FTP client transfer settings (0 to 15). ●...
  • Page 949 17.12 FTPcSET (FTP Client Transfer Setting) an operand, set string data using the SSET instruction in advance. However, the ESSET instruction cannot be used because the format is different. ● The number of characters should not exceed 256. ● Both upper and lower case characters can be used. "Abcd", "ABCD" and "abcd" are all synonymous.
  • Page 950 17.12 FTPcSET (FTP Client Transfer Setting) Setting Settings item Setting for deleting source files after transfer. (3 digits fixed) File after transfer DEL: Delete, NON: Not deleted (Note 1) Input each operation setting parameter separated by a comma ",". (Note 2) The operation setting parameters cannot be omitted.
  • Page 951 17.12 FTPcSET (FTP Client Transfer Setting) ● For transferring files to FTP servers, the overwrite method or rename method is selectable. As tentative file names are renamed after the completion of the transfer in the rename method, it is possible to confirm that the files have reached to FTP servers successfully. ■...
  • Page 952 17.12 FTPcSET (FTP Client Transfer Setting) Setting Setting Settings item range Parameter Extension (Saving format) BIN1w Unconverted 16-bit binary .BIN (binary data) 16-bit unsigned decimal 16-bit signed decimal 32-bit unsigned decimal 32-bit signed decimal 32-bit single-precision floating point .CSV 64-bit double-precision floating (comma-separated text) point HEX1w...
  • Page 953 17.12 FTPcSET (FTP Client Transfer Setting) Device setting, Device division: Global, Device code: WL, Device No.: 10 Settings Number of transferred data: 128 (128 words), Conversion method: Unconverted 16-bit binary, Line feed position: Output the end of file only Exam "PB100_WR1000,50,US,0"...
  • Page 954 17.12 FTPcSET (FTP Client Transfer Setting) Setting Setting Settings item range Specify a conversion method. Extension (Saving Parameter format) BIN1w Unconverted 16-bit binary .BIN (binary data) 16-bit unsigned decimal 16-bit signed decimal 32-bit unsigned decimal 32-bit signed decimal Conversion method 32-bit single-precision floating point .CSV...
  • Page 955 17.12 FTPcSET (FTP Client Transfer Setting) ■ Operand [S4] setting (for file transfer) ● Specify the starting address of the device area that stores the string data that indicates a destination folder name, or a character constant. Setting Settings item Specify a folder name from the home directory of a user which logs in FTP servers with a relative path.
  • Page 956 17.12 FTPcSET (FTP Client Transfer Setting) Exam "\FTP\PutData3.bin" ple 3 Destination file name: \FTP\PutData3.bin Settings Automatic addition position: Automatic additional data is not added to the file name. ■ Operand [S4] setting (when getting device) Setting Settings item Source File Specify the starting address of the device area that stores the string data that Name indicates a source file name, or a character constant.
  • Page 957: Ftpclog (Ftp Client Logging/Trace Transfer Setting)

    17.13 FTPcLOG (FTP Client Logging/Trace Transfer Setting) 17.13 FTPcLOG (FTP Client Logging/Trace Transfer Setting) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 958 17.13 FTPcLOG (FTP Client Logging/Trace Transfer Setting) ● The instruction can be executed when the transfer request relay of the FTPc logging/trace control relay is OFF (0: No request). As an execution condition of the instruction, insert a program that checks the state of the transfer request relay. The state of the FTPc logging transfer request relay can be read with the ETSTAT instruction.
  • Page 959 17.13 FTPcLOG (FTP Client Logging/Trace Transfer Setting) Setting item Settings Performs transfer files with temporary file names, and renames them to specified file names after the success of the transfer. The successful completion of file transfer can be confirmed by checking the file names Rename specified by the logging/trace setting.
  • Page 960 17.13 FTPcLOG (FTP Client Logging/Trace Transfer Setting) Name Description Set when the instruction is the initialization of Ethernet. The detail code set in SD29 is "11: Ethernet initialization active". (SR9) (Note 1) For details of the error codes stored in the system data SD29, refer to "20.2 List of System Data Registers".
  • Page 961: Ftpcreq (Ftp Client Transfer Request)

    17.14 FTPcREQ (FTP Client Transfer Request) 17.14 FTPcREQ (FTP Client Transfer Request) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. ■...
  • Page 962 17.14 FTPcREQ (FTP Client Transfer Request) ● This instruction can be executed when the cable disconnection detection flag (X60) is OFF. As an execution condition of the instruction, insert a program that checks the status of the flag (X60). If this instruction is executed when the flag (X60) is ON, the system relay SR9 (carry flag CY) is set and the instruction is terminated without being executed.
  • Page 963 17.14 FTPcREQ (FTP Client Transfer Request) Transfer setting (Executes FTPcSET Transfer process done (Completes the execution of instruction) FTPcREQ instruction) ■ Control relay Name Bit No. Description Transfer request relay 0: No request, 1: Request Transfer active relay 0: Stop, 1: During transfer Retry active relay 0: No retry, 1: During retry Execution done relay...
  • Page 964 17.14 FTPcREQ (FTP Client Transfer Request) Name Description To be set when the FTP client preparation done (X65) is OFF at the time of the execution of instruction. Set when a value outside the range is specified for the parameter. (ER) To be set when the transfer request relay of a specified ID is "Request".
  • Page 965: Ftpcctl (Ftp Client Transfer Control)

    17.15 FTPcCTL (FTP Client Transfer Control) 17.15 FTPcCTL (FTP Client Transfer Control) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 966 17.15 FTPcCTL (FTP Client Transfer Control) the transfer status, refer to the "17.3 ETSTAT (Acquiring Ethernet Unit Information: FTP/ HTTP/SMTP)" instruction. ■ Processing ● The instruction controls whether to enable, disable, or cancel transfer for the target [S1] according to the specification of the control content [S2]. ●...
  • Page 967 17.15 FTPcCTL (FTP Client Transfer Control) ■ Setting of the operands [S1] and [S2] Setting Settings item 1) When specifying an individual transfer Specify "IDx" with x being a value from 0 number to 15. Control 2) When specifying an individual LOG Specify "LOGx"...
  • Page 968 17.15 FTPcCTL (FTP Client Transfer Control) Name Transfer enabled Transfer disabled Transfer canceled ETSTAT [D] bit15 Transfer disable relay Not change (Note 1) The states of control relays can be checked by using the ETSTAT instruction to read and store the state in any operation memory.
  • Page 969: Httpcsv (Http Client Connected Server Setting)

    17.16 HTTPcSV (HTTP Client Connected Server Setting) 17.16 HTTPcSV (HTTP Client Connected Server Setting) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 970 17.16 HTTPcSV (HTTP Client Connected Server Setting) ● The instruction can be executed when the transfer request relays of the HTTPc control relay and the HTTPc logging/trace control relay are OFF (0: No request). As an execution condition of the instruction, insert a program that checks the state of the transfer request relay.
  • Page 971 17.16 HTTPcSV (HTTP Client Connected Server Setting) ● It is prohibited to specify the same keyword redundantly. An error is caused in the case of redundant specification. Setting Settings item Specify HTTP servers. HTTP server number Specify the following keywords. (Essential) SV0: Server 0, SV1: Server 1, SV2: Server 2, SV3: Server 3 Specify IP address or host name.
  • Page 972 1 Settings User name: root, Password: pidsx Exam "USER=PANASONIC,PASS=SUNX" ple 2 Settings User name: PANASONIC, Password: SUNX ■ Operand [S2]: user name and password setting Patterns How to specify Specify user name: Delete password "USER=xxx,PASS=" Delete user name: Specify password "USER=,PASS=xxx"...
  • Page 973 17.16 HTTPcSV (HTTP Client Connected Server Setting) Exam "USER=,PASS=" ple 3 Settings User name: Delete, Password: Delete Exam "USER=root" ple 4 Settings User name: root, Password: Not change Exam ",PASS=SUNX" ple 5 Settings User name: Not change, Password: SUNX ■ Special keyword of operand [S2] setting Special keyword Description...
  • Page 974 17.16 HTTPcSV (HTTP Client Connected Server Setting) Settings Timeout period: 270 seconds, No. of retries: 0 (Not retry), Retry interval: 4900 seconds Exam “TOUT=120,RTRY=3” ple 3 Settings Timeout period: 120 seconds, No. of retries: 3, Retry interval: Not change ■ Special keyword of operand [S3] setting Special keyword Description...
  • Page 975: Httpcset (Http Client Transfer Setting)

    17.17 HTTPcSET (HTTP Client Transfer Setting) 17.17 HTTPcSET (HTTP Client Transfer Setting) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 976 17.17 HTTPcSET (HTTP Client Transfer Setting) ● Before executing this instruction, use the "17.16 HTTPcSV (HTTP Client Connected Server Setting)" instruction or the programming tool software "FPWIN GR7" to configure the settings of the destination server. ■ Processing ● The HTTP client transfer settings of [S2] to [S4] are stored in the transfer setting area that is specified by [S1].
  • Page 977 17.17 HTTPcSET (HTTP Client Transfer Setting) Setting Setting item Settings range Specify a transfer setting number. Transfer setting 0 to 15 number ID=: Transfer setting number (Note 1) Transfer setting numbers should be specified from number 0 in ascending order. An error occurs when transfer setting numbers are not specified in ascending order.
  • Page 978 17.17 HTTPcSET (HTTP Client Transfer Setting) ■ Operand [S3] setting (UPLOAD operation for a device) ● Specify the starting address of the device area that stores the string data that indicates source device settings, or a character constant. Setting Settings Setting range item Specify the source device setting.
  • Page 979 17.17 HTTPcSET (HTTP Client Transfer Setting) ■ Operand [S3] setting (DOWNLOAD operation for a device) ● Specify the starting address of the device area that stores the string data that indicates destination device settings, or a character constant. Setting Setting Settings item range...
  • Page 980 17.17 HTTPcSET (HTTP Client Transfer Setting) ■ Operand [S3] setting (UPDOWN operation for a device) ● Specify the starting address of the device area that stores the string data that indicates source device settings, or a character constant. ● Downloaded data is stored immediately after uploaded data. The number of acquisitions (the number of bytes) is stored in the first two words.
  • Page 981 17.17 HTTPcSET (HTTP Client Transfer Setting) Exam "WR0,64.64" ple 3 Device setting, Device division: Global, Device code: WR, Device number: 0, Number of bytes: 64 bytes, Settings Number of acquisitions: 64 bytes Exam "WL10,128,128" ple 4 Device setting, Device division: Global, Device code: WL, Device number: 10, Number of bytes: 128 bytes, Settings Number of acquisitions: 128 bytes...
  • Page 982: Httpcreq (Http Client Transfer Request)

    17.18 HTTPcREQ (HTTP Client Transfer Request) 17.18 HTTPcREQ (HTTP Client Transfer Request) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. ■...
  • Page 983 17.18 HTTPcREQ (HTTP Client Transfer Request) (X61). If this instruction is executed when the flag (X61) is ON, the system relay SR9 (carry flag CY) is set and the instruction is terminated without being executed. ● When the instruction is completed successfully, the system relay SR9 (carry flag CY) and the system data register SD29 (Ethernet communication error code) are cleared.
  • Page 984 17.18 HTTPcREQ (HTTP Client Transfer Request) Transfer setting (Executes HTTPcSET Transfer process done (Completes the execution of instruction) HTTPcREQ instruction) ■ Control relay Name Bit No. Description Transfer request relay 0: No request, 1: Request Transfer active relay 0: Stop, 1: During transfer Transfer retry active relay 0: No retry, 1: During retry Execution done relay...
  • Page 985 17.18 HTTPcREQ (HTTP Client Transfer Request) ■ Flag operations Name Description To be set when the slot number [S1] specified with UNITSEL is not 100 (built-in ET-LAN). To be set in the case of out-of-range in indirect access (index modification). To be set when the HTTP client preparation done (X68) is OFF at the time of the execution of instruction.
  • Page 986: Httpcctl (Http Client Transfer Control)

    17.19 HTTPcCTL (HTTP Client Transfer Control) 17.19 HTTPcCTL (HTTP Client Transfer Control) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 987 17.19 HTTPcCTL (HTTP Client Transfer Control) ■ Processing ● The instruction controls whether to enable, disable, or cancel transfer for the target [S1] according to the specification of the control content [S2]. ● This instruction can be executed when the Ethernet initialization active flag (X61) is OFF. As an execution condition of the instruction, insert a program that checks the status of the flag (X61).
  • Page 988 17.19 HTTPcCTL (HTTP Client Transfer Control) ■ Setting of the operands [S1] and [S2] Setting Settings item 1) When specifying an individual Specify "IDx" with x being a value from 0 Control transfer number to 15. target 2) When specifying all transfer numbers Specify "ALL". 1) When enabling transfer Specify "ENABLE".
  • Page 989 17.19 HTTPcCTL (HTTP Client Transfer Control) ■ Flag operations Name Description To be set when an item other than "IDx" or "ALL" is specified for the control target [S1]. (x: 0 to To be set when a transfer setting that has not been specified with the transfer setting instruction or the tool software is specified.
  • Page 990: Smtpcbdy (Mail Text Setting)

    17.20 SMTPcBDY (Mail Text Setting) 17.20 SMTPcBDY (Mail Text Setting) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. Set a desired value for [S2]. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 991 17.20 SMTPcBDY (Mail Text Setting) ● After this instruction is executed, the PLC operates as shown in the following table. Conditions Operation Setting using the The power supply for the PLC is switched from OFF to ON. configuration Changes to RUN mode without rewriting the Setting using instructions configuration.
  • Page 992 17.20 SMTPcBDY (Mail Text Setting) Setting example Example) ・Mail text example Floor A: 25 degrees C. Floor B: 28 degrees C. S1="ID5" S2=DT200 DT200 H002D No. of bytes H 6C(l) H 46(F) DT201 Data part DT202 H 6F(o) H 6F(o) Data part H 20(␣) H 72(r)
  • Page 993: Smtpcbrd (Mail Text Read)

    17.21 SMTPcBRD (Mail Text Read) 17.21 SMTPcBRD (Mail Text Read) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. Set a desired value for [S2]. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 994 17.21 SMTPcBRD (Mail Text Read) can be read with the ETSTAT instruction. Store the state that is read in a device such as an internal relay. An operation error occurs if this instruction is executed when the send request relay is ON. ●...
  • Page 995 17.21 SMTPcBRD (Mail Text Read) Setting example Example) ・Mail text example 2014/%d/%d Temperature is %d degrees C. S1="ID0" S2=DT100 DT100 H0027 No. of bytes DT101 H 30(0) H 32(2) DT102 H 34(4) H 31(1) H 25(%) H 2F(/) DT103 H 2F(/) H 64(d) DT104 H 64(d)
  • Page 996: Smtpcsv (Mail Server Setting)

    17.22 SMTPcSV (Mail Server Setting) 17.22 SMTPcSV (Mail Server Setting) ■ Ladder diagram (Note 1) The above figure shows the case that S1=U100 (built-in ET-LAN in the CPU unit) and S2=U1 (connection number 1) are specified by the UNITSEL instruction. Set a desired value for [S2]. (Note 2) By copying and pasting the following text in the instruction list box of FPWIN GR7, the operand part of the above program can be input.
  • Page 997 17.22 SMTPcSV (Mail Server Setting) ● The instruction can be executed when the mail send request relays of the mail transmission control relay and the mail send logging/trace control relay are OFF (0: No request). As an execution condition of the instruction, insert a program that checks the state of the mail send request relay.
  • Page 998 17.22 SMTPcSV (Mail Server Setting) Setting Settings item Source name (can be Specify a source name. Specify the keyword "NAME=" at the omitted) beginning. Source e-mail address Specify a source e-mail address. Specify the keyword "FROM=" at (essential) the beginning. Specify IP address or host name.
  • Page 999 17.22 SMTPcSV (Mail Server Setting) ● A part of parameters can be omitted. The settings are not changed when parameters are omitted partially. ● When omitting the part before a specified keyword, omit only "keyword" without omitting ",". ● When omitting the part after a specified keyword, omit both "," and "keyword". ●...
  • Page 1000 17.22 SMTPcSV (Mail Server Setting) Setting example Exam "CRAM,ACCOUNT=root,PASS=" ple 1 Settings SMTP authentication method: CRAM-MD5, Account: root, Password: Delete Exam "PLAIN1,ACCOUNT=,PASS=SUNX" ple 2 Settings SMTP authentication method: PLAIN1, Account: Delete, Password: SUNX Exam "PLAIN2,ACCOUNT=,PASS=" ple 3 Settings SMTP authentication method: PLAIN2, Account: Delete, Password: Delete Exam "LOGIN,ACCOUNT=root"...

Table of Contents