Mitsubishi Electric L02SCPU, L02CPU-P, L02CPU, L06CPU-P, L26CPU User Manual

...
MELSEC-L CPU Module User's Manual (Function Explanation, Program Fundamentals)
-L02SCPU
-L02SCPU-P
-L02CPU
-L02CPU-P
-L06CPU
-L06CPU-P
-L26CPU
-L26CPU-P
-L26CPU-BT
-L26CPU-PBT

SAFETY PRECAUTIONS

WARNING
CAUTION
Indicates that incorrect handling may cause hazardous conditions, resulting in death or severe injury.
Indicates that incorrect handling may cause hazardous conditions, resulting in minor or moderate injury or property damage.
(Read these precautions before using this product.)
Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly.
In this manual, the safety precautions are classified into two levels: " WARNING" and " CAUTION".
Under some circumstances, failure to observe the precautions given under " CAUTION" may lead to serious consequences.
Observe the precautions of both levels because they are important for personal and system safety.
Make sure that the end users read this manual and then keep the manual in a safe place for future reference.
[Design Precautions]
WARNING
Configure safety circuits external to the programmable controller to ensure that the entire system operates safely even when a fault occurs in the external power supply or the programmable controller. Failure to do so may result in an accident due to an incorrect output or malfunction. (1) Emergency stop circuits, protection circuits, and protective interlock circuits for conflicting
operations (such as forward/reverse rotations or upper/lower limit positioning) must be configured external to the programmable controller.
(2) Machine OPR (Original Point Return) of the positioning function is controlled by two kinds of data:
an OPR direction and an OPR speed. Deceleration starts when the near-point dog signal turns on. If an incorrect OPR direction is set, motion control may continue without deceleration. To prevent machine damage caused by this, configure an interlock circuit external to the programmable controller.
(3) When the CPU module detects an error during control by the positioning function, the motion
slows down and stops.
(4) When the programmable controller detects an abnormal condition, it stops the operation and all
outputs are:
• Turned off if the overcurrent or overvoltage protection of the power supply module is activated.
• Held or turned off according to the parameter setting if the self-diagnostic function of the CPU module detects an error such as a watchdog timer error.
(5) All outputs may be turned on if an error occurs in a part, such as an I/O control part, where the
CPU module cannot detect any error. To ensure safety operation in such a case, provide a safety mechanism or a fail-safe circuit external to the programmable controller. For a fail-safe circuit example, refer to "General Safety Requirements" in the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).
(6) Outputs may remain on or off due to a failure of a component such as a transistor in an output
circuit. Configure an external circuit for monitoring output signals that could cause a serious accident.
In an output circuit, when a load current exceeding the rated current or an overcurrent caused by a load short-circuit flows for a long time, it may cause smoke and fire. To prevent this, configure an external safety circuit, such as a fuse.
Configure a circuit so that the programmable controller is turned on first and then the external power supply. If the external power supply is turned on first, an accident may occur due to an incorrect output or malfunction.
Configure a circuit so that the external power supply is turned off first and then the programmable controller. If the programmable controller is turned off first, an accident may occur due to an incorrect output or malfunction.
For the operating status of each station after a communication failure, refer to relevant manuals for each network. Incorrect output or malfunction due to a communication failure may result in an accident.
WARNING
When changing data from a peripheral connected to the CPU module to the running programmable controller, configure an interlock circuit in the program to ensure that the entire system will always operate safely. For other forms of control (such as program modification or operating status change) of a running programmable controller, read the relevant manuals carefully and ensure that the operation is safe before proceeding. Especially, when a remote programmable controller is controlled by an external device, immediate action cannot be taken if a problem occurs in the programmable controller due to a communication failure. To prevent this, configure an interlock circuit in the program, and determine corrective actions to be taken between the external device and CPU module in case of a communication failure.
An absolute position restoration by the positioning function may turn off the servo-on signal (servo off) for approximately 20ms, and the motor may run unexpectedly. If this causes a problem, provide an electromagnetic brake to lock the motor during absolute position restoration.
[Design Precautions]
CAUTION
Do not install the control lines or communication cables together with the main circuit lines or power cables. Keep a distance of 100mm or more between them. Failure to do so may result in malfunction due to noise.
During control of an inductive load such as a lamp, heater, or solenoid valve, a large current (approximately ten times greater than normal) may flow when the output is turned from off to on. Therefore, use a module that has a sufficient current rating.
After the CPU module is powered on or is reset, the time taken to enter the RUN status varies depending on the system configuration, parameter settings, and/or program size. Design circuits so that the entire system will always operate safely, regardless of the time.
[Installation Precautions]
WARNING
Shut off the external power supply (all phases) used in the system before mounting or removing a module. Failure to do so may result in electric shock or cause the module to fail or malfunction.
[Installation Precautions]
CAUTION
Use the programmable controller in an environment that meets the general specifications in the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection). Failure to do so may result in electric shock, fire, malfunction, or damage to or deterioration of the product.
To interconnect modules, engage the respective connectors and securely lock the module joint levers until they click. Incorrect interconnection may cause malfunction, failure, or drop of the module.
Do not directly touch any conductive parts and electronic components of the module. Doing so can cause malfunction or failure of the module.
Securely connect an extension cable to the connectors of a branch module and an extension module. After connections, check that the cable is inserted completely. Poor contact may cause malfunction.
When using an SD memory card, fully insert it into the SD memory card slot. Check that it is inserted completely. Poor contact may cause malfunction.
Do not directly touch any conductive parts and electronic components of the module or SD memory card. Doing so can cause malfunction or failure of the module.
[Wiring Precautions]
WARNING
Shut off the external power supply (all phases) used in the system before wiring. Failure to do so may result in electric shock or cause the module to fail or malfunction.
After installation and wiring, attach the included terminal cover to the module before turning it on for operation. Failure to do so may result in electric shock.
[Wiring Precautions]
CAUTION
Individually ground the FG terminal of the programmable controller with a ground resistance of 100
or less. Failure to do so may result in electric shock or malfunction.
Use applicable solderless terminals and tighten them within the specified torque range. If any spade solderless terminal is used, it may be disconnected when a terminal block screw comes loose, resulting in failure.
Check the rated voltage and terminal layout before wiring to the module, and connect the cables correctly. Connecting a power supply with a different voltage rating or incorrect wiring may cause a fire or failure.
Connectors for external devices must be crimped or pressed with the tool specified by the manufacturer, or must be correctly soldered. Incomplete connections may cause short circuit, fire, or malfunction.
Securely connect the connector to the module.
Do not install the control lines or communication cables together with the main circuit lines or power
cables. Failure to do so may result in malfunction due to noise.
Place the cables in a duct or clamp them. If not, dangling cable may swing or inadvertently be pulled, resulting in damage to the module or cables or malfunction due to poor contact.
Check the interface type and correctly connect the cable. Incorrect wiring (connecting the cable to an incorrect interface) may cause failure of the module and external device.
Tighten the terminal block screws within the specified torque range. Undertightening can cause short circuit, fire, or malfunction. Overtightening can damage the screw and/or module, resulting in drop, short circuit, fire, or malfunction.
When disconnecting the cable from the module, do not pull the cable by the cable part. For the cable with connector, hold the connector part of the cable. For the cable connected to the terminal block, loosen the terminal screw. Pulling the cable connected to the module may result in malfunction or damage to the module or cable.
Prevent foreign matter such as dust or wire chips from entering the module. Such foreign matter can cause a fire, failure, or malfunction.
A protective film is attached to the top of the module to prevent foreign matter, such as wire chips, from entering the module during wiring. Do not remove the film during wiring. Remove it for heat dissipation before system operation.
To use the high-speed counter function, ground the shield cable on the encoder side (relay box). Always ground the FG and LG terminals to the protective ground conductor. Failure to do so may cause malfunction.
Mitsubishi programmable controllers must be installed in control panels. Connect the main power supply to the power supply module in the control panel through a relay terminal block. Wiring and replacement of a power supply module must be performed by qualified maintenance personnel with knowledge of protection against electric shock. For wiring methods, refer to the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).
[Startup and Maintenance Precautions]
WARNING
Do not touch any terminal while power is on. Doing so will cause electric shock or malfunction.
Correctly connect the battery connector. Do not charge, disassemble, heat, short-circuit, solder, or
throw the battery into the fire. Also, do not expose it to liquid or strong shock. Doing so will cause the battery to produce heat, explode, ignite, or leak, resulting in injury and fire.
Shut off the external power supply (all phases) used in the system before cleaning the module or retightening the terminal block screws or connector screws. Failure to do so may result in electric shock.
[Startup and Maintenance Precautions]
CAUTION
Before performing online operations (especially, program modification, forced output, and operating status change) for the running CPU module from the peripheral connected, read relevant manuals carefully and ensure the safety. Improper operation may damage machines or cause accidents.
Do not disassemble or modify the module. Doing so may cause failure, malfunction, injury, or a fire.
Use any radio communication device such as a cellular phone or PHS (Personal Handy-phone
System) more than 25cm away in all directions from the programmable controller. Failure to do so may cause malfunction.
Shut off the external power supply (all phases) used in the system before mounting or removing a module. Failure to do so may cause the module to fail or malfunction.
Tighten the terminal block screws or connector screws within the specified torque range. Undertightening can cause drop of the component or wire, short circuit, or malfunction. Overtightening can damage the screw and/or module, resulting in drop, short circuit, or malfunction.
After the first use of the product (module, display unit, and terminal block), the number of connections/disconnections is limited to 50 times (in accordance with IEC 61131-2). Exceeding the limit may cause malfunction.
After the first use of the SD memory card, do not insert/remove the memory card more than 500 times. Exceeding the limit may cause malfunction.
Do not drop or apply shock to the battery to be installed in the module. Doing so may damage the battery, causing the battery fluid to leak inside the battery. If the battery is dropped or any shock is applied to it, dispose of it without using.
Before handling the module, touch a conducting object such as a grounded metal to discharge the static electricity from the human body. Failure to do so may cause the module to fail or malfunction.
Before testing the operation by the positioning function, set a low speed value for the speed limit parameter so that the operation can be stopped immediately upon occurrence of a hazardous condition.
[Disposal Precautions]
CAUTION
When disposing of this product, treat it as industrial waste. When disposing of batteries, separate them from other wastes according to the local regulations. (For details on battery regulations in EU member states, refer to the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).)
[Transportation Precautions]
CAUTION
When transporting lithium batteries, follow the transportation regulations. (For details on the regulated models, refer to the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection).)

