Mitsubishi L02CPU User Manual

Mitsubishi L02CPU User Manual

Melsec-l series
Hide thumbs Also See for L02CPU:
Table of Contents

Advertisement

Quick Links

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi L02CPU

  • 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 (4) When the programmable controller detects an abnormal condition, it stops the operation and all outputs are: • Turned off if the overcurrent or overvoltage protection of the power supply module is activated. • Held or turned off according to the parameter setting if the self-diagnostic function of the CPU module detects an error such as a watchdog timer error.
  • Page 5 [Design Precautions] CAUTION ● Do not install the control lines or communication cables together with the main circuit lines or power cables. Keep a distance of 100mm or more between them. Failure to do so may result in malfunction due to noise. ●...
  • Page 6 Always ground the FG and LG terminals to the protective ground conductor. Failure to do so may cause malfunction. ● Mitsubishi programmable controllers must be installed in control panels. Connect the main power supply to the power supply module in the control panel through a relay terminal block.
  • Page 7 [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 8 [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 9: Conditions Of Use For The Product

    PRODUCT in one or more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or other safety features which exceed the general specifications of the PRODUCTs are required.
  • Page 10: Introduction

    INTRODUCTION Thank you for purchasing the Mitsubishi 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 11: Relevant Manuals

    RELEVANT MANUALS (1) CPU module user's manual Manual name Description <manual number (model code)> MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Specifications of the CPU modules, power supply modules, display unit, Inspection) SD memory cards, and batteries, information on how to establish a <SH-080890ENG, 13JZ36>...
  • Page 12 (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> System configuration, specifications, procedures before operation, data MELSEC-L Serial Communication Module User’s Manual (Basic) communication methods (basic), and troubleshooting of the serial <SH-080894ENG, 13JZ40>...
  • Page 13 Memo...
  • 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 ..........2.8.5 Changing the program execution type .
  • Page 16 3.25 LED Control Function ............3.25.1 Methods for turning off the LEDs .
  • Page 17 5.2.3 Internal relay (M) ............5.2.4 Latch relay (L) .
  • Page 18 Appendix 1 Parameter Setting ........... . .
  • Page 19: Manual Page Organization

    MANUAL PAGE ORGANIZATION In this manual, pages are organized and the symbols are used as shown below. The following page illustration is for explanation purpose only, and is different from the actual pages. "" 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 CPU module Abbreviation for the MELSEC-L series CPU module Power supply module Abbreviation for the MELSEC-L series power supply module END cover A cover to be attached to the right side of the rightmost MELSEC-L series module Display unit A liquid crystal display to be attached to the CPU module A battery to be installed in the CPU module and used for backing up data such as the standard RAM data...
  • Page 21 PART 1 PROGRAMMI In this part, fundamental knowledge of programming is described. CHAPETR 1 BASIC PROCEDURE FOR PROGRAMMING ..... . . 20 CHAPETR 2 APPLICATION OF PROGRAMMING.
  • Page 22: Part 1 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 Converting programs processed by 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...
  • 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] [New...] Item...
  • 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 226, 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: Writing A Project To The Cpu Module

    CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING 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 30, 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 28: Writing To The Cpu Module

    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...] 1) Select the program memory. 2) Selecting this will automatically select the parameter and program checkboxes. The project has been written.
  • Page 29: Checking An Operation Of The Cpu Module

    CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING 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.
  • Page 30 (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 31: Saving A Project

    CHAPTER 1 BASIC PROCEDURE FOR PROGRAMMING 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 32: Chapter 2 Application Of Programming

    CHAPTER 2 APPLICATION OF PROGRAMMING This chapter describes applications of programming. Memories and Files 2.1.1 Memories The following memories are available. • Program memory • Standard RAM • Standard ROM • SD memory card (1) Program memory This memory stores programs and parameters required in processing of the CPU module. (a) Processing a program When a program is executed, data in the program memory are transferred to the program cache memory the following timings.
  • Page 33 (5) Memory capacity The following table shows the memory capacity of each memory. CPU module Program memory Standard RAM Standard ROM SD memory card L02CPU 80K bytes 128K bytes 512K bytes L1MEM-2GBSD: 2G bytes, L1MEM-4GBSD: 4G bytes L26CPU-BT 1040K bytes...
  • Page 34 (6) Memory and data to be stored : Storable, ×: Not storable Program Standard Standard File name and SD memory card Memory extension File type Remarks (any given name Drive 0 Drive 3 Drive 4 Drive 2 for ***) Parameter ×...
  • Page 35: Parameter-Valid Drive

    CHAPTER 2 APPLICATION OF PROGRAMMING 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) If parameters are set to be booted to an SD memory card, the above priority order is applied after the parameters are booted...
  • Page 36: Files

    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] [Read from PLC...] Item...
  • Page 37 CHAPTER 2 APPLICATION OF PROGRAMMING (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 38 File type Memory capacity (Unit: bytes) Default • L02CPU: 2936(can be increased by parameter setting) • L26CPU-BT: 2964(can be increased by parameter setting) Reference Parameter • Boot setting → 84 + (18 × (number of files)) •...
  • Page 39 CHAPTER 2 APPLICATION OF PROGRAMMING (3) Program file structure The following shows a program file structure. Program file structure 34 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 40 When a file is written to the memory area, the unit of the stored file depends on the CPU module and memory area to be written. This unit is referred to as a file size unit. Memory L02CPU L26CPU-BT Program memory...
  • Page 41: I/O Number

    0000 0030 0040 0060 0070 003F 002F 005F 006F 007F The start I/O numbers are as below. L02CPU L26CPU-BT Target Default I/O assignment Default I/O assignment 0000 0000 Built-in I/O Change allowed Change allowed ⎯ ⎯ 0010...
  • Page 42: I/O Number Assignment

    2.2.2 I/O number assignment (1) Setting method To assign I/O numbers, open the I/O Assignment tab. ( Page 286, Appendix 1.2) Project window [PLC Parameter] [Parameter] [I/O Assignment] In the I/O Assignment tab, the following settings are also available • Response time from I/O (I/O Response Time) ( Page 94, Section 3.8) •...
  • Page 43 CHAPTER 2 APPLICATION OF PROGRAMMING (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 44: Scan Time Structure

    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 42, Section 2.3.1 Initial processing Page 43, Section 2.3.2 Refresh processing Page 43, Section 2.3.3 Program operation...
  • Page 45: Refresh Processing Of Input/Output Modules Or Intelligent Function Modules

    CHAPTER 2 APPLICATION OF PROGRAMMING 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 •...
  • Page 46: End Processing

    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 • Handle the program that is executed under the specific condition as a subroutine program so that the scan time can be decreased ●...
  • Page 47: Operation Processing Of The Cpu Module For Each Operating Status

    CHAPTER 2 APPLICATION OF PROGRAMMING 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 48 (4) Operation processing in the CPU module when switch operation is performed 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 The CPU module The CPU module saves the...
  • Page 49: Operation Processing During Momentary Power Failure

    CHAPTER 2 APPLICATION OF PROGRAMMING 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 50: Processing Of Inputs And Outputs

    Processing of Inputs and Outputs Access processing from the CPU module to the general-purpose I/O, I/O modules, and intelligent I/O modules is collectively executed 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. (direct processing) Compared to the refresh processing, data acquisition is faster in direct processing while more time is required for processing of each instruction.
  • Page 51 CHAPTER 2 APPLICATION OF PROGRAMMING 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*...
  • Page 52 (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 53: Direct Processing

    CHAPTER 2 APPLICATION OF PROGRAMMING 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 CPU (operation processing area) Programming tool input area* Input (X) Input module device...
  • Page 54 (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 55: Interrupt Program

    CHAPTER 2 APPLICATION OF PROGRAMMING 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 56 (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 57 CHAPTER 2 APPLICATION OF PROGRAMMING (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.
  • Page 58 (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 273, Section 5.10). Other interrupt programs have to wait until processing of the interrupt program being executed is completed.
  • Page 59 CHAPTER 2 APPLICATION OF PROGRAMMING (5) Precautions (a) When the same device is used During execution of an instruction in a main routine program, an interrupt program may be executed, suspending the processing of the instruction being executed, resulting in a device data inconsistency. Take the following measures to prevent device data inconsistency.
  • Page 60: Executing Multiple Programs

    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 Program B Divide a program...
  • Page 61 CHAPTER 2 APPLICATION OF PROGRAMMING (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...
  • Page 62: Initial Execution Type Program

    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 63 CHAPTER 2 APPLICATION OF PROGRAMMING (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 64: Scan Execution Type Program

    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 END processing Initial execution type program Scan execution type program A...
  • Page 65: Standby Type Program

    CHAPTER 2 APPLICATION OF PROGRAMMING 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 66 (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 67 CHAPTER 2 APPLICATION OF PROGRAMMING (b) Changing the program execution type using instructions Use the PSCAN, PSTOP, or POFF instruction to change a program execution type. Page 69, Section 2.8.5) • The PSCAN instruction changes the program "DEF" to a scan execution type program. •...
  • Page 68: Fixed Scan Execution Type Program

    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 54, Section 2.7 (2).
  • Page 69 CHAPTER 2 APPLICATION OF PROGRAMMING (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 70 (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 71: Changing The Program Execution Type

    CHAPTER 2 APPLICATION OF PROGRAMMING 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 Initial execution Scan execution type program type program...
  • Page 72 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 73: Boot Operation

    CHAPTER 2 APPLICATION OF PROGRAMMING Boot Operation CPU modules can be operated according to the program and parameters stored in an SD memory card. Operating a CPU module by reading out (boot) those data are called boot operation. The files that can be booted are as follows. : Bootable, ×: Not bootable Boot destination File name...
  • Page 74 (b) Checking whether a boot is complete The following indicates completion of boot operation. • SM660 turns on • There is no BOOT ERROR. • Data in the transfer destination and in the program memory are found matched by a data verification. [Online] [Verify with PLC...] (c) Operation for stopping boot operation...
  • Page 75: Programming Language

    CHAPTER 2 APPLICATION OF PROGRAMMING 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 76: Communications With Intelligent Function Modules

    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. • Serial communication module •...
  • Page 77 CHAPTER 2 APPLICATION OF PROGRAMMING (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. The TO instruction writes data stored in the specified device to the buffer memory of the intelligent function module.
  • Page 78 Memo...
  • Page 79: Part 2 Functions

    PART 2 FUNCTIONS In this part, the functions of the CPU module and display unit are described. CHAPETR 3 CPU MODULE FUNCTIONS ........78 CHAPETR 4 DISPLAY UNIT FUNCTIONS .
  • Page 80: 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 Transfers data stored on an SD memory card to the program memory or the Boot operation Page 71, Section 2.9 standard ROM at power-on or reset.
  • Page 81 CHAPTER 3 CPU MODULE FUNCTIONS Item Description Reference Latch data backup to standard ROM Backs up latch data such as device data and error history without using a battery. Page 159, Section 3.27 Writing/reading device data to/from Writes/reads device data to/from the standard ROM using an instruction. Page 164, Section 3.28 standard ROM Module model name read...
  • Page 82: Constant Scan

    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. By using this function, the constant I/O refresh intervals can be maintained even the time required for program execution changes.
  • Page 83 CHAPTER 3 CPU MODULE FUNCTIONS (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 84: Watchdog Timer (Wdt)

    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 85: Latch Function

    CHAPTER 3 CPU MODULE FUNCTIONS 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 86 (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 304, Appendix 2.1) To minimize the extended scan time, reduce the number of latch points (latch (1) setting, latch (2) setting, and latch relay (L)) as many as possible.
  • Page 87: 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 88 (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 [Add New Data...] ↓...
  • Page 89 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] [Write to PLC] Whenever the initial device value range is changed, execute "Device Memory Diversion"...
  • Page 90: 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. By using this function, communications with a peripheral can be improved and the extended scan time due to service processing can be shortened.
  • Page 91 CHAPTER 3 CPU MODULE FUNCTIONS (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)
  • Page 92 (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 93 CHAPTER 3 CPU MODULE FUNCTIONS (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 94 (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. Program execution END processing Constant scan...
  • Page 95: 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 96: 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 97: 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 98: 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 99: File Password 32

    CHAPTER 3 CPU MODULE FUNCTIONS 3.11 File Password 32 A read password and write password can be set to each file that is stored in the CPU module. By using this function, files can be protected against tampering and theft by unauthorized persons. CPU module Read password "XYZ98756"...
  • Page 100 (5) Creating, changing, deleting, and canceling passwords (a) Creating and changing Open the "Create/Change Password" dialog box. [Online] [Password/Keyword] [New...] Select data of which password is to be created or changed, and click the button. ↓ Select any of the following values for "Registration Condition".
  • Page 101 CHAPTER 3 CPU MODULE FUNCTIONS (b) Deleting Open the "Delete Password" dialog box. [Online] [Password/Keyword] [Delete...] Select passwords to delete, and click the button. ↓ Enter passwords and click the button. ↓ The registration status appears as "Delete". Click the button.
  • Page 102 (c) Disabling Open the "Disable Password" dialog box. [Online] [Password/Keyword] [Delete...] Select data of which password is to disabled, and click the button. ↓ Enter password(s) and click the button. ↓ The registration status appears as "Disable". Click the button. The passwords are disabled.
  • Page 103 CHAPTER 3 CPU MODULE FUNCTIONS (6) Precautions (a) Boot from an SD memory card Once a password is set, the password is related to the file so that performing a boot operation transfers the password of the boot source to the destination. While a password is related, changing or deleting the password of the boot destination results in different passwords between the boot source and boot destination even though their file names are the same.
  • Page 104: Password Authentication

    3.11.2 Password authentication The following three ways are available for password authentication. • By a programming tool • By the FTP server • By the MC protocol (1) By a programming tool Whenever an online operation requiring password authentication is executed, the "Disable Password" dialog box appears.
  • Page 105 CHAPTER 3 CPU MODULE FUNCTIONS (2) By the FTP server To access a password-protected file from the outside by 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 106: Remote Password

    3.12 Remote Password This function prevents unauthorized access to the CPU module. (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 107 CHAPTER 3 CPU MODULE FUNCTIONS (3) Changing/deleting a remote password Open the "Remote Password Setting" dialog box. Project window [Parameter] [Remote Password] Enter a remote password. For a Built-in Ethernet port QCPU, configure the "Detail" setting. • To change a remote password, write a set remote password to the CPU module. •...
  • Page 108: Remote Operation

    3.13 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 106, Section 3.13.1) •...
  • Page 109 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 110: Remote Pause

    3.13.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 111 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-Q/L 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 112: Remote Reset

    3.13.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 113: Remote Latch Clear

    CHAPTER 3 CPU MODULE FUNCTIONS 3.13.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. Devices cannot be reset if they are in the range where a latch clear operation is disabled.
  • Page 114: Scan Time Measurement

    3.14 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 115 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 116: Program List Monitor

    3.15 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" dialog box. [Online] [Monitor] [Program List...]...
  • Page 117: Interrupt Program List Monitor

    CHAPTER 3 CPU MODULE FUNCTIONS 3.16 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.
  • Page 118: 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 119 CHAPTER 3 CPU MODULE FUNCTIONS (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 120: External Input/Output Forced On/Off

    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 121 CHAPTER 3 CPU MODULE FUNCTIONS (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 122 (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 Cancels forced on/off registered for the device Registers forced on for a specified device.
  • Page 123: 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 124 (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 125 CHAPTER 3 CPU MODULE FUNCTIONS ● When setting a word device with a different data type, a device is regarded as the same device. 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 126 • Instructions that do not change device values A device value is not changed by executing the excutional 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 127 CHAPTER 3 CPU MODULE FUNCTIONS (5) Checking the executional conditioned device test Open the "Check/Disable Executional Conditioned Device Test Registration" dialog box. Page 125, 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 128 (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 129 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 130 (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 131: 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 132 (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 133 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 Trace Execution Method Set the execution method of the trace.
  • Page 134 (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 value.
  • Page 135 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] [Sampling Trace] [Read from PLC...]...
  • Page 136 (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 137 CHAPTER 3 CPU MODULE FUNCTIONS (7) Precautions (a) Holding and clearing the trace setting The trace setting (sampling trace file) registered with the CPU module is latched. Even if the CPU module is powered off and then on or is reset, the sampling trace can be performed again with the trace setting at registration.
  • Page 138: Writing Programs In Run Status

    3.21 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 136, Section 3.21.1) • Online change (files) ( Page 137, Section 3.21.2) To perform from multiple programming tools, use a pointer so that data are relatively written to the CPU module.
  • Page 139: Online Change (Files)

    CHAPTER 3 CPU MODULE FUNCTIONS 3.21.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...
  • Page 140: Precautions For Online Change

    3.21.3 Precautions for online change (1) Effect on the scan time Performing change increases scan time. ( Page 309, Appendix 2.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 141 CHAPTER 3 CPU MODULE FUNCTIONS (b) SCJ instruction When the SCJ instruction is in the data written to the CPU module in the RUN status and the execution condition of the instruction has been on at completion of the online change, the instruction jumps to the specified pointer without waiting for one scan.
  • Page 142 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 143 (5) Automatic data transfer to the program memory The automatic data transfer to the program memory requires time obtained from the following formula. • L02CPU: (Scan time (s)) × 320 + 4.8 (s) • L26CPU-BT: (scan time (s)) × 1100 + 15.0 (s) The number of writes to the program memory (flash ROM) is limited to 100,000 times.
  • Page 144: Debug From Multiple Programming Tools

    3.22 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...
  • Page 145: Simultaneous Monitoring From Multiple Programming Tools

    CHAPTER 3 CPU MODULE FUNCTIONS 3.22.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 146: Online Change From Multiple Programming Tools

    3.22.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 147: Self-Diagnostic Function

    CHAPTER 3 CPU MODULE FUNCTIONS 3.23 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 148 (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 149 CHAPTER 3 CPU MODULE FUNCTIONS (6) Self-diagnostics list : Self-diagnostics is performed. ×: Self-diagnostics is not performed. LED status Error L26CPU Diagnostics Diagnostic timing module L02CPU message ERR. status CPU UNIT CPU error • Always Stop Flashing DOWN END instruction not END NOT •...
  • Page 150 : Self-diagnostics is performed. ×: Self-diagnostics is not performed. LED status Error L26CPU Diagnostics Diagnostic timing module L02CPU message ERR. status UNIT BAD • Execution of the END Flashing/ Module verification Stop Off/On CONNECT instruction Intelligent function module SP.UNIT LAY •...
  • Page 151 CHAPTER 3 CPU MODULE FUNCTIONS : Self-diagnostics is performed. ×: Self-diagnostics is not performed. LED status Error L26CPU- Diagnostics Diagnostic timing module L02CPU message ERR. status OPERATION Stop/ Flashing/ *1 *2 • Instruction execution Off/On Operation error ERROR Continue FOR to NEXT...
  • Page 152: Error Clear

    3.24 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 153 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 154 (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 155: Led Control Function

    CHAPTER 3 CPU MODULE FUNCTIONS 3.25 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.25.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 156: Led Indication Priority

    3.25.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 0 bit 12 11 0 bit SD207 Priority 4 Priority 3 Priority 2 Priority 1...
  • Page 157: Module Error Collection Function

    The module errors can be stored either the system memory or the standard RAM. The errors are stored separately from error history (CPU module) data. The memory is managed inside the system. CPU module System memory Standard RAM L02CPU, L26CPU-BT 100 (fixed) 1000 (fixed)
  • Page 158 (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 159 1980 to 2079. Displays a module model name. For the built-in I/O and built-in CC-Link, the model name is displayed as follows. • Built-in I/O: CPU module model name (IO) (example: L02CPU(IO) or ⎯ Model Name L26CPU-BT(IO)) • Built-in CC-Link: CPU module model name (BT) (example: L26CPU- BT(BT) ⎯...
  • Page 160 (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 161: Latch Data Backup To Standard Rom

    CHAPTER 3 CPU MODULE FUNCTIONS 3.27 Latch Data Backup to Standard ROM This function holds (backs up) latch data, such as device data and error history, to the standard ROM without using a battery when the system is stopped for a long period. The stored data are restored when the system is restarted. When this function is used, the battery life-prolonging function is enabled even if it is set to be disabled by the parameter.
  • Page 162: Latch Data Backup

    3.27.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 [Parameter]...
  • Page 163 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 164 (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 165: Restoring Backup Data

    CHAPTER 3 CPU MODULE FUNCTIONS 3.27.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 is OFF.
  • Page 166: Writing/Reading Device Data To/From Standard Rom

    3.28 Writing/Reading Device Data to/from Standard ROM This function writes device data to the standard ROM. Writing the fixed values for operation and operation results to the standard ROM can prevent losing data due to low battery. The data written to the standard ROM can be read at any given timing by using an instruction.
  • Page 167: Module Model Name Read

    CHAPTER 3 CPU MODULE FUNCTIONS 3.29 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 168: Cpu Module Change Function With Sd Memory Card

    3.30 CPU Module Change Function with SD Memory Card 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 169 CHAPTER 3 CPU MODULE FUNCTIONS (b) Maximum backup data size The following shows the maximum backup data size. (Unit: K byte) Backup target data (drive) L02CPU L26CPU-BT Program memory (drive 0) 1048 Standard RAM (drive 3) Standard ROM (drive 4)
  • Page 170: Backup To Sd Memory Card

    3.30.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 171 CHAPTER 3 CPU MODULE FUNCTIONS (a) Insertion and removal of SD memory card An SD memory card can be inserted/removed after preparation for backup is completed. (b) Operating status of the CPU module To backup, the CPU module must be in the STOP status. (When the CPU module is either in the RUN or PAUSE status, it is switched to the STOP status after the END processing where a request to backup start preparation was received.) After replacing the CPU module, it must be powered off and then on or reset.
  • Page 172 (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 [Parameter] [PLC Parameter]...
  • Page 173 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 174 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 175 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 176 (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 177 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 Trace Sampling trace registration Drive operation Program memory batch transfer Data logging Data logging registration Arrange PLC Memory Remote operation...
  • Page 178: Backup Data Restoration

    3.30.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 179 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 180 (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 181 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 175, Section 3.30.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 182: Clock Function

    3.31 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 183 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 184: Battery Life-Prolonging Function

    3.32 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 185: Chapter 4 Display Unit Functions

    CHAPTER 4 DISPLAY UNIT FUNCTIONS CHAPTER 4 DISPLAY UNIT FUNCTIONS A display unit is an LCD attachable to the CPU module. Using a display unit allows checking system status and changing system setting values without software packages. If an error occurs, the error cause can be determined by displaying the error information. Device monitor/test Forced on/off Checking/changing the I/O status and setting...
  • Page 186 (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 220, Section 4.7.1) The menu structure is as shown below.
  • Page 187 CPU module is reset, the possible cause is a hardware failure of the CPU module or the display unit. Check a 4-digit error code displayed on the display unit, and please consult your local Mitsubishi service center or representative, explaining a detailed description of the problem.
  • Page 188 (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 189: Function List

    CHAPTER 4 DISPLAY UNIT FUNCTIONS Function List The following table lists the functions of a display unit. Displayed Category Function name Description Reference function name Device monitor/test DEV MON/TEST Monitors and tests device memory values. Page 188, Section 4.2.1 Device memory clear DEVICE MEMORY Clears all device memory values.
  • Page 190: Cpu Monitor/Test

    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 • Built-in I/O function monitor •...
  • Page 191 CHAPTER 4 DISPLAY UNIT FUNCTIONS (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 value),...
  • Page 192 (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 193 CHAPTER 4 DISPLAY UNIT FUNCTIONS (b) Specifying a device comment *1 *2 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 buttons and press the button.
  • Page 194 (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. (a) Monitoring a bit device (display format: 16-bit integer) The specified device, and display format, a value, and bit status of the specified device can be monitored.
  • Page 195 CHAPTER 4 DISPLAY UNIT FUNCTIONS (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.
  • Page 196 (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. Display format Device value in exponent If the device value is "-0", unnormalized number, nonnumeric character, or ±...
  • Page 197 CHAPTER 4 DISPLAY UNIT FUNCTIONS (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 buttons (a device value is changed by 1 bit for bit device and 1 (Bit device) word for word device) and press the...
  • Page 198: Device Clear

    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 199 CHAPTER 4 DISPLAY UNIT FUNCTIONS (3) Operating procedure Perform device clear by the following operation. "Device clear" screen Select "DEVICE MEMORY" or "FILE REGISTER" using the buttons and press the button. ↓ "Latched device memory clear selection" screen Select whether to clear the values of devices within latch range using the buttons and press button.(can be set for device memory clear...
  • Page 200 ↓ "Device memory clear completion" screen After the setting is completed, any of the screens (shown left) appear. To return the display to the "device clear" screen, press the button. "File register clear completion" screen...
  • Page 201: 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 202 (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 203 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 buttons. Pressing the button will clear the selected device.
  • Page 204: 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 205: 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 206 (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 pulses Velocity (v) Speed command (speed limit value) 0 to 200000 pps Data No.
  • Page 207 CHAPTER 4 DISPLAY UNIT FUNCTIONS (b) Operating procedure Perform the following operation. "High-speed counter function - monitor CH selection" screen Select "CH1" or "CH2" using the buttons and press the button. ↓ "High-speed counter function - monitor target selection" screen Select "PRESENT VAL MON", "PULSE FREQUENCY", or "ROTATION SPD"...
  • Page 208 (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 buttons and press the button.
  • Page 209: 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 210 (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 211 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 212 (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 Perform the following operation.
  • Page 213: 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 214 (3) Operating procedure Perform the following operation from the "clock setting" screen. "Clock setting" screen Move the cursor using the buttons, increase or decrease a time value using the buttons, and press the button. ↓ "Clock setting confirmation" screen Select "YES" using the buttons and press the button.
  • Page 215: 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. 4.4.1 Buffer memory monitor/test Buffer memory values can be monitored and tested. (1) Screen transition The following shows screen transition of buffer memory monitor/test.
  • Page 216 (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 buttons, increase or decrease a start I/O No.
  • Page 217 CHAPTER 4 DISPLAY UNIT FUNCTIONS (4) Specifying display format Perform the following operation. "Buffer memory monitor" screen Press the button. ↓ "Display format selection" screen Select display format using the buttons and press the button. (5) Specifying a device comment *1 *2 To display a device with device comment, perform the following operation.
  • Page 218 (6) Buffer memory monitor The start I/O No., buffer memory address, display format, buffer memory value, and bit status of the buffer memory value of the specified module can be monitored. Start I/O number of a module to be monitored A buffer memory address to be monitored can be changed by 1 word with the buttons.
  • Page 219: Module Settings

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 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 220 (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 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 221: 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 222: Option Settings

    Option Settings 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 223: Contrast Adjustment

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 4.7.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 buttons and press the button.
  • Page 224: Lighting Period Setting

    4.7.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 • 10MIN • 15MIN •...
  • Page 225: Pop-Up Display

    CHAPTER 4 DISPLAY UNIT FUNCTIONS 4.7.4 Pop-up display A pop-up screen showing a user message ( Page 219, Section 4.6) can be enabled. (1) Operating procedure Enable pop-up display by the following operation. "Options" screen Select "POPUP" using the buttons and press the button.
  • Page 226 Memo...
  • Page 227: 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 ..........226 CHAPTER 6 CONSTANTS .
  • Page 228: Device List

    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-set Classification Type Device name Reference range Points Range Page 231,...
  • Page 229 Decimal Section 5.11.3 argument device "32K points" (D12288 to D45055) for the L02CPU. The number of points that can be actually used varies depending on the intelligent function module. Manual for the intelligent function module used "0 to 64K" in total for the L02CPU.
  • Page 230: 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, the following refresh ranges must not exceed the corresponding device ranges. •...
  • Page 231 CHAPTER 5 DEVICES Set the internal user devices within 29K words in total. One point of the timer, retentive timer, and counter is regarded as one word device point and two bit device points. (Bit device) + (Timer, retentive timer, and counter) + (Word device) ≤ 29K words •...
  • Page 232 (2) 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) 8K (8192) X0000 to X1FFF ×1 8192...
  • Page 233: 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 234: 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 235: 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 anuunciator number is stored in SD62 to SD79.
  • Page 236 (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 annuciator 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 237 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 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 238: Link Special Relay (Sb)

    5.2.7 Link special relay (SB) The Link special relay (SB) is a relay that indicates various communication status and detected errors. Each of this device area is turned on or off according to a factor occurred during data link. Status of the data link can be confirmed by monitoring the link special relay.
  • Page 239: 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))
  • Page 240: Timer (T, St)

    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. (1) Timer types Timers are mainly classified into the following two types. •...
  • Page 241 CHAPTER 5 DEVICES (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 242 (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 • High-speed retentive timer: High-speed timer The timer starts time measurement when its coil is turned on, and when it times out, the contact is turned on.
  • Page 243 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 instruction is executed.
  • Page 244 (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 245 CHAPTER 5 DEVICES (g) When using multiple timers When using multiple timers, provide the timers from the last one to be measured because current value of the timers are updated upon execution of OUT T or OUT ST instruction. 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.
  • Page 246: 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 247 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 248 (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 (%) [times/s] Maximum counting speed (Cmax) = •...
  • Page 249: 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 250: Link Register (W)

    5.2.13 Link register (W) The link register data register whose device number is represented in hexadecimal. In the link register, numeric data (-32768 to 32767, or 0000 to FFFF ) are stored. (1) Bit structure of the file register (a) Bit structure and write/read unit One point of the link register consists of 16 bits, and data can be written or read in units of 16 bits.
  • Page 251: Link Special Register (Sw)

    CHAPTER 5 DEVICES 5.2.14 Link special register (SW) The Link special register (SW) is a register that stores various communication status and detected errors. Because the data link information is stored as numeric data, error locations and causes can be checked by monitoring the link special register.
  • Page 252: 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 253 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 254: 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 255: Module Access Devices

    CHAPTER 5 DEVICES Module Access Devices 5.4.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 256 (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. "MOV U5\G11 D0"...
  • Page 257: Index Register/Standard Device Register (Z)

    CHAPTER 5 DEVICES Index Register/Standard Device Register (Z) 5.5.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).
  • Page 258: Standard Device Register (Z)

    (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 259: Saving And Restoration Of The Index Register

    CHAPTER 5 DEVICES 5.5.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 •...
  • Page 260 (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 261: File Register (R, Zr)

    CHAPTER 5 DEVICES File Register (R, ZR) These device are provided for extending the data register. Data register 12K points Data register 12K points Data register can be File register extended. (1) Specification methods The following two methods are available. •...
  • Page 262 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 30, Section 2.1) CPU module Points L02CPU L26CPU-BT 384K...
  • Page 263 CHAPTER 5 DEVICES (6) Setting method When using the file register, select "Use the following file". Project window [Parameter] [PLC Parameter] [PLC File] Select "Use the following file". Item Description Corresponding Memory "Standard RAM" (fixed) File Name Enter a file name of the file to write to the CPU module. Capacity The file register size can be set in increments of 1K point.
  • Page 264 (7) Clearing the file register The file register contents are held even after the CPU module is powered off or reset. (Not cleared with a latch clear operation. ) To clear the contents of the file register file, perform any of the following. The latch range of the file register can be set in the Device tab of the PLC Parameter dialog box.
  • Page 265 CHAPTER 5 DEVICES (9) Precautions (a) If the file register number not registered is used If a file register file is not registered and writing to or reading from the file register is performed, "OPERATION ERROR" (error code: 4101) occurs. (b) If writing to or reading from the file register is performed exceeding the registered size of points "OPERATION ERROR"...
  • Page 266: 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 267 Capacity Standard RAM Any name L02CPU (1 to 64K points), L26CPU-BT (1 to 384K points) The total points of the file register (ZR), extended data register (D), and extended link register (W). (b) Device setting Set each number of points for the file register (ZR), extended data register (D), and extended link register (W) in the File Register Extended Setting area.
  • Page 268 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 269 CHAPTER 5 DEVICES (2) Precautions (a) Specifying the extended data register (D) and extended link register (W) The values of the following items will be the same as those for the file register (ZR). • Number of program steps • Instruction processing time •...
  • Page 270 (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.
  • Page 271: 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 272: Pointer (P)

    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 273: Local Pointer

    CHAPTER 5 DEVICES 5.9.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 274: Common Pointer

    5.9.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 275: Interrupt Pointer (I)

    CHAPTER 5 DEVICES 5.10 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 276: Other Devices

    5.11 Other Devices 5.11.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.11.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 277: Chapter 6 Constants

    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 278: Real Number (E)

    Real Number (E) he real number (E) is a device used to specify real numbers in programs. In programs, specify it as E (example: E1.234).( Page 303, Appendix 1.3) (1) Specification range (a) Real number setting range • For single-precision floating-point data -126 -126 <...
  • Page 279: Chapter 7 Convenient Usage Of Devices

    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 280: Local Device

    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 281 CHAPTER 7 CONVENIENT USAGE OF DEVICES (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.
  • Page 282 (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 283 CHAPTER 7 CONVENIENT USAGE OF DEVICES (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.
  • Page 284 (4) When executing an interrupt/fixed scan execution type program The local device in the file where the interrupt/fixed scan execution type program is stored can be used by ON/ OFF of SM777. 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 285 CHAPTER 7 CONVENIENT USAGE OF DEVICES (5) Clearing local device data Local device data are cleared by the either of the following. • When the CPU module is powered off and then on or is reset. • When the CPU module status is changed from STOP to RUN. Local device data cannot be cleared from a programming tool.
  • Page 286: 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 287 APPENDICES Parameter No. Parameter item Setting location Reference 3003 Constant Scanning Page 80, Section 3.2 PLC RAS 300A Module Error History Collection Page 155, Section 3.26 0400 Slot setting Page 39, Section 2.2 0403 Error Time Output Mode Page 95, Section 3.9 4004 Error Time Operation Mode I/O Assignment...
  • Page 288: Appendix 1.2 Plc Parameter

    Appendix 1.2 PLC Parameter 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 function.
  • Page 289 Section 3.7 switched from STOP to RUN. • Start I/O No. Assign the interrupt pointers (I50 • Intelligent Function Module L02CPU: 0 to 3D0 to I255) and set the start I/O Page 273, 100A ⎯ Setting (Interrupt Pointer •...
  • Page 290 SD memory card • Backup Target Data Section 3.30 function. • Title Setting Setting of only a PAUSE contact is not allowed. For the L02CPU, this item cannot be set because it does not support the built-in CC-Link function.
  • Page 291 APPENDICES (3) PLC File Setting Parameters required for the files used in the CPU module are set. APPEN Parameter Item Description Setting range Default Reference Set a file for the file register used in the • Not used Use the following Page 259, 1100 File Register...
  • Page 292 (4) PLC RAS Setting Parameters required for performing the RAS functions are set. Parameter Item Description Setting range Default Reference 10ms to 2000ms Page 82, WDT Setting Set a watchdog timer value. (In increments of 200ms Section 3.3 10ms) WDT (Watchdog 3000 Timer) Setting Set a watchdog timer value for...
  • Page 293 APPENDICES Parameter Item Description Setting range Default Reference 0.5ms to 2000ms Page 80, 3003 ⎯ Constant Scanning Set a constant scan time value. (In increments of Section 3.2 0.5ms) Collection of intelligent function Set whether to collect module Selected/ Selected module error errors.
  • Page 294 (5) Boot File Setting Parameters required for boot operations are set. Parameter Item Description Setting range Default Reference Select whether to clear the program memory at the time of boot. Selecting this item Clear Program Boot Option Selected/deselected Deselected enables the setting of "High Memory Speed Monitor Area from Page 71,...
  • Page 295 APPENDICES (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. APPEN Parameter Item Description Setting range Default Reference Set the execution order and type of the •...
  • Page 296 (7) SFC Setting Parameters required for SFC programs are set. Parameter Item Description Setting range Default Reference SFC Program Start Set the mode for starting an SFC • Initial Start 8002 Initial Start Mode program. • Resume start MELSEC-Q/L/ Set the conditions for starting an SFC •...
  • Page 297 APPENDICES (8) Device Setting Number of points, latch range, and local device range are set for each device. APPEN 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 298 Parameter Item Description Setting range Default Reference Set a latch range (start and Setting is available for only end device numbers) to be one range for each of B, F, 2001 ⎯ Latch (1) Start/Latch (1) End cleared by remote latch clear V, T, ST, C, D, and W operation.
  • Page 299 Select a point of 0, 16, 32, 48, 64, Set the number of points assigned to Points 16 points each slot. 128, 256, 512, or 1024 L02CPU: 0 to 3F0 Start X/Y Set the start I/O number of each slot. Blank L26CPU-BT: 0...
  • Page 300 Mode at H/W Setting occurred in an intelligent function Error module. Set a response time for the input Select 1ms, 5ms, 10ms, 20ms, or 0405 Response 10ms module or I/O combined module. 70ms. Time For the L02CPU, 1024 points cannot be set.
  • Page 301 APPENDICES (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.
  • Page 302 (11) Built-in Ethernet Port Setting Parameters required for using the built-in Ethernet port are set. Parameter Item Description Setting range Default Reference • IP Address: 0.0.0.1 to 223.255.255.254 • IP Address: Enter the IP address • IP Address: MELSEC-L (00000001 to 0DFFFFFFE of the CPU module.
  • Page 303 APPENDICES Parameter Item Description Setting range Default Reference Communication Select the code for MC protocol Binary Code/ASCII Code Binary Code Data Code communication. Set parameters when using the MC ⎯ ⎯ Open Setting protocol for communication or the socket communication function. Set parameters when using the file ⎯...
  • Page 304 (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 305: Appendix 1.3 Network Parameter Setting

    Select a model name of the CPU module. • LJ71C24 0000 to 0FE0 Start X/Y Set the start address of the module. When selecting the L02CPU or L26CPU-BT, detailed ⎯ Condition (detailed setting) settings are required. User Connection No. Select a user connection number(s).
  • Page 306: Appendix 2 Cpu Module Processing Time

    Appendix 2 CPU Module Processing Time This section describes the CPU module processing time. Appendix 2.1 Time Required for Each Processing Included in Scan Time This section describes how to calculate the time required for processing and execution in the scan time. Processing in the RUN status Program check...
  • Page 307 The number of output refresh points is the value obtained by dividing the number of output points by 16/h. APPEN CPU module L02CPU L26CPU-BT (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 308 Without high- With high- Without high- With high- speed start speed start speed start speed start speed start speed start L02CPU 57.0 [µs] 19.0 [µs] 51.0 [µs] 17.0 [µs] 66.0 [µs] 31.0 [µs] L26CPU-BT 54.0 [µs] 18.0 [µs] 46.0 [µs] 16.0 [µs]...
  • Page 309 [Auto refresh time via intelligent function modules] KM1 + KM2 × (number of refresh points) [µs] CPU module L02CPU L26CPU-BT (5) Function execution time in END processing This is the time required for updating calendar or clearing error in END processing.
  • Page 310 • 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 L02CPU 0.12 L26CPU-BT 0.05 The scan time does not increase even if the latch range is set for the file register (R, ZR), extended data register (D), or extended link register (W).
  • Page 311: Appendix 2.2 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 L02CPU 170.0 L26CPU-BT 1100.0 15.0 (2) Use of local devices Use the following expression to calculate the increased scan time when local devices are used.
  • Page 312 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 L02CPU 0.024 L26CPU-BT 0.02 (4) Removal and insertion of an SD memory card The following shows the increase in scan time when an SD memory card is inserted or removed.
  • Page 313 • N1: FNumber of errors collected per scan by the built-in CC-Link or external modules • N2: FNumber of errors collected by the built-in I/O CPU module L02CPU L26CPU-BT (8) Data logging function For the increase in scan time when using the data logging function, refer to the following.
  • Page 314: Appendix 3 Data Used In The Cpu Module

    Appendix 3 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 315 APPENDICES (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 316: Appendix 4 Character Codes Available In The Display Unit

    Appendix 4 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 bits of the Shift-JIS code.
  • Page 317 APPENDICES APPEN (To the next page)
  • Page 318 (To the next page)
  • Page 319 APPENDICES APPEN (To the next page)
  • Page 320 (To the next page)
  • Page 321 APPENDICES APPEN (To the next page)
  • Page 322 (To the next page)
  • Page 323 APPENDICES APPEN (To the next page)
  • Page 324 (To the next page)
  • Page 325 APPENDICES APPEN (To the next page)
  • Page 326 (To the next page)
  • Page 327 APPENDICES APPEN Out of the Shift-JIS code range. In the Shift-JIS code range, "81 to 9F " and "E0 to FC " are the upper bits, and "40 to 7E " and "80 to FC " are the lower bits.
  • Page 328: Appendix 5 Differences Between Lcpu And Qnucpu

    Appendix 5 Differences Between LCPU and QnUCPU This section describes the specification comparison between the LCPU and QnCPU and the precautions for using the existing system. Appendix 5.1 Specification Comparison The following table shows a comparison of the specifications between LCPU and QnCPU. Difference Item Description...
  • Page 329: Appendix 5.2 Precautions For Utilizing Programs

    APPENDICES Appendix 5.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 330: Appendix 6 Precautions For Using Gx Works2

    Appendix 6 Precautions for Using GX Works2 For the precautions for using the LCPU with GX Works2, refer to the following. GX Works2 Version1 Operating Manual (Common) Appendix 7 Precautions for Using GX Developer For the precautions for using the LCPU with GX Developer, refer to the following. GX Developer Version 8 Operating Manual...
  • Page 331: 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) 8K (8192) X0000 to X1FFF ×1 8192 Input relay 8K (8192) Y0000 to Y1FFF ×1 8192 Output relay Internal relay M0 to ×1...
  • Page 332: Index

    INDEX ......312 DEC (decimal) ..... 275 Decimal constant (K) .
  • Page 333 ..... 297 ......269 INDEX I/O assignment setting Nesting (N)
  • Page 334 ......129 Sampling trace ......29 Saving a project .
  • Page 335 Memo...
  • Page 336: Revisions

    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 337: Warranty

    6. Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi. 7. Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user. 2. Onerous repair term after discontinuation of production (1) Mitsubishi shall accept onerous product repairs for seven (7) years after production of the product is discontinued.
  • Page 338 Microsoft, Windows, Windows NT, and Windows Vista are registered trademarks of Microsoft Corporation in the United States and other countries. Pentium is a trademark of Intel Corporation in the United States and other countries. Ethernet is a trademark of Xerox Corporation. The SD logo and SDHC logo are trademarks.
  • Page 340 Phone: +380 (0)44 / 490 92 29 Fax: +380 (0)44 / 248 88 68 Mitsubishi Electric Europe B.V. /// FA - European Business Group /// Gothaer Straße 8 /// D-40880 Ratingen /// Germany Tel.: +49(0)2102-4860 /// Fax: +49(0)2102-4861120 /// info@mitsubishi-automation.com /// www.mitsubishi-automation.com...

This manual is also suitable for:

L26cpu-bt

Table of Contents