SH 080785 Engm
SH 080785 Engm
SH 080785 Engm
(Special Instructions)
SAFETY PRECAUTIONS
(Read these precautions before using this product.)
Before using MELSEC-Q or -L series programmable controllers, please read the manuals included with each product and the
relevant manuals introduced in those manuals carefully, and pay full attention to safety to handle the product correctly.
Make sure that the end users read the manuals included with each product, and keep the manuals in a safe place for future
reference.
1
INTRODUCTION
Thank you for purchasing the Mitsubishi MELSEC-Q or -L series programmable controllers.
Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the
programming specifications to handle the product correctly.
When applying the program examples introduced in this manual to an actual system, ensure the applicability and confirm that
it will not cause system control problems.
2
CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
CHAPTER 1 OVERVIEW 10
CONTENTS
1.1 Purpose of This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2 Explanation Content in This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 Modules and Versions Applicable to Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3
Receive data clear. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
BUFRCVS instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Initial setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
CSET instruction (programmable controller CPU monitor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
PUTE instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Mode switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Pre-defined protocol communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.4 Network Dedicated Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Reading from the buffer memory of an intelligent device station. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Writing to the buffer memory of an intelligent device station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
RIRCV instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
RISEND instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Reading from the auto-refresh buffer memory of the master station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Writing to the auto-refresh buffer memory of the master station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Network parameter setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
READ instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Message (user-specified data) communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Transient request to another station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Read from other station devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Write to other station devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
RRUN instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
RSTOP instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Reading clock data from another station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Writing clock data to another station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Reading from buffer memory of intelligent function module on remote I/O station . . . . . . . . . . . . . . . . . . . . . . 182
Writing to buffer memory of intelligent function module on remote I/O station . . . . . . . . . . . . . . . . . . . . . . . . . 185
Setting parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Connection opening or closing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Fixed buffer communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Reading or clearing error information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
UINI instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
E-mail communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
4
7.5 Changing Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
7.6 Changing Receive Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
7.7 SOCRDATA Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
CONTENTS
Absolute position restoration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
IPSTOP instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Speed change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Target position change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
8.2 Counter Function Dedicated Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Current value read. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Ring counter upper/lower limit value write. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Preset value write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Latch counter value read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Sampling counter value read. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Coincidence output point write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Frequency measurement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Rotation speed measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Pulse measurement read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
PWM output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
INDEX 306
REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310
WARRANTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312
5
MANUALS
RELEVANT MANUALS
The manuals related to this product are listed below. Order each manual as needed, referring to the following lists.
■Structured programming
Manual name Description
Manual number (model code)
MELSEC-Q/L/F Structured Programming Manual Methods and languages for structured programming
(Fundamentals)
<SH-080782ENG>
MELSEC-Q/L Structured Programming Manual (Common Specifications and functions of common instructions, such as sequence instructions, basic
Instructions) instructions, and application instructions, that can be used in structured programs
<SH-080783ENG>
MELSEC-Q/L Structured Programming Manual (Application Specifications and functions of application functions that can be used in structured programs
Functions)
<SH-080784ENG>
■Operation of GX Works2
Manual name Description
Manual number (model code)
GX Works2 Version 1 Operating Manual (Common) System configuration, parameter settings, and online operations of GX Works2, which are
<SH-080779ENG> common to Simple projects and Structured projects
GX Works2 Version 1 Operating Manual (Structured Project) Operations, such as programming and monitoring in Structured projects, of GX Works2
<SH-080781ENG>
GX Works2 Beginner's Manual (Structured Project) Basic operations, such as programming, editing, and monitoring in Structured projects, of GX
<SH-080788ENG> Works2. This manual is intended for first-time users of GX Works2.
● Analog-Digital Converter Module User's Manual System configuration, performance specifications, functions, handling, wiring,
<SH-080055> and troubleshooting of the Q64AD, Q68ADV, and Q68ADI
● Channel Isolated High Resolution Analog-Digital Converter System configuration, performance specifications, functions, handling, wiring,
Module / Channel Isolated High Resolution Analog-Digital and troubleshooting of the Q64AD-GH and Q62AD-DGH
Converter Module (With Signal Conditioning Function) User's
Manual
<SH-080277>
● Channel Isolated Analog-Digital Converter Module/Channel System configuration, performance specifications, functions, handling, wiring,
Isolated Analog-Digital Converter Module (With Signal and troubleshooting of the Q68AD-G and Q66AD-DG
Conditioning Function) User's Manual
<SH-080647ENG>
● MELSEC-Q High Speed Analog-Digital Converter Module System configuration, performance specifications, functions, handling, wiring,
User's Manual and troubleshooting of the Q64ADH
<SH-080987ENG>
● MELSEC-Q High Speed Digital-Analog Converter Module System configuration, performance specifications, functions, handling, wiring,
User's Manual and troubleshooting of the Q64DAH
<SH-081101ENG>
● Digital-Analog Converter Module User's Manual System configuration, performance specifications, functions, handling, wiring,
<SH-080054> and troubleshooting of the Q62DAN, Q64DAN, Q68DAVN, and Q68DAIN
● Channel Isolated Digital-Analog Converter Module User's System configuration, performance specifications, functions, handling, wiring,
Manual and troubleshooting of the Q62DA-FG
<SH-080281E>
● Channel Isolated Digital-Analog Converter Module User's System configuration, performance specifications, functions, handling, wiring,
Manual and troubleshooting of the Q66DA-G
<SH-080648ENG>
● RTD Input Module Channel Isolated RTD Input Module User's System configuration, performance specifications, functions, handling, wiring,
Manual and troubleshooting of the Q64RD and Q64RD-G
<SH-080142>
6
Series Manual name Description
Q L Manual number (model code)
● Thermocouple Input Module Channel Isolated Thermocouple/ System configuration, performance specifications, functions, handling, wiring,
Micro Voltage Input Module User's Manual and troubleshooting of the Q64TD and Q64TDV-GH
<SH-080141>
● Channel Isolated Thermocouple Input Module User's Manual System configuration, performance specifications, functions, handling, wiring,
<SH-080795ENG> and troubleshooting of the Q68TD-G-H01/Q68TD-G-H02
● Channel Isolated RTD Input Module User's Manual System configuration, performance specifications, functions, handling, wiring,
<SH-080722ENG> and troubleshooting of the Q68RD3-G
● Load Cell Input Module User's Manual System configuration, performance specifications, functions, handling, wiring,
<SH-080821ENG> and troubleshooting of the Q61LD
● MELSEC-Q Current Transformer Input Module User's Manual System configuration, performance specifications, functions, handling, wiring,
<SH-081033ENG> and troubleshooting of the Q68CT
● MELSEC-L Analog-Digital Converter Module User's Manual System configuration, performance specifications, functions, handling, wiring,
<SH-080899ENG> and troubleshooting of the analog-digital converter module
● MELSEC-L Dual Channel Isolated High Resolution Analog- System configuration, performance specifications, functions, handling, wiring,
Digital Converter Module User's Manual and troubleshooting of the L60AD4-2GH
<SH-081103ENG>
● MELSEC-L Digital-Analog Converter Module User's Manual System configuration, performance specifications, functions, handling, wiring,
<SH-080900ENG> and troubleshooting of the digital-analog converter module
● MELSEC-L Analog Input/Output Module User's Manual System configuration, specifications, settings, and troubleshooting of the
<SH-081167ENG> analog input/output module
• Positioning instruction
Series Manual name Description
Q L Manual number (model code)
● Type QD75P/QD75D Positioning Module User's Manual System configuration, performance specifications, functions, handling, wiring,
(Details) and troubleshooting of the QD75P1N/QD75P2N/QD75P4N/QD75D1N/
<SH-080058> QD75D2N/QD75D4N/QD75P1/QD75P2/QD75P4/QD75D1/QD75D2/QD75D4
● Type QD75M Positioning Module User's Manual (Details) System configuration, performance specifications, functions, handling,
<IB-0300062> procedures before operation, and troubleshooting of the QD75M1/QD75M2/
QD75M4
● Type QD75MH Positioning Module User's Manual (Details) System configuration, performance specifications, functions, handling,
<IB-0300117> procedures before operation, and troubleshooting of the QD75MH1/
QD75MH2/QD75MH4
● MELSEC-L LD75P/LD75D Positioning Module User's Manual System configuration, performance specifications, functions, handling, wiring,
<SH-080911ENG> and troubleshooting of the LD75P1/LD75P2/LD75P4/LD75D1/LD75D2/
LD75D4
● Q Corresponding Serial Communication Module User's The overview for use of the module, applicable system configuration,
Manual (Basic) specifications, procedures before operation, fundamental data communication
<SH-080006> with external devices, maintenance, inspection, and troubleshooting
● MELSEC-L Serial Communication Module User's Manual The overview for use of the module, applicable system configuration,
(Basic) specifications, procedures before operation, fundamental data communication
<SH-080894ENG> with external devices, maintenance, inspection, and troubleshooting
● ● MELSEC-Q/L Serial Communication Module User's Manual The specifications and usage of special functions of the module, settings for
(Application) special functions, and data communication with external devices
<SH-080007>
● MELSEC-Q CC-Link System Master/Local Module User's System configuration, performance specifications, functions, handling, wiring,
Manual and troubleshooting of the QJ61BT11N
<SH-080394E>
● MELSEC-L CC-Link System Master/Local Module User's System configuration, performance specifications, functions, handling, wiring,
Manual and troubleshooting of the built-in CC-Link and CC-Link system master/local
<SH-080895ENG> modules
● CC-Link IE Controller Network Reference Manual System configuration, performance specifications, functions, handling, wiring,
<SH-080668ENG> and troubleshooting of the CC-Link IE Controller Network
7
Series Manual name Description
Q L Manual number (model code)
● MELSEC-Q CC-Link IE Field Network Master/Local Module The specifications, procedures before operation, system configuration,
User's Manual installation, settings, functions, programming, and troubleshooting of the CC-
<SH-080917ENG> Link IE Field Network and the CC-Link IE Field Network master/local module
● MELSEC-L CC-Link IE Field Network Master/Local Module The specifications, procedures before operation, system configuration,
User's Manual installation, settings, functions, programming, and troubleshooting of the CC-
<SH-080972ENG> Link IE Field Network and the CC-Link IE Field Network master/local module
● Q Corresponding MELSECNET/H Network System Reference The specifications, settings and procedures before operation, parameter
Manual (PLC to PLC network) setting, programming, and troubleshooting of the MELSECNET/H PLC-to-PLC
<SH-080049> network system
● Q Corresponding MELSECNET/H Network System Reference System configuration, performance specifications, and programming of the
Manual (Remote I/O network) MELSECNET/H network system (remote I/O network)
<SH-080124>
● Q Corresponding Ethernet Interface Module User's Manual The specifications of the Ethernet module, data communication procedure with
(Basic) external devices, line connection (open/close), fixed buffer communication,
<SH-080009> random access buffer communication, and troubleshooting
● MELSEC-L Ethernet Interface Module User's Manual (Basic) The specifications of the Ethernet module, data communication procedure with
<SH-081105ENG> external devices, line connection (open/close), fixed buffer communication,
random access buffer communication, and troubleshooting
● ● MELSEC-Q/L Ethernet Interface Module User's Manual The e-mail function of the Ethernet module, programmable controller CPU
(Application) status monitoring, communication function using the MELSECNET/H or
<SH-080010> MELSECNET/10 as a relay station, communication with data link instructions,
and the use of file transfer (FTP server) function
● ● MELSEC-Q/L/QnA Programming Manual (PID Control The dedicated instructions for PID control
Instructions)
<SH-080040>
● QnUCPU User's Manual (Communication via Built-in Ethernet Functions for the communication via built-in Ethernet port of the CPU module
Port)
<SH-080811ENG>
● MELSEC-L CPU Module User's Manual (Built-In Ethernet The built-in Ethernet function of the CPU module
Function)
<SH-080891ENG>
● MELSEC-L CPU Module User's Manual (Built-In I/O Function) The general-purpose I/O function, interrupt input function, pulse catch function,
<SH-080892ENG> positioning function, and high-speed counter function of the CPU module
● ● QnUDVCPU/LCPU User's Manual (Data Logging Function) Specifications of the data logging function, and operating method of the LCPU
<SH-080893ENG> logging configuration tool
● ● MELSEC-Q/L/QnA Programming Manual (SFC) The programming methods required to create SFC program, specifications
<SH-080041> and functions
8
TERMS
This manual uses the generic terms and abbreviations listed in the following table to discuss the software packages and
programmable controller CPUs. Corresponding module models are also listed if needed.
Term Description
Application function A generic term for the functions, such as functions and function blocks, defined in IEC61131-3.
(The functions are executed with a set of common instructions in a programmable controller.)
Basic model QCPU A generic term for the Q00JCPU, Q00CPU, and Q01CPU
Built-in Ethernet port LCPU A generic term for the L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, and
L26CPU-PBT
Built-in Ethernet port QCPU A generic term for the Q03UDVCPU, Q03UDECPU, Q04UDVCPU, Q04UDPVCPU, Q04UDEHCPU,
Q06UDVCPU, Q06UDPVCPU, Q06UDEHCPU, Q10UDEHCPU, Q13UDVCPU, Q13UDPVCPU,
Q13UDEHCPU, Q20UDEHCPU, Q26UDVCPU, Q26UDPVCPU, Q26UDEHCPU, Q50UDEHCPU, and
Q100UDEHCPU
CC-Link IE A generic term for CC-Link IE Controller Network system and CC-Link IE Field Network system
Common instruction A generic term for the sequence instructions, basic instructions, application instructions, data link instructions,
multiple CPU dedicated instructions, multiple CPU high-speed transmission dedicated instructions, and
redundant system instructions
CPU module A generic term for QCPU (Q mode) and LCPU
GX Works2 Product name of the software package for the MELSEC programmable controllers
High Performance model QCPU A generic term for the Q02CPU, Q02HCPU, Q06HCPU, Q12HCPU, and Q25HCPU
High-speed Universal model QCPU A generic term for the Q03UDVCPU, Q04UDVCPU, Q06UDVCPU, Q13UDVCPU, and Q26UDVCPU
IEC61131-3 The abbreviation for the IEC 61131-3 international standard
LCPU A generic term for the L02SCPU, L02SCPU-P, L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, L26CPU-P,
L26CPU-BT, and L26CPU-PBT
MELSECNET/H The abbreviation for MELSECNET/H network system
Personal computer A generic term for personal computer on which Windows operates
Process CPU A generic term for the Q02PHCPU, Q06PHCPU, Q12PHCPU, and Q25PHCPU
QCPU (Q mode) A generic term for the Basic model QCPU, High Performance model QCPU, Process CPU, Redundant CPU,
and Universal model QCPU.
Redundant CPU A generic term for the Q12PRHCPU and Q25PRHCPU
Special instruction A generic term for the module dedicated instructions, PID control instructions, socket communication function
instructions, built-in I/O function instructions, and data logging function instructions
Universal model Process CPU A generic term for the Q04UDPVCPU, Q06UDPVCPU, Q13UDPVCPU, and Q26UDPVCPU
Universal model QCPU A generic term for the Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCPU, Q03UDCPU, Q03UDVCPU,
Q03UDECPU, Q04UDHCPU, Q04UDVCPU, Q04UDPVCPU, Q04UDEHCPU, Q06UDHCPU, Q06UDVCPU,
Q06UDPVCPU, Q06UDEHCPU, Q10UDHCPU, Q10UDEHCPU, Q13UDHCPU, Q13UDVCPU,
Q13UDPVCPU, Q13UDEHCPU, Q20UDHCPU, Q20UDEHCPU, Q26UDHCPU, Q26UDVCPU,
Q26UDPVCPU, Q26UDEHCPU, Q50UDEHCPU, and Q100UDEHCPU
9
1 OVERVIEW
Operation of GX Works2
Purpose Overview Details
Installation Learning the operating environment GX Works2 Installation Instructions
and installation method
Learning a USB driver installation GX Works2 Version 1 Operating Manual
method (Common)
Operation of GX Learning all functions of GX Works2 GX Works2 Version 1 Operating Manual
Works2 (Common)
Learning the project types and
available languages in GX Works2
Learning the basic operations and GX Works2 Beginner's Manual (Simple
operating procedures when creating a Project)
simple project for the first time
Learning the basic operations and GX Works2 Beginner's Manual
operating procedures when creating a (Structured Project)
structured project for the first time
Learning the operations of available GX Works2 Version 1 Operating Manual
functions regardless of project type. (Common)
Learning the functions and operation GX Works2 Version 1 Operating Manual GX Works2 Version 1 Operating Manual
methods for programming (Common) (Simple Project)
GX Works2 Version 1 Operating Manual
(Structured Project)
Learning data setting methods for GX Works2 Version 1 Operating Manual
intelligent function module (Intelligent Function Module)
1 OVERVIEW
10 1.1 Purpose of This Manual
Details of instructions in each programming language
Purpose Overview Details 1
All languages Learning details of programmable Use's Manual (Hardware Design,
controller CPU error codes, special Maintenance and Inspection) for the CPU
relays, and special registers module used
Using ladder Learning the types and details of MELSEC-Q/L Programming Manual
diagram common instructions (Common Instruction)
Learning the types and details of Manual for the intelligent function module
instructions for intelligent function used
modules
Learning the types and details of Manual for the network module used
instructions for network modules
Learning the types and details of MELSEC-Q/L/QnA Programming Manual
instructions for the PID control function (PID Control Instructions)
Learning the types and details of the MELSEC-Q Programming/Structured
process control instructions Programming Manual (Process Control
Instructions)
Using SFC Learning details of specifications, MELSEC-Q/L/QnA Programming Manual
language functions, and instructions of SFC (SFC)
(MELSAP3)
Using structured Learning the fundamentals for creating MELSEC-Q/L/F Structured Programming
ladder/FBD or a structured program Manual (Fundamentals)
structured text
Learning the types and details of MELSEC-Q/L Structured Programming
language
common instructions Manual (Common Instructions)
Learning the types and details of MELSEC-Q/L Structured Programming Manual for the intelligent function module
instructions for intelligent function Manual (Special Instructions) used
modules
Learning the types and details of Manual for the network module used
instructions for network modules
Learning the types and details of MELSEC-Q/L/QnA Programming Manual
instructions for the PID control function (PID Control Instructions)
Learning the types and details of MELSEC-Q/L Structured Programming
application functions Manual (Application Functions)
Learning the types and details of the MELSEC-Q Programming/Structured
process control instructions Programming Manual (Process Control
Instructions)
1 OVERVIEW
1.1 Purpose of This Manual 11
1.2 Explanation Content in This Manual
This manual explains the programming methods and data used for control of the following modules and PID control using
structured programming technique.
Function/module for explaining an Processing performed by the instruction Reference
instruction
Analog module • Switches the mode. (Offset/gain setting mode or normal mode) Page 33 Analog
• Reads the user range setting offset/gain value. Instruction
• Restores the user range setting offset/gain value.
Positioning module • Restores the absolute position of the specified axis. Page 39 Positioning
• Starts positioning of the specified axis. Instruction
• Executes teaching of the specified axis.
• Writes parameters/positioning data and block start data to a flash ROM.
• Initializes setting data.
Serial communication module • Sends and receives data to and from an external device. Page 51 Serial
• Registers and reads user frames. Communication
Instruction
CC-Link system master/local module • Reads and writes data from and to an intelligent device station on the CC-Link Page 98 Network
system. Dedicated
• Reads and writes data from and to the auto-refresh buffer memory at the master Instruction
station.
• Sets the network parameters.
CC-Link IE network module • Sends and receives data to and from an external device.
• Reads and writes data from and to another station on the CC-Link IE or
MELSECNET/H network module
MELSECNET/H network system.
Ethernet interface module • Reads and clears error information.
• Sends and receives e-mails.
PID control instruction • Sets PID control data and performs PID operation for inexact differential and exact Page 227 PID
differential. CONTROL
• Stops and starts operation of the specified loop. INSTRUCTION
• Changes the parameter of the specified loop.
Socket communication function • Opens/closes a connection. Page 252 SOCKET
• Reads receive data. COMMUNICATION
• Changes the receive mode. FUNCTION
INSTRUCTION
Built-in I/O function Positioning • Starts positioning of the specified axis. Page 272 BUILT-IN
function • Starts OPR of the specified axis. I/O FUNCTION
• Starts JOG operation of the specified axis. INSTRUCTION
• Restores the absolute position of the specified axis.
• Stops the operating axis.
• Changes the speed and the target position of the specified axis.
Counter function • Updates the current value of the specified CH.
• Sets a ring counter lower limit value and a ring counter upper limit value.
• Sets a preset value/latch counter value/sampling counter value.
• Sets the coincidence output No. n point.
• Measures the frequency/rotation speed.
• Stores the measured pulse value.
• Outputs the PWM wave form.
Data logging function • Generates a trigger on the data logging of the specified data logging configuration Page 299 DATA
number. LOGGING
• Resets the LOGTRG instruction of the specified data logging configuration FUNCTION
number. INSTRUCTION
SFC control • Reads comment of an active step in the specified SFC block. Page 301 SFC
• Reads comment of transition condition associated with an active step in the CONTROL
specified SFC block. INSTRUCTION
1 OVERVIEW
12 1.2 Explanation Content in This Manual
1.3 Modules and Versions Applicable to Instructions
This section describes the modules and versions applicable to the instructions explained in this manual. For details of
1
applicable versions, refer to each instruction in Chapter 5
Function/module for explaining an instruction Applicable version/serial
number
Analog module Q64AD, Q68ADV, Q68ADI, Q64AD-GH, Q62AD-DGH, Q68AD-G, Applicable to all versions
Q66AD-DG, Q64ADH, Q64DAH, Q62DAN, Q64DAN, Q68DAVN,
Q68DAIN, Q62DA, Q64DA, Q68DAV, Q68DAI, Q62DA-FG, Q66DA-G,
Q64RD, Q64RD-G, Q64TD, Q64TDV-GH, Q68TD-G-H01, Q68TD-G-
H02, Q68RD3-G, Q61LD, Q68CT, L60AD4, L60AD4-2GH, L60DA4,
L60AD2DA2, L60ADVL8, L60ADIL8, L60DAVL8, L60DAIL8
Positioning module QD75P1N, QD75P2N, QD75P4N, QD75D1N, QD75D2N, QD75D4N, Applicable to all versions
QD75P1, QD75P2, QD75P4, QD75D1, QD75D2, QD75D4, QD75M1,
QD75M2, QD75M4, QD75MH1, QD75MH2, QD75MH4, LD75P1,
LD75P2, LD75P4, LD75D1, LD75D2, LD75D4
Serial communication module QJ71C24N, QJ71C24N-R2, QJ71C24N-R4, QJ71C24, QJ71C24-R2, The modules that can use the
LJ71C24, LJ71C24-R2 UINI instruction are limited.
Page 89 Mode switching
CC-Link system master/local module QJ61BT11N, LJ61BT11 Applicable to all versions
QJ61BT11 The modules that can use the
RLPASET instruction are limited.
The instruction is applicable to
the module of which the function
version is B and the first five
digits of the serial number are
'03042' or higher.
Page 118 Network
parameter setting
CC-Link IE Controller Network module QJ71GP21-SX, QJ71GP21S-SX Applicable to all versions
CC-Link IE Field Network module QJ71GF11-T2, LJ71GF11-T2 Applicable to all versions
MELSECNET/H network module QJ71LP21, QJ71LP21-25, QJ71LP21S-25, QJ71LP21G, QJ71BR11, Applicable to all versions
QJ72LP25-25, QJ72LP25G, QJ72BR15
Ethernet interface module QJ71E71-100, QJ71E71-B5, QJ71E71-B2, LJ71E71-100 Applicable to all versions
CPU module supporting the PID control Q00JCPU, Q00UJCPU, Q00CPU, Q00UCPU, Q01CPU, Q01UCPU, The modules that can use the
instruction Q02CPU, Q02HCPU, Q02UCPU, Q03UDCPU, Q03UDVCPU, instruction are limited.
Q03UDECPU, Q04UDHCPU, Q04UDVCPU, Q04UDPVCPU, Page 227 PID Control
Q04UDEHCPU, Q06HCPU, Q06UDHCPU, Q06UDVCPU, Instruction (Inexact
Q06UDPVCPU, Q06UDEHCPU, Q10UDHCPU, Q10UDEHCPU, Differential),Page 240 PID
Q12HCPU, Q12PRHCPU, Q13UDHCPU, Q13UDVCPU, Control Instruction (Exact
Q13UDPVCPU, Q13UDEHCPU, Q20UDHCPU, Q20UDEHCPU, Differential)
Q25HCPU, Q25PRHCPU, Q26UDHCPU, Q26UDVCPU,
Q26UDPVCPU, Q26UDEHCPU, Q50UDEHCPU, Q100UDEHCPU,
L02SCPU, L02SCPU-P, L02CPU, L02CPU-P, L06CPU, L06CPU-P,
L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT
Built-in Ethernet port QCPU, Built-in Ethernet Q03UDVCPU, Q03UDECPU, Q04UDVCPU, Q04UDPVCPU, The modules that can use the
port LCPU (Built-in Ethernet function) Q04UDEHCPU, Q06UDVCPU, Q06UDPVCPU, Q06UDEHCPU, socket communication function
Q10UDEHCPU, Q13UDVCPU, Q13UDPVCPU, Q13UDEHCPU, instruction are limited when
Q20UDEHCPU, Q26UDVCPU, Q26UDPVCPU, Q26UDEHCPU, using the Built-in Ethernet port
Q50UDEHCPU, Q100UDEHCPU, L02CPU, L02CPU-P, L06CPU, QCPU.
L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT The instruction is applicable to
the module of which the function
version is B and the first five
digits of the serial number are
'11012' or higher.
The instruction is applicable to
all versions when using the Built-
in Ethernet port LCPU.
LCPU (Built-in I/O function) L02SCPU, L02SCPU-P, L02CPU, L02CPU-P, L06CPU, L06CPU-P, Applicable to all versions
L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT
Data logging function Q03UDVCPU, Q04UDVCPU, Q04UDPVCPU, Q06UDVCPU, Applicable to all versions
Q06UDPVCPU, Q13UDVCPU, Q13UDPVCPU, Q26UDVCPU,
Q26UDPVCPU, L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU,
L26CPU-P, L26CPU-BT, L26CPU-PBT
1 OVERVIEW
1.3 Modules and Versions Applicable to Instructions 13
Function/module for explaining an instruction Applicable version/serial
number
CPU module supporting the SFC control Q02CPU, Q02HCPU, Q02PHCPU, Q03UDCPU, Q03UDVCPU, The modules that can use the
instruction Q03UDECPU, Q04UDHCPU, Q04UDVCPU, Q04UDPVCPU, instruction are limited.
Q04UDEHCPU, Q06HCPU, Q06PHCPU, Q06UDHCPU, Q06UDVCPU, Page 301 SFC Step
Q06UDPVCPU, Q06UDEHCPU, Q10UDHCPU, Q10UDEHCPU, Comment Read
Q12HCPU, Q12PHCPU, Q12PRHCPU, Q13UDHCPU, Q13UDVCPU,
Q13UDPVCPU, Q13UDEHCPU, Q20UDHCPU, Q20UDEHCPU,
Q25HCPU, Q25PHCPU, Q25PRHCPU, Q26UDHCPU, Q26UDVCPU,
Q26UDPVCPU, Q26UDEHCPU, Q50UDEHCPU, Q100UDEHCPU
1 OVERVIEW
14 1.3 Modules and Versions Applicable to Instructions
2 INSTRUCTION TABLES
Ò Ó Ô Õ Ö × Ø
Description
Classifies instructions by application.
Indicates the instructions used in a program.
Indicates the arguments of the instruction.
Symbol Name Description
(s), (s1) Source Stores data before operation.
(d), (d1) Destination Indicates the destination of data after operation.
n, n1 Specifies the number of devices and the number of transfers.
(Jn*) Specifies the network number.
(Un*) Specifies the start I/O number of a module.
Indicates the execution target module of each instruction. For details of the icons, refer to Chapter Page 31 HOW TO READ
INSTRUCTIONS.
Indicates the references on which the instructions are explained.
2 INSTRUCTION TABLES
2.1 How to Read Instruction Tables 15
2.2 Module Dedicated Instruction
Analog instruction
Classification Instruction Argument Processing details Executing Reference
name condition
Mode switching G_OFFGAN (Un*), (s) • Moves to the offset/gain setting mode. Page 33
• Moves to the normal mode. G(P)_OFFGAN
GP_OFFGAN
Setting value reading G_OGLOAD (Un*), (s), (d) • Reads the user range settings offset/gain Page 35
value to the programmable controller CPU. G(P)_OGLOA
GP_OGLOAD D
Setting value restoration G_OGSTOR (Un*), (s), (d) • Restores the user range settings offset/gain Page 37
value stored in the programmable controller G(P)_OGSTO
GP_OGSTOR CPU. R
2 INSTRUCTION TABLES
16 2.2 Module Dedicated Instruction
Positioning instruction
Classification Instruction Argument Processing details Executing Reference
name condition
Absolute position restoration Z_ABRST1 (Un*), (s), (d) Restores the absolute position of the specified Page 39
Positioning start ZP_PSTRT1 (Un*), (s), (d) Starts positioning of the specified axis. Page 43
ZP_PSTRT1,
ZP_PSTRT2 (Un*), (s), (d) ZP_PSTRT2,
ZP_PSTRT3,
ZP_PSTRT4
ZP_PSTRT3 (Un*), (s), (d)
Teaching ZP_TEACH1 (Un*), (s), (d) Performs teaching for the specified axis. Page 45
ZP_TEACH1,
ZP_TEACH2 (Un*), (s), (d) ZP_TEACH2,
ZP_TEACH3,
ZP_TEACH4
ZP_TEACH3 (Un*), (s), (d)
Writing to flash ROM ZP_PFWRT (Un*), (s), (d) Writes the positioning module parameters, Page 47
positioning data, and block start data to the ZP_PFWRT
flash ROM.
Setting data initialization ZP_PINIT (Un*), (s), (d) Initializes the positioning module setting data. Page 49
ZP_PINIT
2 INSTRUCTION TABLES
2.2 Module Dedicated Instruction 17
Serial communication instruction
Classification Instruction Argument Processing details Executing Applicable Reference
name condition module
On-demand function G_ONDEMAND (Un*), (s1), (s2), Sends data using the on-demand Page 51
transmission (d) function of MC protocol. Serial G(P)_ONDE
MAND
GP_ONDEMAN (Un*), (s1), (s2), Modem
D (d)
Nonprocedural protocol G_OUTPUT (Un*), (s1), (s2), Sends the specified number of data. Page 54
communication (d) Serial G(P)_OUTP
UT
GP_OUTPUT (Un*), (s1), (s2), Modem
(d)
G_INPUT (Un*), (s), (d1), Reads the received data. Page 57
(d2) G_INPUT
Bidirectional protocol G_BIDOUT (Un*), (s1), (s2), Sends the specified number of data. Page 59
communication (d) Serial G(P)_BIDOU
T
GP_BIDOUT (Un*), (s1), (s2), Modem
(d)
G_BIDIN (Un*), (s), (d1), Reads received data. Page 61
(d2) G(P)_BIDIN
GP_BIDIN (Un*), (s), (d1),
(d2)
Communication status G_SPBUSY (Un*), (d) Reads the data transmission/reception Page 63
check status using the instruction. Serial G(P)_SPBU
GP_SPBUSY (Un*), (d) SY
Modem
Receive data clear ZP_CSET (Un*), (s1), (s2), Clears receive data without stopping Page 64
(d1), (d2) transmission using the nonprocedural Serial ZP_CSET
protocol.
Modem
Data transmission/ Z_BUFRCVS (Un*), (s), (d) Receives data with an interrupt Page 66
reception program using the nonprocedural Serial Z_BUFRCVS
protocol or bidirectional protocol.
Modem
G_PRR (Un*), (s), (d) Sends data by user frame according to Page 68
the specification in user frame G(P)_PRR
GP_PRR (Un*), (s), (d) specification area for transmission
using the nonprocedural protocol.
Initial setting ZP_CSET (Un*), (s1), (s2), Sets the unit (word/byte) of the number Page 72
(d1), (d2) of the data to be sent or received. Serial ZP_CSET
Modem
Programmable controller ZP_CSET (Un*), (s1), (s2), Registers and cancels the Page 75
CPU monitor (d1), (d2) programmable controller CPU Serial ZP_CSET
monitoring for using the programmable
Modem
controller CPU monitoring function.
Flash ROM user frame G_PUTE (Un*), (s1), (s2), Registers a user frames to the flash Page 83
registration/reading (d) ROM. Serial G(P)_PUTE
GP_PUTE (Un*), (s1), (s2), Modem
(d)
G_GETE (Un*), (s1), (s2), Reads a user frames from the flash Page 86
(d) ROM. G(P)_GETE
GP_GETE (Un*), (s1), (s2),
(d)
Mode switching ZP_UINI (Un*), (s), (d) Switches the mode, transmission Page 89
specification, and host station number. Serial ZP_UINI
Pre-defined protocol G_CPRTCL (Un*), n1, n2, (s), Executes the protocols and functional Page 95
communication (d) protocols written to the flash ROM. Serial G(P)_CPRT
CL
GP_CPRTCL (Un*), n1, n2, (s),
(d)
2 INSTRUCTION TABLES
18 2.2 Module Dedicated Instruction
Network dedicated instruction
Classification Instruction Argument Processing details Executing Applicable Reference
name condition module
Reading from the buffer J_RIRD (Jn*), (s), (d1), Reads data for the specified number of Page 98
CC IE C
memory of an intelligent
device station
JP_RIRD
(d2)
CC IE F
CC IE C
CC IE C
CC IE F
Writing to the buffer J_RIWT (Jn*), (s1), (s2), Writes data for the specified number of Page 102
memory of an intelligent (d) points to the buffer memory or device of CC IE C J(P)_RIWT,
device station the specified station. G(P)_RIWT
JP_RIWT (Jn*), (s1), (s2),
(d) CC IE C
CC IE F
CC IE C
CC IE C
CC IE F
Reading from the buffer G_RIRCV (Un*), (s1), (s2), Automatically performs handshaking Page 106
memory of an intelligent (d1), (d2) with the specified station and reads CC-Link G(P)_RIRCV
device station GP_RIRCV (Un*), (s1), (s2), data from the buffer memory of the
(with handshake) (d1), (d2) specified station.
This instruction is applicable with a
module having a handshake signal,
such as the AJ65BT-R2(N).
Writing to the buffer G_RISEND (Un*), (s1), (s2), Automatically performs handshaking Page 110
memory of an intelligent (d1), (d2) with the specified station and writes CC-Link G(P)_RISEN
device station GP_RISEND (Un*), (s1), (s2), data to the buffer memory of the D
(with handshake) (d1), (d2) specified station.
This instruction is applicable with a
module having a handshake signal,
such as the AJ65BT-R2(N).
Reading from the auto- G_RIFR (Un*), n1, n2, n3, Reads data from the auto-refresh buffer Page 114
refresh buffer memory of (d) memory of the specified station. CC-Link G(P)_RIFR
the master station GP_RIFR (Un*), n1, n2, n3, This instruction is applicable with a
(d) module having an auto-refresh buffer,
such as the AJ65BT-R2.
Writing to the auto- G_RITO (Un*), n1, n2, n3, Writes data to the auto-refresh buffer Page 116
refresh buffer memory of (d) memory of the specified station. CC-Link G(P)_RITO
the master station GP_RITO (Un*), n1, n2, n3, This instruction is applicable with a
(d) module having an auto-refresh buffer,
such as the AJ65BT-R2.
Network parameter G_RLPASET (Un*), (s1), (s2), Sets network parameter to the master Page 118
setting (s3), (s4), (s5), station and starts up the data link. CC-Link G(P)_RLPAS
(d) ET
GP_RLPASET (Un*), (s1), (s2),
(s3), (s4), (s5),
(d)
2 INSTRUCTION TABLES
2.2 Module Dedicated Instruction 19
Classification Instruction Argument Processing details Executing Applicable Reference
name condition module
Device data read/write J_READ (Jn*), (s1), (s2), Reads data from a word device of Page 125
(d1), (d2) another station. CC IE C J(P)_READ,
G(P)_READ
JP_READ (Jn*), (s1), (s2), CC IE F
(d1), (d2)
NET/H
G_READ (Un*), (s1), (s2),
(d1), (d2) Ether
GP_READ (Un*), (s1), (s2),
(d1), (d2)
J_SREAD (Jn*), (s1), (s2), Reads data from a device of another Page 130
(d1), (d2), (d3) station (with completion device). J(P)_SREAD
,
JP_SREAD (Jn*), (s1), (s2),
G(P)_SREA
(d1), (d2), (d3)
D
G_SREAD (Un*), (s1), (s2),
(d1), (d2), (d3)
GP_SREAD (Un*), (s1), (s2),
(d1), (d2), (d3)
J_WRITE (Jn*), (s1), (s2), Writes data to a device of another Page 134
(s3), (d1) station. J(P)_WRITE,
G(P)_WRITE
JP_WRITE (Jn*), (s1), (s2),
(s3), (d1)
G_WRITE (Un*), (s1), (s2),
(s3), (d1)
GP_WRITE (Un*), (s1), (s2),
(s3), (d1)
J_SWRITE (Jn*), (s1), (s2), Writes data to a device of another Page 140
(d1), (d2), (d3) station (with completion device). J(P)_SWRIT
JP_SWRITE (Jn*), (s1), (s2), E,
(d1), (d2), (d3) G(P)_SWRIT
E
G_SWRITE (Un*), (s1), (s2),
(d1), (d2), (d3)
GP_SWRITE (Un*), (s1), (s2),
(d1), (d2), (d3)
Message (user-specified J_SEND (Jn*), (s1), (s2), Sends data to another station. Page 144
data) communication (d) CC IE C J(P)_SEND,
G(P)_SEND
JP_SEND (Jn*), (s1), (s2), CC IE F
(d)
NET/H
G_SEND (Un*), (s1), (s2),
(d) Ether
GP_SEND (Un*), (s1), (s2),
(d)
J_RECV (Jn*), (s), (d1), Reads received data from another Page 150
(d2) station J(P)_RECV,
(for main program). G(P)_RECV
JP_RECV (Jn*), (s), (d1),
(d2)
G_RECV (Un*), (s), (d1),
(d2)
GP_RECV (Un*), (s), (d1),
(d2)
Z_RECVS (Un*), (s1), (s2), Reads received data from another Page 154
(d) station Z_RECVS
(for interrupt program)
2 INSTRUCTION TABLES
20 2.2 Module Dedicated Instruction
Classification Instruction Argument Processing details Executing Applicable Reference
name condition module
Transient request to J_REQ (Jn*), (s1), (s2), Executes remote RUN/STOP for Page 157
another station (d1), (d2) another station. CC IE C J(P)_REQ,
Reads/writes clock data from another G(P)_REQ
JP_REQ (Jn*), (s1), (s2),
station. CC IE C
(d1), (d2)
CC IE F 2
NET/H
Ether
CC IE F
NET/H
Ether
Read from other station J_ZNRD (Un*), n1, (s), n2, Reads data from a device of a Page 165
devices (d1), (d2) programmable controller on another CC IE C J(P)_ZNRD
station.
JP_ZNRD (Un*), n1, (s), n2, NET/H
(In units of words)
(d1), (d2)
Ether
Write to other station J_ZNWR (Un*), n1, (s), n2, Writes data to a device of a Page 168
devices (d1), (d2) programmable controller on another J(P)_ZNWR
station.
JP_ZNWR (Un*), n1, (s), n2,
(d1), (d2) (In units of words)
Remote RUN Z_RRUN_J (Jn*), (s1), (s2), Executes remote RUN for a CPU Page 171
(s3), (s4), (d) module on another station. CC IE C Z(P)_RRUN_
J,
ZP_RRUN_J (Jn*), (s1), (s2), NET/H
Z(P)_RRUN_
(s3), (s4), (d)
U
Z_RRUN_U (Un*), (s1), (s2),
(s3), (s4), (d)
ZP_RRUN_U (Un*), (s1), (s2),
(s3), (s4), (d)
Remote STOP Z_RSTOP_J (Jn*), (s1), (s2), Executes remote STOP for a CPU Page 174
(s3), (s4), (d) module on another station. CC IE C Z(P)_RSTOP
_J,
ZP_RSTOP_J (Jn*), (s1), (s2), NET/H
(s3), (s4), (d) Z(P)_RSTOP
_U
Z_RSTOP_U (Un*), (s1), (s2),
(s3), (s4), (d)
ZP_RSTOP_U (Un*), (s1), (s2),
(s3), (s4), (d)
Reading clock data from Z_RTMRD_J (Jn*), (s1), (s2), Reads clock data from a CPU module Page 177
another station (s3), (d1), (d2) on another station. CC IE C Z(P)_RTMR
ZP_RTMRD_J (Jn*), (s1), (s2), D_J,
NET/H
Z(P)_RTMR
(s3), (d1), (d2)
D_U
Z_RTMRD_U (Un*), (s1), (s2),
(s3), (d1), (d2)
ZP_RTMRD_U (Un*), (s1), (s2),
(s3), (d1), (d2)
Writing clock data to Z_RTMWR_J (Jn*), (s1), (s2), Writes clock data to a CPU module on Page 179
another station (s3), (s4), (d) another station. CC IE C Z(P)_RTMW
ZP_RTMWR_J (Jn*), (s1), (s2), R_J,
NET/H
Z(P)_RTMW
(s3), (s4), (d)
R_U
Z_RTMWR_U (Un*), (s1), (s2),
(s3), (s4), (d)
ZP_RTMWR_U (Un*), (s1), (s2),
(s3), (s4), (d)
2 INSTRUCTION TABLES
2.2 Module Dedicated Instruction 21
Classification Instruction Argument Processing details Executing Applicable Reference
name condition module
Reading from buffer Z_REMFR (Jn*), n1, n2, n3, Reads data from the buffer memory of Page 182
memory of intelligent n4, n5, (d1), (d2) an intelligent function module on the NET/H Z(P)_REMF
function module on remote I/O station. R
ZP_REMFR (Jn*), n1, n2, n3,
remote I/O station CC IE F
n4, n5, (d1), (d2)
NET/H
Writing to buffer memory Z_REMTO (Jn*), n1, n2, n3, Writes data to the buffer memory of an Page 185
of intelligent function n4, n5, (d1), (d2) intelligent function module on the NET/H Z(P)_REMT
module on remote I/O remote I/O station. O
ZP_REMTO (Jn*), n1, n2, n3,
station CC IE F
n4, n5, (d1), (d2)
NET/H
Setting parameter G_CCPASET (Un*), (s1), (s2), Set parameters for master/local Page 188
(s3), (s4), (d) modules (master station). CC IE F G(P)_CCPA
SET
GP_CCPASET (Un*), (s1), (s2),
(s3), (s4), (d)
Connection opening or ZP_OPEN (Un*), (s1), (s2), Opens a connection. Page 194
closing (d) Ether ZP_OPEN
ZP_CLOSE (Un*), (s1), (s2), Closes a connection. Page 198
(d) ZP_CLOSE
Fixed buffer ZP_BUFRCV (Un*), (s1), (s2), Reads received data. Page 201
communication (d1), (d2) (for main program). Ether ZP_BUFRCV
Z_BUFRCVS (Un*), (s), (d) Reads received data. Page 204
(for interrupt program) Z_BUFRCVS
ZP_BUFSND (Un*), (s1), (s2), Sends data. Page 206
(s3), (d) ZP_BUFSND
Reading or clearing error ZP_ERRCLR (Un*), (s), (d) Clears error information. Page 209
information Ether ZP_ERRCLR
ZP_ERRRD (Un*), (s), (d) Reads error information. Page 212
ZP_ERRRD
Re-initialization/station Z_UINI (Un*), (s), (d) • Executes re-initialization. Page 214
number setting/changing • Sets the host station number. CC IE C Z(P)_UINI
switch setting • Changes the switch setting.
ZP_UINI (Un*), (s), (d)
CC IE C
Ether
E-mail communication ZP_MRECV (Un*), (s), (d1), Reads received e-mail. Page 218
(d2) Ether ZP_MRECV
ZP_MSEND (Un*), (s1), (s2), Sends an e-mail. Page 221
(d) ZP_MSEND
2 INSTRUCTION TABLES
22 2.2 Module Dedicated Instruction
2.3 PID Control Instruction
PID control instruction (inexact differential)
Classification Instruction
name
Argument Processing details Executing
condition
Reference
2
Data setting S_PIDINIT (s) Sets data to be used for PID operation. Page 227
S(P)_PIDINIT
SP_PIDINIT (s)
PID operation S_PIDCONT (s) Performs PID operation based on the set value Page 232
(SV) and process value (PV). S(P)_PIDCON
SP_PIDCONT (s) T
PID operation stop S_PIDSTOP n Stops the PID operation for the specified loop Page 236
number. S_PIDSTOP,
SP_PIDSTOP n S_PIDRUN
PID operation start S_PIDRUN n Starts the PID operation for the specified loop
number.
SP_PIDRUN n
Operation parameter change S_PIDPRMW n, (s) Changes operation parameter of the specified Page 237
loop number. S(P)_PIDPRM
SP_PIDPRMW n, (s) W
PID operation PIDCONT (s) Performs PID operation based on the set value Page 244
(SV) and process value (PV). PIDCONT(P)
PIDCONTP (s)
PID operation stop PIDSTOP n Stops the PID operation for the specified loop Page 248
number. PIDSTOP,
PIDSTOPP n PIDRUN
PID operation start PIDRUN n Starts the PID operation for the specified loop
number.
PIDRUNP n
Operation parameter change PIDPRMW n, (s) Changes operation parameter of the specified Page 249
loop number. PIDPRMW(P)
PIDPRMWP n, (s)
2 INSTRUCTION TABLES
2.3 PID Control Instruction 23
2.4 Socket Communication Function Instruction
Classification Instruction Argument Processing details Executing Reference
name condition
Opening/closing connection SP_SOCOPEN (Un*), (s1), (s2), Establishes a connection. Page 252
(d) SP_SOCOPEN
SP_SOCCLOS (Un*), (s1), (s2), Shuts a connection off. Page 255
E (d) SP_SOCCLOS
E
Reading receive data SP_SOCRCV (Un*), (s1), (s2), Reads receive data. (Reading at the end Page 257
(d1), (d2) process) SP_SOCRCV
S_SOCRCVS (Un*), (s), (d) Reads receive data. (Reading at the instruction Page 259
execution) S_SOCRCVS
Sending data SP_SOCSND (Un*), (s1), (s2), Sends data. Page 261
(s3), (d) SP_SOCSND
Reading connection information SP_SOCCINF (Un*), (s1), (s2), Reads connection information. Page 264
(d) SP_SOCCINF
Changing destination SP_SOCCSET (Un*), (s1), (s2) Changes a destination of a UDP/IP connection. Page 266
SP_SOCCSET
Changing receive mode SP_SOCRMOD (Un*), (s1), (s2) Changes the receive mode of a connection. Page 268
E SP_SOCRMO
DE
Reads data from the receive S_SOCRDATA (Un*), (s1), (s2), Reads data from the receive data area. Page 270
data area. n, (d) S(P)_SOCRDA
SP_SOCRDAT TA
A
2 INSTRUCTION TABLES
24 2.4 Socket Communication Function Instruction
2.5 Built-in I/O Function Instruction
Positioning function dedicated instruction
Classification Instruction
name
Argument Processing details Executing
condition
Reference
2
Positioning start IPPSTRT1 n Specifies a data number to be executed from Page 272
"Positioning Data" No. 1 to No. 10 which are IPPSTRT1,
IPPSTRT1P n previously set in GX Works2, and starts the IPPSTRT2
positioning.
IPPSTRT2 n
IPPSTRT2P n
IPDSTRT2P (s)
IPSIMUL n1, n2 Starts the positioning of the axis 1 "Positioning Page 275
Data" number and the axis 2 "Positioning Data" IPSIMUL(P)
IPSIMULP n1, n2 number simultaneously.
OPR start IPOPR1 (s) Specifies a method and starts the OPR of the Page 276
specified axis. IPOPR1,
IPOPR1P (s) IPOPR2
IPOPR2 (s)
IPOPR2P (s)
JOG start IPJOG1 (s1), (s2) Starts the JOG operation of the specified axis. Page 278
IPJOG1,
IPJOG2 (s1), (s2) IPJOG2
Absolute position restoration IPABRST1 (s), (d) Executes the absolute position restoration of Page 280
the specified axis. IPABRST1,
IPABRST2 (s), (d) IPABRST2
Speed change IPSPCHG1 (s) Changes the speed of the specified axis. Page 283
IPSPCHG1,
IPSPCHG1P (s) IPSPCHG2
IPSPCHG2 (s)
IPSPCHG2P (s)
Target position change IPTPCHG1 (s) Changes the target position of the specified Page 285
axis. IPTPCHG1,
IPTPCHG1P (s) IPTPCHG2
IPTPCHG2 (s)
IPTPCHG2P (s)
2 INSTRUCTION TABLES
2.5 Built-in I/O Function Instruction 25
Counter function dedicated instruction
Classification Instruction Argument Processing details Executing Reference
name condition
Current value read ICCNTRD1 Stores the most recent value for the current Page 287
value of the specified CH. ICCNTRD1,
ICCNTRD1P ICCNTRD2
ICCNTRD2
ICCNTRD2P
Ring counter upper/lower limit ICRNGWR1 (s1), (s2) Sets a ring counter lower limit value and upper Page 288
value write limit value of the specified CH. ICRNGWR1,
ICRNGWR1P (s1), (s2) ICRNGWR2
Preset value write ICPREWR1 (s) Sets a preset value of the specified CH. Page 290
ICPREWR1,
ICPREWR1P (s) ICPREWR2
ICPREWR2 (s)
ICPREWR2P (s)
Latch counter value read ICLTHRD1 n, (d) Stores a latch counter value of the specified Page 291
CH. ICLTHRD1,
ICLTHRD1P n, (d) ICLTHRD2
ICLTHRD2 n, (d)
ICLTHRD2P n, (d)
Sampling counter value read ICSMPRD1 (d) Stores a sampling counter value of the Page 292
specified CH. ICSMPRD1,
ICSMPRD1P (d) ICSMPRD2
ICSMPRD2 (d)
ICSMPRD2P (d)
Coincidence output point write ICCOVWR1 n, (s) Sets a coincidence output No. n point of the Page 293
specified CH. ICCOVWR1,
ICCOVWR1P n, (s) ICCOVWR2
ICCOVWR2 n, (s)
ICCOVWR2P n, (s)
Frequency measurement ICFCNT1 (d) Measures the frequency of the specified CH. Page 294
ICFCNT1,
ICFCNT2 (d) ICFCNT2
Rotation speed measurement ICRCNT1 (d) Measures the rotation speed of the specified Page 295
CH. ICRCNT1,
ICRCNT2 (d) ICRCNT2
2 INSTRUCTION TABLES
26 2.5 Built-in I/O Function Instruction
Classification Instruction Argument Processing details Executing Reference
name condition
Pulse measurement read ICPLSRD1 (d) Stores the measured pulse value of the Page 296
specified CH. ICPLSRD1,
ICPLSRD1P (d) ICPLSRD2
ICPLSRD2 (d)
2
ICPLSRD2P (d)
PWM output ICPWM1 (s1), (s2) Outputs the PWM waveform of the specified Page 297
CH. ICPWM1,
ICPWM2 (s1), (s2) ICPWM2
2 INSTRUCTION TABLES
2.5 Built-in I/O Function Instruction 27
2.6 Data Logging Function Instruction
Classification Instruction Argument Processing details Executing Reference
name condition
Trigger logging set/reset LOGTRG n Generates the trigger conditions in a trigger Page 299
logging. Stores the data sampling results to the LOGTRG
data logging file for the number of times Instruction,
specified in the trigger logging configuration of LOGTRGR
the programming tool. Instruction
LOGTRGR n Resets the trigger conditions
2 INSTRUCTION TABLES
28 2.6 Data Logging Function Instruction
3 CONFIGURATION OF INSTRUCTIONS
Instructions available in the CPU module can be divided into an instruction name and an argument.
The application of an instruction name and an argument are as follows:
• Instruction name
Indicates the function of the instruction.
• Argument
Indicates the I/O data used in the instruction. 3
Arguments are classified into I/O number, source data, destination data, number of devices, executing condition, and
execution result.
I/O number
I/O number is data that set a module in which the instruction is to be executed.
Set the I/O number by start I/O number or a network number of the module depending on the instruction.
Ex.
For the module whose start I/O number is 020H: 02
Ex.
For the module whose start I/O number is 020H: "02"
Ex.
When the network number is 1: 1
3 CONFIGURATION OF INSTRUCTIONS
29
Source (s)
A source is data used in an operation.
The following source types are available depending on the device specified in an instruction:
Type Description
Constant Specifies a numeric value used in an operation. Constants are set during
programming so that they cannot be changed while the program is being
executed. Perform index modification when using them as variable data.
Bit device and word device Specifies the device in which the data used in the operation are stored. Data
must be stored to the specified device before executing the operation. By
changing the data to be stored to the specified device while a program is
being executed, the data used in the instruction can be changed.
The instructions explained in this manual use special data. Refer to the explanation for each instruction and use data
correctly.
Destination (d)
Data after the operation are stored to a destination.
Set a device in which data are to be stored to a destination.
The instructions explained in this manual use special data. Refer to the explanation for each instruction and use data
correctly.
For details of the configuration of instructions for labels and structures, refer to the following.
MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
3 CONFIGURATION OF INSTRUCTIONS
30
4 HOW TO READ INSTRUCTIONS
Chapter 5 provides detailed explanation on each instruction in the layout as shown below.
Ó
Ô
Õ
CC-Link LCPU
CC-Link LCPU
Indicates the names of input and output arguments, and the data type of each argument. For details of each data type, refer
to the following.
MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
Devices that can be used in the instruction are marked with .
The following table shows applicable classification for usable devices.
Device Internal device (system, File Link direct device Intelligent Index Constant*5 Others *5
classification user) register J\*4*6 function register Zn
Bit Word R, ZR Bit Word module
U\G
Usable device *1 X, Y, M, L, T*3, ST*3, R, ZR J\X J\W U\G Z K, H, E, $, P, I, J, U, DX,
SM, F, B, SB, C*3, D, W, J\Y J\SW DY, N, BL,
FX, FY*2*2 SD, SW, J\B TR, BL\S, V
FD*2, @ J\SB
*1 For description of each device, refer to the User's Manual (Function Explanation, Program Fundamentals) of the CPU module currently
being used.
*2 FX and FY can be used in bit data only, and FD can be used in word data only in the PID control instruction.
*3 T, ST, and C can be used in word data only (cannot be used in bit data).
*4 These devices can be used in CC-Link IE, MELSECNET/H, and MELSECNET/10.
*5 The Constant and Others columns describe settable devices.
*6 Link direct devices (J\) cannot be used for LCPU.
Indicates the processing performed by the instruction.
Indicates data such as control data, send data or receive data, that are used for an input argument or output argument in an
instruction.
The setting side indicates the following:
• User : Data set by user before dedicated instruction execution
• System : Data stored by the programmable controller CPU after dedicated instruction execution. The setting does not need
to be set by the user. If the setting is set by the user, data cannot be read normally.
Indicates the program examples of structured ladder/FBD/ST.
G(P)_OFFGAN
Structured ladder/FBD ST
G_OFFGAN
EN ENO
ENO:= G_OFFGAN (EN, Un*, s);
Un*
5
s
■Executing condition
Instruction Executing condition
G_OFFGAN
GP_OFFGAN
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Mode switching ANY16
0: To normal mode
1: To offset/gain setting mode
Output argument ENO Execution result Bit
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction converts the mode of analog modules. (normal mode to offset/gain setting mode, offset/gain setting mode to
normal mode)
Sets mode
when Var_Flag
turns ON
Converts mode
Sets mode
when Var_Flag
turns OFF
Converts mode
[ST]
(* Convert to the offset/gain setting mode *)
IF(Var_Flag=TRUE)THEN (* Var_Flag ON *)
MOVP(TRUE,1,Var_ControlData); (* Sets mode *)
G_OFFGAN(TRUE,H00,Var_ControlData); (* Converts mode *)
END_IF;
IF(X0A=TRUE)THEN
G(P)_OGLOAD
Structured ladder/FBD ST
G_OGLOAD
EN ENO
ENO:= G_OGLOAD (EN, Un*, s, d);
Un* d
■Executing condition
5
Instruction Executing condition
G_OGLOAD
GP_OGLOAD
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..35]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads the user range settings offset/gain values of analog modules to the CPU.
Setting data
For the control data, refer to the manual for each module used.
Specifies voltage
when instruction
flag turns ON
Turns execution flag ON
Performs readout
Normal completion
Turns execution flag OFF
Error completion
Process on error completion
[ST]
IF(Var_Flag_Inst=TRUE)THEN (* Instruction flag ON *)
G(P)_OGSTOR
Structured ladder/FBD ST
G_OGSTOR
EN ENO
ENO:= G_OGSTOR (EN, Un*, s, d);
Un* d
■Executing condition
5
Instruction Executing condition
G_OGSTOR
GP_OGSTOR
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..35]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction restores the user range settings offset/gain values stored in the programmable controller CPU to the analog
modules.
Setting data
For the control data, refer to the manual for each module used.
Turns execution
flag ON
Normal completion
Turns execution
flag OFF
[ST]
IF(Var_Flag_Inst=TRUE)THEN (* Instruction flag ON *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
END_IF;
Structured ladder/FBD ST
Z_ABRST1
EN ENO
ENO:= Z_ABRST1 (EN, Un*, s,d);
Un* d
■Executing condition
Instruction Executing condition
Z_ABRST1, Z_ABRST2, Z_ABRST3,
Z_ABRST4
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..7]
Output argument ENO Execution result Bit
(TRUE: Normal, FALSE: Error)
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
Processing details
This instruction restores the absolute position of the specified axis. (Refer to the following)
• Z_ABRST1: Axis 1
• Z_ABRST2: Axis 2
• Z_ABRST3: Axis 3
• Z_ABRST4: Axis 4
Program example
The following program restores the absolute position of the axis 1.
The devices from X47 to X49 and from Y50 to Y52 are used for the communication with the servo amplifier.
X47: ABS data bit0
X48: ABS data bit1
X49: Send data READY flag
Y50: Servo ON
Y51: ABS transfer mode
Y52: ABS request flag
Absolute position
restoration pulse
Turns absolute
position restoration
memory ON
Clears completion
status
5
Sets ABS data
Sets ABS data in data b0
received from the servo
Restores absolute
position
IF(Var_ControlData[4]=0)THEN
RST(TRUE, Var_Flag_Mem); (* Turns absolute position restoration memory OFF *)
END_IF;
END_IF;
Structured ladder/FBD ST
ZP_PSTRT1
EN ENO
ENO:= ZP_PSTRT1 (EN, Un*, s,d);
Un* d
■Executing condition
5
Instruction Executing condition
ZP_PSTRT1, ZP_PSTRT2, ZP_PSTRT3,
ZP_PSTRT4
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..2]
Output argument ENO Execution result Bit
(TRUE: Normal, FALSE: Error)
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
Processing details
This instruction starts positioning of the specified axis. (Refer to the following.)
• ZP_PSTRT1: Axis 1
• ZP_PSTRT2: Axis 2
• ZP_PSTRT3: Axis 3
• ZP_PSTRT4: Axis 4
Program example
• The following program executes the positioning start of the positioning data number 1 when X100 turns ON.
[Structured ladder/FBD]
Positioning start
pulse
Turns positioning
start instruction
memory ON
Performs
positioning start
Turns positioning
start instruction
memory OFF
[ST]
PLS(X100, Var_Flag_Inst); (* Positioning start pulse *)
IF(Var_Flag_Inst=TRUE)THEN
MOVP(TRUE, 1, Var_ControlData[2]); (* Sets start signal number 1 *)
SET(TRUE, Var_Flag_Mem); (* Turns positioning start instruction memory ON *)
END_IF;
Structured ladder/FBD ST
ZP_TEACH1
EN ENO
ENO:= ZP_TEACH1 (EN, Un*, s,d);
Un* d
■Executing condition
5
Instruction Executing condition
ZP_TEACH1, ZP_TEACH2, ZP_TEACH3,
ZP_TEACH4
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
00 to FE: Higher two digits when expressing the I/O
number in three digits)
s Variable that stores control data Array of ANY16 [0..3]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
Processing details
This instruction performs teaching for the specified axis. (Refer to the following)
• ZP_TEACH1: Axis 1
• ZP_TEACH2: Axis 2
• ZP_TEACH3: Axis 3
• ZP_TEACH4: Axis 4
Setting data
Device Item Setting data Setting range Setting side
(s)[0] System area
(s)[1] Completion status The instruction completion status is stored. System
• 0: Normal completion
• Other than 0: Error completion (error code)
(s)[2] Teaching data selection Set the address (positioning address/circular address) to 0, 1 User
which the current feed value is written.
0: Write the current feed value to the positioning address
1: Write the current feed value to the circular address
(s)[3] Positioning data No. Set the positioning data number for which teaching is 1 to 600 User
performed.
Teaching instruction
pulse
Turns teaching
instruction memory
ON
Sets positioning
data number
Performs teaching
Turns teaching
instruction memory
OFF
[ST]
PLS(X39, Var_Flag_Inst); (* Teaching instruction pulse *)
IF((Var_Flag_Inst=TRUE)&(X0C=FALSE))THEN
SET(TRUE, Var_Flag_Mem); (* Turns teaching instruction memory ON *)
END_IF;
IF((Var_Result[0]=TRUE)&(Var_Result[1]=FALSE))THEN
RST(TRUE, Var_Flag_Mem); (* Turns teaching instruction memory OFF *)
END_IF;
END_IF;
ZP_PFWRT
Structured ladder/FBD ST
ZP_PFWRT
EN ENO
ENO:= ZP_PFWRT (EN, Un*, s,d);
Un* d
■Executing condition
5
Instruction Executing condition
ZP_PFWRT
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..1]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
Processing details
This instruction writes the positioning module parameters, positioning data, and block start data to the flash ROM.
Setting data
Device Item Setting data Setting range Setting side
(s)[0] System area
(s)[1] Completion status The instruction completion status is stored. System
• 0: Normal completion
• Other than 0: Error completion (error code)
[ST]
PLS(X3D, Var_Flag_Inst); (* Write to flash ROM instruction pulse *)
IF((Var_Flag_Inst=TRUE)&(X0C=FALSE))THEN
SET(TRUE, Var_Flag_Mem); (* Turns write to flash ROM instruction memory ON *)
END_IF;
IF((Var_Flag_Mem=TRUE)&(Y0=FALSE))THEN
OUT_T(TRUE, TC1, 2); (* Waits output of programmable controller ready for the positioning module *)
END_IF;
IF((Var_Result[0]=TRUE)&(Var_Result[1]=FALSE))THEN
RST(TRUE, Var_Flag_Mem); (* Turns write to flash ROM instruction memory OFF *)
END_IF;
END_IF;
ZP_PINIT
Structured ladder/FBD ST
ZP_PINIT
EN ENO
ENO:= ZP_PINIT (EN, Un*, s,d);
Un* d
■Executing condition
5
Instruction Executing condition
ZP_PINIT
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..1]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
Processing details
This instruction initializes the positioning module setting data.
Setting data
Device Item Setting data Setting range Setting side
(s)[0] System area
(s)[1] Completion status The instruction completion status is stored. System
• 0: Normal completion
• Other than 0: Error completion (error code)
[ST]
PLS(X3C, Var_Flag_Inst); (* Parameter initialization instruction pulse *)
IF((Var_Flag_Inst=TRUE)&(X0C=FALSE))THEN
SET(TRUE, Var_Flag_Mem); (* Turns parameter initialization instruction memory ON *)
END_IF;
IF((Var_Flag_Mem=TRUE)&(Y0=FALSE))THEN
OUT_T(TRUE, TC0, 2); (* Waits output of programmable controller ready for the positioning module *)
END_IF;
IF((Var_Result[0]=TRUE)&(Var_Result[1]=FALSE))THEN
RST(TRUE, Var_Flag_Mem); (* Turns parameter initialization instruction memory OFF *)
END_IF;
END_IF;
G(P)_ONDEMAND
Serial Modem
Structured ladder/FBD ST
G_ONDEMAND
EN ENO
ENO:= G_ONDEMAND (EN, Un*, s1, s2, d);
Un* d
s1
5
s2
■Executing condition
Instruction Executing condition
G_ONDEMAND
GP_ONDEMAND
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..2]
s2 Start number of the device that stores send data ANY16
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sends data using the on-demand function of MC protocol.
Program example
• The following program sends data of devices from D10 to D11 using the on-demand function. (For the Q series C24 whose
I/O signals are X/Y00 to X/Y1F)
[Structured ladder/FBD]
On-demand transmission
instruction pulse
Sets transmission
channel to 1
Performs on-demand
function transmission
G(P)_OUTPUT
Serial Modem
Structured ladder/FBD ST
G_OUTPUT
EN ENO
ENO:= G_OUTPUT (EN, Un*, s1, s2, d);
Un* d
s1
s2
■Executing condition
Instruction Executing condition
G_OUTPUT
GP_OUTPUT
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..2]
s2 Start number of the device that stores send data ANY16
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sends data in the message format specified by the user using the nonprocedural protocol.
Setting data
Device Item Setting data Setting range Setting side
(s1)[0] Transmission channel Set the transmission channel. 1, 2 User
1: Channel 1 (CH1 side)
2: Channel 2 (CH2 side)
(s1)[1] Transmission result The instruction completion status is stored. System
0: Normal completion
Other than 0: Error completion (error code)
(s1)[2] Number of send data Set the number of send data. 1 or more User
Transmission
instruction pulse
5
Sets transmission
channel to 1
Sends data
IF (Var_Flag_Inst=TRUE) THEN
MOV(TRUE, H4241, D11); (* Sets send data *)
MOV(TRUE, H4443, D12);
MOV(TRUE, H4645, D13);
MOV(TRUE, H0047, D14);
MOV(TRUE, H0AD, D15);
MOV(TRUE, 1, Var_ControlData[0]); (* Sets transmission channel to 1 *)
MOV(TRUE, 5, Var_ControlData[2]); (* Sets number of send data to 5 words *)
G_OUTPUT(TRUE, H0, Var_ControlData, D11, Var_Result); (* Sends data *)
END_IF;
IF (X21=TRUE) THEN
RST( TRUE, Var_Flag_Normal ); (* Turns normal completion flag OFF *)
RST( TRUE, Var_Flag_Error ); (* Turns error completion flag OFF *)
END_IF;
Structured ladder/FBD ST
G_INPUT
EN ENO
ENO:= G_INPUT (EN, Un*, s, d1, d2);
Un* d1
s d2
■Executing condition
Instruction Executing condition 5
G_INPUT
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..3]
Output argument ENO Execution result Bit
d1 Start number of the device that stores read data ANY16
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction receives data in the message format specified by the user using the nonprocedural protocol.
Setting data
Device Item Setting data Setting range Setting side
(s)[0] Reception channel Set the reception channel. 1, 2 User
1: Channel 1 (CH1 side)
2: Channel 2 (CH2 side)
(s)[1] Reception result The instruction completion status is stored. System
0: Normal completion
Other than 0: Error completion (error code)
(s)[2] Number of receive data The number of receive data are stored. 0 or more System
(s)[3] Allowable number of words for Set the allowable number of words for receive data to be 1 or more User
receive data stored in (d1).
Sets receive
channel to 1
[ST]
IF((X3=TRUE) OR (X4=TRUE))THEN
MOVP(TRUE, 1, Var_ControlData[0]); (* Sets receive channel to 1 *)
MOVP(TRUE, 10, Var_ControlData[3]); (* Sets allowable number of words for receive data to 10 words *)
G_INPUT(TRUE, H0, Var_ControlData, D10, Var_Result); (* Receives data *)
END_IF;
IF(X100=TRUE)THEN
RST(TRUE, Var_Flag_Error); (* Turns error completion flag OFF *)
END_IF;
G(P)_BIDOUT
Serial Modem
Structured ladder/FBD ST
G_BIDOUT
EN ENO
ENO:= G_BIDOUT (EN ,Un* ,s1 ,s2 ,d);
Un* d
s1
s2
GP_BIDOUT
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 (0..2)
s2 Start number of the device that stores send data ANY16
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of Bit (0..1)
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sends data using the bidirectional protocol.
Setting data
Device Item Setting data Setting range Setting side
(s1)[0] Transmission channel Set the transmission channel. 1, 2 User
1: Channel 1 (CH1 side)
2: Channel 2 (CH2 side)
(s1)[1] Transmission result The instruction completion status is stored. System
0: Normal completion
Other than 0: Error completion (error code)
(s1)[2] Number of send data Set the number of send data. 1 or more User
Transmission
instruction pulse
Sets transmission
channel to 1
Sends data
[ST]
PLS(X20, Var_Flag_Inst); (* Transmission instruction pulse *)
IF(Var_Flag_Inst=TRUE)THEN
MOV(TRUE, H4241, D11); (* Sets send data *)
MOV(TRUE, H4443, D12);
MOV(TRUE, H4645, D13);
MOV(TRUE, H0047, D14);
MOV(TRUE, H0AD, D15);
MOV(TRUE, 1, Var_ControlData[0]); (* Sets transmission channel to 1 *)
MOV(TRUE, 5, Var_ControlData[2]); (* Sets allowable number of words for send data to 5 words *)
G_BIDOUT(TRUE, H0, Var_ControlData, D11, Var_Result); (* Sends data *)
END_IF;
IF(X21=TRUE)THEN
RST(TRUE, Var_Flag_Normal); (* Turns normal completion flag OFF *)
RST(TRUE, Var_Flag_Error); (* Turns error completion flag OFF *)
END_IF;
Structured ladder/FBD ST
G_BIDIN
EN ENO
ENO:= G_BIDIN (EN, Un*, s, d1, d2);
Un* d1
s d2
■Executing condition
Instruction Executing condition 5
G_BIDIN
GP_BIDIN
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..3]
Output argument ENO Execution result Bit
d1 Start number of the device that stores read data ANY16
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction receives data using the bidirectional protocol.
Setting data
Device Item Setting data Setting range Setting side
(s)[0] Reception channel Set the reception channel. 1, 2 User
1: Channel 1 (CH1 side)
2: Channel 2 (CH2 side)
(s)[1] Reception result The instruction completion status is stored. System
0: Normal completion
Other than 0: Error completion (error code)
(s)[2] Number of receive data The number of received data are stored. 1 or more System
(s)[3] Allowable number of words for Set the allowable number of words for receive data to be 1 or more User
receive data stored in (d1).
[ST]
IF(X3=TRUE)THEN
MOVP(TRUE, 1, Var_ControlData[0]); (* Sets receive channel to 1 *)
MOVP(TRUE, 10, Var_ControlData[3]); (* Sets allowable number of words for receive data to 10 *)
G_BIDIN(TRUE, H00, Var_ControlData, D10, Var_Result); (* Receives data *)
END_IF;
IF((Var_Result[0]=TRUE)&(Var_Result[1]=FALSE))THEN
BMOV(TRUE, D10, Var_ControlData[2], D110); (* Stores receive data *)
END_IF;
G(P)_SPBUSY
Serial Modem
Structured ladder/FBD ST
G_SPBUSY
ENO:= G_SPBUSY (EN, Un*, d);
EN ENO
Un* d
GP_SPBUSY
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
Output argument ENO Execution result Bit
d Variable that stores read communication status ANY32
Processing details
This instruction reads the data transmission/reception status.
Program example
• The following program reads out the communication status of the target module. (For the Q series C24 whose I/O signals
are X/Y00 to X/Y1F)
[Structured ladder/FBD]
Reads communication
status
[ST]
G_SPBUSY(Var_Flag, H00, D0); (* Reads communication status *)
ZP_CSET
Serial Modem
Structured ladder/FBD ST
ZP_CSET
EN ENO
ENO:= ZP_CSET (EN, Un*, s1, s2, d1, d2);
Un* d1
s1 d2
s2
■Executing condition
Instruction Executing condition
ZP_CSET
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Channel number that requests receive data clear ANY16
1: Channel 1 (CH1 side)
2: Channel 2 (CH2 side)
s2 Variable that stores control data Array of ANY16 [0..111]
Output argument ENO Execution result Bit
d1 Dummy ANY16
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
(s1)
(s2)
(d1)
(d2)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
Clears receive data without stopping transmission using the nonprocedural protocol.
Program example
• The following program clears the receive data in the Q series C24 side. (For the Q series C24 whose I/O signals are X/Y00
to X/Y1F)
[Structured ladder/FBD] 5
Clears execution
type to 0
Clears data
[ST]
IF(X20=TRUE)THEN
MOVP(TRUE, 0, Var_ControlData[0]); (* Clears execution type to 0 *)
MOVP(TRUE, 4, Var_ControlData[2]); (* Sets request type *)
ZP_CSET(TRUE, "U0", 1, Var_ControlData, Var_Dummy, Var_Result); (* Clears data *)
END_IF;
IF(X21=TRUE)THEN
RST(TRUE, Var_Flag_Normal); (* Turns normal completion flag OFF *)
RST(TRUE, Var_Flag_Error); (* Turns error completion flag OFF *)
END_IF;
Z_BUFRCVS
Serial Modem
Structured ladder/FBD ST
Z_BUFRCVS
EN ENO
ENO:= Z_BUFRCVS (EN, Un*, s, d);
Un* d
■Executing condition
Instruction Executing condition
Z_BUFRCVS
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Reception channel number ANY16
1: Channel 1 (CH1 side)
2: Channel 2 (CH2 side)
Output argument ENO Execution result Bit
d Start number of the device that stores read data ANY16
* Receive data are read from the receive area of
buffer memory.
(s)
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction receives data with an interrupt program during communication using the nonprocedural protocol or
bidirectional protocol.
Setting data
Device Item Setting data Setting range Setting side
(d)+0 Receive data length The number of data read from the number of receive data 0 or more System
storage area is stored.
(d)+1 Receive data Data read from the receive data storage area are stored in System
ascending address order.
(d)+n
Executes interrupt
receive program
5
[ST]
(* Set the normal/error confirmation flag for the main program *)
(* The main program resets flags *)
SET(DX3, Var_Flag_Normal); (* Turns normal completion flag ON *)
SET(DX4, Var_Flag_Error); (* Turns error completion flag ON *)
(* Receives data from CH1 and stores the data in devices starting from D200 *)
Z_BUFRCVS(SM400, "00", 1, D200); (* Executes interrupt receive program *)
Structured ladder/FBD ST
G_PRR
EN ENO
ENO:= G_PRR (EN, Un*, s, d);
Un* d
■Executing condition
Instruction Executing condition
G_PRR
GP_PRR
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..4]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sends data by user frame according to the specification in user frame specification area for transmission
during communication using the nonprocedural protocol.
User frame 0
User frame 1
User frame 2
User frame 3
User frame 4
User frame 5
IF(Var_Flag_Inst=TRUE)THEN
MOV(TRUE, 1, Var_ControlData[0]); (* Sets transmission channel to 1 *)
MOV(TRUE, 0, Var_ControlData[1]); (* Clears transmission result *) 5
MOV(TRUE, H0, Var_ControlData[2]); (* Sets CR/LF to 'CR/LF not added' *)
MOV(TRUE, H1, Var_ControlData[3]); (* Sets transmission pointer *)
MOV(TRUE, H5, Var_ControlData[4]); (* Sets number of send data *)
GP_PRR(TRUE, H08, Var_ControlData, Var_Result); * Performs user frame transmission *)
END_IF;
ZP_CSET
Serial Modem
Structured ladder/FBD ST
ZP_CSET
EN ENO
ENO:= ZP_CSET (EN, Un*, s1, s2, d1, d2);
Un* d1
s1 d2
s2
■Executing condition
Instruction Executing condition
ZP_CSET
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Reception channel number ANY16
1: Channel 1 (CH1 side)
2: Channel 2 (CH2 side)
s2 Variable that stores control data Array of ANY16 [0..111]
Output argument ENO Execution result Bit
d1 Dummy ANY16
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
(s1)
(s2)
(d1)
(d2)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction changes the setting values for sending/receiving data using communication protocols.
Clears D0 to D111
to 0
Sets execution
type
Sets word/byte
unit to word
Sets on-demand
start address
Sets on-demand
buffer size
Performs
initialization
Turns normal
completion flag ON
Turns error
completion flag ON
[ST]
IF(Var_Flag_Inst=TRUE)THEN
FMOVP(TRUE,0,112, Var_ControlData[0]); (* Resets D0 to D111 to 0 *)
MOVP(TRUE, 0, Var_ControlData[0]); (* Sets execution type *)
MOVP(TRUE, 1, Var_ControlData[2]); (* Sets request type *)
MOVP(TRUE, 1, Var_ControlData[3]); (* Sets word/byte unit to word *)
MOVP(TRUE, H400, Var_ControlData[4]); (* Sets on-demand start address *)
MOVP(TRUE, 0, Var_ControlData[5]); (* Sets on-demand buffer size *)
MOVP(TRUE,H0C00, Var_ControlData[6]); (* Sets send buffer start address *)
MOVP(TRUE, H400, Var_ControlData[7]); (* Sets send buffer size *)
MOVP(TRUE, H600, Var_ControlData[8]); (* Sets receive buffer start address *)
MOVP(TRUE, H200, Var_ControlData[9]); (* Sets receive buffer size *)
ZP_CSET(TRUE, "U0", 1, Var_ControlData, Var_Dummy, Var_Result); (* Performs initialization *)
END_IF;
ZP_CSET
Serial Modem
Structured ladder/FBD ST
ZP_CSET
EN ENO
ENO:= ZP_CSET (EN, Un*, s1, s2, d1, d2);
Un* d1
s1 d2
s2
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Reception channel number ANY16
1: Channel 1 (CH1 side)
2: Channel 2 (CH2 side)
s2 Variable that stores control data Array of ANY16 [0..111]
Output argument ENO Execution result Bit
d1 Dummy ANY16
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
(s1)
(s2)
(d1)
(d2)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction registers and cancels the programmable controller CPU monitoring.
Program example
• Program to register the programmable controller CPU monitoring
The following program registers the programmable controller CPU monitoring and sends the monitoring result from the CH1
side interface.
5
The following setting is to send content of devices from M0 to M15 and devices from D100 to D109 to the external device
through the constant cycle transmission. (Cycle time: 3 minutes)
(For the Q series C24 whose I/O signals are X/Y00 to X/Y1F)
[Structured ladder/FBD]
Instruction pulse
Registers programmable
controller CPU monitoring
IF(Var_Flag_Set=TRUE)THEN
MOV(TRUE, 1, Var_ControlData[10]); (* Sets number of registered word blocks *)
MOV(TRUE, 1, Var_ControlData[11]); (* Sets number of registered bit blocks *)
(* Sets the 1st block of the CPU monitoring to D100 to D109 *)
MOV(TRUE, H0A8, Var_ControlData[13]); (* Sets device code *)
MOV(TRUE, 100, Var_ControlData[14]);(* Sets start number of monitoring device *) 5
MOV(TRUE, 0, Var_ControlData[15]);
MOV(TRUE, 10, Var_ControlData[16]); (* Sets number of registered points *)
(* Sets the 2nd block of the CPU monitoring to M0 to M15 *)
MOV(TRUE, H90, Var_ControlData[22]); (* Sets device code *)
MOV(TRUE, 0, Var_ControlData[23]);(* Sets start number of monitoring device *)
MOV(TRUE, 0, Var_ControlData[24]);
MOV(TRUE, 1, Var_ControlData[25]); (* Sets number of registered points. (For bit device, specify it in units of words.) *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
RST(TRUE, Var_Flag_Set); (* Turns data set flag OFF *)
END_IF;
IF(Var_Flag_Exe=TRUE)THEN
ZP_CSET(TRUE, "U0", 1, Var_ControlData, Var_Dummy, Var_Result); (* Registers the programmable controller CPU monitoring *)
END_IF;
Instruction pulse
Cancels programmable
controller CPU
monitoring
[ST]
PLS(X25, Var_Flag_Inst); (* Instruction pulse *)
G(P)_PUTE
Serial Modem
Structured ladder/FBD ST
G_PUTE
EN ENO
ENO:= G_PUTE (EN, Un*, s1, s2, d);
Un* d
s1
s2
GP_PUTE
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..3]
s2 Start number of the device that stores read ANY16
registration data
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction registers a user frame.
Setting data
Device Item Setting data Setting range Setting side
(s1)[0] Registration/ Specify whether to register/delete the user frame of the number 1, 3 User
deletion specified by (s1)[2].
specification 1: Registered
3: Deleted
(s1)[1] Registration/ The instruction completion status is stored. System
deletion result 0: Normal completion
Other than 0: Error completion (error code)
Program example
• The following program registers a user frame as the registration number 3E8H. (For the Q series C24 whose I/O signals are
X/Y80 to X/Y9F)
[Structured ladder/FBD]
Registration request
pulse
Sets registration
request
Sets number of
registered bytes
User frame 0
User frame 1
User frame 2
User frame 3
User frame 4
Turns normal
completion flag ON
Turns error
completion flag ON
IF(Var_Flag_Inst=TRUE)THEN
MOV(TRUE, 1, Var_ControlData[0]); (* Sets registration request *)
MOV(TRUE, H3E8, Var_ControlData[2]); (* Sets user frame number *)
MOV(TRUE, 10, Var_ControlData[3]); (* Sets number of registered bytes *)
MOV(TRUE, H3946, Var_Frame[0]); (* User frame 0 *)
MOV(TRUE, H3030, Var_Frame[1]); (* User frame 1 *)
MOV(TRUE, H3030, Var_Frame[2]); (* User frame 2 *)
MOV(TRUE, H4646, Var_Frame[3]); (* User frame 3 *)
MOV(TRUE, H3030, Var_Frame[4]); (* User frame 4 *)
TO(TRUE, 1, H08, H2000, 1); (* Sets write enable in flash ROM side *)
G_PUTE(TRUE, H08, Var_ControlData,Var_Frame[0], Var_Result); (* Registers user frame *)
END_IF;
Structured ladder/FBD ST
G_GETE
EN ENO
ENO:= G_GETE (EN, Un*, s1, s2, d);
Un* d
s1
s2
■Executing condition
Instruction Executing condition
G_GETE
GP_GETE
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..3]
s2 Start number the device that stores the read ANY16
registration data
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads a user frame.
Program example
• The following program reads out the registration data of the user frame number 3E8H. (For the Q series C24 whose I/O 5
signals are X/Y80 to X/Y9F)
[Structured ladder/FBD]
Turns normal
completion flag ON
Turns error
completion flag ON
IF(Var_Flag_Inst=TRUE)THEN
MOV(TRUE, 0, Var_ControlData[0]);
MOV(TRUE, H3E8, Var_ControlData[2]); (* Sets user frame number *)
MOV(TRUE, 80, Var_ControlData[3]); (* Sets allowable number of bytes for read data *)
FMOV(TRUE, 0, 40, Var_Frame[0]); (* Clears user frame to 0 *)
G_GETE(TRUE, H08, Var_ControlData, Var_Frame[0], Var_Result); (* Reads user frame *)
END_IF;
ZP_UINI
Serial
Structured ladder/FBD ST
ZP_UINI
EN ENO
ENO:= ZP_UINI (EN, Un*, s, d);
Un* d
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..9]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction switches the mode, transmission specification, and host station number of the Q series C24.
CH1 ((s)[3]) 0
CH2 ((s)[5])
*1 Specify '0000H' at the CH side for which "MELSOFT connection" is specified in the communication protocol setting.
Precautions
The UINI instruction is applicable to the QJ71C24N (-R2/R4) of which the function version is B and the first five digits of the
serial number are '06062' or higher.
Program example
• The following program changes settings of the Q series C24 mounted on the I/O numbers X/Y00 to X/Y1F as follows when
X20 turns ON.
Device Bit Description Setting value
Position Specified
value
(s)[3] b0 OFF CH1 Transmission Operation setting Independence 07E6H
specification setting
b1 ON Data bit 8
b2 ON Parity bit With
b3 OFF Even/Odd parity Odd
b4 OFF Stop bit 1
b5 ON Sumcheck code With
b6 ON Write during RUN Allowed
b7 ON Setting change Allowed
b15 to b8 Communication speed 19200bps
(s)[4] CH1 Communication protocol setting Link setting 0008H
(s)[5] b0 ON CH2 Transmission Operation setting Link 07E7H
specification setting
b1 ON Data bit 8
b2 ON Parity bit With
b3 OFF Even/Odd parity Odd
b4 OFF Stop bit 1
b5 ON Sumcheck code With
b6 ON Write during RUN Allowed
b7 ON Setting change Allowed
b15 to b8 Communication speed 19200bps
(s)[6] CH2 Communication protocol setting MC protocol Format 5 0005H
(s)[7] Station No. setting 1 0001H
Always sets 0
Switches mode
*1 Create a program so that the data communication process does not run while the interlock signal for communication stop is ON.
(* Do not perform the data communication process during interlock signal for communication stop ON *)
IF(Var_Flag=FALSE)*1 THEN
*1 Create a program so that the data communication process does not run while the interlock signal for communication stop is ON.
G(P)_CPRTCL
Serial
Structured ladder/FBD ST
G_CPRTCL
EN ENO
Un* d ENO:= G_CPRTCL (EN, Un*, n1, n2, s, d);
n1
n2
s
GP_CPRTCL
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition ANY16
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
n1 Channel to communicate with other devices ANY16
1: Channel 1 (CH1 side)
2: Channel 2 (CH2 side)
n2 Number of consecutive protocol executions (1 to 8) ANY16
s Start number of the device in which control data are Array of ANY16 [0..17]
stored
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
n1
n2
(s)
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction executes the protocols and functional protocols written to the flash ROM by pre-defined protocol support
function.
*1 When executing multiple protocols, if an error occurs to the nth protocol, the protocols after the nth protocol are not executed.
*2 For details of the error code at the error completion, refer to the following.
Q Corresponding Serial Communication Module User's Manual (Basic)
MELSEC-L Serial Communication Module User's Manual (Basic)
[ST]
IF((X20=TRUE) & (X1D=TRUE))THEN
MOV(TRUE, 0, Var_ControlData[1]; (* Store the set value to the send data storage area *)
MOV(TRUE, 1, Var_ControlData[2]; (* Designate protocol number 1 *)
GP_CPRTCL(TRUE, H00, 2, 1, Var_ControlData, Var_Result); (* Execute the protocol Communicate in CH2 *)
END_IF;
IF(Var_Result[0]=TRUE)THEN
IF(Var_Result[1]=FALSE)THEN
SET(TRUE, Var_Flag_Normal); (* Normal completion flag ON *)
ELSE
SET(TRUE, Var_Flag_Abnormal); (* Abnormal completion flag ON *)
MOV(TRUE, Var_ControlData[0], Var_ErrorCode); (* Store the error code *)
END_IF;
END_IF;
J(P)_RIRD, G(P)_RIRD
CC-Link CC IE C CC IE F
Structured ladder/FBD ST
J_RIRD G_RIRD
■Executing condition
Instruction Executing condition
J_RIRD
G_RIRD
JP_RIRD
GP_RIRD
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239, 254) ANY16
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..4]
Output argument ENO Execution result Bit
d1 Start number of the device that stores read data ANY16
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads data for the specified number of points from the buffer memory of the CC-Link module or the device of
the programmable controller CPU module on the specified station.
[ST]
IF((X0=TRUE)
&(Var_Flag_Exe=FALSE) (* Execution flag *)
&(SW80.0=FALSE))THEN (* Data link status of station number 1 *)
MOV(TRUE,1, Var_ControlData[1]); (* Sets station number *)
MOV(TRUE,H0405, Var_ControlData[2]); (* Sets access code and attribute code *)
MOV(TRUE, 1000, Var_ControlData[3]); (* Sets device number *)
MOV(TRUE, 10, Var_ControlData[4]); (* Sets number of read points *)
G_RIRD(TRUE, H04, Var_ControlData, D0, Var_Result); (* Performs readout *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
END_IF;
J(P)_RIWT, G(P)_RIWT
CC-Link CC IE C CC IE F
Structured ladder/FBD ST
J_RIWT G_RIWT
s1 s1
s2 s2
■Executing condition
Instruction Executing condition
J_RIWT
G_RIWT
JP_RIWT
GP_RIWT
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239, 254) ANY16
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..4]
s2 Start number of the device that stores write data ANY16
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction writes the data for the specified number of points to the buffer memory of the CC-Link module or the device of
the programmable controller CPU module on the specified station.
[ST]
IF((X0=TRUE)
&(Var_Flag_Exe=FALSE) (* Execution flag *)
&(SW80.0=FALSE))THEN (* Data link status of station number 1 *)
MOV(TRUE, 1, Var_ControlData[1]); (* Sets station number *)
MOV(TRUE, H0405, Var_ControlData[2]); (* Sets access code and attribute code *)
MOV(TRUE, 1000, Var_ControlData[3]); (* Sets device number *)
MOV(TRUE, 10, Var_ControlData[4]); (* Sets number of read points *)
G_RIWT(TRUE, H04, Var_ControlData, D0, Var_Result); (* Performs writing *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
END_IF;
G(P)_RIRCV
CC-Link
Structured ladder/FBD ST
G_RIRCV
EN ENO
ENO:= G_RIRCV (EN, Un*, s1, s2, d1, d2);
Un* d1
s1 d2
s2
■Executing condition
Instruction Executing condition
G_RIRCV
GP_RIRCV
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..4]
s2 Variable that stores interlock signal Array of ANY16 [0..2]
Output argument ENO Execution result Bit
d1 Start number of the device that stores read data ANY16
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction automatically performs handshaking with an intelligent device station and reads data from the buffer memory
of the specified intelligent device station.
This instruction is applicable with a module having a handshake signal, such as the AJ65BT-R2(N).
*1 For details, refer to the manual for the intelligent device station from which data are read.
*2 The value indicates the maximum number of data to be read.
Specify the value within the buffer memory capacity of the intelligent device station or the receive buffer area setting range set by a
parameter.
*1 The same error code as that for the completion status of control data are stored in the error code storage device.
The interlock signal storage is set to request device: RY2, completion device: RX2, error code storage device: RWr2, and
completion mode: 1.
(When the refresh device of the link special register (SW) is set to SW0.)
[Structured ladder/FBD]
Sets number of
read points
Performs readout
Turns execution
flag ON
Turns execution
flag OFF
IF(MEP((Var_Flag_Inst=TRUE) & (SW83.E=FALSE)))THEN (* Read request is ON and data link status of station number 63 is OFF (rising pulse) *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
END_IF; 5
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
G(P)_RISEND
CC-Link
Structured ladder/FBD ST
G_RISEND
EN ENO
ENO:= G_RISEND (EN, Un*, s1, s2, d1, d2);
Un* d1
s1 d2
s2
■Executing condition
Instruction Executing condition
G_RISEND
GP_RISEND
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..4]
s2 Variable that stores interlock signal Array of ANY16 [0..2]
Output argument ENO Execution result Bit
d1 Start number of the device that stores write data ANY16
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction automatically performs handshaking with an intelligent device station and writes data to the buffer memory of
the specified intelligent device station.
This instruction is applicable with a module having a handshake signal, such as the AJ65BT-R2(N).
*1 For details, refer to the manual for the intelligent device station to which data are written.
*2 The value indicates the maximum number of data to be written.
Specify the value within the buffer memory capacity of the intelligent device station or the receive buffer area setting range set by a
parameter.
*1 The same error code as that for the completion status of control data are stored in the error code storage device.
The interlock signal storage settings are set to request device: RY4, completion device: RX4, error code storage device:
RWr1, and completion mode: 1.
(When the refresh device of the link special register (SW) is set to SW0.)
[Structured ladder/FBD]
Performs writing
G(P)_RIFR
CC-Link
Structured ladder/FBD ST
G_RIFR
EN ENO
Un* d ENO:= G_RIFR (EN, Un*, n1, n2, n3, d);
n1
n2
n3
■Executing condition
Instruction Executing condition
G_RIFR
GP_RIFR
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
n1 Intelligent device station number (1 to 64) ANY16
Random access buffer specification (FFH)
n2 Offset value of specified intelligent device auto- ANY16
refresh buffer or random access buffer of the
master station
n3 Number of read points (0 to 4096) ANY16
No processing is performed with setting '0'.
Output argument ENO Execution result Bit
d Start number of the device that stores read data ANY16
n1
n2
n3
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads data from the auto-refresh buffer of the specified station.
The instruction is applicable with a module having an auto-refresh buffer, such as the AJ65BT-R2(N).
300H
Buffer memory
for auto-refresh
5FFH
5
[Structured ladder/FBD]
Performs readout
[ST]
IF((X0=TRUE) & (SW80.0=FALSE))THEN
GP_RIFR(TRUE, H04, 1, H100, 10, D0); (* Performs readout *)
END_IF;
G(P)_RITO
CC-Link
Structured ladder/FBD ST
G_RITO
EN ENO
Un* d ENO:= G_RITO (EN, Un*, n1, n2, n3, d);
n1
n2
n3
■Executing condition
Instruction Executing condition
G_RITO
GP_RITO
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
n1 Intelligent device station number (1 to 64) ANY16
Random access buffer specification (FFH)
n2 Offset value of specified intelligent device auto- ANY16
refresh buffer or random access buffer of the
master station
n3 Number of write points ANY16
Output argument ENO Execution result Bit
d Start number of the device that stores write data ANY16
n1
n2
n3
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction writes the data to the auto-refresh buffer of the specified station.
The instruction is applicable with a module having an auto-refresh buffer, such as the AJ65BT-R2(N).
300H
Buffer memory
for auto-refresh
5FFH
5
[Structured ladder/FBD]
Performs
writing
[ST]
IF((X0=TRUE) & (SW80.0=FALSE))THEN
GP_RITO(TRUE, H04, 1, H100, 10, D0); (* Performs writing *)
END_IF;
G(P)_RLPASET
CC-Link
Structured ladder/FBD ST
G_RLPASET
EN ENO
Un* d ENO:= G_RLPASET (EN, Un*, s1, s2, s3, s4, s5, d);
s1
s2
s3
s4
s5
■Executing condition
Instruction Executing condition
G_RLPASET
GP_RLPASET
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
00 to FE: Higher two digits when expressing the I/O
number in three digits)
s1 Variable that stores control data Array of ANY16 [0..7]
s2 Variable that stores slave station setting data Array of ANY16 [0..63]
s3 Variable that stores reserved station specification Array of ANY16 [0..3]
data
s4 Variable that stores error invalid station Array of ANY16 [0..3]
specification data
s5 Variable that stores send/receive and auto-refresh Array of ANY16 [0..77]
buffer assignment data
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sets the network parameters to the master station and starts up the data link.
*1 For the setting data for which invalid is specified, default parameter is applied.
*2 Setting a value outside the setting range results in error completion of the instruction.
Station number
Number of occupied
slave stations
Type of slave station
Default parameter setting is '0101H to 0140H (station number: 1 to 64, number of
occupied slave stations: 1, type of slave station: Ver.1 compatible remote I/O station)'
Setting of station number 1 to 40H
1 to 64 (BIN setting)
Setting of the number of occupied slave stations 1 to 4H
The setting value for the number of occupied slave stations is described below.
1H: 1 station
2H: 2 stations
3H: 3 stations
4H: 4 stations
Setting of slave station type *2 0 to FH
The setting value for the slave station type is described below.
0H: Ver.1 compatible remote I/O station
1H: Ver.1 compatible remote device station
2H: Ver.1 compatible intelligent device station
5H: Ver.2 compatible single remote device station
6H: Ver.2 compatible single intelligent device station
8H: Ver.2 compatible double remote device station
9H: Ver.2 compatible double intelligent device station
BH: Ver.2 compatible quadruple remote device station
CH: Ver.2 compatible quadruple intelligent device station
EH: Ver.2 compatible octuple remote device station
FH: Ver.2 compatible octuple intelligent device station
*1 Set the same number which was set for Number of connected modules in the control data.
*2 Setting a value outside the setting range in the setting of slave station type results in error completion of the instruction.
*1 Set the parameter up to the largest station number set in the slave station setting data.
*2 Set the parameter only to the start station number of the module for the remote station/local station/intelligent device station that
occupies two or more stations.
*1 Set the parameter up to the largest station number set in the slave station setting data.
*2 Set the parameter only to the start station number of the module for the remote station/local station/intelligent device station that
occupies two or more stations.
Reserved station specification has a priority when an error invalid station and reserved station are specified for the same station. 5
■Send/receive and auto-refresh buffer assignment data
Device Item Setting data Setting range Setting side
*2
(s5)[0] Specification for Specify the buffer memory size assignment at transient Send/receive buffer User
1 to 26 transmission for local stations and intelligent device stations. : 0H (no setting) 40H to 1000H
(s5)[77] modules*1 0 (word) (no setting)
s5 [0] Send buffer size
64 to 4096 (words)
s5 [1] Receive buffer size Setting for the 1st module
s5 [2] Auto-refresh buffer size Auto-refresh buffer*3
: 0H (no setting) 80H to 1000H
0 (word) (no setting)
128 to 4096 (words)
*1 Set the assignment data, in ascending order, for the stations set for a local station or intelligent device station in the slave station setting
data.
*2 Keep the total of the send/receive buffer size within 1000H (4096 (words)).
Specify the size added seven words to the size of send/receive data as the send/receive buffer size.
Setting a value outside the setting range results in error completion of the instruction.
*3 Keep the total of the auto-refresh buffer size within 1000H (4096 (words)).
Specify the necessary auto-refresh buffer size for each intelligent device station.
Setting a value outside the setting range results in error completion of the instruction.
Precautions
The RLPASET instruction is applicable to the QJ61BT11 of which the function version is B and the first five digits of the serial
number are '03042' or higher.
The QJ61BT11N and LJ61BT11 is compatible with the RLPASET instruction.
Refresh command
MOV(TRUE, H2101, Var_SlaveStation[0]); (* First module: local station, 1-station occupy, station number 1 *)
MOV(TRUE, H0102, Var_SlaveStation[1]); (* Second module: Remote I/O station, 1-station occupy, station number 2*)
MOV(TRUE, H0103, Var_SlaveStation[2]); (* Third module: Remote I/O station, 1-station occupy, station number 3 *)
MOV(TRUE, 100, Var_BufferSize[0]); (* First module: local module, send buffer 100 words *)
MOV(TRUE, 100, Var_BufferSize[1]); (* Second module: local station, receive buffer 100 words *)
MOV(TRUE, 0, Var_BufferSize[2]); (* Third module: local station, auto-refresh buffer 0 words *)
J(P)_READ, G(P)_READ
CC IE C CC IE F NET/H Ether
Structured ladder/FBD ST
J_READ G_READ
EN ENO EN ENO ENO:= J_READ (EN, Jn*, s1, s2, d1, d2);
Jn* d1 Un* d1 ENO:= G_READ (EN, Un*, s1, s2, d1, d2);
s1 d2 s1 d2
s2 s2
■Executing condition
Instruction Executing condition
J_READ
G_READ
JP_READ
GP_READ
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239, 254) ANY16
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module ANY16
00 to FE: Higher two digits when expressing the I/O
number in three digits)
s1 Variable that stores control data Array of ANY16 [0..17]
s2 Start number of the target station's device from ANY
which data are read
Output argument ENO Execution result Bit
d1 Start number of the host station's device that stores ANY16
read data
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
*2 Only CC-Link IE Field Network
When the target station is LCPU, Universal model QCPU, or Basic model QCPU, the digit specification of the bit device can be used
(example: K4M16).
The digit specification of the bit device can be used when the following conditions are met.
The device number is a multiple of 16 (10H).
The digit specification is 4 points (K4).
Setting data
Device Item Setting data Setting Setting side
range
(s1)[0] Error completion type 0001H User
b15 … b7 … b0 0081H
0 (1) 0 1
(s1)[4] Target station network Specify the network number of the target station. 1 to 239, 254 User
No. 1 to 239: Network number
254: Specify this when 254 has been set in Jn.
(s1)[5] Target station No. Specify the station number of the target station. 1 to 125 User
Setting values are as follows.
• MELSECNET/H: 1 to 64
• When the host station is Universal model QCPU in Ethernet or CC-Link IE
Controller Network: 1 to120
• When the host station is anything other than Universal model QCPU in Ethernet
or CC-Link IE Controller Network: 1 to 64
• Master station in CC-Link IE Field Network: 125 (7DH)
• Local station or the intelligent device station in CC-Link IE Field Network: 1 to
120
(s1)[6] Reserved 0 User
(s1)[7] Number of resends • For instruction execution 0 to 15 User
Specify the number of instruction resends when the instruction is not completed
within the monitoring time specified in (s1)[8].
• At instruction completion System
The number of resends (result) is stored.
(s1)[16] Error-detected network Network number of the station where an error was detected is stored. (However, System
No.*3 when an error was detected at the host station, the network number is not stored.)
1 to 239: Network number
(s1)[17] Error-detected station Number of the station where an error was detected is stored. (However, when an System
No.*3 error was detected at the host station, the network number is not stored.)
Stored values are as follows.
• MELSECNET/H: 1 to 64
• Ethernet, CC-Link IE Controller Network: 1 to 120
• Master station in CC-Link IE Field Network: 125 (7DH)
• Local station or the intelligent device station in CC-Link IE Field Network: 1 to
120
*1 Specification is possible when the host station is a network module or Ethernet module of function version D or later.
(Specification is not possible for other modules. An access is always made to the target station CPU.)
*2 Specification is possible when the versions of the QCPU and the network module on the host station and the target station are as
indicated below.
(Specification is not possible for other modules. An access is always made to the target station CPU.)
Network module: The first five digits of the serial number are '06092' or higher.
QCPU: The first five digits of the serial number are '06092' or higher.
*3 Data are stored only when 1 is set in bit 7 of Error completion type ((s1)[0]).
Performs readout
Structured ladder/FBD ST
J_SREAD G_SREAD
EN ENO EN ENO ENO:= J_SREAD (EN, Jn*, s1, s2, d1, d2, d3);
Jn* d1 Un* d1 ENO:= G_SREAD (EN, Un*, s1, s2, d1, d2, d3);
s1 d2 s1 d2
s2 d3 s2 d3
■Executing condition
Instruction Executing condition
J_SREAD
G_SREAD
JP_SREAD
GP_SREAD
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239, 254) ANY16
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..17]
s2 Start number of the target station's device from ANY
which data are read
Output argument ENO Execution result Bit
d1 Start number of the host station's device that stores ANY16
read data
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
d3 Variable that turns ON upon completion of the Bit
instruction
(read notification device)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads data from a word device of another station.
Sets error
completion type
Sets target
station's CPU type
Sets monitoring
time
Sets number of
resends
Performs readout
Structured ladder/FBD ST
J_WRITE G_WRITE
EN ENO EN ENO ENO:= J_WRITE (EN, Jn*, s1, s2, s3, d1);
Jn* d1 Un* d1
ENO:= G_WRITE (EN, Un*, s1, s2, s3, d1);
s1 s1
s2 s2
s3 s3
■Executing condition
Instruction Executing condition
J_WRITE
G_WRITE
JP_WRITE
GP_WRITE
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239, 254) ANY16
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..17]
s2 Start number of the host station's device that stores ANY16
write data
s3 Start number of the target station's device to which ANY
data are written
Output argument ENO Execution result Bit
d1 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
Processing details
This instruction writes data to a word device of another station.
■Ethernet
0: Without arrival confirmation
• When the target station is on the same network
Completed when data are sent from the host station.
Completed
Execution source Target station
• When the target station is on another network
Completed when data reach to a relay station on the same network.
Completed
5
Execution source Relay station Target station
Completed
Target station Execution source Relay station Target station
Completed
■MELSECNET/HCC-Link IE
0: Without arrival confirmation
• When the target station is on the same network
Completed when data are sent from the host station.
Completed
Completed
Request source Relay station Target station
Completed
Target station
When '0: Without arrival confirmation' is specified, even if writing to the target station is
completed abnormally in the following cases, the processing of the instruction in the
host station is completed normally.
• Communication itself was completed normally, although the sent data were
erroneous.
• Data could not be written to the target station because instructions from multiple
stations were executed to the same station. (An error code (F222H, E006H, E205H,
D202H, or D282H) is detected at the target station.)
(s1)[4] Target station network Specify the network number of the target station. 1 to 239, User
No. 1 to 239: Network number 254
254: Specify this when 254 has been set in Jn.
(s1)[5] Target station No. Specify the station number of the target station. 1 to 120 User
Setting values are as follows. 125 (7DH)
■Station number specification 81H to A0H
• MELSECNET/H: 1 to 64 FFH
• When the host station is Universal model QCPU in Ethernet or CC-Link IE Controller
Network: 1 to120
• When the host station is anything other than Universal model QCPU in Ethernet or
CC-Link IE Controller Network: 1 to 64
• Master station in CC-Link IE Field Network: 125 (7DH)
• Local station or the intelligent device station in CC-Link IE Field Network: 1 to 120
To increase the data reliability when the station number is specified, executing the
instruction with setting Execution/Error completion type ((s1)[0]) to '1: With arrival
confirmation' is recommended.
■Group specification (target station is anything other than CC-Link IE Field Network)
81H to A0H: All stations in group numbers 1 to 32
(Setting is available when Execution type is set to '0: Without arrival confirmation' in
(s1)[0].)
*1 Specification is possible when the host station is a network module or Ethernet module of function version D or later.
(Specification is not possible for other modules. An access is always made to the target station CPU.)
*2 Specification is possible when the versions of the QCPU and the network module on the host station and the target station are as
indicated below.
(Specification is not possible for other modules. An access is always made to the target station CPU.)
Network module: The first five digits of the serial number are '06092' or higher.
QCPU: The first five digits of the serial number are '06092' or higher.
*3 Data are stored only when 1 is set in bit 7 of Error completion type ((s1)[0]).
Performs writing
Structured ladder/FBD ST
J_SWRITE G_SWRITE
EN ENO EN ENO ENO:= J_SWRITE (EN, Jn*, s1, s2, d1, d2, d3);
Jn* d2 Un* d2
ENO:= G_SWRITE (EN, Un*, s1, s2, d1, d2, d3);
s1 d3 s1 d3
s2 s2
d1 d1
■Executing condition
Instruction Executing condition
J_SWRITE
G_SWRITE
JP_SWRITE
GP_SWRITE
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239, 254) ANY16
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..17]
s2 Start number of the host station's device that stores ANY16
send data
d1 Start number of the target station to which data are ANY
written
Output argument ENO Execution result Bit
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
d3 Variable that turns ON upon completion of the Bit
instruction
(Write notification device)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction writes data to a word device of another station.
Performs writing
Stores data of
devices from D300
to D303 to devices
from D500 to D503
J(P)_SEND, G(P)_SEND
CC IE C CC IE F NET/H Ether
Structured ladder/FBD ST
J_SEND G_SEND
s1 s1
s2 s2
■Executing condition
Instruction Executing condition
J_SEND
G_SEND
JP_SEND
GP_SEND
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239, 254) ANY16
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..17]
s2 Start number of the host station's device that stores ANY16
write data
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sends data to another station.
Completed
Execution source Target station
• When the target station is on another network
Completed when data reach to a relay station on the same network.
Completed
5
Execution source Relay station Target station
Completed
Target station Execution source Relay station Target station
Completed
■MELSECNET/H CC-Link IE
0: Without arrival confirmation
• When the target station is on the same network
Completed when data are sent from the host station.
Completed
Completed
Request source Relay station Target station
Completed
Target station
When '0: Without arrival confirmation' is specified, even if writing to the target station
is completed abnormally in the following cases, the processing of the instruction in
the host station is completed normally.
• Communication itself was completed normally, although the sent data were
erroneous.
• Data could not be written to the target station because instructions from multiple
stations were executed to the same station. (An error code (F222H, E006H,
E205H, D202H, or D282H) is detected at the target station.)
*1 Data are stored only when 1 is set in bit 7 of Error completion type ((s1)[0]).
*2 Logical channel setting is not available for the CC-Link IE network module.
Program example
The following program sends data of the devices from D750 to D753 of the station number 1 (host station) to the channel 5 of
the station number 2 (target station).
For the method for reading the data, which are sent by the SEND instruction, from the channel 5 of the station number 2
(target station), refer to the following sections.
• For reading out data in a main program
Page 150 J(P)_RECV, G(P)_RECV
• For reading out data in an interrupt program
Page 154 Z_RECVS
Sends data
Structured ladder/FBD ST
J_RECV G_RECV
■Executing condition
Instruction Executing condition
J_RECV
G_RECV
JP_RECV
GP_RECV
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239, 254) ANY16
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..17]
Output argument ENO Execution result Bit
d1 Start number of the host station's device that stores ANY16
read data
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads received data (for main program).
*1 Data are stored only when 1 is set in bit 7 of Error completion type ((s)[0]).
Program example
The following program reads out data, which is sent from the station number 1 by the SEND instruction, from the channel 5 of
the station number 2 (host station) and stores the data to the devices from D770 to D773 of the station number 2 (host station)
when SB0034 turns ON.
For the SEND instruction, refer to the following section.
Message (user-specified data) communication
Sets error
completion type
Sets arrival
monitoring time
5
Performs readout
[ST]
IF(SM400=TRUE)THEN
MOV(TRUE,H80,Var_ControlData[0]); (* Sets error completion type *)
MOV(TRUE,5,Var_ControlData[2]); (* Sets host station channel *)
MOV(TRUE,0,Var_ControlData[6]);
MOV(TRUE,0,Var_ControlData[7]);
MOV(TRUE,0,Var_ControlData[8]); (* Sets arrival monitoring time *)
MOV(TRUE,0,Var_ControlData[10]);
END_IF;
IF((SB34=TRUE) AND (SB47=FALSE)) THEN
JP_RECV(TRUE,1,Var_ControlData,D770,Var_Result); (* Performs readout *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
Structured ladder/FBD ST
Z_RECVS
EN ENO
ENO:= Z_RECVS (EN, Un*, s1, s2, d);
Jn* d
s1
s2
■Executing condition
Instruction Executing condition
Z_RECVS
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..17]
s2 Start number of the host station's device that stores ANY16
read data
Output argument ENO Execution result Bit
d Dummy Bit
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads received data (for interrupt program).
Sets execution/error
completion type
Performs readout
[ST]
IF(SM400=TRUE)THEN
MOV(TRUE,H0,Var_ControlData[0]); (* Sets execution/error completion type *)
MOV(TRUE,5,Var_ControlData[2]); (* Sets host station channel *)
Z_RECVS(TRUE,"00",Var_ControlData,D770,Var_Dummy); (* Performs readout *)
J(P)_REQ, G(P)_REQ
CC IE C CC IE F NET/H Ether
Structured ladder/FBD ST
J_REQ G_REQ
EN ENO EN ENO ENO:= J_REQ (EN, Jn*, s1, s2, d1, d2);
Jn* d1 Un* d1 ENO:= G_REQ (EN, Un*, s1, s2, d1, d2);
s1 d2 s1 d2
s2 s2
■Executing condition
Instruction Executing condition
J_REQ
G_REQ
JP_REQ
GP_REQ
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239, 254) ANY16
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..17]
s2 Variable that stores request data Array of ANY16 [0..5]
Output argument ENO Execution result Bit
d1 Variable that stores response data Array of ANY16 [0..5]
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
Remotely runs or stops a programmable controller on another station.
Also, reads/writes clock data from/to a programmable controller on another station.
(s1)[4] Target station Specify the network number of the target station. 1 to 239, 254 User
network No. 1 to 239: Network number
254: Specify this when 254 has been set in Jn. (Network specified in 'Valid module
during other station access')
(s1)[5] Target station Specify the station number of the target station. 1 to 120, 125 User
No. Setting values are as follows. (7DH), 81H to
■Station number specification A0H, FFH
• MELSECNET/H: 1 to 64
• When the host station is Universal model QCPU in Ethernet or CC-Link IE
Controller Network: 1 to120
• When the host station is anything other than Universal model QCPU in Ethernet or
CC-Link IE Controller Network: 1 to 64
• Master station in CC-Link IE Field Network: 125 (7DH)
• Local station or the intelligent device station in CC-Link IE Field Network: 1 to 120
■Group specification (target station is anything other than CC-Link IE Field Network)
81H to A0H: All stations in group numbers 1 to 32 (Available only at clock data writing
and remote RUN/STOP)
*1 Specification is possible when the host station is a network module or Ethernet module of function version D or later.
(Specification is not possible for other modules. An access is always made to the target station CPU.)
*2 Specification is possible when the versions of the QCPU and the network module on the host station and the target station are as
indicated below.
(Specification is not possible for other modules. An access is always made to the target station CPU.)
Network module: The first five digits of the serial number are '06092' or higher.
QCPU: The first five digits of the serial number are '06092' or higher.
*3 This becomes valid only when 1 is set in bit 7 of Error completion type ((s1)[0]).
Clear mode ((s2)[3]) allows specification to clear (initialize) the devices in the CPU
module at the start of CPU module operation activated by remote RUN.
After performing the specified clear processing, CPU module runs according to the
setting that specified by Device Initial Value in GX Works2.
*1 When "all stations or a group (81H to A0H, FFH)" is specified in (s1)[5], no response data will be stored.
b15 b8 b7 b6 b5 b4 b3 b2 b1 b0
Year (00H to 99H) 0
(s2)[3] Clock data to be High-order 8 bits: Day (01H to 31H), low-order 8 bits: Month (01H to 12H)
changed
b15 to b8 b7 to b0
(continued)
Day (01H to 31H) Month (01H to 12H)
(s2)[4] High-order 8 bits: Minute (00H to 59H), low-order 8 bits: Hour (00H to 23H)
b15 to b8 b7 to b0
Minute (00H to 59H) Hour (00H to 23H)
(s2)[5] High-order 8 bits: Day of week (00H (Sunday) to 06H (Saturday)), low-order 8 bits:
Second (00H to 59H)
b15 to b8 b7 to b0
Day of week (00H to 06H) Second (00H to 59H)
*1 This function cannot change the first two digits of year data.
To change the year data including the first two digits, set the clock data using another function (such as GX Works2).
b15 to b8 b7 to b0
Month (01H to 12H) Year (00 H to 99H)
(d1)[3] High-order 8 bits: Hour (00H to 23H), low-order 8 bits: Day (01H to 31H)
b15 to b8 b7 to b0
Hour (00H to 23H) Day (01H to 31H)
(d1)[4] High-order 8 bits: Second (00H to 59H), low-order 8 bits (00H to 59H)
b15 to b8 b7 to b0
Second (00H to 59H) Minute (00H to 59H)
(d1)[5] High-order 8 bits: (00H), low-order 8 bits: Day of week (00H (Sunday) to 06H
(Saturday))
b15 to b8 b7 to b0
00H Day of week (00H to 06H)
*2 When "all stations or a group (81H to A0H, FFH)" is specified in (s1)[5], no response data will be stored.
*3 Last two digits of year data
(* Process on completion *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
J(P)_ZNRD
CC IE C NET/H Ether
Structured ladder/FBD ST
J_ZNRD
EN ENO
ENO:= J_ZNRD (EN, Jn*, n1, s, n2, d1, d2);
Jn* d1
n1 d2
n2
■Executing condition
Instruction Executing condition
J_ZNRD
JP_ZNRD
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition ANY16
Jn* Network number of the host station (1 to 239) ANY16
n1 Target station number (1 to 64) ANY16
s Target station's start device number where data to ANY16
be read are stored
n2 Read data length ANY16
When the target station is Q/QnA/AnUCPU: 1 to
230 words
When the target station is anything other than Q/
QnA/AnUCPU: 1 to 32 words
Output argument ENO Execution result Bit
d1 The host station's start device number where ANY16
readout data will be stored
A contiguous area for the read data length is
required.)
d2 The host station's device that is turned on for one Array of bit [0..1]
scan upon completion of the instruction
d2[1] also turns ON if the instruction execution has
failed.
n1
(s)
n2
(d1)
(d2)
Processing details
This instruction reads data from devices of a programmable controller CPU on another station. (In units of words)
• Specify devices of the target station's CPU within the range allowed for the host station CPU when reading
data from the devices with the ZNRD instruction.
(Target station's start device number (s1) where data to be read are stored) + (Read points - 1) (End device
No. of host station's CPU*3)
• Specify the host station's start device number (d1) within the range allowed for storing read data.
(Example) When D150 and after the area in the host station's CPU has been already used
Good example (D50 is specified in ( ).) Bad example (D100 is specified in ( ).)
Host station CPU Other station CPU Host station CPU Other station CPU
D0 D0
: Duplicated area
*3 End device No. of the device in the host station CPU, and whose device name is same as in (s1)
Performs readout
[ST]
IF((M101=TRUE) &(SB47=FALSE) & (SW0A0.3=FALSE)) THEN
JP_ZNRD(TRUE,1,4,D250,5,D700, Var_Result); (* Performs ZNRD instruction*)
END_IF;
IF(SM400=TRUE)THEN
MOV(TRUE,SW30,Var_ErrorCode); (* Stores error code *)
END_IF;
J(P)_ZNWR
CC IE C NET/H Ether
Structured ladder/FBD ST
J_ZNWR
EN ENO
ENO:= J_ZNWR (EN, Jn*, n1, s, n2, d1, d2);
Jn* d1
n1 d2
n2
■Executing condition
Instruction Executing condition
J_ZNWR
JP_ZNWR
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239) ANY16
n1 Target station number ANY16
(1) Station No. specification
1 to 64: Station number
(2) Group specification
81H to A0H: All stations of a group (No.1 to 32)
(3) All stations
FFH: All stations of the target network number
(Except the host station)
s Host station's start device number where data to be ANY16
written are stored
n2 Write data length ANY16
When the target station is Q/QnA/AnUCPU: 1 to
230 words
When the target station is anything other than Q/
QnA/AnUCPU: 1 to 32 words
Output argument ENO Execution result Bit
d1 Target station's start device number where data is ANY16
written
(A contiguous area for the write data length is
required.)
d2 The host station's device that is turned on for one Array of bit [0..1]
scan upon completion of the instruction
d2[1] also turns ON if the instruction execution has
failed.
n1
(s)
n2
(d1)
(d2)
*1 Local devices and file registers per program cannot be used as a device which is used in setting data.
*2 In addition to the setting data, the ZNWR instruction is executed using the following fixed values.
Channel used by host station: Channel 2
Arrival monitoring time (monitoring time until instruction completion): 10 seconds
Number of resends for arrival monitoring timeout: 5 times
Processing details
This instruction writes data to devices of a programmable controller CPU on another station. (In units of words)
• Specify devices of the target station's CPU within the range allowed for the host station CPU when writing
data to the devices with the ZNWR instruction.
(Target station's start device number (d1) where data are written) + (Write points - 1) (End device No. of host 5
*3)
station's CPU
• Specify the host station's start device number (d1) within the range allowed for storing write data. (Example)
When D150 and after the area in the host station's CPU has been already used
Good example (D50 is specified in ( ).) Bad example (D100 is specified in ( ).)
Host station CPU Other station CPU Host station CPU Other station CPU
D0 D0
100 words D50 100 words
D99 D99
D100
D149
D150 D150
D199
: Duplicated area
*3 End device No. of the device in the host station CPU, and whose device name is same as in (d1)
Stores data to be
written to D750
to D753
Performs writing
[ST]
IF(M111=TRUE)THEN (* Instruction flag ON *)
MOV( TRUE, 10, D750);
MOV( TRUE, 20, D751);
MOV( TRUE, 30, D752 );
MOV( TRUE, 40, D753 ); (* Stores data to be written to D750 to D753 *)
END_IF;
IF(SM400=TRUE)THEN
MOV(TRUE,SW31,Var_ErrorCode); (* Stores error code *)
END_IF;
Z(P)_RRUN_J, Z(P)_RRUN_U
CC IE C NET/H
Structured ladder/FBD ST
Z_RRUN_J Z_RRUN_U
EN ENO EN ENO
Jn* d Un* d ENO:= Z_RRUN_J (EN, Jn*, s1, s2, s3, s4, d);
s1 s1 ENO:= Z_RRUN_U (EN, Un*, s1, s2, s3, s4, d);
s2 s2
s3 s3
s4 s4
5
The following instruction can go in the dotted squares.
Z_RRUN_J, ZP_RRUN_J, Z_RRUN_U, ZP_RRUN_U
■Executing condition
Instruction Executing condition
Z_RRUN_J
Z_RRUN_U
ZP_RRUN_J
ZP_RRUN_U
(s1)
(s2)
(s3)
(s4)
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction remotely switches a CPU module on another station to RUN.
Precautions
This instruction is applicable to the QJ71LP21 or QJ71BR11 with the function version B or later.
Performs
remote RUN
[ST]
IF((Var_Flag_Exe=TRUE) AND (SB47=FALSE) AND (SW0A0.1=FALSE)) THEN
Z_RRUN_J(TRUE,"J1",3,2,H3FF,H1,Var_Result); (* Performs remote RUN *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
(* Process on completion *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
Z(P)_RSTOP_J, Z(P)_RSTOP_U
CC IE C NET/H
Structured ladder/FBD ST
Z_RSTOP_J Z_RSTOP_U
EN ENO EN ENO
Jn* d Un* d ENO:= Z_RSTOP_J (EN, Jn*, s1, s2, s3, s4, d);
s1 s1 ENO:= Z_RSTOP_U (EN, Un*, s1, s2, s3, s4, d);
s2 s2
s3 s3
s4 s4
■Executing condition
Instruction Executing condition
Z_RSTOP_J
Z_RSTOP_U
ZP_RSTOP_J
ZP_RSTOP_U
(s1)
(s2)
(s3)
(s4)
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction remotely switches a CPU module on another station to STOP.
Precautions
This instruction is applicable to the QJ71LP21 or QJ71BR11 with the function version B or later.
Performs remote
STOP
[ST]
IF((Var_Flag_Exe=TRUE) AND (SB47=FALSE) AND (SW0A0.1=FALSE)) THEN
ZP_RSTOP_J(TRUE,"J1",3,2,H3FF,H1,Var_Result); (* Performs remote STOP *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
(* Process on completion *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
Z(P)_RTMRD_J, Z(P)_RTMRD_U
CC IE C NET/H
Structured ladder/FBD ST
Z_RTMRD_J Z_RTMRD_U
EN ENO EN ENO
ENO:= Z_RTMRD_J (EN, Jn*, s1, s2, s3, d1, d2);
Jn* d1 Un* d1
ENO:= Z_RTMRD_U (EN, Un*, s1, s2, s3, d1, d2);
s1 d2 s1 d2
s2 s2
s3 s3
5
The following instruction can go in the dotted squares.
Z_RTMRD_J, ZP_RTMRD_J, Z_RTMRD_U, ZP_RTMRD_U
■Executing condition
Instruction Executing condition
Z_RTMRD_J
Z_RTMRD_U
ZP_RTMRD_J
ZP_RTMRD_U
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239) String
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Channel used by host station ANY16
s2 Target station number ANY16
Host station is Universal model QCPU: 1 to 120
Host station is anything other than Universal model
QCPU: 1 to 64
s3 Target station's CPU type ANY16
0000H: Target station CPU/control CPU/host
system CPU (Specified data are the same as
'03FFH'.)
03E0H: Multi-CPU No. 1/target station CPU (single
CPU system)
03E1H: Multi-CPU No. 2
03E2H: Multi-CPU No. 3
03E3H: Multi-CPU No. 4
03FFH: Target station CPU/control CPU/host
system CPU
Output argument ENO Execution result Bit
d1 Variable that stores read clock data Array of ANY16 [0..3]
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
(s1)
(s2)
(s3)
(d1)
(d2)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads clock data from a CPU module on another station.
Precautions
This instruction is applicable to the QJ71LP21 or QJ71BR11 with the function version B or later.
Program example
• The following program reads out clock data from the QCPU on the station number 2 (target station) and stores the clock
data in the station number 1 (host station).
[Structured ladder/FBD]
[ST]
IF((Var_Flag_Exe=TRUE) AND (SB47=FALSE) AND (SW0A0.1=FALSE)) THEN
ZP_RTMRD_J(TRUE,"J1",4,2,H3FF,D300,Var_Result); (* Reads clock data from another station *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
Z(P)_RTMWR_J, Z(P)_RTMWR_U
CC IE C NET/H
Structured ladder/FBD ST
Z_RTMWR_J Z_RTMWR_U
EN ENO EN ENO
ENO:= Z_RTMWR_J (EN, Jn*, s1, s2, s3, s4, d);
Jn* d Un* d
s1 s1 ENO:= Z_RTMWR_U (EN, Un*, s1, s2, s3, s4, d);
s2 s2
s3 s3
s4 s4
5
The following instruction can go in the dotted squares.
Z_RTMWR_J, ZP_RTMWR_J, Z_RTMWR_U, ZP_RTMWR_U
■Executing condition
Instruction Executing condition
Z_RTMWR_J
Z_RTMWR_U
ZP_RTMWR_J
ZP_RTMWR_U
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the target station (1 to 239, 254) String
254: Network specified in "Valid module during
other station access"
Un* Start I/O number of the host station network No. String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Channel used by host station (1 to 8) ANY16
s2 Target station number ANY16
(1) Station number specification
Host station is Universal model QCPU: 1 to 120
Host station is anything other than Universal model
QCPU: 1 to 64
(2) Group specification
81H to A0H: All stations of a group (No.1 to 32)
(3) All stations
FFH: All stations of the target network No. (Except
the host station)
To specify a group or all stations, specify '0000H' or
'03FFH' for the target station's CPU type (s3).
s3 Target station's CPU type ANY16
0000H: Target station CPU/control CPU/host
system CPU (Specified data are the same as
'03FFH'.)
03E0H: Multi-CPU No. 1/target station CPU (single
CPU system)
03E1H: Multi-CPU No. 2
03E2H: Multi-CPU No. 3
03E3H: Multi-CPU No. 4
03FFH: Target station CPU/control CPU/host
system CPU
s4 Variable that stores write clock data Array of ANY16 [0..4]
(s1)
(s2)
(s3)
(s4)
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction writes clock data to a CPU module on another station.
Precautions
This instruction is applicable to the QJ71LP21 or QJ71BR11 with the function version B or later.
5
Writes clock data
to other stations
[ST]
IF(Var_Flag_Inst=TRUE)THEN
MOV(TRUE,H38,Var_ClockData[0]); (* Sets clock data *)
MOV(TRUE,H0,Var_ClockData[1]);
MOV(TRUE,H8,Var_ClockData[2]);
MOV(TRUE,H3000,Var_ClockData[3]);
MOV(TRUE,H0,Var_ClockData[4]);
END_IF;
IF((Var_Flag_Exe=TRUE) AND (SB47=FALSE) AND (SB0A0=FALSE)) THEN
ZP_RTMWR_J(TRUE,"J1",5,H0FF,H3FF,Var_ClockData,Var_Result); (* Writes clock data to other stations*)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
Z(P)_REMFR
CC IE F NET/H
Structured ladder/FBD ST
Z_REMFR
EN ENO
Jn* d1
d2 ENO:= Z_REMFR (EN, Jn*, n1, n2, n3, n4, n5, d1, d2);
n1
n2
n3
n4
n5
■Executing condition
Instruction Executing condition
Z_REMFR
ZP_REMFR
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Target network number (1 to 239) String
n1 Channel number ANY16
CC-Link IE Field Network: 1 to 32
MELSECNET/H: 1 to 8
n2 Target station number ANY16
CC-Link IE Field Network: 1 to 120
MELSECNET/H: 1 to 64
n3 Start I/O number of the target intelligent function ANY16
module
For the CC-Link IE Field Network,
the higher two digits when expressing the I/O
number in three digits.
For the MELSECNET/H,
the higher three digits when expressing the I/O
number in four digits.
n4 Read buffer memory start address ANY16
Specifies the start address of the buffer memory for
the read destination intelligent function module.
n5 Number of read points ANY16
CC-Link IE Field Network: 1 to 240
MELSECNET/H: 1 to 960
n1
n2
n3
n4
n5 5
(d1)
(d2)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads data from the buffer memory of an intelligent function module to the host station's word device (starting
from (d1)) on the intelligent device station/remote I/O station.
Program example
• The following program reads digital output values.
[Structured ladder/FBD]
Z(P)_REMTO
CC IE F NET/H
Structured ladder/FBD ST
Z_REMTO
EN ENO
Jn* d1
d2 ENO:= Z_REMTO (EN, Jn*, n1, n2, n3, n4, n5, d1, d2);
n1
n2
n3
n4 5
n5
■Executing condition
Instruction Executing condition
Z_REMTO
ZP_REMTO
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Jn* Network number of the host station (1 to 239) String
n1 Channel number ANY16
CC-Link IE Field Network: 1 to 32
MELSECNET/H: 1 to 8
n2 Target station number ANY16
CC-Link IE Field Network: 1 to 120
MELSECNET/H: 1 to 64
n3 Start I/O number of the target intelligent function ANY16
module
For the CC-Link IE Field Network,
the higher two digits when expressing the I/O
number in three digits.
For the MELSECNET/H,
the higher three digits when expressing the I/O
number in four digits.
n4 Write buffer memory start address ANY16
Specifies the start address of the buffer memory for
the write destination intelligent function module.
n5 Number of write points ANY16
CC-Link IE Field Network: 1 to 240
MELSECNET/H: 1 to 960
n1
n2
n3
n4
n5
(d1)
(d2)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction writes data to the buffer memory of an intelligent function module on the intelligent device station/remote I/O
station.
Program example
• The following program makes the A/D conversion enable setting on channels.
[Structured ladder/FBD]
A/D Conversion
enable/disable
setting
CH2 time/count
averaging setting
CH3 time/count
averaging setting
Averaging processing
specification
Writes data to
buffer memory
Turns operating
condition setting
request (Y9) ON
Turns operating
condition setting
request (Y9) OFF
G(P)_CCPASET
CC IE F
Structured ladder/FBD ST
G_CCPASET
EN ENO
Un* d
ENO:= G_CCPASET (EN, Un*, s1, s2, s3, s4, d);
s1
s2
s3
s4
■Executing condition
Instruction Executing condition
G_CCPASET
GP_CCPASET
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module ANY16
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..3]
s2 Start number of the host station's device that stores Array of ANY16 [0..599]
network configuration setting data.
s3 Start number of the host station's device that stores Array of ANY16 [0..7]
reserved station specification data.
s4 Start number of the host station's device that stores Array of ANY16 [0..7]
error invalid station setting data.
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of Bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sets parameters for master/local module (master station).
Network configuration
Data link faulty setting data
station setting 0: Invalid
0: Clear 1: Valid
1: Hold
Output setting
Reserved station
specification data 5
in the CPU STOP status 0: Invalid
0: Hold 1: Valid
1: Clear
Error invalid station
specification data
Link scan mode
0: Invalid
0: Asynchronous
1: Valid
1: Synchronous
(s1)[2] Total number of Specify the number of connected slave stations. 1 to 120 User
slave station
(s1)[3] Constant link Set the constant link scan time. 5 to User
scan time 0: No setting 2000(ms)
5 to 2000: Constant link scan time
(s2)[1] RX/RY Specify the start number of RX/RY in units of 16 points. 0 to 3FF0H
offset
(s2)[2] RX/RY Specify the number of RX/RY in units of 16 points. 0 to 2048
size
(s2)[3] RWr/RWw Specify the start number of RWr/RWw. in units of 4 points. 0 to 1FFCH
offset
(s2)[4] RWr/RWw Specify the number of RWr/RWw. in units of 4 points. 0 to 1024
size
(s2)[5]
(s2)[594]
(s2)[595] 120th Slave The same as from (s2)[0] to (s2)[4].
station
setting
information
(s2)[596] RX/RY
offset
(s2)[597] RX/RY
size
(s2)[598] RWr/RWw
offset
(s2)[599] RWr/RWw
size
Program example
• The following program sets parameters for master station of network No.1 when Var_Flag_Exe turns ON. (Total number of
slave stations is 3.)
Performs writing
END_IF;
ZP_OPEN
Ether
Structured ladder/FBD ST
ZP_OPEN
EN ENO
ENO:= ZP_OPEN (EN, Un*, s1, s2, d);
Un* d
s1
s2
■Executing condition
Instruction Executing condition
ZP_OPEN
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..9]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
(s1)
(s2)
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction establishes (opens) a connection with external device for data communication.
Open request
signal
Connection 1 open
request signal
Application setting
Destination
IP address
Destination
port number
Opens connection
Turns normal
completion flag ON
Turns error
completion flag ON
*1 For divisions of (1) and (2) in the program, (1) is necessary when the [Open settings] of GX Works2 is used and (2) is necessary when it
is not used.
*1
(*Use GX Works2-[Open settings]*)
MOVP(TRUE,H0,D100);
(*Execution type*)
*1
(*Use D100-[control data]*)
MOVP(TRUE,H8000,D100);
(*Execution type*)
MOVP(TRUE,H0,D102);
5
(*Application setting*)
MOVP(TRUE,H1000,D103);
(*Host station port number*)
DMOVP(TRUE,H0A6155DF,D104);
(*Destination IP address*)
MOVP(TRUE,H2000,D106);
(*Destination port number*)
ZP_OPEN(TRUE,"U0",1,D100,Var_Result); (* Opens connection *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
SET(TRUE, Var_Flag_Normal); (* Turns normal completion flag ON *)
END_IF;
IF(Var_Result[1]=TRUE)THEN (* Error completion *)
SET(TRUE, Var_Flag_Error); (* Turns error completion flag ON *)
END_IF;
END_IF;
*1 For divisions of (1) and (2) in the program, (1) is necessary when the [Open settings] of GX Works2 is used and (2) is necessary when it
is not used.
Structured ladder/FBD ST
ZP_CLOSE
EN ENO
ENO:= ZP_CLOSE (EN, Un*, s1, s2, d);
Un* d
s1
s2
■Executing condition
Instruction Executing condition
ZP_CLOSE
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..1]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
(s1)
(s2)
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction shuts off (closes) a connection with external device during data communication.
Program example
• The following program closes the connection 1.
(The I/O signals of the Ethernet module are X/Y00 to X/Y1F)
[Structured ladder/FBD]
Connection 1
close timing
5
Closing connection 1
from external device
Close instruction
1PLS
Closes connection
Turns execution
flag ON
Turns normal
completion flag ON
Turns error
completion flag ON
Turns execution
flag OFF
ZP_BUFRCV
Ether
Structured ladder/FBD ST
ZP_BUFRCV
EN ENO
ENO:= ZP_BUFRCV (EN, Un*, s1, s2, d1, d2);
Un* d1
s1 d2
s2
■Executing condition
Instruction Executing condition
ZP_BUFRCV
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..1]
Output argument ENO Execution result Bit
d1 Start number of the device that stores read data ANY16
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
(s1)
(s2)
(d1)
(d2)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads receive data from external device in fixed buffer communication.
This instruction is used in a main program.
Program example
• The following program reads out receive data from the fixed buffer of the connection 1.
(The I/O signals of the Ethernet module are X/Y00 to X/Y1F)
[Structured ladder/FBD]
Connection 1 open
completion signal
Connection 1 open
request signal
Fixed buffer 1
receive status signal
Receive
instruction 1 PLS
Reads data in
fixed buffer
communication
Structured ladder/FBD ST
Z_BUFRCVS
EN ENO
ENO:= Z_BUFRCVS (EN, Un*, s, d);
Un* d
■Executing condition
Instruction Executing condition
Z_BUFRCVS
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Connection number (1 to 16) ANY16
Output argument ENO Execution result Bit
d Start number of the device that stores read data ANY16
(s)
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads receive data from external device in fixed buffer communication.
This instruction is used in an interrupt program.
Program example
• The following program reads receive data from the fixed buffer of the connection 2.
(The I/O signals of the Ethernet module are X/Y00 to X/Y1F) 5
[Structured ladder/FBD]
Performs readout
in fixed buffer
communication
[ST]
Z_BUFRCVS(SM400,"00",2,D700); (* Reads data in fixed buffer communication *)
Structured ladder/FBD ST
ZP_BUFSND
EN ENO
s1
s2
s3
■Executing condition
Instruction Executing condition
ZP_BUFSND
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..1]
s3 Start number of the device that stores write data ANY16
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
(s1)
(s2)
(s3)
(d)
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sends data to external device in fixed buffer communication.
• Send data
Device Item Setting data Setting Setting
range side
(s3)+0 Send data length Data length of the data read from the fixed buffer data area is stored. (Data length (Refer to the User
becomes the number of words or the number of bytes depending on the procedure used in left.)
fixed buffer communication.)
• With procedure (communication in binary code): The number of words (1 to 1017)
• With procedure (communication in ASCII code): The number of words (1 to 508)
• Nonprocedural communication (communication in binary code): The number of bytes (1
to 2046)
5
(s3)+1 Send data Specify the send data. User
(s3)+n
Program example
• The following program sends data from the fixed buffer of the connection 1.
(The I/O signals of the Ethernet module are X/Y00 to X/Y1F)
[Structured ladder/FBD]
Send instruction
1PLS
Sends data in
fixed buffer
communication
ZP_ERRCLR
Ether
Structured ladder/FBD ST
ZP_ERRCLR
■Executing condition
Instruction Executing condition
ZP_ERRCLR
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..7]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction turns OFF the LED on Ethernet module and clears error information stored in the buffer memory.
Program example
• The following program clears the open error code of the connection 1.
(The I/O signals of the Ethernet module are X/Y00 to X/Y1F)
[Structured ladder/FBD]
Sets clear
function
Turns execution
flag ON
Clears
error information
Normal completion
Clears error code
to 0
Error completion
Stores error code
Turns execution
flag OFF
Structured ladder/FBD ST
ZP_ERRRD
■Executing condition
Instruction Executing condition
ZP_ERRRD
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..7]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads the error information stored in the buffer memory of the Ethernet module.
Setting data
Device Item Setting data Setting Setting
range side
(s)[0] System area
(s)[1] Completion status The instruction completion status is stored. System
0: Normal completion
Other than 0 : Error completion (error code)
(s)[2] Read information Specify the error information to be read. 0, User
specification 0: Initial error code 1 to 16
1 to 16: Open error code of the corresponding connection
(s)[3] Read target Specify the target error information to be read. 0000H User
information 0000H: Latest error information
specification
Program example
• The following program reads the open error code of the connection 1.
(The I/O signals of the Ethernet module are X/Y00 to X/Y1F)
[Structured ladder/FBD]
Sets open
error code
Reads error
information
Normal completion
Stores error
information
Error completion
Stores error code
Turns execution
flag OFF
[ST]
IF((Var_Flag_Inst=TRUE) AND (Var_Flag_Exe=FALSE))THEN
MOVP(TRUE,H1,Var_ControlData[2]); (* Sets open error code of connection number 1 *)
MOVP(TRUE,H0,Var_ControlData[3]); (* Sets latest error information *)
SET(TRUE,Var_Flag_Exe); (* Turns execution flag ON*)
END_IF;
IF(Var_Flag_Exe=TRUE)THEN
ZP_ERRRD(TRUE,"00",Var_ControlData,Var_Result); (* Reads error information *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
MOVP(TRUE,Var_ControlData[4],Var_ErrorInfo); (* Stores error information*)
END_IF;
IF(Var_Result[1]=TRUE)THEN (* Error completion *)
MOVP(TRUE,Var_ControlData[1],Var_ErrorCode); (* Stores error code *)
END_IF;
RST(TRUE,Var_Flag_Exe); (* Turns execution flag OFF *)
END_IF;
Z(P)_UINI
CC IE C Ether
*1 ZP_UINI instruction only
Structured ladder/FBD ST
Z_UINI
■Executing condition
Instruction Executing condition
Z_UINI
ZP_UINI
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..9]
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
Ethernet: This instruction reinitializes the Ethernet module.
CC-Link IE Controller Network: For Universal model QCPU, this instruction sets the station number of the CC-Link IE
Controller Network module on normal station (host station).
*1 The Ethernet module enables data exchange to restart by clearing the address information retained in the module and by performing re-
initial processing. (The Initial normal completion signal (X19) is on.)
The UINI instruction can be executed only once. The UINI instruction cannot be executed again after
determination of station number. (It caused an error completion.)
However, in the case of the UINI instruction with the error completion, execute the UINI instruction again after
taking corrective action.
Program example
• The following program sets the station number 2. The following is an example for Ethernet.
[Structured ladder/FBD]
Sets change
target
Sets host
station number
Performs
reinitialization
(* Process on completion *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
ZP_MRECV
Ether
Structured ladder/FBD ST
ZP_MRECV
EN ENO
ENO:= ZP_MRECV (EN, Un*, s, d1, d2);
Un* d1
s d2
■Executing condition
Instruction Executing condition
ZP_MRECV
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s Variable that stores control data Array of ANY16 [0..15]
Output argument ENO Execution result Bit
d1 Start number of the host station's device that stores ANY16
the content of the received e-mail (header +
attached file)
d2 Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d2[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads received e-mail.
(s)[10] Header For Specify the header data length of the mail that can be stored in (d1) to (d1)+n. 0 to 373 User
length instruction 0: Adjust header data length to that of the received mail. (word)
execution 1 to 373: The number of data that can be stored in ((d1) to (d1)+n)
At Header data length of the mail stored in (d1) to (d1)+n is stored. System
instruction 1 to 373: Number of receive data stored in ((d1) to (d1)+n)
completion
(s)[11] Clock set flag Valid/invalid status of the data in the area starting from (s)[12] is stored. 0, 1 System
0: Invalid
1: Valid
(s)[12] Clock data Clock data at the time of error completion are stored in BCD format. System
(set only when errors
b15 to b8 b7 to b0
(s)[15] occur)
s [12 ] Month (01H to 12H) Year (00H to 99H) Last two digits
s [13 ] Hour (00H to 23H) Day (01H to 31H)
s [14 ] Second (00H to 59H) Minute (00H to 59H)
s [15 ] Year (00H to 99H) First two digits Day of week (00H to 06H)
00H (Sun.) to 06H (Sat.)
(d1)+0 Receive data Content (header + attached file) of the received mail are stored. System
(d1)+n
*1 The following table shows the processing that depends on the selection of the execution type after executing the MRECV instruction.
Program example
• The following program performs the e-mail receiving process by the receive instruction (X21).
(The I/O signals of the Ethernet module are X/Y00 to X/Y1F)
[Structured ladder/FBD]
Sets to inquire
to server
Sets to read
the first mail
[ST]
IF (X21=TRUE) THEN
SET(TRUE,Var_Flag_Exe);
END_IF;
IF((Var_Flag_Exe=TRUE) AND (U0\G9858.F=TRUE))THEN
MOVP(TRUE,H200,Var_ControlData[0]); (* Sets to inquire to server *)
MOVP(TRUE,0,Var_ControlData[2]); (* Sets to read the first mail *)
MOVP(TRUE,0,Var_ControlData[9]); (* Sets to adjust data length to that of the received mail *)
MOVP(TRUE,0,Var_ControlData[10]); (* Sets to adjust header data length to that of the received mail *)
ZP_MRECV(TRUE,"00",Var_ControlData,D100,Var_Result); (* Reads received e-mail *)
RST(TRUE,Var_Flag_Exe);
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
Structured ladder/FBD ST
ZP_MSEND
EN ENO
ENO:= ZP_MSEND (EN, Un*, s1, s2, d);
Un* d
s1
s2
■Executing condition 5
Instruction Executing condition
ZP_MSEND
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un* Start I/O number of the module String
(00 to FE: Higher two digits when expressing the I/
O number in three digits)
s1 Variable that stores control data Array of ANY16 [0..15]
s2 Start number of the host station's device that stores ANY16
the content of the sent e-mail (subject + attached
file) or (subject + text)
Output argument ENO Execution result Bit
d Variable that turns ON upon completion of the Array of bit [0..1]
instruction
d[1] also turns ON at the time of error completion.
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sends an e-mail.
• Send data
Device Item Setting data Setting Setting
range side
(s2)+0 Send data Specify the content of ((subject + attached file) or (Subject + text)) of a mail to be sent. User
(s2)+n
Sets transmission
destination number
Sets subject
5
Sets file
to be attached
Sends e-mail
Int_Msg[0] := H6574; (* te *)
Int_Msg[1] := H7473; (* st *)
Int_Msg[2] := H616d; (* ma *)
Int_Msg[3] := H6c69; (* il *)
Int_Msg[4] := H6d20; (* m *)
Int_Msg[5] := H6573; (* se *)
Int_Msg[6] := H646e; (* nd *) (* Sets subject *)
Sets transmission
destination number
Sets subject
5
Sets text
Sends e-mail
Int_Msg[0] := H6574; (* te *)
Int_Msg[1] := H7473; (* st *)
Int_Msg[2] := H616d; (* ma *)
Int_Msg[3] := H6c69; (* il *)
Int_Msg[4] := H6d20; (* m *)
Int_Msg[5] := H6573; (* se *)
Int_Msg[6] := H646e; (* nd *) (* Sets subject *)
Int_Msg[7] := H7274; (* Er *)
Int_Msg[8] := H6f72; (* ro *)
Int_Msg[9] := H2072; (* r *)
Int_Msg[10] := H614d; (* Ma *)
Int_Msg[11] := H6863; (* ch *)
Int_Msg[12] := H6e69; (* in *)
Int_Msg[13] := H3165; (* e1 *)
Int_Msg[14] := H3020; (* 0 *)
Int_Msg[15] := H3130; (* 01 *) (* Sets text *)
S(P)_PIDINIT
Structured ladder/FBD ST
S_PIDINIT
ENO:= S_PIDINIT (EN, s);
EN ENO
■Executing condition
Instruction Executing condition
S_PIDINIT
SP_PIDINIT
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s Start number of the device that stores PID control ANY16
data
Output argument ENO Execution result Bit
Processing details
This instruction enables PID control by registering the PID control data for the number of loops to be used to the CPU module
in batch.
(s)+10 MV change rate Set the variation limit 0 to 2000 -32768 to 32767 User In the case of "With PID
limit (MVL) between the previous MV limits", the PID operation is
and the present MV. performed after values are
When the MV variation is replaced as follows:
greater than the limit value, • If the MVL value is less
bit 1 (b1) of the alarm device than 0, the value is clipped
is set to '1'. to 0.
MV variation is not limited. • If the MVL value is
(Even if the MV variation greater than 2000, the
exceeds the limit value, the value is clipped to 2000.
actual MV variation is used
as it is for calculating the
MV.)
(s)+11 PV change rate Set the variation limit 0 to 2000 -32768 to 32767 User In the case of "With PID
limit (PVL) between the previous PV and limits", the PID operation is
the present PV. performed after values are
When the PV variation is replaced as follows:
greater than the limit value, • If the PVL value is less
bit 0 (b0) of the alarm device than 0, the value is clipped
is set to '1'. to 0.
PV variation is not limited. • If the PVL value is greater 6
(Even if the PV variation than 2000, the value is
exceeds the limit value, the clipped to 2000.
actual PV variation is used as
it is for performing the PID
operation.)
(s)+12 (Fixed value) 0 0 User
(s)+13 Derivative gain Set a duration (delay in 0 to 32767 0 to 32767 User An error occurs and the PID
(KD) action) for derivative action. (unit: 0.01) (unit: 0.01) operation for the
As the setting value corresponding loop is not
increases, the duration If setting value If setting value performed.
becomes smaller and action > 30000 > 30000
becomes closer to exact KD = Infinite () KD = Infinite ()
differential.
Ideal value KD = 8.00
(s)+14 (Fixed value) 0 0 User
(s)+15 (Fixed value) 0 0 User
Setting data for No. 2 loop (device: (s)+16 to (s)+29)
*1 For the PID operational expression set in the operational expression selection, refer to the following.
MELSEC-Q/L/QnA Programming Manual (PID Control Instructions)
S(P)_PIDCONT
Structured ladder/FBD ST
S_PIDCONT
ENO:= S_PIDCONT (EN, s);
EN ENO
■Executing condition
Instruction Executing condition
S_PIDCONT
SP_PIDCONT
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s Start number of the device that is assigned in I/O ANY16
data area
Output argument ENO Execution result Bit
Processing details
• This instruction measures sampling cycle and performs PID operation at instruction execution.
• This instruction performs PID operation based on the set value (SV) and process value (PV) in the I/O data area set to the
device number specified by (s) or later, and stores the operation result to the automatic manipulated value (MV) area in the
I/O data area.
• PID operation is performed in response to the first execution of the PIDCONT instruction after the set sampling cycle time
has elapsed.
(s)+0 Initial processing flag Processing method at the 0: PID operation for the number of loops User
start of PID operation to be used is batch-processed in one
scan.
Other than 0: PID operation for the
number of loops to be used is processed
in several scans.
(s)+1 PID control work area
(reserved by the system)
(s)+9
I/O data area for No. 1 loop (device: (s)+10 to (s)+27)
(s)+10 Setting SV • PID control target value 0 to 2000 -32768 to 32767 User In the case of "With PID
value limits", the PID operation is
performed after values are
replaced as follows:
• If SV is less than 0, the
value is clipped to 0.
• If SV is greater than 2000,
the value is clipped to
6
2000.
(s)+11 Process PV • Feedback data from the -50 to 2050 -32768 to 32767 User In the case of "With PID
value control target to the A/D limits", the PID operation is
conversion module performed after values are
replaced as follows:
• If PV is less than -50, the
value is clipped to -50.
• If PV is greater than 2050,
the value is clipped to
2050.
(s)+12 Automatic MV • Manipulated value -50 to 2050 -32768 to 32767 System
manipulated obtained by PID operation
value • The value is output from
the D/A conversion
module to the control
target.
(s)+13 Process PVf • Process value obtained by -50 to 2050 -32768 to 32767 System
value after calculation using
filtering operational expression.*1
(s)+14 Manual MVMAN • Store the data output from -50 to 2050 -32768 to 32767 User In the case of "With PID
manipulated the D/A conversion limits", the PID operation is
value module in manual performed after values are
operation. replaced as follows:
• If MVMAN is less than -50,
the value is clipped to -50.
• If MVMAN is greater than
2050, the value is clipped
to 2050.
(s)+15 Manual/ MAN/ • Select whether the output 0: Automatic manipulated value User When other than 0 or 1 is
automatic AUTO to the D/A conversion 1: Manual manipulated value selected, an error occurs and
selection module is a manual the operation for the
manipulated value or an corresponding loop is not
automatic manipulated performed.
value.
• In manual operation, the
automatic manipulated
value remains
unchanged.
*1 For process value after filtering (PVf), the value calculated based on the process value of input data are stored.
For the operational expression, refer to the following.
MELSEC-Q/L/QnA Programming Manual (PID Control Instructions)
S_PIDSTOP, S_PIDRUN
Structured ladder/FBD ST
S_PIDSTOP
ENO:= S_PIDSTOP (EN, n);
EN ENO
■Executing condition
Instruction Executing condition
S_PIDSTOP, S_PIDRUN
SP_PIDSTOP, SP_PIDRUN
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
n Loop number for stop/start ANY16
Output argument ENO Execution result Bit
(n)
Processing details
• S(P)_PIDSTOP
This instruction stops the PID operation for the loop number specified by 'n'.
• S(P)_PIDRUN
This instruction starts the PID operation for the loop number specified by 'n'.
Precautions
The following table shows the CPU modules applicable to the PID control instructions (inexact differential) and the PID control
instructions (exact differential).
CPU module model Inexact differential Exact differential
Basic model QCPU The first five digits of the serial number are '04121' or lower.
The first five digits of the serial number are '04122' or higher
High Performance model The first five digits of the serial number are '05031' or lower.
QCPU
The first five digits of the serial number are '05032' or higher.
Redundant CPU
Universal model QCPU
LCPU
S(P)_PIDPRMW
Structured ladder/FBD ST
S_PIDPRMW
EN ENO
ENO:= S_PIDPRMW (EN, n, s);
n
■Executing condition
Instruction Executing condition
S_PIDPRMW
SP_PIDPRMW
6
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
n Loop number to be changed ANY16
s Start number of the device that stores PID control ANY16
data to be changed
Output argument ENO Execution result Bit
(n)
(s)
Processing details
This instruction changes the operation parameter of the loop number specified by 'n' to the PID control data stored in the
devices starting from the device number specified by (s).
(s)+0 Operational Select the PID operational 0: Forward 0: Forward User An error occurs and the PID
expression expression.*1 operation operation operation for the
selection 1: Reverse 1: Reverse corresponding loop is not
operation operation performed.
(s)+1 Sampling cycle Set the PID operation cycle. 1 to 6000 1 to 6000 User
(TS) (unit: 10ms) (unit: 10ms)
(s)+2 Proportional Proportional gain of PID 1 to 10000 1 to 10000 User An error occurs and the PID
constant (KP) operation (unit: 0.01) (unit: 0.01) operation for the
corresponding loop is not
(s)+3 Integral constant Constant that expresses the 1 to 32767 1 to 32767 User
performed.
(TI) magnitude of the integral (unit: 100ms) (unit: 100ms)
action (I action) effect.
Increasing the integral If setting value If setting value
constant slows down the > 30000 > 30000
manipulated value change. TI = Infinite () TI = Infinite ()
(s)+4 Derivative constant Constant that expresses the 0 to 30000 0 to 30000 User
(TD) magnitude of the derivative (unit: 10ms) (unit: 10ms)
action (D action) effect.
Increasing the derivative
constant causes significant
changes in the manipulated
value even with a slight
change of the control target.
(s)+5 Filter coefficient () Set the degree of filtering to 0 to 100 0 to 100 User
be applied to the process
value.
The filtering effect decreases
as the value gets closer to 0.
(s)+6 MV lower limit Set the lower limit for the -50 to 2050 -32768 to 32767 User In the case of "With PID
(MVLL) manipulated value (MV) limits", the PID operation is
calculated in PID operation in performed after values are
automatic mode. replaced as follows:
If the MV is less than the set • If MVLL or MVHL value is
lower limit value (MVLL), the less than -50, the value is
value is clipped to the MVLL. clipped to -50.
• If MVLL or MVHL value is
(s)+7 MV upper limit Set the upper limit for the -50 to 2050 -32768 to 32767 User
greater than 2050, the
(MVHL) manipulated value calculated
in PID operation in automatic value is clipped to 2050.
mode.
If the MV is greater than the
set upper limit value (MVHL),
the value is clipped to the
MVHL.
(s)+8 MV change rate Set the variation limit 0 to 2000 -32768 to 32767 User In the case of "With PID
limit (MVL) between the previous MV limits", the PID operation is
and the present MV. performed after values are
When the MV variation is replaced as follows:
greater than the limit value, • If the MVL value is less
bit 1 (b1) of the alarm device than 0, the value is clipped
is set to '1'. to 0.
MV variation is not limited. • If the MVL value is
(Even if the MV variation greater than 2000, the
exceeds the limit value, the value is clipped to 2000.
actual MV variation is used
as it is for calculating the
MV.)
(s)+9 PV change rate Set the variation limit 0 to 2000 -32768 to 32767 User In the case of "With PID
limit (PVL) between the previous PV and limits", the PID operation is
the present PV. performed after values are
When the PV variation is replaced as follows:
greater than the limit value, • If the PVL value is less
bit 0 (b0) of the alarm device than 0, the value is clipped
is set to '1'. to 0.
PV variation is not limited. • If the PVL value is greater
(Even if the PV variation than 2000, the value is
exceeds the limit value, the clipped to 2000.
actual PV variation is used as
it is for performing the PID
operation.)
(s)+10 (Fixed value) 0 0 User
(s)+11 Derivative gain Set a duration (delay in 0 to 32767 0 to 32767 User An error occurs and the PID
(KD) action) for derivative action. (unit: 0.01) (unit: 0.01) operation for the
As the setting value corresponding loop is not
increases, the duration If setting value > If setting value > performed.
becomes smaller and action 30000 30000
becomes closer to exact
differential.
KD = Infinite () KD = Infinite ()
6
Ideal value KD = 8.00
(s)+12 (Fixed value) 0 0 User
(s)+13 (Fixed value) 0 0 User
*1 For the PID operational expression set in the operational expression selection, refer to the following.
MELSEC-Q/L/QnA Programming Manual (PID Control Instructions)
Precautions
The following table shows the CPU modules applicable to the PID control instructions (inexact differential) and the PID control
instructions (exact differential).
CPU module model Inexact differential Exact differential
Basic model QCPU The first five digits of the serial number are '04121' or lower.
The first five digits of the serial number are '04122' or higher
High Performance model The first five digits of the serial number are '05031' or lower.
QCPU
The first five digits of the serial number are '05032' or higher.
Redundant CPU
Universal model QCPU
LCPU
PIDINIT(P)
Structured ladder/FBD ST
PIDINIT
ENO:= PIDINIT (EN, s);
EN ENO
■Executing condition
Instruction Executing condition
PIDINIT
PIDINITP
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s Start number of the device that stores PID control ANY16
data
Output argument ENO Execution result Bit
Processing details
This instruction enables PID control by registering the PID control data for the number of loops to be used to the CPU module
in batch.
(s)+10 MV change rate Set the variation limit 0 to 2000 -32768 to 32767 User In the case of "With PID
limit (MVL) between the previous MV limits", the PID operation is
and the present MV. performed after values are
When the MV variation is replaced as follows:
greater than the limit value, • If the MVL value is less
bit 1 (b1) of the alarm device than 0, the value is clipped
is set to '1'. to 0.
MV variation is not limited. • If the MVL value is
(Even if the MV variation greater than 2000, the
exceeds the limit value, the value is clipped to 2000.
actual MV variation is used
as it is for calculating the
MV.)
(s)+11 PV change rate Set the variation limit 0 to 2000 -32768 to 32767 User In the case of "With PID
limit (PVL) between the previous PV and limits", the PID operation is
the present PV. performed after values are
When the PV variation is replaced as follows:
greater than the limit value, • If the PVL value is less
bit 0 (b0) of the alarm device than 0, the value is clipped
is set to '1'. to 0.
PV variation is not limited. • If the PVL value is greater
(Even if the PV variation than 2000, the value is
exceeds the limit value, the clipped to 2000.
actual PV variation is used as
it is for performing the PID
operation.)
Setting data for No. 2 loop (device: (s)+12 to (s)+21)
(s)+12 Operational The same as Setting data for No. 1 loop
expression
selection
(s)+13 Sampling cycle
(TS)
(s)+14 Proportional
constant (KP)
(s)+15 Integral constant
(TI)
(s)+16 Derivative constant
(TD)
(s)+17 Filter coefficient ()
(s)+18 MV lower limit
(MVLL)
(s)+19 MV upper limit
(MVHL)
(s)+20 MV change rate
limit (MVL)
(s)+21 PV change rate
limit (PVL)
Setting data for No. n loop
(s)+(m+9)
limit (MVL)
PV change rate
6
limit (PVL)
*1 For the PID operational expression set in the operational expression selection, refer to the following.
MELSEC-Q/L/QnA Programming Manual (PID Control Instructions)
Precautions
The following table shows the CPU modules applicable to the PID control instructions (inexact differential) and the PID control
instructions (exact differential).
CPU module model Inexact differential Exact differential
Basic model QCPU The first five digits of the serial number are '04121' or lower.
The first five digits of the serial number are '04122' or higher
High Performance model The first five digits of the serial number are '05031' or lower.
QCPU The first five digits of the serial number are '05032' or higher.
Redundant CPU
Universal model QCPU
LCPU
PIDCONT(P)
Structured ladder/FBD ST
PIDCONT
ENO:= PIDCONT (EN, s);
EN ENO
■Executing condition
Instruction Executing condition
PIDCONT
PIDCONTP
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s Start number of the device that is assigned in I/O ANY16
data area
Output argument ENO Execution result Bit
Processing details
• This instruction measures sampling cycle and performs PID operation at instruction execution.
• This instruction performs PID operation based on the set value (SV) and process value (PV) in the I/O data area set to the
device number specified by (s) or later, and stores the operation result to the automatic manipulated value (MV) area in the
I/O data area.
• PID operation is performed in response to the first execution of the PIDCONT instruction after the set sampling cycle time
has elapsed.
(s)+0 Initial processing flag Processing method at the 0: PID operation for the number of loops User
start of PID operation to be used is batch-processed in one
scan.
Other than 0: PID operation for the
number of loops to be used is processed
in several scans.
(s)+1 PID control work area
(reserved by the system)
(s)+9
I/O data area for No. 1 loop (device: (s)+10 to (s)+27)
(s)+10 Setting SV • PID control target value 0 to 2000 -32768 to 32767 User In the case of "With PID
value limits", the PID operation is
performed after values are
replaced as follows:
• If SV is less than 0, the
value is clipped to 0.
• If SV is greater than 2000,
the value is clipped to
6
2000.
(s)+11 Process PV • Feedback data from the -50 to 2050 -32768 to 32767 User In the case of "With PID
value control target to the A/D limits", the PID operation is
conversion module performed after values are
replaced as follows:
• If PV is less than -50, the
value is clipped to -50.
• If PV is greater than 2050,
the value is clipped to
2050.
(s)+12 Automatic MV • Manipulated value -50 to 2050 -32768 to 32767 System
manipulated obtained by PID operation
value • The value is output from
the D/A conversion
module to the control
target.
(s)+13 Process PVf • Process value obtained by -50 to 2050 -32768 to 32767 System
value after calculation using
filtering operational expression.*1
(s)+14 Manual MVMAN • Store the data output from -50 to 2050 -32768 to 32767 User In the case of "With PID
manipulated the D/A conversion limits", the PID operation is
value module in manual performed after values are
operation. replaced as follows:
• If MVMAN is less than -50,
the value is clipped to -50.
• If MVMAN is greater than
2050, the value is clipped
to 2050.
(s)+15 Manual/ MAN/ • Select whether the output 0: Automatic manipulated value User When other than 0 or 1 is
automatic AUTO to the D/A conversion 1: Manual manipulated value selected, an error occurs and
selection module is a manual the operation for the
manipulated value or an corresponding loop is not
automatic manipulated performed.
value.
• In manual operation, the
automatic manipulated
value remains
unchanged.
*1 For process value after filtering (PVf), the value calculated based on the process value of input data are stored.
For the operational expression, refer to the following.
MELSEC-Q/L/QnA Programming Manual (PID Control Instructions)
PIDSTOP, PIDRUN
Structured ladder/FBD ST
PIDSTOP
ENO:= PIDSTOP (EN, n);
EN ENO
■Executing condition
Instruction Executing condition
PIDSTOP, PIDRUN
PIDSTOPP, PIDRUNP
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
n Loop number for stop/start ANY16
Output argument ENO Execution result Bit
(n)
Processing details
• PIDSTOP(P)
This instruction stops the PID operation for the loop number specified by 'n'.
• PIDRUN(P)
This instruction starts the PID operation for the loop number specified by 'n'.
Precautions
The following table shows the CPU modules applicable to the PID control instructions (inexact differential) and the PID control
instructions (exact differential).
CPU module model Inexact differential Exact differential
Basic model QCPU The first five digits of the serial number are '04121' or lower.
The first five digits of the serial number are '04122' or higher
High Performance model The first five digits of the serial number are '05031' or lower.
QCPU
The first five digits of the serial number are '05032' or higher.
Redundant CPU
Universal model QCPU
LCPU
PIDPRMW(P)
Structured ladder/FBD ST
PIDPRMW
EN ENO
ENO:= PIDPRMW (EN, n, s);
n
■Executing condition
Instruction Executing condition
PIDPRMW
PIDPRMWP
6
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
n Loop number to be changed ANY16
s Start number of the device that stores PID control ANY16
data to be changed
Output argument ENO Execution result Bit
(n)
(s)
Processing details
This instruction changes the operation parameter of the loop number specified by 'n' to the PID control data stored in the
devices starting from the device number specified by (s).
(s)+0 Operational Select the PID operational 0: Forward 0: Forward User An error occurs and the PID
expression expression.*1 operation operation operation for the
selection 1: Reverse 1: Reverse corresponding loop is not
operation operation performed.
(s)+1 Sampling cycle Set the PID operation cycle. 1 to 6000 1 to 6000 User
(TS) (unit: 10ms) (unit: 10ms)
(s)+2 Proportional Proportional gain of PID 1 to 10000 1 to 10000 User An error occurs and the PID
constant (KP) operation (unit: 0.01) (unit: 0.01) operation for the
corresponding loop is not
(s)+3 Integral constant Constant that expresses the 1 to 32767 1 to 32767 User
performed.
(TI) magnitude of the integral (unit: 100ms) (unit: 100ms)
action (I action) effect.
Increasing the integral If setting value If setting value
constant slows down the > 30000 > 30000
manipulated value change. TI = Infinite () TI = Infinite ()
(s)+4 Derivative constant Constant that expresses the 0 to 30000 0 to 30000 User
(TD) magnitude of the derivative (unit: 10ms) (unit: 10ms)
action (D action) effect.
Increasing the derivative
constant causes significant
changes in the manipulated
value even with a slight
change of the control target.
(s)+5 Filter coefficient () Set the degree of filtering to 0 to 100 0 to 100 User
be applied to the process
value.
The filtering effect decreases
as the value gets closer to 0.
(s)+6 MV lower limit Set the lower limit for the -50 to 2050 -32768 to 32767 User In the case of "With PID
(MVLL) manipulated value (MV) limits", the PID operation is
calculated in PID operation in not performed after values
automatic mode. are replaced as follows:
If the MV is less than the set • If MVLL or MVHL value is
lower limit value (MVLL), the less than -50, the value is
value is clipped to the MVLL. clipped to -50.
• If MVLL or MVHL value is
(s)+7 MV upper limit Set the upper limit for the -50 to 2050 -32768 to 32767 User
greater than 2050, the
(MVHL) manipulated value calculated
in PID operation in automatic value is clipped to 2050.
mode.
If the MV is greater than the
set upper limit value (MVHL),
the value is clipped to the
MVHL.
(s)+8 MV change rate Set the variation limit 0 to 2000 -32768 to 32767 User In the case of "With PID
limit (MVL) between the previous MV limits", the PID operation is
and the present MV. performed after values are
When the MV variation is replaced as follows:
greater than the limit value, • MVL value is less than 0,
bit 1 (b1) of the alarm device the value is clipped to 0.
is set to '1'. • MVL value is greater than
MV variation is not limited. 2000, the value is clipped
(Even if the MV variation to 2000.
exceeds the limit value, the
actual MV variation is used
as it is for calculating the
MV.)
(s)+9 PV change rate Set the variation limit 0 to 2000 -32768 to 32767 User In the case of "With PID
limit (PVL) between the previous PV and limits", the PID operation is
the present PV. performed values are
When the PV variation is replaced as follows:
greater than the limit value, • If the PVL value is less
bit 0 (b0) of the alarm device than 0, the value is clipped
is set to '1'. to 0.
PV variation is not limited. • If the PVL value is greater
(Even if the PV variation than 2000, the value is
exceeds the limit value, the clipped to 2000.
actual PV variation is used as
it is for performing the PID
operation.)
*1 For the PID operational expression set in the operational expression selection, refer to the following.
MELSEC-Q/L/QnA Programming Manual (PID Control Instructions)
Precautions
The following table shows the CPU modules applicable to the PID control instructions (inexact differential) and the PID control
instructions (exact differential). 6
CPU module model Inexact differential Exact differential
Basic model QCPU The first five digits of the serial number are '04121' or lower.
The first five digits of the serial number are '04122' or higher
High Performance model The first five digits of the serial number are '05031' or lower.
QCPU The first five digits of the serial number are '05032' or higher.
Redundant CPU
Universal model QCPU
LCPU
SP_SOCOPEN
QnUDE(H) LCPU
Structured ladder/FBD ST
SP_SOCOPEN
EN ENO
ENO:= SP_SOCOPEN (EN, Un, s1, s2, d);
Un d
s1
s2
■Executing condition
Instruction Executing condition
SP_SOCOPEN
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un Dummy ("U0") String
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..9]
Output argument ENO Execution result Bit
d Variable that turns ON during one scan upon Array of bit [0..1]
completion of the instruction
d[1] also turns ON at the time of error completion.
(s1)
(s2) *1 *1
(d) *1 *1
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction establishes a connection.
*2 "Destination IP address" and "Destination port No" are neglected at Unpassive open.
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
Sets execution
type/completion
type to 0H
Establishes
the connection
number 1
Turns normal
completion flag ON
Turns error
completion flag ON
[ST]
IF((LDP( TRUE, Var_Flag_Inst ))
&(SD1282.0=FALSE) &(SD1284.0=FALSE) &(SD1288.A=TRUE))THEN
MOVP(TRUE, H0, Var_ControlData[0]); (* Sets execution type/completion type to 0H *)
SP_SOCOPEN( TRUE, "00", 1, Var_ControlData, Var_Result ); (* Establishes the connection number 1 *)
END_IF;
Structured ladder/FBD ST
SP_SOCCLOSE
EN ENO
ENO:= SP_SOCCLOSE (EN, Un, s1, s2, d);
Un d
s1
s2
■Executing condition
Instruction Executing condition
SP_SOCCLOSE
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit 7
Un Dummy ("U0") String
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 (0..1)
Output argument ENO Execution result Bit
d Variable that turns ON during one scan upon Array of bit [0..1]
completion of the instruction
d[1] also turns ON at the time of error completion.
(s1)
(s2) *1 *1
(d) *1 *1
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction shuts off a specified connection.
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
Program example
• The following program shuts off the connection 1 when the disconnect request flag turns ON or the external device closes
the connection 1.
[Structured ladder/FBD]
Turns execution
flag ON
Turns normal
completion flag ON
Turns error
completion flag ON
Turns execution
flag OFF
[ST]
IF((LDF( TRUE, SD1282.0 ))
&(SD1284.0=TRUE))THEN (* When open completion signal turns OFF *)
PLS(TRUE, Var_Flag); (* Turns flag ON *)
END_IF;
SP_SOCRCV
QnUDE(H) LCPU
Structured ladder/FBD ST
SP_SOCRCV
EN ENO
ENO:= SP_SOCRCV (EN, Un, s1, s2, d1, d2);
Un d1
s1 d2
s2
■Executing condition
Instruction Executing condition
SP_SOCRCV
■Argument 7
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un Dummy ("U0") String
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..1]
Output argument ENO Execution result Bit
d1 Start number of the device that stores receive data ANY16
d2 Variable that turns ON during one scan upon Array of bit [0..1]
completion of the instruction
d2[1] also turns ON at the time of error completion.
(s1)
(s2) *1 *1
(d1) *1 *1
(d2) *1 *1
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction reads receive data of a specified connection from the socket communication receive data area at the end
process performed after the instruction execution.
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
Program example
• The following program reads data received from the external device.
[Structured ladder/FBD]
Turns normal
completion flag ON
Turns error
completion flag OFF
[ST]
IF((Var_Flag_Inst=TRUE) &(SD1282.0=TRUE) &(SD1286.0=TRUE) &(Var_Result[0]=FALSE))THEN
SP_SOCRCV ( TRUE, "U0", 1, Var_ControlData, D500, Var_Result ); (* Reads data from the connection number 1 *)
END_IF;
Structured ladder/FBD ST
S_SOCRCVS
EN ENO
ENO:= S_SOCRCVS (EN, Un, s, d);
Un d
■Executing condition
Instruction Executing condition
S_SOCRCVS
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit 7
Un Dummy ("U0") String
s Connection number (1 to 16) ANY16
Output argument ENO Execution result Bit
d Start number of the device that stores receive data ANY16
(s)
(d)
Processing details
This instruction reads receive data of a specified connection from the socket communication receive data area.
Setting data
Device Item Setting data Setting range Setting side
(d)+0 Receive data length Data length of the data read from the socket communication 0 to 2046 System
receive data area is stored.
(number of bytes)
(d)+1 to (d)+(n) Receive data Data read from the socket communication receive data area System
are stored in ascending address order.
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
[ST]
IF((Var_Flag_Inst=TRUE) &(SD1282.0=TRUE) &(SD1286.0=TRUE) )THEN
S_SOCRCVS( TRUE, "U0", 1, D5000 ); (* Reads data from the connection number 1 *)
END_IF;
SP_SOCSND
QnUDE(H) LCPU
Structured ladder/FBD ST
SP_SOCSND
EN ENO
ENO:= SP_SOCSND (EN, Un, s1, s2, s3, d);
Un d
s1
s2
s3
■Executing condition
Instruction Executing condition
SP_SOCSND
■Argument 7
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un Dummy ("U0") String
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..1]
s3 Start number of the device that stores send data ANY16
Output argument ENO Execution result Bit
d Variable that turns ON during one scan upon Array of bit [0..1]
completion of the instruction
d[1] also turns ON at the time of error completion.
(s1)
(s2) *1 *1
(s3)
(d) *1 *1
*1 Local devices and file registers per program cannot be used as setting data.
Processing details
This instruction sends data to the external device of a specified connection.
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
Sends data to
the connection
number 1
Turns normal
completion flag ON
Turns error
7
completion flag ON
[ST]
IF((Var_Flag_Inst=TRUE)&(SD1282.0=TRUE))THEN
MOVP(TRUE, 6, Var_SendData[0]); (* Sets data length by the byte *)
MOVP(TRUE, 1234, Var_SendData[1]); (* Sets send data *)
MOVP(TRUE, 5678, Var_SendData[2]);
MOVP(TRUE, 8901, Var_SendData[3]);
SP_SOCSND( TRUE, "00", 1, Var_ControlData, Var_SendData[0], Var_Result ); (* Sends data to the connection number 1 *)
END_IF;
SP_SOCCINF
QnUDE(H) LCPU
Structured ladder/FBD ST
SP_SOCCINF
EN ENO
ENO:= SP_SOCCINF (EN, Un, s1, s2, d);
Un d
s1
s2
■Executing condition
Instruction Executing condition
SP_SOCCINF
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un Dummy ("U0") String
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..1]
Output argument ENO Execution result Bit
d Variable that stores connection information Array of ANY16 [0..4]
(s1)
(s2)
(d)
Processing details
This instruction reads connection information of a specified connection.
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
Program example
• The following program reads connection information of the connection number 1.
[Structured ladder/FBD]
[ST]
IF(Var_Flag_Inst=TRUE)THEN
SP_SOCCINF( TRUE, "U0", 1, Var_ControlData, Var_Connection ); (* Reads data from the connection number 1 *)
END_IF;
SP_SOCCSET
QnUDE(H) LCPU
Structured ladder/FBD ST
SP_SOCCSET
EN ENO
ENO:= SP_SOCCSET (EN, Un, s1, s2);
Un
s1
s2
■Executing condition
Instruction Executing condition
SP_SOCCSET
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un Dummy ("U0") String
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..4]
Output argument ENO Execution result Bit
(s1)
(s2)
Processing details
This instruction changes the IP address and port number of the external device of a specified connection.
(Available only with a UDP/IP connection)
Setting data
Device Item Setting data Setting range Setting side
(s2)[0] System area
(s2)[1] Completion status The instruction completion status is stored. System
0: Normal completion
Other than 0: Error completion (error code)
(s2)[2] Destination IP address Specify the IP address of the external device. 1H to User
(s2)[3] FFFFFFFFH
0H : No
destination
(FFFFFFFFH :
broadcast)
(s2)[4] Destination port No. Specify the port number of the external device. 1H to FFFFH User
(FFFFH:
broadcast)
Program example
• The following program changes the destination (destination IP address and port number) of the connection number 1 which
is being open.
[Structured ladder/FBD]
Sets destination
IP address
to 10.97.85.222
Sets destination
port number to 8193
[ST]
7
IF((LDP( TRUE, Var_Flag_Inst )) &(SD1282.0=TRUE))THEN
MOVP( TRUE, H55DE, Var_ControlData[2] );
MOVP( TRUE, H0A61, Var_ControlData[3] ); (* Sets destination IP address to 10.97.85.222 *)
MOVP(TRUE, H2001, Var_ControlData[4]); (* Sets destination port number to 8193 *)
SP_SOCCSET( TRUE, "U0", 1, Var_ControlData ); (* Changes the setting of the connection number 1 *)
END_IF;
SP_SOCRMODE
QnUDE(H) LCPU
Structured ladder/FBD ST
SP_SOCRMODE
EN ENO
ENO:= SP_SOCRMODE (EN, Un, s1, s2);
Un
s1
s2
■Executing condition
Instruction Executing condition
SP_SOCRMODE
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un Dummy ("U0") String
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..3]
Output argument ENO Execution result Bit
(s1)
(s2)
Processing details
This instruction changes the TCP receive mode (unavailable for a UDP connection) and receive data size.
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
Program example
• The following program changes the receive mode of the connection number 1 to TCP fixed length receive mode and
changes its receive data length to 256 bytes.
• After instruction execution, the connection number 1 turns the receive status signal ON when the length of receive data
7
reaches 256 bytes.
[Structured ladder/FBD]
Sets receive
data size to 256
[ST]
IF(Var_Flag_Inst=TRUE)THEN
MOVP(TRUE, 1, Var_ControlData[2]); (* Sets TCP receive mode to 1 *)
MOVP(TRUE, 256, Var_ControlData[3]); (* Sets receive data size to 256 *)
SP_SOCRMODE( TRUE, "00", 1, Var_ControlData); (*Changes the receive mode of the connection number 1 *)
END_IF;
S(P)_SOCRDATA
QnUDE(H) LCPU
Structured ladder/FBD ST
S_SOCRDATA
EN ENO ENO:= S_SOCRDATA (EN, Un, s1, s2, n, d);
Un d
s1
s2
n
■Executing condition
Instruction Executing condition
S_SOCRDATA
SP_SOCRDATA
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Un Dummy ("U0") String
s1 Connection number (1 to 16) ANY16
s2 Variable that stores control data Array of ANY16 [0..1]
n Number of read data (1 to 1024 words) ANY16
Output argument ENO Execution result Bit
d Variable that stores read data ANY16
(s1)
(s2)
n
(d)
Processing details
This instruction reads data for the specified number of words from the socket communication receive data area of a specified
connection, and stores it.
Precautions
• Use the Built-in Ethernet port QCPU of which the function version is B or later and the first five digits of the serial number
are '11012' or higher.
• Use the LCPU other than L02SCPU and L02SCPU-P.
Program example
• The following program reads the receive data length of the connection number 1.
[Structured ladder/FBD]
[ST]
7
IF((Var_Flag_Inst=TRUE) &(SD1282.0=TRUE) &(SD1286.0=TRUE))THEN
SP_SOCRDATA( TRUE, "00", 1, Var_ControlData, 1, Var_Data); (* Reads receive data length of connection number 1 *)
END_IF;
IPPSTRT1, IPPSTRT2
LCPU
ST
Structured ladder/FBD
IPPSTRT1
EN ENO
ENO:= IPPSTRT1 (EN, n);
■Executing condition
Instruction Executing condition
IPPSTRT1
IPPSTRT2
IPPSTRT1P
IPPSTRT2P
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
n Positioning data number (Setting range: 1 to 10) ANY16
Output argument ENO Execution result Bit
Processing details
This instruction specifies a data number to be executed for 'n' from the positioning data No. 1 to No. 10 which are previously
set in GX Works2, and starts the specified axis (refer to the following).
• IPPSTRT1(P): Axis 1
• IPPSTRT2(P): Axis 2
Program example
• The following program starts the "Positioning Data" No. 1 of the Axis 1 when M0 turns ON.
[Structured ladder/FBD]
[ST]
IPPSTRT1(M0, 1);
ST
Structured ladder/FBD
IPDSTRT1
EN ENO
ENO:= IPDSTRT1 (EN, s);
■Executing condition
Instruction Executing condition
IPDSTRT1
IPDSTRT2
IPPSTRT1P
IPDSTRT2P
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s Start number of the device in which the control data
are stored
Array of ANY16 [0..7]
8
Output argument ENO Execution result Bit
Processing details
Regardless of "Positioning Data" No. 1 to No. 10 which are previously set in GX Works2, this instruction starts the positioning
of the specified axis (refer to the following) using the data stored in the devices starting from (s).
• IPDSTRT1(P): Axis 1
• IPDSTRT2(P): Axis 2
Program example
• The following program sets the following positioning data and starts the axis 1 when M0 turns ON.
Device Item Setting data
D0 Control system Positioning control (ABS)
D1 Acceleration/deceleration time 1000(ms)
D2 Deceleration stop time 1000(ms)
D3 Dwell time 0(ms)
D4, D5 Command speed 20000(pulse/s)
D6, D7 Positioning address/movement amount 100000(pulse)
[Structured ladder/FBD]
[ST]
MOV( M0, 1, D0);
MOV( M0, 1000, D1);
MOV( M0, 1000, D2);
MOV( M0, 0, D3);
DMOV( M0, 20000, D4);
DMOV( M0, 100000, D6);
IPDSTRT1P(M0, D0);
Structured ladder/FBD ST
IPSIMUL
EN ENO
ENO:= IPSIMUL (EN, n1, n2);
n1
n2
■Executing condition
Instruction Executing condition
IPSIMUL
IPSIMULP
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
n1
n2
Axis 1 positioning data number
Axis 2 positioning data number
ANY16
ANY16
8
Output argument ENO Execution result Bit
Processing details
This instruction simultaneously starts the positioning of the axis 1 positioning data number specified by n1 and the axis 2
positioning data number specified by n2.
Program example
• The following program simultaneously starts the axis 1 positioning data No. 1 and the axis 2 positioning data No. 10 when
M0 turns ON.
[Structured ladder/FBD]
[ST]
IPSIMULP(M0, 1, 10);
IPOPR1, IPOPR2
LCPU
ST
Structured ladder/FBD
IPOPR1
EN ENO
ENO:= IPOPR1 (EN, s);
■Executing condition
Instruction Executing condition
IPOPR1
IPOPR2
IPOPR1P
IPOPR2P
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s Start number of the device in which the control data Array of ANY16 [0..2]
are stored
Output argument ENO Execution result Bit
Processing details
This instruction starts the OPR of which type is specified by (s) on the specified axis (refer to the following).
• IPOPR1(P): Axis 1
• IPOPR2(P): Axis 2
Setting data
Device Item Setting data Setting range Setting side
(s)[0] OPR type 1: Machine OPR 1 to 3 User
2: Fast OPR (OP address)
3: Fast OPR (standby address)
(s)[1] Standby address -2147483648 to
(s)[2] (Set only when Fast OPR 2147483647(pulse)
(standby address (3)) is set for (Ignored when
the OPR type) other than standby
address (3))
[Structured ladder/FBD]
[ST]
MOV(M0, 1, D0);
DMOV(M0, 0, D1);
IPOPR1P(M0, D0);
IPJOG1, IPJOG2
LCPU
Structured ladder/FBD ST
IPJOG1
EN ENO
ENO:= IPJOG1 (EN, s1, s2);
s1
s2
■Executing condition
Instruction Executing condition
IPJOG1
IPJOG2
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s1 Start number of the device in which the control data Array of ANY16 [0..3]
are stored
s2 Direction specification of the JOG operation Bit
0: Forward RUN
1: Reverse RUN
Output argument ENO Execution result Bit
Processing details
This instruction starts the JOG operation of the specified axis (refer to the following).
• IPJOG1: Axis 1
• IPJOG2: Axis 2
The JOG operation is executed in the direction specified by (s2), using the JOG speed, JOG acceleration/deceleration time
stored in the devices starting from (s1).
Setting data
Device Item Setting data Setting range Setting side
(s1)[0] JOG speed 0 to User
200000(pulse/
(s1)[1]
s)*1
(s1)[2] JOG acceleration time 0 to 32767(ms)
(s1)[3] JOG deceleration time
*1 The restricted speed value may be applied when the set value of the JOG speed is not within 0 to 200000.
[Structured ladder/FBD]
[ST]
DMOV(SM402, 10000, D0);
MOV(SM402, 1000, D2);
MOV(SM402, 1000, D3);
OUT( M0, M2 );
OUT(M1,M3);
IPJOG1((M2 AND (NOT M3)) OR( (NOT M2) AND M3), D0 , M3);
IPABRST1, IPABRST2
LCPU
ST
Structured ladder/FBD
IPABRST1
EN ENO
ENO:= IPABRST1 (EN, s, d);
s d
■Executing condition
Instruction Executing condition
IPABRST1
IPABRST2
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s Start number of the device for input Array of bit [0..2]
Output argument ENO Execution result Bit
d Start number of the device for output Array of bit [0..2]
Processing details
This instruction executes the absolute position restoration of the specified axis (refer to the following) by communicating with
the servo amplifier using the input device specified by (s) and output device specified by (d).
• IPABRST1: Axis 1
• IPABRST2: Axis 2
Setting data
• Signals imported from servo amplifier
Device Item Setting data Setting range Setting side
(s)[0] Signals imported from servo ABS send data bit0 0, 1 User
amplifier
(s)[1] ABS send data bit1
(s)[2] ABS send data ready
[ST]
IPABRST1( M0 , X20, Y30 );
IPSTOP1, IPSTOP2
LCPU
ST
Structured ladder/FBD
■Executing condition
Instruction Executing condition
IPSTOP1
IPSTOP2
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Output argument ENO Execution result Bit
Processing details
This instruction stops the positioning of the specified axis (refer to the following).
• IPSTOP1: Axis 1
• IPSTOP2: Axis 2
Program example
• The following program stops the axis 1 when M0 turns ON.
[Structured ladder/FBD]
[ST]
IPSTOP1( M0 );
IPSPCHG1, IPSPCHG2
LCPU
ST
Structured ladder/FBD
IPSPCHG1
EN ENO
ENO:= IPSPCHG1 (EN, s);
■Executing condition
Instruction Executing condition
IPSPCHG1
IPSPCHG2
IPSPCHG1P
IPSPCHG2P
■Argument
Input/output Name Description Data type
argument 8
Input argument EN Executing condition Bit
s Start number of the device in which the control data Array of ANY16 [0..3]
are stored
Output argument ENO Execution result Bit
Processing details
This instruction changes the speed of the specified axis (refer to the following) using the acceleration/deceleration time at
speed change, deceleration stop time at speed change, and new speed value stored in the devices starting from (s).
• IPSPCHG1(P): Axis 1
• IPSPCHG2(P): Axis 2
Setting data
Device Item Setting data Setting range Setting side
(s)[0] Acceleration/deceleration time 0 to 32767(ms) User
at speed change
(s)[1] Deceleration stop time at speed
change
(s)[2] New speed value 0 to 200000
(pulse/s)*1
(s)[3]
*1 The restricted speed value may be applied when the set value of the new speed is not within 0 to 200000.
[Structured ladder/FBD]
[ST]
MOV(M0, 2000, D0);
MOV(M0, 1000, D1);
DMOV(M0, 20000, D2);
IPSPCHG1P( M0 , D0 );
IPTPCHG1, IPTPCHG2
LCPU
ST
Structured ladder/FBD
IPTPCHG1
EN ENO
ENO:= IPTPCHG1 (EN, s);
■Executing condition
Instruction Executing condition
IPTPCHG1
IPTPCHG2
IPTPCHG1P
IPTPCHG2P
■Argument
Input/output Name Description Data type
argument 8
Input argument EN Executing condition Bit
s Target position change value (constant), or start ANY32
number of the device in which the control data are
stored.
Output argument ENO Execution result Bit
Processing details
This instruction changes the position of the specified axis (refer to the following) to the new target position specified by (s).
• IPTPCHG1(P): Axis 1
• IPTPCHG2(P): Axis 2
Setting data
Device Item Setting data Setting range Setting side
(s)+0 Target position change value -2147483648 to User
2147483647(pulse/
(s)+1
s)
[ST]
IPTPCHG1P( M0 , 2000 );
ICCNTRD1, ICCNTRD2
LCPU
ST
Structured ladder/FBD
■Executing condition
Instruction Executing condition
ICCNTRD1
ICCNTRD2
ICCNTRD1P
ICCNTRD2P
8
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Output argument ENO Execution result Bit
Processing details
This instruction stores a value at the time of instruction execution to the current value of the specified CH (refer to the
following).
Instruction CH Device in which the current value is stored
ICCNTRD1(P) CH1 SD1880, SD1881
ICCNTRD2(P) CH2 SD1900, SD1901
Program example
• The following program stores the most recent value to the CH 1 current value (SD1880, SD1881) when M0 turns ON.
[Structured ladder/FBD]
[ST]
ICCNTRD1( M0 );
ICRNGWR1, ICRNGWR2
LCPU
Structured ladder/FBD ST
ICRNGWR1
EN ENO
ENO:= ICRNGWR1 (EN, s1, s2);
s1
s2
■Executing condition
Instruction Executing condition
ICRNGWR1
ICRNGWR2
ICRNGWR1P
ICRNGWR2P
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s1 Ring counter lower limit value (constant), or start ANY32
number of the device that stores the ring counter
lower limit value
• Constant: Settings which is within the range of -
2147483648 to 2147483647 and ((s1), (s1)+1)
((s2), (s2)+1)
• Device: Within the range of specified device
s2 Ring counter upper limit value (constant), or start ANY32
number of the device that stores the ring counter
upper limit value
• Constant: Settings which is within the range of -
2147483648 to 2147483647 and ((s1), (s1)+1)
((s2), (s2)+1)
• Device: Within the range of specified device
Output argument ENO Execution result Bit
Processing details
This instruction sets the ring counter lower limit value and the ring counter upper limit value of the specified CH (refer to the
following).
• ICRNGWR1(P): CH1
• ICRNGWR2(P): CH2
[ST]
ICRNGWR1P( M0 , -100000 , 100000 );
ICPREWR1, ICPREWR2
LCPU
ST
Structured ladder/FBD
ICRNGWR1
EN ENO
ENO:= ICRNGWR1 (EN, s);
■Executing condition
Instruction Executing condition
ICPREWR1
ICPREWR2
ICPREWR1P
ICPREWR2P
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
s Preset value (constant), or start number of the ANY32
device that stores the preset value
• Constant: Settings which is within the range of -
2147483648 to 2147483647
• Device: Within the range of specified device
Output argument ENO Execution result Bit
Processing details
This instruction sets a preset value of the specified CH (refer to the following).
• ICPREWR1(P): CH1
• ICPREWR2(P): CH2
Program example
• The following program sets 10000 for the preset value of CH 1 when M0 turns ON.
[Structured ladder/FBD]
[ST]
ICPREWR1( M0 , 10000 );
ICLTHRD1, ICLTHRD2
LCPU
ST
Structured ladder/FBD
ICLTHRD1
EN ENO
ENO:= ICLTHRD1 (EN, n, d);
n d
■Executing condition
Instruction Executing condition
ICLTHRD1
ICLTHRD2
ICLTHRD1P
ICLTHRD2P
■Argument
Input/output Name Description Data type
argument 8
Input argument EN Executing condition Bit
n Latch count value (1,2) ANY16
Output argument ENO Execution result Bit
d Start number of the device in which the latch count ANY32
value is stored
Processing details
This instruction stores a latch count value n of the specified CH (refer to the following) to (d).
• ICLTHRD1(P): CH1
• ICLTHRD2(P): CH2
Program example
• The following program stores the latch count value 1 of CH 1 to D100 and D101 when M0 turns ON.
[Structured ladder/FBD]
[ST]
ICLTHRD1( M0 , 1 , D100 );
ICSMPRD1, ICSMPRD2
LCPU
ST
Structured ladder/FBD
ICSMPRD1
EN ENO
ENO:= ICSMPRD1 (EN, d);
■Executing condition
Instruction Executing condition
ICSMPRD1
ICSMPRD2
ICSMPRD1P
ICSMPRD2P
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Output argument ENO Execution result Bit
d Start number of the device in which the sampling ANY32
count value is stored
Processing details
This instruction stores a sampling count value of the specified CH (refer to the following) to (d).
• ICSMPRD1(P): CH1
• ICSMPRD2(P): CH2
Program example
• The following program stores the sampling count value of CH 1 to D100 and D101 when M0 turns ON.
[Structured ladder/FBD]
[ST]
ICSMPRD1( M0, D100 );
ICCOVWR1, ICCOVWR2
LCPU
Structured ladder/FBD ST
ICCOVWR1
EN ENO
ENO:= ICCOVWR1 (EN, n, s);
n
■Executing condition
Instruction Executing condition
ICCOVWR1
ICCOVWR2
ICCOVWR1P
ICCOVWR2P
■Argument
Input/output Name Description Data type
argument 8
Input argument EN Executing condition Bit
n Coincidence output No. n point (1,2) ANY16
s Coincidence output No. n point (constant), or start ANY32
number of the device in which coincidence output
No. n point is stored
• Constant: Settings which is within the range of -
2147483648 to 2147483647
• Device: Within the range of specified device
Output argument ENO Execution result Bit
Processing details
This instruction stores a coincidence output No. n point of the specified CH (refer to the following).
• ICCOVWR1(P): CH1
• ICCOVWR2(P): CH2
Program example
• The following program sets the value of D100 and D101 to the coincidence output No. 2 point of CH 1 when M0 turns ON.
[Structured ladder/FBD]
[ST]
ICCOVWR1( M0 , 2 , D100 );
ICFCNT1, ICFCNT2
LCPU
ST
Structured ladder/FBD
ICFCNT1
EN ENO
ENO:= ICFCNT1 (EN, d);
■Executing condition
Instruction Executing condition
ICFCNT1
ICFCNT2
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Output argument ENO Execution result Bit
d Start number of the device that stores the ANY32
measured frequency value
Processing details
This instruction measures a frequency of the specified CH (refer to the following) according to the settings such as the
frequency measurement unit time setting.
• ICFCNT1: CH1
• ICFCNT2: CH2
The measured value is stored to (d) at the ICFCNT instruction execution. The measurement starts at the rising pulse of the
ICFCNT instruction execution command, and ends at the falling pulse.
Program example
• The following program executes the frequency measurement of CH 1 while M0 is ON.
[Structured ladder/FBD]
[ST]
ICFCNT1( M0 , D100 );
ICRCNT1, ICRCNT2
LCPU
ST
Structured ladder/FBD
ICRCNT1
EN ENO
ENO:= ICRCNT1 (EN, d);
■Executing condition
Instruction Executing condition
ICRCNT1
ICRCNT2
■Argument
Input/output Name Description Data type
argument
Input argument
Output argument
EN
ENO
Executing condition
Execution result
Bit
Bit
8
d Start number of the device that stores the ANY32
measured rotation speed
Processing details
This instruction measures a rotation speed of the specified CH (refer to the following) according to the settings such as the
rotation speed measurement unit time setting.
• ICRCNT1: CH1
• ICRCNT2: CH2
The measured value is stored to (d) at the ICRCNT instruction execution. The measurement starts at the rising pulse of the
ICRCNT instruction execution command, and ends at the falling pulse.
Program example
• The following program stores the rotation speed measurement value of CH 1 to D100 and D101 while M0 is ON.
[Structured ladder/FBD]
[ST]
ICRCNT1( M0 , D100 );
ICPLSRD1, ICPLSRD2
LCPU
ST
Structured ladder/FBD
ICPLSRD1
EN ENO
ENO:= ICPLSRD1 (EN, d);
■Executing condition
Instruction Executing condition
ICPLSRD1
ICPLSRD2
ICPLSRD1P
ICPLSRD2P
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
Output argument ENO Execution result Bit
d Start number of the device that stores the ANY32
measured pulse value
Processing details
This instruction stores a measured pulse value of the specified CH (refer to the following) to (d).
• ICPLSRD1(P): CH1
• ICPLSRD2(P): CH2
Program example
• The following program stores the measured pulse value of CH 1 to D100 and D101 when M0 turns ON.
[Structured ladder/FBD]
[ST]
ICPLSRD1( M0 , D100 );
ICPWM1, ICPWM2
LCPU
Structured ladder/FBD ST
ICPWM1
EN ENO
ENO:= ICPWM1 (EN, s1, s2);
s1
s2
■Executing condition
Instruction Executing condition
ICPWM1
ICPWM2
■Argument
Input/output Name Description Data type
argument
Input argument EN
s1
Executing condition
PWM output ON time setting value (constant), or
Bit
ANY32
8
start number of the device that stores the PWM
output ON time setting value
• Constant: Settings which is 0 or within the range
of 10 to 107 (0.1s) and ((s1), (s1)+1) ((s2),
(s2)+1)
• Device: Within the range of specified device
s2 PWM output cycle time setting value (constant), or ANY32
start number of the device that stores the PWM
output cycle time setting value
• Constant: Settings which is 0 or within the range
of 50 to 107 (0.1s) and ((s1), (s1)+1) ((s2),
(s2)+1)
• Device: Within the range of specified device
Output argument ENO Execution result Bit
Processing details
This instruction outputs a PWM waveform of the specified CH (refer to the following).
• ICPWM1: CH1
• ICPWM2: CH2
The PWM waveform with the ON time ((s1)) and the cycle time ((s2)) is output from the coincidence output No.1 signal during
the ICPWM instruction execution. The output of the PWM waveform starts from OFF.
[ST]
ICPWM1( M0 , 10 , 50 );
ST
Structured ladder/FBD
LOGTRG
EN ENO
ENO:= LOGTRG (EN, n);
■Executing condition
Instruction Executing condition
LOGTRG
LOGTRGR
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
n Data logging configuration number ANY16
Output argument ENO Execution result Bit
■LOGTRGR
• The LOGTRGR instruction resets the LOGTRG instruction of the specified data logging configuration number.
• When the LOGTRGR instruction is executed, the special relay (data logging trigger, trigger logging complete) of the data
logging configuration number specified by 'n' turns OFF.
• When the instruction is executed while transferring data in the buffer memory to the SD memory card, the instruction
process is held until data transfer is complete.
Operation error
• In the following case, an operation error occurs, the error flag (SM0) is turned ON, and the corresponding error code is
stored to SD0.
Error code Description
4100 The value for n is outside the range of 1 to 10
Precautions
• Use the LCPU other than L02SCPU and L02SCPU-P.
Program example
• The following program executes the LOGTRG instruction on the data logging configuration No. 1 when X0 turns ON, and
resets the trigger condition with the LOGTRGR instruction when X1 turns ON.
[Structured ladder/FBD]
[ST]
LOGTRG(X0,1);
LOGTRGR(X1,1);
Structured ladder/FBD ST
SP_SFCSCOMR
EN ENO
ENO:= SP_SFCSCOMR (EN, n1, n2, n3, d1, d2);
n1 d1
n2 d2
n3
■Executing condition
Instruction Executing condition
S_SFCSCOMR
SP_SFCSCOMR
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
n1 Block No. of an SFC program that read comments ANY16
or device number where block No. is stored.
n2 The device number where the number of comments ANY16
to read or the number of comments is stored.
n3 The number of comments to read in a single scan ANY16
or device number where the number of comments
is stored.
Output argument ENO Execution result Bit
d1 The first number of device that stores comment ANY16
read.
d2 A device that turns ON for 1 scan at completion of Bit
the instruction.
Setting Internal R J\ Constant Expansion Others Sequence SFC Program Execution Site
data device U\G K, H SFC Program
Bit Word Zn BLm\Sn Step Transition Block Step Transition
Condition Condition
n1
n2
n3
(d1) *1
(d2) *1
Precautions
• For High Performance model QCPU, use the function version is B or later and the first five digits of the serial number are
'07012' or higher.
• For Process CPU and Redundant CPU, use the first five digits of the serial number are '07032' or higher.
• For Universal CPU, use the first five digits of the serial number are '12052' or higher. Q00UJCPU, Q00UCPU, Q01UCPU,
and Q02UCPU can not be used.
Program example
• This program reads 2 comments being activated at the SFC block No.1 when X1 is turned ON, and stores those to the
storage device after D0. (The number of comment to be read (n3) in a single scan is also set in 2.)
[Structured ladder/FBD]
Online program
change enable flag
Execution command
of SP_SFCSCOMR
instruction
[ST]
IF((Var_Flag_Exe=TRUE) & (SM735=FALSE))THEN (*Online program change execution command*)
SET(TRUE, Var_Flag); (*Online program change enable flag*)
END_IF;
IF((Var_Flag_Inst=TRUE) & (Var_Flag=FALSE))THEN (*Execution command of SP_SFCSCOMR instruction*)
SP_SFCSCOMR(TRUE, 1, D0, 2, D1, M1);
END_IF;
S(P)_SFCTCOMR
High
performance Process Redundant Universal 10
Structured ladder/FBD ST
SP_SFCTCOMR
EN ENO
ENO:= SP_SFCTCOMR (EN, n1, n2, n3, d1, d2);
n1 d1
n2 d2
n3
■Executing condition
Instruction Executing condition
S_SFCTCOMR
SP_SFCTCOMR
■Argument
Input/output Name Description Data type
argument
Input argument EN Executing condition Bit
n1 Block No. of an SFC program that read comments ANY16
or device number where block No. is stored.
n2 The device number where the number of comments ANY16
to read or the number of comments is stored.
n3 The number of comments to read in a single scan ANY16
or device number where the number of comments
is stored.
Output argument ENO Execution result Bit
d1 The first number of device that stores comment ANY16
read.
d2 A device that turns ON for 1 scan at completion of Bit
the instruction.
Setting Internal R J\ Constant Expansion Others Sequence SFC Program Execution Site
data device U\G K, H SFC Program
Bit Word Zn BLm\Sn Step Transition Block Step Transition
Condition Condition
n1
n2
n3
*1
(d1)
(d2) *1
Processing details
This function reads comments of the transition condition 1 associated with steps activated in the SFC block specified at (n1)
with the number of comments specified at (n2), and stores those to the device number of after specified at (d1).
Program example
• This program reads 2 comments being activated at the SFC block No.1 when X1 is turned ON, and stores those to the
storage device after D0. (The number of comment to be read (n3) in a single scan is also set in 2.)
[Structured ladder/FBD]
Online program
change enable flag
Execution command
of SP_SFCTCOMR
instruction
[ST]
IF((Var_Flag_Exe=TRUE) & (SM735=FALSE))THEN (*Online program change execution command*)
SET(TRUE, Var_Flag); (*Online program change enable flag*)
END_IF;
IF((Var_Flag_Inst=TRUE) & (Var_Flag=FALSE))THEN (*Execution command of SP_SFCTCOMR instruction*)
SP_SFCTCOMR(TRUE, 1, D0, 2, D1, M1);
END_IF;
10
S
C
Serial communication instruction . . . . . . . . . . . . .18
CC-Link IE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 SFC control instruction . . . . . . . . . . . . . . . . . . . .28
Common instruction . . . . . . . . . . . . . . . . . . . . . . 9 Socket communication function instruction . . . . . .24
Configuration of instructions . . . . . . . . . . . . . . . . 29 Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
Counter function dedicated instruction . . . . . . . . . 26 Special instruction . . . . . . . . . . . . . . . . . . . . . . . .9
CPU module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
U
D
Universal model Process CPU . . . . . . . . . . . . . . . . 9
Data logging function instruction . . . . . . . . . . . . . 28 Universal model QCPU . . . . . . . . . . . . . . . . . . . . .9
Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
G
GX Works2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
H
High Performance model QCPU . . . . . . . . . . . . . . 9
High-speed Universal model QCPU . . . . . . . . . . . 9
How to read instructions . . . . . . . . . . . . . . . . . . 31
I
I/O number of module . . . . . . . . . . . . . . . . . . . . 29
IEC61131-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Instruction tables . . . . . . . . . . . . . . . . . . . . . . . . 15
L
LCPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
M
MELSECNET/H . . . . . . . . . . . . . . . . . . . . . . . . . 9
Modules and versions applicable to instructions . . 13
N
Network dedicated instruction. . . . . . . . . . . . . . . 19
Network number . . . . . . . . . . . . . . . . . . . . . . . . 29
P
Personal computer . . . . . . . . . . . . . . . . . ...... 9
PID control instruction . . . . . . . . . . . . . . . . . . . . 23
PID control instruction (exact differential) . . . . . . . 23
Positioning function dedicated instruction . . . . . . 25
306
MEMO
307
INSTRUCTION INDEX
G IPPSTRT2(P) . . . . . . . . . . . . . . . . . . . . . . . . . .272
IPSIMUL(P) . . . . . . . . . . . . . . . . . . . . . . . . . . .275
G(P)_BIDIN . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 IPSPCHG1(P) . . . . . . . . . . . . . . . . . . . . . . . . .283
G(P)_BIDOUT . . . . . . . . . . . . . . . . . . . . . . . . . 59 IPSPCHG2(P) . . . . . . . . . . . . . . . . . . . . . . . . .283
G(P)_CCPASET . . . . . . . . . . . . . . . . . . . . . . . 188 IPSTOP1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
G(P)_CPRTCL . . . . . . . . . . . . . . . . . . . . . . . . . 95 IPSTOP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
G(P)_GETE . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 IPTPCHG1(P) . . . . . . . . . . . . . . . . . . . . . . . . .285
G(P)_OFFGAN . . . . . . . . . . . . . . . . . . . . . . . . . 33 IPTPCHG2(P) . . . . . . . . . . . . . . . . . . . . . . . . .285
G(P)_OGLOAD. . . . . . . . . . . . . . . . . . . . . . . . . 35
G(P)_OGSTOR . . . . . . . . . . . . . . . . . . . . . . . . 37
G(P)_ONDEMAND . . . . . . . . . . . . . . . . . . . . . . 51 J
G(P)_OUTPUT . . . . . . . . . . . . . . . . . . . . . . . . . 54 J(P)_READ . . . . . . . . . . . . . . . . . . . . . . . . . . .125
G(P)_PRR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 J(P)_RECV . . . . . . . . . . . . . . . . . . . . . . . . . . .150
G(P)_PUTE . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 J(P)_REQ . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
G(P)_READ . . . . . . . . . . . . . . . . . . . . . . . . . . 125 J(P)_RIRD . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98
G(P)_RECV . . . . . . . . . . . . . . . . . . . . . . . . . . 150 J(P)_RIWT . . . . . . . . . . . . . . . . . . . . . . . . . . . .102
G(P)_REQ . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 J(P)_SEND . . . . . . . . . . . . . . . . . . . . . . . . . . .144
G(P)_RIFR . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 J(P)_SREAD . . . . . . . . . . . . . . . . . . . . . . . . . .130
G(P)_RIRCV . . . . . . . . . . . . . . . . . . . . . . . . . 106 J(P)_SWRITE . . . . . . . . . . . . . . . . . . . . . . . . .140
G(P)_RIRD. . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 J(P)_WRITE. . . . . . . . . . . . . . . . . . . . . . . . . . .134
G(P)_RISEND . . . . . . . . . . . . . . . . . . . . . . . . 110 J(P)_ZNRD . . . . . . . . . . . . . . . . . . . . . . . . . . .165
G(P)_RITO . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 J(P)_ZNWR . . . . . . . . . . . . . . . . . . . . . . . . . . .168
G(P)_RIWT . . . . . . . . . . . . . . . . . . . . . . . . . . 102
G(P)_RLPASET . . . . . . . . . . . . . . . . . . . . . . . 118
G(P)_SEND . . . . . . . . . . . . . . . . . . . . . . . . . . 144 L
G(P)_SPBUSY . . . . . . . . . . . . . . . . . . . . . . . . . 63 LOGTRG . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
G(P)_SREAD . . . . . . . . . . . . . . . . . . . . . . . . . 130 LOGTRGR . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
G(P)_SWRITE . . . . . . . . . . . . . . . . . . . . . . . . 140
G(P)_WRITE . . . . . . . . . . . . . . . . . . . . . . . . . 134
G_INPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 P
PIDCONT(P) . . . . . . . . . . . . . . . . . . . . . . . . . .244
I PIDINIT(P) . . . . . . . . . . . . . . . . . . . . . . . . . . . .240
PIDPRMW(P) . . . . . . . . . . . . . . . . . . . . . . . . . .249
ICCNTRD1(P) . . . . .................... 287 PIDRUN(P) . . . . . . . . . . . . . . . . . . . . . . . . . . .248
ICCNTRD2(P) . . . . .................... 287 PIDSTOP(P) . . . . . . . . . . . . . . . . . . . . . . . . . .248
ICCOVWR1(P) . . . . .................... 293
ICCOVWR2(P) . . . . .................... 293
ICFCNT1 . . . . . . . . .................... 294 S
ICFCNT2 . . . . . . . . .................... 294
S(P)_PIDCONT . . . . . . . . . . . . . . . . . . . . . . . .232
ICLTHRD1(P) . . . . . .................... 291
S(P)_PIDINIT . . . . . . . . . . . . . . . . . . . . . . . . . .227
ICLTHRD2(P) . . . . . .................... 291
S(P)_PIDPRMW . . . . . . . . . . . . . . . . . . . . . . . .237
ICPLSRD1(P) . . . . . .................... 296
S(P)_PIDRUN . . . . . . . . . . . . . . . . . . . . . . . . .236
ICPLSRD2(P) . . . . . .................... 296
S(P)_PIDSTOP . . . . . . . . . . . . . . . . . . . . . . . .236
ICPREWR1(P) . . . . .................... 290
S(P)_SFCSCOMR . . . . . . . . . . . . . . . . . . . . . .301
ICPREWR2(P) . . . . .................... 290
S(P)_SFCTCOMR . . . . . . . . . . . . . . . . . . . . . .303
ICPWM1 . . . . . . . . .................... 297
S(P)_SOCRDATA . . . . . . . . . . . . . . . . . . . . . .270
ICPWM2 . . . . . . . . .................... 297
SP_SOCCINF . . . . . . . . . . . . . . . . . . . . . . . . .264
ICRCNT1 . . . . . . . . .................... 295
SP_SOCCLOSE. . . . . . . . . . . . . . . . . . . . . . . .255
ICRCNT2 . . . . . . . . .................... 295
SP_SOCCSET . . . . . . . . . . . . . . . . . . . . . . . . .266
ICRNGWR1(P) . . . . .................... 288
SP_SOCOPEN . . . . . . . . . . . . . . . . . . . . . . . .252
ICRNGWR2(P) . . . . .................... 288
SP_SOCRCV . . . . . . . . . . . . . . . . . . . . . . . . . .257
ICSMPRD1(P) . . . . .................... 292
SP_SOCRMODE . . . . . . . . . . . . . . . . . . . . . . .268
ICSMPRD2(P) . . . . .................... 292
SP_SOCSND . . . . . . . . . . . . . . . . . . . . . . . . . .261
IPABRST1 . . . . . . . .................... 280
S_SOCRCVS . . . . . . . . . . . . . . . . . . . . . . . . . .259
IPABRST2 . . . . . . . .................... 280
IPDSTRT1(P) . . . . . .................... 273
IPDSTRT2(P) . . . . . .................... 273 Z
IPJOG1 . . . . . . . . . .................... 278
Z(P)_REMFR . . . . . . . . . . . . . . . . . . . . . . . . . .182
IPJOG2 . . . . . . . . . .................... 278
IPOPR1(P) . . . . . . . .................... 276 Z(P)_REMTO . . . . . . . . . . . . . . . . . . . . . . . . . .185
Z(P)_RRUN_J . . . . . . . . . . . . . . . . . . . . . . . . .171
IPOPR2(P) . . . . . . . .................... 276
Z(P)_RRUN_U . . . . . . . . . . . . . . . . . . . . . . . . .171
IPPSTRT1(P) . . . . . .................... 272
Z(P)_RSTOP_J . . . . . . . . . . . . . . . . . . . . . . . .174
308
Z(P)_RSTOP_U . . . . . . . . . . . . . . . . . . . . . . . 174
Z(P)_RTMRD_J . . . . . . . . . . . . . . . . . . . . . . . 177
Z(P)_RTMRD_U . . . . . . . . . . . . . . . . . . . . . . . 177
Z(P)_RTMWR_J . . . . . . . . . . . . . . . . . . . . . . . 179
Z(P)_RTMWR_U . . . . . . . . . . . . . . . . . . . . . . 179
Z(P)_UINI. . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Z_ABRST1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Z_ABRST2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Z_ABRST3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Z_ABRST4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Z_BUFRCVS . . . . . . . . . . . . . . . . . . . . . . . 66,204
ZP_BUFRCV . . . . . . . . . . . . . . . . . . . . . . . . . 201
ZP_BUFSND . . . . . . . . . . . . . . . . . . . . . . . . . 206
ZP_CLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . 198
ZP_CSET. . . . . . . . . . . . . . . . . . . . . . . . 64,72,75
ZP_ERRCLR . . . . . . . . . . . . . . . . . . . . . . . . . 209
ZP_ERRRD . . . . . . . . . . . . . . . . . . . . . . . . . . 212
ZP_MRECV . . . . . . . . . . . . . . . . . . . . . . . . . . 218
ZP_MSEND . . . . . . . . . . . . . . . . . . . . . . . . . . 221
ZP_OPEN . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
ZP_PFWRT . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
ZP_PINIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
ZP_PSTRT1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
ZP_PSTRT2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
ZP_PSTRT3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
ZP_PSTRT4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
ZP_TEACH1 . . . . . . . . . . . . . . . . . . . . . . . . . . 45
ZP_TEACH2 . . . . . . . . . . . . . . . . . . . . . . . . . . 45
ZP_TEACH3 . . . . . . . . . . . . . . . . . . . . . . . . . . 45
ZP_TEACH4 . . . . . . . . . . . . . . . . . . . . . . . . . . 45
ZP_UINI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Z_RECVS . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
309
REVISIONS
*The manual number is given on the bottom left of the back cover.
Revision date *Manual number Description
July, 2008 SH(NA)-080785ENG-A Due to the transition to the e-Manual, the details of revision have been deleted.
June, 2013 SH(NA)-080785ENG-K
February, 2017 SH(NA)-080785ENG-L Complete revision (layout change)
September, 2018 SH(NA)-080785ENG-M Descriptions regarding the QnUDPVCPU is added.
310
WARRANTY
Please confirm the following product warranty details before using this product.
1. Gratis Warranty Term and Gratis Warranty Range
If any faults or defects (hereinafter "Failure") found to be the responsibility of Mitsubishi occurs during use of the product
within the gratis warranty term, the product shall be repaired at no cost via the sales representative or Mitsubishi Service
Company.
However, if repairs are required onsite at domestic or overseas location, expenses to send an engineer will be solely at
the customer's discretion. Mitsubishi shall not be held responsible for any re-commissioning, maintenance, or testing
on-site that involves replacement of the failed module.
[Gratis Warranty Term]
The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated place.
Note that after manufacture and shipment from Mitsubishi, the maximum distribution period shall be six (6) months, and
the longest gratis warranty term after manufacturing shall be eighteen (18) months. The gratis warranty term of repair
parts shall not exceed the gratis warranty term before repairs.
[Gratis Warranty Range]
(1) The range shall be limited to normal use within the usage state, usage methods and usage environment, etc., which
follow the conditions and precautions, etc., given in the instruction manual, user's manual and caution labels on the
product.
(2) Even within the gratis warranty term, repairs shall be charged for in the following cases.
1. Failure occurring from inappropriate storage or handling, carelessness or negligence by the user. Failure caused
by the user's hardware or software design.
2. Failure caused by unapproved modifications, etc., to the product by the user.
3. When the Mitsubishi product is assembled into a user's device, Failure that could have been avoided if functions
or structures, judged as necessary in the legal safety measures the user's device is subject to or as necessary by
industry standards, had been provided.
4. Failure that could have been avoided if consumable parts (battery, backlight, fuse, etc.) designated in the
instruction manual had been correctly serviced or replaced.
5. Failure caused by external irresistible forces such as fires or abnormal voltages, and Failure caused by force
majeure such as earthquakes, lightning, wind and water damage.
6. Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi.
7. Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user.
2. Onerous repair term after discontinuation of production
(1) Mitsubishi shall accept onerous product repairs for seven (7) years after production of the product is discontinued.
Discontinuation of production shall be notified with Mitsubishi Technical Bulletins, etc.
(2) Product supply (including repair parts) is not available after production is discontinued.
3. Overseas service
Overseas, repairs shall be accepted by Mitsubishi's local overseas FA Center. Note that the repair conditions at each FA
Center may differ.
4. Exclusion of loss in opportunity and secondary loss from warranty liability
Regardless of the gratis warranty term, Mitsubishi shall not be liable for compensation to:
(1) Damages caused by any cause found not to be the responsibility of Mitsubishi.
(2) Loss in opportunity, lost profits incurred to the user by Failures of Mitsubishi products.
(3) Special damages and secondary damages whether foreseeable or not, compensation for accidents, and
compensation for damages to products other than Mitsubishi products.
(4) Replacement by the user, maintenance of on-site equipment, start-up test run and other tasks.
5. Changes in product specifications
The specifications given in the catalogs, manuals or technical documents are subject to change without prior notice.
311
TRADEMARKS
Ethernet is a registered trademark of Fuji Xerox Co., Ltd. in Japan.
Microsoft, Microsoft Access, Excel, SQL Server, Visual Basic, Visual C++, Visual Studio, Windows, Windows NT, Windows
Server, Windows Vista, and Windows XP are either registered trademarks or trademarks of Microsoft Corporation in the
United States and/or other countries.
The company names, system names and product names mentioned in this manual are either registered trademarks or
trademarks of their respective companies.
In some cases, trademark symbols such as '' or '' are not specified in this manual.
312 SH(NA)-080785ENG-M
SH(NA)-080785ENG-M(1809)KWIX
MODEL: Q-KP-TM-E
MODEL CODE: 13JW09
HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN
When exported from Japan, this manual does not require application to the
Ministry of Economy, Trade and Industry for service transaction permission.