CONDITIONS OF USE FOR THE PRODUCT

(1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions;
i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident; and ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem, fault or failure occurring in the PRODUCT.
(2) The PRODUCT has been designed and manufactured for the purpose of being used in general
industries. MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED TO ANY AND ALL RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT, PRODUCT LIABILITY) FOR ANY INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR WARNING CONTAINED IN MITSUBISHI'S USER, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL BULLETINS AND GUIDELINES FOR the PRODUCT. ("Prohibited Application") Prohibited Applications include, but not limited to, the use of the PRODUCT in;
• Nuclear Power Plants and any other power plants operated by Power companies, and/or any other cases in which the public could be affected if any problem or fault occurs in the PRODUCT.
• Railway companies or Public service purposes, and/or any other cases in which establishment of a special quality assurance system is required by the Purchaser or End User.
• Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator and Escalator, Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for Recreation and Amusement, and Safety devices, handling of Nuclear or Hazardous Materials or Chemicals, Mining and Drilling, and/or other applications where there is a significant risk of injury to the public or property.
Notwithstanding the above, restrictions Mitsubishi may in its sole discretion, authorize use of the PRODUCT in one or more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or other safety features which exceed the general specifications of the PRODUCTs are required. For details, please contact the Mitsubishi representative in your region.

