Mitsubishi Electric L02SCPU User's Manual And Reference

Mitsubishi Electric L02SCPU User's Manual And Reference

Melsec-l series, cpu module
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric L02SCPU

  • Page 1 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...
  • Page 3: Safety Precautions

    SAFETY PRECAUTIONS (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"...
  • Page 4 [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.
  • Page 5 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.
  • Page 6 [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. ●...
  • Page 7 [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.
  • Page 8 [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.
  • Page 9 [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...
  • Page 10: Conditions Of Use For The Product

    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.
  • Page 11: Introduction

    INTRODUCTION 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.
  • Page 12: Relevant Manuals

    RELEVANT MANUALS (1) CPU module user's manual Manual name Description <manual number (model code)> Specifications of the CPU modules, power supply modules, display unit, MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and branch module, extension module, SD memory cards, and batteries, Inspection) information on how to establish a system, maintenance and inspection, and <SH-080890ENG, 13JZ36>...
  • Page 13 (4) I/O module and intelligent function module manual Manual name Description <manual number (model code)> MELSEC-L I/O Module User's Manual Specifications and troubleshooting of the I/O module <SH-080888ENG, 13JZ34> Specifications, procedures for data communication with external devices, line MELSEC-L Ethernet Interface Module User's Manual (Basic) connection (open/close), fixed buffer communication, random access buffer <SH-081105ENG, 13JZ73>...
  • Page 14: Table Of Contents

    CONTENTS CONTENTS SAFETY PRECAUTIONS ............. 1 CONDITIONS OF USE FOR THE PRODUCT .
  • Page 15 2.8.4 Fixed scan execution type program ..........69 2.8.5 Changing the program execution type .
  • Page 16 3.25 Error Clear ............. . . 166 3.26 LED Control Function .
  • Page 17 4.7.4 Batch load ............. . .281 Options .
  • Page 18 5.12.1 SFC block device (BL) ............340 5.12.2 I/O No.
  • Page 19: Manual Page Organization

    MANUAL PAGE ORGANIZATION 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. "" is used for screen names and items. The chapter of the current page is shown.
  • Page 20: Terms

    TERMS Unless otherwise specified, this manual uses the following terms. Term Description A battery to be installed in the CPU module and used for backing up data such as the standard RAM data Battery and latch device data in case of power failure. The Q6BAT and Q7BAT are available. Branch module The abbreviation for the MELSEC-L series branch module A generic term for the L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, and...
  • Page 21: Part 1 Programming

    PART 1 PROGRAMMING In this part, fundamental knowledge of programming is described. CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING ..... . . 19 CHAPTER 2 APPLICATION OF PROGRAMMING .
  • Page 22: Chapter 1 Basic Procedure For Programming

    CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING This chapter describes the basic procedure for programming. Start Check column Create projects with GX Works2. Creating projects ( Page 22, Section 1.2) Create programs. Creating programs ( Page 23, Section 1.3) Convert created programs into ones that can be processed by Converting programs the CPU module.
  • Page 23: System Configuration Example

    CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING System Configuration Example The following system configuration is used for description throughout this chapter. CPU module (L02CPU) Input module (LX42C4) Output module (LY42NT1P) Power supply module (L61P) END cover (L6EC) USB connection GX Works2 Wiring of the power supply module and I/O modules are omitted in this illustration.
  • Page 24: Creating A Project

    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] ...
  • Page 25: Creating A Program

    CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING 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) Device Constant (2) Concept of I/O numbers I/O numbers are automatically assigned.
  • Page 26: How To Create A Program

    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. To enter X10, type X10 at the original cursor position and select the contact shown in the left figure.
  • Page 27: Converting A Program

    CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING 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. ...
  • Page 28: Writing A Project To The Cpu Module

    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"...
  • Page 29: Writing To The Cpu Module

    CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING 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...] 2) Click this button to select the parameter and program 1) Select the program...
  • Page 30: Checking An Operation Of The Cpu Module

    Checking an Operation of the CPU Module 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.
  • Page 31 CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING (2) Checking operation Conductivity and power distribution status of contacts and coils can be checked by switching GX Works2 to the monitor mode. [Online]  [Monitor]  [Start Monitoring] When X0 and X1 are turned on, Y10 turns on. (to turn on X0 and X1, place the cursor on them and double-click while holding the key.) While contacts and coils are conducting, they are shown in blue.
  • Page 32: Saving A Project

    Saving a Project To save a project, open the "Save As" dialog box. [Project]  [Save As...] Item Description Enter the storage destination folder (drive or path) of the workspace. Folders can be browsed for selection by Save Folder Path clicking the button.
  • Page 33: Chapter 2 Application Of Programming

    Memory configuration The following table lists the memory configuration of the CPU module. CPU module Memory configuration L02SCPU, L02SCPU-P Program memory, standard RAM, standard ROM L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, L26CPU-P, Program memory, standard RAM, standard ROM, SD memory card...
  • Page 34 An SD card memory is required when using the data logging function. (5) Memory capacity The following table shows the memory capacity of each memory. CPU module Program memory Standard RAM Standard ROM SD memory card L02SCPU, L02SCPU-P  80K bytes 128K bytes 512K bytes L02CPU, L02CPU-P L06CPU, L06CPU-P 240K bytes...
  • Page 35 CHAPTER 2 APPLICATION OF PROGRAMMING (6) Memory and data to be stored : Storable, : Not storable Program Standard Standard File name and SD memory card Memory File type extension (any Remarks given name for ***) Drive 0 Drive 3 Drive 4 Drive 2 ...
  • Page 36: Parameter-Valid Drive

    2.1.2 Parameter-valid drive CPU modules operate according to parameter settings. Systems automatically select parameters from those stored in the drives for CPU module operation, according to the following priority order. [Priority order] 1) Drive 0 (program memory) 2) Drive 2 (SD memory card) 3) Drive 4 (standard ROM) ●...
  • Page 37: Files

    CHAPTER 2 APPLICATION OF PROGRAMMING 2.1.3 Files For the files written to the CPU module, information such as written date, file name (if created), and file size are appended to the file. By monitoring the file through Read from PLC, the file is displayed as shown below. [Online] ...
  • Page 38 (1) Handling (a) Power-off during online data operation (including reset) Files in memory are not discarded if the CPU module is powered off or reset during online operation. However, for SD memory cards, doing so may result in data corruption. Stop accessing to an SD memory card, and then power off or reset the CPU module.
  • Page 39 File size (unit: byte) Default • L02SCPU, L02SCPU-P: 2760 (The size can be increased by parameter setting.) • L02CPU, L02CPU-P: 2936 (The size can be increased by parameter setting.) • L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT: 2964 (The size can be increased by parameter setting.)
  • Page 40 File type File size (unit: byte) Refer to the following. Data logging setting file QnUDVCPU/LCPU User's Manual (Data Logging Function) System file for the iQ Sensor Solution function (data backup/restoration) Refer to the following. iQ Sensor Solution Reference Manual Backup data file for the iQ Sensor Solution function (data backup/restoration) Predefined protocol setting file...
  • Page 41 CHAPTER 2 APPLICATION OF PROGRAMMING (3) Program file structure The following shows a program file structure. Program file structure 57 steps File header (default) Execution program These areas are reserved in increments of file size units. Reserved area for 500 steps online change Item Description...
  • Page 42 This unit is referred to as a file size unit. Memory area CPU module Program memory Standard RAM Standard ROM SD memory card L02SCPU, L02SCPU-P  128 steps (512 bytes) L02CPU, L02CPU-P, L06CPU, L06CPU-P 1 step (4 bytes) 128 steps (512 bytes)
  • Page 43: I/O Number

    CHAPTER 2 APPLICATION OF PROGRAMMING I/O Number This section describes the I/O number assignment required for data communication between the CPU module or its built-in functions and I/O modules or intelligent function modules. 2.2.1 Concept of I/O number assignment (1) Purpose of I/O number assignment I/O numbers can be assigned with any given number for the following purposes.
  • Page 44 0090 00A0 00B0 00D0 009F 00AF 00CF 00DF The start I/O numbers are as below. L02SCPU, L02SCPU-P, L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU-BT, L26CPU-PBT Target L26CPU, L26CPU-P Default I/O assignment Default I/O assignment 0000 0000 Built-in I/O Change allowed Change allowed ...
  • Page 45: I/O Number Assignment

    CHAPTER 2 APPLICATION OF PROGRAMMING 2.2.2 I/O number assignment (1) Setting method To assign I/O numbers, open the I/O Assignment tab. ( Page 353, Appendix 1.2) Project window  [PLC Parameter]  [Parameter]  [I/O Assignment] In the I/O Assignment tab, the following settings are also available •...
  • Page 46 (2) Precautions (a) Type setting The type set in the I/O Assignment tab must be the same as that of the connected module. Setting a different type may result as follows. Type specified in the I/O Connected modules Results Assignment tab •...
  • Page 47: Scan Time Structure

    CHAPTER 2 APPLICATION OF PROGRAMMING Scan Time Structure A CPU module sequentially performs the following processing in the RUN status. Scan time is the time required for all processing and executions to be performed. Power-on or reset ( Page 45, Section 2.3.1) Initial processing (...
  • Page 48: Refresh Processing Of Input/Output Modules Or Intelligent Function Modules

    2.3.2 Refresh processing of input/output modules or intelligent function modules The CPU module performs the following before program operations. • On/off data input from the input module or intelligent function module to the CPU module • On/off data output from the CPU module to the output module or intelligent function module For details on refresh processing, refer to ...
  • Page 49: End Processing

    CHAPTER 2 APPLICATION OF PROGRAMMING Use a subroutine program for the purposes such as the following. • Handle the program that is executed several times in one scan as a subroutine program so that the entire number of steps can be reduced •...
  • Page 50: Operation Processing Of The Cpu Module For Each Operating Status

    Operation Processing of the CPU Module for Each Operating Status There are three types of operating status for the CPU module. • RUN status • STOP status • PAUSE status (1) Operation processing in the RUN status RUN status is a status where program operations are repeatedly performed in a loop between the step 0 and the END (FEND) instruction.
  • Page 51 CHAPTER 2 APPLICATION OF PROGRAMMING (4) Operation processing when operating status of the CPU module changed The operation processing of CPU module performs the following according to the RUN/STOP status. CPU module operation processing RUN/STOP Program Device memory status operation External output M, L, S, T, C, D processing...
  • Page 52: Operation Processing During Momentary Power Failure

    Operation Processing During Momentary Power Failure When the input voltage supplied to the power supply module drops below the specified range, the CPU module detects a momentary power failure and performs the following operation. (1) When a momentary power failure occurs for a period shorter than the allowable power failure time The CPU module registers error data and suspends the operation processing.
  • Page 53: Processing Of Inputs And Outputs

    CHAPTER 2 APPLICATION OF PROGRAMMING Processing of Inputs and Outputs The CPU module can batch-access the general-purpose I/O , I/O modules, and intelligent function modules before program operation (refresh processing). Note that I/O processing can be performed upon execution of an instruction by using a direct access device in the program.
  • Page 54 (c) Process flowchart CPU module Remote input refresh area* Network module CPU (operation processing area) Programming Built-in Input (X) tool input CC-Link* device area* Input memory refresh General-purpose input/input Input module module access area General-purpose input Output (Y) Built-in CC-Link* device memory* General-purpose output...
  • Page 55 CHAPTER 2 APPLICATION OF PROGRAMMING (2) Response delay An output response which corresponds to the status change in the input module delays for two scans (maximum) depending on the on timing of an external contact. The following shows response delay examples. [Example] A program that turns on the output Y5E when the input X5 is turned on.
  • Page 56: Direct Processing

    2.6.2 Direct processing (1) Outline of the processing Data input and output are performed using a direct access input (DX) or direct access output (DY). CPU module (operation processing area) Programming tool input Input (X) area* device memory Input module General-purpose input Output (Y)
  • Page 57 CHAPTER 2 APPLICATION OF PROGRAMMING (2) Response delay An output response which corresponds to the status change in the input module delays for one scan (maximum) depending on the on timing of an external contact. The following shows response delay examples. [Example] A program that turns on the output Y5E when the input X5 is turned on.
  • Page 58: Interrupt Program

    Interrupt Program An interrupt program is from an interrupt pointer (I) to the IRET instruction. Main routine program Indicates the end of the main routine program. Interrupt program (I0) Interrupt program (I29) Interrupt pointer The interrupt pointer number (I) varies depending on the interrupt factor. ( Page 339, Section 5.11) When an interrupt factor occurs, an interrupt program of the interrupt pointer number corresponding to that factor is executed.
  • Page 59 CHAPTER 2 APPLICATION OF PROGRAMMING (1) Creating an interrupt program Create interrupt programs between the FEND and END instructions in the main routine program. Before executing any of interrupt programs of I0 to I15, I23 to I31, or I50 to I255, allow an interrupt by the EI instruction. Program A Main routine program Interrupt...
  • Page 60 (3) Operation when an interrupt factor occurs The following restrictions are applied to the interrupt program depending on the interrupt factor occurrence timing. (a) When an interrupt factor occurs before the interrupt program execution status is enabled The CPU module stores the interrupt factor occurred. As soon as the interrupt program execution status is enabled, the CPU module executes the interrupt program corresponding to the stored interrupt factor.
  • Page 61 CHAPTER 2 APPLICATION OF PROGRAMMING (c) When multiple interrupt factors simultaneously occur in the interrupt program execution enabled status The interrupt programs are executed in the order of priority of the interrupt pointers (I) ( Page 339, Section 5.11). Other interrupt programs have to wait until processing of the interrupt program being executed is completed. Concurrence of multiple Interrupt interrupt factors...
  • Page 62 (f) When an interrupt factor occurs during END processing When the constant scan function is used and an interrupt factor occurs during the waiting time in END processing, an interrupt program corresponding to the interrupt factor is executed. (g) When an interrupt factor occurs during access to another module When an interrupt factor occurs during access to another module (during service processing or instruction processing), the interrupt program becomes standby status until the service processing or the instruction in execution is completed.
  • Page 63: Executing Multiple Programs

    CHAPTER 2 APPLICATION OF PROGRAMMING Executing Multiple Programs Multiple programs can be stored in the CPU module by changing the file names of programs. Dividing a program by process or function allows simultaneous programming by multiple engineers. Control by one program Program A Control data A Control data A...
  • Page 64 (1) Program sequence in the CPU module The following shows the program sequence after the CPU module is powered on or its operating status is changed from STOP to RUN. Use an appropriate type of program as required. Power-on or STOP Executed once when Initial execution the CPU module is...
  • Page 65: Initial Execution Type Program

    CHAPTER 2 APPLICATION OF PROGRAMMING 2.8.1 Initial execution type program Initial execution type program is executed only once when the CPU module is powered on or its operating status is changed from STOP to RUN. This type of program can be used as a program that need not be executed from the next scan and later once it is executed, like initial processing to an intelligent function module.
  • Page 66 (2) Initial scan time Initial scan time is the execution time of initial execution type program. When multiple programs are executed, the initial scan time will be the time required for completing all the initial execution type program execution. Since the CPU module stores the initial scan time into the special register (SD522 and SD523), the initial scan time can be checked by monitoring SD522 and SD523.
  • Page 67: Scan Execution Type Program

    CHAPTER 2 APPLICATION OF PROGRAMMING 2.8.2 Scan execution type program Scan execution type program is executed once in every scan, starting in the next scan of which the initial execution type program is executed and later. STOP Power-on 1st scan 2nd scan 3rd scan 4th scan...
  • Page 68: Standby Type Program

    2.8.3 Standby type program Standby type program is executed only when its execution is requested. This type of program can be changed to any desired execution type by a program instruction. This program is mainly used for the following purposes. •...
  • Page 69 CHAPTER 2 APPLICATION OF PROGRAMMING (a) Executing upon an interrupt or a call such as by a pointer When creating subroutine and/or interrupt programs in a single standby type program, start the program from the step 0. The FEND instruction used in creation of a subroutine or interrupt program is not required after a main routine program.
  • Page 70 (b) Changing the program execution type using instructions Use the PSCAN, PSTOP, or POFF instruction to change a program execution type. ( Page 72, Section 2.8.5) In the following figure, the PSCAN instruction changes the program "DEF" to a scan execution type program and the PSTOP instruction changes the program "ABC"...
  • Page 71: Fixed Scan Execution Type Program

    CHAPTER 2 APPLICATION OF PROGRAMMING 2.8.4 Fixed scan execution type program Fixed scan execution type program is a program executed at specified time intervals. This type of programs, unlike interrupt programs, can be interrupted in units of files without interrupt pointers or the IRET instruction. For the restrictions on programming, refer to ...
  • Page 72 (1) Processing (a) When two or more fixed scan execution type programs exist Each fixed scan execution type program is executed at specified time intervals. If two or more fixed scan execution type programs reach the specified time at the same timing, programs will be executed in ascending order of the numbers set in the Program tab of the PLC Parameter dialog box.
  • Page 73 CHAPTER 2 APPLICATION OF PROGRAMMING (3) Precautions (a) Execution interval of a fixed scan execution type program Execution interval of a fixed scan execution type program may increase from the preset interval depending on the time set for disabling interrupts by the DI instruction (interrupt disabled time). If the interrupt disabled time by the DI instruction becomes too long, use an interrupt program by fixed scan interrupt (I28 to I31) instead of a fixed scan execution type program.
  • Page 74: Changing The Program Execution Type

    2.8.5 Changing the program execution type The execution type of programs can be changed using instructions even during execution. Use the PSCAN, PSTOP, or POFF instruction to change a program execution type. PSCAN instruction Scan execution Initial execution type program type program PSTOP PSTOP...
  • Page 75 CHAPTER 2 APPLICATION OF PROGRAMMING In a control program, a standby type program matching the preset condition is changed to a scan execution type program in the course of program execution. (An unused scan execution type program can also be changed to a standby type program.) Control program The PSCAN instruction changes the program "ABC"...
  • Page 76: Boot Operation

    This is the data of label program configuration information. GX Works2 Version 1 Operating Manual (Common) Remark The L02SCPU and L02SCPU-P do not support the boot operation. (1) Executing a program The programs specified in the Boot File tab are booted to the program memory when: •...
  • Page 77 CHAPTER 2 APPLICATION OF PROGRAMMING Insert an SD memory card. Write the setting to the SD memory card (parameters and the files set in the Boot File tab). Reset the CPU module after the above operation. The boot operation is complete. (b) Checking whether a boot is complete The following indicates completion of boot operation.
  • Page 78: Programming Language

    2.10 Programming Language The following programming languages are supported in the programming tool. • Ladder • ST • SFC • Structured ladder (1) Ladder A graphical programming language which uses contacts and coils. For a project with a label, the inline ST function can be used in the ladder editor which allows a user to edit an ST program.
  • Page 79: Communications With Intelligent Function Modules

    CHAPTER 2 APPLICATION OF PROGRAMMING 2.11 Communications with Intelligent Function Modules The intelligent function module allows the CPU module to process analog quantity and high-speed pulses that cannot be processed by the I/O modules. The following is some of the intelligent modules. •...
  • Page 80 Upon completion of the setting above, parameters for the intelligent function module appear in the "Project" window. To set the intelligent module parameters, refer to the following. Manual for the intelligent function module used (2) Communications with the FROM and TO instructions The FROM instruction stores data read from the buffer memory of the intelligent function module to the specified device.
  • Page 81 CHAPTER 2 APPLICATION OF PROGRAMMING (4) Communications using the intelligent function module dedicated instruction This instruction enables easy programming for the use of functions of the intelligent function module. Serial communication module dedicated instruction (OUTPUT instruction) The OUTPUT instruction allows communications with external device by nonprocedural protocol regardless of the buffer memory address of the serial communication module.
  • Page 82 Memo...
  • Page 83: Part 2 Functions

    PART 2 FUNCTIONS In this part, the functions of the CPU module and display unit are described. CHAPTER 3 CPU MODULE FUNCTIONS ........82 CHAPTER 4 DISPLAY UNIT FUNCTIONS .
  • Page 84: Chapter 3 Cpu Module Functions

    CHAPTER 3 CPU MODULE FUNCTIONS This chapter describes the functions for a CPU module. Function List The following table lists the functions of the LCPU. Item Description Reference Boots data stored in an SD memory card to the program memory or the standard ROM Page 74, Section 2.9 Boot operation when the CPU module is powered off and on or reset.
  • Page 85 CHAPTER 3 CPU MODULE FUNCTIONS Item Description Reference Page 143, Section Sampling trace Continuously collects data of the specified device at a specified timing. 3.20 Monitors the data in the specified device of the CPU module at a specified interval or at Page 150, Section *1*2 Realtime monitor function...
  • Page 86 Item Description Reference Enables MC protocol communications and the following functions by using built-in  Ethernet ports. Socket communication Communicates data (using TCP/UDP) with external devices connected on the Ethernet network. The function is executed by dedicated instructions. function Works as a server of the FTP (File Transfer Protocol), which is used to transfer files File transfer function between the CPU module and external devices.
  • Page 87: Constant Scan

    CHAPTER 3 CPU MODULE FUNCTIONS Constant Scan Scan time of the CPU module is not constant because the processing time varies depending on the execution status of instructions used in a program. By using this function, scan time can be maintained constant. (1) Application I/O refresh is performed before program execution.
  • Page 88 (a) Condition Set a value that satisfies the following relational expression. WDT setting time > Constant scan setting time > Maximum scan time of the program If the program scan time is longer than the constant scan setting time, the CPU module detects "PRG. TIME OVER"...
  • Page 89: Watchdog Timer (Wdt)

    CHAPTER 3 CPU MODULE FUNCTIONS Watchdog Timer (WDT) WDT is an internal timer of the CPU module that detects CPU module hardware failures and program errors. (1) Setting Open the tab for watchdog timer setting. The setting range is 10 to 2000ms (in increments of 10ms). 200ms is set by default.
  • Page 90: Latch Function

    Latch Function This function holds data in each device of the CPU module when: • the CPU module is powered off and then on, • the CPU module is reset, or • a power failure occurred exceeding the allowable momentary power failure time. Data in each device of the CPU module are cleared and set back to its default (bit device: off, word device: 0) when this function is not used.
  • Page 91 CHAPTER 3 CPU MODULE FUNCTIONS (3) Effect on the scan time Data latch processing is performed during END processing therefore the scan time increases. Consider the effect on the scan time when latching devices. ( Page 378, Appendix 3.1) To reduce the scan time increase due to latch , minimize the number of latch points (latch (1) setting, latch (2) setting, and latch relay) as much as possible by performing the following.
  • Page 92 (b) Data in the latch clear operation disable range (Latch (2) Start/End) and in the file register Perform any of the following. • Perform the data clear operation using the display unit. ( Page 249, Section 4.2.2) • Reset data by using the RST instruction. •...
  • Page 93: Initial Device Value

    CHAPTER 3 CPU MODULE FUNCTIONS Initial Device Value This function registers data used in a program to the device or the buffer memory of the intelligent function module without a program. By using this function, creating a device data setting program can be omitted in the initial processing program.
  • Page 94 (3) Initial device value setting Specify a memory and name to store initial device values. Project Window  [Parameter]  [PLC Parameter]  [PLC File]  Specify a name to store initial device values. Project Window  [Device Initial Value]  Right- click ...
  • Page 95 CHAPTER 3 CPU MODULE FUNCTIONS Configure the device memory. Project Window  [Device Memory]  [MAIN]  Right-click  [Input Device...] Store the initial device value file in the program memory of the CPU module, standard ROM, or an SD memory card. [Online] ...
  • Page 96: Service Processing Setting

    Service Processing Setting This function allows to set the time and the number of times of service processing performed at END processing by parameters. Processing for requests from peripherals to the CPU module are performed with this function. The processing speed for the communication response to the requests varies depending on the scan time and communication load.
  • Page 97 CHAPTER 3 CPU MODULE FUNCTIONS (1) Setting method Configure the setting of the service processing. Project Window  [Parameter]  [PLC Parameter]  [PLC System] Select any one option button. Deselected parameters remain unavailable. "Execute the process as the scan time proceeds" is selected by default. Item Description Setting range...
  • Page 98 (2) Operation for service processing setting Operations for each service processing setting is described below. (a) Execute the process as the scan time proceeds Operation when 10% is set is as shown below. Request 2) Request 4) Request 1) Request 3) Request 5) Program execution 1st scan...
  • Page 99 CHAPTER 3 CPU MODULE FUNCTIONS (b) Specify service process time Operation when 1ms is set is as shown below. Request 2) Request 4) Request 1) Request 3) Request 5) Program execution Peripheral 1st scan Request 1) END processing Request 2) Multiple requests are processed until the processing time exceeds the set service processing time (1ms).
  • Page 100 (c) Specify service process execution counts Operation when 1 time is set is as shown below. Request 2) Request 4) Request 1) Request 3) Request 5) Program execution 1st scan Peripheral END processing Request 1) Regardless of request data size, one Program execution request is processed at one END processing.
  • Page 101 CHAPTER 3 CPU MODULE FUNCTIONS (d) Execute it (service processing) while waiting for constant scan setting. Request 2) Request 4) Request 1) Request 3) Request 5) Program execution END processing Peripheral Constant scan Request 1) Waiting time Request 2) The service processing is performed during waiting time.
  • Page 102 (e) Precautions The following describes precautions for the service processing setting. • In the service processing, the processing for request data from each receiving port (each intelligent function module, USB, RS-232, and built-in Ethernet) is performed one by one. If several requests are received one after another from the same receiving port, the service processing may not be performed in the same scan even if the service processing time is left.
  • Page 103: Output Mode At Operating Status Change (Stop To Run)

    CHAPTER 3 CPU MODULE FUNCTIONS Output Mode at Operating Status Change (STOP to RUN) When the operating status is changed from RUN to STOP, the CPU module internally stores the outputs (Y) in the RUN status and then turns off all the outputs (Y). Therefore, status of the outputs(Y) can be selected for setting when the CPU module is set back to the RUN status.
  • Page 104: Input Response Time Setting

    Input Response Time Setting This function changes the input response time for each input module. Input modules obtain external inputs within the set response time. For the input response time setting by the built-in I/O function, refer to the following. MELSEC-L CPU Module User's Manual (Built-In I/O Function) External input Input module...
  • Page 105: Error Time Output Mode Setting

    CHAPTER 3 CPU MODULE FUNCTIONS Error Time Output Mode Setting This function determines the output mode (clear or hold) from the CPU module to output modules and intelligent function modules when a stop error occurs in the CPU module. For the error time output mode setting by the built-in I/O function, refer to the following. MELSEC-L CPU Module User's Manual (Built-In I/O Function) (1) Setting procedure Select a target module under "Type"...
  • Page 106: Plc Operation Mode At H/W Error Setting

    3.10 PLC Operation Mode at H/W Error Setting This function determines an operation mode of the CPU module when a hardware error (CPU module detects SP.UNIT DOWN) occurred in an intelligent function module. (1) Setting procedure Select "Intelligent" under "Type" in the I/O Assignment tab, and click the button.
  • Page 107: Security Function

    CHAPTER 3 CPU MODULE FUNCTIONS 3.11 Security Function This function protects data in the CPU module against tampering and theft by unauthorized persons. Use the following functions according to your applications and needs. Function Purpose Reference File password 32 To limit access to each file in the CPU module Page 105, Section 3.11.1 Remote password To limit access to the CPU module from external devices.
  • Page 108 (3) Operations that are controlled and the number of characters A password can be set to the following operations. The minimum number of characters in the password should be 4, and the maximum number should be 32. • Reading files •...
  • Page 109 CHAPTER 3 CPU MODULE FUNCTIONS (6) Precautions (a) Boot from an SD memory card The following table shows the relationship between the boot operation availability and file password 32 setting. : No combination available Transfer source file Transfer destination file Password status Boot operation File...
  • Page 110 (7) Authentication method Passwords are authenticated in three ways. • By a programming tool • By the FTP server • By the MC protocol (a) Authentication by a programming tool Whenever an online operation requiring password authentication is executed, the "Disable Password" window appears.
  • Page 111 CHAPTER 3 CPU MODULE FUNCTIONS (b) Authentication by the FTP server To access a password-protected file from external devices using the FTP server function, password authentication is required for each file. To change a file to access, password authentication is required again. : Authentication required, : Authentication not required Password authentication Operation...
  • Page 112: Remote Password

    3.11.2 Remote Password This function prevents unauthorized access to the CPU module from external devices. (1) Settable modules and the number of settable modules The following shows the modules for which the remote password can be set and the number of settable modules. (The number of settable modules does not indicate the number of connectable modules in the system where a CPU module is used.) •...
  • Page 113 CHAPTER 3 CPU MODULE FUNCTIONS (3) Changing/deleting a remote password Open the "Remote Password Setting" dialog box. ( Page 375, Appendix 1.4) Project window  [Parameter]  [Remote Password] Enter a remote password. For a Ethernet Built-in CPU, configure the "Detail" setting. •...
  • Page 114: Remote Operation

    3.12 Remote Operation Remote operation allows externally (by programming tool, external devices using the MC protocol, or using remote contacts) changing the operating status of the CPU module. There are four types of remote operations: • Remote RUN/STOP ( Page 112, Section 3.12.1) •...
  • Page 115 CHAPTER 3 CPU MODULE FUNCTIONS (a) Using a RUN contact Set a RUN contact. Project window  [Parameter]  [PLC Parameter]  [PLC System] Set a device used as a contact. The remote RUN/STOP operation can be performed by turning on/off the set RUN contact. •...
  • Page 116: Remote Pause

    3.12.2 Remote PAUSE This operation externally changes the operating status of the CPU module to PAUSE, keeping the CPU module switch in the RUN position. PAUSE status is a status where program operations in the CPU module are stopped, holding the status (on or off) of all outputs (Y).
  • Page 117 CHAPTER 3 CPU MODULE FUNCTIONS (b) Using a programming tool Open the "Remote Operation" dialog box. [Online]  [Remote Operation] Select "PAUSE" for execution. (c) By an external device using the MC protocol Use MC protocol commands. MELSEC Communication Protocol Reference Manual (2) When forcibly keeping output status To forcibly keep the output status (on or off) in the PAUSE status, provide an interlock with the PAUSE contact (SM204).
  • Page 118: Remote Reset

    3.12.3 Remote RESET This operation externally resets the CPU module when the CPU module is in the STOP status. Even if the switch of the CPU module is in the RUN position, this operation can be performed when the module is stopped due to an error. Use this function when an error occurred in the CPU module that is beyond the reach.
  • Page 119: Remote Latch Clear

    CHAPTER 3 CPU MODULE FUNCTIONS 3.12.4 Remote Latch Clear This function resets the device data when the CPU module is in the STOP status. This operation is useful when: • the CPU module is inaccessible or • externally performing latch clear to the CPU module in a control panel. Device data in the range where a latch clear operation is disabled cannot be reset.
  • Page 120: Scan Time Measurement

    3.13 Scan Time Measurement This function displays the processing time of set program section during ladder monitoring. The time required for the subroutine and interrupt programs can be measured. (1) Execution Open the "Scan Time Measurement" dialog box. [Debug]  [Scan Time Measurement] Specify the start and end steps and click the button.
  • Page 121 CHAPTER 3 CPU MODULE FUNCTIONS (2) Precautions • The minimum unit of measurement time is 0.01ms. If the measurement time is less than 0.01ms, 0.000ms is displayed. • When between the FOR and NEXT instructions is specified, the execution time of one scan between the specified steps is displayed.
  • Page 122 When the IRET instruction, FEND instruction, BREAK instruction, or RET instruction is specified in the end step Example: The IRET instruction is specified in the end step of an interrupt program by I31. FEND Start step: 4 End step: 12 When the scan time in an IRET interrupt program is measured,...
  • Page 123: Program List Monitor

    CHAPTER 3 CPU MODULE FUNCTIONS 3.14 Program List Monitor This function displays the processing time of the program being executed. The scan time, number of execution times, and processing time by item can be displayed for each program. (1) Execution Open the "Program List Monitor"...
  • Page 124: Interrupt Program List Monitor

    3.15 Interrupt Program List Monitor This function displays the number of executions of an interrupt program. (1) Execution Open the "Interrupt Program List Monitor" dialog box. [Online]  [Monitor]  [Interrupt Program List...] Item Description Interrupt Pointer An interrupt pointer is displayed. The number of executions of an interrupt program is displayed.
  • Page 125: Monitor Condition Setting

    CHAPTER 3 CPU MODULE FUNCTIONS 3.16 Monitor condition setting This function monitors the CPU module under specified conditions. Remark Before setting the monitor condition, check the version of the programming tool used. ( Page 376, Appendix 2) (1) Setting method The following two methods are available for the monitor condition setting.
  • Page 126 (a) When only a step number is specified Monitor data is collected when the status immediately before execution of the specified step becomes the specified status. • When the operation of the specified step changes from the non-execution status to the execution status: <>...
  • Page 127 CHAPTER 3 CPU MODULE FUNCTIONS (b) When only a device is specified Either word device or bit device can be specified. • When a word device is specified Monitor data is collected when the current value of the specified word device becomes the specified value. Specify the current value in decimal or hexadecimal.
  • Page 128 (2) Precautions (a) Files to be monitored When monitoring after setting the monitor condition, the file displayed on a programming tool is monitored. Match the name of the file to be monitored on the CPU module with that on the programming tool by executing [Online] ->...
  • Page 129 CHAPTER 3 CPU MODULE FUNCTIONS (j) Monitor operation with monitor condition setting When monitor operation with monitor condition setting is performed, other applications on the same personal computer cannot execute any online function using the same route for the monitor operation. The following shows examples of other applications: •...
  • Page 130: Local Device Monitor/Test

    3.17 Local Device Monitor/Test This function enables debugging of local devices of the program that is being monitored. (1) Monitoring local devices The following shows examples of monitoring local devices. D0 to D99 are set as local devices and three programs "A", "B" and "C" are executed by the CPU module. (Three programs are to be executed in the order of A ...
  • Page 131 CHAPTER 3 CPU MODULE FUNCTIONS used in the program "B" can be monitored. CPU module Program execution (A Program: A Program: B Program: C Display the local device data of the program B. Set local device monitor (Example) and monitor the program B. If D0 to D99 are set as a local device, D0 = 4 and D99 = 8 are displayed when X10 and X11 are on, respectively.
  • Page 132 (2) Device test procedure Connect a personal computer to the CPU module Display a program in ladder mode Switching to the monitor mode [Online]  [Monitor]  monitor mode Select [Local device monitor] from the monitor window. (3) Number of programs that can be monitored/tested Local devices of 16 programs can be simultaneously monitored or tested from multiple programming tools.
  • Page 133: External Input/Output Forced On/Off

    CHAPTER 3 CPU MODULE FUNCTIONS 3.18 External Input/Output Forced On/Off This function forcibly turns on or off the external input/output of the CPU module. (1) Input/output operation when a forced on/off operation is performed Three types of forced on/off operations are available as shown in the following table. The following table shows the status of input (X) and output (Y) when a forced on/off operation is performed.
  • Page 134 (d) Forced on/off timing Refresh area Timing • During END processing (input refresh) • At execution of the COM instruction (input refresh) • Input and output used in the built-in I/O • At execution of an instruction using direct access input (DX) and direct access output function.
  • Page 135 CHAPTER 3 CPU MODULE FUNCTIONS (h) Status of devices after forced on/off registration data are canceled Program operations (on/off) not Forced on/off registered device Program operations (on/off) performed performed • Input used in the built-in I/O function • Input from connected modules on the base Uses the on/off status input from modules.
  • Page 136 (3) Operating procedure Open the "Forced Input Output Registration/Cancellation" dialog box. [Debug]  [Forced Input Output Registration/Cancellation...] Enter the target device to the "Device" column. Click the button for intended operation. Button name Description Button name Description Registers forced on for a specified device. Cancels forced on/off registered for the device specified.
  • Page 137: Executional Conditioned Device Test

    CHAPTER 3 CPU MODULE FUNCTIONS 3.19 Executional Conditioned Device Test This function changes a device value for the specified step of a program. This enables debugging of the specified ladder block without modifying the program. The executional conditioned device test is not available for the SFC program. (1) Operation of the executional conditioned device test A device value is changed based on the registration data once the executional conditioned device test setting is registered.
  • Page 138 (3) How to check the execution status • By displaying the "Check/Disable Executional Conditioned Device Test Registration" dialog box • By the flash of the MODE LED in green • By the on status of the first bit in SD840 (Debug function usage) When checking by the MODE LED or SD840, remind that they are also used to check the execution status of the external input/output forced on/off function.
  • Page 139 CHAPTER 3 CPU MODULE FUNCTIONS ● When setting a word device with a different data type, a device is regarded as the same device. Example: When a word device is set in the order of "D100 (16-bit integer)" and then "D100 (Real number (single precision))", "D100 (Real number (single precision))"...
  • Page 140 • Instructions that do not change device values A device value is not changed by executing the executional conditioned device test when the execution timing has been set to "After executing instruction", specifying the step for instructions that do not execute the next step, such as branch instructions.
  • Page 141 CHAPTER 3 CPU MODULE FUNCTIONS (5) Checking the executional conditioned device test Open the "Check/Disable Executional Conditioned Device Test Registration" dialog box. ( Page 139, Section 3.19 (6)) Contents can be viewed by clicking the button. (6) Disabling the executional conditioned device test (a) Operating procedure Open the "Check/Disable Executional Conditioned Device Test Registration"...
  • Page 142 (7) Batch-disabling executional conditioned device test settings Open the following message box. [Debug]  [Executional Conditioned Device Test]  [Batch Disable Executional Conditioned Device Test] This operation is also available from the "Check/Disable Executional Conditioned Device Test Registration" dialog box. (8) Conditions that registration or disabling is not available In the following cases, executional conditioned device test setting cannot be registered or disabled.
  • Page 143 CHAPTER 3 CPU MODULE FUNCTIONS (c) Online change to the CPU module where the executional conditioned device test setting has been registered For the online module change (ladder): if any executional conditioned device test setting has been registered in the ladder block that is to be changed online, the CPU module disables the corresponding setting. Step numbers of registrations 1 to 3 are specified in the executional conditioned device test settings.
  • Page 144 (d) Specifying a device by index modification If an index-modified device name is specified to register the executional conditioned device test setting, the CPU module does not check whether the specified device is within the setting range. To change a device by specifying a step No., the index-modified device must be within the device range or not be on the boundary of devices, otherwise the device value is not changed.
  • Page 145: Sampling Trace

    CHAPTER 3 CPU MODULE FUNCTIONS 3.20 Sampling Trace This function samples the data of the specified device at a preset timing and at a preset interval (sampling cycle), and then stores the trace results in the sampling trace file. In addition, this function can be used to read the device data upon trigger condition establishment.
  • Page 146 (b) On/Off of the special relay The execution status of the sampling trace can be checked by the special relay. Trace completed after performed Trigger condition by the number of times set in Trace start requested established "Count after trigger" Number of traces after trigger Total number of traces...
  • Page 147 CHAPTER 3 CPU MODULE FUNCTIONS (4) Setting method Open the "Sampling Trace" dialog box. [Debug]  [Sampling Trace]  [Open Sampling Trace] On the "Sampling Trace" window, open a dialog box to configure a setting. [Debug]  [Sampling Trace]  [Trace Setting...] Item Description Reference...
  • Page 148 (b) Trace Count Setting • Total Count: The number of times that data are stored in the memory • Count Before Trigger: The number of data storages to retain before the trigger • Count After Trigger: A value obtained by the "Count Before Trigger" value subtracted from the "Total Count"...
  • Page 149 CHAPTER 3 CPU MODULE FUNCTIONS (5) Online operation of trace data Before execution of a sampling trace, write the created trace setting to the CPU module. [Debug]  [Sampling Trace]  [Write to PLC...] The trace data written to the CPU module can be read. [Debug] ...
  • Page 150 (c) Execution of a trigger After completing a trace, execute a trigger. [Debug]  [Sampling Trace]  [Execute Manual Trigger] After a trigger is completed, trace results are displayed on "Sampling Trace" window. The sampling trace can be performed from other stations in the network or serial communication modules. Note that these functions cannot be simultaneously performed from several sites.
  • Page 151 CHAPTER 3 CPU MODULE FUNCTIONS (f) Performing online change during execution of sampling trace The trace point or trigger point is specified by the step number: The sampling trace is suspended but the online change is normally performed. (If neither of them is specified other than by step No., both the online change and sampling trace can be performed.) (g) Performing sampling trace during online change The trace point or trigger point is specified by the step number: The online change is completed normally but...
  • Page 152: Realtime Monitor Function

    ● Before executing this function, check the versions of the CPU module and GX LogViewer used. ( Page 376, Appendix 2) ● The L02SCPU and L02SCPU-P do not support this function. ● For details on the realtime monitor function, refer to the following.
  • Page 153: Writing Programs In Run Status

    CHAPTER 3 CPU MODULE FUNCTIONS 3.22 Writing Programs in RUN Status There are two types of writing programs to the CPU module while it is in the RUN status. • Online change (ladder mode) ( Page 151, Section 3.22.1) • Online change (files) ( Page 152, Section 3.22.2) To perform from multiple programming tools, use a pointer so that data are relatively written to the CPU module.
  • Page 154: Online Change (Files)

    3.22.2 Online change (files) The files listed in the following table are batch-written to the CPU module. : Can be written, : Cannot be written while the file is being accessed in the program, : Cannot be written File name Program memory Standard RAM Standard ROM...
  • Page 155: Precautions For Online Change

    CHAPTER 3 CPU MODULE FUNCTIONS 3.22.3 Precautions for online change (1) Effect on the scan time Performing change increases scan time. ( Page 385, Appendix 3.2) (2) Online change during boot operation Even if the online change is executed, the status of boot source program is not changed. (3) Operations prohibited during online change Do not perform power-off or reset to the CPU module when changing the TC setting value or transferring data to the program memory during online change.
  • Page 156 (b) SCJ instruction When the SCJ instruction is used within the program targeted for online change and the execution condition of the instruction is on at the completion of online change, the program jumps to the specified pointer without waiting for one scan. Online change completed [ SCJ P0 ]...
  • Page 157 CHAPTER 3 CPU MODULE FUNCTIONS (c) STMR instruction Note that when the STMR instruction is used within the program targeted for online change, the instruction is executed. The STMR instruction will be executed because the data in the ladder block has been changed online. Adding M10 online STMR M100...
  • Page 158 With "Execute fall instruction" selected for in the Options dialog box of the programming tool, the fall instruction is executed when the instruction is in the data written to the CPU module in the RUN status, even if the execution condition (on  off) is not met.
  • Page 159 (5) Automatic data transfer to the program memory The automatic data transfer to the program memory requires time obtained from the following formula. • L02SCPU, L02SCPU-P: (Scan time (s))  120.0 + 1.2 (s) • L02CPU, L02CPU-P: (Scan time (s))  170.0 + 1.0 (s) •...
  • Page 160: Debug From Multiple Programming Tools

    3.23 Debug from Multiple Programming Tools This function allows debugging from multiple programming tools connected to a module such as a CPU module or serial communication module. The following table shows combinations of the debug function executable from multiple programming tools. : Can be simultaneously performed, : Can be simultaneously performed but partially restricted, : Can not be simultaneously performed Function executed later Program monitor list,...
  • Page 161: Simultaneous Monitoring From Multiple Programming Tools

    CHAPTER 3 CPU MODULE FUNCTIONS 3.23.1 Simultaneous monitoring from multiple programming tools Creating a user setting system area allows high-speed monitoring from multiple programming tools (Setting a monitoring file for the host station is not required). Monitoring target Programming tool Programming tool However, since the system area is stored in the program memory, the storage area is reduced by the system area size.
  • Page 162: Online Change From Multiple Programming Tools

    3.23.2 Online change from multiple programming tools To perform online change from multiple programming tools, select "Execute online change based on relative step No.". Personal computer A Personal computer B Programming tool Programming tool (1) Online change based on relative step No. Open the "Options"...
  • Page 163: Self-Diagnostic Function

    CHAPTER 3 CPU MODULE FUNCTIONS 3.24 Self-Diagnostic Function This function allows the CPU module to diagnose itself to check for errors. This function aims to preventive measures and prevention of malfunction of the CPU module. (1) Self-diagnostic timing When an error occurs at power-on or during the RUN or STOP status of the CPU module, the error is detected and displayed by the self-diagnostic function, and the CPU module stops an operation.
  • Page 164 (4) CPU module operation at error detection When an error is detected by the self-diagnostic function, the CPU module operates according to the specified operation mode. • Mode that stops CPU module operation ("Stop"): The output mode setting in the detailed setting CPU module operation (from the "I/O Assignment"...
  • Page 165 CHAPTER 3 CPU MODULE FUNCTIONS (6) Self-diagnostics list : Self-diagnostics is performed. : Self-diagnostics is not performed. LED status Availability Diagnostics Error message Diagnostic timing module of self- ERR. status diagnostics  CPU error CPU UNIT DOWN • Always Stop Flashing END instruction not END NOT...
  • Page 166 LED status Availability Diagnostics Error message Diagnostic timing module of self- ERR. status diagnostics  Backup error RESTORE ERROR • Power-on/reset Stop Flashing Memory card operation • Insertion/removal of the Flashing ICM.OPE. ERROR Stop/Continue Off/On  memory card error • Power-on/reset File setting error FILE SET ERROR •...
  • Page 167 CHAPTER 3 CPU MODULE FUNCTIONS LED status Availability Diagnostics Error message Diagnostic timing module of self- ERR. status diagnostics  Watchdog error supervision WDT ERROR • Always Stop Flashing CPU error Program timeout PRG.TIME OVER • Always Continue  • Power-on/reset •...
  • Page 168: Error Clear

    3.25 Error Clear Continuation errors can be selected by user to clear them by error type. Continuation Continuation No continuation error occurred. error occurred. error Continuation error occurred. BATTERY ERROR Remove the error cause and clear the error. DISPLAY ERROR OPERATION ERROR Programming tool Select an error to clear (check all that apply).
  • Page 169 CHAPTER 3 CPU MODULE FUNCTIONS (a) Programming tool Perform the following procedure. On the "PLC Diagnostics" dialog box, check the continuation errors that have been detected.  Remove the error cause of the continuation errors.  Select the "Continuation Error Information" radio button and checkboxes of the errors to clear, and click the button.
  • Page 170 (b) SM and SD Perform the following procedure. In SD81 and SD82, check the continuation errors that have been detected. b12 b11 b8 b7 b4 b3 SD81 SP.UNIT DOWN AC/DC DOWN BATTERY ERROR FLASH ROM ERROR SP.UNIT ERROR ICM.OPE.ERROR FILE OPE.ERROR REMOTE PASS.FAIL SNTP OPE.ERROR DISPLAY ERROR...
  • Page 171: Led Control Function

    CHAPTER 3 CPU MODULE FUNCTIONS 3.26 LED Control Function Whether to turn off the LED after an error and whether to indicate an error or not (on/off) can be set. 3.26.1 Methods for turning off the LEDs The LEDs can be turned off by the following operations. : Applicable, : Not applicable Relevant LED How to turn off...
  • Page 172: Led Indication Priority

    3.26.2 LED indication priority The LED indication is determined according to the factor number in SD207 to SD209 (LED indication priority). The LED indication can be disabled (off). Factor number value 12 11 0 bit 0 bit SD207 Priority 4 Priority 3 Priority 2 Priority 1...
  • Page 173: Module Error Collection Function

    CHAPTER 3 CPU MODULE FUNCTIONS 3.27 Module Error Collection Function This function collects errors occurred in the connected intelligent function modules in the CPU module. By storing the errors in a memory that can hold data in the event of power failure, the errors can be held even after power-off or reset. Error history (CPU module including built-in I/O and built-in CC-Link) and error log (intelligent function module) are displayed on one screen.
  • Page 174 (4) Setting procedure On the "PLC RAS" tab, select "Collection of intelligent function module error histories is valid." in the "Module Error History Collection (Intelligent Function Module)" area. Project window  [Parameter]  [PLC Parameter]  [PLC RAS] Select any one option button. Deselected parameters remain unavailable.
  • Page 175 CHAPTER 3 CPU MODULE FUNCTIONS (5) Monitoring module errors To check the collected errors, open the "Error History" dialog box. [Diagnostics]  [System Monitor...]  [System Error History] Item Description Remarks  Displays error code numbers. Error Code Displays the year, month, day, hour, minute, and second when an error The year can be displayed within the range of Date and Time occurred.
  • Page 176 (6) Clearing module error history On the "Error History" dialog box, click the button. [Diagnostics]  [System Monitor...]  [System Error History] Note that the errors displayed in the "Intelligent Module Information" tab are not cleared. The module error history data are cleared when the standard RAM is formatted. Note that a module error collection file cannot be deleted since it is automatically created after the CPU module is powered off and then on or is reset.
  • Page 177: Latch Data Backup To Standard Rom

    These are sizes when the device assignment is default. Sizes differ depending on parameter settings. (a) File size CPU module Serial number (first five digits) File size (byte) 15101 or earlier 93702 L02SCPU, L02SCPU-P 15102 or later 93710 12111 or earlier 93802 12112 or later 99098...
  • Page 178: Latch Data Backup

    3.28.1 Latch data backup The following two methods are available for backing up latch data to the standard ROM. • By contacts • By remote operation (1) Execution by contacts (a) Setting method Configure the setting for Latch Data Backup Operation Valid Contact. (The devices applicable to a contact are X, M, and B.) Project window ...
  • Page 179 CHAPTER 3 CPU MODULE FUNCTIONS (2) Execution by remote operation (a) Execution method Open a dialog box to execute a remote operation. [Online]  [Latch Data Backup]  [Backup] Data to be backed up are the data at the execution of remote operation. After backup, the BAT.LED of the CPU module flashes (green), indicating that the CPU module is in the standby status ready to be powered off.
  • Page 180 (4) Precautions (a) Power-off and reset of the CPU module during backup The backup data are deleted. Performing power-off of reset of the CPU module causes "RESTORE ERROR" (error code: 2221) and data cannot be restored. (b) Priority of backup data •...
  • Page 181: Restoring Backup Data

    CHAPTER 3 CPU MODULE FUNCTIONS 3.28.2 Restoring backup data Backup data are automatically restored when: • the CPU module is powered off and then on or • the CPU module is reset. Whether to restore data once after backup or per above operation can be set by on/off of SM676. Status of SM676 Restoration operation SM676 = OFF...
  • Page 182: Writing/Reading Device Data To/From Standard Rom

    DEVSTORE.) (a) File size setting The capacity that can be set varies depending on the CPU module. CPU module Setting range L02SCPU, L02SCPU-P, L02CPU, L02CPU-P 1 to 16K points L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, 1 to 512K points L26CPU-PBT (2) Devices that can be written •...
  • Page 183: Module Model Name Read

    CHAPTER 3 CPU MODULE FUNCTIONS 3.30 Module Model Name Read This function reads the model name of a module connected. The connected modules can be identified in a program so that processing for individual module can be performed. LJ71C24-R2 Processing 1 and 2 are performed. LJ71C24 Processing 1 and 3 are performed.
  • Page 184: Cpu Module Change Function With Sd Memory Card

    CPU Module Change Function with SD Memory Card Remark The L02SCPU and L02SCPU-P do not support this function. This function enables to pass data from a module to be changed (disconnected) to the newly-connected CPU module. By using this function, control can be continued after replacing a CPU module. To pass data, backup the data to an SD memory card before replacing a CPU module, and restore them in the newly-connected CPU module before replacing a CPU module.
  • Page 185 CHAPTER 3 CPU MODULE FUNCTIONS (b) Maximum backup data size The following shows the maximum backup data size. (Unit: K byte) L26CPU, L26CPU-P, Backup target data (drive) L02CPU, L02CPU-P L06CPU, L06CPU-P L26CPU-BT, L26CPU- Program memory (drive 0) 1048 Standard RAM (drive 3) Standard ROM (drive 4) 1032 2056...
  • Page 186: Backup To Sd Memory Card

    3.31.1 Backup to SD memory card This function can save data in the CPU module to an SD memory card. If an SD memory card is used in a running system, data can be backed up by replacing the SD memory card with the one for storing a backup data. (1) Procedure Start Before backup start...
  • Page 187 CHAPTER 3 CPU MODULE FUNCTIONS Backup status can be checked in SD690. SD690 value Status Description Before backup start Backup is not started Backup start prepared An SD memory card can be inserted/removed Backup start preparation completed Set data to backup Backup in execution Backup is in execution Backup completed...
  • Page 188 (2) Execution method The following two ways are available for backing up data to SD memory card. • By contacts • By remote operation (a) Execution by contacts Backup is executed by turning on the device specified in the "PLC Module Change Setting" dialog box. Project window ...
  • Page 189 CHAPTER 3 CPU MODULE FUNCTIONS Turn on the backup start setup contact and then the backup start contact. Data are not backed up when only the backup start contact is on. Turn on the backup start setup contact. Preparation for backup: 1) Set the CPU module to the STOP status.
  • Page 190 If the backup start contact is turned on while the value in SD690 is 0 (Before backup start) or 1 (Backup start prepared), data are not backed up. If the backup start contact is on before the value in SD690 becomes 2 (Backup start preparation completed), turning off and then on the backup start contact again while the value in SD690 is 2 (Backup start preparation completed) starts backup.
  • Page 191 CHAPTER 3 CPU MODULE FUNCTIONS (b) Execution by remote operation Open the "Create Backup Data for PLC Module Change" dialog box. [Online]  [PLC Module Change]  [Create Backup Data...] Clicking the button displays the backup data size. (A value appears regardless of the CPU module connection status and SD memory card insertion status.) Data size can be checked only when the backup operation was executed by a remote operation.
  • Page 192 (4) Causes of a backup error If backup was not completed, a diagnostic error is not detected. In that case, the error cause is stored in SD689 and the error response is returned to the programming tool. SD689 Error (Backup error response Error cause factor) value...
  • Page 193 CHAPTER 3 CPU MODULE FUNCTIONS (5) Functions that cannot be performed during backup The following functions cannot be executed during backup. Category Function Category Function Format PLC memory Online change (ladder mode) Drive operation Program memory batch download Online change (files) Online change Arrange PLC memory Online change (multiple blocks)
  • Page 194: Backup Data Restoration

    3.31.2 Backup data restoration This function restores backup data in an SD memory card to the CPU module. (1) Procedure • Restoration by remote operation • Automatic restoration Start Start* 1: Before restoration start 1: Before restoration start Insert the SD memory card storing Insert the SD memory card storing the backup the backup data to the CPU module data to the CPU module and power off and then...
  • Page 195 CHAPTER 3 CPU MODULE FUNCTIONS (2) Execution method The following two methods are available for restoring backup data. • Remote operation • Automatic restoration (a) Execution by remote operation Open the "Restoration execution from backup data" dialog box. [Online]  [PLC Module Change]  [Restore...] To validate restored data, click "Yes"...
  • Page 196 (3) LEDs indicating restoration status Restoring status can be checked by LED indication as shown below. SD693 value Restoration status LED indication Before restoration start MODE: On (green) The color changes at intervals of 800ms as follows. 1) MODE: Flash (orange), BAT.: On (green) ...
  • Page 197 CHAPTER 3 CPU MODULE FUNCTIONS (5) Functions that cannot be performed during restoration Functions that cannot be performed during restoration are the same as those cannot be performed during backup. ( Page 191, Section 3.31.1 (5)) (6) Precautions (a) When boot settings are configured If any parameter in the SD memory card has been set for booting, the data are overwritten according to the boot setting even restoration is executed.
  • Page 198: Clock Function

    3.32 Clock Function This function is used for clock data management, such as storing a date into the error history, by reading internal clock data of the CPU module. Clock data are retained the battery of a CPU module even after power-off or a momentary power failure is occurred exceeding the allowable period of time.
  • Page 199 CHAPTER 3 CPU MODULE FUNCTIONS (c) SM and SD Store clock data in SD210 to SD213. After the END processing for the scan where SM210 (Clock data set request) were turned on from off, write the values stored in SD210 to SD213 to the CPU module. (d) Program Use an instruction to write clock data (DATEWR).
  • Page 200: Battery Life-Prolonging Function

    3.33 Battery Life-Prolonging Function This function extends battery life of the CPU module by limiting data to retain by a battery to clock data only. The use of this function initializes all data other than the clock data when the CPU module is powered off or is reset. Data retained by a battery Description Error history...
  • Page 201: Memory Check Function

    CHAPTER 3 CPU MODULE FUNCTIONS 3.34 Memory Check Function This function checks that data in the memories of the CPU module are not changed due to such as excessive electric noise. Since the CPU module automatically checks a memory, setting for enabling this function is unnecessary. This function does not require processing time.
  • Page 202: Program Cache Memory Auto Recovery Function

    3.35 Program Cache Memory Auto Recovery Function This function is to restore the error location automatically by using data in the program memory, which are stored in the flash ROM, when the memory check function ( Page 199, Section 3.34) detects an error in the program cache memory.
  • Page 203 CHAPTER 3 CPU MODULE FUNCTIONS To match the data in the program memory and those in the program cache memory, configure the setting to transfer the data of the program cache memory to the program memory from "Options" screen. ( Page 157, Section 3.22.3 (5)) [Tool] ...
  • Page 204: Project Data Batch Save/Load Function

    SD memory card Data in the SD memory card SD memory card System file Remark Before executing this function, check the version of the CPU module used. ( Page 376, Appendix 2) The L02SCPU and L02SCPU-P do not support this function.
  • Page 205: Batch Save

    CHAPTER 3 CPU MODULE FUNCTIONS 3.36.1 Batch save This function saves data (such as program file and parameter file) in the CPU module to an SD memory card using a display unit. (1) Execution method The function can be executed using a display unit. For the operating method of the display unit, refer to  Page 280, Section 4.7.3.
  • Page 206 (b) Folder structure The following shows the folder structure in the SD memory card. Batch save/ load target data Save folder SaveLoad 20120401_00 MAIN.QPG PARAM.QPA SVLDINF.QSL Batch save/ load target data Save folder 20120401_01 MAIN.QPG PARAM.QPA SVLDINF.QSL (3) Target drives and data (a) Target drives The following drives are targeted.
  • Page 207 CHAPTER 3 CPU MODULE FUNCTIONS (b) Target data The following table lists save-target data. : Saved, : Not saved File name and extension (any given File type Save status name for ***) Parameter PARAM.QPA   Intelligent function module parameter IPARAM.QPA ...
  • Page 208 (4) Batch save status The batch save status can be checked in SD635 (Project data batch save status). SD635 value Batch save status Description Batch save not executed The batch save function is not executed. Batch save being executed The batch save function is being executed. Batch save completed The batch save processing is completed successfully.
  • Page 209 CHAPTER 3 CPU MODULE FUNCTIONS (6) Precautions (a) Precautions for executing the function simultaneously with another function • The batch save function cannot be executed while any of the following function is being executed. If executed, an error occurs. • Latch data backup to standard ROM •...
  • Page 210 (7) Editing data Data saved in the SD memory card by the batch save function can be edited using a programming tool before the data are loaded. For the editing method, refer to the following. Manual for the programming tool used ●...
  • Page 211: Batch Load

    CHAPTER 3 CPU MODULE FUNCTIONS 3.36.2 Batch load This function reads the data saved in an SD memory card to the CPU module. The following two methods are available to execute the function. • Batch load using a display unit •...
  • Page 212 (3) Procedure For the execution procedure using a display unit, refer to  Page 281, Section 4.7.4. For auto loading, set a desired folder number in SD909 (Auto loading target folder number). To execute auto loading without specifying the folder number, set 0 (default) in SD909. (The load target folder name is "AutoLoad".) The auto loading procedures for each case are described below.
  • Page 213 CHAPTER 3 CPU MODULE FUNCTIONS (4) Operation when the file password 32 is set The following table shows the load availability when the file password 32 is set to the load-source or load- destination file. : Loaded, : Not Loaded Load-destination file Password of load- Password match...
  • Page 214 (6) Causes of a batch load error When the batch load processing has failed, the error cause is stored in SD636 (Project data batch load error cause). When the batch load function is executed using a display unit, an error message is displayed on the display unit. SD636 value Description The model of the load-destination CPU module is different from that of the load-source CPU module.
  • Page 215 CHAPTER 3 CPU MODULE FUNCTIONS When the auto loading processing has failed, "LOAD ERROR" (error code: 2240 to 2248) occurs. Error code Error message Error cause 2240 The model of the load-destination CPU module is different from that of the load-source CPU module. 2241 Reading data from the SD memory card has failed.
  • Page 216 (c) Precautions for editing data • If a file in the load-target folder is deleted, the function corresponding to the deleted file cannot continue the same execution status after data are loaded. • If a system file (SVLDINF.QSL) in a data folder is deleted, the corresponding folder cannot be loaded. Do not delete the system file of the load target folder.
  • Page 217: Predefined Protocol Function

    CHAPTER 3 CPU MODULE FUNCTIONS 3.37 Predefined Protocol Function This function sends and receives packets predefined by using GX Works2, enabling easy communications with external devices (such as measuring instruments and bar code readers). Data are sent and received by registering the protocol setting data to the CPU module, and executing the program for starting data communications.
  • Page 218: Communications Via Rs-232 And Rs-422/485

    3.37.2 Communications via RS-232 and RS-422/485 The CPU module communicates with external devices via the RS-232 interface of the CPU module, RS-232 adapter, or RS-422/485 adapter. Set protocols required for data communications with external devices using the predefined protocol support function of GX Works2.
  • Page 219 CHAPTER 3 CPU MODULE FUNCTIONS (1) Specifications (a) Transmission specifications The following table lists the transmission specifications. Item Specifications Communication method Full-duplex communication Synchronization method Asynchronous method RS-232 interface of CPU module, RS-232 9600bps, 19200bps, 38400bps, 57600bps, adapter 115200bps Transmission speed 1200bps, 2400bps, 4800bps, 9600bps, 19200bps, RS-422/485 adapter 38400bps, 57600bps, 115200bps...
  • Page 220 (2) Setting method The setting required for using the predefined protocol function is described below. Open the "Predefined Protocol Support Function" screen. [Tool]  [Predefined Protocol Support Function]  [Built-in/Adapter Serial] Create a new file. [File]  [New]  "Add" In the "Add Protocol"...
  • Page 221 CHAPTER 3 CPU MODULE FUNCTIONS Set the items required for data communications. In the "Protocol Detailed Setting" screen, set the communication parameters for the protocol. "Protocol Setting"  screenSelect protocol  [Edit]  [Protocol Detailed Setting] Set the packet configuration. In the "Packet Setting"...
  • Page 222 Write the protocol setting data to the CPU module. In the "Writing Protocol Setting" screen, specify the write-target drive in the CPU module and write the protocol setting data. [Module Read/Write]  [Write to Module] The written protocol setting data will be enabled when •...
  • Page 223 CHAPTER 3 CPU MODULE FUNCTIONS Write the program to the CPU module. [Online]  [Write to PLC] Execute the program written to the CPU module by using the S(P).CPRTCL instruction. For the protocol setting method, refer to the following. GX Works2 Version 1 Operating Manual (Intelligent Function Module)
  • Page 224 (3) Setting items of the predefined protocol support function (a) Communication type There are three protocol communication types: "Send", "Receive", and "Send & Receive". For details on the protocol communication types, refer to the following. MELSEC-L Serial Communication Module User's Manual (Basic) (b) Packet elements set for "Packet Setting"...
  • Page 225 CHAPTER 3 CPU MODULE FUNCTIONS (4) Setting items of "Adapter Serial Setting" or "Built-in Serial Setting" Setting items of "Adapter Serial Setting" or "Built-in Serial Setting", (items required for data communications using the predefined protocol function) are described below. For other setting items, refer to the following. Page 353, Appendix 1.2 (a) Select function Select "Predefined Protocol".
  • Page 226 (5) S(P).CPRTCL instruction This instruction sends and receives packets set by the predefined protocol support function of GX Works2. Usage of the S(P).CPRTCL instruction is the same as that of the G(P).CPRTCL instruction for the serial communication module, except for some differences. For the G(P).CPRTCL instruction, refer to the following. MELSEC-L Serial Communication Module User's Manual (Basic) The following are the differences.
  • Page 227 CHAPTER 3 CPU MODULE FUNCTIONS (7) Enabling/disabling echo back of RS-422/485 adapter When data are communicated via RS-485 (two-wire type) in the RS-422/485 adapter, the sent data can be echoed back to the RDA and RDB of own station. The echo back status (receiving the sent data or not (discard the data)) can be specified. Sending data RS-422/485 Target device...
  • Page 228 (8) Operation image and data structure of the predefined protocol function For operation image and data structure of the predefined protocol function, refer to the following. (Read the C24 (serial communication module) as the CPU module.) MELSEC-L Serial Communication Module User's Manual (Basic) (9) Precautions (a) To use two predefined protocol functions simultaneously (Ethernet or RS- 232/422/485)
  • Page 229: Serial Communication Function

    CHAPTER 3 CPU MODULE FUNCTIONS 3.38 Serial Communication Function This function communicates data using the MC protocol by connecting the RS-232 interface of the CPU module, the RS-232 adapter, or the RS-422/485 adapter to the following devices. • MC protocol-compatible devices •...
  • Page 230 (1) Specifications (a) Transmission specifications The following table lists the transmission specifications used for the serial communication function. Check that the specifications of the personal computer or HMI from other companies used match those in the following table. Item Setting range Default ...
  • Page 231 CHAPTER 3 CPU MODULE FUNCTIONS (2) Commands The following table lists the MC protocol commands that can be executed. Number of Function Command Description of processing processing points In units of • ASCII: 3584 points 0401 (001) Reads out a bit device in units of one point. bits •...
  • Page 232 (3) Accessible devices The following table lists accessible devices with the serial communication function. Device code Classification Device Device number range ASCII Binary   Function input Hexadecimal   Function output (Cannot be accessed) Hexadecimal Internal system   Function register Decimal device...
  • Page 233 CHAPTER 3 CPU MODULE FUNCTIONS (4) Setting transmission specifications Set the transmission specifications of the serial communication function in the "Built-in Serial Setting" or "Adapter Serial Setting" tab of the PLC parameter dialog box. ( Page 353, Appendix 1.2) • Set "Serial Communication" to the "Select Function" in the "Built-in Serial Setting" or "Adapter Serial Setting" tab.
  • Page 234 (5) Precautions (a) Switching a connection from an HMI from other companies to a programming tool A connection device can be switched from a personal computer or an HMI from other companies to a programming tool during communication. However, this operation causes a communication error in the personal computer or HMI.
  • Page 235 CHAPTER 3 CPU MODULE FUNCTIONS (6) Error codes during communication with the serial communication function The following table lists the error codes (together with their descriptions and corrective actions) sent from the CPU module to the external device when an error occurs during communication using the serial communication function.
  • Page 236: Iq Sensor Solution Function

    ● Before using this function, check the versions of the CPU module and the programming tool used. ( Page 376, Appendix 2) ● The L02SCPU and L02SCPU-P do not support this function. ● For details on iQ Sensor Solution functions, refer to the following.
  • Page 237 CHAPTER 3 CPU MODULE FUNCTIONS Memo...
  • Page 238: Chapter 4 Display Unit Functions

    Error information/log display Scan time display Remark The L02SCPU and L02SCPU-P do not support the display unit functions. (1) Description of the buttons Unless otherwise specified, buttons on a display unit operate as follows. Type...
  • Page 239 CHAPTER 4 DISPLAY UNIT FUNCTIONS (2) Menu structure Functions can be selected in the "function selection" screen. In screen figures, the Japanese version is shown on the left and the English version on the right. Switch a displayed language by language setting. ( Page 283, Section 4.8.1) The menu structure is as shown below.
  • Page 240 (3) Standby screen The standby screen is the initial screen of the display unit. The screen displays year, month, day, day of the week, hour, minute, and second. The internal time of the CPU module is automatically read to the display unit. Pressing any button moves you to the "function selection"...
  • Page 241 CHAPTER 4 DISPLAY UNIT FUNCTIONS (6) Level navigation To clear where you are, level navigation is displayed on the top of the screen. The level navigation is inverted and the selected menu flashes. Parent menu Current menu Note that level navigation is not displayed in the detail setting screen of each function. (7) Scrolling When the display screen consists of several pages, the title line is displayed.
  • Page 242: Function List

    Function List The following table lists the functions of a display unit. Displayed Category Function name Description Reference function name Page 241, Device monitor/test DEV MON/TEST Monitors and tests device memory values. Section 4.2.1 Device memory clear DEVICE MEMORY Clears all device memory values. Device Page 249, Clears values of file register including extended...
  • Page 243: Cpu Monitor/Test

    CHAPTER 4 DISPLAY UNIT FUNCTIONS CPU Monitor/Test System status can be checked and device values can be changed with the display unit. The CPU monitor/test includes the following functions. • Device monitor/device test • Device clear • Forced on/off • Scan time monitor •...
  • Page 244 (2) Devices that can be monitored/tested The following shows devices that can be monitored and tested by device monitor/test. Note that local devices cannot be monitored and tested. Type Device Bit device X, Y, M, L, B, F, SB, V, SM, T (contact, coil ), ST (contact, coil ), C (contact, coil D, D (extended data register), W, W (extended link register), SW, SD, Z, R, ZR, T (current value), ST (current...
  • Page 245 CHAPTER 4 DISPLAY UNIT FUNCTIONS (4) Display format The following table shows display format available for device monitor/test. Numeric Format Bit display Remarks value Decimal A sign is appended for negative values only. 16-bit integer Available Hexadecimal When a value is less than four digits, "0" is assigned for the remaining digits. Decimal A sign is appended for minus values only.
  • Page 246 (b) Specifying a device comment *1*2*3 To display a device with device comment, perform the following operation. "Device monitor" screen Press the  button twice.  "Device comment display selection" screen Select "DSP DEV COMMENT" using the  and  buttons and press the button.
  • Page 247 CHAPTER 4 DISPLAY UNIT FUNCTIONS (5) Device monitor A device specified in (3) in this section can be monitored from the "device monitor" screen. Depending on update timing of a screen, the update of a value displayed in the "device monitor" screen may delay accordingly.
  • Page 248 (c) Monitoring a bit device (display format: 32-bit integer) The specified device, and display format and a value of the specified device can be monitored. The device number can be changed by 1 word (16 bits) with the buttons. Display format Device value Bit position counted from the specified device...
  • Page 249 CHAPTER 4 DISPLAY UNIT FUNCTIONS (f) Monitoring a real number (double precision) The specified device, and display format and a value of the specified device can be monitored. The device number can be changed by 1 word (16 bits) with the buttons.
  • Page 250 (6) Device test On/off status of a bit device and a word device value can be changed. "Device monitor" screen Press the button.  "Device test check" screen Select a device using the  and  buttons. (a (Bit device) device value is changed by 1 bit for bit device and 1 word for word device) and press the button.
  • Page 251: Device Clear

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 4.2.2 Device clear Device memory values and file register values can be cleared with the display unit. The device clear includes the following functions. • Device memory clear • File register clear Device clear can be executed while the CPU module is in the STOP or PAUSE status. (1) Screen transition The following shows screen transition of device clear.
  • Page 252 (3) Operating procedure The following is the procedure for clearing data. "Device clear" screen Select "DEVICE MEMORY" or "FILE REGISTER" using the  and  buttons and press the button.  "Latched device memory clear selection" screen Select whether to clear the values of devices within latch range using the ...
  • Page 253: Forced On/Off

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 4.2.3 Forced on/off X and Y devices can be forcibly turned on or off with the display unit. The forced on/off includes the following functions. • Forced on/off registration • Forced on/off clear • Forced on/off batch clear •...
  • Page 254 (2) Forced on/off registration Specify a device (X or Y) and whether to turn on or off the specified device. The specified device and device status are registered in a list. Devices that have already been registered can be reset. Up to 32 devices can be registered.
  • Page 255 CHAPTER 4 DISPLAY UNIT FUNCTIONS (3) Forced on/off clear Registered devices are cleared one by one. Perform the following operation from the "forced on/off clear" screen. "Forced on/off clear" screen Select a device to be cleared using the  and  buttons.
  • Page 256: Scan Time Monitor

    4.2.4 Scan time monitor The current value, maximum value, and minimum value of scan time can be checked with the display unit. Values stored in the special register of the CPU module are displayed. Displayed item Special register Description Current value SD520, SD521 Current scan time Maximum value...
  • Page 257: Built-In I/O Function Monitor

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 4.2.5 Built-in I/O function monitor I/O status and setting values of the built-in I/O function can be checked with the display unit. Also, errors detected during execution of the built-in I/O function can be cleared. The built-in I/O monitor includes the following functions.
  • Page 258 (2) Built-in positioning function monitor The setting values of the built-in positioning function can be monitored. (a) Displayed items The following items are displayed. Displayed item Description Setting range Position (p) Positioning range -2147483648 to 2147483647 pls Velocity (v) Speed command (speed limit value) 0 to 200000 pps Data No.
  • Page 259 CHAPTER 4 DISPLAY UNIT FUNCTIONS (b) Operating procedure The following is the procedure for monitoring the values. "High-speed counter function - monitor CH selection" screen Select "CH1" or "CH2" using the  and  buttons and press the button.  "High-speed counter function - monitor target selection"...
  • Page 260 (4) Built-in I/O function error clear An error can be cleared by specifying an axis of the positioning function or CH (channel) of the high-speed counter function. "Built-in I/O function error clear - axis/CH selection" screen Select the target item using the  and  buttons and press the button.
  • Page 261: Error Display/Clear

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 4.2.6 Error display/clear The current and past errors and their information can be checked with the display unit. Also, the current error can be cleared. The error display/clear includes the following functions. • Current error monitor •...
  • Page 262 (2) Current error monitor The information of latest and current CPU module error (including an annunciator) can be checked. The current error monitor includes the following screens. • "Error information" screen • "Error common information" screen • "Error individual information" screen (a) Error information If an error occurs, the following information is displayed.
  • Page 263 CHAPTER 4 DISPLAY UNIT FUNCTIONS (c) Error individual information If an error occurs, the following information is displayed. Current page/number of pages Error individual information The following items are displayed in the "error individual information" screen. Error individual Error individual Description Description information...
  • Page 264 (4) Error clear Continuation errors can be cleared with the display unit. Remove the error cause before clearing an error. For how to remove error causes, refer to the following. MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection) (a) Operating procedure The following is the procedure for clearing the error.
  • Page 265: Cpu Settings

    CHAPTER 4 DISPLAY UNIT FUNCTIONS CPU Settings The internal time of the CPU module can be checked and changed with the display unit. 4.3.1 Clock setting The internal time of the CPU module can be set. (1) Screen transition The following shows screen transition of clock setting. "Function selection"...
  • Page 266 (3) Operating procedure The following is the procedure for setting the clock data. "Clock setting" screen Move the cursor using the  and  buttons, increase or decrease a time value using the  and  buttons, and press the button.
  • Page 267: Module Monitor/Test

    CHAPTER 4 DISPLAY UNIT FUNCTIONS Module Monitor/Test The buffer memory values of intelligent function modules (including the LCPU with the built-in CC-Link function) can be checked and changed with the display unit. The values of MELSEC-AnS/QnAS series modules mounted on the LA1S extension base unit cannot be checked. 4.4.1 Buffer memory monitor/test Buffer memory values can be monitored and tested.
  • Page 268 (2) Specifying a module A module to be monitored or tested is specified by the following ways. • Start I/O No. specification • Module selection (a) Start I/O No. specification Perform the following operation. "Module monitor/test_start I/O No. specification" screen Move the cursor using the ...
  • Page 269 CHAPTER 4 DISPLAY UNIT FUNCTIONS (3) Specifying a buffer memory address Specify the buffer memory address of the module selected in (2) in this section. Perform the following operation. "Module monitor/test" screen Press the button.  "Buffer memory address input format selection" screen Select the input format of a buffer memory address using the ...
  • Page 270 (5) Specifying a device comment * 1*2 To display a device with device comment, perform the following operation. "Buffer memory monitor" screen Press the  button.  "Device comment display selection" screen Select "DSP DEV COMMENT" using the  and  buttons and press the button.
  • Page 271 CHAPTER 4 DISPLAY UNIT FUNCTIONS (7) Buffer memory test A buffer memory value can be changed. "Buffer memory monitor" screen Press the button.  "Buffer memory test value check" screen Select the target address using the  and  buttons and press the button.
  • Page 272: Module Settings

    Module Settings Values set to intelligent function modules can be checked and changed with the display unit. 4.5.1 Initial setting change The initial setting value of an intelligent function module can be changed. The changed value is reflected to the CPU module after any of the following operations are performed. •...
  • Page 273 CHAPTER 4 DISPLAY UNIT FUNCTIONS (1) Screen transition The following shows screen transition of initial setting change. "Function selection" screen "Module settiong_module specification" screen "Module setting_start I/O No. specification" screen "Module setting_module selection" screen "Initial setting change" screen Levels lower than the "initial setting change" screen depend on intelligent function module used. Manual for the intelligent function module used...
  • Page 274 (2) Registering/canceling display unit menu To change an initial setting value with the display unit, write a menu definition file to the CPU module. Select the * 1*2*3 standard ROM or an SD memory card as a storage location. [Online]  [Register/Cancel Display Module Menu...] GX Developer cannot write menu definition files.
  • Page 275: User Message

    CHAPTER 4 DISPLAY UNIT FUNCTIONS User Message Executing User message instruction (UMSG) displays a user message on the display unit. User messages are user- defined messages for display unit. When the module receives a message during function execution, the message is displayed on the display unit. Executing user message instruction (UMSG) will issue a user message.
  • Page 276: Memory Card Operation

    Memory Card Operation File operations between the CPU module and an SD memory card can be performed with the display unit. The memory card operation includes the following functions. • File list/delete ("FILE LIST/DEL") • Free space check ("FREE SPACE") •...
  • Page 277 CHAPTER 4 DISPLAY UNIT FUNCTIONS (2) Displaying a list Folders and files stored in an SD memory card are displayed on the "File list" screen. • For folder names, ">" is displayed at right of the name. • A display unit displays information of 100 folders and files at a time. If there is information of more than 100 folders and files, "NEXT"...
  • Page 278 (3) Displaying the time stamp and size The time stamp and size of folders and files stored in an SD memory card are displayed. Folder/file name Time stamp Size (a) Operating procedure The following is the procedure for displaying the time stamp and size information. "File list"...
  • Page 279 CHAPTER 4 DISPLAY UNIT FUNCTIONS (4) Deleting a folder or file Folders and files stored in an SD memory card are deleted. (a) Operating procedure The following is the procedure for deleting a folder or file. "File list" screen Select a folder or file using the  and  buttons in the "File list"...
  • Page 280 (b) Precautions The following online functions cannot be executed while a folder or file is being deleted. If executed, an error response is returned to the request source Category Function Format PLC memory Clear PLC memory (Clear all file registers) Drive operation Write title Arrange PLC memory...
  • Page 281: Free Space Display

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 4.7.2 Free space display The free space on the SD memory card that is inserted to the CPU module can be displayed with the display unit. (1) Operating procedure The following is the procedure for displaying the free memory space. "Memory card operation menu"...
  • Page 282: Batch Save

    4.7.3 Batch save Data (such as program file and parameter file) in the CPU module can be saved into an SD memory card. (1) Operating procedure The following is the procedure for batch-saving data. "Memory card operation menu" screen Select "BATCH SAVING" using the  and  buttons and press the button.
  • Page 283: Batch Load

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 4.7.4 Batch load Data saved in the SD memory card by the batch save function can be read to the CPU module. This function can be executed only when the CPU module is in STOP status. (1) Operating procedure The following is the procedure for batch-loading data.
  • Page 284 "Batch load completion" screen When the processing is completed successfully, either of the screens shown left appears. To return to the "Memory card operation menu" screen, press the button. The program memory, standard RAM, and standard ROM are formatted. The SD memory card is not formatted. The following items are displayed on the "Batch loading"...
  • Page 285: Options

    CHAPTER 4 DISPLAY UNIT FUNCTIONS Options The display format and basic settings of the display unit can be configured under the "OPTIONS" menu selected from * 1*2 the "function selection" screen. The option settings can be backed up to the CPU module without a battery. The pop-up setting is not backed up.
  • Page 286: Contrast Adjustment

    4.8.2 Contrast adjustment Tone of displayed characters can be set. (1) Setting range Tone can be selected from 0 (light) to 9 (dark). (default: 3) (2) Operating procedure Perform the following operation. "Options" screen Select "CONTRAST" using the  and  buttons and press the button.
  • Page 287: Lighting Period Setting

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 4.8.3 Lighting period setting The lighting period of the backlight on the display unit can be set. (1) Setting range The following shows periods that can be set. (default: 5MIN) • 1MIN • 3MIN • 5MIN •...
  • Page 288: Pop-Up Display

    4.8.4 Pop-up display A pop-up screen showing a user message ( Page 273, Section 4.6) can be enabled. (1) Operating procedure Enable pop-up display by the following operation. "Options" screen Select "POPUP" using the  and  buttons and press the  button. ...
  • Page 289: Part 3 Devices, Constants

    PART 3 DEVICES, CONSTANTS In this part, the devices and constants used in the CPU module are described. CHAPTER 5 DEVICES ..........288 CHAPTER 6 CONSTANTS .
  • Page 290: Chapter 5 Devices

    CHAPTER 5 DEVICES This chapter describes the devices that can be used in the CPU module. Device List The following table shows the devices used in the CPU module and applicable ranges. Default Parameter- Classification Type Device name Reference set range Points Range Page 293,...
  • Page 291 Section 5.12.3 The number of points for the L02SCPU, L02SCPU-P, L02CPU, and L02CPU-P are 32K points (D12288 to D45055). The number of points that can be actually used varies depending on the intelligent function module. Manual for the intelligent function module used The range for the L02SCPU, L02SCPU-P, L02CPU, and L02CPU-P is 0 to 64K in total.
  • Page 292: Internal User Devices

    Internal User Devices Internal user devices can be used for various user applications. (1) Points for internal user devices Set the number of device points to be used. Project window  [Parameter]  [PLC Parameter]  [Device] When changing device points, note the following. •...
  • Page 293 CHAPTER 5 DEVICES ● When changing device points, the following refresh ranges must not exceed the corresponding device ranges. • Link refresh with CC-Link IE Field Network master/local module • Link refresh with CC-Link IE Field Network Basic • Auto refresh with CC-Link •...
  • Page 294 (3) Device point assignment example The following table shows device point assignment examples based on the device point assignment sheet in Appendix.6. Restriction check Number of device point Numeric Device name Symbol notation Points Range Size (words) Points (bits)  16 1 8K (8192) X0000 to X1FFF...
  • Page 295: Input (X)

    CHAPTER 5 DEVICES 5.2.1 Input (X) Inputs are the device used to obtain the on and off information from external devices to a CPU module. Push-button switch CPU module Selector switch Input (X) Digital switch (1) Concept of input One input point is assumed to be a virtual relay Xn in the CPU module. Programs use the normally open or closed contact of Xn.
  • Page 296: Internal Relay (M)

    5.2.3 Internal relay (M) The internal relay (M) is a device for auxiliary relays used in the CPU module. All of the internal relay are set to off when: • the CPU module is powered off and then on, • the CPU module is reset, or •...
  • Page 297: Annunciator (F)

    CHAPTER 5 DEVICES 5.2.6 Annunciator (F) The annunciator (F) is an internal relay which can be effectively used in fault detection programs for user-created system. Whenever an annunciator is turned on, SM62 turns on and the annunciator number is stored in SD62 to SD79.
  • Page 298 (2) Processing after annunciator on Whenever an annunciator is turned on, SM62 turns on and the following data are stored in SD62 to SD79. The annunciator number in SD62 is registered to the memory for error history storage. 1) Turned-on annunciator numbers are stored in SD64 to SD79 in order.
  • Page 299 CHAPTER 5 DEVICES (4) Processing after annunciator off • Data stored in the special register (SD62 to SD79) when the annunciator is turned off with the RST F or BKRST instruction SET F50 SET F25 SET F1023 RST F25 2) If the existing annunciator number in SD64 is SD62 turned off, a new annunciator number stored in SD64 will be stored in SD62.
  • Page 300: Link Special Relay (Sb)

    5.2.7 Link special relay (SB) The link special relay (SB) is a relay that indicates communication status and error detection status of the CC-Link IE Field Network master/local module or the CC-Link system master/local module. The relay is turned on or off according to various factors that occur during data link.
  • Page 301: Step Relay (S)

    CHAPTER 5 DEVICES 5.2.9 Step relay (S) This device is provided for SFC programs. ( MELSEC-Q/L/QnA Programming Manual (SFC)) 5.2.10 Timer (T, ST) Time counting starts when a coil is turned on, and it times out and the contact turns on when the current value reaches the set value.
  • Page 302 (3) Low-speed timer This type of timer measures time in increments of 1 to 1000ms. The default is 100ms (in increments of 1ms) Project window  [Parameter]  [PLC Parameter]  [PLC System] Enter a value. Timer counting starts when its coil is turned on, and the contact is turned on when the current value reaches the set value.
  • Page 303 CHAPTER 5 DEVICES (5) Retentive timer This timer measures the period of time during which the coil is on. The time increment is set in the same manner as the corresponding low- or high-speed timer. • Low-speed retentive timer: Low-speed timer •...
  • Page 304 (6) Timer processing and accuracy (a) Processing When the OUT T or OUT ST instruction is executed, the on/off switching of the timer coil, current value update, and on/off switching of the contact are performed. In the END processing, the current timer value is not updated and the contact is not turned on/off.
  • Page 305 CHAPTER 5 DEVICES (b) Accuracy The value obtained by the END instruction is added to the current value when the OUT T or OUT ST instruction is executed. The current value is not updated while the timer coil is off even if the OUT T or OUT ST...
  • Page 306 (7) Precautions for using timers (a) Use of the same timer Do not use the OUT T or OUT ST instruction that describes the same timer more than once within one scan. If used, the current timer value will be updated by each OUT T or OUT ST instruction execution, resulting in incorrect time measurement.
  • Page 307 CHAPTER 5 DEVICES Make the value of the timer limit setting smaller by changing from low speed timer to high speed timer. (Assume that the scan time is 20ms.) After change (high-speed timer) Before change (low-speed timer) Timer setting value Scan time Timer limit setting Timer setting value...
  • Page 308 When the timer setting value is 2 (2  100ms), the scan time is 110ms, and the timer limit setting is 100ms If the coil of the timer (T0) is turned on at the next scan after the values satisfy "Count at execution of the END instruction ...
  • Page 309 CHAPTER 5 DEVICES Creating an on/off ladder using two timers [Correct program example] Coil of T1 is turned on for one scan after T0 is turned on. Measures for one second after T0 is turned on. Measures for one second when T1 is off. Alternates on and off once every second.
  • Page 310: Counter (C)

    5.2.11 Counter (C) The counter (C) is a device that counts the number of rises for input conditions in programs. When the count value reaches the set value, its contact is turned on. (1) Counter type The following counter is available. •...
  • Page 311 CHAPTER 5 DEVICES (3) Resetting the counter To clear the current value and to turn off the contact of the counter, use the RST instruction. At the time of execution of the RST instruction, the counter value is cleared, and the contact is also turned off. (a) Precautions for resetting the counter Execution of the RST instruction also turns off the coil of counter.
  • Page 312 (4) Maximum counting speed The counter can count only when the on/off time of the input condition is longer than the execution interval of the corresponding OUT instruction. The maximum counting speed is calculated by the following formula: • n: Duty (%) •...
  • Page 313: Data Register (D)

    CHAPTER 5 DEVICES 5.2.12 Data register (D) The data register (D) is a memory in which numeric data (-32768 to 32767, or 0000 to FFFF ) can be stored. (1) Bit structure of the file register (a) Bit structure and read/write unit One point of the data register consists of 16 bits, and data can be read or written in units of 16 bits.
  • Page 314: Link Register (W)

    5.2.13 Link register (W) The link register (W) is a data register with a device number represented in hexadecimal. The area where not used in network parameter can be used as a data register. In the link register, numeric data (-32768 to 32767, or 0000 FFFF ) can be stored.
  • Page 315: Link Special Register (Sw)

    CHAPTER 5 DEVICES 5.2.14 Link special register (SW) The link special register (SW) is a register that stores communication status and error detection status of the CC-Link IE Field Network master/local module or the CC-Link system master/local module. Because the data link information is stored as numeric data, error locations and causes can be checked by monitoring the link special register.
  • Page 316: Internal System Devices

    Internal System Devices Internal system devices are provided for system operations. The allocations and sizes of internal system devices are fixed, and cannot be changed by the user. 5.3.1 Function devices (FX, FY, FD) Function devices are used in subroutine programs with argument passing. Data are read or written between such subroutine programs and calling programs, using function devices.
  • Page 317 CHAPTER 5 DEVICES (c) Function register (FD) The function register is used for data writing or reading between a subroutine program and a calling program. The CPU module auto-detects the input or output conditions of the function register. Source data are input data of the subroutine program.
  • Page 318: Special Relay (Sm)

    5.3.2 Special relay (SM) The special relay (SM) is an internal relay of which details are specified inside the CPU module, and the CPU module status data are stored in this special relay. MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection) 5.3.3 Special register (SD) The special register (SD) is an internal register of which details are specified inside the CPU module, and the CPU...
  • Page 319: Link Direct Devices

    CHAPTER 5 DEVICES Link Direct Devices The link direct device allows direct access to the link device of the CC-Link IE Field Network master/local module. Regardless of the link refresh of the CPU module, the direct reading/writing from/to the link device of the CC-Link IE Field Network master/local module can be done by using a program.
  • Page 320 (3) Specification range The link devices, which are out of the range specified by the refresh parameter, can be specified. (a) Writing Write data within the link device range, which is set as the send range in the Common Parameter of the network parameter and out of the refresh range of the refresh parameter CC-Link IE Field Network master/local module...
  • Page 321 CHAPTER 5 DEVICES (b) Reading The reading of the link device range of the CC-Link IE Field Network master/local module can be done. The writing/reading by the link direct device can be done only for a single CC-Link IE Field Network master/local module per network number.
  • Page 322: Module Access Devices

    Module Access Devices 5.5.1 Intelligent function module device The intelligent function module device allows direct access from the CPU module to the buffer memories of the connected intelligent function modules. (1) Specification method Specify the I/O number and buffer memory address of the intelligent function module. Specification method: Buffer memory address (setting range: 0 to 65535 in decimal) Start I/O number of intelligent function module...
  • Page 323 CHAPTER 5 DEVICES (3) Processing speed The processing speed of the intelligent function module device is as follows: • The processing speed of writing or reading using the intelligent function module device is slightly higher compared with the case of using the FROM or TO instruction. (Example: "MOV U5\G11 D0") •...
  • Page 324: Index Register/Standard Device Register (Z)

    Index Register/Standard Device Register (Z) 5.6.1 Index Register (Z) The index register is used for indirect specification (index modification) in programs. Index modification uses one point of the index register. Specify the index register by one point (16 bits). The index register has 20 points (Z0 to Z19). (1) Bit structure of the index register One point of the index register consists of 16 bits, and data can be read or written in units of 16 bits.
  • Page 325: Standard Device Register (Z)

    CHAPTER 5 DEVICES (3) When using 32-bit index modification For the file register (ZR), extended data register (D), extended link register (W) using the serial number access method, 32-bit index modification using two points of the index register is available. The following two kinds of methods can be used to specify the index register.
  • Page 326: Saving And Restoration Of The Index Register

    5.6.3 Saving and restoration of the index register The CPU module performs the following when switching from the scan execution type program to the interrupt/fixed scan execution type program. • Saving and restoring the index register data • Saving and restoring block numbers of the file register (1) Setting for saving and restoration Configure the setting for saving and restoration using a programming tool.
  • Page 327 CHAPTER 5 DEVICES (b) When "High Speed Execution" is selected 2) If data are written to the index register, the values of the index register used in the scan execution type program will be corrupted at program switching. 1) The CPU module does not save index register 3) The index register values at program switching.
  • Page 328: File Register (R, Zr)

    File Register (R, ZR) These device are provided for extending the data register. 12K points Data register 12K points Data register Data register can be File register extended. (1) Specification methods The following two methods are available. • Block switching method (R) •...
  • Page 329 The standard RAM can store the data up to the following size. Note that, however, if the standard RAM is used other than as the file register, available points are decreased. ( Page 31, Section 2.1) CPU module Points L02SCPU, L02SCPU-P, L02CPU, L02CPU-P L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT 384K...
  • Page 330 Project window  [Parameter]  [PLC Parameter]  [PLC File] Select "Use the following file". Corresponding CPU module File name Capacity memory L02SCPU, L02SCPU-P, L02CPU, L02CPU-P 1 to 64K points Standard RAM Any name L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, 1 to 384K points L26CPU-PBT The total points of the file register (ZR), extended data register (D), and extended link register (W).
  • Page 331 CHAPTER 5 DEVICES (7) Clearing the file register If the Latch (2) is set in the Device tab of the PLC parameter dialog box, the data in the file register are not cleared even if the CPU module is powered off or reset. (Data cannot be cleared by performing a latch clear operation.
  • Page 332: Extended Data Register (D) And Extended Link Register (W)

    Extended Data Register (D) and Extended Link Register The extended data register (D) and extended link register (W) are devices for utilizing the large-capacity file register (ZR) area as an extended area of the data register (D) and link register (W). These devices can be programmed as the data register (D) and link register (W) together with the file register (ZR) area.
  • Page 333 CHAPTER 5 DEVICES (1) Setting method Since the extended data register (D) and extended link register (W) use the file register area, data must be set for both the file register setting and the device setting. (a) File register setting The setting method is the same as when using a file register.
  • Page 334 Once the points for the extended data register (D) and extended link register (W) is set, areas for these devices are reserved in the file register file. Actual area Internal user device Device Points for data register D12287 Data register File register file D12287 D12288...
  • Page 335 CHAPTER 5 DEVICES (2) Precautions (a) Specifying the extended data register (D) and extended link register (W) Since the file register (ZR) area is used, the values of the following items will be the same as those for the file register (ZR).
  • Page 336 (e) Access from an inapplicable module To access the extended data register (D) or extended link register (W) from a module that does not support the use of these devices, device numbers need to be specified with those of the file register (ZR). Calculation formulas for obtaining device numbers of the file register (ZR) to be specified and calculation examples are described below Item...
  • Page 337: Nesting (N)

    CHAPTER 5 DEVICES Nesting (N) Nesting (N) is a device used in the master control instructions (MC and MCR instructions) to program operation conditions in a nesting structure. The master control instruction opens or closes a common ladder gate to efficiently switch the ladder of a program.
  • Page 338: Pointer (P)

    5.10 Pointer (P) The pointer (P) is a device used in jump instructions (CJ, SCJ, or JMP) or subroutine call instructions (such as CALL). Pointers can be used in the following applications. • Specification of the jump destination in a jump instruction (CJ, SCJ, or JMP) and a label (start address of the jump destination) •...
  • Page 339: Local Pointer

    CHAPTER 5 DEVICES 5.10.1 Local pointer The local pointer is a pointer that can be used independently in jump instructions and subroutine call instructions in each program. The same pointer number can be used in respective programs. Program A Program B The same pointer No.
  • Page 340: Common Pointer

    5.10.2 Common pointer The common pointer is used to call subroutine programs from all programs that are being executed. Program A Program C Program B Label To set the common pointer range, enter the start number of the common pointer. The common pointer range is from the specified pointer number to P4095.
  • Page 341: Interrupt Pointer (I)

    CHAPTER 5 DEVICES 5.11 Interrupt Pointer (I) The interrupt pointer (I) is used as a label at the start of an interrupt program, and can be used in any programs. Interrupt pointer (interrupt program label) Interrupt program The number of points available for the interrupt pointer is 256 (I0 to I255). The following shows interrupt factors for the applicable interrupt pointers.
  • Page 342: Other Devices

    5.12 Other Devices 5.12.1 SFC block device (BL) The SFC block is used to check that the specified block in the SFC program is activated. MELSEC-Q/L/QnA Programming Manual (SFC) 5.12.2 I/O No. specification device (U) The I/O No. specification device is used to specify I/O numbers in the intelligent function module dedicated instructions.
  • Page 343: Macro Instruction Argument Device (Vd)

    CHAPTER 5 DEVICES 5.12.3 Macro instruction argument device (VD) The macro instruction argument device (VD) is used with ladders registered as macros. When a VD setting is specified, the value is converted to the specified device when the macro instruction is executed. With the macro instruction argument device, VD0 to VD9 can be used in one macro registration ladder.
  • Page 344: Chapter 6 Constants

    CHAPTER 6 CONSTANTS The following constants can be used in the CPU module. • Decimal constant (K) • Hexadecimal constant (H) • Real number (E) • Character string (" ") Decimal Constant (K) The decimal constant (K) is a device used to specify decimal data in programs. Specify it as K (example: K1234) in programs.
  • Page 345: Real Number (E)

    CHAPTER 6 CONSTANTS Real Number (E) The real number (E) is a device used to specify real numbers in programs. In programs, specify it as E (example: E1.234). ( Page 374, Appendix 1.3) (1) Specification range (a) Real number setting range •...
  • Page 346: Chapter 7 Convenient Usage Of Devices

    CHAPTER 7 CONVENIENT USAGE OF DEVICES When multiple programs are executed in the CPU module, each program can be executed independently by specifying an internal user device as a local device. Devices of the CPU module are classified into the following two types: •...
  • Page 347: Local Device

    CHAPTER 7 CONVENIENT USAGE OF DEVICES Local Device The local device is a device that can be used independently for each program. Using local devices allows programming of multiple independently-executed programs without considering other programs. Note that local device data can be stored in the standard RAM only. If M7000 and higher portion is set as a local device, it can be separately used for each program that is executing M7000 and higher portion.
  • Page 348 (1) Local device setting To use a local device, perform the following procedure. Set a local device range. Project window  [Parameter]  [PLC Parameter]  [Device]  Set a memory for storing the local device file and a file name. Project window ...
  • Page 349 CHAPTER 7 CONVENIENT USAGE OF DEVICES (2) Setting a local device in units of program Use of the local device can be set for each program, and this function can reduce the scan time. Also, since the area for saving and restoring data are not required for the programs not using a local device, the local device file size can be reduced.
  • Page 350 (3) Local devices when executing a subroutine program When executing a subroutine program, the local device in the file where the subroutine program is stored can be used by ON/OFF of SM776. SM776 Operation Perform operations with the local device that corresponds to the source file of the subroutine program. Perform operations with the local device that corresponds to the file where the subroutine program is stored.
  • Page 351 CHAPTER 7 CONVENIENT USAGE OF DEVICES (4) When executing an interrupt/fixed scan execution type program When the local device is used for an interrupt/fixed scan execution type program, turn on SM777 (Enable/disable local device in interrupt program). The programs will not function properly if SM777 is turned off. The index register set as the local device uses the local device area for the program executed before the interrupt/fixed scan execution type program, regardless of the on/off status of SM777.
  • Page 352: Appendices

    APPENDICES Appendix 1 Parameter Setting Appendix 1.1 List of parameter numbers Each parameter number is the value that is stored in the special register (SD16 to SD26) when an error occurs in the parameter settings. The following list indicates the parameter items and corresponding parameter numbers. Parameter No.
  • Page 353 APPX Parameter No. Parameter item Set in: Reference 1100 File Register Page 326, Section 5.7 Page 344, CHAPTER 1101 Comment File Used in a Command 1102 Initial Device Value Page 91, Section 3.5 PLC File 1103 File for Local Device Page 345, Section 7.2 Page 175, Section 1104...
  • Page 354 Parameter No. Parameter item Set in: Reference A080 Number of Modules Setting ANM0 Network Setting CC-Link IE Field Network Page 374, Appendix ANM1 Refresh Parameter setting Common Parameter ANM2 Intrinsic parameter ANM3 B000 Positioning and High-speed counter functions settings B001 Input Signal Function Selection B002 Output Signal Function Selection...
  • Page 355: Appendix 1.2 Plc Parameters

    APPX Appendix 1.2 PLC parameters This section provides parameter setting screens and details of the setting items. Note that parameter setting is not available for the grayed out items. (1) PLC Name setting A label name and a comment for the CPU module are set. The settings are displayed in the list for the find CPU ...
  • Page 356 (output is 1 scan later) state Section 3.7 switched from STOP to RUN. [Start I/O No.] • L02SCPU, L02SCPU-P, L02CPU, L02CPU-P: 0 Assign the interrupt pointers (I50 Intelligent Function Module to I255) and set the start I/O Page 339, 100A ...
  • Page 357 Section 3.31 function. • Title Setting Setting of only a PAUSE contact is not allowed. This item is not available for the L02SCPU, L02SCPU-P, L02CPU, L02CPU-P, L06CPU, L06CPU-P, L26CPU, and L26CPU-P because these modules do not support the built-in CC-Link function.
  • Page 358 (3) PLC File setting Parameters required for the files used in the CPU module are set. Parameter Item Description Setting range Default Reference Set a file for the file register used in the • Not used Use the following Page 326, 1100 ...
  • Page 359 APPX (4) PLC RAS setting Parameters required for performing the RAS functions are set. Parameter Item Description Setting range Default Reference 10ms to 2000ms (In Page 87, WDT Setting Set a watchdog timer value. 200ms increments of 10ms) Section 3.3 WDT (Watchdog 3000 Set a watchdog timer value for...
  • Page 360 1 to 100 Collection No. collect in one scan. • Stored in standard RAM: 1 to 128 This item is not available for the L02SCPU and L02SCPU-P because these modules do not support the use of SD memory cards.
  • Page 361 APPX (5) Boot File setting Parameters required for boot operations are set. Remark These parameters are not available for the L02SCPU and L02SCPU-P. Parameter Item Description Setting range Default Reference Select whether to clear the program memory at the time of boot.
  • Page 362 (6) Program setting File names and execution types (execution conditions) are set for each program when more than one programs are written to the CPU module. Parameter Item Description Setting range Default Reference Set the execution order and type of the •...
  • Page 363 APPX (7) SFC setting Parameters required for SFC programs are set. Parameter Item Description Setting range Default Reference Set the mode for starting an SFC • Initial Start 8002 SFC Program Start Mode Initial Start program. • Resume start MELSEC- Set the conditions for starting an SFC •...
  • Page 364 (8) Device setting Number of points, latch range, and local device range are set for each device. Parameter Item Description Setting range Default Reference • X: 8K • Y: 8K • M: 8K • L: 8K • B: 8K X, Y, S are fixed to 8K points. •...
  • Page 365 APPX Parameter Item Description Setting range Default Reference • Points of the file register (ZR) Set points for the file register • Assign part of the file register (ZR), extended data register 2000  Device Points points to the extended data (D), and extended link register and extended link register (W).
  • Page 366 Select a point of 0, 16, 32, 48, 64, Set the number of points assigned to Points each slot. 128, 256, 512, or 1024 • L02SCPU, L02SCPU-P, L02CPU, L02CPU-P: 0 to 3F0 Start X/Y Set the start I/O number of each slot.
  • Page 367 For the L02SCPU, L02SCPU-P, L02CPU, and L02CPU-P, 1024 points cannot be set. Since the branch module and the branch module (for LA1S Extension) have no I/O points, the number of I/O points and...
  • Page 368 (10) Acknowledge XY Assignment The parameters set in the I/O Assignment tab and CC-Link setting can be confirmed. Parameter Item Description Setting range Default Reference Acknowledge XY The parameters set in the I/O Assignment     Assignment tab and CC-Link setting can be confirmed. Writes parameters set in this screen to a ...
  • Page 369 APPX (11) Built-in Ethernet Port setting Parameters required for using the built-in Ethernet ports are set. Remark These parameters are not available for the L02SCPU and L02SCPU-P because these modules do not have built-in Ethernet ports. Parameter Item Description Setting range...
  • Page 370 Parameter Item Description Setting range Default Reference Select the code for MC protocol Communication Data Code Binary Code/ASCII Code Binary Code communication. Set this parameter when using the following functions. • MC protocol Ethernet Conf. (Open • MELSOFT connection 1016 ...
  • Page 371 APPX (12) Built-in I/O Function setting Parameters required for use of the built-in I/O function are set. Parameter Item Description Setting range Default Reference Positioning Set whether to use the positioning function B000 MELSEC-L and high-speed counter function. High-speed Counter CPU Module Assign the functions to the input signals X0 ...
  • Page 372 Parameters required for data communications using the predefined protocol function or the serial communication function via the RS-232 interface of the CPU module are set. Remark The setting is available only for the L02SCPU and L02SCPU-P. Parameter No. Description Setting range...
  • Page 373 APPX Parameter No. Description Setting range Default Reference Item Set whether to add sumcheck Transmission Sum Check codes according to the • Include Include Setting Code specifications of the protocol to • Not include be executed. Communication Speed 9600bps, 19200bps, 38400bps, Set a communication speed.
  • Page 374 (14) Adapter Serial Setting Parameters required for data communications using the predefined protocol function or the serial communication function via the RS-232 adapter or RS-422/485 adapter are set. Remark The setting is available only for the LCPU where the RS-232 adapter or RS-422/485 adapter can be mounted. Parameter No.
  • Page 375 APPX Parameter No. Description Setting range Default Reference Item • 7 (When • 8 Data Bit Set the data bit. "Predefined For the serial communication Protocol" is function, this is fixed to "8". selected: "7") • Not include • Include Parity Bit Set the parity bit.
  • Page 376: Appendix 1.3 Network Parameters

    Appendix 1.3 Network parameters (1) CC-Link IE Field Network For the network parameters of CC-Link IE Field Network, refer to the following.  MELSEC-L CC-Link IE Field Network Master/Local Module User's Manual (2) Ethernet For the network parameters of Ethernet, refer to the following. ...
  • Page 377: Appendix 1.4 Remote Password Setting

    APPX Appendix 1.4 Remote password setting This section provides the remote password setting screens and details of the setting items. Item Description Setting range Up to four characters (alphanumeric Password Setting Enter a remote password. characters, special symbols) • Ethernet_Built-in_CPU Model Name Select a model name of the CPU module.
  • Page 378: Appendix 2 Added And Changed Functions

    Appendix 2 Added and Changed Functions Some functions are added to the CPU module and GX Works2. The following table shows serial numbers of the CPU module and software versions of GX Works2 that support those added functions. Serial No. (first 5 Added function digits) of CPU GX Works2 version...
  • Page 379 APPX Serial No. (first 5 Added function digits) of CPU GX Works2 version Reference module Predefined protocol function Page 215, Section 3.37 Serial communication function (RS-232 Page 227, Section 3.38 adapter, RS-422/485 adapter) Operation mode setting at double block 1.501X or later START (SFC) Increase in the number of steps (SFC) 1K point setting for the step relay (S)
  • Page 380: Appendix 3 Cpu Module Processing Time

    Appendix 3 CPU Module Processing Time This section describes the CPU module processing time. Appendix 3.1 Time required for each processing in a scan time This section describes operations performed in a scan time and how to calculate the time required for each processing.
  • Page 381 CPU module main block extension block extension base unit L02SCPU, L02SCPU-P L02CPU, L02CPU-P L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT (2) Processing time for the instruction (DUTY instruction) in END processing Using the DUTY instruction increases the END processing time because the user timing clock (SM420 to SM424 and SM430 to SM434) specified with the instruction is turned on or off in END processing.
  • Page 382 61.0 [s] 26.0 [s] L26CPU-BT, L26CPU-PBT Program-end overhead time for interrupt programs CPU module Without high-speed start With high-speed start L02SCPU, L02SCPU-P 28.0 [s] 15.0 [s] L02CPU, L02CPU-P 28.0 [s] 9.0 [s] L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, 26.0 [s] 8.5 [s]...
  • Page 383 M1 + KM2  (number of refresh points) [s] When a CPU module is When a CPU module is connected to an extension connected to a main block CPU module block L02SCPU, L02SCPU-P 96.3 79.7 L02CPU, L02CPU-P L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT...
  • Page 384 END processing. Processing time CPU module When the clock data set request When the clock data read is issued request is issued L02SCPU, L02SCPU-P 0.053 [ms] 0.017 [ms] L02CPU, L02CPU-P 0.025 [ms] 0.006 [ms] L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, 0.018 [ms]...
  • Page 385 • N1: Number of device types specified to be latched • N2: Number of bit device points specified to be latched • N3: Number of word device points specified to be latched CPU module L02SCPU, L02SCPU-P 0.12 L02CPU, L02CPU-P 0.12 L06CPU, L06CPU-P, L26CPU, L26CPU-P, 0.05...
  • Page 386 (7) Common processing time The CPU module performs common processing by the system. The common processing time shown below is required. CPU module Processing time L02SCPU, L02SCPU-P 0.28 [ms] L02CPU, L02CPU-P 0.22 [ms] L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT 0.18 [ms]...
  • Page 387: Factors That Increase The Scan Time

    Use the following expression to calculate the increased scan time when data are batch transferred to the program memory. [Time required for batch-transferring data to the program memory] Scan time  KM1 + KM2 [s] CPU module L02SCPU, L02SCPU-P 120.0 L02CPU, L02CPU-P 170.0 L06CPU, L06CPU-P 260.0...
  • Page 388 Use the following formula to calculate the increase in scan time when executing multiple programs. [Increase in the scan time] Number of program files to be executed  KM1 [ms] CPU module L02SCPU, L02SCPU-P 0.053 L02CPU, L02CPU-P 0.024 L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT 0.02...
  • Page 389 When a CPU module is connected to When a CPU module is connected to a main block an extension block CPU module L02SCPU, L02SCPU-P L02CPU, L02CPU-P L06CPU, L06CPU-P, L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT (8) Data logging function For the increase in scan time when using the data logging function, refer to the following.
  • Page 390: Realtime Monitor Function Processing Time

    Module access device (U\G), Link direct device(J\W, J\X, J\SW, J\Y, J\SB) CPU module L02CPU, L02CPU-P 128.10 14.50 15.06 L06CPU, L06CPU-P 125.12 14.20 15.00 L26CPU, L26CPU-P, L26CPU-BT, L26CPU-PBT 112.00 12.00 13.50 Appendix 3.3 Realtime monitor function processing time This is the minimum interval for monitoring data without any loss under the following conditions during the execution of the realtime monitor function.
  • Page 391: Appendix 4 Data Used In The Cpu Module

    APPX Appendix 4 Data Used in the CPU Module In the CPU module, data such as numeric values and alphabets are represented as a series of bits, "0" and "1". This notation is called BIN (binary). In addition, DEC (decimal), HEX (hexadecimal), BCD (binary-coded decimal), and floating-point data are available. (1) BIN (binary code) BIN is a data notation where a value is represented as a series of bits "0"...
  • Page 392 (6) Numeric representation list The following table shows the numeric representation of BIN (binary), DEC (decimal), HEX (hexadecimal), and BCD (binary-coded decimal). BIN (binary) DEC (decimal) HEX (hexadecimal) BCD (binary-coded decimal)          ...
  • Page 393: Appendix 5 Character Codes Available In The Display Unit

    APPX Appendix 5 Character Codes Available in the Display Unit The following chart shows character codes available in the display unit. "0081 to 009F " and "00E0 to 00FC " are recognized as upper bytes of the Shift-JIS code.
  • Page 394 parts in the tables on the following pages are out of the Shift-JIS code range. The Shift-JIS code range is "81 to 9F " and "E0 to FC " for upper bytes, and "40 to 7E " and "80 to FC "...
  • Page 395 APPX...
  • Page 397 APPX...
  • Page 399 APPX...
  • Page 401 APPX...
  • Page 403 APPX...
  • Page 405: Appendix 6 Differences Between Lcpu And Qnucpu

    • Module whose serial number (first five digit) is "13071" or earlier: Up to 10 modules • Module whose serial number (first five digits) is "13072" or later: Up to 40 modules (L02SCPU, Up to 64 modules (Q00UJCPU: 16 modules, Number of modules...
  • Page 406: Appendix 6.2 Precautions For Utilizing Programs

    Appendix 6.2 Precautions for utilizing programs This section describes precautions for applying a QnCPU program to the LCPU. (1) I/O assignment Since the LCPU is equipped with built-in functions, the start I/O number assigned by default is different from that of the QnCPU.
  • Page 407: Appendix 7 Precautions For Using Gx Works2 And Differences With Gx Developer

    APPX Appendix 7 Precautions for Using GX Works2 and Differences with GX Developer For the precautions for using GX Works2 and differences with GX Developer, refer to the following.  GX Works2 Version 1 Operating Manual (Common)
  • Page 408: Appendix 8 Device Point Assignment Sheet

    Appendix 8 Device Point Assignment Sheet Restriction check Number of device points Numeric Device name Symbol notation Points Range Size (words) Points (bits) 16 1 Input relay 8K (8192) X0000 to X1FFF 8192 16 1 Output relay 8K (8192) Y0000 to Y1FFF 8192 16 1...
  • Page 409: Index

    INDEX ....366 ....146 Acknowledge XY Assignment Data acquisition timing setting .
  • Page 410 ..... . . 314 ......345 Function input (FX) Local device .
  • Page 411 ..... . 121 ..... . 66 Program list monitor Standby type program .
  • Page 412: Revisions

    REVISIONS *The manual number is given on the bottom left of the back cover. Print date *Manual number Revision January 2010 SH(NA)-080889ENG-A First edition April 2010 SH(NA)-080889ENG-B Partial correction Section 2.3.1, 3.11.1, 3.21.2, 3.30.1, 3.30.2 June 2010 SH(NA)-080889ENG-C Partial correction Section 2.10, 3.1, 3.6, 3.17, 3.30, 3.30.2, 5.2.11 January 2011 SH(NA)-080889ENG-D...
  • Page 413 Section 3.1, 3.35, Appendix 1.1, 2 Revision due to the addition of LCPU models February 2013 SH(NA)-080889ENG-K Model Addition L02SCPU, L06CPU, L26CPU Partial correction INTRODUCTION, TERMS, Section 2.1.1, 2.1.3, 2.2.1, 3.21.3, 3.27, 3.28, 3.30, 5.7, Appendix 1.2.2, 1.2.9, 3.1, 3.2 May 2013...
  • Page 414 This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.
  • Page 415: Warranty

    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.
  • Page 416: Trademarks

    TRADEMARKS Ethernet is a registered trademark of Fuji Xerox Co., Ltd. in Japan. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The SD and SDHC logos are trademarks of SD-3C, LLC. The company names, system names and product names mentioned in this manual are either registered trademarks or trademarks of their respective companies.
  • Page 418 SH(NA)-080889ENG-U(1712)MEE MODEL: LCPU-U-KP-E MODEL CODE: 13JZ35 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.

Table of Contents