Mitsubishi 00JCPU User Manual

Mitsubishi 00JCPU User Manual

Q series programmable controller
Table of Contents

Advertisement

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi 00JCPU

  • Page 3: Safety Precautions

    SAFETY PRECAUTIONS (Read these precautions before using this product.) Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly. In this manual, the safety precautions are classified into two levels: " WARNING"...
  • Page 4 [Design Precautions] WARNING Configure safety circuits external to the programmable controller to ensure that the entire system operates safely even when a fault occurs in the external power supply or the programmable controller. Failure to do so may result in an accident due to an incorrect output or malfunction. (1) Configure external safety circuits, such as an emergency stop circuit, protection circuit, and protective interlock circuit for forward/reverse operation or upper/lower limit positioning.
  • Page 5 [Design Precautions] WARNING When changing data of the running programmable controller from a peripheral connected to the CPU module or from a personal computer connected to an intelligent function module, configure an interlock circuit in the sequence program to ensure that the entire system will always operate safely. For program modification and operating status change, read relevant manuals carefully and ensure the safety before operation.
  • Page 6: Installation Precautions

    [Installation Precautions] CAUTION Use the programmable controller in an environment that meets the general specifications in the QCPU User's Manual (Hardware Design, Maintenance and Inspection). Failure to do so may result in electric shock, fire, malfunction, or damage to or deterioration of the product.
  • Page 7 [Wiring Precautions] WARNING Shut off the external power supply (all phases) used in the system before installation and wiring. Failure to do so may result in electric shock or damage to the product. After wiring, attach the included terminal cover to the module before turning it on for operation. Failure to do so may result in electric shock.
  • Page 8 Do not remove the film during wiring. Remove it for heat dissipation before system operation. 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 9 [Startup and Maintenance Precautions] CAUTION Before performing online operations (especially, program modification, forced output, and operation status change) for the running CPU module from the peripheral connected, read relevant manuals carefully and ensure the safety. Improper operation may damage machines or cause accidents. Do not disassemble or modify the modules.
  • Page 10 [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 of the battery directive in EU member states, refer to the QCPU User's Manual (Hardware Design, Maintenance and Inspection).) [Transportation Precautions] CAUTION...
  • Page 11: 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 12: Revisions

    This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mit- subishi 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. © 2008 MITSUBISHI ELECTRIC CORPORATION A - 10...
  • Page 13: Introduction

    INTRODUCTION This manual describes the memory maps, functions, programs, I/O number assignment, and devices of the Q series CPU module. Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the functions and performance of the Q series programmable controller to handle the product correctly. When applying the program examples introduced in this manual to the actual system, ensure the applicability and confirm that it will not cause system control problems.
  • Page 14: Table Of Contents

    CONTENTS CONTENTS SAFETY PRECAUTIONS........................A - 1 CONDITIONS OF USE FOR THE PRODUCT ..................A - 9 REVISIONS ............................A - 10 INTRODUCTION ........................... A - 11 MANUALS ............................. A - 18 MANUAL PAGE ORGANIZATION ......................A - 20 GENERIC TERMS AND ABBREVIATIONS ..................A - 22 CHAPTER1 OVERVIEW 1-1 to 1-20 1 - 1...
  • Page 15 3 - 2 Program Operation ........................ 3 - 3 END Processing........................3 - 4 Operation Processing in the RUN, STOP, or PAUSE Status ..........3 - 6 Operation Processing during Momentary Power Failure ............3 - 7 Data Clear Processing ......................3 - 9 I/O Processing and Response Delay ..................
  • Page 16 CHAPTER6 FUNCTIONS 6-1 to 6-151 6 - 1 Function List........................... 6 - 4 Constant Scan ........................6 - 8 Latch Function ........................6 - 11 Output Mode at Operating Status Change (STOP to RUN)........... 6 - 14 Clock Function ........................6 - 19 Remote Operation........................
  • Page 17 6 - 121 6.21.1 Methods for turning off the LEDs..................6 - 122 6.21.2 LED indication priority ....................... 6 - 125 6.22 High Speed Interrupt Function ....................6 - 126 6.22.1 High speed interrupt program execution function ............. 6 - 127 6.22.2 High speed I/O refresh and high speed buffer transfer functions........
  • Page 18 9 - 23 9.2.8 Link special relay (SB) ...................... 9 - 24 9.2.9 Step relay (S) ........................9 - 25 9.2.10 Timer (T)..........................9 - 34 9.2.11 Counter (C) ........................9 - 40 9.2.12 Data register (D)........................ 9 - 41 9.2.13 Link register (W) ........................
  • Page 19 CHAPTER10 CPU MODULE PROCESSING TIME 10-1 to 10-22 10 - 1 10.1 Scan Time ..........................10 - 1 10.1.1 Scan time structure ......................10 - 6 10.1.2 Time required for each processing included in scan time ..........10 - 15 10.1.3 Factors that increase the scan time ..................
  • Page 20: Manuals

    MANUALS To understand the main specifications, functions, and usage of the CPU module, refer to the basic manuals. Read other manuals as well when using a different type of CPU module and its functions. Order each manual as needed, referring to the following list. Number (in the list below) CPU module Basic model QCPU...
  • Page 21 Other relevant manuals Manual name Description CC-Link IE Controller Network Reference Manual Specifications, procedures and settings before system operation, parameter setting, < SH-080668ENG (13JV16) > programming, and troubleshooting of the CC-Link IE Controller Network module Q Corresponding MELSECNET/H Network System Specifications, procedures and settings before system operation, parameter setting, Reference Manual (PLC to PLC network) programming, and troubleshooting of a MELSECNET/H network system (PLC to PLC...
  • Page 22: Manual Page Organization

    MANUAL PAGE ORGANIZATION Note (icon) Reference Chapter The section in this manual or The detailed explanation of "Note . " is The chapter of the current page can be another relevant manual that can provided under the corresponding easily identified by this indication on the be referred to is shown with "Note .
  • Page 23 In addition, this manual uses the following types of explanations. In addition to description of the page, notes or functions that require special attention are described here. Remark The reference related to the page or useful information are described here. A - 21...
  • Page 24: Generic Terms And Abbreviations

    Generic term for the Q02PHCPU, Q06PHCPU, Q12PHCPU, and Q25PHCPU Redundant CPU Generic term for the Q12PRHCPU and Q25PRHCPU Generic term for Mitsubishi motion controllers, Q172CPUN, Q173CPUN, Q172HCPU, Motion CPU Q173HCPU, Q172CPUN-T, Q173CPUN-T, Q172HCPU-T, and Q173HCPU-T Generic term for MELSEC-Q series PC CPU modules, PPC-CPU686(MS)-64, PC CPU module PPC-CPU686(MS)-128, and PPC-CPU852(MS)-512 manufactured by CONTEC Co., Ltd.
  • Page 25 Generic term for the QC10TR and QC30TR tracking cables for redundant systems Generic term for the Q6BAT, Q7BAT, and Q8BAT CPU module batteries, Q2MEM-BAT SRAM Battery card battery, and Q3MEM-BAT SRAM card battery Generic term for Mitsubishi Graphic Operation Terminal, GOT-A*** series, GOT-F*** series, and GOT1000 series A - 23...
  • Page 26: Chapter1 Overview

    CHAPTER1 OVERVIEW The CPU module performs sequence control by executing programs. This chapter describes the processing order in the CPU module, locations where the created programs are stored, and devices and instructions useful for programming. 1.1 Processing Order in the CPU Module The CPU module performs processing in the following order.
  • Page 27: Storing And Executing Programs

    CHAPTER1 OVERVIEW 1.2 Storing and Executing Programs This section describes where to store and how to execute the programs in the CPU module. (1) Programming Programs are created with GX Developer. For details of program configuration and execution conditions, refer to CHAPTER 2. (2) Storing programs Created programs and set parameters are stored in the following memories of the CPU module.
  • Page 28: Structured Programming

    1.3 Structured Programming The programs to be executed in the CPU module can be structured in the following two ways. • In one program • By dividing into multiple files Note1 Note1.1 (1) Structuring in one program Structured programming is available by creating one program as a collection of three program sections: main rou- tine program ( Section 2.2.1), subroutine program ( Section 2.2.2), and interrupt program...
  • Page 29 CHAPTER1 OVERVIEW (2) Structuring by dividing into multiple files A program is stored in a file. Changing the file name allows the CPU module to store multiple programs. Multiple programs can be stored by changing the file name. File name: PARAM File name: ABC File name: ABC File name: DEF Device Parameter...
  • Page 30 (b) Dividing into multiple files according to the functions Program memory/standard ROM/memory card Program A Initial processing The execution order Main processing Program B Processing contents and conditions for are divided according program A to D to the functions. Communication Program C processing can be set.
  • Page 31: Devices And Instructions Useful For Programming

    CHAPTER1 OVERVIEW 1.4 Devices and Instructions Useful for Programming The CPU module is provided with devices and instructions useful for programming. This section describes the outline of these devices and instructions. (1) Various ways of device specification (a) Using each bit of a word device as a contact or coil By specifying a bit of a word device, the bit can be used as a contact or coil.
  • Page 32 (d) Direct access to the buffer memory of the intelligent function module The buffer memory of the intelligent function module can be used as a device area in a program. ( Section 9.5.1) U4\G12 The CPU module can read the data in the buffer memory address 12 of the Q64AD.
  • Page 33 CHAPTER1 OVERVIEW (2) Structural description of programs Use of the index register and edge relay enables easy structured programming including the pulse conversion processing. ( Section 9.2.6) PLS M0 FOR n X10 X11 PLS M10 X0Z0 X1Z0 V0Z1 Y8Z2 Multiple number (n) of similar programs can be executed by one description.
  • Page 34 (4) Flexible management of subroutine programs (a) Subroutine program sharing The number of steps in a program can be reduced by sharing subroutine programs. In addition, creating and managing programs become easier. Subroutine programs can be created within the same program and called. Subroutine programs in other pro- grams can also be called by using the common pointer.
  • Page 35 CHAPTER1 OVERVIEW (b) Subroutine call instruction with argument passing Subroutine program that is called more than one time can be created easily Main routine program Argument specification CALLP K4X0 Argument from FD2 Argument to FD1 Argument to FD0 Subroutine program specification Argument specification CALLP...
  • Page 36: Features

    1.5 Features This section describes the features of the CPU modules. 1.5.1 Features of the Basic model QCPU The features specific to the Basic model QCPU are described below. (1) High cost performance for small-scale system The Basic model QCPU is suitable for controlling a small-scale system of simple and compact system. The CPU module provides high cost performance for a small-scale system.
  • Page 37 CHAPTER1 OVERVIEW (2) Communication with the personal computer and HMI by the serial communica- tion function ( Section 6.24) The Q00CPU and Q01CPU can communicate using the MELSEC communication protocol (hereafter, MC proto- col) by connecting a RS-232 interface and personal computer or HMI. RS-232 cable Personal computer or HMI Communication using the MC protocol...
  • Page 38: Features Of The High Performance Model Qcpu

    1.5.2 Features of the High Performance model QCPU The features specific to the High Performance model QCPU are described below. (1) High performance and large capacity The High Performance model QCPU has large capacity and allows high-speed processing suitable for any scale system.
  • Page 39 CHAPTER1 OVERVIEW (2) AnS/A series I/O modules and special function modules are available. These modules can be used together with the High Performance model QCPU by mounting them on the AnS/A series-compatible extension base unit (QA1S5 B, QA1S6 B, QA1S6ADP+A1S5 B/A1S6 B, QA6 B, and QA6ADP+A5 B/A6 B).
  • Page 40: Features Of The Process Cpu

    1.5.3 Features of the Process CPU The features specific to the Process CPU are described below. (1) Addition of 52 process control instructions Based on the instructions for the High Performance model QCPU, 52 instructions for high-level process control have been added to the Process CPU. For details of the added instructions, refer to the following.
  • Page 41 CHAPTER1 OVERVIEW (4) Module can be changed online. (Online module change) When a module fails, it can be changed without the system being stopped. For details of the online module change, refer to the following. QCPU User's Manual (Hardware Design, Maintenance and Inspection) Manual for the module supporting the online module change (5) Configuration of MELSECNET/H multiplexed remote I/O system Installing a remote master station in the MELSECNET/H network system can configure the MELSECNET/H mul-...
  • Page 42: Features Of The Redundant Cpu

    1.5.4 Features of the Redundant CPU The features specific to the Redundant CPUs are described below. (1) Support of the redundant system in addition to the Process CPU functions (a) Redundant system using the Redundant CPU Using the Redundant CPU can configure a redundant system including base units, power supply modules, and CPU modules (Redundant CPUs).
  • Page 43 CHAPTER1 OVERVIEW (b) Redundant power supply system Using the redundant power main base unit (Q3 RB) and the redundant power supply module (Q63RP and Q64RP) on the remote I/O station enables use of two power supply modules on the remote I/O station side. This enables changing the power supply module without stopping the system even when the power supply module on the remote I/O station side fails.
  • Page 44: Checking Serial Number And Function Version

    1.6 Checking Serial Number and Function Version The serial number and function version of the CPU module can be checked on the rating plate, on the front of the module, and on the System monitor screen in GX Developer. (1) Checking on the rating plate The rating plate is located on the side of the CPU module.
  • Page 45 CHAPTER1 OVERVIEW (3) Checking on the System monitor (Product Information List) screen To open the screen for checking the serial number and function version, select [Diagnostics] [System monitor] and click the button in GX Developer. Trace data setting On the same screen, the serial number and function version of intelligent function modules can also be checked. Serial Function number...
  • Page 46: Chapter2 Sequence Programs

    CHAPTER2 SEQUENCE PROGRAMS 2.1 Sequence Program Overview (1) Definition Sequence program is one of the programs that can be executed in the CPU module. A sequence program consists of instructions, such as sequence instructions, basic instruction, and application instruction. Sequence instruction K100 Basic instruction K4X10...
  • Page 47 CHAPTER2 SEQUENCE PROGRAMS (2) Programming method There are two programming modes for sequence programs. • Ladder mode • List mode (a) Ladder mode Ladder mode is a mode based on the concept of sequential control by relay circuits. A program in ladder mode is similar to a schematic for a set of relay circuits. Programming in units of ladder blocks is available.
  • Page 48: Sequence Program Configuration

    (3) Sequence program operation A sequence program is sequentially operated from the step 0 to the END or FEND instruction. In ladder mode, a sequence program is operated from left to right and top to bottom in a ladder block. [Ladder mode] [List mode] From left to right...
  • Page 49: Main Routine Program

    CHAPTER2 SEQUENCE PROGRAMS 2.2.1 Main routine program (1) Definition Main routine program is an entire program from the step 0 to the END or FEND instruction. (2) Program operation A main routine program executes its operations from the step 0 to the END or FEND instruction and then performs END processing.
  • Page 50: Subroutine Program

    2.2.2 Subroutine program (1) Definition Subroutine program is a program from a pointer (P ) to the RET instruction. This program is executed only when it is called by a subroutine program call instruction (such as CALL(P), FCALL(P)) from a main routine program. (2) Application •...
  • Page 51: Interrupt Program

    CHAPTER2 SEQUENCE PROGRAMS 2.2.3 Interrupt program (1) Definition Interrupt program is a program from an interrupt pointer (I ) to the IRET instruction. Main routine program Indicates the end of the main routine FEND program. Interrupt program (I0) IRET Interrupt program (I29) IRET Interrupt pointer...
  • Page 52 ● A pointer dedicated to the high-speed interrupt function (I49) Note2.1 is available as an interrupt pointer.Note1 When using I49, do not execute the following: • Another interrupt pointer (interrupt pointer other than I49) • Interrupt program • Fixed scan execution type program If any of the above pointer or program is executed, the interrupt program of I49 cannot be executed in the preset interrupt cycles.
  • Page 53 CHAPTER2 SEQUENCE PROGRAMS (2) Programming of interrupt programs Create interrupt programs between the FEND and END instructions in the main routine program. Program A Main routine program IRET Interrupt program IRET IRET Interrupt pointer Figure 2.9 Programming location of interrupt programs *1: Since the Basic model QCPU cannot execute multiple programs, the file name is fixed to "MAIN".
  • Page 54 (b) Restrictions on programming 1) PLS and PLF instructions The PLS and PLF instructions perform off processing in the next scan of which the instruction is executed. Therefore, the device which is turned on by the instruction remains on until the same instruction is reexecuted.
  • Page 55 CHAPTER2 SEQUENCE PROGRAMS (3) Operation when an interrupt factor occurs There are restrictions on interrupt programs depending on the interrupt factor occurrence timing. (a) When an interrupt factor occurs before the interrupt program execution status is enabled The CPU module stores the interrupt factor occurred. As soon as the interrupt program execution status is enabled, the CPU module executes the interrupt program corresponding to the stored interrupt factor.
  • Page 56 (c) When multiple interrupt factors occur simultaneously in the interrupt program execution enabled status The interrupt programs are executed in the order of interrupt pointers (I ) with high priority. ( Section 9.10.1) Other interrupt programs have to wait until processing of the interrupt program being executed is completed. Simultaneous occurrence of Interrupt multiple interrupt factors...
  • Page 57 CHAPTER2 SEQUENCE PROGRAMS 2) High Performance model QCPU, Process CPU, or Redundant CPU • The CPU module stores the interrupt factors of I0 to I27 and I50 to I255 only once. Then, the CPU module executes the interrupt program corresponding to the stored interrupt factor after completion of current interrupt program execution.
  • Page 58 (4) Processing at program execution type change When the program execution type is changed from the scan execution type or low-speed execution type to the interrupt, the CPU module saves and restores the following data. ( Section 9.6.3) • Data in the index register •...
  • Page 59: Settings When Program Is Divided

    CHAPTER2 SEQUENCE PROGRAMS 2.3 Settings When Program is Divided Note2.3 When one sequence program is divided into multiple programs, execution conditions, such as executing a program only once at start-up or executing a program at fixed intervals, can be set for each program.Note3 (1) Control by multiple programs dividing one program The CPU module can store multiple programs divided on the basis of each control unit.
  • Page 60 (2) Settings required for execution of multiple programs To execute multiple programs in the CPU module, names (file names) and execution conditions of the programs must be set. Set them in the Program tab of the PLC parameter dialog box. (b) 5) Programs are executed according to the setting...
  • Page 61 CHAPTER2 SEQUENCE PROGRAMS 5) Fixed scan execution type ("Fixed scan") This program is executed at time intervals specified with fixed scan interval and unit. ( Section 2.3.5) • Fixed scan interval ("Fixed scan interval") Enter the execution interval of fixed scan execution type program. The setting range varies depending on the setting unit.
  • Page 62 (d) I/O refresh setting The CPU module updates all inputs and outputs of the input/output modules and intelligent function modules by I/O refresh. ( Section 3.8.1) I/O refresh setting allows I/O refresh to be performed for each program (within the specified range). Figure 2.19 I/O refresh setting 1) Application This setting is useful when fixed scan execution type programs are used.
  • Page 63: Initial Execution Type Program

    CHAPTER2 SEQUENCE PROGRAMS (3) Program sequence in the CPU module Figure 2.20 shows the program sequence after the CPU module is powered on or its operating status is changed from STOP to RUN. Powered off on/STOP Executed only once when the CPU module is powered on or its status is Initial execution...
  • Page 64: Initial Execution Type Program

    2.3.1 Initial execution type program (1) Definition 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 65 CHAPTER2 SEQUENCE PROGRAMS (b) 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. 1) Initial scan time storage location The CPU module measures the initial scan time and stores it into the special register (SD522 and SD523).
  • Page 66 (4) Initial execution monitoring time setting Initial execution monitoring time is a timer for monitoring initial scan time. Set a time value in the PLC RAS tab of the PLC parameter dialog box. The setting range is 10 to 2000ms (in increments of 10ms). No default value is set.
  • Page 67: Scan Execution Type Program

    CHAPTER2 SEQUENCE PROGRAMS 2.3.2 Scan execution type program (1) Definition 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 supply ON 1st scan 2nd scan 3rd scan...
  • Page 68: Low-Speed Execution Type Program

    2.3.3 Low-speed execution type program Note2.5 (1) Definition Low-speed execution type program is executed only when the constant scan function is used or a low-speed program execution time value is set. This type of program can be used for programs that are not necessary to be executed in every scan (such as a program for printer output).Note5 Scan time (1 scan)
  • Page 69 CHAPTER2 SEQUENCE PROGRAMS (b) When time is still remained in scan time after execution of all low-speed execution type programs Processing performed after execution of all low-speed execution type programs differs depending on the on/off status of the special relay (SM330) and the execution condition of low-speed execution type programs. 1) Asynchronous mode (SM330 = off) Execution of low-speed execution type programs is continued within the remaining time.
  • Page 70 <<When a constant scan time value is set>> The following timing charts show the CPU module operation when low-speed execution type programs are executed under the conditions given below. • Constant scan time value : 8ms • Total execution time of scan execution type programs : 4 to 5ms •...
  • Page 71 CHAPTER2 SEQUENCE PROGRAMS <<When a low-speed program execution time value is set>> The following timing charts show the CPU module operation when low-speed execution type programs are executed under the conditions given below. • Low-speed program execution time value : 3ms •...
  • Page 72 (c) When low-speed execution type programs were not processed within the remaining time in each constant scan or the low-speed program execution time Program execution is stopped and the rest of the program is executed in the next scan. (d) Low-speed END processing When all the low-speed execution type programs are executed, the CPU module performs low-speed END processing.
  • Page 73 CHAPTER2 SEQUENCE PROGRAMS (e) Low-speed scan time Low-speed scan time is a total of the execution time of all low-speed execution type programs and the low- speed END processing time. For differences between the low-speed scan time and the scan time, refer to Figure 2.31. 1) Low-speed scan time storage location The CPU module measures the low-speed scan time and stores it into the special register (SD528 to SD535).
  • Page 74 (3) Precautions on programming (a) Low-speed program execution time value setting Setting a low-speed program execution time value increases the scan time since the set period of time is secured. Set a low-speed program execution time value so that the scan time becomes shorter than the watchdog timer or increase the WDT setting value.
  • Page 75 CHAPTER2 SEQUENCE PROGRAMS (4) Settings for low-speed execution type program execution Set the following in the PLC RAS tab of the PLC parameter dialog box. • Constant scan time value ("Constant scanning") Setting range: 0.5 to 2000ms (in increments of 0.5ms) •...
  • Page 76: Stand-By Type Program

    2.3.4 Stand-by type program (1) Definition Stand-by type program is executed only when its execution is requested. This type of program can be changed to any desired execution type by a sequence program instruction. (2) Application (a) Program library Stand-by type program is used as a program library, a collection of subroutine programs and/or interrupt programs, and managed separately from a main routine program.
  • Page 77 CHAPTER2 SEQUENCE PROGRAMS (3) Execution method Execute stand-by type programs in either of the following methods. • Create subroutine and/or interrupt programs in a stand-by type program and call them using a pointer or when an interrupt occurs. • Change a stand-by type program to any other execution type using instructions. (a) Creating subroutine and/or interrupt programs in a single stand-by type program When creating subroutine and/or interrupt programs in a single stand-by type program, start the program from the step 0.
  • Page 78 1) Executing a subroutine program and interrupt program in a stand-by type program After execution of the stand-by type program, the CPU module reexecutes the program that called a program in the stand-by type program. Figure 2.35 shows the operation when the subroutine and interrupt programs in the stand-by type program are executed.
  • Page 79 CHAPTER2 SEQUENCE PROGRAMS (b) Changing the program execution type using instructions Use the PSCAN, PSTOP, or POFF instruction to change a program execution type. 1) Changing the execution type (in the case of scan execution type program) • Set the programs "ABC" and "GHI" as scan execution type programs and the program "DEF" as a stand- by type program.
  • Page 80 2) Execution type change timing The program execution type is changed in END processing. Therefore, the execution type will not be changed in the middle of program execution. If different types are set to the same program in the same scan, the program will be changed to the type specified by the last instruction executed.
  • Page 81: Fixed Scan Execution Type Program

    CHAPTER2 SEQUENCE PROGRAMS 2.3.5 Fixed scan execution type program (1) Definition 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.
  • Page 82 (2) 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 83 CHAPTER2 SEQUENCE PROGRAMS (d) When the execution condition is established during END processing When the execution condition is established during the waiting time of the constant scan execution or the END instruction, a fixed scan execution type program is executed. Constant scan Fixed scan interval END processing...
  • Page 84 (4) 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 85: Changing The Program Execution Type

    CHAPTER2 SEQUENCE PROGRAMS 2.3.6 Changing the program execution type (1) Changing the execution type using instructions (a) Instructions used to change the execution type The execution type of sequence programs can be changed using instructions even during execution. Use the PSCAN, PLOW, , PSTOP, or POFF instruction to change the execution type.Note6 Note2.6...
  • Page 86 (b) Execution type change example In a control program, a stand-by 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 stand-by type program. Figure 2.43 shows the case where the execution type of the stand-by type programs "ABC", "DEF", "GHI", and "JKL"...
  • Page 87: Data Used In Sequence Programs

    CHAPTER2 SEQUENCE PROGRAMS 2.4 Data Used in Sequence Programs The CPU module represents numeric and alphabetic data using two symbols (states): 0 (off) and 1 (on). Data represented using these two symbols is called binary number (BIN). The CPU module can also use hexadecimal (HEX) (each hexadecimal digit represents four binary bits), binary-coded decimal (BCD), or real numbers.
  • Page 88 (1) Inputting numeric values externally to the CPU module When setting a numeric value to the CPU module externally using a digital switch, BCD (binary-coded decimal) can be used as DEC (decimal) by the method given in (b). (a) Numeric values used inside the CPU module The CPU module performs program operations in binary.
  • Page 89 CHAPTER2 SEQUENCE PROGRAMS (2) Outputting numeric values externally from the CPU module When externally displaying numeric values operated in the CPU module, a digital indicator can be used. (a) Outputting numeric values The CPU module performs program operations in binary. If the binary values used in the CPU module are output to a digital indicator, the indicator does not show the values correctly.
  • Page 90: Bin (Binary Code)

    2.4.1 BIN (Binary Code) (1) Definition Binary is a numeral system that represents numeric values using two symbols, 0 (off) and 1 (on). Decimal notation uses the symbols 0 through 9. When the symbols for the first digit are exhausted (a digit reaches 9), the next-higher digit (to the left) is incremented, and counting starts over at 0.
  • Page 91: Hex (Hexadecimal)

    CHAPTER2 SEQUENCE PROGRAMS 2.4.2 HEX (Hexadecimal) (1) Definition Hexadecimal (HEX) is a numeral system that represents four binary bits as one digit. With four binary bits, sixteen different numeric values, 0 to 15, can be represented. Hexadecimal notation uses 16 symbols to represent numeric values 0 to 15 in one digit, the symbols 0 to 9 to represent values zero to nine, and AH to FH to represent values ten to fifteen.
  • Page 92: Bcd (Binary-Coded Decimal)

    2.4.3 BCD (Binary-coded Decimal) (1) Definition BCD is a numeral system that uses four binary bits to represent the decimal digits 0 through 9. The difference from hexadecimal is that BCD does not use letters A to F. Table2.7 shows the numeric representations in BIN, BCD, and DEC. Table2.7 Numeric representations in BIN, BCD, and DEC DEC (Decimal) BIN (Binary)
  • Page 93: Real Number (Floating-Point Data)

    CHAPTER2 SEQUENCE PROGRAMS 2.4.4 Real number (Floating-point data) There are two types of real number data: single-precision floating-point data and double-precision floating-point data. (1) Single-precision floating-point data (a) Internal representation Internal representation of real numbers used in the CPU module is given below. Real number data can be represented as follows, using two word devices.
  • Page 94 (b) Calculation example Calculation examples are shown below. (The "X" in (nnnnnn) indicates the numeral system used.) 1) Storing "10" (10) (1010) (1.010000..Sign: Positive Exponent: (10000010) Mantissa: (010 00000 00000 00000 00000) In this case, the value will be encoded as 41200000 Sign Exponent Mantissa...
  • Page 95 CHAPTER2 SEQUENCE PROGRAMS (c) Performing internal operations in double precision Note2.7 Select the checkbox for the Floating-point arithmetic processing parameter in the PLC system tab of the PLC parameter dialog box. (The checkbox is selected by default.)Note7 Deselect the checkbox here if internal operations are not necessary to be performed in double precision.
  • Page 96: Character String Data

    2.4.5 Character string data (1) Definition The CPU module uses shift JIS code character strings. 2 - 51...
  • Page 97: Chapter3 Cpu Module Operation

    CHAPTER3 CPU MODULE OPERATION CHAPTER3 CPU MODULE OPERATION This chapter describes operation of the CPU module. 3.1 Initial Processing The CPU module performs preprocessing required for sequence program operations. The preprocessing is executed only once when any of the operations described in Table3.1 is performed to the CPU module.
  • Page 98: I/O Refresh (Refresh Processing With Input/Output Modules)

    ● The switch for STOP, RUN, and RESET of the CPU module differs depending on the CPU module. High Performance model QCPU, Process CPU, and Basic model QCPU Redundant CPU RUN/STOP switch RUN/STOP/RESET switch STOP RESET STOP RESET/L.CLR switch RESET L.CLR ●...
  • Page 99: End Processing

    CHAPTER3 CPU MODULE OPERATION 3.4 END Processing The CPU module performs refresh processing with network modules and communication with external devices. END processing includes the following. Table3.2 END processing list CPU module Item Reference Basic model High Performance Process Redundant QCPU model QCPU Refresh with network modules...
  • Page 100: Operation Processing In The Run, Stop, Or Pause Status

    3.5 Operation Processing in the RUN, STOP, or PAUSE Status There are three types of operating status of the CPU module. • RUN status • STOP status • PAUSE status This section describes program operation processing in the CPU module based on its operating status. (1) Operation processing in the RUN status RUN status is a status where sequence program operations are repeatedly performed in a loop between the step 0 and the END (FEND) instruction.
  • Page 101 CHAPTER3 CPU MODULE OPERATION (4) Operation processing in the CPU module when switch operation is performed Table3.3 Operation processing when switch operation is performed CPU module operation processing RUN/STOP Sequence program Device memory status operation External output M,L,S,T,C,D processing The CPU module saves The CPU module saves The CPU module the output (Y) status...
  • Page 102: Operation Processing During Momentary Power Failure

    3.6 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 103: Data Clear Processing

    CHAPTER3 CPU MODULE OPERATION Data Clear Processing This section describes how to clear data in the CPU module and the setting required for the latch data clear. (1) Clearing data in the CPU module Data in the CPU module are cleared when the reset operation (by the RUN/STOP/RESET switch or by powering the module off and then on) is performed.
  • Page 104 (2) Latch specification of devices Set a latch range for each latch-target device in the Device tab of the PLC parameter dialog box. ( Section 6.3(5)) (a) Latch range setting Two kinds of latch range can be set by GX Developer. 1) Latch clear operation enable range ("Latch (1) start/end") Data in this latch range can be cleared by the RESET/L.CLR switch or the remote latch clear...
  • Page 105: I/O Processing And Response Delay

    CHAPTER3 CPU MODULE OPERATION 3.8 I/O Processing and Response Delay The CPU module performs I/O processing in the refresh mode. Using the direct access input/output in a sequence program, however, allows the CPU module to perform I/O processing in the direct mode at the time of each instruction execution. This section describes these I/O processing modes of the CPU module and response delays.
  • Page 106: Refresh Mode

    3.8.1 Refresh mode (1) Definition Refresh mode is a mode for the CPU module to access input/output modules and perform I/O processing collectively before the start of sequence program operations Input of on/off data by input refresh Device memory Output of on/off data by output refresh On/off data On/off...
  • Page 107 CHAPTER3 CPU MODULE OPERATION (3) Output The operation results of the sequence program is output to the output (Y) device memory in the CPU module every time program operation is performed. Then, the CPU module batch-outputs the on/off data in the output (Y) device memory to an output module before the start of sequence program operations.
  • Page 108 The remote input refresh area indicates the area to be used when auto refresh is set to the input (X) in the CC-Link IE Controller Network, MELSECNET/H, or CC-Link. Data in the remote input refresh area will be refreshed automatically during END processing. Data in the GX Developer input area can be turned on/off by the following operation.
  • Page 109 CHAPTER3 CPU MODULE OPERATION (4) 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. Examples A program that turns on the output Y5E when the input X5 turns on.
  • Page 110: Direct Mode

    3.8.2 Direct mode (1) Definition The direct mode is a mode for the CPU module to access input/output modules and performs I/O processing at the timing when each instruction is executed in a sequence program. Input of on/off data upon instruction execution Device memory Output of on/off data upon...
  • Page 111 CHAPTER3 CPU MODULE OPERATION CPU module CPU (operation 2) Input area processing area) for the GX Input Developer module Input (X) device memory Output (Y) Output device DY25 module memory • When a contact instruction for input is executed: The CPU module performs a logical OR operation between input data from the input module 1) and input data in the GX Developer input area 2) or data in the remote input refresh area.
  • Page 112 (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 Examples A program that turns on the output DY5E DY5E when the input DX5 turns on External contact (External contact) CPU module...
  • Page 113: Chapter4 Assignment Of Base Unit And I/Onumber

    CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER This chapter describes the base unit and I/O number assignment required for the CPU module to communicate data with I/O modules and/or intelligent function modules. 4.1 Base Unit Assignment 4.1.1 Base mode Use this mode when assigning the number of available slots to the main base unit and extension base units.
  • Page 114: Base Unit Assignment Setting

    (b) Setting the number of slots smaller than the actual one Set the smaller number than the actual number of slots when slots with no module mounted need not be recognized. For example, four slots from the right end of the base unit will be the prohibited slots when using a 12-slot base unit and setting the number of available slots to eight.
  • Page 115 CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER (3) Slots When "Detail" is set, select the number of slots on the base unit to use from the following. 2 (2 slots), 3 (3 slots), 5 (5 slots), 8 (8 slots), 10 (10 slots), or 12 (12 slots) (4) 8 Slot Default/12 Slot Default When "Detail"...
  • Page 116: I/O Number Assignment

    4.2 I/O Number Assignment The I/O number indicates addresses used for sequence programs in the following cases. • Input of on/off data to the CPU module • Output of on/off data from the CPU module to the external device (1) Input and output of on/off data The input (X) is used to input on/off data to the CPU module, and the output (Y) is used to output on/off data from the CPU module.
  • Page 117: Concept Of I/O Number Assignment

    CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER 4.2.1 Concept of I/O number assignment The CPU module assigns I/O numbers at power on or reset, according to the I/O assignment setting. (1) I/O number assignment The Figure 4.5 shows an example of I/O number assignment to base units in the system where the CPU module is mounted on the main base unit.
  • Page 118 (2) I/O assignment on a remote I/O stations Note3 Note4.1 CPU module device input (X) and output (Y) can be assigned to I/O modules and intelligent function modules, which allows to control the modules in the remote I/O system such as MELSECNET/H remote I/O network and CC-Link.
  • Page 119 CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER (b) Precautions for using remote station I/O numbers 1) Setting for future extension When the input (X) and output (Y) of the CPU module are used for the I/O numbers on the remote station, consider future extension of I/O modules and/or intelligent function modules on the CPU module side.
  • Page 120: Setting I/O Numbers

    4.2.2 Setting I/O numbers Set the I/O number on the I/O assignment tab. (1) Purpose of I/O number assignment (a) Reserving points for future module changes The number of points can be flexibly set so that the I/O number modification can be avoided when changing the current module to another in the future.
  • Page 121 CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER (2) I/O assignment The I/O assignment is set on the I/O assignment tab of the PLC parameter dialog box. On the I/O assignment tab, the following items can be set for each slot on the base unit. •...
  • Page 122 (b) Type Select the type of the mounted module from the following: • Empty (empty slot) • Input (input module) • Hi input (high-speed input module) • Output (output module) • I/O Mix (I/O combined module) • Intelli. (intelligent function module) •...
  • Page 123 CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER (3) Precautions (a) Type setting The type set to the I/O assignment tab must be the same as that of the mounted module. Setting a different type may cause incorrect operation. For the intelligent function module, the I/O points must also be the same in addition to the I/O assignment setting.
  • Page 124 (c) Start XY setting When the start XY has not been entered, the CPU module automatically assigns it. The CPU module automatically assigns the start XY if it is not set. For this reason, the start XY setting of each slot may be duplicated with the one assigned by the CPU module in the case of 1) or 2) below.
  • Page 125 CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER (d) When using extension base units compatible with the AnS/A series Note4 Note4.2 Take the following precautions when using the AnS/A series-compatible extension base units (QA1S5 B, QA1S6 B, and QA6 B): •...
  • Page 126: I/O Number Setting Example

    4.2.3 I/O number setting example I/O number setting examples are provided as follows. (1) Changing the number of points of an empty slot from 16 to 32 Reserve 32 points for the currently empty slot (Slot 3) so that the I/O numbers of Slot No. 4 and later do not change when a 32-point input module is mounted there in the future.
  • Page 127 CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER (b) I/O assignment Select "32 points" for the number of I/O points of Slot 3 in the I/O assignment setting of PLC parameter in GX Developer. Select 32 points. (When the type is not selected, the type of the mounted module will be set.) Figure 4.12 I/O assignment setting (When changing points of Slot 3)
  • Page 128 (2) Changing the I/O number of an empty slot Change the I/O number of the currently empty slot (Slot 3) to X200 through 21F so that the I/O numbers of Slot 4 and later do not change when a 32-point input module is mounted there in the future. (a) System configuration and I/O number assignment before the I/O assignment using GX Developer Q38B...
  • Page 129: Checking I/O Numbers

    CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER (c) I/O number assignment after the I/O assignment using GX Developer Q38B Slot number 32 points 32 points 32 points 32 points 32 points 32 points 32 points 32 points Number of I/O points X00 X20 X200 Y70 Y90 YB0 YD0...
  • Page 130: Chapter5 Memories And Files Used For Cpu Module

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.1 Memories Used for Basic Model QCPU 5.1.1 Memory composition and storable data This section describes the memories used for the Basic model QCPU and data that can be stored in the memories. (1) Memory composition Program memory Parameter...
  • Page 131 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (2) Data that can be stored in each memory Table5.1 provides the data that can be stored in each memory. Table5.1 Data that can be stored in each memory CPU module built-in memory Program memory Standard RAM Standard ROM...
  • Page 132: Program Memory

    5.1.2 Program memory (1) Definition This memory is for storing programs and parameters for CPU module operation. If the total size of data to be stored exceeds the program memory capacity: • reduce the user setting system area, or • transfer data other than programs to the standard ROM. (2) Before using the program memory Format the program memory by GX Developer.
  • Page 133 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (b) Creating a user setting system area When formatting a program memory, set the capacity of user setting system area. 1) Do not create a user setting system area (the necessary system area only) The user setting system area is not created during formatting.
  • Page 134 (3) Writing to the program memory Select [Online] [Write to PLC] in GX Developer. Select "Program memory/Device memory" in "Target memory" on the Write to PLC screen. Figure 5.4 Write to PLC screen The file size has its minimum unit. ( Section 5.4.4) The occupied memory capacity may be greater than the actual file size.
  • Page 135: Standard Rom

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.1.3 Standard ROM (1) Definition This memory is for storing data such as parameters and programs. Programs and parameters can be stored without battery backup. (2) Checking the memory capacity Select [Online] [Read from PLC] in GX Developer.
  • Page 136: Standard Ram

    5.1.4 Standard RAM Note5.1 DefinitionNote1 This memory is for file registers. (2) Before using the standard RAM Format the standard RAM by GX Developer for the Basic model QCPU of function version A. For the Basic model QCPU of function version B or later, formatting the standard RAM is not required but clearing standard RAM data is required.
  • Page 137 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (b) Checking the memory capacity after formatting Select [Online] [Read from PLC] in GX Developer. 1) Select "Standard RAM" in "Target memory" on the Read from PLC screen. 2) Click the button. Free space volume 3) The memory capacity appears in "Total free space volume".
  • Page 138: Operating And Writing Programs In The Standard Rom (Boot Operation)

    5.1.5 Operating and writing programs in the standard ROM (boot operation) Since a program stored in the standard ROM cannot be operated, boot the program to the program memory. Program memory Boot Standard ROM CPU module Figure 5.9 Boot operation (1) Program execution (boot operation) Boot a program by the following procedure.
  • Page 139 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (c) Writing to the standard ROM The following describes the operations before writing and the methods for writing. 1) Before writing Writing a file to the standard ROM automatically deletes all files stored in the standard ROM. Therefore, store the stored files again by “Read from PLC”...
  • Page 140 (3) Operation for stopping boot operation To stop boot operation and operate parameters and programs written to the program memory, perform the following operations. 1) Format the program memory. 2) Select [Online] [Write to PLC (Flash ROM)] [Write the program memory to ROM] in GX Developer (programs and parameters in the standard ROM are deleted).
  • Page 141 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (e) Writing a file from GX Developer in another station via CC-Link Since writing a file to the standard ROM takes time, make the CPU monitoring time setting (SW0A) of CC-Link to 180 seconds or longer. CPU module that writes files to the standard ROM GX Developer in another station...
  • Page 142: Memories Used For High Performance Model Qcpu, Process Cpu, And Redundant Cpu

    5.2 Memories Used for High Performance model QCPU, Process CPU, and Redundant CPU 5.2.1 Memory composition and storable data This section describes the memories used for the High Performance model QCPU, Process CPU, and Redundant CPU and data that can be stored in the memories. (1) Memory composition Program memory Parameter...
  • Page 143 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (2) Data that can be stored in each memory Table5.4 provides the data that can be stored in each memory. Table5.4 Data that can be stored in each memory Memory Memory card CPU module built-in memory (ROM) card (...
  • Page 144 (3) Memory capacities and necessity of formatting Table5.5 provides the memory capacities and necessity of formatting of each memory. Format a memory requiring formatting by GX Developer beforehand. Table5.5 Memory capacities and necessity of formatting Formatting Q02CPU Q02HCPU Q06HCPU Q12HCPU Q25HCPU 112k bytes 112k bytes...
  • Page 145: Program Memory

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.2.2 Program memory (1) Definition This memory is for storing programs and parameters for CPU module operation. If the total size of data to be stored exceeds the program memory capacity: • reduce the user setting system area, or •...
  • Page 146 (b) Creating a user setting system area When formatting a program memory, set the capacity of user setting system area. 1) Do not create a user setting system area (the necessary system area only) The user setting system area is not created during formatting. 2) Create a user setting system area The user setting system area is created during formatting.
  • Page 147 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (3) Writing to the program memory Select [Online] [Write to PLC] in GX Developer. Select "Program memory/Device memory" in "Target memory" on the Write to PLC screen. Figure 5.16 Write to PLC screen The file size has its minimum unit.
  • Page 148: Standard Rom

    5.2.3 Standard ROM (1) Definition This memory is for storing data such as parameters and programs. Programs and parameters can be stored without battery backup. (2) Checking the memory capacity Select [Online] [Read from PLC] in GX Developer. 1) Select "Standard ROM" in "Target memory" on the Read from PLC screen. 2) Click the button.
  • Page 149: Standard Ram

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.2.4 Standard RAM (1) Definition This memory is for using file registers, local devices, and sampling trace files without a memory card. Storing the file registers in the standard RAM allows fast access as data registers do. ●...
  • Page 150 (b) Checking the memory capacity after formatting Select [Online] [Read from PLC] in GX Developer. 1) Select "Standard RAM" in "Target memory" on the Read from PLC screen. 2) Click the button. Free space volume 3) The memory capacity appears in "Total free space volume". 1) Select the target memory.
  • Page 151: Memory Card

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.2.5 Memory card (1) Definition This memory is for expansion of a memory in the CPU module. The following three types are available: • SRAM card • Flash card • ATA card (a) SRAM card File registers in the SRAM card can be written or read by the sequence program.
  • Page 152 (2) Before using the SRAM card or ATA card Format the SRAM card or ATA card by GX Developer. (a) Formatting Select [Online] [Format PLC memory] in GX Developer • When formatting the SRAM card, select "Memory card (RAM)" in "Target memory". •...
  • Page 153 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (b) Checking the memory capacity after formatting Select [Online] [Read from PLC] in GX Developer. 1) Select "Memory card (RAM)" or "Memory card (ROM)" in "Target memory" on the Read from PLC screen. 2) Click the button.
  • Page 154 (b) Writing to the Flash card The following two methods are available. • Writing by "Write the program memory to ROM" ( Section 5.2.6(1)(a)) • Writing by "Write to PLC (Flash ROM)" ( Section 5.2.6(1)(b)) The file size has its minimum unit. ( Section 5.4.4) The occupied memory capacity may be greater than the actual file size.
  • Page 155: Writing To The Standard Rom And Flash Card By Gx Developer

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.2.6 Writing to the standard ROM and Flash card by GX Developer standard ROM and (1) Methods for writing data to the Flash card and applications Figure 5.24 provides the methods for writing data to the standard ROM and Flash card. CPU module Program GX Developer...
  • Page 156 (2) Writing to the standard ROM and Flash card The following describes the operations before writing and the methods for writing. (a) Before writing Check the following. 1) Preparing files to be written Writing a file to the standard ROM or Flash card automatically deletes all files stored in the standard ROM or Flash card.
  • Page 157 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 2) Procedure using [Write to PLC (Flash ROM)] in GX Developer • Select [Online] [Write to PLC (Flash ROM)] [Write to PLC (Flash ROM)]. • The Write to PLC (Flash ROM) screen appears. Figure 5.26 Write to PLC (Flash ROM) screen •...
  • Page 158 (4) Precautions (a) Setting the communication time check period in GX Developer Since writing a file to the standard ROM or Flash card takes time, set "Check at communication time" in GX Developer to 60 seconds or longer. If the set time is short, GX Developer may time out. Figure 5.27 Check at communication time setting (b) Writing a file from GX Developer in another station via CC-Link Since writing a file to the standard ROM or Flash card takes time, make the CPU monitoring time setting...
  • Page 159 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (c) Time required for “Write to PLC (Flash ROM)” Using "Write to PLC (Flash ROM)” writes data to the entire space in the Flash card. Therefore, even if a program having the small number of steps is written to the Flash card, the processing takes time.
  • Page 160: Automatic All Data Write From Memory Card To Standard Rom

    5.2.7 Automatic all data write from memory card to standard ROM Note5.2 (1) Definition The automatic all data write from memory card to standard ROM function (hereafter, automatic write to standard ROM) automatically writes parameters and programs written to a memory card to the standard ROM.Note2 As shown in Figure 5.29, this function boots programs and parameters from a memory card to the program memory and writes the booted programs and parameters from the program memory to the standard ROM.
  • Page 161 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (3) Execution procedure for automatic write to standard ROM Perform this function by the following procedure. (a) Setting with GX Developer 1) Select "Clear program memory" and "Auto Download all Data from Memory card to Standard ROM" in the Boot file tab of the PLC parameter dialog box.
  • Page 162 4) Power on the CPU module. Boot the files in the memory card to the program memory. After boot operation, write the program memory data to the standard ROM. 5) After automatic write to standard ROM, the BOOT LED and ERR. LED start flashing and the CPU module enters stop error status.
  • Page 163: Operating The Program In The Standard Rom And Memory Card (Boot Operation)

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.2.8 Operating the program in the standard ROM and memory card (boot operation) This section describes methods for operating the program stored in the standard ROM and memory card. (1) Operating the program in the standard ROM and memory card To execute the boot operation, set the names of files to be booted in the Boot file tab of the PLC parameter dialog box.
  • Page 164 (3) Procedure before boot operation The following explains the procedures to store the files to be booted in the standard ROM or memory card and start boot operation. (a) Creating a program Create a program. (b) Boot file setting Set the files ("Type", "Data name", and "Transfer from") to be booted to the program memory in the Boot file tab of the PLC parameter dialog box.
  • Page 165 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (d) Installing a memory card (when the boot source is a memory card) Mount the memory card to the CPU module. (e) Writing parameters to the standard ROM or memory card Write the parameters to a memory set as the parameter-valid drive with the DIP switches. Also, write the files set in the Boot file tab in (b) to the transfer source memory.
  • Page 166 (5) Changing a program file in the RUN status Note3 Note5.3 (a) Methods Use the following instructions. • PLOADP instruction (program transfer from memory card to program memory) • PUNLOADP instruction (program deletion from program memory) • PSWAPP instruction (program deletion from program memory and program transfer from memory card to program memory) For details of each instruction, refer to the following.
  • Page 167 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (b) Online change in boot operation 1) SRAM card, ATA card When a program in the program memory is written in the RUN status ( Section 6.12), the change can be updated to the program in the boot source SRAM card or ATA card. 2) Standard ROM, Flash card Even if data are written to a program in the program memory in the RUN status, the change is not updated to the program in the boot source standard ROM or flash card.
  • Page 168: Details Of Written Files

    5.2.9 Details of written files For each file written to the CPU module, its name, size, and created date and time set at the file creation are appended. The file is displayed on the Read from PLC screen, opened by selecting [Online] [Read from PLC] in GX Developer, as shown below.
  • Page 169: Specifying Valid Parameters (Parameter-Valid Drive Setting)

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (b) Date and time The date and time when a file was written to the CPU module is shown. The date and time are appended according to the clock set on the GX Developer (personal computer) side. (c) Size The file size when the file was written from GX Developer to the CPU module is shown in units of bytes (To display the latest data, select [Online]...
  • Page 170: Program File Structure

    5.3 Program File Structure A program file consists of a file header, execution program, and reserved area for online change. Program file structure 34 steps File header (By default) Execution program These areas are reserved in units Section 5.4.4 of file sizes. ( Reserved area for 500 steps online change...
  • Page 171 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (2) Displaying the program capacity on the GX Developer screen During programming by GX Developer, the program size (total of the file header size and the number of steps in the created program) is displayed by the number of steps as shown in Figure 5.39. The program size is displayed.
  • Page 172: File Operations By Gx Developer And Handling Precautions

    5.4 File Operations by GX Developer and Handling Precautions 5.4.1 File operations Table5.9 shows the functions can be performed to files stored in the program memory, standard ROM, and memory card by the online functions of GX Developer. However, the executable operations depend on the password registration setting by GX Developer, status of the system protect switch of the CPU module, and the CPU module status.
  • Page 173: Precautions For Handling Files

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.4.2 Precautions for handling files (1) Power-off or reset at file operation When the CPU module is powered off or reset during file operation, files in each memory will be the status as shown in Table5.10.
  • Page 174: File Size

    5.4.3 File size The size of a file used for the CPU module depends on the file type. 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.
  • Page 175 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (2) High Performance model QCPU, Process CPU, and Redundant CPU When using the program memory, standard RAM, standard ROM, or memory card, calculate the rough size of each file with reference to Table5.12. Table5.12 Calculation of file size (High Performance model QCPU, Process CPU, and Redundant CPU) Function Rough file size (unit: Byte)
  • Page 176 Table5.12 Calculation of file size (High Performance model QCPU, Process CPU, and Redundant CPU) (continued) Function Rough file capacity (unit: Byte) 72 + 6 (set device type) + (2 ((total number of M and V points)/16 + (number of D points) + 18 (total number of T, ST, and C points)/16)) (number of programs)
  • Page 177: Units Of File Sizes

    CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.4.4 Units of file sizes (1) Definition 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. (a) File size unit for each memory area The following table shows the file size unit depending on the CPU module and memory area to be written.
  • Page 178 (2) Calculation example of memory capacity The following shows an calculation example of memory capacity when the parameters and sequence program are written to the program memory. (a) Conditions 1) CPU module to be written: Q25HCPU 2) Writing file Table5.15 File sizes File name File size PARAM.QPA (parameter file)
  • Page 179 CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 2) Calculation of program size The program size is found by the formula: sequence program size + reserved area for online change. Since files are stored in units of file sizes to the program memory, the parameter file size is 525 steps + 500 steps = 1025 steps.
  • Page 180 The file size unit of the following CPU modules has been changed. • High Performance model QCPU having the serial number (first five digits) "04122" or later • Process CPU having the serial number (first five digits) "07032" or later Note the following.
  • Page 181: Chapter6 Functions

    CHAPTER6 FUNCTIONS CHAPTER6 FUNCTIONS This chapter describes the functions of the CPU module. 6.1 Function List Table6.2 lists the functions of the CPU module. Each number in the "CPU module" column corresponds to the CPU module listed in Table6.1. Table6.1 Number in the column and the corresponding CPU module Number CPU module Basic model QCPU...
  • Page 182 Table6.2 Function list (continued) CPU module Referenc Item Description Makes settings for the intelligent function modules and interrupt Intelligent function module Section modules. (Refer to manuals of intelligent function modules and switch setting 6.10 interrupt modules for setting details.) Reads the status of programs and devices in the CPU module by Section Monitor function GX Developer.
  • Page 183 CHAPTER6 FUNCTIONS Table6.2 Function list (continued) CPU module Item Description Reference Connects the RS-232 interface of the CPU module and the Serial communication function Section 6.24 personnel computer or HMI with RS-232 cable and communicates in the MC protocol. Monitors the service interval time (time from service Module service interval time acceptance to next service acceptance) of the Section 6.25.1...
  • Page 184: Constant Scan

    6.2 Constant Scan (1) Definition Scan time of the CPU module is not constant because the processing time varies depending on the execution status of instructions used in a sequence program.Note1 This function allows sequence programs to be executed repeatedly, maintaining its scan time constant. (2) Application I/O refresh is performed before every sequence program execution.
  • Page 185 CHAPTER6 FUNCTIONS (3) Constant scan time setting Set a constant scan time value in the PLC RAS tab of the PLC parameter dialog box. The setting range varies depending on the CPU module. • Basic model QCPU: 1 to 2000ms (in increments of 1ms) •...
  • Page 186 (a) Condition The constant scan time needs to satisfy the following relational expression. (WDT setting time) > (Constant scan setting time) > (Sequence program maximum scan time) If the sequence program scan time is longer than the constant scan setting time, the CPU module detects "PRG.
  • Page 187 CHAPTER6 FUNCTIONS (5) Constant scan accuracy Table6.3 shows the constant scan accuracy. Table6.3 Constant scan accuracy Without With monitor, monitor, Without monitor, with user With monitor, with user CPU module without user without user interrupt interrupt interrupt interrupt Q00JCPU 0.20ms 0.90ms Total of the following: 1) Time given under the "With...
  • Page 188: Latch Function

    6.3 Latch Function (1) Definition 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 • power failure occurs exceeding the allowable momentary power failure time. Data in each device of the CPU module is cleared and set back to its default (bit device: off, word device: 0) without using the latch function.
  • Page 189 CHAPTER6 FUNCTIONS (5) Latch range setting Set a latch range in the Device tab of the PLC parameter dialog box. There are two types of latch range settings: the latch clear operation enable range setting (Latch (1)) and the latch clear operation disable range setting (Latch (2)).
  • Page 190 (8) Precautions (a) When a local device or initial device value is specified Device data cannot be latched even if the device has been latch-specified. (b) Use of battery Device data in the latch range are held with the battery installed to the CPU module. •...
  • Page 191: Output Mode At Operating Status Change (Stop To Run)

    CHAPTER6 FUNCTIONS 6.4 Output Mode at Operating Status Change (STOP to RUN) (1) Definition 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). The status of the outputs (Y) when the operating status of the CPU module is changed back from STOP to RUN can be selected from the following two options in the parameter setting in GX Developer.
  • Page 192 (3) Operation when the operating status is changed from STOP to RUN (a) Previous state (Default) The CPU module outputs the output (Y) status immediately before changing to the STOP status and then performs sequence program operations. (b) Recalculate (output is 1 scan later) All outputs are turned off.
  • Page 193 CHAPTER6 FUNCTIONS (5) Precautions Table6.5 shows the output status of the CPU module when the operating status is changed from STOP to RUN after the outputs (Y) are forcibly turned on in the STOP status. Table6.5 Output status when the operating status is changed from STOP to RUN after the output forced on operation is performed Output mode ("Output mode at STOP to RUN") Output status...
  • Page 194: Clock Function

    6.5 Clock Function (1) Definition This function reads the internal clock data of the CPU module by a sequence program and uses it for time management. The clock data is used for time management required for some functions in the system, such as storing date into the error history.
  • Page 195 CHAPTER6 FUNCTIONS (4) Changing and reading clock data (a) Changing clock data Clock data can be changed either by GX Developer or a program. 1) Changing clock data by GX Developer Select [Online] [Set time] to open the Set time screen and change the clock data. Figure 6.10 Set time screen 2) Changing clock data by a program Use the DATEWR instruction (instruction for writing clock data) to change the clock data.
  • Page 196 (b) Reading clock data To read clock data to the data register, use either of the following instructions in the program. • DATERD (instruction for reading clock data) • S(P).DATERD (instruction for reading extended clock data) Figure 6.12 shows a program for storing the clock data read with the DATERD instruction to D10 to D16. Read request Stores clock data to D10 DATERD...
  • Page 197 CHAPTER6 FUNCTIONS (5) Precautions (a) Initial clock data setting No clock data is set at the factory. Clock data is required for some functions of the CPU module used in the system, such as error history storage, or for intelligent function modules. Before using the CPU module for the first time, set the time correctly.
  • Page 198 (6) Clock data accuracy Accuracy of the clock data varies depending on the ambient temperature as shown below. Table6.8 Clock data accuracy Accuracy (Day difference, S) Ambient temperature High Performance model QCPU, Basic model QCPU Redundant CPU Process CPU -3.2 to +5.27 (TYP.+1.98) -3.18 to +5.25 (TYP.+2.12) -3.2 to +5.27 (TYP.+2.07) -2.57 to +5.27 (TYP.+2.22)
  • Page 199: Remote Operation

    CHAPTER6 FUNCTIONS 6.6 Remote Operation Remote operation allows to change the operating status of the CPU module externally (by GX Developer or external devices using the MC protocol, with link dedicated instructions of the CC-Link IE Controller Network module or MELSECNET/H module, or using remote contacts).
  • Page 200 (4) Executing method There are three methods for performing the remote RUN/STOP operation. • Using a RUN contact • By GX Developer or an external device using the MC protocol • With link dedicated instructions of the CC-Link IE Controller Network module or MELSECNET/H module (a) Using a RUN contact Set a RUN contact in the PLC system tab of the PLC parameter dialog box.
  • Page 201 CHAPTER6 FUNCTIONS (c) With link dedicated instructions of the CC-Link IE Controller Network module or MELSECNET/H module The remote RUN/STOP operation by link dedicated instructions of the CC-Link IE Controller Network module or MELSECNET/H module can change the RUN/STOP status of the CPU module. For details, refer to the following.
  • Page 202: Remote Pause

    6.6.2 Remote PAUSE (1) Definition This operation changes the operating status of the CPU module externally to PAUSE, keeping the RUN/STOP switch of the CPU module (the RUN/STOP/RESET switch for the Basic model QCPU) in the RUN position. PAUSE status is a status where sequence program operations in the CPU module are stopped, holding the status (on or off) of all outputs (Y).
  • Page 203 CHAPTER6 FUNCTIONS Setting of only a PAUSE contact is not allowed. When setting a PAUSE contact, set a RUN contact as well. (b) By GX Developer or an external device using the MC protocol Select [Online] [Remote operation] in GX Developer. To perform the remote PAUSE operation from an external device, use the MC protocol command.
  • Page 204 (4) Precautions (a) 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). The on/off status of Y70 is determined by the on/off status of M20 in the PAUSE status. SM204 Y71 turns off in the PAUSE status.
  • Page 205: Remote Reset

    CHAPTER6 FUNCTIONS 6.6.3 Remote RESET (1) Definition This operation resets the CPU module externally when the CPU module is in the STOP status. Even if the RUN/STOP switch (the RUN/STOP/RESET switch for the Basic model QCPU) is in the RUN position, this operation can be performed when the module is stopped due to an error detected by the self-diagnostic function.
  • Page 206 (4) Precautions (a) Remote RESET in the RUN status When the CPU module is in the RUN status, the remote RESET operation cannot be performed. To perform the operation, change the operating status of the CPU module to STOP by the remote STOP or similar operation.
  • Page 207 CHAPTER6 FUNCTIONS (d) In a redundant system where the Redundant CPU is used Remote RESET operation is performed for the control system CPU module in backup mode. As a result, the CPU modules in both systems are reset. When the CPU module is in separate mode or debug mode, the operation is performed for only the CPU module in the system specified in the connection target settings.
  • Page 208 4) When remote operation is being performed for the CPU module (in backup mode) using a different path No remote operation can be performed from another GX Developer for the CPU module where remote operation is being performed. In the case where remote operation is being performed using different paths for each CPU module in the control system and the standby system as shown in Figure 6.20, the standby system CPU module may not be reset, even when the remote RESET operation is performed for the control system CPU module.
  • Page 209: Remote Latch Clear

    CHAPTER6 FUNCTIONS 6.6.4 Remote latch clear (1) Definition This function resets the latched device data from GX Developer or an external device when the CPU module is in the STOP status. (2) Application This function is useful in the following cases if used together with the remote RUN/STOP operation. •...
  • Page 210 (4) Precautions (a) Latch clear in the RUN status The latch clear operation cannot be performed when the CPU module is in the RUN status. (b) Latch clear enabled range There are two kinds of latch range can be set in the Device tab of the PLC parameter dialog box: latch clear operation enable and disable range.
  • Page 211: Relationship Between Remote Operation And Run/Stop Status Of The Cpu Module

    CHAPTER6 FUNCTIONS 6.6.5 Relationship between remote operation and RUN/STOP status of the CPU module (1) Relationship between remote operation and RUN/STOP status of the CPU module Table6.9 shows the operating status of the CPU module according to the combination of remote operation and RUN/STOP status.
  • Page 212: Q Series-Compatible Module Input Response Time Selection (I/O Response Time)

    6.7 Q Series-compatible Module Input Response Time Selection (I/O Response Time) (1) Definition This function changes the input response time for each Q series-compatible module. Table6.10 shows the modules available for input response time change and selectable time settings. Table6.10 Modules available for input response time change Module name Type Settable time setting...
  • Page 213 CHAPTER6 FUNCTIONS (3) Precautions (a) Restrictions on GX Developer version When changing the input response time of the following modules, use GX Developer shown below. • High-speed input module: GX Developer Version 5 (SW5D5C-GPPW-E) or later • Interrupt module: GX Developer Version 6 (SW6D5C-GPPW-E) or later When GX Developer version earlier than the version above is used, a default time value is used.
  • Page 214: Error Time Output Mode Setting

    6.8 Error Time Output Mode Setting (1) Definition This function determines the output mode (clear or hold) from the CPU module to the Q series-compatible output modules, I/O combined modules, intelligent function modules, and/or interrupt module when a stop error occurs in the CPU module.
  • Page 215: H/W Error Time Plc Operation Mode Setting

    CHAPTER6 FUNCTIONS 6.9 H/W Error Time PLC Operation Mode Setting (1) Definition This function determines the program operation mode (stop or continue) of the CPU module when a hardware error occurs in an intelligent function module or interrupt module. (2) H/W error time PLC operation mode setting Set the H/W error time PLC operation mode in the I/O assignment tab of the PLC parameter dialog box.
  • Page 216: Intelligent Function Module Switch Setting

    6.10 Intelligent Function Module Switch Setting (1) Definition This function sets the switches of each Q series-compatible intelligent function module and interrupt module in GX Developer. (2) Writing the switch settings The switch settings will be written from the CPU module to each intelligent function module and interrupt module when: •...
  • Page 217 CHAPTER6 FUNCTIONS (3) Switch settings Set the switch details for each intelligent function module and interrupt module in the I/O assignment tab of the PLC parameter dialog box. 1) Make I/O assignment for the target module. 2) Click the button. Switch setting 3) Set the switch details for each module.
  • Page 218: Monitor Function

    6.11 Monitor Function (1) Definition This function reads program and device data in the CPU module, and intelligent function module status using GX Developer. Table6.11 List of monitor functions and availability Availability Monitor function Reference Basic model High Performance Redundant Process CPU QCPU model QCPU...
  • Page 219 CHAPTER6 FUNCTIONS 6.11.1 Monitor condition setting Note6.3 This function is used to monitor data in the CPU module under the specified condition.Note7 (1) Monitor condition setting for ladder monitor Switch GX Developer into monitor mode. Select [Online] [Monitor] [Monitor condition setup] to open the Monitor condition screen. Set the condition as shown below to monitor data on the rising edge of Y70.
  • Page 220 (a) When only a step number is specified Monitor data is collected when the status immediately before execution of the specified step becomes the specified status. The following status can be specified. • When the operation of the specified step changes from the non-execution status to the execution status: <-P->...
  • Page 221 CHAPTER6 FUNCTIONS (b) When only a device is specified Either word device or bit device can be specified. 1) When a word device is specified Monitor data is collected when the current value of the specified word device becomes the specified value. Enter the current value (in decimal or hexadecimal).
  • Page 222 (2) Monitor stop condition setting Set a monitor stop condition on the screen opened by selecting [Online] [Monitor] [Monitor stop condition setup]. Set the condition as shown in Figure 6.33 to stop a monitor operation on the rising edged of Y71. Figure 6.33 Monitor stop condition screen (a) When a device is specified Either word device or bit device can be specified.
  • Page 223 CHAPTER6 FUNCTIONS (3) Precautions (a) Files to be monitored When monitor conditions are set, GX Developer monitors the file displayed on the screen. Select [Online] {Read from PLC] in GX Developer and read data from the CPU module so that the file name in the CPU module to be monitored matches the file named displayed on the screen of GX Developer.
  • Page 224 (i) During monitor condition registration Do not reset the CPU module while monitoring conditions are being registered. (j) Monitor operation with monitor condition setting When monitor operation with monitor condition setting is performed, other applications on the same personal computer cannot execute any online function using the same route for the monitor operation. The following applications must be noted.
  • Page 225 CHAPTER6 FUNCTIONS 6.11.2 Local device monitor/test Note6.4 This operation is useful for debugging a program, monitoring local devices ( Section 9.13.2) in the program monitored by GX Developer.Note8 (1) Monitoring a local device Table6.12 shows the monitor operation when the CPU module executes three programs "A", "B", and "C" and D0 to D99 are set as a local device.
  • Page 226 When local devices are set to be monitored and the program "B" is displayed for monitoring, the local device(s) used in the program "B" can be monitored. CPU module Program execution (A B MOVP K2 DO Program: A MOVP K3 D99 MOVP K4 DO Program: B MOVP K8 D99...
  • Page 227 CHAPTER6 FUNCTIONS (2) Monitoring procedure The following shows the local device monitoring procedure. Connect a personal computer to the CPU module. Display a program in ladder mode. Select [Online] Switching to the [Monitor] [Monitor mode]. monitor mode Select [Local device monitor] Setting of the local from the monitor window.
  • Page 228 6.11.3 External input/output forced on/off Note6.5 The external input/output can forcibly be turned on/off on the screen opened by selecting [Online] [Debug] [Forced input output registration/cancellation] in GX Developer.Note9 The information registered for forced on/off can be cancelled by an operation from GX Developer. Figure 6.36 Forced input output registration/cancellation screen (1) Input/output operation when a forced on/off operation is performed There are three kinds of forced on/off operations: forced on ("Set forced ON"), forced off ("Set forced OFF"), and...
  • Page 229: External Input/Output Forced On/Off

    CHAPTER6 FUNCTIONS Figure 6.37 shows the input/output operation when a forced on/off operation is performed. Output forced on/off operation Y10 device forced off Y10 output Output refresh External output (off) (Y10 off) Input refresh X0 input (on) External input Input forced on/off operation (X0 on) X0 device forced off Program execution...
  • Page 230 In multiple CPU systems, inputs and outputs of control modules can forcibly turned on/off. Even when inputs and outputs of non-control modules are registered for forced on/off, the input/output devices in other CPU modules and inputs and outputs of modules controlled by other CPU modules cannot be forcibly turned on/off. (The input/ output devices in the host CPU module can forcibly turned on/off.) (d) Cancelling on/off registration data The registered forced ON/OFF data can be canceled by GX Developer.
  • Page 231 CHAPTER6 FUNCTIONS (e) External input/output forced on/off timing Table6.15 shows the external input/output forced on/off timing. Table6.15 Forced on/off timing Refresh area Input Output • During END processing (output refresh) • During END processing (input refresh) • At execution of the COM instruction (output •...
  • Page 232 (3) Operating procedure Operating procedure is described below. • To register forced on/off for a device, select [Online] [Debug] [Forced input output registration/ cancellation] in GX Developer. • On the screen opened, specify a device and click the "Set forced ON" or "Set forced OFF" button. Figure 6.38 Forced input output registration/cancellation screen Table6.16 Items on the Forced input output registration/cancellation screen Item...
  • Page 233 CHAPTER6 FUNCTIONS (4) Precautions in a redundant system where the Redundant CPU is used (a) CPU module for which forced on/off is registered or cancelled In redundant systems, register or cancel forced on/off for the control system CPU module. (Forced on/off cannot be registered or cancelled for the CPU modules in both systems individually.) After the systems are switched, register or cancel forced on/off for the CPU module in the new control system (the system that was switched from the standby system to the control system).
  • Page 234: Writing Programs While Cpu Module Is In Run Status

    6.12 Writing Programs While CPU Module is in RUN Status There are two ways of writing programs in the RUN status. • Online change (ladder mode): Section 6.12.1 • Online change (files): Section 6.12.2 Data can also be written in the RUN status using a pointer. ( Section 6.15.2) For online change in the Redundant CPU system (order of writing to the control system and standby system and enable/ disable setting of execution of tracking transfer during online change), refer to the following.
  • Page 235 CHAPTER6 FUNCTIONS This function also can write programs by GX Developer connected to another station on the network. GX Developer MELSECNET/H PLC-to-PLC network Change a program with GX Developer and write it to the CPU module in the RUN status. Figure 6.40 Outline of online change via network (2) Memory for online change Online change can be performed to the program memory only.
  • Page 236 (4) Execution timing in low-speed execution type program Note10 Note6.6 In the low-speed execution type program, data are written in the RUN status at END processing in the scan following the scan where execution of all the programs are completed. Note that the execution of the programs is suspended during online change.
  • Page 237 CHAPTER6 FUNCTIONS (6) Changing the reserved area for online change A program file has an area designated as reserved area for online change to support the online change that changes program file size. The following provides precautions when changing the size of reserved area for online change. (a) Size of a program file The size of a program file is addition of created program size and reserved area for online change.
  • Page 238: Online Change (Files)

    6.12.2Online change (files) Note6.8 (1) Definition This function batch-writes files shown in Table6.17 to the CPU module in the RUN status by online operation from Developer.Note11 Table6.17 Files that can be written to the CPU module in the RUN status Memory card CPU module built-in memory Memory card (ROM)
  • Page 239: Appendix 2.2,

    CHAPTER6 FUNCTIONS (2) Availability Table6.18 shows whether online change (files) can be performed or not depending on memory area. Table6.18 Execution of online change (files) depending on memory status Free area equal to or larger than a program file to be written Online change (files) Program memory Memory card...
  • Page 240: Precautions For Online Change

    6.12.3Precautions for online change The following shows precautions for online change. (1) Online change during boot operation The status of a boot source program when data are written in the RUN status during boot operation depends on the CPU module and boot source memory used. Table6.19 Status of boot source program when data are written in the RUN status Status of boot source program Boot source memory...
  • Page 241 CHAPTER6 FUNCTIONS (2) Instructions do not operate normally during online change If the following instructions are executed during online change, they do not operate normally. • Fall instruction • Rise instruction • SCJ instruction • STMR instruction (a) Fall instruction The fall instruction within the program targeted for online change will be executed even though the execution condition of the instruction (off on) is not met at the completion of online change.
  • Page 242 (b) Rise instruction The rise instruction within the program targeted for online change will not be executed even though the execution condition of the instruction (off on) is met at the completion of online change. Completion of online change [ PLS MO ] 1 scan X0 status The rise instruction is not executed even...
  • Page 243 CHAPTER6 FUNCTIONS (d) STMR instruction Note that when the STMR instruction is used in the program targeted for online change, the instruction is executed. The STMR instruction will be executed because the data in the ladder block has been changed online. Adding M10 online STMR M100...
  • Page 244 To avoid execution of the fall instruction even when the execution condition (on off) is not met after data are written to the CPU module in the RUN status, select "Trailing edge instructions are not executed" in the Options screen in GX Developer. Note6.10Note13 The fall instruction whose execution condition is off is executed by default.
  • Page 245: Execution Time Measurement

    CHAPTER6 FUNCTIONS 6.13 Execution Time Measurement (1) Definition This function displays the processing time of the program being executed. (2) Application and types This function can be used to know the effect of processing time of each program on the total scan time when the system is adjusted.
  • Page 246: Scan Time Measurement

    (a) Total Scan Time The monitoring time set in "WDT (Watchdog timer) setting" of the PLC RAS tab of the PLC parameter dialog box and total scan time for each program type during execution by the CPU module are displayed. 1) Monitor time The monitoring time of each program is displayed.
  • Page 247 CHAPTER6 FUNCTIONS Remark When the POFF instruction is executed, a non-execution processing is performed for one scan. The number of execution times displayed is the addition of the execution times of the non-execution processing. For details of the POFF instruction, refer to the following. MELSEC-Q/L Programming Manual (Common Instruction) (3) Program start Note14...
  • Page 248 (4) Program stop Note15 Note6.13 Clicking the button on the screen shown in Figure 6.49 ( (2) in this section) opens the Stop program Stop program screen. Figure 6.51 Stop program screen (a) Program name Select a program set in the Program tab of the PLC parameter dialog box. A program name cannot be entered as desired.
  • Page 249 CHAPTER6 FUNCTIONS 6.13.2Interrupt program monitor list (1) Definition This function displays the number of executions of an interrupt program. This function is used to check the execution status of the interrupt program. (2) Execution Selecting [Online] [Monitor] [Interrupt program monitor list] of GX Developer opens the Interrupt program monitor list screen.
  • Page 250 6.13.3Scan time measurement Note16 Note6.14 (1) Definition 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. (2) Range specification of scan time measurement There are following two types for specifying a scan time measurement range. •...
  • Page 251 CHAPTER6 FUNCTIONS (5) Execution Measure the scan time by the following procedure. • Display the start of the ladder program where scan time is measured in GX Developer and set the monitor mode. • Select [Online] [Monitor] [Scan time measurement] to open the Scan time measurement screen. •...
  • Page 252 (6) Precautions (a) Measurement range setting Set the measurement range so that "Start step < End step" is satisfied. (b) Minimum unit of measurement time The minimum unit of measurement time is 0.100ms. If the measurement time is less than 0.100ms, 0.000ms is displayed. (c) When between the FOR and NEXT instructions is specified The execution time of one scan between the specified steps is displayed.
  • Page 253 CHAPTER6 FUNCTIONS • When the end step is executed before the start step The start step is specified as the next step of the CALL instruction and the end step is Example specified in a subroutine program executed by the CALL instruction. CALL P0 Start step: 3 The start step is executed...
  • Page 254 6.14 Sampling Trace Function Note6.15 (1) Definition 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.Note17 (2) Application This function is useful to check the change of the device data used in the program during debugging at a preset timing.
  • Page 255 CHAPTER6 FUNCTIONS (4) Sampling trace operation (a) Operation of the CPU module When a sampling trace trigger is issued by GX Developer, the CPU module executes traces for the preset number of times. The sampling trace area can store data up to 60K bytes. The number of traces will be a value of which the number of bytes for the sampling trace area divided by the number of bytes of the specified device (N1 + N2 + N3 + word device points 2 + (bit device points/16)
  • Page 256 (b) Operation of the special relay 1) When the sampling trace is executed normally The execution status of the sampling trace can be checked in the special relay listed in Table6.20. Table6.20 Execution status of the sampling trace Number Name Description Turns on when the trace setting in GX Developer is written to the CPU module.
  • Page 257 CHAPTER6 FUNCTIONS 2) When the sampling trace is interrupted If SM801 (Trace start) is turned off during sampling trace, execution of the sampling trace will be interrupted. When the sampling trace is interrupted, the trace count is cleared. The sampling trace restarts by turning on SM801. Trigger SM801 SM801...
  • Page 258 (5) Operating procedure Select [Online] [Trace] [Sampling trace...] in GX Developer. On the screen opened, select the method for operating the sampling trace. • "Wizard setting/execution" GX Developer Version 8 Operating Manual) • "Individual setting/execution" (5)(a) in this section) (a) Setting "Trace data (setting + result) storage" and "Trace execution method" On the screen opened, set the trace data storage location and trace execution method.
  • Page 259 CHAPTER6 FUNCTIONS (b) Setting trace conditions Set trace conditions on the screen opened by clicking the Trace condition setting button on the screen shown in Figure 6.59. On the Trace condition settings screen, set the following items. • Number of traces ("No. of traces", "After trigger number of times") •...
  • Page 260 2) Trace point setup Select the timing for collecting trace data from the items listed in Table6.21. Table6.21 Trace point setup item Item Description Each scan Collects trace data during END processing of each scan. Interval Collects trace data at specified time intervals. A trace point (device and/or step number) needs to be set.
  • Page 261 CHAPTER6 FUNCTIONS 4) Trigger point setup Select the trigger point from the items listed in Table6.22. Table6.22 Trigger point setup item Item Description At the time of TRACE The time of execution of the TRACE instruction is set as a trigger. instruction execution At the time of trigger operation...
  • Page 262 (c) Setting trace data Set trace data on the screen opened by clicking the button on the screen shown in Trace data setting Figure 6.59. Table6.23 shows the devices can be set as trace data. Figure 6.62 Trace data settings screen Table6.23 Devices can be set as trace data Item Description...
  • Page 263 CHAPTER6 FUNCTIONS (d) Writing the trace condition settings and trace data settings Write the set trace conditions and trace data to the memory selected as a sampling trace file for "Trace data (setting + result) storage". Click the button on the screen shown in Figure 6.59 to write the settings. Write to PLC When storing the sampling trace file into a memory card (SRAM card), more than one sampling trace files can be stored by changing the file name.
  • Page 264 (f) Displaying trace results Read trace results form the CPU module and display the data. 1) Click the button on the screen shown in Figure 6.63 to read trace results. Trace result PLC read 2) Click the button on the same screen to display the trace results read. Trace result The trace results shows the on/off status of each bit device for every sampling cycle and the current value of each word device.
  • Page 265 CHAPTER6 FUNCTIONS (6) Method for clearing trace execution status The trace execution status can be cleared by latch clear using the RESET/L.CLR switch or the remote latch clear operation. ( Section 6.6.4) To perform the sampling trace again after latch clear, select "Start trace" or "Registry trace". (7) Precautions (a) Areas where sampling trace can be performed The sampling trace can be performed from other stations on the network or serial communication module.
  • Page 266 3) When selecting "Memory card (RAM)" in "Target memory" while the SRAM card where the sampling trace file has been registered is not mounted, either of the following operations were performed. • The CPU module is powered off and then on. •...
  • Page 267: Debug Function From Multiple Gx Developers

    CHAPTER6 FUNCTIONS 6.15 Debug Function from Multiple GX Developers (1) Definition This function allows debugs from multiple GX Developers connected to such as a CPU module or serial communication module. When files are divided according to the processes or functions, this function can be used when multiple GX Developers debug different files.
  • Page 268 (2) Setting for simultaneous monitoring from multiple GX Developers Create a user setting system area in the following procedure. • Select [Online] [Format PLC memory] in GX Developer to open the screen shown in Figure 6.67. • Select "Program memory/Device memory" in "Target Memory". •...
  • Page 269 CHAPTER6 FUNCTIONS (3) Precautions (a) Monitor condition setting The monitor conditions can be set from one GX Developer. Note18 Note6.16 (b) Necessity of system area setting Although multiple GX Developers in other stations can simultaneously monitor a CPU module without the user setting system area, the monitor speed will be slow.
  • Page 270 (2) Operating procedure for performing online change to one file Select [Tools] [Options] <Program common> tab in GX Developer. Set a pointer for Write during RUN beforehand. (a) Setting "After conversion writing behavior" and "Step No. specification used in writing" Set them as follows: 1) Select "Write during RUN (while PLC is running)"...
  • Page 271: Watchdog Timer (Wdt)

    CHAPTER6 FUNCTIONS 6.16 Watchdog Timer (WDT) (1) Definition This function serves as an CPU module internal timer to detect errors of CPU module hardware and sequence programs. (2) Setting and resetting (a) Setting The watchdog timer setting can be changed in the PLC RAS setting of PLC parameter. The default is set to 200 ms.
  • Page 272 (b) Resetting a watchdog timer when a program is repeatedly executed between the FOR and NEXT instructions The watchdog timer can be reset by executing the WDT instruction in the sequence program. To avoid the time up of watchdog timer while a program is repeatedly executed between the FOR and NEXT instructions, reset the watchdog timer by the WDT instruction.
  • Page 273: Self-Diagnostic Function

    CHAPTER6 FUNCTIONS 6.17 Self-diagnostic Function (1) Definition 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. (2) 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 274: Basic Model Qcpu

    (5) CPU module operation at error detection (a) Mode at error detection When an error is detected by the self-diagnostic function, the CPU module enters either of the following modes. 1) Mode that stops CPU module operation When an error is detected, the CPU module stops an operation and turns off all external outputs of the module set to "Clear"...
  • Page 275 CHAPTER6 FUNCTIONS (6) Error check options Whether to check the following errors or not can be selected in the PLC RAS tab of the PLC parameter dialog box (All the options are selected (executed) by default). 1) Carry out battery check 2) Carry out fuse blown check 3) Verify module 6 - 95...
  • Page 276 (7) Self-diagnostics list The following table shows the self-diagnostics performed by the CPU module. To check the error messages in the "Error message" column of Table6.27, select [Diagnostics] [PLC diagnostics] of GX Developer. Table6.27 Self-diagnostics list LED status Basic High Error Process Redundant...
  • Page 277 CHAPTER6 FUNCTIONS Table6.27 Self-diagnostics list (continued) LED status Basic High Error Process Redundant Diagnostics Diagnostic timing module model Performance message ERR. status QCPU model QCPU Redundant power supply SINGLE PS. • Always Continue module ERROR Hardware failure failure BATTERY BAT.ALM •...
  • Page 278 Table6.27 Self-diagnostics list (continued) LED status Basic High Error Process Redundant Diagnostics Diagnostic timing module model Performance message ERR. status QCPU model QCPU • Switching from STOP to parameter PARA.ERR Stop Flashing • Writing to programmable error controller Parame- Intelligent ter error function SP.PARA.
  • Page 279 CHAPTER6 FUNCTIONS Table6.27 Self-diagnostics list (continued) LED status Basic High Error Process Redundant Diagnostics Diagnostic timing module model Performance message ERR. status QCPU model QCPU SFC step CAN'T • Switching from STOP to configuration Stop Flashing SET(S) error SFC EXE. •...
  • Page 280 Table6.27 Self-diagnostics list (continued) LED status Basic High Error Process Redundant Diagnostics Diagnostic timing module model Performance message ERR. status QCPU model QCPU Both systems file • Power-on/reset consistency • Execution of the END error CPU MODE instruction Stop Flashing Parameter- DIFF.
  • Page 281 CHAPTER6 FUNCTIONS Table6.27 Self-diagnostics list (continued) LED status Basic High Error Process Redundant Diagnostics Diagnostic timing module model Performance message ERR. status QCPU model QCPU Memory copy MEM.COPY • Execution of the memory function Continue EXE. copy function execution Tracking Redunda setting TRK.PARA.
  • Page 282 6.17.1Interrupt caused by an error Note6.19 The CPU module can execute an interrupt program for the interrupt pointer of the error occurred. (1) Interrupt by an error that can be set to "Continue" or "Stop" in the PLC RAS tab For an error that is set to "Continue"...
  • Page 283 CHAPTER6 FUNCTIONS Execution of interrupt pointers, I32 to I48, are disabled when the system is powered on or when the CPU module is reset. To use any of I32 to I41, enable the interrupt with the IMASK and EI instructions. For details of the IMASK and EI instructions, refer to the following.
  • Page 284 6.17.3Error clear The CPU module can clear an error by a program if the error does not stop program operation. (1) Procedures for error clear Clear an error by the following procedures. • Resolve the error cause. • Store the code of the error to be cleared in the special register SD50. •...
  • Page 285 CHAPTER6 FUNCTIONS 6.18 Error History This function stores an error detected by the self-diagnostic function and the detection time as an error history in a memory. Select [Diagnostics] [PLC diagnostics] of GX Developer to check the history. The detection time is based on the clock in the CPU module. Make sure to set the correct time before the first use of the CPU module.
  • Page 286 6.18.2High Performance model QCPU, Process CPU, and Redundant CPU (1) Storage area 16 latest error logs are stored in the latched error history storage memory of the CPU module. When more than 16 error logs are stored, the logs can be stored in a file in a memory card by the setting in the PLC RAS tab of the PLC parameter dialog box.
  • Page 287: System Protection

    CHAPTER6 FUNCTIONS 6.19 System Protection Note6.21 The CPU module has protection functions (system protection) to prevent programs being modified by a third party other than the designer with GX Developer or serial communication module. Table6.29 System protection types File that can be Valid Protection target Description...
  • Page 288 6.19.1Password registration This function prohibits reading and writing data such as a programs and device comments in the CPU module with GX Developer. (1) Valid password range The password can be registered with program, device comment, and initial device values files in the specified memory (program memory, standard ROM, and memory card).
  • Page 289 CHAPTER6 FUNCTIONS (a) Target memory Select a memory storing a file where a password is to be registered. (b) Data type Displays the type of a file stored in the target memory. (c) Data name Displays the name of a file stored in the target memory. (d) Registration Displays "*"...
  • Page 290 6.19.2Remote password Note6.23 (1) Definition This function prevents unauthorized remote access to the CPU module.Note23 If a remote password has been set and the CPU module is remotely accessed, entering a remote password is required. (2) Settable modules and the number of settable modules Table6.30 shows the modules for which the remote password can be set and the number of settable modules.
  • Page 291 CHAPTER6 FUNCTIONS (3) Flow from remote password setting to reflection of the password Set a remote password ( (5) in this section) and then write it to the CPU module. The remote password is transferred to the target module when the CPU module is powered off and then on or is reset.
  • Page 292 (4) Remote password lock/unlock Unlock the remote password of a serial communication module via a modem or the Ethernet module via Ethernet. When entered remote password matches with the registered password, the module can access the CPU module. GX Developer Unlocks (releases) the remote password and accesses the CPU module.
  • Page 293: Remote Password

    CHAPTER6 FUNCTIONS (5) Procedures for setting/changing/clearing a remote password (a) Setting a remote password • In the project data list of GX Developer, select [Parameter] [Remote pass] Remote password setting For the QJ71E71, configure setting in "Detail". Figure 6.76 Remote password settings screen Table6.31 Setting items on the Remote password settings screen Item Description...
  • Page 294 ● After setting a remote password, store the parameters to the program memory (drive 0). Note6.24Note24 If not, the remote password function does not work properly. ● For boot operation, store the parameter file to the standard ROM or memory card and make setting in the Boot file tab of GX Developer so that the parameter file is transferred to the program memory.
  • Page 295: System Display Of Cpu Module With Gx Developer

    CHAPTER6 FUNCTIONS 6.20 System Display of CPU Module with GX Developer When the CPU module is connected to GX Developer, this function can check the following items of the modules on the base unit in the System Monitor screen. • Installed status •...
  • Page 296 (1) Installed status The following information of the module mounted on the selected base unit can be checked. • Control CPU (except the Basic model QCPU) • Model name • Number of points "Unmounting" is displayed in the field of a number of slot where a module is not mounted. When using a redundant base unit, mounted status of the power supply module is also displayed (not displayed for the Basic model QCPU).
  • Page 297 CHAPTER6 FUNCTIONS (6) Module's Detailed Information Click this button to check the details of the selected module. For details of the intelligent function module, refer to the manual for the intelligent function module used. (7) Base Information The "Overall Information" and "Base Information" can be checked. (a) Overall Information The number of base units and the number of modules on the base units can be checked.
  • Page 298 (9) Detailed information of power supply module This screen displays "ON/OFF status", "Error existence", and "Number of momentary power failures" of the power supply module. This screen can be displayed when using the power supply module supporting a redundant base unit and this screen.
  • Page 299 CHAPTER6 FUNCTIONS (10)Memory copy status This item indicates the execution status of memory copy from the control system CPU module to standby system CPU module. • During normal operation • During memory copy from the control system CPU module to standby system CPU module •...
  • Page 300: Led Display

    6.21 LED Display Operating status of the CPU module can be checked by the LEDs on the front of the CPU module. For details of LED indications, refer to the following. QCPU User's Manual (Hardware Design, Maintenance and Inspection) POWER MODE MODE BACKUP...
  • Page 301: Methods For Turning Off The Leds

    CHAPTER6 FUNCTIONS 6.21.1Methods for turning off the LEDs (1) Methods (a) Basic model QCPU To turn off the ERR.LED, remove the error cause and then operate the special relay SM50 and special register SD50 to clear the error (except for reset operation). (b) High Performance model QCPU, Process CPU, and Redundant CPU The LEDs can be turned off by the following operations (except for reset operation.) Table6.33 Methods for turing off the LEDs...
  • Page 302: Led Indication Priority

    6.21.2LED indication priority This section describes a priority for error messages stored in the LED display data (SD220 to SD227) in case of an error. (1) Displayed error messages and their priorities In case of multiple errors, the error messages are displayed with the following conditions. •...
  • Page 303 CHAPTER6 FUNCTIONS (2) Priorities and cause numbers The following table shows the description and priority of the cause numbers set to the special registers SD207 to SD209. Table6.34 List of cause numbers and priorities Cause Priority Displayed error message Remarks number (Hexadecimal) •...
  • Page 304 ● To remain the LED off even in case of an error, set the cause number setting area (each 4 bits) of SD207 to SD209 that stores the corresponding cause number to "0". [Example] To remain the ERR. LED off even when a fuse blown error is detected, set the cause number setting area where the cause number "2"...
  • Page 305: High Speed Interrupt Function

    CHAPTER6 FUNCTIONS 6.22 High Speed Interrupt Function Note6.26 When an interrupt program is created using the high speed interrupt pointer (I49), the entire program can be executed at a high speed, being interrupted at intervals of 0.2ms to 1.0ms.Note26 Also, this function improves the I/O response because I/O signal data within the parameter-set range and intelligent function module buffer memory data are refreshed before and after execution of the high speed interrupt program.
  • Page 306 6.22.1High speed interrupt program execution function This function executes an interrupt program according to the high speed interrupt pointer (I49). (1) Setting method In the PLC system tab of the PLC parameter dialog box, click the button in the High speed interrupt setting System interrupt settings area.
  • Page 307 CHAPTER6 FUNCTIONS 6.22.2High speed I/O refresh and high speed buffer transfer functions High speed I/O refresh is a function that updates I/O signal data between I/O modules and intelligent function modules and the CPU module at the specified interrupt intervals. High speed buffer transfer is a function that updates data between intelligent function module buffer memories and CPU module devices at the specified interrupt intervals.
  • Page 308 Table6.35 High speed I/O refresh setting and high speed buffer transfer setting Number of Item Setting item Description Restriction settings Number of transferred bits Points (DEC.) (16 to I4096) Up to six settings • I/O modules and intelligent function Start device number High speed I/O Start (HEX.) for X input and Y...
  • Page 309: Processing Time

    CHAPTER6 FUNCTIONS 6.22.3Processing time The following shows each processing time during the period from the start to the end of the high speed interrupt function. Main routine program Waiting time High speed interrupt start Input (X) Buffer memory reading I49 overhead High speed interrupt program execution Buffer memory writing...
  • Page 310 Table6.36 Processing times related to the high speed I/O refresh and high speed buffer transfer (continued) Item Processing time Main base unit: • 16 words or less ••• Time=0.47 (total number of transferred words)+2.65 (number of settings)+0.95 • More than 16 words••• Time=0.55 (total number of transferred words)+0.95 Extension base unit: Buffer memory writing •...
  • Page 311: Restrictions

    CHAPTER6 FUNCTIONS 6.22.4Restrictions This section describes restrictions on execution of the high speed interrupt function. If the function is executed incorrectly, "WDT ERROR" may occur or the high speed interrupt may not be executed at the specified intervals. There are the following four kinds of restriction items (1) Restrictions that apply to all the high speed interrupt setting (2) Restrictions that apply to the high speed interrupt only (3) Items that delay the high speed interrupt start due to disabled interrupt...
  • Page 312 Table6.37 Restrictions that apply to all the high speed interrupt setting (continued) Item Restriction When used The high interrupt cannot be executed at the specified intervals since interrupts are disabled when switching to the file register File register that is the that is the same name as a program name.
  • Page 313 CHAPTER6 FUNCTIONS (3) Items that delay the high speed interrupt start due to disabled interrupt Table6.39 Items that delay the high speed interrupt start due to disabled interrupt Item Precaution Instruction During instruction execution, any interrupt is disabled. During a refresh (bus access), any interrupt is disabled. For a refresh of CC-Link IE Controller Network modules, MELSECNET/H modules, CC-Link modules, and Link refresh intelligent function modules, waiting time is up to 37.5 s when mounting these modules on a main base unit,...
  • Page 314: Interrupt From Intelligent Function Module

    6.23 Interrupt from Intelligent Function Module Note27 Note6.27 The CPU module can execute an interrupt program (I ) by the interrupt request from the intelligent function module. For example, the serial communication module can receive data by an interrupt program when the following data communication functions are executed.
  • Page 315: Serial Communication Function

    CHAPTER6 FUNCTIONS 6.24 Serial Communication Function Note28 Note6.28 (1) Definition This function communicates in the MC protocol by connecting the RS-232 interface of the CPU module, personal computer, and HMI by RS-232 cable. This section describes the specifications, functions, and various settings of the function. *1: The MC protocol is an abbreviation for the MELSEC communication protocol.
  • Page 316 (2) Specifications (a) Transmission specifications Table6.40 shows the transmission specifications of RS-232 for the serial communication function of the CPU module. Check that the specifications of the personal computer and HMI match those of Table6.40 before using the function. Table6.40 Transmission specifications of the serial communication function Item Default Setting Range...
  • Page 317 CHAPTER6 FUNCTIONS (b) RS-232 connector specifications Table6.42 shows the specifications of the RS-232 connector for the CPU module. Table6.42 RS-232 connector specifications Appearance Pin number Signal Signal Name RD(RXD) Receive data SD(TXD) Send data Signal ground Mini-Din 6 pins DR(DSR) Data set ready (female) ER(DTR)
  • Page 318 (3) Functions Table6.43 shows the MC protocol commands that can be executed by the serial communication function. Table6.43 MC protocol commands supported by the serial communication function Number of processing Function Command Processing points In units of ASCII: 3584 points Reads bit devices in units of 1 point.
  • Page 319: Input (X)

    CHAPTER6 FUNCTIONS (4) Accessible devices Table6.44 shows accessible devices by the serial communication function. Table6.44 Accessible devices by the serial communication function Device code Category Device Device number range ASCII Binary Function input Hexadecimal Function output (Cannot be accessed) Hexadecimal Internal system Function register Decimal...
  • Page 320 (5) Setting of transmission specifications Set Transmission speed, Sum check, Transmission wait time, and Run write setting of the serial communication function in the Serial tab of the PLC parameter dialog box. • Select "Use serial communication" in communication with the personal computer or HMI. •...
  • Page 321 CHAPTER6 FUNCTIONS (7) Error codes during communication with the serial communication function Table6.45 shows the error codes, error description, and corrective actions sent from the CPU module to the external device when an error occurs during communication with the serial communication function. Table6.45 Error codes sent from the CPU module to external device Error code (Hexadeci-...
  • Page 322 Table6.45 Error codes sent from the CPU module to external device (continued) Error code (Hexadeci- Error item Description Corrective action mal) The calculated sumcheck does not match the received 7F24 Sumcheck error Review the sumcheck of external device.. sumcheck. Reduce the communication speed and restart communication.
  • Page 323 CHAPTER6 FUNCTIONS 6.25 Service Processing Service processing is the communication processing with GX Developer and external devices. The service processing refers to the following: • Communications via intelligent function modules (A link refresh from network modules is not included.) • Communications via USB cables and RS-232 cables (Communications with GX Developer or GOT.) 6.25.1Module service interval time read The module service interval designates the intervals of transient requests such as monitoring, test, and program writing and reading.
  • Page 324 6.26 Initial Device Value Note6.29 (1) Definition This function registers data used in a program to the device or the buffer memory of the intelligent function module without a program.Note29 (2) Application Using an initial device value can omit device data setting program by initial processing program. Device memory SM402 H100...
  • Page 325 CHAPTER6 FUNCTIONS (3) Timing when initial device values are written to the specified device The CPU module writes data in the specified initial device value file to the specified device or the buffer memory of the intelligent function module when the CPU module is powered off and then on, is reset, or is set to the STOP status and then the RUN status.
  • Page 326 (5) Procedures and settings for using initial device values To use initial device values, create initial device value data with GX Developer beforehand, and store the data as a initial device value file in the program memory, standard ROM, or memory card of the CPU module. •...
  • Page 327 CHAPTER6 FUNCTIONS • Set “Initial Device value” in the PLC file tab of the PLC parameter dialog box. 1) For the Basic model QCPU Select "Use." for "Initial Device value". 2) For the High Performance model QCPU, Process CPU, and Redundant CPU Select the target memory that stores initial device value file and enter the file name.
  • Page 328 (6) Precautions (a) When initial device value and latch range are overlapped In that case, initial device value takes priority. Therefore, the latch range data will be overwritten to the initial device value data after the CPU module is powered off and then on. (b) Area disabling the initial device value setting when the CPU module is set from STOP to RUN The initial device value are also reflected when the CPU module is set from STOP to RUN.
  • Page 329 CHAPTER6 FUNCTIONS 6.27 Memory Check Function Note6.30 This function checks whether data in the memories of the CPU module are changed or not due to such as excessive electric noise.Note30 Program memory check Program memory Base data Execution of program memory check 1) Check Specified steps Execution of program memory check 2)
  • Page 330 (2) Setting for memory check • Select the "Check Program memory" checkbox in the PLC RAS(2) tab of the PLC parameter dialog box. • Enter a value for "Capacity to be checked at one time". Setting for program Setting range memory check Q12PHCPU, Q12PRHCPU: 1 to 496(256 steps to 124K steps)
  • Page 331 CHAPTER6 FUNCTIONS (5) Precautions (a) Maximum delay time of error detection The following shows the maximum delay time from rewrite of program memory data till detection of the rewritten data. (Maximum program memory capacity) Maximum delay time (Scan time) (ms) of error detection (Capacity to be checked at one time) *1: The maximum program memory capacity for each CPU module is shown below.
  • Page 332 CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE (1) Intelligent function module 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. For example, the analog-digital conversion module, one of the intelligent function modules, uses analog quantity by converting it into a digital value.
  • Page 333 CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE 7.1.1 Initial setting and auto refresh setting by GX Configurator The initial setting and auto refresh setting can be made by adding in GX Configurator that is supported by the intelligent function module to GX Developer. After the initial and auto refresh settings, data can be read or written without creating a program for communications with intelligent function modules.
  • Page 334 (b) Auto refresh setting The CPU module devices for storing the following data can be set in the Auto refresh setting screen. • Digital output of the Q64AD • Maximum and minimum values of the Q64AD • Error codes Make auto refresh settings of the Q64AD in the Auto refresh setting screen in GX Configurator as shown in Figure 7.2.
  • Page 335 CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE (3) Limitation on the number of parameter settings Limitations are placed on the number of parameters (initial setting and auto refresh setting) set in GX Configurator. When multiple intelligent function modules are mounted, make setting in GX Configurator so that the number of parameter settings for all intelligent function modules may not exceed the limitation shown in Table7.2.
  • Page 336 7.1.2 Initial setting by initial device value (1) Initial device value Using an initial device value ( Section 6.26) allows the initial setting of the intelligent function module without a program. The set initial device values are written from the CPU module to the intelligent function module when the CPU module is powered off and then on, reset, or set from STOP to RUN.
  • Page 337 CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE 7.1.4 Communications using the intelligent function module device (1) Intelligent function module device The intelligent function module device ( Section 9.5.1) represents the buffer memory of the intelligent function module as one of the CPU module devices. The data stored in the buffer memory of the intelligent function module can be treated by the sequence instruction as well as the device memory.
  • Page 338 The intelligent function module device accesses the intelligent function module every time when an instruction is executed. When writing or reading buffer memory data using multiple intelligent function module devices in a sequence program, write or read the data with the FROM or TO instruction in one location of the program. Figure 7.6 Writing using multiple intelligent function module devices Writes data to a device such as data register (D)
  • Page 339 CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE 7.1.5 Communications using the intelligent function module dedicated instruction (1) Intelligent function module dedicated instruction This instruction enables easy programming for the use of functions of the intelligent function module. (a) Example with the serial communication module dedicated instruction (OUTPUT instruction) The OUTPUT instruction allows communications with external device by nonprocedural protocol regardless of the buffer memory address of the serial communication module.
  • Page 340 (3) Precautions (a) When the CPU module is set from RUN to STOP before the completion device turns When a intelligent function module dedicated instruction is executed and the CPU module is set from RUN to STOP before the completion device turns on, the completion device will not turn on until the CPU module is set to RUN and then finishes one scan.
  • Page 341 CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE 7.2 Access to the AnS/A Series Special Function Modules Note7.1 (1) Effect of high-speed access to the special function module Processing time in the Q series CPU module has been speeded up so that the scan time is shortened. If the FROM or TO instruction is frequently executed to a special function module in short scan, processing in the special function module may not be completed correctly.Note31...
  • Page 342 CHAPTER8 PARAMETERS This chapter describes the parameters required to be set for configuring a programmable controller system. (1) Parameter types The following parameters are provided for CPU module setting. • PLC parameters ( Section 8.1) These parameters are set when a programmable controller is used. •...
  • Page 343 CHAPTER8 PARAMETERS 8.1 PLC Parameters This section provides the list of PLC parameters and describes parameter details. 8.1.1 Basic model QCPU (1) PLC name A label and a comment for the CPU module are set. Figure 8.1 PLC name Table8.1 PLC name setting list Parameter Item Description...
  • Page 344 (2) PLC system Parameters required for use of the CPU module are set. The system can be controlled with default values. Figure 8.2 PLC system Table8.2 PLC system setting list Parameter Item Description Setting range Default Reference Low speed 1ms to 1000ms (in increments of 1ms) 100ms Section 9.2.10 Timer limit...
  • Page 345 CHAPTER8 PARAMETERS Table8.2 PLC system setting list (continued) Parameter Item Description Setting range Default Reference [Q00JCPU] Set the number of points for 0, 16, 32, 64, 128, or 256 points Points occupied by empty slot 1007 empty slots on the main/extension [Q00CPU and Q01CPU] 16 points Section 4.2.2...
  • Page 346 (4) PLC RAS Parameters required for performing the RAS functions are set. Figure 8.4 PLC RAS Table8.4 PLC RAS setting list Parameter Item Description Setting range Default Reference 10ms to 2000ms WDT (Watchdog Set a watchdog timer value for WDT setting 3000 (in increments of 200ms...
  • Page 347 CHAPTER8 PARAMETERS (5) Device Number of points and latch range are set for each device. Figure 8.5 Device Table8.5 Device setting list Parameter Item Description Setting range Default Reference • X: 2K • Y: 2K • M: 8K • L: 2K X(2K), Y(2K), S(2K), SB(1K), and •...
  • Page 348 (6) Boot file Whether to perform a boot from the standard ROM is set. Figure 8.6 Boot file Table8.6 Boot file setting list Parameter Item Description Setting range Default Reference Do boot from standard Select whether to perform a boot Selected/deselected Deselected Section 5.1.5...
  • Page 349 CHAPTER8 PARAMETERS (7) SFC The mode and conditions for starting an SFC program, and the output mode in the case of a block stop are set. Figure 8.7 SFC Table8.7 SFC setting list Parameter Item Description Setting range Default Reference SFC program start mode 8002 Initial start...
  • Page 350 (8) I/O assignment The mounting status of each module in the system is set. Figure 8.8 I/O assignment Table8.8 I/O assignment setting list Parameter Item Description Setting range Default Reference • CPU No.2 and No.3: No.n/Empty (Set "CPU (Empty)" for the slot where no Set the type of the mounted Type CPU module is mounted.)
  • Page 351 CHAPTER8 PARAMETERS Table8.8 I/O assignment setting list (continued) Parameter Item Description Setting range Default Reference Set the model name of the main base unit or extension base Base model unit. (Entered at user's Up to 16 characters name discretion. Do not use the one for the CPU module.) Set the model name of the power supply module on the...
  • Page 352 (9) Serial Note1 Note8.1 The transmission speed, sum check, transmission wait time, and RUN write setting for using the serial communication function of the CPU module are set. Figure 8.9 Serial Table8.9 Serial setting list Parameter Item Description Setting range Default Reference Use serial...
  • Page 353 CHAPTER8 PARAMETERS (10)Acknowledge XY assignment The parameters set in the I/O assignment, Ethernet/CC IE/MELSECNET setting, and CC-Link setting can be confirmed. Figure 8.10 Acknowledge XY assignment Table8.10 Acknowledge X/Y assignment list Parameter Item Description Setting range Default Reference The data set in the I/O assignment, Ethernet/CC IE/ X/Y assignment MELSECNET setting, and CC-Link setting can be checked.
  • Page 354 (11)Multiple CPU settings Parameters required for configuring a multiple CPU system are set. Figure 8.11 Multiple CPU settings Table8.11 Multiple CPU setting list Parameter Item Description Setting range Default Reference Set the number of CPU modules No. of PLC 0E00 1 to 3 used in a multiple CPU system.
  • Page 355 CHAPTER8 PARAMETERS 8.1.2 High Performance model QCPU, Process CPU, and Redundant CPU (1) PLC name A label and a comment for the CPU module are set. Figure 8.12 PLC name Table8.12 PLC name setting list Parameter Item Description Setting range Default Reference Set a label (name, application) for...
  • Page 356 (2) PLC system Parameters required for use of the CPU module are set. Figure 8.13 PLC system Table8.13 PLC system setting list Parameter Item Description Setting range Default Reference Section 1ms to 1000ms (in increments of 1ms) 100ms Timer speed 9.2.10 Set the time limit for the low speed timer limit...
  • Page 357 CHAPTER8 PARAMETERS (3) PLC file Parameters required for the files used in the CPU module are set. Figure 8.14 PLC file Table8.14 PLC file setting list Parameter Item Description Setting range Default Reference • Not used Set a file for the file register used in •...
  • Page 358 (4) PLC RAS (PLC RAS(1) Parameters required for performing the RAS functions are set. Figure 8.15 PLC RAS Table8.15 PLC RAS setting list Parameter Item Description Setting range Default Reference 10ms to 2000ms Set a watchdog timer value for WDT Setting (in increments of 200ms Section 6.16...
  • Page 359 CHAPTER8 PARAMETERS (5) PLC RAS(2) Note2 Note8.2 Parameters required for performing the RAS functions in the Process CPU and Redundant CPU are set. Figure 8.16 PLC RAS(2) Table8.16 PLC RAS(2) setting list Parameter Refer- Item Description Setting range Default ence Set whether to check the user area in the program memory (excluding Selected/deselected...
  • Page 360 (6) Device Number of points, latch range, and local device range are set for each device. Figure 8.17 Device Table8.17 Device setting list Parameter Item Description Setting range Default Reference • X: 8K • Y: 8K • M: 8K • L: 8K X(8K), Y(8K), S(8K), SB(2K), and •...
  • Page 361 CHAPTER8 PARAMETERS (7) Program File names and execution types (execution conditions) are set for each program when two or more programs are written to the CPU module. Figure 8.18 Program Table8.18 Program setting list Parameter Item Description Setting range Default Reference When writing two or more programs to Program name...
  • Page 362 (8) Boot file Parameters required for boot operation and writing data automatically to the standard ROM are set. Figure 8.19 Boot file Table8.19 Boot file setting list Parameter Item Description Setting range Default Reference Select whether to clear the Clear program program memory at the time of Selected/deselected Deselected...
  • Page 363 CHAPTER8 PARAMETERS (9) SFC The mode and conditions for starting an SFC program, and the output mode in the case of a block stop are set. Figure 8.20 SFC Table8.20 SFC setting list Parameter Item Description Setting range Default Reference SFC program start mode 8002 Initial start...
  • Page 364 (10)I/O assignment The mounting status of each module in the system is set. Figure 8.21 I/O assignment Table8.21 I/O assignment setting list Parameter Item Description Setting range Default Reference • CPU No.2 to No.4: No.n/Empty (Set "CPU (Empty)" for the slot where no Type Set the type of the mounted module.
  • Page 365 CHAPTER8 PARAMETERS Table8.9 I/O assignment setting list (continued) Parameter Item Description Setting range Default Reference Set various switches of an Refer to the manual for the Switch setting 0407 Blank Section 6.10 intelligent function module. intelligent function module used. Set whether to clear or hold the Error time 0403 output in case of a stop error in...
  • Page 366 (12)Multiple CPU settings Note3 Note8.3 Parameters required for configuring a multiple CPU system are set. Figure 8.23 Multiple CPU settings Table8.23 Multiple CPU setting list Parameter Item Description Setting range Default Reference Set the number of CPU modules used in a multiple No.
  • Page 367 CHAPTER8 PARAMETERS Table8.23 Multiple CPU setting list (continued) Parameter Descrip- Item Setting range Default Reference Parameter No. tion Select whether to read the input All CPUs can data of the input modules or read all Selected/deselected Deselected intelligent function modules I/O sharing inputs controlled by another CPU.
  • Page 368 8.2 Redundant Parameters Note8.4 This section provides the list of redundant parameters and describes parameter details.Note4 Table8.24 Redundant parameter Parameter Item Description Setting range Default Reference Set the operation mode and tracking QnPRHCPU User's Manual Redundant parameter 0D00 transfer settings of the Redundant CPU. (Redundant System) QnPRHCPU User's Manual (Redundant System) (1) Operation settings...
  • Page 369 CHAPTER8 PARAMETERS (2) Tracking settings Parameters required for the tracking function in a redundant system are set. Figure 8.25 Tracking settings Table8.26 Tracking setting list Parameter Item Description Setting range Default Reference Select whether to set the range for Internal device block setting/ Internal device block Tracking device settings tracking device data to be...
  • Page 370 8.3 Network Parameters This section provides the list of network parameters and describes parameter details. Symbols, mn, **, M, and N used in the "Parameter No." mn, **, M, and N in "Parameter No." in this section denote the following: •...
  • Page 371 CHAPTER8 PARAMETERS (1) CC-Link IE Controller Network setting Network parameters for the CC-Link IE Controller Network are set. Figure 8.26 Setting the number of Ethernet/CC IE/MELSECNET cards (CC-Link IE Controller Network setting) Table8.29 CC-Link IE Controller Network setting list Parameter Item Description Setting range...
  • Page 372 (2) MELSECNET/H setting Network parameters for MELSECNET/H are set. Figure 8.27 Setting the number of Ethernet/CC IE/MELSECNET cards (MELSECNET/H setting) Table8.30 MELSECNET/H setting list Parameter Item Description Setting range Default Reference Number of modules on 5000 MELSECNET/H Starting I/O No. Network No.
  • Page 373 CHAPTER8 PARAMETERS (3) Ethernet setting Network parameters for Ethernet are set. Figure 8.28 Setting the number of Ethernet/CC IE/MELSECNET cards (Ethernet setting) Table8.31 Ethernet setting list Parameter Item Description Setting range Default Reference Number of modules on 9000 Ethernet Starting I/O No. Network No.
  • Page 374 (4) CC-Link setting Parameters for CC-Link are set. Figure 8.29 Setting the CC-Link list Table8.32 CC-Link setting list Parameter Item Description Setting range Default Reference Number of modules C000 Type Start I/O No. Operational setting CNM2 All connect count Remote input (RX) Remote output (RY) Remote register (RWr) Remote register (RWw)
  • Page 375 CHAPTER8 PARAMETERS 8.4 Remote Password This section provides the list of parameters for use of remote password and describes parameter details. Figure 8.30 Remote password settings dialog box A remote password is set for an Ethernet module, serial communication module, or modem interface module. Table8.33 Remote password setting list Parameter Item...
  • Page 376 CHAPTER9 DEVICES This chapter describes the devices that can be used in the CPU module. 9.1 Device List Table9.1 and Table9.2 list the names and data ranges of the devices that can be used in the CPU module. (1) Basic model QCPU Table9.1 Device list Default Parameter-...
  • Page 377 CHAPTER9 DEVICES Table9.1 Device list (continued) Default Parameter-set Classification Type Device name Reference range Points Range Pointer P0 to 299 Decimal Section 9.9 Pointer Interrupt pointer I0 to 127 Decimal Section 9.10 Bit device SFC block device BL0 to 127 Decimal Section 9.11.1 Network No.
  • Page 378 (2) High Performance model QCPU, Process CPU, and Redundant CPU Table9.2 Device list Default Parameter-set Classification Type Device name Reference range Points Range Input 8192 X0 to 1FFF Hexadecimal Section 9.2.1 Output 8192 Y0 to 1FFF Hexadecimal Section 9.2.2 Internal relay 8192 M0 to 8191 Decimal...
  • Page 379 CHAPTER9 DEVICES Table9.2 Device list (continued) Default Parameter-set Classification Type Device name Reference range Points Range Section SFC block device BL0 to 319 Decimal 9.11.1 Bit device Section SFC transition device TR0 to 511 Decimal 9.11.2 Network No. specification Section Other J1 to 255 Hexadecimal...
  • Page 380 9.2 Internal User Devices (1) Definition Internal user devices can be used for various user applications. (2) Points for internal user devices The default values can be changed in the Device tab of the PLC parameter dialog box. However, the points for the input (X), output (Y), step relay (S), link special relay (SB), and link special register (SW) cannot be changed.
  • Page 381 CHAPTER9 DEVICES (3) Memory size Set the internal user devices so that the following condition is satisfied. (Bit device size) + (Timer, retentive timer, and counter sizes) + (Word device size) 29K words (a) Bit device For bit devices, 16 points are calculated as one word. (X+Y+M+L+B+F+SB+V+S) Words (Bit device size) =...
  • Page 382 (4) Device point assignment example Table9.3 shows a device point assignment example. Table9.3 uses the same format as the device point assignment sheet shown in Appendix 3. Table9.3 Device point assignment example Restriction check Number of device point Sym- Numeric Device name notation Points...
  • Page 383 CHAPTER9 DEVICES 9.2.1 Input (X) (1) Definition The input (X) is used to send commands or data to the CPU module from external devices such as push-button switches, selector switches, limit switches, and digital switches. Push-button switch Selector switch Input (X) Sequence operation Digital switch...
  • Page 384 ● When debugging a program, the input (X) can be set to on or off by the following: • Device test in GX Developer • OUT Xn instruction OUTX1 ON/OFF command Figure 9.5 Input (X) on/off with the OUT Xn instruction ●...
  • Page 385 CHAPTER9 DEVICES 9.2.2 Output (Y) (1) Definition The output (Y) is used to output control results on programs to external devices such as signal lamps, digital displays, electromagnetic switches (contactors), or solenoids. Data can be output to the outside like using a normally open contact. Signal lamp Digital display Output (Y)
  • Page 386 9.2.3 Internal relay (M) (1) Definition The internal relay (M) is a device for auxiliary relays used in the CPU module. All of the internal relay are set to off in the following cases: • When the CPU module is powered off and then on •...
  • Page 387 CHAPTER9 DEVICES 9.2.4 Latch relay (L) (1) Definition The latch relay (L) is a device for auxiliary relays that can be latched inside the CPU module. Latch relay data are retained by batteries in the CPU module during power failure. Operation results (on/off information) immediately before the following will be also retained.
  • Page 388 (4) Method for external output The output (Y) is used to output sequence program operation results to external devices. ● If latch is not required, use the internal relay (M). ( Section 9.2.3) ● The latch clear invalid area is set in the Device setting of PCL parameter. ( Section 6.3) 9 - 13...
  • Page 389 CHAPTER9 DEVICES 9.2.5 Annunciator (F) (1) Definition The annunciator (F) is an internal relay which can be effectively used in fault detection programs for user-created system. (2) Special relay and special register after annunciator ON When the annunciator is turned on, the special relay (SM62) is set to on, and the numbers and quantity of the annunciator numbers are stored in the special register (SD62 to SD79).
  • Page 390 (5) Turning on the annunciator and processing (a) Turning on the annunciator The following instructions can be used. 1) SET F instruction The SET F instruction can be used to turn on the annunciator only on the leading edge (off to on) of an input condition.
  • Page 391 CHAPTER9 DEVICES (b) Processing after annunciator on 1) Data stored in the special register (SD62 to SD79) • Turned-on annunciator numbers are stored in SD64 to SD79 in order. • The annunciator number in SD64 is stored in SD62. • SD63 value is incremented by "1". SET F50 SET F25 SET F1023 SD62...
  • Page 392 (6) Turning off the annunciator and processing (a) Turning off the annunciator The following instructions can be used. 1) RST F instruction This is used to turn off the annunciator number that was turned on with the SET F instruction. 2) LEDR instruction Note3 Note9.3...
  • Page 393 CHAPTER9 DEVICES (b) Processing after annunciator off 1) Data stored in the special register (SD62 to SD79) after execution of the LEDR instruction • The annunciator number in SD64 is deleted, and the other annunciator numbers in the register addressed SD65 and after are shifted accordingly. •...
  • Page 394 3) LED indication When all of the annunciator numbers in SD64 to SD79 turn off, the LED that was turned on by turn-on of the annunciator will turn off. ( (5)(b) in this section) If the LEDR instruction is executed while the annunciator is on and at the same time the operation continuation error that has higher priority ( Section 6.21.2) than the annunciator has occurred, the LEDR instruction clears the higher priority error.
  • Page 395 CHAPTER9 DEVICES 9.2.6 Edge relay (V) (1) Definition The edge relay (V) is a device in which the on/off information from the beginning of the ladder block. Contacts only can be used. (Coils cannot be used). Stores on/off information of X0, X1, and X10.
  • Page 396 9.2.7 Link relay (B) (1) Definition The link relay (B) is a relay on the CPU module side, and it is used for refreshing the link relay (LB) data of another module such as a MELECNET/H network module to the CPU module or refreshing the CPU module data to the link relay (LB) of the MELECNET/H network module.
  • Page 397 CHAPTER9 DEVICES (3) Using the link relay in the network system Network parameters must be set. The link relay range areas that is not set by network parameters (not used for a network system such as a MELSECNET/H network) can be used as the internal relay or latch relay. •...
  • Page 398 9.2.8 Link special relay (SB) (1) Definition The Link special relay (SB) is a relay that indicates various communication status and detected errors of intelligent function modules such as CC-Link IE Controller Network or MELSECNET/H network modules. Each of this device area is turned on or off according to a factor occurred during data link. The communication status and errors on the network can be confirmed by monitoring the link special relay (SB).
  • Page 399: Step Relay (S)

    CHAPTER9 DEVICES 9.2.9 Step relay (S) This device is provided for SFC programs. Because the step relay is a device exclusively used for SFC programs, it cannot be used as an internal relay in the sequence program. If used, an SFC error will occur, and the system may go down. Remark For use of the step relay, refer to the following.
  • Page 400: Timer (T)

    9.2.10Timer (T) (1) Definition 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. The timer is of an incremental type. (2) Timer types Timers are mainly classified into the following two types.
  • Page 401 CHAPTER9 DEVICES (4) Low-speed timer (a) Definition This type of timer measures time in increments of 1 to 1000ms. The timer starts time measurement when its coil is turned on, and when it times out, the contact is turned on. If the timer's coil is turned off, the current value is changed to "0"...
  • Page 402 (6) Retentive timer (a) Definition This timer measures the period of time during which the coil is on. The timer starts time measurement when its coil is turned on, and when it times out, the contact is turned on. Even if the timer's coil is turned off, the current value and the on/off status of the contact are retained. When the coil is turned on again, the measurement restarts from the retained current value.
  • Page 403 CHAPTER9 DEVICES (7) Timer processing and accuracy (a) Processing When the OUT T or OUT ST instruction is executed, the on/off switching of the timer coil, current value update, and on/off switching of the contact are performed. In the END processing, the current timer value is not updated and the contact is not turned on/off. [Ladder example] [Processing at execution of OUT T0 instruction] OUT TO...
  • Page 404 (b) Accuracy The value obtained by the END instruction is added to the current value when the OUT T or OUT ST instruction is executed. The current value is not updated while the timer coil is off even if the OUT T or OUT ST instruction is executed.
  • Page 405 CHAPTER9 DEVICES (8) Precautions for using timers (a) Use of the same timer Do not use the OUT T instruction that describes the same timer more than once within one scan. If this occurs, the current timer value will be updated by each OUT T instruction execution, resulting in incorrect time measurement.
  • Page 406 (e) Timer setting value and timer limit setting Set the timer to meet the following condition: Timer setting value Scan time Timer limit setting (SD526,SD527) Figure 9.27 Relationship between timer setting value and timer limit setting If the values are set to become "Timer setting value < Scan time + Timer Limit Setting", the coil and the contact might be simultaneously turned on depending on the timing on which the coil is turned on.
  • Page 407 CHAPTER9 DEVICES The following show the examples of the coil and the contact being simultaneously turned on if the values are set to become "Timer setting value < Scan time + Timer Limit Setting": When the timer setting value is 1 (1 × 100ms), the scan time is 20ms, and the timer limit setting is Example 100ms If the coil of the timer (T0) is turned on at the next scan after the values satisfy "Count at execution of the END...
  • Page 408 (f) When the set value is changed after time-out Even if the set value is changed to a larger value after time-out of the timer, the timer remains timed-out and does not start the operation. (g) When using multiple timers When using multiple timers to update the respective current values at execution of each OUT T instruction, pay attention to the ladder sequence.
  • Page 409: Counter (C)

    CHAPTER9 DEVICES 9.2.11 Counter (C) (1) Definition The counter (C) is a device that counts the number of rises for input conditions in sequence programs. When the count value matches the set value, the counting stops and its contact is turned on. The counter is of an incremental type.
  • Page 410 (b) Current value update (count value + 1) The current value is updated (count value + 1) at the leading edge (OFF ON) of the OUT C instruction. The current value is not updated while the coil is off, or when it remains on or turns off from on by the OUT C instruction.
  • Page 411 CHAPTER9 DEVICES 1) Precautions for resetting the counter Execution of the RST C instruction also turns off the coil of C . If the execution condition for the OUT C instruction is still ON after execution of the RST C instruction, turn on the coil of C at execution of the OUT C...
  • Page 412 (d) 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 C instruction. The maximum counting speed is calculated by the following expression: n: Duty (%) Maximum counting [times/s] speed (Cmax)
  • Page 413 CHAPTER9 DEVICES (4) Interrupt counter (a) Definition The interrupt counter counts how many times an interrupt factor has occurred. (b) Count processing 1) When an interrupt occurs The interrupt counter updates its current value when an interrupt occurs. To utilize the interrupt counter, any program that includes the interrupt counter is not required. 2) Counting of the interrupt counter The interrupt counter does not stop its counting even if a set value is specified.
  • Page 414 (5) Precautions (a) Interrupt counter and interrupt program execution One interrupt pointer cannot be used for both interrupt counting and interrupt program execution. Once the interrupt counter is set in the PLC system tab of the PLC parameter dialog box, interrupt programs are not executable.
  • Page 415: Data Register (D)

    CHAPTER9 DEVICES 9.2.12Data register (D) (1) Definition The data register (D) is a memory in which numeric data (-32768 to 32767, or 0000 to FFFF ) can be stored. (2) Bit structure of the data 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 416: Link Register (W)

    9.2.13Link register (W) (1) Definition The link register (W) is a memory in the CPU module, which is refreshed with link register (LW) data of an intelligent function module such as a MELSECNET/H network module. CPU module MELSECNET/H network module Link register Link register Link refresh...
  • Page 417 CHAPTER9 DEVICES (b) When using a 32-bit instruction for the link register For a 32-bit instruction, two consecutive points of the data register (Wn and Wn+1) are the target of the processing. The lower 16 bits correspond to the link register number (Wn) specified in the sequence program, and the higher 16 bits correspond to the specified link register number + 1.
  • Page 418: Link Special Register (Sw)

    9.2.14Link special register (SW) (1) Definition The link special register (SW) is used to store communication status data and error data of intelligent function modules, such as CC-Link IE Controller Network modules and MELSECNET/H network modules. Because the data link information is stored as numeric data, error locations and causes can be checked by monitoring the link special register.
  • Page 419: Internal System Devices

    CHAPTER9 DEVICES 9.3 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. 9.3.1 Function devices (FX, FY, FD) (1) Definition 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 420 (b) Function output (FY) • The function output is used for passing an operation result (on/off data) in a subroutine program to a calling program. • An operation result is stored in the device specified in the subroutine program with argument passing. •...
  • Page 421 CHAPTER9 DEVICES In subroutine programs with argument passing, do not use any devices that are used by the function register. If this occurs, function register values will not be normally passed to the calling program. CALLP P0 D0 R0 R10 FD0 MOV K0 D3 Since D0 to D3 are used for FD0, D3 cannot be used in the...
  • Page 422: Special Relay (Sm)

    9.3.2 Special relay (SM) (1) Definition The special relay (SM) is an internal relay of which details are specified inside the programmable controller, and the CPU module status data are stored in this special relay. (2) Special relay classifications Table9.7 shows special relay classifications. Table9.7 Special relay classification list CPU module Classification...
  • Page 423: Special Register (Sd)

    CHAPTER9 DEVICES 9.3.3 Special register (SD) (1) Definition The special register (SD) is an internal relay of which details are specified inside the programmable controller, and the CPU module status data (such as error diagnostics or system information) are stored in this special register.
  • Page 424: Link Direct Device

    9.4 Link Direct Device (1) Definition The link direct device is a device for direct access to the link device in a CC-Link IE Controller Network module or MELSECNET/H network module. The CPU module can directly write data to or read data from the link device in a CC-Link IE Controller Network module or MELSECNET/H network module using sequence programs regardless of link refresh.
  • Page 425 CHAPTER9 DEVICES (3) Specification range A link device that is not set in the Network parameter dialog box can be specified. (a) Writing • The write range must be within the link device send range that is set by common parameters on Network parameter setting dialog box, and it must be outside the refresh range set by network refresh parameters.
  • Page 426 (b) Reading The link device ranges of network modules can be read. Writing or reading data by using a link direct device is allowed for only one network module that is on the same network. If two or more network modules are mounted on the same network, a network module with the lowest slot number is the target of writing or reading by the link direct device.
  • Page 427 CHAPTER9 DEVICES (4) Differences between link direct devices and link refresh Table9.9 Differences between link direct devices and link refresh Item Link direct device Link refresh Link relay B0 or higher \K4B0 or higher Link register W0 or higher \W0 or higher Description on programs Link special relay...
  • Page 428: Module Access Devices

    9.5 Module Access Devices 9.5.1 Intelligent function module device (1) Definition The intelligent function module device allows direct access from the CPU module to the buffer memories of the intelligent function modules which are mounted on the main and extension base units. (2) Specification method and application example (a) Specification method Specify the I/O number and buffer memory address of the intelligent function module.
  • Page 429 CHAPTER9 DEVICES (3) Processing speed The processing speed of the intelligent function module device is as follows: • The processing speed of writing or reading using the intelligent function module device is slightly higher compared with the case of using the FROM or TO instruction. "MOV U2/G11 D0"...
  • Page 430 Instead of using the intelligent function module device in the sequence program twice or more to write or read buffer memory data, using the FROM or TO instruction once in one place can increase the processing speed. Figure 9.58 Writing data using the intelligent function module device multiple times Writes data to a device such as data register (D) Writes data once in the program...
  • Page 431: Cyclic Transmission Area Device

    CHAPTER9 DEVICES Cyclic transmission area device 9.5.2 Note9.6 (1) Definition The cyclic transmission area device is used to access the CPU shared memory of each CPU module in a multiple system.Note6 (2) Features • The transfer speed is higher than the case of using the write (S.TO or TO) or read (FROM) instruction to the CPU shared memory, resulting in reduced programing steps.
  • Page 432: Index Register (Z)

    9.6 Index Register (Z) 9.6.1 Index register (Z) (1) Definition The index register is used for indirect specification (index modification) in sequence programs. Index modification uses one point of the index register. MOVP K5 Z0 SM400 D0Z0 K4Y30 Specify the index register by one point (16 bits).
  • Page 433 CHAPTER9 DEVICES (b) When using the index register for a 32-bit instruction The processing target is Zn and Zn+1. The lower 16 bits correspond to the specified index register number (Zn), and the higher 16 bits correspond to the specified index register number + 1. When Z2 is specified in the DMOV instruction, Z2 represents the lower 16 bits and Z3 Example represents the higher 16 bits.
  • Page 434: Switching Between The Scan Execution Type And Low-Speed Execution Type Programs

    9.6.2 Switching between the scan execution type and low-speed execution type programs Note9.7 The CPU module saves and restores the index register data when switching between the scan execution type program and the low-speed execution type program.Note7 (1) When switching from the scan execution type program to the low-speed execution type program The CPU module saves index register values in the scan execution type program, and restores index register values in the low-speed execution type program.
  • Page 435 CHAPTER9 DEVICES 9.6.3 Switching from the scan execution type/low-speed execution type program to the interrupt/fixed scan execution type program Note9.8 The CPU module performs the following when switching from the scan execution type program or low-speed execution type program to the interrupt or fixed scan execution type program.Note8 •...
  • Page 436 (2) Processing of the index register (a) When "High-speed execution" is not selected 1) When switching from the scan execution type program to the interrupt/fixed scan execution type program The CPU module saves index register values in the scan execution type program, and passes them to the interrupt/fixed scan execution type program.
  • Page 437: Interrupt/Fixed Scan Execution Type Program

    CHAPTER9 DEVICES (b) When "High-speed execution" is selected 1) When switching from the scan execution type/low-speed execution type program to the interrupt/fixed scan execution type program The CPU module does not save/restore any index register values. 2) When switching from the interrupt/fixed scan execution type program to the scan execution type/low-speed execution type program If data are written to the index register by the interrupt/fixed scan execution type program, the values of the index register used in the scan execution type/low-speed execution type program will be corrupted.
  • Page 438 (3) Processing of file register's block numbers (a) When switching from the scan execution type/low-speed execution type program to the interrupt/fixed scan execution type program The CPU module saves the file register block numbers in the scan execution type/low-speed execution type program, and passes them to the interrupt/fixed scan execution type program.
  • Page 439: File Register (R)

    CHAPTER9 DEVICES 9.7 File Register (R) Note9.9 (1) Definition The file register (R) is a device provided for extending the data register. The file register can be used at the same processing speed as the data register.Note9 K100 R2 File register 100 is written to R2.
  • Page 440: File Register Data Storage Location

    (3) Clearing the file register The data in the file register is held even if the CPU module is powered off or is reset. (File register data cannot be cleared by latch clear.) To clear file register data, perform data clear by sequence program or GX Developer. (a) When clearing by the sequence program FMOV K0 R0 K1000 Figure 9.73 Example of clearing the file register R0 to R999...
  • Page 441: Differences In Available Accesses By Storage Memory

    CHAPTER9 DEVICES (2) When using an SRAM card Up to 1018K points can be stored in one file. Since one block consists of 32K words, up to 32 blocks can be stored. Note that the number of points or blocks that can be added depends on the size of the programs and device comments stored in the memory card.
  • Page 442: Registration Procedure For The File Register

    9.7.4 Registration procedure for the file register Note9.10 To use a file register, register the file of the file register to the CPU module in the following steps.Note10 Start Setting a file register file PLC file tab of the PLC parameter dialog box When "Use the following file."...
  • Page 443 CHAPTER9 DEVICES (1) Setting the file register In the PLC file tab of the PLC parameter dialog box, specify the standard RAM or a memory card to use the file register in the sequence program. Figure 9.75 File register setting (a) Not used Select this in the following cases.
  • Page 444 (b) Use the same file name as the program. Select this when executing the file register with the same file name as the sequence program. 1) When the program is changed The file name of the file register is automatically changed to the same name as the program. This feature is useful if the file register is exclusively used for one program as a local device.
  • Page 445 CHAPTER9 DEVICES (2) File register setting In a new device memory screen, set data for the specified file register. Figure 9.77 Device memory screen (a) Devices Setting R (R0 in the case shown above) and clicking the button will display the file register list. Display (b) Data setting Enter data that are set for the file register.
  • Page 446 (a) When stored in the standard RAM or SRAM card Select [Online] [Write to PLC] from the menu of GX Developer and register a file register file on the Write to PLC screen. Figure 9.78 Write to PLC screen • Select "Standard RAM" or "Memory card (RAM)" in the "Target memory". •...
  • Page 447 CHAPTER9 DEVICES (b) When stored in the Flash card Select [Online] [Write to PLC (Flash ROM)] [Write to PLC (Flash ROM)] from the menu of GX Developer and register a file register file on the Write to PLC (Flash ROM) screen. Figure 9.79 Write to PLC (Flash ROM) screen •...
  • Page 448: Specification Methods Of The File Register

    9.7.5 Specification methods of the file register (1) Block switching method The file register points used are divided and specified in units of 32K points (R0 to R32767). If multiple blocks are used, the desired block is specified with the block number in the RSET instruction. Each block has a specification range of R0 to R32767.
  • Page 449: Precautions For Using The File Register

    CHAPTER9 DEVICES 9.7.6 Precautions for using the file register (1) When using the Basic model QCPU Even if data are written to or read from the file register area whose number is equal to 64K points or more, no error will occur. Note that, however, unreliable data may be stored in this kind of reading from the file register.
  • Page 450 2) Checking timing • In a program using any file register, check the file register size at step 0. • After execution of the file register file switching instruction (QDRSET), check the file register size. • Before executing the file register block switching instruction (RSET), confirm that space of 1K points or more can be ensured after the switching.
  • Page 451 CHAPTER9 DEVICES [Program example 3] When a block is switched to another: SM400 Final file register < SD647 K33 range check Alarm processing Block switching command RSET K1 Switching to block 1 Figure 9.82 Program examples of file register checking (c) When using the SRAM card which stores file register for 1018K points or more For the High Performance model QCPU whose serial number (first five digits) is "16021"...
  • Page 452: Nesting (N)

    9.8 Nesting (N) (1) Definition Nesting (N) is a device used in the master control instructions (MC and MCR instructions) to program operation conditions in a nesting structure. (2) Specification method using master control instructions The master control instruction opens or closes a common ladder gate to switch the ladder of a sequence program efficiently.
  • Page 453: Pointer (P)

    CHAPTER9 DEVICES 9.9 Pointer (P) (1) Definition The pointer (P) is a device used in jump instructions (CJ, SCJ, or JMP) or subroutine call instructions (such as CALL). (2) Applications 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 454: Local Pointer

    9.9.1 Local pointer Note12 Note9.12 (1) Definition 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 455 CHAPTER9 DEVICES (3) Precautions for using the local pointer (a) Program where the local pointer is described A jump from another program is not allowed. jump instructions and sub-routine CALL instructions. Use the ECALL instruction from another program when calling a subroutine program in a program file that contains any local pointer.
  • Page 456: Common Pointer

    9.9.2 Common pointer Note9.13 (1) Definition The common pointer is used to call subroutine programs from all programs that are being executed.Note13 Program A Program C P204 CALL P0 CALL P204 FEND P205 Program B CALL P205 FEND Label Figure 9.87 Calling pointers in another program (common pointer) Note13 Note9.13 Basic...
  • Page 457 CHAPTER9 DEVICES (2) Common pointer range In the PLC system tab of the PLC parameter dialog box, set the start number for the common pointer. The common pointer range is from the specified pointer number to P4095. However, the pointer number that can be entered here is a number higher than the total points used for the local pointer.
  • Page 458 (3) Precautions 1) The same pointer number cannot be used as a label. Doing so will result in a "Pointer configuration error" (error code: 4021). 2) If the total number of the local pointer points used in several programs exceeds the start number of the common pointer, a "Pointer configuration error (error code: 4020) will occur.
  • Page 459: Interrupt Pointer (I)

    CHAPTER9 DEVICES 9.10 Interrupt Pointer (I) (1) Definition 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 IRET Figure 9.90 Interrupt pointer (2) Number of available points •...
  • Page 460 (3) Interrupt factors Interrupt factors are listed in Table9.13. Table9.13 Classification of interrupt factors CPU module type Interrupt Basic High Interrupt factor Description Process Redun- pointer No. model Performance dant CPU QCPU model QCPU I0 to 15 Interrupt input from an interrupt module Interrupt by an interrupt module Interrupt from an AnS/A series special Interrupt by a sequence-started...
  • Page 461: List Of Interrupt Pointer Numbers And Interrupt Factors

    CHAPTER9 DEVICES 9.10.1List of interrupt pointer numbers and interrupt factors The list of interrupt pointer numbers and interrupt factors are shown below. (1) Basic model QCPU Table9.14 List of interrupt pointer numbers and interrupt factors (Basic model QCPU) I No. Interrupt factor Priority 1st point...
  • Page 462 (2) High Performance model QCPU (a) When a Q series interrupt module is mounted Table9.15 List of interrupt pointer numbers and interrupt factors (High Performance model QCPU) I No. Interrupt factor Priority I No. Interrupt factor Priority 1st point All of stop errors SINGLE PS.
  • Page 463 CHAPTER9 DEVICES *1: Among the sequence-started modules on the base unit(s), the module closest to the High Performance model QCPU is assigned to the 1st module and the others are assigned in ascending order. *2: The time-limit value of the internal timer is set by default. In the PLC system tab of the PLC parameter dialog box, the value can be changed within the range of 0.5ms to 1000ms in increments of 0.5ms.
  • Page 464 (b) When a A series interrupt module is mounted Table9.16 List of interrupt pointer numbers and interrupt factors (High Performance model QCPU) I No. Interrupt factor Priority I No. Interrupt factor Priority 1st point All of stop errors SINGLE PS. DOWN 2nd point *3 *4 3rd point...
  • Page 465 CHAPTER9 DEVICES *1: Among the sequence-started modules on the base unit(s), the module closest to the High Performance model QCPU is assigned to the 1st module and the others are assigned in ascending order. *2: The time-limit value of the internal timer is set by default. In the PLC system tab of the PLC parameter dialog box, the value can be changed within the range of 0.5ms to 1000ms in increments of 0.5ms.
  • Page 466 (3) Process CPU Table9.17 List of interrupt pointer numbers and interrupt factors (Process CPU) I No. Interrupt factor Priority I No. Interrupt factor Priority 1st point All of stop errors SINGLE PS. DOWN 2nd point *2 *3 3rd point UNIT VERIFY ERR., FUSE BREAK OFF, 4th point SP.
  • Page 467 CHAPTER9 DEVICES (4) Redundant CPU Table9.18 List of interrupt pointer numbers and interrupt factors (Redundant CPU) I No. Interrupt factor Priority I No. Interrupt factor Priority 1st point All of stop errors 2nd point SINGLE PS. DOWN 3rd point UNIT VERIFY ERR., 4th point FUSE BREAK OFF, SP.
  • Page 468: Other Devices

    9.11 Other Devices 9.11.1 SFC block device (BL) The SFC block is used to check that the specified block in the SFC program is activated.Note14 MELSEC-Q/L/QnA Programming Manual (SFC) 9.11.2 SFC transition device (TR) Note9.14 This device is used for checking whether or not the transition condition for the specified SFC program block is set to forced transition.
  • Page 469: I/O No. Specification Device (U)

    CHAPTER9 DEVICES 9.11.4 I/O No. specification device (U) (1) Definition The I/O No. specification device is used to specify I/O numbers in the intelligent function module dedicated instructions. (2) Specification method In the intelligent function module dedicated instruction, this device is specified as shown in Figure 9.92. GP.READ S1 S2 S3 D I/O No.
  • Page 470: Macro Instruction Argument Device (Vd)

    9.11.5 Macro instruction argument device (VD) (1) Definition The macro instruction argument device (VD) is used with ladders registered as macros. When a VD setting is specified, the value is converted to the specified device when the macro instruction is executed.
  • Page 471: Constants

    CHAPTER9 DEVICES 9.12 Constants 9.12.1Decimal constant (K) (1) Definition The decimal constant (K) is used to specify decimal data in sequence programs. Specify it as K (example: K1234) in sequence programs. In the CPU module, data are stored in binary (BIN). ( Section 2.4.1) (2) Specification range The specification ranges for decimal constants are as follows:...
  • Page 472: Real Number (E)

    9.12.3Real number (E) Note9.15 (1) Definition The real number (E) is a device used to specify real numbers in sequence programs.Note15 In sequence programs, specify it as E (example: E1.234). ( Section 2.4.4) EMOVP E1.234 D0 Figure 9.95 Real number specification (2) Specification range (a) Real number setting range -126...
  • Page 473: Character String (" ")

    CHAPTER9 DEVICES 9.12.4Character string (" ") Note16 Note9.16 (1) Definition The character string is a device used to specify a character string in sequence program. Characters enclosed in quotation marks (example: "ABCD1234") are specified. (2) Available characters The shift JIS code can be used for character strings. The CPU module distinguishes between upper and lower case characters.
  • Page 474: Convenient Usage Of Devices

    9.13 Convenient Usage of Devices Note17 Note9.17 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 475: Local Device

    CHAPTER9 DEVICES ● All of the devices that have not been set as local devices ( Section 9.13.2) are global devices. ● For execution of multiple programs, the range to be shared by all programs and the range to be used independently by each program ( Section 9.13.2) must be specified in advance.
  • Page 476 (1) Devices that can be used as local devices The following devices can be used as local devices. • Internal relay (M) • Edge relay (V) • Timer (T, ST) • Counter (C) • Data register (D) (2) Saving and restoring a local device file When some programs use a local device, respective local device file data in the standard RAM or a memory card (SRAM) are exchanged with the device memory data of the CPU module after execution of each program.
  • Page 477 CHAPTER9 DEVICES (3) Local device setting (a) Setting the local device range In the Device tab of the PLC parameter dialog box, set the range that is used as a local device. Figure 9.100 Device Note that the local device range is common to all programs, and cannot be changed for each program. For example, if a local device range is specified as M0 to M100, this range setting applies to all programs that use the local device.
  • Page 478 (b) Setting the drive and file name After setting the local device range, set a memory for storing the local device file and a file name in the PLC file tab of the PLC parameter dialog box. Figure 9.102 PLC file (c) Writing the setting data Write the data set in (a) and (b) to the CPU module.
  • Page 479 CHAPTER9 DEVICES ● If the size setting of the local device in the standard RAM is changed with a sampling trace file stored in the standard RAM, the sampling trace file is cleared. To save the trace results in your personal computer, perform the following operations. 1) Click the Trace result PLC read button on the Sampling trace dialog box to read the trace result into the...
  • Page 480 (a) Setting method In addition to the setting in (3) in this section, set the following. Select the File usability setting button in the Program tab of the PLC parameter dialog box, and specify the programs that use the local device. Click the File usability setting button.
  • Page 481 CHAPTER9 DEVICES (5) Using the local device corresponding to the file where a subroutine program is stored When executing a subroutine program, you can utilize the local device corresponding to the file where the subroutine program is stored. Use of the relevant local device is set by ON/OFF of SM776. Table9.21 Local device switching by ON/OFF of the special relay (SM776) SM776 Operation...
  • Page 482 (c) Precautions • When SM776 is on, local device data are read out when a subroutine program is called, and the data are saved after execution of the RET instruction. Because of this, the scan time is increased if one subroutine program is executed with SM776 set to on. •...
  • Page 483 CHAPTER9 DEVICES (6) When executing an interrupt/fixed scan execution type program When executing an interrupt/fixed scan execution type program, you can utilize the local device corresponding to the file where the program is stored. Use of the relevant local device is set by ON/OFF of SM777. Table9.22 Local device switching by ON/OFF of the special relay (SM777) SM777 Operation...
  • Page 484 (c) Precautions • When SM777 is on, local device data are read out before execution of an interrupt/fixed scan execution type program, and the data are saved after execution of the IRET instruction. Because of this, the scan time is increased if one interrupt/fixed scan execution type program is executed with SM777 set to on.
  • Page 485: Chapter10 Cpu Module Processing Time

    CHAPTER10 CPU MODULE PROCESSING TIME CHAPTER10 CPU MODULE PROCESSING TIME This chapter describes the CPU module processing time. 10.1 Scan Time This section describes the scan time structures and CPU module processing time. 10.1.1Scan 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.
  • Page 486 (1) Scan time structure of the Basic model QCPU Processing in the RUN status Program check I/O refresh time I/O refresh Section 10.1.2(1) Execution of the DUTY instruction in END Instruction execution time in END processing processing (no execution when the DUTY Section 10.1.2(3) instruction is not used) Program execution...
  • Page 487 CHAPTER10 CPU MODULE PROCESSING TIME (2) Scan time structure of the High Performance model QCPU and Process CPU Processing in the RUN status Program check I/O refresh time I/O refresh Section 10.1.2(1) Execution of the DUTY instruction in END Instruction execution time in END processing processing (no execution when the DUTY Section 10.1.2(3) instruction is not used)
  • Page 488 (3) Scan time structure of the Redundant CPU Processing in the RUN status Program check I/O refresh time I/O refresh Section 10.1.2(1) Backup mode/ standby system Operation mode and system identification Tracking time Section 10.1.2(2) Backup mode/controlsystem Separate mode/controlsystem Separate mode/standby system*1 Execution of the DUTY instruction in END Instruction execution time in END processing processing (no execution when the DUTY...
  • Page 489 CHAPTER10 CPU MODULE PROCESSING TIME (4) How to check scan time The CPU module measures current, minimum, and maximum values of the scan time. The scan time can be checked by monitoring the special register (SD520, SD521, and SD524 to SD527). Accuracy of each stored scan time is 0.1ms.
  • Page 490: Time Required For Each Processing Included In Scan Time

    10.1.2Time required for each processing included in scan time This section describes how to calculate the processing and execution time described in Section 10.1.1. (1) I/O refresh time The I/O refresh time is time required for refreshing I/O data to/from the following modules mounted on the main base unit and extension base units.
  • Page 491 CHAPTER10 CPU MODULE PROCESSING TIME (2) Tracking time This is the processing time required when the tracking function is used in a redundant system. For tracking time, refer to the following. QnPRHCPU User's Manual (Redundant System) (3) Instruction execution time in END processing This is the processing time of the DUTY instruction in END processing.
  • Page 492 (a) Overhead time at execution of interrupt and fixed scan execution type programs When calculating instruction execution time, add the overhead time given in the following table to the instruction execution time, which is described in (4). Two kinds of overhead time (pre-start and program-end) need to be added to interrupt programs. Table10.3 Pre-start overhead time for interrupt programs Interrupt (I0 to I15) from QI60 or...
  • Page 493 CHAPTER10 CPU MODULE PROCESSING TIME 1) Overhead time when local devices in the interrupt program are enabled When SM777 (Enable/disable local device in interrupt program) is turned on, the time given in Table10.6 and Table10.7 will be added to the overhead time given in Table10.3 and Table10.4. Each n, N1, N2, and N3 in the table indicates the following: •...
  • Page 494 (5) Module refresh time Module refresh time is the total time required for the CPU module to refresh data with CC-Link IE Controller Network, MELSECNET/H, and CC-Link modules. (a) Refresh via CC-Link IE Controller Network This is the time required for refreshing data between link devices in a CC-Link IE Controller Network module and devices in the CPU module.
  • Page 495 CHAPTER10 CPU MODULE PROCESSING TIME (d) Auto refresh with an intelligent function module This is the time required for refreshing data between the buffer memory of an intelligent function module and devices in the CPU module. Use intelligent function module utility package (GX Configurator) for auto refresh settings. Calculation method Use the following expression to calculate the auto refresh time with an intelligent function module.
  • Page 496 (6) Function execution time in END processing This is the time required for updating calender, clearing error in END processing, or checking the memory. (a) Calendar update processing time When the clock data set request (SM210 changes from off to on) or the clock data read request (SM213 turns on) is issued, the processing time for changing or reading the clock data is required in END processing.
  • Page 497 CHAPTER10 CPU MODULE PROCESSING TIME (7) Service processing time Service processing is the communication processing with GX Developer and external devices. (a) Basic model QCPU When monitoring device data by GX Developer, the processing time shown in Table10.12 is required. Table10.12 Processing time to monitor device data GX Developer is connected to an RS-232 GX Developer is connected to an RS-232...
  • Page 498 (8) Low speed program operation time The low speed program operation time is the sum of processing times of the instructions used in the low speed execution type program to be executed by the CPU module. Remark For the processing time required for each instruction, refer to the following. MELSEC-Q/L Programming Manual (Common Instruction) (9) Common processing time The CPU module performs common processing by the system.
  • Page 499: Factors That Increase The Scan Time

    CHAPTER10 CPU MODULE PROCESSING TIME 10.1.3Factors that increase the scan time When executing any of the functions or operations described in this section, add the given processing time to the time value calculated in Section 10.1.2. (1) Sampling trace When the sampling trace function ( Section 6.14) is executed, the processing time shown in Table10.16 is required.
  • Page 500 (a) When local devices in a subroutine program are enabled When SM776 (Enable/disable local device at CALL) is turned on, the processing time shown in Table10.18 or Table10.19 is required for each subroutine call. "n" in the table indicates the number of local device points (unit: K words). Table10.18 Processing time (when a local device file in the standard RAM is used) Processing time when a subroutine Processing time when a subroutine...
  • Page 501 CHAPTER10 CPU MODULE PROCESSING TIME (3) Execution of multiple programs When multiple programs are executed, the processing time shown in Table10.20 is required for each program. Table10.20 Processing time for each program (when multiple programs are executed) CPU module Processing time Q02CPU 0.08 n ms...
  • Page 502 (6) Online change When data is written to the running CPU module, the processing time described below is required. (a) Online change (ladder mode) When a program in the running CPU module is changed in ladder mode, the processing time shown in Table10.23 is required.
  • Page 503 CHAPTER10 CPU MODULE PROCESSING TIME (8) Functions that increase the scan time only when the Basic model QCPU is used When any of the following functions is executed, the scan time increases by the time required for its processing. • System monitor •...
  • Page 504: Factors That Shorten The Scan Time

    10.1.4Factors that shorten the scan time Scan time can be shortened by changing parameter settings as described in this section. (1) A series CPU compatibility setting ("A-PLC") ( Section 8.1.2(2)) Note2 Note10.2 Scan time can be shortened by the time shown in Table10.27. To shorten the scan time, deselect the "Use special relay / special register from SM/SD1000"...
  • Page 505 CHAPTER10 CPU MODULE PROCESSING TIME (2) Floating-point operation processing ("Floating point arithmetic processing") Section 8.1.2(2)) Note3 Note10.3 The time required for processing instructions that uses floating-point data can be shortened. To shorten the processing time, deselect the "Perform internal arithmetic operations in double precision" item in the PLC system tab of the PLC parameter dialog box.
  • Page 506 (3) File usability setting ( Section 8.1.2(7)) Note4 Note10.4 Overhead time of a program can be shortened if the program uses no file register file, initial device value file, or device comment file. To shorten the overhead time, select "Not use" in the File usability setting dialog box. Click this button.
  • Page 507: Basic Model Qcpu

    CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE This chapter describes procedures for writing a program created by GX Developer to the CPU module. Remark For procedures for starting the CPU module, refer to the following. QCPU User's Manual (Hardware Design, Maintenance and Inspection) When perform communication between a programming tool and a CPU module through GOT or a network module, check the PLC type because the modules could be connected with wrong model names.
  • Page 508: Hardware Check

    Is the RUN LED on? To Section 11.1.3 Is the ERR. LED off? Please consult your local Mitsubishi representative. Check the error cause in the System Monitor screen displayed by selecting [Diagnostics] QCPU User's Manual (Hardware Design, Maintenance and Inspection) [System Monitor] in GX Developer or in the "PLC diagnostics"...
  • Page 509 CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE Remark For installation and mounting procedures of the CPU module, refer to the following. QCPU User's Manual (Hardware Design, Maintenance and Inspection) 11 - 3...
  • Page 510: Procedure For Writing A Program

    11.1.3 Procedure for writing a program This section describes a procedure for writing a program to the program memory. ( Section 5.1.2) Follow the procedure below and then the procedure provided in Section 11.1.4 before storing the program in the standard ROM for boot operation.
  • Page 511 CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE Select [Online] [Format PLC memory] in GX Developer and format the Write to PLC screen program memory or standard ROM. To write the parameters, created program, and initial device value, make settings in the Write to PLC screen displayed by selecting [Online] [Write to PLC] in GX Developer.
  • Page 512: Procedure For Boot Operation

    11.1.4 Procedure for Boot Operation This section describes a procedure for boot operation. In the following procedure, indicates an operation on the CPU module side. Start (continued from Section 11.1.3) If the RUN/STOP/RESET switch is in RUN, set the switch to STOP. Select "Do boot from standard ROM."...
  • Page 513: High Performance Model Qcpu, Process Cpu, And Redundant Cpu

    CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE 11.2 High Performance Model QCPU, Process CPU, and Redundant 11.2.1 Items to be Considered for Creating Programs To create a program, the number of device points, size, and file name of the program must be predetermined. (1) Program size Check whether the total size of programs and parameters are within the program size executable in the CPU module used.
  • Page 514: Hardware Check

    11.2.2 Hardware Check This section describes a procedure for checking hardware before writing a created program. In the following procedure, indicates an operation on the CPU module side. Start Start GX Developer and create a project. GX Developer Version 8 Operating Manual Connect the personal computer to which GX Developer is installed to the CPU module.
  • Page 515 Is the RUN LED on? To Section 11.2.3 Is the ERR. LED off? Please consult your local Mitsubishi representative. Check the error cause in the System Monitor screen displayed by selecting [Diagnostics] [System Monitor] in GX Developer or in the QCPU User's Manual "PLC diagnostics"...
  • Page 516: Procedure For Writing One Program

    11.2.3 Procedure for Writing One Program This section describes a procedure for writing a program to the program memory. ( Section 5.2.2) Follow the procedure below and then the procedure provided in Section 11.2.5 before storing the program in the standard ROM or memory card for boot operation.
  • Page 517 CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE Set the RUN/STOP switch to STOP, turn the RESET/L.CLR switch to reset clear position, and power on the CPU module. (the ERR. LED turns on). Select [Online] [Format PLC memory] in GX Developer and format Write to PLC screen the program memory.
  • Page 518: Procedure For Writing Multiple Programs

    11.2.4 Procedure for Writing Multiple Programs This section describes a procedure for writing multiple programs to the program memory. ( Section 5.2.2) Follow the procedure below and then the procedure provided in Section 11.2.5 before storing the programs in the memory card for boot operation.
  • Page 519 CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE Set local devices? Set the local device range in the Device Section 9.13.2 tab of the PLC parameter dialog box. Set a file name for the local devices in the Section 9.13.2 PLC file tab of the PLC parameter dialog box.
  • Page 520 Power off the programmable controller and then on or reset the CPU module. Set the RUN/STOP switch to RUN to change the CPU module in the RUN status. Is the ERR. LED on the CPU module on (flashing)? Check the error cause in the System Monitor screen displayed by selecting [Diagnostics] QCPU User's Manual [System Monitor] in GX Developer or in the...
  • Page 521: Procedure For Boot Operation

    CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE 11.2.5 Procedure for Boot Operation This section describes a procedure for boot operation. In the following procedure, indicates an operation on the CPU module side. Start (continued from Section 11.2.3 or Section 11.2.4) If the RUN/STOP switch is in RUN, set the switch to STOP.
  • Page 522: Appendices

    APPENDICES Appendix 1 List of Parameter Numbers Each parameter number will be stored in the special register (SD16 to SD26) when an error occurs in the parameter settings. TableAPPX.1 lists the parameter items and corresponding parameter numbers. For explanation of mn, **, M, and N shown in the "Parameter No." column, refer to Section 8.3. TableAPPX.1 List of parameter numbers Item Parameter No.
  • Page 523 APPENDICES TableAPPX.1 List of parameter numbers (continued) Item Parameter No. Reference Use serial communication Transmission speed Sum check 100E Section 6.24, Section 8.1 Transmission wait time RUN write setting X input 100F Y output 1010 System interrupt settings Section 6.22, Section 8.1 (High speed interrupt setting) Buffer read 1011...
  • Page 524 TableAPPX.1 List of parameter numbers (continued) Item Parameter No. Reference Refresh parameters 5NM1 Common parameters 5NM2 Station inherent parameters 5NM3 Sub-master parameters 5NM5 Section 8.3 Common parameters 2 5NMA Station inherent parameters 2 5NMB Interrupt settings Program 7000 Section 2.3, Section 8.1 Clear program memory Boot option Auto Download all Data from Memory card to Standard...
  • Page 525 APPENDICES TableAPPX.1 List of parameter numbers (continued) Item Parameter No. Reference Number of modules C000 Remote input (RX) Remote output (RY) Remote register (RWr) Remote register (RWw) Ver.2 Remote input (RX) CNM1 Ver.2 Remote output (RY) Section 8.3 Ver.2 Remote register (RWr) Ver.2 Remote register (RWw) Special relay (SB) Special register (SW)
  • Page 526: Appendix 2 Upgrade By Function Addition

    Appendix 2 Upgrade by Function Addition The CPU module is upgraded when any function is added or specifications are changed. Therefore, the functions and specifications can be used differ depending on the function version and serial number of the CPU module. Appendix 2.1 Upgrade of the Basic model QCPU (1) Specifications comparisons TableAPPX.2 Specifications comparisons...
  • Page 527 APPENDICES (2) Availability of new functions depending on the versions of the CPU module and GX Developer TableAPPX.3 Availability of new functions depending on the versions of the CPU module and GX Developer Function First 5 digits of Function GX Developer version serial No.
  • Page 528 (3) Differences among the Basic model QCPU models TableAPPX.4 Differences among the Basic model QCPU models Item Q00JCPU Q00CPU Q01CPU Integrated type of CPU module, power supply CPU module CPU module only module, and main base unit (5 slots) Main base unit/slim type main base unit Unnecessary Necessary Connectable...
  • Page 529: Appendix 2.2 Upgrade Of The High Performance Model Qcpu

    APPENDICES Appendix 2.2 Upgrade of the High Performance model QCPU (1) Specifications comparisons TableAPPX.5 Specifications comparisons First 5 digits of serial No. Function version A Function version B Specifications "02091" "02092" "02112" "03051" "04012" "16021" or earlier or later or later or later or later or later...
  • Page 530 TableAPPX.6 Availability of new functions depending on the versions of the CPU module and GX Developer (continued) Function First 5 digits of Function GX Developer version serial No. Online change (files) of SFC program ( Section 6.12.2) "04122" Version 8 or later or later File size unit (...
  • Page 531: Appendix 2.3 Upgrade Of The Process Cpu

    APPENDICES Appendix 2.3 Upgrade of the Process CPU (1) Availability of new functions depending on the versions of the CPU module and GX Developer TableAPPX.7 Availability of new functions depending on the versions of the CPU module and GX Developer Function First 5 digits of Function...
  • Page 532: Appendix 2.4 Upgrade Of The Redundant Cpu

    Appendix 2.4 Upgrade of the Redundant CPU (1) Availability of new functions depending on the versions of the CPU module and GX Developer TableAPPX.8 Availability of new functions depending on the versions of the CPU module and GX Developer Function First 5 digits of Function GX Developer...
  • Page 533: Appendix 3 Device Point Assignment Sheet

    APPENDICES Appendix 3 Device Point Assignment Sheet (1) For the Basic model QCPU TableAPPX.9 Device point assignment sheet Restriction check Number of device points Sym- eric Device name nota- Points Range Size (words) Points (bits) tion 2K (2048) X0000 to 07FF 2048 Input relay 2K (2048) Y0000 to 07FF...
  • Page 534 (2) For the High Performance model QCPU, Process CPU, and Redundant CPU TableAPPX.10 Device point assignment sheet Restriction check Number of device points Sym- eric Device name nota- Points Range Size (words) Points (bits) tion 8K (8192) X0000 to 1FFF 8192 Input relay 8K (8192) Y0000 to 1FFF...
  • Page 535 INDEX ..... . . 8-6,8-19 Device setting ......3-14 Direct mode .
  • Page 536 ..... . .6-120 LED indication ..... . .9-84 I (Interrupt pointer) .
  • Page 537 ......8-2 PLC parameters ..... 8-17 PLC RAS setting (1) .
  • Page 538 ......9-20 V (Edge relay) ..9-95 VD (Macro instruction argument device) .
  • Page 539 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 540 Microsoft, Windows, Windows Vista, Windows NT, Windows XP, Windows Server, Visio, Excel, PowerPoint, Visual Basic, Visual C++, and Access are either registered trademarks or trademarks of Microsoft Corporation in the United States, Japan, and other countries. Intel, Pentium, and Celeron are either registered trademarks or trademarks of Intel Corporation in the United States and other countries.

Table of Contents