INTRODUCTION

Remark
Thank you for purchasing the Mitsubishi Electric MELSEC-L series programmable controllers. This manual describes the memory maps, functions, and devices of the CPU module, and programming.
Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the functions and performance of the MELSEC-L series programmable controller 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.
Relevant CPU modules
CPU module Model
LCPU
This manual does not describe the details of the instructions, error codes, special relay (SM), and special register (SD).
For the instructions, refer to the following.
MELSEC-Q/L Programming Manual (Common Instruction)
For the error codes, special relay(SM), and special register (SD), refer to the following.
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
L02SCPU, L02SCPU-P, L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT

RELEVANT MANUALS

(1) CPU module user's manual
Manual name
<manual number (model code)>
MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
<SH-080890ENG, 13JZ36>
MELSEC-L CPU Module User's Manual (Built-In Ethernet Function)
<SH-080891ENG, 13JZ37>
MELSEC-L CPU Module User's Manual (Built-In I/O Function)
<SH-080892ENG, 13JZ38>
QnUDVCPU/LCPU User's Manual (Data Logging Function)
<SH-080893ENG, 13JZ39>
(2) Programming manual
Manual name
<manual number (model code)>
MELSEC-Q/L Programming Manual (Common Instruction)
<SH-080809ENG, 13JW10>
MELSEC-Q/L/QnA Programming Manual (SFC)
<SH-080041, 13JF60>
MELSEC-Q/L Programming Manual (MELSAP-L)
<SH-080076, 13JF61>
MELSEC-Q/L Programming Manual (Structured Text)
<SH-080366E, 13JF68>
MELSEC-Q/L/QnA Programming Manual (PID Control Instructions)
<SH-080040, 13JF59>
Description
Specifications of the CPU modules, power supply modules, display unit, branch module, extension module, SD memory cards, and batteries, information on how to establish a system, maintenance and inspection, and troubleshooting
The built-in Ethernet function of the CPU module
The general-purpose I/O function, interrupt input function, pulse catch function, positioning function, and high-speed counter function of the CPU module
The data logging function of the CPU module
Description
Detailed description and usage of instructions used in programs
System configuration, specifications, functions, programming, and error codes for SFC (MELSAP3) programs
System configuration, specifications, functions, programming, and error codes for SFC (MELSAP-L) programs
System configuration and programming using structured text language
Dedicated instructions for PID control
(3) Operating manual
Manual name
<manual number (model code)>
GX Works2 Version 1 Operating Manual (Common)
GX Developer Version 8 Operating Manual
<SH-080779ENG, 13JU63>
<SH-080373E, 13JU41>
Description
System configuration, parameter settings, and online operations of GX Works2, which are common to Simple projects and Structured projects
Operating methods of GX Developer, such as programming, printing, monitoring, and debugging
10
(4) I/O module and intelligent function module manual
Manual name
<manual number (model code)>
MELSEC-L I/O Module User's Manual
<SH-080888ENG, 13JZ34>
MELSEC-L Ethernet Interface Module User's Manual (Basic)
<SH-081105ENG, 13JZ73>
MELSEC-L Serial Communication Module User’s Manual (Basic)
<SH-080894ENG, 13JZ40>
MELSEC Communication Protocol Reference Manual
<SH-080008, 13JF89>
MELSEC-L CC-Link System Master/Local Module User's Manual
<SH-080895ENG, 13JZ41>
MELSEC-L CC-Link/LT Master Module User's Manual
<SH-081012ENG, 13JZ65>
MELSEC-L CC-Link IE Field Network Master/Local Module User's Manual
<SH-080972ENG, 13JZ54>
MELSEC-L Analog-Digital Converter Module User's Manual
<SH-080899ENG, 13JZ42>
MELSEC-L Dual Channel Isolated High Resolution Analog-Digital Converter Module User's Manual
<SH-081103ENG, 13JZ72>
MELSEC-L Digital-Analog Converter Module User's Manual
<SH-080900ENG, 13JZ43>
MELSEC-L Analog Input/Output Module User's Manual
<SH-081167ENG, 13JZ87>
MELSEC-L LD75P/LD75D Positioning Module User's Manual
<SH-080911ENG, 13JZ46>
MELSEC-L High-Speed Counter Module User's Manual
<SH-080920ENG, 13JZ49>
MELSEC-L Temperature Control Module User's Manual
<SH-081000ENG, 13JZ64>
MELSEC-L Multiple Input (Voltage/Current/Temperature) Module User's Manual
<SH-081365ENG, 13JZ76>
Specifications and troubleshooting of the I/O module
Specifications, procedures for data communication with external devices, line connection (open/close), fixed buffer communication, random access buffer communication, and troubleshooting of the Ethernet module
System configuration, specifications, procedures before operation, data communication methods (basic), and troubleshooting of the serial communication module
Details of MELSEC communication protocol (MC protocol) that is used for data communication between a target device and a CPU module
Settings, specifications, handling, data communication methods, and troubleshooting of the built-in CC-Link function of the CPU module or the CC­Link system master/local module
Settings, specifications, handling, data communication methods, and troubleshooting of the CC-Link/LT master module
Overview of CC-Link IE Field Network, and specifications, procedures before operation, system configuration, installation, wiring, settings, functions, programming, and troubleshooting of the MELSEC-L series CC-Link IE Field Network master/local module
System configuration, specifications, settings, and troubleshooting of the analog-digital converter module
System configuration, specifications, settings, and troubleshooting of the dual channel isolated high resolution analog-digital converter module
System configuration, specifications, settings, and troubleshooting of the digital-analog converter module
System configuration, specifications, settings, and troubleshooting of the analog input/output module
System configuration specifications settings and troubleshooting of the positioning module
System configuration specifications settings and troubleshooting of the high­speed counter module
System configuration specifications settings and troubleshooting of the temperature control module
System configuration, specifications, settings, and troubleshooting of the multiple input module
Description
(5) Others
Manual name
<manual number (model code)>
iQ Sensor Solution Reference Manual
CC-Link IE Field Network Basic Reference Manual
<SH-081133ENG, 13JV28>
<SH-081684ENG, 13JX62>
Description
Operating methods of iQ Sensor Solution, such as programming and monitoring
Specifications, procedures before operation, system configuration, programming, functions, parameter settings, and troubleshooting of CC-Link IE Field Network Basic
11

CONTENTS

CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
MANUAL PAGE ORGANIZATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
PART 1 PROGRAMMING
CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING 20
1.1 System Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.2 Creating a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.3 Creating a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.3.1 Prior knowledge for creating a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
1.3.2 How to create a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
1.4 Converting a Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.5 Writing a Project to the CPU Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.5.1 Formatting a memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
1.5.2 Writing to the CPU module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
1.6 Checking an Operation of the CPU Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.7 Saving a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
CHAPTER 2 APPLICATION OF PROGRAMMING 31
2.1 Memory and Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.1.1 Memory configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.1.2 Parameter-valid drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
2.1.3 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
2.2 I/O Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.2.1 Concept of I/O number assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
2.2.2 I/O number assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
2.3 Scan Time Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.3.1 Initial processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
2.3.2 Refresh processing of input/output modules or intelligent function modules . . . . . . . . . . . . . .46
2.3.3 Program operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
2.3.4 END processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
2.4 Operation Processing of the CPU Module for Each Operating Status . . . . . . . . . . . . . . . . . . . 48
2.5 Operation Processing During Momentary Power Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.6 Processing of Inputs and Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
2.6.1 Refresh processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
2.6.2 Direct processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
2.7 Interrupt Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.8 Executing Multiple Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
2.8.1 Initial execution type program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
2.8.2 Scan execution type program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
2.8.3 Standby type program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66
12
2.8.4 Fixed scan execution type program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69
2.8.5 Changing the program execution type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72
2.9 Boot Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2.10 Programming Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
2.11 Communications with Intelligent Function Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
PART 2 FUNCTIONS
CHAPTER 3 CPU MODULE FUNCTIONS 82
3.1 Function List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
3.2 Constant Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
3.3 Watchdog Timer (WDT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.4 Latch Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
3.5 Initial Device Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.6 Service Processing Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
3.7 Output Mode at Operating Status Change (STOP to RUN) . . . . . . . . . . . . . . . . . . . . . . . . . . 101
3.8 Input Response Time Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
3.9 Error Time Output Mode Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
3.10 PLC Operation Mode at H/W Error Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.11 Security Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
3.11.1 File Password 32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
3.11.2 Remote Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
3.12 Remote Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
3.12.1 Remote RUN/STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
3.12.2 Remote PAUSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
3.12.3 Remote RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116
3.12.4 Remote Latch Clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
3.13 Scan Time Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
3.14 Program List Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
3.15 Interrupt Program List Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
3.16 Monitor condition setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
3.17 Local Device Monitor/Test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
3.18 External Input/Output Forced On/Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
3.19 Executional Conditioned Device Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
3.20 Sampling Trace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
3.21 Realtime Monitor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
3.22 Writing Programs in RUN Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
3.22.1 Online change (ladder mode). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
3.22.2 Online change (files) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152
3.22.3 Precautions for online change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
3.23 Debug from Multiple Programming Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
3.23.1 Simultaneous monitoring from multiple programming tools . . . . . . . . . . . . . . . . . . . . . . . . . .159
3.23.2 Online change from multiple programming tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160
3.24 Self-Diagnostic Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
13
3.25 Error Clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
3.26 LED Control Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
3.26.1 Methods for turning off the LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169
3.26.2 LED indication priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170
3.27 Module Error Collection Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
3.28 Latch Data Backup to Standard ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
3.28.1 Latch data backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
3.28.2 Restoring backup data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
3.29 Writing/Reading Device Data to/from Standard ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
3.30 Module Model Name Read. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
3.31 CPU Module Change Function with SD Memory Card. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
3.31.1 Backup to SD memory card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184
3.31.2 Backup data restoration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192
3.32 Clock Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
3.33 Battery Life-Prolonging Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
3.34 Memory Check Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
3.35 Program Cache Memory Auto Recovery Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
3.36 Project Data Batch Save/Load Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
3.36.1 Batch save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203
3.36.2 Batch load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209
3.37 Predefined Protocol Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
3.37.1 Communications via Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215
3.37.2 Communications via RS-232 and RS-422/485 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216
3.38 Serial Communication Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
3.39 iQ Sensor Solution Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
CHAPTER 4 DISPLAY UNIT FUNCTIONS 236
4.1 Function List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
4.2 CPU Monitor/Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
4.2.1 Device monitor/test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241
4.2.2 Device clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249
4.2.3 Forced on/off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251
4.2.4 Scan time monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254
4.2.5 Built-in I/O function monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255
4.2.6 Error display/clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259
4.3 CPU Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
4.3.1 Clock setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263
4.4 Module Monitor/Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
4.4.1 Buffer memory monitor/test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265
4.5 Module Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
4.5.1 Initial setting change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270
4.6 User Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
4.7 Memory Card Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
4.7.1 File list/delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .274
4.7.2 Free space display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279
4.7.3 Batch save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280
14
4.7.4 Batch load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281
4.8 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
4.8.1 Language setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
4.8.2 Contrast adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284
4.8.3 Lighting period setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .285
4.8.4 Pop-up display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286
PART 3 DEVICES, CONSTANTS
CHAPTER 5 DEVICES 288
5.1 Device List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
5.2 Internal User Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
5.2.1 Input (X) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293
5.2.2 Output (Y). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293
5.2.3 Internal relay (M) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294
5.2.4 Latch relay (L) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294
5.2.5 Link relay (B) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294
5.2.6 Annunciator (F) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295
5.2.7 Link special relay (SB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
5.2.8 Edge relay (V) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298
5.2.9 Step relay (S). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
5.2.10 Timer (T, ST) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
5.2.11 Counter (C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308
5.2.12 Data register (D). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311
5.2.13 Link register (W). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312
5.2.14 Link special register (SW) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313
5.3 Internal System Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
5.3.1 Function devices (FX, FY, FD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314
5.3.2 Special relay (SM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316
5.3.3 Special register (SD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316
5.4 Link Direct Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
5.5 Module Access Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
5.5.1 Intelligent function module device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .320
5.6 Index Register/Standard Device Register (Z). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
5.6.1 Index Register (Z) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322
5.6.2 Standard device register (Z). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323
5.6.3 Saving and restoration of the index register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324
5.7 File Register (R, ZR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
5.8 Extended Data Register (D) and Extended Link Register (W) . . . . . . . . . . . . . . . . . . . . . . . . 330
5.9 Nesting (N) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
5.10 Pointer (P). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
5.10.1 Local pointer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337
5.10.2 Common pointer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338
5.11 Interrupt Pointer (I) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
5.12 Other Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
15
5.12.1 SFC block device (BL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340
5.12.2 I/O No. specification device (U) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340
5.12.3 Macro instruction argument device (VD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341
CHAPTER 6 CONSTANTS 342
6.1 Decimal Constant (K) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
6.2 Hexadecimal Constant (H) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
6.3 Real Number (E). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
6.4 Character String (" "). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
CHAPTER 7 CONVENIENT USAGE OF DEVICES 344
7.1 Global Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
7.2 Local Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
APPENDICES 350
Appendix 1 Parameter Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Appendix 1.1 List of parameter numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350
Appendix 1.2 PLC parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353
Appendix 1.3 Network parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
Appendix 1.4 Remote password setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
Appendix 2 Added and Changed Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Appendix 3 CPU Module Processing Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Appendix 3.1 Time required for each processing in a scan time . . . . . . . . . . . . . . . . . . . . . . . . . . .378
Appendix 3.2 Factors that increase the scan time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
Appendix 3.3 Realtime monitor function processing time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .388
Appendix 4 Data Used in the CPU Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Appendix 5 Character Codes Available in the Display Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Appendix 6 Differences Between LCPU and QnUCPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Appendix 6.1 Specifications comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403
Appendix 6.2 Precautions for utilizing programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
Appendix 7 Precautions for Using GX Works2 and Differences with GX Developer . . . . . . . . . . . . 405
Appendix 8 Device Point Assignment Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
INDEX 407
REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
WARRANTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
16

MANUAL PAGE ORGANIZATION

The section of the current page is shown.
The chapter of the current page is shown.
"" is used for screen names and items.
[ ] is used for items in the menu bar and the project window.
shows operating procedures.
shows reference manuals.
shows notes that requires attention.
shows mouse operations.
*1
shows reference pages.
shows setting or operating examples.
Ex.
shows useful information.
A window selected in the view selection area is displayed.
View selection area
[Online] [Write to PLC...]
Select [Online] on the menu bar, and then select [Write to PLC...].
Project window
[Parameter]
[PLC Parameter]
Select [Project] from the view selection area to open the Project window.
Menu bar
Ex.
Ex.
In the Project window, expand [Parameter] and select [PLC Parameter].
In this manual, pages are organized and the symbols are used as shown below. The following illustration is for explanation purpose only, and should not be referred to as an actual documentation.
*1 The mouse operation example (for GX Works2) is provided below.
17

TERMS

Unless otherwise specified, this manual uses the following terms.
Ter m Description
Battery
Branch module The abbreviation for the MELSEC-L series branch module
Built-in Ethernet port LCPU
CPU module The abbreviation for the MELSEC-L series CPU module
Display unit A liquid crystal display to be attached to the CPU module
END cover A cover to be attached to the right side of the rightmost MELSEC-L series module
Extension block A block where an extension module is connected in an extension system
Extension cable The abbreviation for the MELSEC-L series extension cable
Extension module The abbreviation for the MELSEC-L series extension module
GX Works2
GX Developer
LCPU Another term for the MELSEC-L series CPU module
Main block A block where a CPU module is connected in an extension system
Power supply module The abbreviation for the MELSEC-L series power supply module
Programming tool A generic term for GX Works2 and GX Developer
QnUCPU Another term for the MELSEC-Q series Universal model QCPU
SD memory card
A battery to be installed in the CPU module and used for backing up data such as the standard RAM data and latch device data in case of power failure. The Q6BAT and Q7BAT are available.
A generic term for the L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, and L26CPU-PBT
The product name of the software package for the MELSEC programmable controllers
Secure Digital Memory Card, which is a flash memory device. The NZ1MEM-2GBSD, NZ1MEM-4GBSD, NZ1MEM-8GBSD, NZ1MEM-16GBSD, L1MEM-2GBSD, and L1MEM-4GBSD are available.
18

PART 1 PROGRAMMING

In this part, fundamental knowledge of programming is described.
CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING. . . . . . . . . . . . . . . . . . . . . . . 19
CHAPTER 2 APPLICATION OF PROGRAMMING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
19
CHAPTER 1 BASIC PROCEDURE FOR
Creating projects
Creating programs
Converting programs
Writing projects
Checking operations
PROGRAMMING
This chapter describes the basic procedure for programming.
Start
Check column
Create projects with GX Works2. ( Page 22, Section 1.2)
Create programs. ( Page 23, Section 1.3)
Convert created programs into ones that can be processed by the CPU module. ( Page 25, Section 1.4)
Write the projects to the CPU module. For the first use of the CPU module, format the used memory beforehand. ( Page 26, Section 1.5)
Debug the programs using the monitoring function. ( Page 28, Section 1.6)
Saving projects
End
Save the projects. ( Page 30, Section 1.7)
20
CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING
CPU module (L02CPU)
Power supply module (L61P)
GX Works2
Input module (LX42C4)
Output module (LY42NT1P)
END cover (L6EC)
USB connection
1.1 System Configuration Example
The following system configuration is used for description throughout this chapter.
*1 Wiring of the power supply module and I/O modules are omitted in this illustration.

1.1 System Configuration Example

21

1.2 Creating a Project

A project is a set of information, such as programs and parameters, which is necessary to operate a programmable controller. The following two projects are available.
• Simple project
• Structured project
Create a new project using GX Works2.
[Project] [New...]
Item Description
Project Type
PLC Series Select a series of the CPU module to use in the project. In this chapter, "LCPU" is selected.
PLC Type Select a type of the CPU module (CPU module model) to use in the project. In this chapter, "L02/L02-P" is selected.
Language Select a language of the program data to use for the new project. In this chapter, "Ladder" is selected.
When performing communication between a programming tool and a CPU module through GOT or a network module, check the PLC type because the modules could be connected with wrong model names. If the modules are connected with wrong model names, data may not be written or read properly.
Select a type of project to create. In this chapter, "Simple Project" is selected.
Use Label Select this checkbox when using a label for programming. In this chapter, this is not selected.
22
CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING
Device
Constant
1.3 Creating a Program
1.3.1 Prior knowledge for creating a program
(1) Device and constants
Devices and constants, such as shown below, are used for creating a program. ( Page 288, CHAPTER 5)
(2) Concept of I/O numbers
I/O numbers are automatically assigned.
Power supply module
CPU
module
0000
to
000F
Input
module
64 points
X0010
to
X004F
Output module
64 points
Y0050
to
Y008F
1.3.1 Prior knowledge for creating a program

1.3 Creating a Program

Users can also assign I/O numbers according to their purposes. ( Page 41, Section 2.2)
(3) Program configuration
A main routing program, subroutine program, ( Page 46, Section 2.3.3), and interrupt program ( Page 56, Section 2.7) can be included in a program.
23
1.3.2 How to create a program
This section shows how to create the following sample program.
When X10 is turned on, Y20 turns on.
1. To enter X10, type X10 at the original cursor
position and select the contact shown in the left
figure.
2. To enter Y20, type Y20 and select the coil shown in
the left figure.
The program has been created. In the next procedure, convert the program.
24
CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING
1.4 Converting a Program
Operation of a program is defined after converting its ladder.
[Compile] [Build]
The program has been converted. In the next procedure, write the program to a CPU module.
To use a label, the program must be compiled.
GX Works2 Version 1 Operating Manual (Common)
After modifying a program, it must be compiled.

1.4 Converting a Program

25

1.5 Writing a Project to the CPU Module

Write the project (the program and parameters described in Section 1.4.) to the CPU module. Note that, when the program is new, the memory ( Page 31, Section 2.1.1) is formatted so that a program can be written to it.
1.5.1 Formatting a memory
To format a memory, open the "Format PLC Memory" dialog box. In this chapter, a program memory is formatted so that a program can be written to it.
[Online] [PLC Memory Operation] [Format PLC Memory...]
To check the capacity of the memory after formatting, open the "Online Data Operation" dialog box.
26
CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING
1) Select the program memory.
2) Click this button to select the parameter and program checkboxes automatically.
1.5.2 Writing to the CPU module
Open the "Online Data Operation" dialog box. In this chapter, a project is written to the program memory.
[Online] [Write to PLC...]
The project has been written. In the next procedure, execute the program.
Note that parameter setting is required to operate CPU modules. In this chapter, the procedure for parameter setting is not introduced since default values are used.( Page 350, Appendix 1)
1.5 Writing a Project to the CPU Module
1.5.2 Writing to the CPU module
27

1.6 Checking an Operation of the CPU Module

On (green) Off Flashing (red)
MODE: RUN : ERR. :
On (green) Off Flashing (red)
MODE: RUN : ERR. : MODE: RUN : ERR. :
On (green) Off Off
MODE: RUN : ERR. :
On (green) On (green) Off
To check an operation, execute the program written to the CPU module. In this chapter, operation is checked through the monitoring screen of GX Works2.
(1) Executing a program
Before operating the CPU module, data written to the CPU module must be validated. To validate, power off and then on or reset the CPU module.
1. Before resetting the CPU module, check the current
LED status.
2. Move the switch on the front of the CPU module to
the RESET position. (One second or longer)
3. Hold the switch until the ERR. LED turns off after
flashing.
In the next procedure, run the CPU module. To run, use the switch on the CPU module.
4. Move the switch to the RUN position.
When the RUN LED is lit green, the program is being executed successfully.
By remote operation, CPU modules can be operated without using switches. ( Page 112, Section 3.12)
28
Loading...
+ 388 hidden pages