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" and " CAUTION". WARNING Indicates that incorrect handling may cause hazardous conditions, resulting in death or severe injury.
[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.
[Design Precautions] WARNING In an output module, when a load current exceeding the rated current or an overcurrent caused by a load short-circuit flows for a long time, it may cause smoke and fire. To prevent this, configure an external safety circuit, such as a fuse. Configure a circuit so that the programmable controller is turned on first and then the external power supply. If the external power supply is turned on first, an accident may occur due to an incorrect output or malfunction.
[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.
[Wiring Precautions] WARNING Shut off the external power supply for the system in all phases before 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. CAUTION Ground the FG and LG terminals to the protective ground conductor dedicated to the programmable controller. Failure to do so may result in electric shock or malfunction.
[Wiring Precautions] WARNING A protective film is attached to the top of the module to prevent foreign matter, such as wire chips, from entering the module during wiring. Do not remove the film during wiring. Remove it for heat dissipation before system operation. 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.
[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. Doing so may cause failure, malfunction, injury, or a fire.
[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 When transporting lithium batteries, follow the transportation regulations.
CONDITIONS OF USE FOR THE PRODUCT (1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions; i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident; and ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem, fault or failure occurring in the PRODUCT.
REVISIONS *The manual number is given on the bottom left of the back cover. Print date Manual number Revision Dec., 2008 SH(NA)-080807ENG-A First edition Mar., 2009 SH(NA)-080807ENG-B Revision because of function addition to Built-in Ethernet port QCPU (first five digits of the serial number is "11012" or later) Partial correction SAFETY PRECAUTIONS, INTRODUCTION, MANUALS, MANUAL PAGE ORGANIZATION, GENERIC TERMS AND ABBREVIATIONS, Section 1.3, 1.6, 2.2.2, 2.2.3, 2.3, 2.3.3, 2.3.4, 2.
INTRODUCTION This manual describes the memory maps, functions, programs, I/O number assignment, and devices of the Universal model QCPU. 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.
CONTENTS CONTENTS SAFETY PRECAUTIONS...................................................................................................................... A - 1 CONDITIONS OF USE FOR THE PRODUCT ...................................................................................... A - 9 REVISIONS ........................................................................................................................................... A - 10 INTRODUCTION .....................................................
3.8 I/O Processing and Response Delay ..................................................................................... 3 - 8 3.8.1 Refresh mode.................................................................................................................... 3 - 9 3.8.2 Direct mode ....................................................................................................................... 3 - 12 CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER 4.1 4.2 Base Unit Assignment.............
6.6.4 Remote latch clear ............................................................................................................ 6 - 25 6.6.5 Relationship between remote operation and RUN/STOP status of the CPU module ....... 6 - 26 6.7 Q Series-compatible Module Input Response Time Selection (I/O Response Time) ............ 6 - 27 6.8 Error Time Output Mode Setting ............................................................................................ 6 - 29 6.
6.30.2 Backup data restoration function....................................................................................... 6 - 157 6.31 Module model name read ...................................................................................................... 6 - 161 6.32 Module error collection........................................................................................................... 6 - 162 CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE 7.
9.6 Index Register (Z)/Standard Device Resister (Z) ................................................................... 9 - 46 9.6.1 Index register (Z) ............................................................................................................... 9 - 46 9.6.2 Standard device register (Z) .............................................................................................. 9 - 48 9.6.
11.4 Procedure for Writing Multiple Programs ............................................................................... 11 - 7 11.5 Procedure for Boot Operation ................................................................................................ 11 - 10 CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST 12-1 to 12-78 12.1 SPECIAL RELAY LIST........................................................................................................... 12 - 1 12.2 SPECIAL REGISTER LIST.....
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.
Other relevant manuals Manual name CC-Link IE Controller Network Reference Manual Description Specifications, procedures and settings before system operation, parameter setting, programming, and troubleshooting of the CC-Link IE controller < SH-080668ENG (13JV16) > network module Q Corresponding MELSECNET/H Network Specifications, procedures and settings before system operation, parameter System Reference Manual (PLC to PLC setting, programming, and troubleshooting of a MELSECNET/H network network) system
MANUAL PAGE ORGANIZATION Note (icon) Reference Chapter The detailed explanation of "Note . " is provided under the corresponding "Note . " at the bottom of the page. The section in this manual or another relevant manual that can be referred to is shown with . The chapter of the current page can be easily identified by this indication on the right side. Note (detailed explanation) Section title The detailed note corresponding to each icon is described.
GENERIC TERMS AND ABBREVIATIONS Unless otherwise specified, this manual uses the following generic terms and abbreviations. * indicates a part of the model or version.
Generic term/abbreviation Description Power supply module Power supply module Generic term for the Q series power supply module, slim type power supply module, and redundant power supply module Q series power supply module Generic term for the Q61P-A1, Q61P-A2, Q61P, Q61P-D, Q62P, Q63P, Q64P, and Q64PN power supply modules Slim type power supply module Abbreviation for the Q61SP slim type power supply module Redundant power supply module Generic term for the Q63RP and Q64RP power supply modules for
CHAPTER1 OVERVIEW CHAPTER1 OVERVIEW 1 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 2 devices and instructions useful for programming. 3 1.1 Processing Order in the CPU Module 4 The CPU module performs processing in the following order.
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. ( Section 5.
CHAPTER1 OVERVIEW 1.3 Structured Programming 1 The programs to be executed in the CPU module can be structured in the following two ways. 2 • In one program • By dividing into multiple files 3 (1) Structuring in one program Structured programming is available by creating one program as a collection of three program sections: main routine program ( ( Section 2.2.1), subroutine program ( Section 2.2.2), and interrupt program 4 Section 2.2.3).
(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 Parameter Program Device comment Program GX Developer CPU module Figure 1.
CHAPTER1 OVERVIEW (b) Dividing into multiple files according to the functions 1 2 Program memory/memory card Processing contents are divided according to the functions. Initial processing Program A Main processing Program B Communication processing Program C Error processing Program D 3 The execution order and conditions for program A to D can be set. *1 4 5 6 7 Figure 1.
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. A bit-specified word device (turns on (switches to 1) the 5th bit (b5) of D0.) X0 SET D0.
CHAPTER1 OVERVIEW (d) Direct access to the buffer memory of the intelligent function module 1 The buffer memory of the intelligent function module can be used as a device area in a program. ( Section 9.5.
(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) X0 FOR X1 PLS M0 M0 n Y8 X10 X11 X0Z0 X1Z0 V0Z1 Y8Z2 PLS M10 M10 Y18 Multiple number (n) of similar programs can be executed by one description. X170 X171 NEXT PLS M170 M170 Y178 Figure 1.
CHAPTER1 OVERVIEW 1 (4) Flexible management of subroutine programs (a) Subroutine program sharing 2 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 3 programs can also be called by using the common pointer.
(b) Subroutine call instruction with argument passing Subroutine program that is called more than one time can be created easily.
CHAPTER1 OVERVIEW 1.5 Features 1 This section describes the features specific to the Universal model QCPU. 2 (1) High-speed processing more than ever The processing time required for the basic instructions, floating-point operations, and accesses to the file register becomes shorter than the existing Q series CPU modules. Use of a standard device register (Z) *1 3 achieves high-speed processing between register operations (transfer instruction).
(5) 32-bit index modification Since the index modification range is expanded to 32 bits, index modification for the entire file register areas is possible. ( Section 9.6.
CHAPTER1 OVERVIEW 1.6 Checking Serial Number and Function Version 1 The serial number and function version of the CPU module can be checked on the rating plate, on the front of the 2 module, and on the System monitor screen in GX Developer. (1) Checking on the rating plate 3 The rating plate is located on the side of the CPU module. 4 Serial number (first five digits) Function version 5 Relevant regulation standards 6 Figure 1.
(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 Product Inf. List... button in GX Developer. On the same screen, the serial number and function version of intelligent function modules can also be checked. Serial number Function version Product number Figure 1.
CHAPTER2 SEQUENCE PROGRAMS CHAPTER2 SEQUENCE PROGRAMS 1 2.1 Sequence Program Overview 2 (1) Definition 3 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. 4 Sequence instruction X0 M0 5 K100 T0 T0 Y30 6 Basic instruction X1 BIN K4X10 D0 Application instruction X41 FROM H5 K0 D10 7 K1 Figure 2.1 Sequence program 8 Remark 2.
(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. A ladder block, which starts from the left rail and ends at the right rail, is the minimum unit for operating sequence programs.
CHAPTER2 SEQUENCE PROGRAMS 1 (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.
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. After the END processing, the program restarts its operations from the step 0. Step 0 Indicates execution of the program. Main routine program The program operation returns to the step 0.
CHAPTER2 SEQUENCE PROGRAMS 2.2.2 Subroutine program 1 (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 3 (2) Application • Programming a program which is executed two or more times in one scan as a subroutine 4 program can reduce the number of steps in the entire program.
2.2.3 Interrupt program (1) Definition Interrupt program is a program from an interrupt pointer (I ) to the IRET instruction. EI Main routine program Indicates the end of the main routine program. FEND I0 Interrupt program (I0) IRET I29 Interrupt program (I29) IRET END Interrupt pointer Figure 2.7 Interrupt program The interrupt pointer (I ) number varies depending on the interrupt factor. ( Section 9.
CHAPTER2 SEQUENCE PROGRAMS 1 Only one interrupt program can be created with one interrupt pointer number. EI 2 FEND 3 I0 IRET Interrupt program (I0) IRET Interrupt program (I29) I29 4 5 END 6 Remark For details of the interrupt factors and interrupt pointers, refer to Section 9.11. 7 (2) Programming of interrupt programs Create interrupt programs between the FEND and END instructions in the main routine program. 8 Program A 2.2 Sequence Program Configuration 2.2.
(a) Before executing an interrupt program Before executing the interrupt programs of the interrupt pointers I0 to I15, I28 to I31, I45, and I50 to I255, enable interrupts with the EI instruction. Remark For details of the EI instruction, refer to the following. QCPU Programming Manual (Common Instructions) (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.
CHAPTER2 SEQUENCE PROGRAMS 1 (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 2 The CPU module stores the interrupt factor occurred. As soon as the interrupt program execution status is enabled, the CPU module executes the 3 interrupt program corresponding to the stored interrupt factor.
(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.11.1) Other interrupt programs have to wait until processing of the interrupt program being executed is completed.
CHAPTER2 SEQUENCE PROGRAMS (e) When an interrupt factor occurs during link refresh 1 The link refresh is suspended and an interrupt program is executed. Even if the Block data assurance per station setting is enabled in the CC-Link IE controller network or MELSECNET/H network, this setting does not work when a device set as a refresh target is used in the interrupt program. In the interrupt program, do not use any refresh target device.
(4) Processing at program execution type change When the program execution type is changed from the scan execution type to the interrupt, the CPU module saves and restores the following data. ( Section 9.6.3) • Data in the index register • File register block number Whether to save and restore the data above can be set in the PLC parameter dialog box. If the data is not saved or restored, the overhead time of the corresponding interrupt program can be shortened. ( Section 10.1.
CHAPTER2 SEQUENCE PROGRAMS 2.3 Settings When Program is Divided 1 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. 2 (1) Control by multiple programs dividing one program 3 The CPU module can store multiple programs divided on the basis of each control unit. This enables programming of one sequence program by two or more designers.
(a) Program name Enter the name (file name) of the program to be executed in the CPU module. (b) Execute type Select an execution type of the program set under "Program name". The CPU module executes programs whose execution type has been set here according to the setting order. 1) Initial execution type ("Initial") This program is executed only once when the CPU module is powered on or its status is switched from STOP to RUN. ( Section 2.3.
CHAPTER2 SEQUENCE PROGRAMS (c) File usability setting 1 Note2.1Note1 For each program, determine whether to use the file specified for the local device in the PLC file tab of the PLC parameter dialog box. 2 3 4 5 Figure 2.17 File usability setting 6 The default is set to "Use PLC file setting". When "Not used" is selected, data in the local device is not saved or restored when the program execution type is changed. 7 8 2.3 Settings When Program is Divided Note1 Note2.
(3) Program sequence in the CPU module Figure 2.18 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 RUN Executed only once when the CPU module is powered on or its status is switched from STOP to RUN. Initial execution type program END processing Scan execution type program Fixed scan execution type program Stand-by type program Executed at specified time intervals. Executed only when its execution is requested.
CHAPTER2 SEQUENCE PROGRAMS 2.3.1 Initial execution type program 1 (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. 2 This type of program can be used as a program that need not be executed from the next scan and 3 later once it is executed, like initial processing to an intelligent function module.
(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). The initial scan time can be checked by monitoring SD522 and SD523.
CHAPTER2 SEQUENCE PROGRAMS 1 (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. 2 The setting range is 10 to 2000ms (in increments of 10ms). No default value is set. 3 4 5 Figure 2.
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 RUN RUN 1st scan 2nd scan 3rd scan 4th scan END processing Initial execution type program 0 END 0 END 0 END Scan execution type program A 0 END 0 END 0 Scan execution type program B 0 END 0 END Scan execution type program C Scan time Figure 2.
CHAPTER2 SEQUENCE PROGRAMS 2.3.3 Stand-by type program 1 (1) Definition Stand-by type program is executed only when its execution is requested. 2 This type of program can be changed to any desired execution type by a sequence program instruction. 3 (2) Application (a) Program library Stand-by type program is used as a program library, a collection of subroutine programs and/or 4 interrupt programs, and managed separately from a main routine program.
(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.
CHAPTER2 SEQUENCE PROGRAMS 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 1 in the stand-by type program. Figure 2.26 shows the operation when the subroutine and interrupt programs in the stand-by type program are executed.
(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 standby type program. • When the condition is established (the internal relay (M0) in Figure 2.
CHAPTER2 SEQUENCE PROGRAMS 2) Execution type change timing 1 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.
2.3.4 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. For the restrictions on programming, refer to Section 2.2.3(2)(b). (The restrictions on programming are the same as those for interrupt programs.
CHAPTER2 SEQUENCE PROGRAMS 1 (2) Processing (a) When two or more fixed scan execution type programs exist 2 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.
(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 *2 Fixed scan interval END processing Condition established *1 Scan execution type program Fixed scan execution type program *1: Waiting time *2: If processing is not completed within the waiting time, the scan time increases. Figure 2.
CHAPTER2 SEQUENCE PROGRAMS 1 (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 2 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.
2.3.5 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, PSTOP, or POFF instruction to change the execution type.
CHAPTER2 SEQUENCE PROGRAMS (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. 1 2 An unused scan execution type program can also be changed to a stand-by type program. Figure 2.34 shows the case where the execution type of the stand-by type programs "ABC", "DEF", "GHI", and "JKL" are changed in the control program.
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. Table2.2 shows the numeric representations of BIN, HEX, BCD, and DEC (decimal). Table2.
CHAPTER2 SEQUENCE PROGRAMS 1 (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). 2 (a) Numeric values used inside the CPU module The CPU module performs program operations in binary. If the value set in binary-coded decimal is used without conversion, the CPU module performs program 3 operations regarding the set value as binary.
(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. To convert the data set in binary into binary-coded decimal, which can be used in the external indicator, use the BCD instruction.
CHAPTER2 SEQUENCE PROGRAMS 2.4.1 BIN (Binary Code) 1 (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 2 digit reaches 9), the next-higher digit (to the left) is incremented, and counting starts over at 0. In binary notation, only the symbols 0 and 1 are used.
(2) Numeric representation in BIN (a) Bit configuration of BIN used in the CPU module Each register (such as the data register, link register) in the CPU module consists of 16 bits. (b) Numeric data available in the CPU module Each register in the CPU module can store numeric values in the range of -32768 to 32767. Figure 2.37 shows the numeric representations for registers.
CHAPTER2 SEQUENCE PROGRAMS 2.4.2 HEX (Hexadecimal) 1 (1) Definition Hexadecimal (HEX) is a numeral system that represents four binary bits as one digit. 2 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. After a digit reaches FH, the next-higher digit (to the left) is incremented.
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.5 shows the numeric representations in BIN, BCD, and DEC. Table2.
CHAPTER2 SEQUENCE PROGRAMS 2.4.4 Real number (Floating-point data) 1 There are two types of real number data: single-precision floating-point data and double-precision floating-point data. 2 (1) Single-precision floating-point data 3 (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. [Sign] 1.
(b) Calculation example Calculation examples are shown below. (The "X" in (nnnnnn) x indicates the numeral system used.) 1) Storing "10" (10)10 (1010)2 (1.010000..... Sign: Positive 23)2 0 Exponent: 3 82H (10000010)2 Mantissa: (010 00000 00000 00000 00000)2 In this case, the value will be encoded as 41200000H. Sign Exponent Mantissa 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 1 2 0 0 0 0 0 2) Storing "0.75" (0.75)10 Sign: (0.11)2 Positive 2-1)2 (1.100.....
CHAPTER2 SEQUENCE PROGRAMS 1 (2) Double-precision floating-point data (a) Internal representation Real number data used in the CPU module is internally represented as follows, using four word 2 devices. [Sign] 1. [Mantissa] 3 2[Exponent] The bit configuration and the meaning of each bit are described below. b63 b62 b63 Sign to b52 b51 b16 to b15 b52 to b62 Exponent (11 bits) 4 b0 to 5 b0 to b51 Mantissa (52 bits) 6 Figure 2.
(b) Calculation example Calculation examples are shown below. (The "X" in (nnnnnn) x indicates the numeral system used.) 1) Storing "10" (10)10 (1010)2 (1.010000..... Sign: Positive 0 401H 23)2 Exponent: 3 Mantissa: (0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000)2 (100 0000 0001)2 In this case, the value will be encoded as 4014000000000000H.
CHAPTER2 SEQUENCE PROGRAMS 2.4.5 Character string data 1 (1) Definition The CPU module uses ASCII code data. 2 (2) ASCII code character strings 3 Table2.6 lists the ASCII code character strings. "00H" (NULL code) in Table2.6 is used at the end of a character string as a terminator. 4 Table2.
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. When initial processing is completed, the CPU module will be placed in the operation status set by the RUN/STOP/RESET switch. ( Section 3.5) Table3.
CHAPTER3 CPU MODULE OPERATION 3.2 I/O Refresh (Refresh Processing with Input/Output Modules) 1 The CPU module performs the following before sequence program operations. 2 • On/off data input from the input module or intelligent function module to the CPU module • On/off data output from the CPU module to the output module or intelligent function module When the constant scan time is set, I/O refresh is performed after the constant scan waiting time has 3 elapsed.
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.
CHAPTER3 CPU MODULE OPERATION 1 (4) Operation processing in the CPU module when switch operation is performed Table3.2 Operation processing when switch operation is performed 2 CPU module operation processing RUN/STOP Sequence program status operation Device memory External output M,L,S,T,C,D processing RUN STOP the output (Y) status executes the program immediately before its until the END status is changed to instruction and stops.
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. The CPU module, however, continues measurement in the timer device and holds the output status.
CHAPTER3 CPU MODULE OPERATION 3.7 Data Clear Processing 1 This section describes how to clear data in the CPU module and the setting required for the latch data 2 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 3 by powering the module off and then on) is performed. However, data in (a) below cannot be cleared by the reset operation.
(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 with the remote latch clear operation.
CHAPTER3 CPU MODULE OPERATION 3.8 I/O Processing and Response Delay 1 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. (a) Refresh mode( 3 Section 3.8.
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 0 On/off data X10 On/off data CPU module Input module or output module Figure 3.
CHAPTER3 CPU MODULE OPERATION 1 (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 2 operations.
*1: 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. *2: Data in the GX Developer input area can be turned on/off by the following operation. •Test operation by GX Developer •Writing data from a network module *3: Data in the output (Y) device memory can be turned on/off by the following operation.
CHAPTER3 CPU MODULE OPERATION 3.8.2 Direct mode 1 (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 2 3 Device memory Output of on/off data upon instruction execution 0 4 On/off data DX10 On/off data 5 6 7 CPU module Input module or output module 8 Figure 3.
CPU module Remote input refresh area *1 CPU (operation processing area) 3) DX0 Input (X) device memory 4) Y20 DY25 5) 2) GX Developer input area *2 Network module 1) Input module *3 Output (Y) device memory Output module •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.
CHAPTER3 CPU MODULE OPERATION 1 (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. 2 Examples 55 DX5 0 3 A program that turns on the output DY5E when the input DX5 turns on. DY5E 55 4 56 ON OFF External contact Devices in the CPU module 5 ON DX5 (External contact) OFF DY5E (External load) OFF ON 6 Delay time 7 Figure 3.
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. The following two modes are available.
CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER 1 (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 2 unit and setting the number of available slots to eight. (Mounting a module on a prohibited slot causes "SP.UNIT LAY ERR.".
(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" is set, select either of these items for batch-setting the base units to the specified number of slots. 4-3 ● In auto mode, when any extension base number is skipped at the setting using the base number setting connector, an empty extension base cannot be reserved.
CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER 4.2 I/O Number Assignment 1 The I/O number indicates addresses used for sequence programs in the following cases. 2 • Input of on/off data to the CPU module • Output of on/off data from the CPU module to the external device 3 (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.
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.
CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER 1 (2) I/O assignment on a remote I/O stations 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. 2 Also, inputs (X) and outputs (Y) can be used for the refresh target (devices on the CPU module side) of the MELSECNET/H module link I/O (LX and LY).
(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.
CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER 4.2.2 Setting I/O numbers 1 Set the I/O number on the I/O assignment tab. 2 (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 3 changing the current module to another in the future. For example, 32 points can be assigned for future use to the slot where an input module with 16 points is currently mounted.
(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. • "Type" (module type) • "Points" (I/O points) • "Start XY" (start I/O number) For example, to change the I/O number of the specified slot, setting is allowed only to the number of points. For other items that are not set, settings are completed based on the installation status of the base unit.
CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER (b) Type 1 Select the type of the mounted module from the followings: • Empty (empty slot) 2 • Input (input module) • Hi input (high-speed input module) • Output (output module) 3 • I/O Mix (I/O combined module) • Intelli. (intelligent function module) • Interrupt (interrupt module) 4 If the type is not specified, the type of the actually mounted module is used. 5 (c) Type Enter the model names of mounted modules within 16 characters.
(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. Table4.1 shows the operations when the mounted module type differs from the one in the I/O assignment tab. Table4.
CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER 1 (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. 1) Start XY values are not in the correct order.
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.
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. 1 2 3 Select 32 points. (When the type is not selected, the type of the mounted module will be set.) 4 5 6 7 Figure 4.
(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.
CHAPTER4 ASSIGNMENT OF BASE UNIT AND I/O NUMBER (b) I/O assignment Set "200" for the start XY of Slot 3 and "70" to Slot 4 in the I/O assignment setting of PLC parameter 1 in GX Developer. 2 3 Set "200" to start XY. Set "70" to start XY. (If not set, the I/O number following the slot 3 will be set.) 4 5 6 7 Figure 4.15 I/O assignment setting (When changing I/O numbers of Slot 3) 8 4.2 I/O Number Assignment 4.2.
(c) I/O number assignment after the I/O assignment using GX Developer 3 4 5 6 7 Output module Output module Output module Output module Input module 2 Input module 1 Input module 0 Input module Q38B 32 points 32 points 32 points 32 points 32 points 32 points 32 points 32 points X00 X20 to to X1F X3F X40 X200 Y70 Y90 YB0 YD0 to to to to to to X5F X21F Y8F YAF YCF YEF 12 13 14 15 Output module Output module Output module 11 Empty 10 Intelligent function module 9 Intelligent func
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 2 5.1 Memories Used for CPU Module 3 5.1.1 Memory composition and storable data This section describes the memories used for the Universal model QCPU and data that can be stored in 4 the memories.
(a) Program memory ( Section 5.1.2) This memory is for storing programs and parameters for CPU module operation. The CPU module transfers a program from the program memory to the program cache memory for operation. ( Section 5.1.3) (b) Standard ROM ( Section 5.1.4) This memory is for storing data such as parameters and programs. (c) Standard RAM ( Section 5.1.5) This memory is for using file registers, local devices, and sampling trace files without a memory card. (d) Memory card ( Section 5.1.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (2) Data that can be stored in each memory Table5.1 provides the data that can be stored in each memory. 2 Table5.
(3) Memory capacities and necessity of formatting Table5.2 provides the memory capacities and necessity of formatting of each memory. Format a memory requiring formatting by GX Developer beforehand. Table5.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.1.2 Program memory 1 (1) Definition This memory is for storing programs and parameters for CPU module operation. The CPU module transfers a program from the program memory to the program cache memory for operation. ( 2 Section 5.1.3) 3 4 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 or memory card.
When a user setting system area is created, the available area reduces by the number of steps created in the area. (c) Checking the memory capacity after formatting Select [Online] [Read from PLC] in GX Developer. 1) Select "Program memory/Device memory" in “Target memory” on the Read from PLC screen. 2) Click the Free space volume button. 3) The memory capacity appears in “Total free space volume”. 1) Select the target memory. 2) Click the Free space volume button.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (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. 2 3 4 5 6 7 Figure 5.4 Write to PLC screen 8 5-7 5.1 Memories Used for CPU Module 5.1.2 Program memory The file size has its minimum unit. ( Section 5.3.4) The occupied memory capacity may be greater than the actual file size.
5.1.3 Program cache memory (1) Definition This memory is for program operation. The CPU module transfers a program from the program memory to the program cache memory for operation. The program is transferred during: • initial processing after the CPU module is powered on, or • initial processing after the CPU module is reset. Figure 5.5 provides the flow of program operations. Power-on/reset Universal model QCPU Initial Processing (transfers data in the program memory to the program cache memory.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (2) Writing a program When writing data from GX Developer, programs and parameters are written to the program cache memory in the CPU module. After the completion of the writing, the data are transferred to the program memory. 2 Figure 5.6 provides the flow of writing a program. Universal model QCPU 2) After data are written to the program cache memory, the data are automatically transferred to the program memory.
(4) Checking status during data transfer to the program memory The status during data transfer to the program memory can be checked either in the progress screen of GX Developer or by the special relay and special register. (a) Checking the status in the progress screen Figure 5.7 provides the progress screen of GX Developer. Figure 5.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.1.4 Standard ROM 1 (1) Definition This memory is for storing data such as parameters and programs. 2 (2) Checking the memory capacity Select [Online] [Read from PLC] in GX Developer. 3 1) Select "Standard ROM" in “Target memory” on the Read from PLC screen. 2) Click the Free space volume button. 4 3) The memory capacity appears in “Total free space volume”. 1) Select the target memory. 5 6 7 8 5.1 Memories Used for CPU Module 5.1.
5.1.5 Standard RAM Note5.2 Note1 (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. The memory is also used for storing a module error collection file. If the size of files to be stored exceeds the standard RAM capacity: • store the files in the memory card, or • reduce the number of points of the file register, local device, or sampling trace.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (b) Checking the memory capacity after formatting Select [Online] 1 [Read from PLC] in GX Developer. 1) Select "Standard RAM" in “Target memory” on the Read from PLC screen. 2 2) Click the Free space volume button. 3) The memory capacity appears in “Total free space volume”. 3 1) Select the target memory. 4 5 6 7 2) Click the Free space volume button. 8 3) The memory capacity value is shown. Figure 5.
5.1.6 Memory card Note5.3 Note1 (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. The SRAM card is used when: • the number of file register points is greater than the standard RAM capacity, or • the sampling trace function is used. ( Section 6.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (2) Before using the SRAM card or ATA card Format the SRAM card or ATA card by GX Developer. (a) Formatting 2 Select [Online] [Format PLC memory] in GX Developer. • When formatting the SRAM card, select "Memory card (RAM)" in “Target memory”. • When formatting the ATA card, select "Memory card (ROM)" in “Target memory”. 3 4 5 6 7 Figure 5.12 Formatting the SRAM card or ATA card 8 ● Use only GX Developer to format the ATA card.
(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 Free space volume button. 3) The memory capacity appears in “Total free space volume”. 1) Select the target memory. 2) Click the Free space volume button. 3) The memory capacity value is shown. Figure 5.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE (b) Writing to the Flash card 1 The following two methods are available. • Writing by "Write the program memory to ROM" ( • Writing by "Write to PLC (Flash ROM)” ( Section 5.1.7(1)(a)) 2 Section 5.1.7(1)(b)) 3 The file size has its minimum unit. ( Section 5.3.4) The occupied memory capacity may be greater than the actual file size.
5.1.7 Writing to the Flash card by GX Developer (1) Methods for writing data to the Flash card and applications Figure 5.15 provides the methods for writing data to the Flash card. Writing by "Write the program memory to ROM" Program memory Writing by "Write to PLC (Flash ROM)" CPU module GX Developer Figure 5.15 Methods for writing data to the Flash card (a) Writing by “Write the program memory to ROM” Data in the program memory are batch-written to the Flash card.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (2) Writing to the Flash card The following describes the operations before writing and the methods for writing. 2 (a) Before writing Check the following. 1) Preparing files to be written 3 Writing a file to the Flash card automatically deletes all files stored in the Flash card. Also write all files same as the stored files together.
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.17 Write to PLC (Flash ROM) screen • Select the target memory. • Select a file to be written and write it to the Flash card. (3) Adding or changing a file in the Flash card Add or change the file by either of the following methods (stored files cannot be added or changed directly).
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (4) Precautions (a) Setting the communication time check period in GX Developer Since writing a file to the Flash card takes time, set "Check at communication time" in GX Developer to 60 2 seconds or longer. If the set time is short, GX Developer may time out. 3 4 5 Figure 5.
(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. (Writing using the Q2MEM-4MBF at a communication speed of 115.2Kbps with an RS-232 interface requires 14 minutes.) When writing data to the Flash card, increase the transmission speed or use an USB.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.1.8 Operating the program in the memory card (boot operation) 1 This section describes methods for operating the program stored in the memory card. 2 (1) Operating the program in the 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.
(3) Procedure before boot operation The following explains the procedures to store the files to be booted in the memory card and then start boot operation. (a) Creating a program Create a program. (b) Boot file setting Set the names of files to be booted to the program memory in the Boot file tab of the PLC parameter dialog box. Figure 5.21 Boot file tab (c) Mounting the memory card Mount the memory card to the CPU module.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (4) Operation for stopping boot operation To stop boot operation and operate the CPU module by the parameters and program files written to the program memory, perform the following operations. 1) Remove the memory card and write parameters without boot file setting to the program memory by 2 GX Developer. 3 2) Power on the programmable controller again or reset the CPU module.
(d) Boot operation when the ATA card is used When data are booted from the ATA card, the processing time of maximum 200ms may be required per 1K step (4K bytes). (e) When data in the program memory are changed after the CPU module is powered off and then on or is reset If the program memory data are changed after the sequence program is written to the program memory and the CPU module is powered off and then on or is reset, a boot operation may be active.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.1.9 Details of written files 1 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, 2 as shown below. 3 4 5 6 7 Figure 5.
5.1.10 Specifying valid parameters (parameter-valid drive setting) Drives (memories) storing valid parameters are automatically specified by the system. The valid parameters are determined by the priority of the drives where parameters are stored. Settings by an user is unnecessary. (1) Priority of the parameter-valid drives Table5.6 provides the priority of the drives where parameters are stored. Write parameters to be validated to the higher priority drives. Table5.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (2) When to determine valid parameters The CPU module automatically searches for parameters in the following timing and operates by the settings of the parameters stored in the drives when: • the CPU module is powered off and then on, or 2 • it is reset. When storing parameters by Write to PLC in GX Developer, the timing for validating the parameters depends on 3 the drive that stores the parameters.
5.2 Program File Structure A program file consists of a file header, execution program, and reserved area for online change. Program file structure 34 steps (By default) File header Execution program These areas are reserved in units of file sizes. ( Section 5.3.4) Reserved area for online change 500 steps Figure 5.24 Program file structure (1) Details of each structure The capacity of the programs stored in the CPU module program memory is the total of above three areas.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (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.25. 2 The program size is displayed. 3 4 5 Figure 5.
5.3 File Operations by GX Developer and Handling Precautions 5.3.1 File operations Table5.7 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 depends on the password registration setting by GX Developer and CPU module status (RUN/STOP). Table5.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 5.3.2 Precautions for handling files 1 (1) Power-off or reset at file operation When the CPU module is powered off or reset at file operation, files in each memory are held (for a memory card, when the CPU module where a memory card has been mounted before power-off is powered on). 2 3 When the programmable controller is powered off during an operation in which a file is moved, the data in operation are held in the internal memory of the CPU module.
5.3.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. ( Section 5.3.4) When using the program memory, standard RAM, standard ROM, or memory card, calculate the rough size of each file with reference to Table5.8. Table5.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 Table5.8 Calculation of file size(continued) Function Rough file capacity (unit: Byte) 362 + (number of word device points + number of bit device points) word device points 2 + (number of bit device points/16) 2) 12 + (N1 + N2 + N3 + number of executions)*4 • Apply the following values to N1 to N3 according to the items set in "Trace additional information" of the Sampling trace file*6 Trace condition settings screen. ( Section 6.
5.3.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. Table5.
CHAPTER5 MEMORIES AND FILES USED FOR CPU MODULE 1 (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. 2 (a) Conditions 1) CPU module to be written: Q26UDHCPU 3 2) Writing file Table5.11 File sizes 4 File size*1 File name PARAM.QPA (parameter file) 464 bytes 525 steps/2100 bytes*2 MAIN.QPG (sequence program) 5 *1: For the file size, refer to (1)(a) in this section.
2) Calculation of program size The program size is found by the formula: sequence program size + reserved area for online change. Since a program is stored in units of file sizes (1 step), only the amount equal to the program size is occupied. 3) Result The calculation results of the memory capacities are as shown below. Table5.12 Calculation results of memory capacities File name File size Memory capacity PARAM.QPA 464 bytes 116 steps (464 bytes) Sequence program size MAIN.
CHAPTER6 FUNCTIONS CHAPTER6 FUNCTIONS 1 This chapter describes the functions of the Universal model QCPU. 2 6.1 Function List 3 Table6.1 lists the functions of the Universal model QCPU. Table6.1 Function list Item Constant scan Latch function Output status selection when the status changed from STOP to RUN Clock function Remote RUN/STOP Description Q00UJ CPU Q00UCPU, Q01UCPU Q02U CPU Executes a program in a set time interval QnUD(H) CPU Built-in Ethernet port QCPU Reference Section 6.
Table6.1 Function list (Continued) Item Description Q00UJ CPU Q00UCPU, Q01UCPU Q02U CPU QnUD(H) CPU Built-in Ethernet port QCPU Reference Makes settings for the intelligent Intelligent function module switch setting function modules and interrupt Section modules. (Refer to manuals of 6.10 intelligent function modules and interrupt modules for setting details.) Reads the status of programs and Monitor function Section devices in the CPU module by GX 6.11 Developer.
CHAPTER6 FUNCTIONS 1 Table6.1 Function list (Continued) Item Q00UJ CPU Description Q00UCPU, Q01UCPU Q02U CPU QnUD(H) CPU Built-in Ethernet port QCPU Prohibits writing/reading data to/from Password registration Reference Section each file in the CPU module using GX 6.19.1 Developer. 3 Prevents unauthorized access from Remote password external devices such serial Section communication module and Ethernet 6.19.2 module.
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. 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. This function is used to maintain I/O refresh intervals constant even if the execution time of each sequence program differs.
CHAPTER6 FUNCTIONS 1 (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 is 0.5 to 2000ms (in increments of 0.5ms). When not executing the constant scan function, leave the constant scan time setting box blank. 2 3 4 Set a constant scan time value here. 5 6 Figure 6.2 When the constant scan time is set to 10ms 7 (a) Condition The constant scan time needs to satisfy the following relational expression.
(4) Waiting time from when END processing is executed until next scan starts Sequence program processing is stopped during the waiting time from when END processing of a sequence program is executed until next scan starts. (a) When an interrupt factor occurs during waiting time Either of the following programs is executed.
CHAPTER6 FUNCTIONS 6.3 Latch Function 1 (1) Definition 2 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 3 • 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 4 device: 0) without using the latch function.
(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)). Figure 6.4 Latch range setting The latch range of the file register (ZR), extended data register (D), and extended link register (W) can also be set. After selecting "Use the following file.
CHAPTER6 FUNCTIONS 1 (6) Device data latch method and influence on the scan time Data latch processing is performed during END processing. For this reason, the scan time increases. Consider an influence on the scan time when latching devices. ( 2 Section 10.1.2) 3 To shorten the scan time due to latch, minimize the number of latch points (latch (1) setting, latch (2) setting, and latch relay (L)) as much as possible. The number of latch points can be reduced by performing the following.
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. • Output the output (Y) status prior to STOP.
CHAPTER6 FUNCTIONS (3) Operation when the operating status is changed from STOP to RUN 1 (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. 2 (b) Recalculate (output is 1 scan later) 3 All outputs are turned off. The CPU module outputs the output (Y) status after sequence program operations are completed.
(5) Precautions Table6.3 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.3 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") selected Output status The output status prior to STOP is output.
CHAPTER6 FUNCTIONS 6.5 Clock Function 1 (1) Definition This function reads the internal clock data of the CPU module by a sequence program and uses it for 2 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. Remark The Built-in Ethernet port QCPU can set the time in the CPU module automatically by using the time setting function (SNTP client).
(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.11 Set time screen 2) Changing clock data by a program Use the DATEWR instruction (instruction for writing clock data) to change the clock data. Figure 6.12 shows a program for writing the set clock data to D0 to D6.
CHAPTER6 FUNCTIONS (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) 2 • S(P).DATERD (instruction for reading extended clock data) Figure 6.13 shows a program for storing the clock data read with the DATERD instruction to D10 to D16. Read request X1 DATERD Figure 6.13 Program example for storing clock data 5 *1: Figure 6.14 shows the clock data stored in D10 to D16.
(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. (b) Clock data correction If a part of the clock data is corrected, rewrite the entire clock data to the CPU module.
CHAPTER6 FUNCTIONS 1 (6) Clock data accuracy Accuracy of the clock data varies depending on the ambient temperature as shown below. 2 Table6.6 Clock data accuracy Ambient temperature ( ) Accuracy (Day difference, S) 0 -2.96 to +3.74 (TYP.+1.42) + 25 -3.18 to +3.74 (TYP.+1.50) + 55 -13.20 to +2.12 (TYP.-3.54) 3 4 (7) Clock data comparison To compare clock data in a sequence program, read the clock data with the DATERD instruction (instruction for reading clock data).
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). There are four types of remote operations: • Remote RUN/STOP : Section 6.6.1 • Remote PAUSE : Section 6.6.2 • Remote RESET : Section 6.6.3 • Remote latch clear : Section 6.6.4 6.6.
CHAPTER6 FUNCTIONS (4) Executing method 1 There are three methods for performing the remote RUN/STOP operation. • Using a RUN contact 2 • 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 3 (a) Using a RUN contact Set a RUN contact in the PLC system tab of the PLC parameter dialog box. 4 The settable device range is X0 to 1FFF.
(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. Reference manual of each network module (5) Precautions Pay attention to the following since the STOP status is given priority over the RUN status.
CHAPTER6 FUNCTIONS 6.6.2 Remote PAUSE 1 (1) Definition This operation changes the operating status of the CPU module externally to PAUSE, keeping the RUN/STOP/RESET switch of the CPU module in the RUN position. 2 PAUSE status is a status where sequence program operations in the CPU module are stopped, 3 holding the status (on or off) of all outputs (Y).
(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. Q Corresponding MELSEC Communication Protocol Reference Manual • The PAUSE contact (SM204) turns on during END processing of the scan where the remote PAUSE command is executed.
CHAPTER6 FUNCTIONS 6.6.3 Remote RESET 1 (1) Definition This operation resets the CPU module externally when the CPU module is in the STOP status. Even if the RUN/STOP/RESET switch is in the RUN position, this operation can be performed when 2 the module is stopped due to an error detected by the self-diagnostics function. 3 (2) Application This operation is useful to reset the CPU module remotely when an error occurs in the CPU module placed in an inaccessible location.
(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. (b) Status after reset processing After reset processing of the remote RESET operation is completed, the CPU module will be placed in the operating status set by the RUN/STOP/RESET switch.
CHAPTER6 FUNCTIONS 6.6.4 Remote latch clear 1 (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 3 (2) Application This function is useful in the following cases if used together with the remote RUN/STOP operation.
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.7 shows the operating status of the CPU module according to the combination of remote operation and RUN/STOP status. Table6.
CHAPTER6 FUNCTIONS 6.7 Q Series-compatible Module Input Response Time Selection (I/O Response Time) 1 2 (1) Definition This function changes the input response time for each Q series-compatible module. Table6.8 shows the modules available for input response time change and selectable time settings. 3 Table6.
(2) Input response time setting Set input response time values in the I/O assignment tab of the PLC parameter dialog box. 1) Make I/O assignment for the target module. 2) Click the Detailed setting button. 3) On the screen opened, select an input response time value (“I/O response time”). 2) Click the Detailed setting button. 1) Make I/O assignment. 3) Select the input response time. Figure 6.
CHAPTER6 FUNCTIONS 6.8 Error Time Output Mode Setting 1 (1) Definition This function determines the output mode (clear or hold) from the CPU module to the Q series- 2 compatible output modules, I/O combined modules, intelligent function modules, and/or interrupt module when a stop error occurs in the CPU module. 3 (2) Error time output mode setting Set the error time output mode in the I/O assignment tab of the PLC parameter dialog box. 4 1) Make I/O assignment for the target module.
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. 1) Make I/O assignment for the target module. 2) Click the Detailed setting button.
CHAPTER6 FUNCTIONS 6.10 Intelligent Function Module Switch Setting 1 (1) Definition This function sets the switches of each Q series-compatible intelligent function module and interrupt 2 module in GX Developer. 3 (2) Writing the switch settings The switch settings will be written from the CPU module to each intelligent function module and interrupt module when: 4 • the CPU module is powered off and then on, or • the CPU module is reset.
(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 Switch setting button. 3) Set the switch details for each module. 1) Make I/O assignment. 2) Click the Switch setting button. 3) Set the switch details of each intelligent function module and interrupt module. Figure 6.
CHAPTER6 FUNCTIONS 6.11 Monitor Function 1 (1) Definition This function reads program and device data in the CPU module, and intelligent function module 2 status using GX Developer. 3 Table6.9 List of monitor functions and availability Availability Monitor function Q00UJ Q00UCPU, CPU Q01UCPU Q02UCPU QnUD(H) CPU Built-in Reference Ethernet 4 port QCPU Ladder monitor 5 Device/buffer memory batch monitor GX Developer Version 8 Entry data monitor Operating Manual 6 Section 6.11.
6.11.1 Monitor condition setting Note6.1 This function is used to monitor data in the CPU module under the specified condition.Note1 (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. Select to use a device as a monitor condition. Select to use a step number as a monitor condition.
CHAPTER6 FUNCTIONS 1 ● If a step between the AND/OR blocks is specified as a monitor condition, monitor data is collected when the status previous to execution of the specified step is specified by the LD instruction. The monitor timing depends on the step specified as a monitor condition. The following shows examples of monitoring when the step 2 is on (Step No. [2] = ). • When the step 2 is connected by the AND instruction: In Figure 6.
(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). 2) When a bit device is specified Monitor data is collected when the execution status of the specified bit device becomes the specified status. Select the execution condition (on the rising edge or falling edge).
CHAPTER6 FUNCTIONS 1 (2) Monitor stop condition setting Set a monitor stop condition on the screen opened by selecting [Online] [Monitor] [Monitor stop condition setup]. 2 Set the condition as shown in Figure 6.33 to stop a monitor operation on the rising edged of Y71. 3 4 5 Figure 6.33 Monitor stop condition screen 6 (a) When a device is specified Either word device or bit device can be specified.
(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. (b) No file register setting If the file register is monitored when there is no file register used, "FFFFH" is displayed.
CHAPTER6 FUNCTIONS (i) During monitor condition registration 1 Do not reset the CPU module while monitoring conditions are being registered. 2 (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.
6.11.2 Local device monitor/test Note6.2 This operation is useful for debugging a program, monitoring local devices ( Section 9.14.2) in the program monitored by GX Developer. Note1 (1) Monitoring a local device Table6.10 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. (Three programs are to be executed in the order of A B C (END processing) A B....) Table6.
CHAPTER6 FUNCTIONS 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. 1 CPU module Program execution (A B 2 C) 3 X0 MOVP K2 DO X1 4 Program: A MOVP K3 D99 5 X10 MOVP K4 DO X11 6 Program: B MOVP K8 D99 7 8 X20 MOVP K3 DO X21 Program: C MOVP K6 D99 6.11 Monitor Function 6.11.2 Local device monitor/test The local device data of the program B is displayed.
(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] [Monitor] [Monitor mode]. Switching to the monitor mode Select [Local device monitor] from the monitor window. Setting of the local device monitor The local device of the displayed program is monitored. Figure 6.
CHAPTER6 FUNCTIONS 6.11.3 External input/output forced on/off Note6.3 1 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.Note1 2 The information registered for forced on/off can be cancelled by an operation from GX Developer. 3 4 5 6 7 8 Figure 6.
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 Output refresh Y10 output (off) External output (Y10 off) Input refresh X0 input (on) Input forced on/off operation X0 device forced off External input (X0 on) Program execution MO Y10 External input is forcibly turned off. XO Y11 Y10 M1 On the ladder block, Y10 appears to be on even though a forced off operation is performed. END Figure 6.
CHAPTER6 FUNCTIONS (d) Cancelling on/off registration data 1 The registered forced ON/OFF data can be canceled by GX Developer. Once the registered data is canceled, the status of the forced on/off registered devices will be as follows. 2 Table6.
(f) Number of registerable devices Forced on/off can be registered for 32 devices in total. (g) When output Y contact is used in a sequence program On/off operations in a sequence program are given priority. (h) Checking forced on/off registration status Forced on/off execution status can be checked by: • reading the forced on/off registration status by GX Developer, • flashing of the MODE LED (green), (The MODE LED flashes in green when at least one forced on/off is registered.
CHAPTER6 FUNCTIONS 1 (3) Operating procedure Operating procedure is described below. • To register forced on/off for a device, select [Online] [Debug] [Forced input output registration/ 2 cancellation] in GX Developer. • On the screen opened, specify a device and click the "Set forced ON" or "Set forced OFF" button. 3 5) 1) 4 4) 5 2) 6 7 3) 8 6) Figure 6.38 Forced input output registration/cancellation screen No.
6.11.4 Executional conditioned device test Note6.4 This function changes a device value within the specified step of a program.Note1 This enables debugging of the specified ladder block without modifying the program.*1 *1: The executional conditioned device test is not available for the SFC program. (1) Operation of the executional conditioned device test A device value will be changed based on the registration data once after the executional conditioned device test setting is registered.
CHAPTER6 FUNCTIONS 1 (2) Available devices and number of settable devices Table6.
(4) Operating instructions (a) Registering executional conditioned device test settings Select the registration target step number on the program editing screen in GX Developer. Then, select [Online] [Debug] [Executional conditioned device test] [Register executional conditioned device test]. 3) 6) 5) 7) 1) 2) 4) Figure 6.41 Screen for registering executional conditioned device test settings Table6.16 Items on the screen for registering executional conditioned device test settings No.
CHAPTER6 FUNCTIONS 1 ● When setting a word device with a different data type, a device is regarded as the same device. Example 2 When setting a device with a different modification method (such as a bit-specified word device, digit-specified bit device, or index-modified device), a device is regarded as a different device. 3 When a word device is set in the order of "D100 (16 bit integer)" and then "D100 (Real number (single precision))", "D100 (Real number (single precision))" is registered.
Note that there may be a case where a device value will not be changed depending on the execution timing even though the specified step is executed. The following instructions need to be noted when registering executional conditioned device test settings.
CHAPTER6 FUNCTIONS 4) Number of settings that can be registered simultaneously in one scan Eight executional conditioned device test settings can be registered into the CPU module simultaneously in 1 one scan. When nine or more executional conditioned device test settings are to be registered simultaneously by GX Developer, they will be registered over multiple scans.
(d) Checking executional conditioned device test settings Select [Online] [Debug] [Executional conditioned device test] [Check/disable executional conditioned device test]. Figure 6.45 Screen for checking executional conditioned device test settings Remark 1. For the operating instruction of checking or disabling executional conditioned device test settings, refer to the following. GX Developer Version 8 Operating Manual 2.
CHAPTER6 FUNCTIONS (5) Precautions 1 (a) Operations from multiple GX Developers Executional conditioned device test setting can be registered in the same CPU module from multiple GX Developers connected via network. 2 Note, however, that if multiple executional conditioned device test settings are registered with the same device name in the same step, the registration data will be overwritten.
2) When the online change function is executed during execution of the executional conditioned device test The Online change function completes normally. If any executional conditioned device test setting has been registered in the program to be changed online, the corresponding setting will be disabled.
CHAPTER6 FUNCTIONS Example 3) When a ladder block is to be added online, the executional conditioned device test setting included in the ladder block followed after the added ladder block will be disabled. 1 For this reason, if the online change function is executed as shown in Figure 6.49, the registration 2 is disabled. 2 Registration 1 3 4 Registration 2 Registration 3 * The shaded area is the ladder block to be changed online. 5 Figure 6.
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) : • Online change (files) : Section 6.12.1 Section 6.12.2 Data can also be written in the RUN status using a pointer. ( Section 6.15.2) 6.12.1 Online change (ladder mode) (1) Definition This function writes programs to the CPU module in the RUN status. This function enables the program to be changed without stopping the program operation in the CPU module.
CHAPTER6 FUNCTIONS This function also can write programs by GX Developer connected to another station on the network. 1 2 3 4 GX Developer MELSECNET/H PLC-to-PLC network 5 6 7 8 Change a program with GX Developer and write it to the CPU module in the RUN status. Figure 6.51 Outline of online change via network 6.12 Writing Programs While CPU Module is in RUN Status 6.12.1 Online change (ladder mode) (2) Memory for online change A program cache memory (program memory) is available.
(4) 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.
CHAPTER6 FUNCTIONS 6.12.2 Online change (files) 1 (1) Definition This function batch-writes files shown in Table 6.20 to the CPU module in the RUN status by online operation from GX Developer. Table6.
(2) Availability (a) For the Q00UJCPU,Q00UCPU,and Q01UCPU The function cannot be performed in the following cases. • A program memory does not have enough area for storing a program file to be written. • A program memory stores the maximum number of files can be stored. (b) For the Q02UCPU,QnUD(H)CPU, and Built-in Ethernet port QCPU A file can be written to the CPU module in the RUN status regardless of space of a memory to be written and the number of files to be stored.
CHAPTER6 FUNCTIONS 6.12.3 Precautions for online change 1 The following shows precautions for online change. 2 (1) Online change during boot operation When data are written to the CPU module in the RUN status during boot operation, the status of boot source 3 program is not changed.
(3) Instructions do not operate normally during online change When data are written to the CPU module in the RUN status, the following instructions do not operate normally. • Fall instruction • Rise instruction • SCJ instruction (a) Fall instruction The fall instruction is executed when the instruction is in the data written to the CPU module in the RUN status, even if the execution condition (on off) is not met.
CHAPTER6 FUNCTIONS (b) Rise instruction The rise instruction is not executed when the instruction is in the data written to the CPU module in the RUN status, even if the execution condition (off Completion of online change on) is met. 2 XO [ PLS MO ] END 0 A END 0 A END 0 3 1 scan X0 status ON 4 XO OFF OFF OFF ON MO OFF XO ON 1 5 ON OFF ON MO ON OFF 6 ON XO ON OFF OFF MO 7 The rise instruction is not executed even if the execution condition is off on. ON OFF Figure 6.
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. The option is deselected by default. Selecting this option avoids execution of the fall instruction whose execution condition is "off". Figure 6.56 Options screen Figure 6.
CHAPTER6 FUNCTIONS (4) Writing to the program memory during online change and T/C setting value change Contents changed due to online change and TC setting value change are automatically transferred to the program memory simultaneously when the data are written to the program cache memory. 1 2 The time required for writing data to the CPU module in the RUN status and changing T/C setting value is 3 increased due to automatic transfer of the program memory by the time shown in Table6.21. Table6.
Automatic transfer to the program memory can be set to be disabled in the Options screen of GX Developer. Data are not automatically transferred to the program memory by deselecting here. Figure 6.58 Online change/TC setting value change program memory transfer settings When the automatic transfer is set to be disabled, the following message appears after online change. Selecting "Yes" transfers data to the program memory. Selecting "No" does not transfer data to the program memory.
CHAPTER6 FUNCTIONS 6.13 Execution Time Measurement 1 (1) Definition 2 This function displays the processing time of the program being executed. (2) Applications and types This function can be used to know the effect of processing time of each program on the total scan time when the 3 system is adjusted. There are following three types. • Program monitor list : 4 Section 6.13.1 • Interrupt program list monitor : • Scan time measurement : Section 6.13.2 5 Section 6.13.3 6 6.13.
(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. If the scan time exceeds this time, the CPU module detects ”WDT ERROR". 2) Sum of scan time The total time of each item in "Scan execution part, detailed scan time" is displayed.
CHAPTER6 FUNCTIONS 1 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. 2 QCPU Programming Manual (Common Instructions) 3 (3) Program start and stop 4 Program cannot be started and stopped from the Program list monitor screen.
6.13.2 Interrupt 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 displays the Interrupt program monitor list screen. Figure Figure 6.60 shows an execution example of the interrupt program monitor list. (b) (a) Figure 6.
CHAPTER6 FUNCTIONS 6.13.3 Scan time measurement Note6.6 Note1 1 (1) Definition 2 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. 3 (2) Range specification of scan time measurement There are following two types for specifying a scan time measurement range.
(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. • Enter the start and end steps and click the Start button. Example When the start step is 52 and the end step is 105 Figure 6.
CHAPTER6 FUNCTIONS 1 (6) Precautions (a) Measurement range setting 2 Set the measurement range so that "Start step < End step" is satisfied. (b) Minimum unit of measurement time 3 The minimum unit of measurement time is 0.01ms. If the measurement time is less than 0.01ms, 0.000ms is displayed. (c) When between the FOR and NEXT instructions is specified 4 The execution time of one scan between the specified steps is displayed.
• When the end step is executed before the start step Example The start step is specified as the next step of the CALL instruction and the end step is specified in a subroutine program executed by the CALL instruction. 0 CALL P0 Start step: 3 3 The start step is executed after the end step due to the CALL instruction. 5 FEND End step: 8 P0 6 9 RET • When the start step is executed continuously Example Only the start step is specified between the FOR and NEXT instructions.
CHAPTER6 FUNCTIONS 6.14 Sampling Trace Function Note6.7 1 (1) Definition This function samples the data of the specified device at a preset timing and at a preset interval 2 (sampling cycle), and then stores the trace results in the sampling trace file.Note1 3 (2) Application This function is useful to check the change of the device data used in the program during debugging at 4 a preset timing. In addition, this function is used to read the device data at trigger condition establishment.
(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 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). *1: *2: 2 + (bit device points/16) *1 *2 Round up the result of "bit device points/16" in the expression to the right of the decimal point.
CHAPTER6 FUNCTIONS (b) Operation of the special relay 1 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.22. 2 Table6.22 Execution status of the sampling trace Number Name Description SM800 Trace preparation SM801 Trace start Turns on when the sampling trace is started. Trace execution in Turns on during sampling trace execution.
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 executed SM801 off Number of traces after trigger *1 SM801 on The trace count is cleared.
CHAPTER6 FUNCTIONS 1 (5) Operating procedure Select [Online] [Trace] [Sampling trace...] in GX Developer. On the screen opened, select the method for operating the sampling trace. 2 • "Wizard setting/execution" ( GX Developer Version 8 Operating Manual) 3 • "Individual setting/execution" ( (5)(a) in this section) 4 (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.
(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.67. On the Trace condition settings screen, set the following items. • Number of traces ("No. of traces", "After trigger number of times") • Trace point setting ("Trace point setup") • Trigger point setting ("Trigger point setup") • Additional information ("Trace additional informaton") • Auto start setting ("Auto start trace") Figure 6.
CHAPTER6 FUNCTIONS 2) Trace point setup 1 Select the timing for collecting trace data from the items listed in Table6.23. Table6.23 Trace point setup item Item 2 Description Each scan Collects trace data during END processing of each scan. Interval Collects trace data at specified time intervals. Collects trace data in a cycle of 0.88m 3 specified time intervals.
4) Trigger point setup Select the trigger point from the items listed in Table6.24. Table6.24 Trigger point setup item Item Description At the time of TRACE instuction execution The time of execution of the TRACE instruction is set as a trigger. At the time of trigger operation The time when a trigger is issued by GX Developer is set as a trigger. from GX Developer A trace point (device and/or step number) needs to be set. The following devices can be set as a trace point.
CHAPTER6 FUNCTIONS (c) Setting trace data 1 Set trace data on the screen opened by clicking the Trace data setting button on the screen shown in Figure 6.67. 2 Table6.25 shows the devices can be set as trace data. 3 4 5 6 7 8 Figure 6.70 Trace data settings screen Table6.25 Devices can be set as trace data Description The following bit devices can be set up to 50 points.
(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 Write to PLC button on the screen shown in Figure 6.67 to write the settings. 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. For the standard RAM, only one sampling trace file can be stored.
CHAPTER6 FUNCTIONS (f) Displaying trace results 1 Read trace results form the CPU module and display the data. 1) Click the Trace result PLC read button on the screen shown in Figure 6.71 to read trace results. 2 2) Click the Trace result button on the same screen to display the trace results read. The trace results shows the on/off status of each bit device for every sampling cycle and the current value of each word device. 3 4 5 6 7 Figure 6.
(6) Method for clearing trace execution status The trace execution status can be cleared by latch clear using 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. However, it cannot be performed from multiple devices simultaneously.
CHAPTER6 FUNCTIONS 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. 1 2 • The CPU module is reset. 4) When selecting "Memory card (RAM)" in "Target memory" and the sampling trace file is corrupt, either of the 3 following operations were performed. • The CPU module is powered off and then on.
(g) Performing sampling trace during execution of another sampling trace The first sampling trace is performed normally. The second sampling trace cannot be performed. (h) Executing online change When sampling trace and online change are performed simultaneously, they operate as follows. 1) Performing sampling trace during online change • The trace point or trigger point is specified by the step number: The online change is completed normally but the sampling trace is not performed.
CHAPTER6 FUNCTIONS 6.15 Debug Function from Multiple GX Developers 1 (1) Definition This function allows debugs from multiple GX Developers connected to such as a CPU module or serial 2 communication module. When files are divided according to the processes or functions, this function can be used when multiple 3 GX Developers debug different files. (2) Description 4 Table6.27 shows combinations of the debug functions executable from multiple GX Developers. Table6.
(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.75. Select "Program memory/Device memory" in "Target Memory". Select "Create a user setting system area" in "Format Type". Set the number of steps for the system area (in increments of: 1K step). Figure 6.75 System area setting (when 1K step is set) Table6.
CHAPTER6 FUNCTIONS 6.15.2 Online change function from multiple GX Developers 1 (1) Definition This function allows multiple GX Developers to perform online change to one file or different files. 2 • Online change to one file: Select "Relative step No. by pointer". 3 • Online change to different files: • The writing can be executed without selecting "Relative step No. by pointer". 4 5 6 Personal computer A (GX Developer) Personal computer B (GX Developer) 7 Figure 6.
(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)" in "After conversion writing behavior". 2) Select “Absolute step No. (default)” or “Relative step No. by pointer” in “Step No. specification used in writing”. 1) 2) Figure 6.77 Options screen (b) Performing online change Display the ladder including the specified pointer and write the changed ladder during RUN.
CHAPTER6 FUNCTIONS 6.16 Watchdog Timer (WDT) 1 (1) Definition This function serves as an CPU module internal timer to detect errors of CPU module hardware and sequence programs. 2 3 (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 200ms. The setting range is 10 to 2000ms (in increments of: 10ms). 4 5 (b) Reset The CPU module resets the watchdog timer during END processing.
(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.
CHAPTER6 FUNCTIONS 6.17 Self-diagnostic Function 1 (1) Definition 2 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.
(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" in "Error time output mode" in “Detailed setting” of the I/O assignment tab of the PLC parameter dialog box (Outputs (Y) in the device memory are held).
CHAPTER6 FUNCTIONS 1 (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 2) Carry out fuse blown check 3 3) Verify module 4) Check device range at indexing. 5) Diagnose redundant power supply system. Note6.9Note1 4 5 6 7 8 6.17 Self-diagnostic Function Note1 Note6.
(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.29, select [Diagnostics] [PLC diagnostics] of GX Developer. Table6.29 Self-diagnostics list Diagnostics Error message Diagnostic timing CPU module status LED status RUN ERR.
CHAPTER6 FUNCTIONS 1 Table6.29 Self-diagnostics list (continued) Diagnostics Error message CPU module status RUN ERR. On On Voltage drop of power supply for redundant base unit SINGLE PS. DOWN • Always Continue Redundant power supply module failure SINGLE PS. ERROR • Always Continue UNIT VERIFY ERR. • Execution of the END instruction Base assignment error BASE LAY ERROR • Power-on/reset Intelligent function module assignment error SP.UNIT LAY ERR.
Table6.29 Self-diagnostics list (continued) Diagnostics LED status CPU module status RUN ERR. Error message Diagnostic timing SFC parameter error SFC PARA.ERROR • Switching from STOP to RUN • Writing to programmable controller Stop Off Flashi ng Intelligent function module parameter error SP.PARA. ERROR • Power-on/reset Stop Off Flashi ng Password error REMOTE PASS.
CHAPTER6 FUNCTIONS 1 Table6.29 Self-diagnostics list (continued) Diagnostics SFC syntax Off BLOCK EXE.ERROR • Execution of an instruction Stop Off Flashi ng STEP EXE.ERROR • Execution of an instruction Stop Off Flashi ng WDT ERROR • Always Stop Off Flashi ng PRG.TIME OVER • Always Continue On On MULTI CPU DOWN • Always • Power-on/reset Stop Off Flashi ng Multiple CPU systems execution error MULTI EXE.
6.17.1 LEDs indicating errors When an error occurs, the LEDs on the front of the CPU module turns on/flashes. ( Section 6.21) 6.17.2 Error 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. • Turn off and then on the special relay SM50. • The error is cleared.
CHAPTER6 FUNCTIONS 6.18 Error History 1 This function stores an error detected by the self-diagnostic function and the detection time as an error history in a 2 memory. Select [Diagnostics] [PLC diagnostics] of GX Developer to check the history. 3 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. ( Section 6.5) 4 5 (1) Storage area All stored logs are saved to the storage memory for error history of the CPU module.
6.19 System Protection 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.31 System protection types Protection target In units of memory cards*1 File that can be protected All files Description Method Prohibits writing to a Turn on the write protect memory card. switch of a memory card.
CHAPTER6 FUNCTIONS 1 (3) Setting method Select [Online] [Password setup] or click the Password setup button on the Write to PLC screen in 2 GX Developer. 3 (e) (f) (a) 4 5 6 (d) (c) (b) 7 Figure 6.80 Password registration/change screen 8 (a) Target memory Select a memory storing a file where a password is to be registered. 6.19 System Protection 6.19.1 Password registration (b) Data type Displays the type of a file stored in the target memory.
(4) Precautions (a) Password management A password registered with a file cannot be read from the file. Forgetting the registered password disables the following operations. • Program memory or memory card: Format PLC memory • Standard ROM: Batch-writing Make sure to record the registered password and store the recording paper.
CHAPTER6 FUNCTIONS 1 (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. ( (2) in this section) 2 3 GX Developer 4 Ethernet 5 Ethernet module 6 7 GX Developer Checks the remote password. 8 6.19 System Protection 6.19.
(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. When a line is closed, the remote password is locked.
CHAPTER6 FUNCTIONS 1 (5) Procedures for setting/changing/clearing a remote password (a) Setting a remote password • In the project data list of GX Developer, select [Parameter] 2 [Remote pass]. Remote password setting 3 For the QnUDE(H)CPU or QJ71E71, configure setting in "Detail". 4 5 6 7 Figure 6.83 Remote password settings screen 8 Table6.33 Setting items on the Remote password settings screen Item Enter a remote password.
After setting a remote password, store the parameters to the valid drive ( Section 5.1.10). (b) Changing a remote password Change set password in the Remote password settings screen and write a new password to the CPU module. (c) Clearing a remote password • To delete set remote password, click the Clear button in the Remote password settings screen. • Write a remote password with GX Developer.
CHAPTER6 FUNCTIONS 6.20 System Display of CPU Module with GX Developer 1 When the CPU module is connected to GX Developer, this function can check the following items of the modules on 2 the base unit in the System Monitor screen. • Installed status • Parameter status 3 • Module’s Detailed Information • Product information (1) 4 (3) 5 6 (4) (2) 7 (5) (6) (7) (8) (9) 8 Figure 6.
(3) Base The status of the base unit and modules on the base unit can be checked. When there is even one faulty module, the "Module" field color changes according to the status described at the bottom of the screen. (4) Mode The mode cannot be selected since modules cannot be replaced online. (5) Diagnostics Click this button to check an error and status of the selected module. (6) Module’s Detailed Information Click this button to check the details of the selected module.
CHAPTER6 FUNCTIONS (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. 1 2 3 4 Figure 6.86 Detailed information of power supply module screen 5 Table6.
6.21 LED Indication 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) Figure 6.87 LEDs on the front of the CPU module 6.21.1 Methods for turning off the LEDs (1) Methods The LEDs can be turned off by the following operations (except for reset operation). Table6.
CHAPTER6 FUNCTIONS 1 (2) Methods for not turning on the ERR. LED, USER LED, and BAT. LED There is a priority in indications of the ERR.LED, USER LED, and BAT.LED. ( Section 6.21.2) When an cause number of an LED is deleted in the priority, the LED will not turn on even if an error with the cause number occurs. 2 3 6.21.2 LED indication priority This section describes a priority for error messages stored in the LED display data (SD220 to SD227) in case of an 4 error.
(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.36 List of cause numbers and priorities Priority Cause number Displayed error message (hexadecimal) 1 1 Remarks • AC/DC DOWN • Power-off • UNIT VERIFY ERR. 2 2 • I/O module verification error • FUSE BREAK OFF • Fuse blown • SP.UNIT ERROR • Intelligent function module verification error • SP.
CHAPTER6 FUNCTIONS 6.22 Interrupt from Intelligent Function Module The CPU module can execute an interrupt program (I 1 ) 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.
6.23 Serial Communication Function Note6.11 Note1 (1) Definition This function communicates in the MC protocol*1 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.
CHAPTER6 FUNCTIONS 1 (2) Specifications (a) Transmission specifications Table6.37 shows the transmission specifications of RS-232 for the serial communication function of the CPU 2 module. Check that the specifications of the personal computer and HMI match those of Table6.37 before using the function. 3 Table6.
(b) RS-232 connector specifications Table6.39 shows the specifications of the RS-232 connector for the CPU module. Table6.39 RS-232 connector specifications Appearance 5 6 3 Pin number Signal 1 RD(RXD) 2 SD(TXD) 3 SG 4 - 5 DSR(DR) Data setting ready 6 DTR(ER) Data terminal ready 1 2 4 Mini-DIN 6 pins (female) Signal name Receive data Send data Signal ground - (c) RS-232 cable • The following RS-232 cable can be used for connecting the CPU module to the personal computer or HMI.
CHAPTER6 FUNCTIONS 1 (3) Functions Table6.40 shows the MC protocol commands that can be executed by the serial communication function. 2 Table6.40 MC protocol commands supported by the serial communication function Function Command In units of bits Batch read In units of words In units of *1 Batch write bits In units of words 0401(00 1) 0401(00 0) 1401(00 1) 1401(00 0) Processing Reads bit devices in units of 1 point. Reads bit devices in units of 16 points.
(4) Accessible devices Table6.41 shows accessible devices by the serial communication function. Table6.
CHAPTER6 FUNCTIONS 1 (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. 2 • Select "Use serial communication" in communication with the personal computer or HMI. • Set Transmission speed, Sum check, Transmission wait time, and Run write setting in the tab. 3 Click here to use the serial communication function.
(c) Communication error If any of the following status is met, responses are not returned and therefore communication cannot be made. Review the transmission frame. 1) The serial communication function is set not to be used. 2) Communication is made at different transmission speed and data format. 3) A frame to be sent has no correct starting end or terminal.
CHAPTER6 FUNCTIONS (7) Error codes during communication with the serial communication function 1 Table6.42 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. 2 Table6.
6.24 Service Processing 6.24.1 Service processing setting (1) Definition This function allows to set the time and the number of times of service processing performed at END processing by parameters. This function also improves the response of communication with a peripheral and restrains the increase of scan time due to service processing. This achieves the configuration of service processing environment optimum for the system.
CHAPTER6 FUNCTIONS 1 (2) Parameter setting Set the parameters in the PLC system tab of the PLC parameter dialog box. 2 3 4 5 6 7 Figure 6.95 Parameter setting screen To perform the service processing, select any of the parameter items in Table6.43. The setting value of deselected parameter cannot be entered (default: Execute the process as the scan time proceeds. = 10%). 8 Table6.
(3) Operations for service processing setting Operations for each service processing setting is described below. (a) Operation when "Execute the process as the scan time proceeds." is selected 2nd scan (10ms) END processing Request 5 When the time required for processing one request exceeds 10% of one scan time, the service processing is suspended and the request is processed at END processing in the next scan.
CHAPTER6 FUNCTIONS (b) Operation when "Specify service process execution counts." is selected 1 3rd scan 2nd scan END processing Request 5 Request 4 GX Developer 3 Regardless of request data size, one request is processed at one END processing. 4 Request 2 5 Even if the program execution time are the same, the scan time depends on service processing time.
(c) Operation when "Specify service process time." is selected 1) Operation when 0.5ms is set 3rd scan 2nd scan Request 5 Request 4 Request 3 Program execution Request 2 Request 1 1st scan 0.5ms GX Developer END processing Request 1 When the time required for processing one request exceeds the service processing time (0.5ms) , the service processing is suspended and the processing is performed at END processing in the next scan.
CHAPTER6 FUNCTIONS (d) Operation when "Execute it while waiting for constant scan setting." is selected 1 Constant scan Request 5 3 GX Developer Request 1 Waiting time 4 Request 2 The service processing is performed during waiting time. Program execution Constant scan Request 3 END processing Request 2 Request 1 Constant scan Program execution Request 4 2 5 END processing Request 3 Waiting time 6 Request 4 Figure 6.
(4) Precautions The following describes precautions when the service processing setting is configured. 1) For the following functions, scan time will be increased longer than the specified time during service processing even if the service processing time specification is set. • Online change • Change T/C setting • Local device monitor • Program memory backup • Writing to/reading from a file register (The scan time will be increased when the write or read size is large.
CHAPTER6 FUNCTIONS 6.25 Initial Device Value 1 (1) Definition This function registers data used in a program to the device or the buffer memory of the intelligent function 2 module without a program. 3 (2) Application Using an initial device value can omit device data setting program by initial processing program. 4 5 Device memory 6 SM402 MOV H100 D0 MOV H2020 D1 Power-on/STOP/RESET RUN 7 8 At power-off on, reset, or STOP RUN 6.
(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.
CHAPTER6 FUNCTIONS 1 (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. • Add an initial device value data to the project data list of GX Developer. 2 The Device initialization range setting screen appears. Set the initial device value range.
• Select the name of a file where the initial device value data are stored in the PLC file tab of the PLC parameter dialog box. Figure 6.106 PLC file tab • Write the set initial device value and parameters to the CPU module. (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.
CHAPTER6 FUNCTIONS 6.26 Battery Life-prolonging Function 1 (1) Definition This function extends the life of battery installed in the CPU module by restricting data to be held by the battery to 2 clock data only. This function initializes all data other than the clock data when the CPU module is powered off or is reset. 3 Table6.44 Initialization details Data held by a battery Description Error history The number of error history data is initialized to zero. Latch device (L) Cleared to zero.
6.27 Memory Check Function This function checks whether data in the memories of the CPU module are not changed due to such as excessive electric noise. Since the CPU module automatically checks a memory, setting for enabling this function is unnecessary. This function does not require processing time. (1) Data to be checked (a) Program The program during execution is compared with the user program written to the program memory. If they do not match, a stop error, “RAM ERROR” (error code: 1160) is detected.
CHAPTER6 FUNCTIONS 6.28 Latch Data Backup to Standard ROM Function 1 (1) Definition This function holds (backs up) latch data, such as device data and error history, to the standard ROM without 2 using a battery when the system is stopped for a long period. This function helps to extend battery life. 3 Remark When this function is performed, the battery life-prolonging function is enabled regardless of the parameter setting for the battery life-prolonging function.
When backing up the data in the file register, extended data register (D), and extended link register (W), pay attention to the following. • The data are backed up only when the file register in the standard RAM is set to be used. • Select "Transfer to Standard ROM at Latch data backup operation." on the PLC file tab of the PLC parameter dialog box. Selecting this option starts backup. Figure 6.
CHAPTER6 FUNCTIONS 1 (4) Execution method (a) Execution by contacts 2 1) Setting method Set "Latch data backup operation valid contact" in the PLC system tab of the PLC parameter dialog box (Devices X, M, or B can be selected). 3 Specify a contact 4 Figure 6.109 Setting screen of latch data backup start contact to standard ROM 2) Execution method Backup starts at the rise of a contact (off 5 on). After backup, the BAT.
(5) Restoring backup data The backup data is automatically restored by the following operations. • At power-off on of the CPU module • At reset Whether to restore data once after backup or per above operation is set by SM676 (Specification of restore repeated execution). Table6.47 Status of SM676 and restoration operation Status of SM676 at backup operation Restoration operation Data are restored once when the CPU module is powered off SM676 is off. and then on or is reset after backup.
CHAPTER6 FUNCTIONS 1 (7) Checking with special relays and special registers The status of execution of latch data backup to the standard ROM or restoration operation can be checked by SM671, SM676, SD671 to SD679. 2 (8) Precautions 3 The following provides precautions for backing up latch data. 1) Do not power off or reset the CPU module during backup of latch data. If performed, "RESTORE ERROR" (error code: 2221) is detected, and backup data is not restored (The backup data are deleted).
6.29 Writing/Reading Device Data to/from Standard ROM (1) Definition This function writes device data to the standard ROM. Writing the fixed values for operation and operation results to the standard ROM can prevent losing data due to low battery. Also, timing of writing to the standard ROM can be set by an instruction. (2) Execution method Device data are written to the standard ROM by the SP.DEVST instruction. The device data written to the standard ROM is read to the specified device by the S(P).
CHAPTER6 FUNCTIONS 6.30 CPU Module Change Function with Memory Card Note6.12 1 (1) Definition This function backs up data in the CPU module to a memory card and restores the backup data to another CPU 2 module.Note1 3 Universal model QCPU 1) Backs up to a memory card. Program memory Standard RAM 4 Standard ROM Device data Memory card for storing backup data 3) Restores backup data. System data 5 6 7 8 2) Changes the CPU module. GX Developer 6.
(2) Backup data file After data are backed up, a backup data file "MEMBKUP0.QBP" is created in a memory card. Only one backup data file can be stored to a memory card. When data are backed up to a memory card containing a backup data file again, the stored backup data file is overwritten. When a memory card contains another file, a backup data file can be stored in the memory card without deleting the stored file.
CHAPTER6 FUNCTIONS 6.30.1 Backup function to memory card 1 This function can save data in the CPU module to a memory card. If a memory card is used in running system, data can be backed up by replacing the current memory card with the one for storing a backup data. (1) Methods 2 3 (a) Method with contacts 1) Setting To back up data with contacts, turn on the device set in the “PLC module change setting“ screen in the PLC 4 system tab of the PLC parameter dialog box. 5 6 7 8 6.
2) Operating procedure Turn on in the order of the backup start setup contact and the backup start contact. Data are not backed up when only the backup start contact is on. Turn on the backup start setup contact. Preparation for backup: 1) Set the CPU module to the STOP status. 2) Stop an operation that uses a memory card so that the card can be removed. 1) Check that the preparation for backup is completed by the following methods. Check the LEDs. Check the special relay and special register.
CHAPTER6 FUNCTIONS 3) Operation of contacts Operations of the backup start setup contact, backup start contact, SM691 (Backup start preparation status 1 flag), and SD690 (Backup status) at backup are shown in Figure 6.116. Backup start setup request from GX Developer or the backup start setup contact is turned on. Before backup start 2 Backup start request from GX Developer or the backup start contact is turned on.
(b) Backup from GX Developer Select [Online] [PLC module change] [Create backup data...]. Figure 6.117 Create backup data screen For details of the operating procedure by the GX Developer wizard, refer to the following. GX Developer Version 8 Operating Manual Clicking the Confirm data size button on the screen shown in Figure 6.117 displays the size of backup data created at backup. Data size can be checked by GX Developer connected to the CPU module.
CHAPTER6 FUNCTIONS 1 (2) Operations of backup to a memory card (a) Mounting/removal of a memory card In a system using a memory card, the memory card can be changed/removed after preparation for backup has been completed (Turning on SM609 (Memory card remove/insert enable flag) is unnecessary). 2 After preparation for backup has been completed, the CPU module turns off SM604 (Memory card in-use flag). 3 (b) Status of backup to a memory card Table6.52 shows backup status. 4 Table6.
(c) Operations of special relays and special register*1 Figure 6.119 shows the operations of the SM609 (Memory card remove/insert enable flag), SM691 (Backup start preparation status flag), and SD690 (Backup status). Backup start setup request from GX Developer or the backup start setup contact is turned on. Backup start request from GX Developer or the backup start contact is turned on.
CHAPTER6 FUNCTIONS 1 (3) LEDs indicating backup status The LEDs on the front of the CPU module indicate backup status. 2 Table6.53 LEDs indicating backup status Value stored in Backup status SD690 Backup start preparation 2H completed LED indication 3 MODE: Flash (green), BAT.: Flash (green) The color changes at intervals of 800ms as follows. 4 3H 5 Backup in execution 6 : Flashing (green) : On (red) : On (green) 4H FFH Backup completed MODE: Flash (green), BAT.
(5) Functions that cannot be performed during backup Table6.55 shows functions that cannot be performed during backup. Table6.
CHAPTER6 FUNCTIONS 6.30.2 Backup data restoration function 1 This function restores data backed up to a memory card to the CPU module. 2 (1) Methods (a) Restoration from GX Developer Select [Online] [PLC module change] 3 [Restore...]. 4 5 6 7 Figure 6.121 Restore screen After selecting "Execute" on the screen above and powering off and then on the CPU module or reset the CPU module, the restored data become valid. 8 (b) Automatic restoration parameter dialog box.
(2) Operation for restoring backup data Figure 6.122 shows operation for restoration. Automatic restoration Restoration from GX Developer Start Start 1: Before restoration start 1: Before restoration start Mount a memory card storing the backup data to the CPU module and restore the data with GX Developer. Restoration is performed again. Mount a memory card storing the backup data to the CPU module and power off and then on the CPU module or reset the CPU module. Restoration is performed again.
CHAPTER6 FUNCTIONS 1 (4) LEDs indicating restoration status The LEDs on the front of the CPU module indicate restoration status. 2 Table6.58 LEDs indicating restoration status Value stored in Restoration status SD693 0H LED indication Before restoration start 3 MODE: On (green) The color changes at intervals of 800ms as follows. 4 1H 5 Restoration in execution 6 : Flashing (orange) : On (red) : On (green) • Restoration from GX Developer 2H MODE: Flashing (orange), BAT.
When automatic restoration is not normally completed, “RESTORE ERROR” (error code: 2225 to 2227) is detected. Table6.60 Error when automatic restoration is not normally completed Error code Error message Error cause The CPU module where data are restored is different model with the one where the backup 2225 source data are stored. • Backup data file is corrupt (The contents of backup data file do not match with the check 2226 RESTORE ERROR code).
CHAPTER6 FUNCTIONS 6.31 Module model name read Note1 Note6.13 1 (1) Definition 2 This function reads the model name of a module on a base unit. The mounted module is identified in a ladder program and processing according to the module can be performed. QD75MH2 QD75MH4 Processing 1 and 2 are performed. Processing 1 and 3 are performed.
6.32 Module error collection Note6.14 Note1 (1) Definition This function collects errors occurred in the connected intelligent function modules in the CPU module. By storing the errors in a memory that can hold data in the event of a power failure, the errors can be held even after power-off or reset. Error history (CPU module) and error log (intelligent function module) are displayed in one screen. Errors that occurred in the entire system (base units) can be monitored in reverse chronological order.
CHAPTER6 FUNCTIONS 1 (4) Storing module errors The module errors can be stored either the system memory*1 or the standard RAM. 2 The errors are stored separately from error history (CPU module) data. *1: The memory is managed inside the system. Table6.
(6) Monitoring module errors Collected module errors can be monitored in the Error History screen opened by selecting [Diagnostics] [System Monitor] [System Error History] of GX Works2. Figure 6.127 Error History screen Table6.63 Description of Error History List Item Error Code Description *1 Remarks Displays error code numbers. Year/Month/Day/Time*2 - Displays the year, month, day, hour, minute, and second when The year can be displayed within the an error occurred. range of 1980 to 2079.
CHAPTER6 FUNCTIONS 1 (7) Clearing module error history Clear module error history by clicking the Clear History in the Error History screen. Note that error information on each intelligent function module displayed in the Module's Detailed Information screen is not cleared. 2 3 4 5 Error information displayed here is not cleared. 6 7 Figure 6.128 Module's Detailed Information screen 8 The module error history is cleared when the standard RAM is formatted.
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.
CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE 7.1.1 Initial setting and auto refresh setting by GX Configurator 1 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 2 with intelligent function modules.
(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. Figure 7.2 Auto refresh setting screen The auto refresh setting data set in this screen are stored into the intelligent function module parameters of the CPU module.
CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE 1 (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 2 parameter settings for all intelligent function modules may not exceed the limitation shown in Table7.2. 3 Table7.
7.1.2 Initial setting by initial device value (1) Initial device value Using an initial device value ( Section 6.25) 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, is reset, or set from STOP to RUN. (2) Setting initial device values Use GX Developer to set the following.
CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE 7.1.4 Communications using the intelligent function module device 1 (1) Intelligent function module device The intelligent function module device ( Section 9.5.1) represents the buffer memory of the intelligent 2 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.
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 Stores data in the data register. Writes data once at this point. Figure 7.
CHAPTER7 COMMUNICATIONS WITH INTELLIGENT FUNCTION MODULE 7.1.5 Communications using the intelligent function module dedicated instruction 1 (1) Intelligent function module dedicated instruction 2 This instruction enables easy programming for the use of functions of the intelligent function module.
(3) Precautions (a) When the CPU module is set from RUN to STOP before the completion device turns on 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.
CHAPTER8 PARAMETERS CHAPTER8 PARAMETERS 1 This chapter describes the parameters required to be set for configuring a programmable controller system. 2 (1) Parameter types The following parameters are provided for CPU module setting. • PLC parameters ( 3 Section 8.1) These parameters are set when a programmable controller is used. • Network parameters ( 4 Section 8.
8.1 PLC Parameters This section provides the list of PLC parameters and describes parameter details. (1) PLC name A label and a comment for the CPU module are set. The settings will be displayed in the list for the find CPU function. Note8.1Note1 Figure 8.1 PLC name Table8.1 PLC name setting list Parameter No. Description Label 0000H Set a label (name, application) for the CPU module. Up to 10 characters Blank - Comment 0001H Set a comment for the CPU module label.
CHAPTER8 PARAMETERS 1 (2) PLC system Parameters required for use of the CPU module are set. 2 3 4 5 6 7 Figure 8.2 PLC system 8 Table8.2 PLC system setting list Item Low speed Description Setting range Default Reference 1ms to 1000ms (in increments of 1ms) 100ms Section 9.2.10 0.01ms to 100.0ms (in increments of 0.01ms) 10.0ms Section 9.2.10 1000H Set the time limit for the low speed timer or high speed timer. 1001H Set the contacts that control RUN/ PAUSE of the CPU module.
Table8.2 PLC system setting list (continued) Parameter No. Description Common pointer No. 1005H Set the start number of common pointers. P0 to 4095 Blank Section 9.10.2 Points occupied by empty slot 1007H Set the number of points for empty slots on the main/extension base units. 0, 16, 32, 64, 128, 256, 512, or 1024 points 16 points Section 3.2.2 Fixed scan interval (n: 28 to 31) 1008H Set each execution interval for the interrupt pointers (I28 to I31). 0.5ms to 1000ms (in increments of 0.
CHAPTER8 PARAMETERS 1 (3) PLC file Parameters required for the files used in the CPU module are set. 2 3 4 5 6 7 Figure 8.3 PLC file 8 Table8.3 PLC file setting list Parameter No. Description Setting range 1100H Set a file for the file register used in the program. • Not used • Use the same file name as the program. • Use the following file. 1104H Select whether to batch-transfer the data in the file register at the time of latch data backup to the standard ROM.
(4) PLC RAS (1) Parameters required for performing the RAS functions are set. Figure 8.4 PLC RAS (1) Table8.4 PLC RAS (1) setting list Item WDT (Watchdog timer) setting Parameter No. Description Setting range Default Reference Set a watchdog timer value for the CPU module. 10ms to 2000ms (in increments of 10ms) 200ms Section 6.16 Set a watchdog timer value in the case of using an initial execution type program. 10ms to 2000ms (in increments of 10ms) Blank Section 2.3.
CHAPTER8 PARAMETERS (5) PLC RAS (2) Note8.2 1 Note1 Parameters required for performing the RAS functions are set. 2 3 4 5 6 7 Figure 8.5 PLC RAS (2) 8 Table8.5 PLC RAS (2) setting list Item Description Collect module error log (intelligent function module) Set whether to collect module errors. Corresponding memory Select a storage location. Log No. Collection No. 300AH Set the number of collected errors only when the errors are stored in the standard RAM.
(6) Device Number of points, latch range, and local device range are set for each device. Figure 8.6 Device Table8.6 Device setting list Item Parameter No.
CHAPTER8 PARAMETERS 1 Table8.6 Device setting list (continued) Parameter No. Item Device points File register extended Latch (1) start/end (Latch clear valid) 32 bit Indexing*4 Setting range Default Reference 2000H Set points for the file register (ZR), extended data register (D), and extended link register (W). Point assignment to the file register (ZR), extended data register (D), or extended link register (W).
(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.7 Program Table8.7 Program setting list Item Program setting Parameter No. Description 7000H When writing two or more programs to the CPU module, set a file name and execution type (execution condition) of each program. Also, set a fixed scan interval (execution interval of the fixed scan execution type program).
CHAPTER8 PARAMETERS 1 (8) Boot file Parameters required for a boot from a memory card are set. 2 3 4 5 6 7 Figure 8.8 Boot file Table8.8 Boot file setting list Item Boot option Parameter No. 7000H Boot file setting 8 Setting range Select whether to clear the program memory at the time of boot. Selected/deselected Set the type and data name of the boot file, and transfer source drive for boot operation.
(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.9 SFC Table8.9 SFC setting list Item Parameter No. SFC program start mode 8002H Start conditions 8003H Output mode when the block is stopped 8006H 8 - 12 Description Setting range Set the mode and conditions for starring an SFC program, and also set the output mode in case a program block is stopped. Refer to the QCPU (Q Mode)/ QnACPU Programming Manual (SFC).
CHAPTER8 PARAMETERS 1 (10)I/O assignment The mounting status of each module in the system is set. 2 3 4 5 6 7 Figure 8.10 I/O assignment 8 Table8.10 I/O assignment setting list Item Parameter No. Base setting Setting range Set the model name of the mounted module. (Entered at user’s discretion. Do not use the one for the CPU module.) Up to 16 characters Points Set the number of points assigned to each slot.
Table8.10 I/O assignment setting list (continued) Item Setting range Default Reference Set various switches of an intelligent function module. Refer to the manual for the intelligent function module used. Blank Section 6.10 0403H Set whether to clear or hold the output in case of a stop error in the control CPU. Clear/Hold Clear Section 6.8 4004H Set whether to stop or continue the operarion of the control CPU in case of a hardware failure of the intelligent function module.
CHAPTER8 PARAMETERS (11) Serial 1 Note8.3Note1 The transmission speed, sum check, transmission wait time, and RUN write setting for using the serial communication function of the CPU module are set. 2 3 4 5 6 7 Figure 8.11 Serial 8 Table8.11 Serial setting list Parameter No. Item Description Setting range Default Select the item when using the serial communication function.
(12) 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.12 Acknowledge XY assignment Table8.12 Acknowledge X/Y assignment list Item X/Y assignment 8 - 16 Parameter No. Description Setting range Default Reference - The data set in the I/O assignment, Ethernet/CC IE/ MELSECNET setting, and CC-Link setting can be checked.
CHAPTER8 PARAMETERS (13) Multiple CPU settings 1 Note8.4Note1 Parameters required for configuring a multiple CPU system are set. 2 3 4 5 6 Figure 8.13 Multiple CPU settings 7 Table8.13 Multiple CPU setting list Description 0E00H Set the number of CPU modules used in a multiple CPU system. 1 to 4 1 E00CH Set a CPU number for which the multiple CPU setting parameters are set. (Set the number of the connected CPU module.) PLC No.1 to No.
Table8.13 Multiple CPU setting list (continued) Item Online module change*1 I/O sharing when using Multiple CPUs Multiple CPU high speed transmiss ion area setting*1 Parameter No. Description E006H Enable or disable the online module change in the multiple CPU system. (When enabled, the CPU module cannot read the I/O data outside the specified group.) Selected/deselected Deselected Select whether to read the input data of the input modules or intelligent function modules controlled by another CPU.
CHAPTER8 PARAMETERS (14) Built-in Ethernet port 1 Note8.5Note1 Parameters required for use of the built-in Ethernet port are set. 2 3 4 5 6 7 Figure 8.14 Built-in Ethernet port 8 Table8.14 Built-in Ethernet port setting list Item Parameter No. 1016H Communication data code • IP address: Enter the IP address of the QnUDE(H)CPU. • Subnet mask pattern: Enter the subnet mask pattern when using a router. • Default router IP address: Enter the IP address of the router.
Table8.14 Built-in Ethernet port setting list (continued) Item Parameter No. Description Setting range Open settings Set data when using MC protocol or socket communication. - Blank FTP settings Set data when using the file transfer function (FTP). - Blank Time settings Set data when using the time setting function. - Blank Enable online change (FTP, MC protocol) Enable or disable writing data in devices or files to the running CPU module when MC protocol or FTP is used.
CHAPTER8 PARAMETERS 8.2 Network Parameters 1 This section provides the list of network parameters and describes parameter details. 2 Symbols, M and N, used in the "Parameter No." column M and N in "Parameter No." in this section denote the following: 3 • N: Indicates the module number. • M: Indicates the network type. Table8.
(1) CC-Link IE controller network setting Network parameters for the CC-Link IE controller network are set. Figure 8.15 Setting the number of Ethernet/CC IE/MELSECNET cards (CC-Link IE controller network setting) Table8.17 CC-Link IE controller network setting list Item Number of modules on CC-Link IE controller network Parameter No. Description Setting range Default Reference - - A000H Starting I/O No. Network No. Total stations ANM0H Station No. Group No.
CHAPTER8 PARAMETERS 1 (2) MELSECNET/H setting Network parameters for MELSECNET/H are set. 2 3 4 5 6 7 Figure 8.16 Setting the number of Ethernet/CC IE/MELSECNET cards (MELSECNET/H setting) 8 Table8.18 MELSECNET/H setting list Item Number of modules on MELSECNET/H Parameter No. Description Setting range Default Reference Refer to the manual for the Q series-compatible MELSECNET/H. - - 5000H Starting I/O No. 5NM0H Total stations Group No.
(3) Ethernet setting Network parameters for Ethernet are set. Figure 8.17 Setting the number of Ethernet/CC IE/MELSECNET cards (Ethernet setting) Table8.19 Ethernet setting list Item Number of modules on Ethernet Parameter No. Description Setting range Default Reference Refer to the manual for the Q series-compatible Ethernet. - - 9000H Starting I/ONo. Network No. Group No. 9N00H Station No.
CHAPTER8 PARAMETERS 1 (4) CC-Link setting Parameters for CC-Link are set. 2 3 4 5 6 7 Figure 8.18 Setting the CC-Link list 8 Table8.20 CC-Link setting list Item Description Setting range Default Reference Refer to the manual for CC-Link. - - 8.2 Network Parameters Number of modules Type Parameter No. C000H Start I/O No. Operational setting CNM2H All connect count Remote input (RX) Remote output (RY) Remote register (RWr) Remote register (RWw) Ver.2 Remote input (RX) CNM1H Ver.
8.3 Remote Password This section provides the list of parameters for use of remote password and describes parameter details. Figure 8.19 Remote password settings dialog box A remote password is set for an Ethernet module, serial communication module, modem interface module, or Built-in Ethernet port QCPU. Table8.21 Remote password setting list Item Parameter No.
CHAPTER9 DEVICES CHAPTER9 DEVICES 9 2 This chapter describes the devices that can be used in the CPU module. 3 9.1 Device List Table 9.1 lists the names and data ranges of the devices that can be used in the CPU module. 4 Table9.1 Device list Classification Type Bit device Internal user device Device name Input 8192 X0 to X1FFF Hexadecimal Section 9.2.1 8192 Y0 to Y1FFF Hexadecimal Section 9.2.2 Internal relay 8192 M0 to M8191 Decimal Section 9.2.
Table9.1 Device list (continued) Classification File register *7 Extended data register *7 Extended link register *7 Nesting Pointer Type Device name Parameter-set range Range Word device File register 0 - - Word device Extended data register 0 - - Word device Extended link register 0 - - Nesting 15 Bit device Pointer Interrupt pointer SFC block device Network No.
CHAPTER9 DEVICES 9.2 Internal User Device 9 (1) Definition 2 Internal user devices can be used for various user applications. (2) Points for internal user devices 3 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), and step relay (S) Note9.1 cannot be changed.Note1 4 5 6 Default Most of the default device points can be changed. 7 8 Figure 9.
● When changing device points, the following refresh ranges must not exceed the corresponding device ranges. • Refresh range of network module • Auto refresh range of intelligent function module If device points are set exceeding the corresponding device range, data may be written to any other device or an error may occur.
CHAPTER9 DEVICES 9 (4) Device point assignment example Table9.2 shows a device point assignment example. Table9.2 uses the same format as the device point assignment sheet shown in Appendix 4. 2 Table9.
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 1 2 3 Figure 9.2 Commands from external devices to a CPU module (2) Concept of input (X) One input point is assumed to be a virtual relay Xn in the CPU module. Programs use the normally open or closed contact of Xn.
CHAPTER9 DEVICES 9 ● 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 2 OUTX1 ON/OFF command 3 X1 Figure 9.5 Input (X) on/off with the OUT Xn instruction 4 ● The input (X) can also be used for the following. • Refresh target device (CPU module side) of RX in CC-Link • Refresh target device (CPU module side) of CC-Link IE controller network or MELSECNET/H 5 6 7 8 9.2 Internal User Device 9.2.
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) Sequence operation Contactor Figure 9.
CHAPTER9 DEVICES 9.2.3 Internal relay (M) 9 (1) Definition The internal relay (M) is a device for auxiliary relays used in the CPU module. 2 All of the internal relay are set to off in the following cases: • When the CPU module is powered off and then on 3 • When the CPU module is reset • When latch clear is executed ( Section 6.3) 4 (2) Latch (data retention during power failure) The internal relay cannot be latched.
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. • Powering off and then on the CPU module • Resetting the CPU module (2) Latch relay clear The latch relay is turned off by the latch clear operation. ( Section 3.
CHAPTER9 DEVICES 9.2.5 Annunciator (F) 9 (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 2 3 quantity of the annunciator numbers are stored in the special register (SD62 to SD79).
(5) Turning on the annunciator and processing (a) Turning on the annunciator The following instructions can be used. 1) SET F instruction instruction can be used to turn on the annunciator only on the leading edge (off to on) The SET F of an input condition. Even if the input condition turns off, the annunciator is held on. Using many annunciator numbers can shorten scan time more than using the OUT F 2) OUT F instruction.
CHAPTER9 DEVICES 9 (6) Turning off the annunciator and processing (a) Turning off the annunciator 2 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 3 instruction. 2) LEDR instruction This is used to turn off the annunciator number stored in SD62 and SD64. 4 3) BKRST instruction This is used to turn off all of the annunciator numbers within the specified range.
(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. • The annunciator number in SD64 is stored into SD62. • SD63 value is decremented by "1". • If the SD63 value is changed to "0", SM62 is turned off.
CHAPTER9 DEVICES 9.2.6 Edge relay (V) 9 (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). X0 X1 X10 V1 2 3 Stores on/off information of X0, X1, and X10. 4 Figure 9.16 Edge relay (2) Applications of the edge relay The edge relay can be utilized to detect the leading edge (off to on) in programs configured using 5 index modification.
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. CPU module MELSECNET/H network module Link relay Link relay B0 LB0 Link refresh setting range Link refresh Figure 9.
CHAPTER9 DEVICES 9 (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.
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 modules 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).
CHAPTER9 DEVICES 9.2.9 Step relay (S) 9 This device is provided for SFC programs. 2 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. 3 4 Remark 5 For use of the step relay, refer to the following. QCPU (Q Mode)/QnACPU Programming Manual (SFC) 6 7 8 9.2 Internal User Device 9.2.
9.2.10 Timer (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. 1) Timer of which value is set to 0 when the coil is turned off. 2) Retentive timer that holds the current value even if the coil is turned off.
CHAPTER9 DEVICES 9 (4) Low-speed timer (a) Definition 2 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" and the contact is turned off. [Ladder example] X0 K10 T0 4 When X0 is turned on, coil of T0 is turned on, and the contact turns on after 1s.
(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.
CHAPTER9 DEVICES 9 (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 2 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.
(b) Accuracy The value obtained by the END instruction is added to the current value when the OUT T ST or OUT 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.
CHAPTER9 DEVICES 9 (8) Precautions for using timers (a) Use of the same timer Do not use the OUT T 2 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. END OUT T 3 OUT T OUT T END OUT T OUT T Sequence program 4 Current value is updated. 1 scan 5 Figure 9.
(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 timedout 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 pay attention to the ladder sequence. For example, to create an on/off ladder using two timers, refer to examples shown in Figure 9.29.
CHAPTER9 DEVICES 9.2.11 Counter (C) 9 (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. 2 The counter is of an incremental type. 3 (2) Counter types Counters are mainly classified into the following two types.
(c) Resetting the counter The current counter value is not cleared even if the OUT C instruction is turned off. To clear the current value and to turn off the contact of the counter, use the RST C At the time of execution of the RST C instruction. instruction, the counter value is cleared, and the contact is also turned off.
CHAPTER9 DEVICES 1) Precautions for resetting the counter Execution of the RST C 9 instruction also turns off the coil of C . If the execution condition for the OUT C instruction, turn on the coil of C instruction is still ON after execution of the RST C at execution of the OUT C instruction and update the current 2 value (count value + 1). [Ladder example] M0 3 K10 C0 4 C0 RST C0 Figure 9.
(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 Maximum counting = speed (Cmax) 100 1 [times/s] T n: Duty (%) *1 T: Execution interval of the OUT C instruction (sec) *1: Duty (n) is the ON-OFF time ratio of count input signal, and is expressed as a percentage value.
CHAPTER9 DEVICES 9.2.12 Data register (D) 9 (1) Definition The data register (D) is a memory in which numeric data (-32768 to 32767, or 0000H to FFFFH) can be stored. (2) Bit structure of the data register 2 3 (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. to b15 4 b0 Dn 5 Most significant bit represents a sign bit. Figure 9.
9.2.13 Link 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 W0 LW0 Link refresh Link refresh Figure 9.40 Link refresh In the link register, numeric data (-32768 to 32767, or 0000H to FFFFH) are stored.
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 9 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. Example When W12 is specified in the DMOV instruction, W12 represents the lower 16 bits and D13 represents the higher 16 bits.
9.2.14 Link 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.
CHAPTER9 DEVICES 9.3 Internal System Devices 9 Internal system devices are provided for system operations. 2 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) 3 (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.
(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. • All bit devices except for input devices of the CPU module (X and DX) can be used. (c) Function register (FD) • The function register is used for data writing or reading between a subroutine program and a calling program.
CHAPTER9 DEVICES 9 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 P0 2 D* R0 R10 FD0 MOV K0 D3 3 Since D0 to D3 are used for FD0, D3 cannot be used in the subroutine program. Figure 9.
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.3 shows special relay classifications. Table9.
CHAPTER9 DEVICES 9.3.3 Special register (SD) 9 (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 2 register. 3 (2) Special register classifications Table9.4 shows special register classifications. 4 Table9.
9.4 Link Direct Device (J \ ) (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. (2) Specification method and application example (a) Specification method Specify a network number and a device number.
CHAPTER9 DEVICES (3) Specification range 9 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 2 parameter setting dialog box, and it must be outside the refresh range set by network refresh parameters. CPU module 3 Network module B0 LB 0 Link range Refresh range 4 Send range 5 6 Write range Figure 9.
(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. For example, if network modules set as station numbers 1 and 2 are mounted on network number 1 as shown in Figure 9.
CHAPTER9 DEVICES 9.5 Module Access Devices 9 9.5.1 Intelligent function module device (U \G ) 2 (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 3 4 (a) Specification method Specify the I/O number and buffer memory address of the intelligent function module.
(3) Processing speed The processing speed of the intelligent function module device is as follows: • The processing speed of writing or reading using the intelligent function module device is slightly higher compared with the case of using the FROM or TO instruction. Example "MOV U2\G11 D0" • When reading from the buffer memory of an intelligent function module and another processing with one instruction, totalize the processing speed of the FROM or TO instruction and the other instruction.
CHAPTER9 DEVICES 9.5.2 Cyclic transmission area device (U3En\G ) 9 (1) Definition The cyclic transmission area device is used to access the CPU shared memory of each CPU module in a multiple CPU system. (2) Features 2 3 • 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. 4 • Using the cyclic transmission area device allows bit manipulation.
9.6 Index Register (Z)/Standard Device Resister (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. X0 MOVP K5 Z0 SM400 BCD D0Z0 K4Y30 Specify the index register by one point (16 bits). Figure 9.59 Index register The index register has 20 points (Z0 to Z19).
CHAPTER9 DEVICES (b) When using the index register for a 32-bit instruction 9 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 2 the specified index register number + 1. Example When Z2 is specified in the DMOV instruction, Z2 represents the lower 16 bits and Z3 represents the higher 16 bits. (The most significant bit in a 32-bit structure is a sign bit.
9.6.2 Standard device register (Z) (1) Definition By using the index register between register operations, operations can be executed at a higher speed. The index register used in this case is called the standard device resister. (2) Device number Since the standard device register is the same device as the index register, pay attention not to use the same device number when using the index modification.
CHAPTER9 DEVICES 9.6.3 Switching from the scan execution type program to the interrupt/fixed scan execution type program The CPU module performs the following when switching from the scan execution type program to the interrupt/ fixed scan execution type program.
(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. 2) When switching from the interrupt/fixed scan execution type program to the scan execution type program The CPU module restores the saved index register values.
CHAPTER9 DEVICES (b) When "High-speed execution" is selected 9 1) When switching from the scan execution type program to the interrupt/fixed scan execution type program 2 The CPU module does not save/restore any index register values.
(3) Processing of file register's block numbers (a) When switching from the scan 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 program, and passes them to the interrupt/fixed scan execution type program. (b) When switching from the interrupt/fixed scan execution type program to the scan execution type program The CPU module restores the saved block numbers of the file register.
CHAPTER9 DEVICES 9.7 File Register (R) Note9.4 9 (1) Definition 2 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.Note1 3 MOV K100 R2 4 File register R0 R1 100 is written to R2. 5 R2 6 Figure 9.
(3) Clearing the file register The file register contents are backed up by the battery built in the CPU module, and they are held if the CPU module is powered off or reset. (Not initialized even if the latch is cleared.*1) *1: The latch range of the file register can be set in the Device tab of the PLC parameter dialog box. ( Section 6.3) To initialize the file register contents, perform the data clear operation in the sequence program or GX Developer.
CHAPTER9 DEVICES 9 (2) When using an SRAM card Up to 4086K points can be stored in one file. Since one block consists of 32K words, up to 128 blocks can be stored. 2 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. 3 (3) When using a Flash card Up to 2039K points can be stored in one file. 4 Since one block consists of 32K words, up to 64 blocks can be stored.
9.7.4 Registration procedure for the file register To use a file register, register the file of the file register to the CPU module in the following steps. Setting a file register Start "PLC file" tab of the PLC parameter dialog box Select "Use the following file." Select "Not used" or " Use the same name as the program." File register setting New "Device memory" window Writing the file register [Online] [Write to PLC] Write the file register to the CPU module. Write parameters to the CPU module.
CHAPTER9 DEVICES 9 (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. 2 3 (a) (b) 4 (c) 5 6 Figure 9.72 File register setting 7 (a) Not used 8 Select this in the following cases. • When not using any file register • When specifying a file register used in the sequence program (the QDRSET instruction is used for specification.) 9.7 File Register (R) 9.7.
(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. Example When each of file registers A to C has the same name with the corresponding one of the program A to C, the operation is as described below.
CHAPTER9 DEVICES 9 (2) File register setting In a new device memory window, set data for the specified file register. 2 3 4 5 Figure 9.74 Device memory window 6 (a) Devices Setting Rn (R0 in the case shown above)and clicking the Display button will display the file register list. (b) Data setting 7 8 Enter data that are set for the file register. This step is not needed when you specify only the capacity of file register.
(a) Target memory Select the Standard RAM, Memory card (RAM), or Memory card (ROM) from this list box. When using the same file name as that of the program, register the file register to the memory specified in the PLC File tab of the PLC parameter dialog box. (b) Selecting a file register file By selecting a memory for the file register, file names of the set file registers are displayed. Select a file register file.
CHAPTER9 DEVICES 9.7.5 Specification methods of the file register 9 (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. 2 Each block has a specification range of R0 to R32767.
9.7.6 Precautions for using the file register (1) No registration or use of an invalid file register number (a) When the file of the file register has not been registered Writing to or reading from the file register will result in "OPERATION ERROR" (error code: 4101). (b) When writing to or reading from the file register exceeding the registered size (points) "OPERATION ERROR" (error code: 4101) will occur.
CHAPTER9 DEVICES (c) File register size checking procedure 9 • Check the file register size used for each sequence program. • Check the total file register size set in SD647 on the sequence program to see if there are sufficient 2 number of points to be used or not. [Program example 1] 3 The file register range of use is checked at the beginning of each program.
9.8 Extended Data Register (D) and Extended Link Register (W) Note9.5 (1) Definition The extended data register (D) and extended link register (W) are devices for using the large-capacity file register (ZR) area as an extended area of the data register (D) and link register (W). These devices can be programmed as the data register (D) and link register (W) together with the file register (ZR) area.Note1 Device numbers can be assigned to the data register and extended data register consecutively.
CHAPTER9 DEVICES 9 (2) Device numbers Device numbers for the extended data register (D) and extended link register (W) can be assigned consecutively after those for the internal user devices, data register (D) and link register (W).
(3) Setting method Since the extended data register (D) and extended link register (W) use the file register area, data must be set for both the file register setting and the device setting. (a) File register setting Select "Use the following file." in the PLC file tab of the PLC parameter dialog box, and enter data in the boxes indicated in Figure 9.80. The "Use the same file name as the program." option is not selectable. Specify the target memory, file name, and file size. Figure 9.
CHAPTER9 DEVICES (b) Device setting Set each number of points for the file register (ZR), extended data register (D), and extended link register (W) 9 in the File register extended setting in the Device tab of the PLC parameter dialog box. Assign a part of the points set for the file register (ZR) in the PLC file tab to the extended data register (D) and extended link register (W). 2 3 If data are to be latched, specify the latch range.
(4) Checking the points by the special register The points for each of the file register (ZR), extended data register (D), and extended link register (W) can be checked in the following special register areas. • SD306, SD307: File register (ZR) • SD308, SD309: Extended data register (D) • SD310, SD311: Extended link register (W) (5) Precautions For use of the extended data register (D) and extended link register (W), pay attention to the following.
CHAPTER9 DEVICES 6) To access the extended data register (D) or extended link register (W) from a module that does not support the use of these devices, device numbers need to be specified with those of the file register (ZR). 9 Calculation formulas for obtaining device numbers of the file register (ZR) to be specified to access the extended data register (D) and extended link register (W) and calculation examples are described below. Table9.
9.9 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. Specify the nesting (N) in ascending order (in order of N0 to N14), starting from the outside of the nesting structure. Designated in ascending No.
CHAPTER9 DEVICES 9.10 Pointer (P) 9 (1) Definition The pointer (P) is a device used in jump instructions (CJ, SCJ, or JMP) or subroutine call instructions (such as 2 CALL). 3 (2) Applications Pointers can be used in the following applications.
9.10.1 Local pointer (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. can be used. CALL P0 CALL P0 FEND FEND P0 P0 RET RET END END Figure 9.
CHAPTER9 DEVICES 9 (3) Precautions for using the local pointer (a) Program where the local pointer is described 2 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.
9.10.2 Common pointer (1) Definition The common pointer is used to call subroutine programs from all programs that are being executed. Program A Program C CALL P204 P204 CALL P0 RET FEND P205 Program B RET CALL P205 END FEND Label Figure 9.88 Calling pointers in another program (common pointer) (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.
CHAPTER9 DEVICES 9 (3) Precautions 1) The same pointer number cannot be used as a label. 2 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 3 common pointer, a "Pointer configuration error (error code: 4020) will occur.
9.11 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) I Interrupt program IRET Figure 9.91 Interrupt pointer (2) Number of available points The number of points available for the interrupt pointer is 256 (I0 to I255). (3) Interrupt factors Interrupt factors are listed in Table9.10. Table9.
CHAPTER9 DEVICES 9.11.1 List of interrupt pointer numbers and interrupt factors 9 The list of interrupt pointer numbers and interrupt factors are shown below. 2 Table9.11 List of interrupt pointer numbers and interrupt factors I No. Interrupt factor Priority I No.
9.12 Other Devices 9.12.1 SFC block device (BL) The SFC block is used to check that the specified block in the SFC program is activated. Remark For use of the SFC block device, refer to the following. QCPU (Q Mode)/QnACPU Programming Manual (SFC) 9.12.2 Network No. specification device (J) (1) Definition The network No. specification device is used to specify the network number in the link dedicated instructions.
CHAPTER9 DEVICES 9.12.3 I/O No. specification device (U) 9 (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 2 3 In the intelligent function module dedicated instruction, this device is specified as shown in Figure 9.93. 4 GP.READ Un S1 S2 S3 D I/O No. specification device (n: I/O No.) Instruction name I/O No. specification instruction 5 Figure 9.93 How to use the I/O No.
9.12.4 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. (2) Specification method Among the devices used in the ladders registered as macros in GX Developer, specify a device used for VD.
CHAPTER9 DEVICES 9.13 Constants 9 9.13.1 Decimal constant (K) 2 (1) Definition The decimal constant (K) is used to specify decimal data in sequence programs. Specify it as K 3 (example: K1234) in sequence programs. In the CPU module, data are stored in binary (BIN). ( Section 2.4.
9.13.3 Real number (E) (1) Definition The real number (E) is a device used to specify real numbers in sequence programs. In sequence programs, specify it as E (example: E1.234). ( Section 2.4.4) X1 EMOVP E1.234 D0 Figure 9.
CHAPTER9 DEVICES 9.13.4 Character string (" ") 9 (1) Definition The character string is a device used to specify a character string in sequence program. 2 Characters enclosed in quotation marks (example: "ABCD1234") are specified. (2) Available characters 3 All ASCII code characters can be used in character strings. The CPU module distinguishes between upper and lower case characters. 4 (3) Number of specified characters A string from the specified character to the NUL code (00H) is one unit.
9.14 Convenient Usage of Devices When multiple programs are executed in the CPU module, each program can be executed independently by specifying an internal user device as a local device. Devices of the CPU module are classified into the following two types: • Global device that can be shared by multiple programs that are being executed. • Local device that is used independently for each program. 9.14.1 Global device Programs being executed in the CPU module can share the global device.
CHAPTER9 DEVICES 9 ● All of the devices that have not been set as local 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.14.2) are global devices. 2 Section 9.14.2) must be specified in advance. 3 Example: Internal relay M0 Shared by all programs Used in program A The range must be specified for each program. 4 Used in program B Used in program C 5 Figure 9.
(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) Note9.7Note1 • Index register (Z) (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.
CHAPTER9 DEVICES 9 (3) Local device setting (a) Setting the local device range 2 In the Device tab of the PLC parameter dialog box, set the range that is used as a local device. 3 4 5 6 7 Figure 9.101 Device 8 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 M0 Program A Program B Program C Local device Local device Local device 9.
(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.103 PLC file (c) Writing the setting data Write the data set in (a) and (b) to the CPU module. Select [Online] [Write to PLC] in GX Developer. Figure 9.
CHAPTER9 DEVICES 9 ● 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 personal computer. ( ● Section 6.
(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. Figure 9.106 File usability setting dialog box (b) Precautions 1) Change of the local device Do not change or refer to the local device in a program for which the local device is set to "Not used".
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. 9 2 Use of the relevant local device is set by ON/OFF of SM776. 3 Table9.14 Local device switching by ON/OFF of the special relay (SM776) SM776 Operation OFF Perform operations with the local device that corresponds to the source file of the subroutine program.
(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. • The on/off status of SM776 is set for each CPU module. It cannot be set for each file. • If the on/off status of SM776 is changed during sequence program execution, control is implemented according to the information after the change.
CHAPTER9 DEVICES 9 (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. 2 Use of the relevant local device is set by ON/OFF of SM777. *1 *1: The index register set as the local device uses the local device area for the program executed before the interrupt/fixed scan execution type program, regardless of the on/off status of SM777.
(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. • The on/off status of SM777 is set for each CPU module. It cannot be set for each file.
CHAPTER10 CPU MODULE PROCESSING TIME CHAPTER10 CPU MODULE PROCESSING TIME 1 This chapter describes the CPU module processing time. 10 10.1 Scan Time 3 This section describes the scan time structures and CPU module processing time. 10.1.1 Scan time structure 4 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. 5 Processing in the RUN status 6 Program check I/O refresh time Section 10.
(1) 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. Current value SD520 SD521 Minimum value SD524 SD525 Maximum value SD526 SD527 Stores the scan time of 1ms or less (unit: s). Stores the scan time. (unit: ms). Figure 10.
CHAPTER10 CPU MODULE PROCESSING TIME 1 (2) Instruction execution time in END processing This is the processing time of the DUTY instruction in END processing. The user timing clock (SM420 to 424 and SM430 to SM434) specified with the DUTY instruction is turned on/off during the END processing. 10 Table10.2 Instruction execution time in END processing CPU module 3 Processing time in END processing When set to 1 When set to 5 Q00UJCPU, Q00UCPU, Q01UCPU 0.0120ms 0.0140ms Q02UCPU 0.0050ms 0.
(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 (3). Two kinds of overhead time (pre-start and program-end) need to be added to interrupt programs. Table10.
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 1 Table10.7 will be added to the overhead time given in Table10.3 and Table10.4.
(4) 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.
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 1 devices in the CPU module. Use intelligent function module utility package (GX Configurator) for auto refresh settings. 10 Calculation method 3 Use the following expression to calculate the auto refresh time with an intelligent function module.
(5) Function execution time in END processing This is the time required for updating calender or clearing error in END processing. (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. Table10.
CHAPTER10 CPU MODULE PROCESSING TIME 1 (6) Device data latch processing time When the latch range is set in the Device tab of the PLC parameter dialog box*1 *2 *3, the processing 10 time shown in Table10.12 is required. Each N1, N2, and N3 in the table indicates the following: 3 • N1: Number of devices specified to be latched (Count the latch range (1) and the latch range (2) as different devices.
(7) Service processing time Service processing is the communication processing with GX Developer and external devices. When monitoring device data, reading programs, and setting monitor conditions in GX Developer, the processing time shown in Table10.13 or Table10.14 is required. Table10.13 Processing time to monitor device data and read programs Processing time*1 Monitoring device data (Data register: 32 points) CPU module Reading programs (10K step) Q00UJCPU, Q00UCPU, Q01UCPU 1.60ms 3.
CHAPTER10 CPU MODULE PROCESSING TIME 10.1.3 Factors that increase the scan time 1 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. 10 (1) Sampling trace When the sampling trace function ( Section 6.14) is executed, the processing time shown in Table10.16 is required. Table10.
(2) Use of local devices When local devices are used, the processing time shown in Table10.17 is required. Each n, N1, N2, and N3 in the table indicates the following: • n: Number of programs using a local device*1 • N1: Number of devices that specified a local device • N2: Number of word device points that specified a local device • N3: Number of bit device points that specified a local device Table10.
CHAPTER10 CPU MODULE PROCESSING TIME (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 1 Table10.19 is required for each subroutine call.
(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 Q00UJCPU, Q00UCPU, Q01UCPU 0.053 n*1 ms Q02UCPU 0.04 n*1 ms Q03UDCPU, Q03UDECPU 0.02 n*1 ms 0.
CHAPTER10 CPU MODULE PROCESSING TIME 1 (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.*1 10 3 *1: The time in the table is for the case where the service processing count is set to one. 4 Table10.
(7) Non-group output status read In multiple CPU systems, the scan time increases when “All CPUs can read all outputs” is selected in the Multiple CPU settings screen of the PLC parameter dialog box. The scan time increases when this parameter is set. Figure 10.3 Multiple CPU settings screen (8) Scan time measurement When the scan time is measured by GX Developer, the processing time shown in Table10.25 is required ( Section 6.13.3) Table10.
CHAPTER10 CPU MODULE PROCESSING TIME 1 (9) Time taken to collect module errors When using the module error collection, the scan time increases by the time found by the following calculation formula. 10 Calculation formula Collection time = N1 + N2 (Number of module errors collected in one scan) 3 The following table shows N1 and N2 values. 4 Table10.
(10)Batch transfer of data to the program memory When data in the program cache memory is batch-transferred to the program memory by GX Developer, the processing time shown in Table10.28 is required.*1 *1: The time in the table is for the case where the service processing count is set to one. Table10.28 Processing time (when data is batch-transferred to the program memory) CPU module Processing time Scan time = 2ms Scan time = 20ms 1.90ms 4.90ms Q02UCPU 1.55ms 4.50ms Q03UDCPU, Q03UDECPU 1.10ms 3.
CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE 1 2 This chapter describes procedures for writing a program created by GX Developer to the CPU module. 11 Remark For procedures for starting the CPU module, refer to the following. QCPU User's Manual (Hardware Design, Maintenance and Inspection) 4 5 11.
(4) Setting the applications of devices and the number of device points Consider the applications of devices and the number of device points used in the program. ( CHAPTER 9) (5) Setting the initial device value Set data necessary as an initial value to the device memory and the buffer memory of the intelligent function module. ( Section 6.25) (6) Setting boot operation When storing a program to the memory card, execute the program after boot operation.
CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE 11.2 Hardware Check 1 This section describes a procedure for checking hardware before writing a created program. In the following procedure, 2 indicates an operation on the CPU module side. Start 11 Start GX Developer and create a project. GX Developer Version 8 Operating Manual 4 Connect the personal computer to which GX Developer is installed to the CPU module.
1) Power off the programmable controller and then on or reset the CPU module. Set the RUN/STOP/RESET switch to RUN to change the CPU module in the RUN status. YES Is the RUN LED on? To Section 11.3 NO YES Is the ERR. LED off? NO Check the error cause in the System Monitor screen displayed by selecting [Diagnostics] [System Monitor] in GX Developer or in the "PLC diagnostics" screen and remove the error.
CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE 11.3 Procedure for Writing One Program This section describes a procedure for writing a program to the program memory. ( 1 Section 5.1.2) Follow the procedure below and then the procedure provided in Section 11.5 before storing the program in 2 the memory card for boot operation. In the following procedure, indicates an operation on the CPU module side. 11 Start 4 Start GX Developer. GX Developer Version 8 Operating Manual 5 Set the project.
1) Select [Online] [Format PLC memory] in GX Developer and format the program memory. 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. Power off the programmable controller and then on or reset the CPU module.
CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE 11.4 Procedure for Writing Multiple Programs 1 This section describes a procedure for writing multiple programs to the program memory. ( Section 2 5.1.2) Follow the procedure below and then the procedure provided in Section 11.5 before storing the programs in the memory card for boot operation. In the following procedure, 11 indicates an operation on the CPU module side. 4 Start Start GX Developer.
1) NO Set local devices? YES Set the local device range in the Device tab of the PLC parameter dialog box. Section 9.14.1 Set a file name for the local devices in the PLC file tab of the PLC parameter dialog box. Section 9.14.1 NO Use the common pointers? YES Set the start pointer number in the PLC system tab of the PLC parameter dialog box. Section 9.10 Set the names and execution conditions of programs to be executed in the Program tab of the PLC parameter dialog box. Section 2.
CHAPTER11 PROCEDURES FOR WRITING PROGRAM TO CPU MODULE 1 3) NO 2 Is the ERR. LED on the CPU module on (flashing)? YES Check the error cause in the System Monitor screen displayed by selecting [Diagnostics] [System Monitor] in GX Developer or in the "PLC diagnostics" screen and remove the error. NO 11 QCPU User's Manual (Hardware Design, Maintenance and Inspection) 5 Start boot operation? 6 YES End 4 To Section 11.5 Figure 11.
11.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.3 or Section 11.4 ) If the RUN/STOP/RESET switch is in RUN, set the switch to STOP. Set the file name of parameters, a program, devices, initial values and device comments in the Boot file tab of the PLC parameter dialog box.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST 1 2 12.1 SPECIAL RELAY LIST Special relays, SM, are internal relays whose applications are fixed in the Programmable Controller. For this reason, they cannot be used by sequence programs in the same way as the normal internal relays. 3 12 However, they can be turned ON or OFF as needed in order to control the CPU module.
(1) Diagnostic Information Table12.2 Special relay Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU M9 SM0 SM1 Diagnostic errors Self-diagnostic error OFF : No error ON : Error OFF : No self-diagnosis errors ON : Self-diagnosis • Turns ON if an error occurs as a result of diagnosis. (Includes when an annunciator is ON, and when an error is detected with CHK instruction) • Remains ON even if the condition is restored to normal thereafter.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.2 Special relay Number Name Meaning Explanation Set by (When Set) Corresponding ACPU 1 Corresponding CPU 2 M9 SM56 SM60 Operation error OFF : Normal ON : Operation error • ON when operation error is generated • Remains ON if the condition is restored to normal thereafter. S (Error) M9011 Blown fuse detection OFF : Normal ON : Module with blown fuse • Turns ON if there is at least one output module whose fuse has blown.
(2) System information Table12.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.3 Special relay Number Name Meaning Explanation Set by (When Set) Corresponding ACPU 1 Corresponding CPU 2 M9 SM240 SM241 SM242 SM243 SM244 SM245 No. 1 CPU reset flag OFF : No. 1 CPU reset cancel ON : No. 1 CPU resetting • Goes OFF when reset of the No. 1 CPU is canceled. • Comes ON when the No. 1 CPU is resetting (including the case where the CPU module is removed from the base). The other CPUs are also put in reset status.
Table12.3 Special relay Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU M9 SM255 OFF : Operative network ON : Standby network • Goes ON for standby network(If no designation has been made concerning active or standby, active is assumed.) OFF : Reads ON : Does not read S (Initial) New • For refresh from link to CPU module (B, W, etc.) indicate whether to read from the link module.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.
(3) System clocks/counters Table12.4 Special relay Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU M9 SM400 Always ON ON OFF Always OFF ON OFF • Normally is ON S (Every END processing) • Normally is OFF S (Every END processing) M9037 S (Every END processing) M9038 Qn(H) QnPH QnPRH QnU S (Every END processing) New Q00J/Q00/Q01 S (Every END processing) M9039 Qn(H) QnPH QnPRH QnU • After RUN, OFF for 1 scan only.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.4 Special relay Number Name Meaning Set by (When Set) Explanation Corresponding ACPU 1 Corresponding CPU 2 M9 SM415 2n (ms) clock SM420 User timing clock No.0 SM421 User timing clock No.1 SM422 User timing clock No.2 SM423 User timing clock No.3 SM424 User timing clock No.4 • This relay alternates between ON and OFF at intervals of the time (unit: ms) specified in SD415.
(6) Memory cards Table12.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.
(7) Instruction-Related Special Relays Table12.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.8 Special relay Number Name Meaning Explanation • During OFF, XCALL instructions will not be executed even if execution condition is risen. • During ON, XCALL instructions will be executed when execution condition is risen.
Table12.8 Special relay Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU M9 OFF : Block is secured ON : Block set by SD796 cannot be secured • Turns ON when the number of the remaining blocks of the dedicated instruction transmission area used for the multiple CPU high-speed transmission dedicated instruction(target CPU= CPU No.1) is less than the number of blocks specified by SD796. Turns ON at instruction execution.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST (9) A to Q conversion correspondences Special relays SM1000 to SM1255 are the relays which correspond to ACPU special relays M9000 to M9255 after A to Q conversion. (However, the Basic model QCPU and Redundant CPU do not support the A to Q conversion.) These special relays are all set by the system, and cannot be set by the user program. To turn them ON/OFF by the user program, change the special relays in the program into those of QCPU.
Table12.11 Special relay ACPU Special Relay Special Relay after Conversion Special Relay for Modification Name Meaning Details • Turns ON if an instantaneous power failure of within 20ms occurs during use of the AC power supply module. • Reset when the power supply is switched OFF, then ON.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.11 Special relay ACPU Special Relay Special Special Relay after Relay for Conversion Modification M9034 SM1034 – M9036 SM1036 – Name 2n minute clock(1 minute clock)*2 Always ON Meaning 1 Details ns ns ON OFF • Used as dummy contacts of initialization and application instruction in sequence program. • SM1038 and SM1037 are turned on and off without regard to position of key switch on CPU module front.
Table12.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.11 Special relay ACPU Special Relay M9103 Special Special Relay after Relay for Conversion Modification SM1103 Name Presence/absence of continuous transition OFF : Continuous transition not effective ON : Continuous transition effective • Set whether continuous transition will be performed for the block where the "continuous transition bit" of the SFC information device is not set.
(11) Process control instructions Table12.13 Special relay Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU M9 SM1500 SM1501 Hold mode OFF : No-hold ON : Hold • Specifies whether or not to hold the output value when a range over occurs for the S.IN instruction range check. Hold mode OFF : No-hold ON : Hold • Specifies whether or not the output value is held when a range over occurs for the S.OUT instruction range check.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.13 Special relay Number Name Meaning Explanation Set by (When Set) Corresponding ACPU 1 Corresponding CPU 2 M9 OFF : Power supply on startup ON : Operation system switch start up • Turns on when the CPU module is started up by the system switching (switching from the standby system to the control system). Remains OFF when the standby system is switched to the control system by a power-ON startup.
Table12.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.13 Special relay Number Name Meaning Explanation Set by (When Set) Corresponding ACPU 1 Corresponding CPU M9 SM1593 Setting to access extension base unit of standby system CPU OFF : Error ON : Ignored Sets the operation for the case accessing buffer memory of the intelligent function module mounted on the extension base unit from the standby system CPU in separate mode.
(14) For redundant system (tracking) Either the backup mode or the second mode is valid for SM1700 to SM1799. All is turned off for stand-alone system. Table12.15 Special relay Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU M9 SM1700 Transfer trigger completion flag OFF : Transfer not completed ON : Transfer completed • Turns on for one scan, once transfer of block 1 to block 64 is completed.
CHAPTER12 SPECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.
Table12.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST 12.2 SPECIAL REGISTER LIST 1 The special registers, SD, are internal registers with fixed applications in the Programmable Controller. For this reason, it is not possible to use these registers in sequence programs in the same way that normal registers are used. However, data can be written as needed in order to control the CPU modules.
(1) Diagnostic Information Table12.18 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 SD0 Diagnostic errors Diagnosis error code • Error codes for errors found by diagnosis are stored as BIN data. • Contents identical to latest fault history information. S (Error) D9008 format change S (Error) New • Year (last two digits) and month that SD0 data was updated is stored as BCD 2-digit code.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.18 Special register Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU 1 D9 SD5 SD6 Number SD5 SD6 SD7 SD8 SD9 SD10 SD11 SD12 SD13 SD14 SD15 SD7 SD8 SD9 SD10 SD11 SD12 SD13 Error common information Error common information 3 Meaning Slot No./CPU No./Base No. 1, 2, 3, 4 I/O No.
Table12.18 Special register Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU D9 SD5 SD6 3) Time (value set) Number SD5 SD6 SD7 SD8 SD9 SD10 SD11 SD12 SD13 SD14 SD15 SD7 SD8 4) SD9 Error common information SD10 SD11 Error common information Meaning Time : 1 s units (0 to 999 s) Time : 1ms units (0 to 65535ms) (Empty) Program error location Meaning Number SD5 File name SD6 (ASCII code: 8 characters) SD7 SD8 2EH(.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.
Table12.18 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 SD5 SD6 SD7 8) Number SD5 SD6 SD7 SD8 SD9 SD10 SD11 SD12 SD13 SD14 SD15 SD8 SD9 SD10 Tracking transmission data classification Stores the data classification during tracking.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.18 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU 1 Corresponding CPU 2 D9 • Individual information corresponding to error codes (SD0) is stored here. • There are the following eight different types of information are stored. • The error individual information type can be judged by the "individual information category code" in SD4.
*6 : Extensions are shown below. Table12.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.
Table12.18 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 SD50 Error reset Error number that performs error reset • Stores error number that performs error reset U New S (Error) New • All corresponding bits go 1(ON) when battery voltage drops. • Subsequently, these remain 1(ON) even after battery voltage has been returned to normal.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.18 Special register Number Name Meaning Explanation Set by (When Set) Corresponding ACPU 1 Corresponding CPU D9 SD62 Annunciator number Annunciator number • The first annunciator number (F number) to be detected is stored here. S (Instruction execution) D9009 SD63 Number of annunciators Number of annunciators • Stores the number of annunciators searched.
Table12.18 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 SD100 Transmission speed storage area Stores the transmission speed specified in the serial communication setting. 96 576 : 9.6kbps, : 57.6kbps, b15 SD101 Communication setting storage area Stores the communication setting specified in the serial communication setting. 192 1152 : 19.2kbps, : 115.2kbps 384 : 38.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.18 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU 1 Corresponding CPU D9 • The numbers of output modules whose fuses have blown are input as a bit pattern (in units of 16 points). (If the module numbers are set by parameter, the parameter-set numbers are stored.
(2) System information Table12.20 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 • The CPU switch status is stored in the following format: b15 to b12 b11 to b8 b7 3) Status of switch Status of CPU switch b4 b3 2) Empty to b0 1) 0: RUN 1: STOP 2: L.CLR 1): CPU switch status SD200 to 2): Memory card switch Always OFF 3): DIP switch b8 through b12 correspond to SW1 through SW5 of system setting switch 1. 0: OFF, 1: ON.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.20 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU 1 Corresponding CPU D9 • Specify the LEDs to be turned off using this register, and turn SM202 from OFF to ON to turn off the specified LEDs. USER and BOOT can be specified as the LEDs to be turned off. • Specify the LEDs to be turned off in the following bit pattern. (Turned off at 1, not be turned off at 0.
Table12.20 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 SD207 Priorities 1 to 4 SD208 Priorities 5 to 8 • When error is generated, the LED display (flicker) is made according to the error number setting priorities. (The Basic model QCPU supports only the annunciator (error item No. 7). • The Universal model QCPU sets execution/non-execution of LED display of the error corresponding to the each priority ranking when the error occurs.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.20 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU 1 Corresponding CPU D9 • The year (first two digits) and the day of the week are stored as BCD code as shown below.
Table12.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.20 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU 1 Corresponding CPU D9 Number of modules installed SD254 SD256 SD257 SD258 SD259 MELSECNET/ 10. MELSECNET/H information Information from 1st module SD255 • Indicates the number of mounted MELSECNET/10 modules or MELSECNET/H modules. I/O No. • Indicates I/O number of mounted MELSECNET/10 module or MELSECNET/H module Network No.
Table12.20 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 1) When Xn0 of the mounted CC-Link module turns ON, the bit of the corresponding station turns to 1 (ON). 2) When either Xn1 or XnF of the mounted CC-Link module turns OFF, the bit of the corresponding station turns to 1 (ON). 3) Turns to 1 (ON) when communication between the mounted CC-Link module and CPU module cannot be made.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.20 Special register Number Meaning Explanation Device assignment (Index register) 16 bit modification Number of points assigned for Z • Stores the number of points of index register (Z) to be modified in the range of 16 bits. (The assignment is set by the ZR device index modification setting parameter.
Table12.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST 1 Table12.20 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 Number of multiple CPUs SD393 Q00/Q01*9 QnU • The number of CPU modules that comprise the multiple CPU system is stored. (1 to 3, Empty also included) • The CPU module types of No. 1 CPU to 3 and whether the CPU modules are mounted or not are stored. SD394 S (Initial) SD395 Multiple CPU system information SD396 No.
(4) Scan information Table12.22 Special register Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU D9 SD500 Execution program No. Program No. in execution • Program number of program currently being executed is stored as BIN value. SD510 Low speed excution type program No. Low speed execution type program No. in execution • Program number of low speed excution type program No. currently being executed is stored as BIN value.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.
(5) Memory card Table12.23 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 • Indicates the type of the memory card installed.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.23 Special register Number Name Meaning Set by (When Set) Explanation 1 Corresponding ACPU D9 Corresponding CPU New Qn(H) QnPH QnPRH QnU 2 • Indicates the drive 3/4 type. b15 SD620 Drive 3/4 typs Drive 3/4 typs to 0 to b8 b7 b4 b3 to b0 Drive 3 (Standrd RAM) Fixed to 1 Drive 4 (Standrd ROM) Fixed to 3 S (Initial) 12 (The bits for the drive 3 (standard RAM) type is fixed to "0" in the Q00UJCPU.
Table12.23 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 • Stores file register file name (with extension) selected at parameters or by use of QDRSET instruction as ASCII code.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.23 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU 1 Corresponding CPU 2 D9 SD670 Parameter enable drive information Parameter enable drive No. • Stores information of parameter storage destination drive which is enabled.
Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 • Stores the last 2 digits of year and month when data is restored in 2-digit BCD code. Restore time (Year and month) SD676 b15 to b12 b11 to b8 b7 to b4 b3 to b0 Example: July, 1993 9307H Year Month • Stores the day and time when data is restored in 2-digit BCD code. b15 to b12 b11 to b8 b7 to b4 b3 to Restore time (Day and time) SD677 b0 Example: 31st, 10 a.m.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU 1 D9 SD691 SD692 Backup execution status Restoration error factor Backup execution status display (Percentage) • Displays the execution status of data backup to the memory card in percentage (0 to 100%). • "0" is set when the backup starts.
(6) Instruction-Related Registers Table12.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.24 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU 1 Corresponding CPU 2 D9 • Specify the limit of each PID loop as shown below.
Table12.24 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 • Selects whether or not the data is refreshed when the COM, CCOM instruction is executed. • Designation of SD778 is made valid when SM775 turns ON.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST 1 Table12.24 Special register Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU D9 SD796 SD797 SD798 Maximum number of blocks used for the multiple CPU highspeed transmission dedicated instruction setting (for CPU No.2) Maximum number of blocks used for the multiple CPU highspeed transmission dedicated instruction setting (for CPU No.
(7) Debug Table12.25 Special register Number Name Meaning Explanation Set by (When Set) Corresponding ACPU Corresponding CPU D9 SD840 Debug function usage Debug function usage Stores the status of the debug function usage as shown below.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST (10) A to Q conversion ACPU special registers D9000 to D9255 correspond to Q special registers SD1000 to SD1255 after A to Q/QnA conversion. (However, the Basic model QCPU and Redundant CPU do not support the A to Q conversion.) These special registers are all set by the system, and cannot be set by the user program. To set data by the user program, correct the program for use of the QCPU special registers.
Table12.28 Special register ACPU Special Register D9000 Special Register after Conversion Special Register for Modification – SD1000 Name Fuse blown Meaning Number of module with blown fuse Corresponding CPU Details • When fuse blown modules are detected, the first I/O number of the lowest number of the detected modules is stored in hexadecimal.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.
Table12.28 Special register ACPU Special Register D9016 Special Register after Conversion Special Register for Modification Name Program number SD1016 Details Corresponding CPU • Indicates which sequence program is run presently. One value of 0 to B is stored in BIN code.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.28 Special register ACPU Special Register Special Special Register Register for after Modification Conversion Name 1 Meaning Corresponding CPU Details 2 • The day of the week is stored as BCD code as shown below. b15 D9028 D9035 D9036 – SD1028 SD1035 SD648 Clock data Extension file register to b8 b7 to b4 b3 b0 to Example: Friday H0005 3 Day of the week Clock data (day of week) Use block No.
Table12.28 Special register ACPU Special Register Special Register after Conversion Special Register for Modification Name Meaning Corresponding CPU Details D9053 SD1053 Error transition Transition condition number where error occurred • Stores the transition condition number, where error code 84 occurred in an SFC program, in BIN value. Stores "0" when error code 80, 81, 82 or 83 occurred.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST Table12.28 Special register ACPU Special Register Special Register after Conversion D9100 SD1100 D9101 SD1101 D9102 SD1102 Special Register for Modification Name 1 Meaning Corresponding CPU Details 2 • Output module numbers (in units of 16 points), of which fuses have blown, are entered in bit pattern. (Preset output module numbers when parameter setting has been performed.
Table12.28 Special register Special Register after Conversion Special Register for Modification D9125 SD1125 SD64 D9126 SD1126 SD65 D9127 SD1127 SD66 ACPU Special Register Name Meaning Corresponding CPU Details • When any of F0 to 2047 is turned on by SET F instruction, the annunciator numbers (F numbers) that are turned on in order are registered into SD1125 to SD1132.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST (11) QCPU with built-in Ethernet port 1 Table12.29 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU 2 D9 Operation result SD1270 Stores operationresult. Stores the operation result of the time setting function. 0: Not executed 1: Success FFFFH: Failure 3 Stores years (last two digits of the Christian Era) and monthes by two digits of BCD code.
Table12.30 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 Open completion status of connections (whose open system is socket communication) using socket communication functions is stored. All bits corresponding to connections using any communications other than the socket communication are fixed to "0".
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST 1 (12) Fuse blown module Table12.31 Special register Number SD1300 SD1301 SD1302 SD1303 SD1304 SD1305 SD1306 SD1307 SD1308 SD1309 to SD1330 Name Meaning Set by (When Set) Explanation • The numbers of output modules whose fuses have blown are input as a bit pattern (in units of 16 points). (If the module numbers are set by parameter, the parameter-set numbers are stored.
(15) For redundant systems (Host system CPU information *1) SD1510 to SD1599 are only valid for redundant systems. They are all set to 0 for stand-alone systems. Table12.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST (16) For redundant systems (Other system CPU information *1) SD1600 to SD1659 is only valid during the back up mode for redundant systems, and refresh cannot be done when in the separate mode. SD1651 to SD1699 are valid in either the backup mode or separate mode. When a stand-alone system SD1600 to SD1699 are all 0. Name Meaning Set by (When Set) Explanation 2 3 Table12.
Table12.35 Special register Number Name Set by (When Set) Meaning Explanation Error code of error to be cleared • Stores the error code of the error to be cleared by clearing a standby system error. • Stores the error code of the error to be cleared into this register and turn SM1649 from OFF to ON to clear the standby system error. • The value in the lowest digit (1 place) of the error code is ignored when stored into this register.
CHAPTER12 PECIAL RELAY LIST AND SPECIAL REGISTER LIST (17) For redundant systems (Trucking) 1 SD1700 to SD1779 is valid only for redundant systems. These are all 0 for stand-alone systems. 2 Table12.
(18) Redundant power supply module information SD1780 to SD1789 are valid only for a redundant power supply system. The bits are all 0 for a singular power supply system. Table12.37 Special register Number Name Meaning Set by (When Set) Explanation Corresponding ACPU Corresponding CPU D9 • Stores the status of the redundant power supply module with input power OFF in the following bit pattern. • Stores 0 when the main base unit is not the redundant power main base unit (Q38RB).
APPENDICES APPENDICES 1 Appendix 1 List of Parameter Numbers 2 Each parameter number will be stored in the special register (SD16 to SD26) when an error occurs in the parameter settings. 3 TableApp.1 lists the parameter items and corresponding parameter numbers. For explanation of M and N shown in the "Parameter No." column, refer to Section 8.2. TableApp.1 List of parameter numbers Item Parameter No. Label 0000H Comment 0001H Reference APPENDIX Section 8.
TableApp.1 List of parameter numbers (continued) Item Parameter No. Reference Use serial communication Transmission speed Sum check 100EH Transmission wait time RUN write setting Section 6.23, Section 8.1(11) Service processing setting 1013H Latch data backup operation valid contact 1014H Section 6.24.1, Section 8.1(2) Section 6.28, Section 8.1(2) File register Comment file used in a command 1100H 1101H Section 9.7, Section 8.1(3) Section 8.
APPENDICES 1 TableApp.1 List of parameter numbers (continued) Item Parameter No. Number of modules on MELSECNET/H 5000H Valid module during other station access 5001H Interlink transmission parameters 5002H Routing parameters 5003H Reference 2 3 Starting I/O No. Network No.
TableApp.1 List of parameter numbers (continued) Item Parameter No. Number of modules on CC-Link IE controller network A000H Interlink transmission parameters A002H Routing parameters A003H Reference Starting I/O No. Network No. Total stations ANM0H Section 8.2(1) Station No. Mode ANM0H Refresh parameters ANM1H Common parameters ANM2H Station inherent parameters ANM3H Number of modules C000H Remote input (RX) Remote output (RY) Remote register (RWr) Remote register (RWw) Ver.
APPENDICES 1 TableApp.1 List of parameter numbers (continued) Item Communication area setting (refresh setting) Parameter No. Reference E002H, Online module change E006H Refresh parameter detailed device specification E007H Section 8.
Appendix 2 Functions Added or Changed by Version Upgrade The Universal model QCPU is upgraded when some functions are added or specifications are changed. Therefore, the functions and specifications differdepending on the function version and serial number. (1) Function added and supported CPU module and GX Developer versions TableApp.2 Functions added and supported CPU module and GX Developer versions Function *1 Use of the PC CPU module ( Function First 5 digits of Supported GX version serial No.
APPENDICES *1: Some models do not support the function. For details, refer to the corresponding reference. *2: Data of the extended data register (D) and extended link register (W) can be retained in the standard ROM by using the latch data backup to standard ROM function ( Section 6.28) if the serial number (first five digits) of the Universal model QCPU is "10042" or later. *3: Communication using the A-compatible 1E frame is available only via any Ethernet module.
Appendix 3 Method of Replacing Basic Model QCPU or High Performance Model QCPU with Universal Model QCPU Appendix 3.1 Replacement Precautions This section describes precautions for replacing the Basic model QCPU or High Performance model QCPU with the Universal model QCPU and the replacement methods. Appendix 3.1.1 Replacing Basic model QCPU with Universal model QCPU (1) System configuration TableApp.
APPENDICES 1 TableApp.4 Precautions for replacement and replacement methods (Program) (Continued) Item Precautions Replacement method Reference 2 The latch function of the Universal model QCPU is enhanced. (1) Large-capacity file register (R, ZR) If latch ranges of internal user devices are Latch setting (2) Writing/reading device data to the standard ROM (SP.DEVST and specified, the processing time is added in proportion to the device points set to be latched. S(P).
TableApp.4 Precautions for replacement and replacement methods (Program) (Continued) Item File register Precautions Replacement method To use the file register, capacity setting is Set the capacity of the file register used in required. the PLC file tab of the PLC parameter. Reference The following settings are required for using SFC programs. • Program setting (when both sequence SFC program • Set program details in the Program tab of the PLC parameter dialog box. programs and SFC programs exist.
APPENDICES 1 (5) Battery installation position TableApp.7 Precautions for replacement and replacement methods (Battery installation position) Item Precautions Replacement method Reference 2 The battery replacement method is different. The battery installation position varies Battery installation position depending on the model. • Q00JCPU, Q00CPU, Q01CPU ...On the front of the module. Section 7.2 in the For the battery replacement method, refer to the in the Reference column.
Appendix 3.1.2 Replacing High Performance model QCPU with Universal model QCPU (1) System configuration TableApp.9 Precautions for replacement and replacement methods (System configuration) Item Use of AnS/A series module GOT Precautions Replacement method Reference AnS/A series modules are not supported. Use Q series modules. --- GOT900 series cannot be connected. Use GOT1000 series. --- Applicable USB cables are different. Programming tool connection • High Performance model QCPU ...
APPENDICES 1 (2) Program TableApp.10 Precautions for replacement and replacement methods (Program) Item Language and instruction Precautions Replacement method Reference 2 Replace the instructions not supported in Some instructions are not supported. the Universal model QCPU are described Appendix 3.3 in Appendix 3.3. 3 Instructions for floating-point doubleprecision operations are added for the The Universal model QCPU performs program operations of floating-point data in single precision.
TableApp.9 Precautions for replacement and replacement methods (Program) (Continued) Item Precautions Replacement method The interrupt pointer (I49) for the high- Consider the use of interrupt pointers for speed interrupt function is not supported. fixed scan interrupt (I28 to I31). Check the numbers of executions for Interrupt program Interrupt counter is not supported. interrupt programs on the Interrupt Reference Section 6.13.2, 9.2.11 program monitor list screen of GX Developer.
APPENDICES 1 (3) Drive and file TableApp.11 Precautions for replacement and replacement methods (Drive and file) Item Precautions Replacement method Reference 2 Since the Universal model QCPU holds the data in the program memory even Files in the standard ROM cannot be booted to the program memory. Boot file setting 3 when the battery voltage drops, the boot file setting is not necessary. Move files with the boot setting (from the standard ROM to the program memory) to Section 5.1.8, 5.1.
(5) Diagnostic function TableApp.13 Precautions for replacement and replacement methods (Diagnostic function) Item Precautions Replacement method Reference The Universal model QCPU can store Error history Error history data cannot be stored in the history data by the number of storable memory card. history data in a memory card (100) to the Section 6.18 system memory. LED indication priority setting LED indication priority cannot be set.
APPENDICES 1 (7) Switch on the front of the CPU module TableApp.15 Precautions for replacement and replacement methods (Switch on the front of the CPU module) Item Precautions The operation method with the RESET/ RUN/STOP switch is modified. Replacement method Reference The RESET/STOP/RUN switch of the Section 4.4 in the Universal model QCPU can be used for QCPU User's Manual the reset operation of the CPU module (Hardware Design, and switching between the STOP and Maintenance and RUN status.
(8) SFC TableApp.16 Precautions for replacement and replacement methods (SFC) Item Precautions Replacement method Reference Section 4.6 and Step transition The step transition monitoring timer is not monitoring timer supported. Change the program as described in Appendix 3.1 in the Appendix 3.1 in the manual in the QCPU (Q Mode)/ Reference column. QnACPU Programming Manual (SFC) Section 4.7.4 and The periodic execution block setting is not supported.
APPENDICES Appendix 3.2 Applicable devices and software 1 (1) Products need to be replaced for the compatibility with the Universal model QCPU The following tables show products need to be replaced for the compatibility with the Universal model QCPU. (As for products not listed in the tables below, replacement is not required.) 2 3 TableApp.
TableApp.
APPENDICES (2) CPU modules that can configure a multiple CPU system with the Universal model QCPU CPU modules that can configure a multiple CPU system with the Universal model QCPU are shown below. (a) For the QnUD(H)CPU or Built-in Ethernet port QCPU TableApp.
(3) Software need to be upgraded for the compatibility with the Universal model QCPU The following table shows software need to be upgraded for the communication with the Universal model QCPU. (As for software not listed in the table below, version upgrade is not required.) The latest version can be downloaded from the MELFANSweb. TableApp.
APPENDICES Appendix 3.3 Instructions 1 Appendix 3.3.1 Instructions not supported in the Universal model QCPU and replacing methods 2 The Universal model QCPU does not support instructions listed in the TableApp.24. and TableApp.25. Instructions need to be replaced using replacing methods described in the tables. (If no instruction in the list is used, replacement is not required.) 3 TableApp.
TableApp.26 SFC control instructions not supported in the Universal model QCPU and replacing methods Symbol Instruction Replacing method LD TRn AND TRn OR TRn LDI TRn ANDI TRn ORI TRn Forced transition check When the programmable controller type is changed, these instructions are LD BLm\TRn instruction converted into SM1255. Modify programs as needed.
APPENDICES Appendix 3.3.2 Replacing programs using multiple CPU transmission dedicated instructions 1 (1) Replacing the module with the QnUD(H)CPU or Built-in Ethernet port QCPU 2 TableApp.26 shows instructions need to be replaced and corresponding alternative instructions. For the specifications of each instruction, refer to the manuals for the Motion CPU. 3 TableApp.
Appendix 3.3.3 Program replacement examples This section shows program replacement examples for the instructions of which replacement programs are available in Appendix 3.3. (Skip this section if instructions listed in Appendix 3.3.1 are not used.) (1) Replacement example of the IX and IXEND instructions Since index registers are saved using the ZPUSH instruction, a 23-word index register save area is required. (a) Example of device assignment TableApp.
APPENDICES (c) Program after replacement • Replace the IX instruction with the ZPUSH instruction and the processing for setting the contents of index 1 modification table to index registers. • Replace the IXEND instruction with the ZPOP instruction. 2 Current index register is saved. 3 APPENDIX 6 Contents of the index modification table are set to the index registers Z0 to Z15. Transition from the IX instruction 7 8 The saved index register is restored.
(2) Replacement example of the IXDEV and IXSET instructions Change the program so that the device offset value specified by the contacts between the IXDEV and the IXSET instructions are directly set to the index modification table using the MOV instruction. For the devices whose device offset value is not specified by the IXDEV and IXSET instructions, set the device offset value to 0 in the program after replacement. Figure App.
APPENDICES 1 (a) Program before replacement The device offset values for input (X), output (Y), internal relay (M), data register (D), link register (W), and pointer (P) are set to the index modification table starting from D0. Figure App.4 Sample program 2 3 (b) Program after replacement APPENDIX 6 7 8 Figure App.5 Sample program App - 29 Appendix 3 Method of Replacing Basic Model QCPU or High Performance Model QCPU with Universal Model QCPU Appendix 3.
(3) Replacement example of the PR instruction The number of output characters can be switched by the on/off status of SM701. (a) Example of device assignment TableApp.
APPENDICES (c) Program after replacement 1 In the sequence program after replacement, three programs are required as shown below. 2 Main routine program Main routine program END Output strings and output string storage address are set. 3 FEND P1 Subroutine program Initial processing RET I31 IInterrupt program APPENDIX The strings stored in D0 are output. IRET END 6 Figure App.
2) Subroutine program • In the subroutine program, the data for outputting ASCII codes using a fixed scan interrupt program (10ms) are set to work devices. Also, the flag for activating the processing in the fixed scan interrupt program is turned on. • Specify the following arguments for the subroutine program. First argument Output string storage address (Input) Second argument Output module start Y number (Input) Data specified by the CALL(P) arguments are saved.
APPENDICES 3) Interrupt program 1 The following processing is added to a fixed scan interrupt program (10ms). The fixed scan interrupt program outputs ASCII codes from the output module and controls the strobe signal. 2 The following signals are all turned off when all strings are output. Yn0 to Yn7 (ASCII code) Yn8 (strobe signal) Yn9 (in-execution flag) 3 APPENDIX Status 0: One character is extracted from the output string using the MIDR instruction and output to the Y module.
(4) Replacement example of the CHKST and CHK instructions In the example below, if the replacement program for the CHKST and CHK instructions detects a failure, a failure number (contact number + coil number) is stored in D200 and the annunciator F200 is turned on. (a) Example of device assignment TableApp.
APPENDICES (c) Program after replacement In the sequence program after replacement, two programs are required as shown below. 2 Main routine program Main routine program END Initial processing 3 FEND P0 Subroutine program 1 An failure status is checked, and if a failure is detected, a failure number is stored in D200. RET END APPENDIX Figure App.
2) Subroutine program • In the subroutine program, an failure status is checked using a failure detection ladder pattern. • If a failure is detected, a failure number is stored in D200 and the annunciator F200 is turned on. • Specify the following arguments for the subroutine program.
APPENDICES 1 (5) Replacement example of the KEY instruction (a) Example of device assignment 2 TableApp.
(c) Program after replacement In the sequence program after replacement, two programs are required as shown below. Main routine program Main routine program END Initial processing FEND P2 Subroutine program ASCII code is added to the input data area. RET END Figure App.16 Program execution 1) Main routing program • Set "0" in the input data area on the rising edge of the execution instruction ("M0" in the program below) and initialize the program.
APPENDICES 2) Subroutine program • In the subroutine program, ASCII codes specified by an argument are added to the input data area and 1 the completion status is checked. • Specify the following arguments for the subroutine program.
Appendix 3.4 Functions Appendix 3.4.1 Floating-point operation instructions (1) Differences between High Performance model QCPU and Universal model QCPU (a) High Performance model QCPU The High Performance model QCPU can perform only the single-precision floating-point operation instructions. Note, however, that internal operation processing can be performed in double precision by selecting the item shown below (default: selected). Selected by default. Figure App.
APPENDICES 1 (2) Floating-point operation instructions for the Universal model QCPU TableApp.30 lists floating-point operation instructions for the Universal model QCPU. Specifications of the single-precision floating-point operation instructions are compatible with those for the High Performance model QCPU. 2 TableApp.
(3) Advantages and disadvantages when using the double-precision floating-point data of the Universal model QCPU TableApp.32 shows the advantages and disadvantages when executing the double-precision floating-point operation instructions in the Universal model QCPU. If higher accuracy is required in floating-point operations, it is recommended to replace the instructions with the double-precision floating-point operation instructions. TableApp.
APPENDICES (4) Replacing the High Performance model QCPU with the Universal model QCPU (a) Replacing all single-precision floating-point operation instructions with double-precision floating-point operation instructions 1 2 Single-precision floating-point data occupy two points of word device per data. On the other hand, four points are required per double-precision floating-point data. 3 Therefore, all device numbers for storing floating-point data need to be reassigned.
(b) Replacing a part of floating-point operation instructions with double-precision floating-point operation instructions Only operations that require high accuracy are replaced with double-precision floating-point operation instructions. Using the ECON and EDCON instructions, convert floating-point data mutually between single precision and double-precision.
APPENDICES 3) Program after replacement 1 Floating-point data are converted from single precision to double precision. Operation is performed using double-precision floating-point data. 2 3 The floating-point operation result data are converted from double precision to singe precision. Figure App.23 Sample program APPENDIX 6 7 8 Appendix 3 Method of Replacing Basic Model QCPU or High Performance Model QCPU with Universal Model QCPU Appendix 3.
(c) Replacing a part of floating-point operation instructions with double-precision floating-point operation instructions using subroutine programs The flow of a replacement program described in (b) can be regarded as one subroutine program. Create a subroutine program for each floating-point operation instruction and then replace the original floatingpoint operation instructions with the CALL(P) instruction so that the corresponding subroutine program is called.
APPENDICES 3) Program after replacement 1 2 3 A subroutine program for multiplication using the double-precision floating-point operation instruction APPENDIX 6 A subroutine program for addition using the double-precision floating-point operation instruction 7 8 Figure App.25 Sample program Appendix 3 Method of Replacing Basic Model QCPU or High Performance Model QCPU with Universal Model QCPU Appendix 3.
Appendix 3.4.2 Error check processing for floating-point data comparison instructions (1) Input data check Error check processing for floating-point data comparison instructions performed in the Universal model QCPU are enhanced. Input of a "special value" (-0, nonnumeric, unnormalized number, or ) is checked, and if those special values are input, the CPU module detects “OPERATION ERROR” (error code: 4140).
APPENDICES Example 2) Not detecting “OPERATION ERROR” (error code: 4140) in the ANDE instruction [Ladder mode] 1 2 [List mode] 3 In the ladder block starting from the step 104, the ANDE<= instruction of the step 105 is not executed when the M101 (valid data flag) is off. APPENDIX The ANDE<= instruction of the step 105 is not executed when the M101 is off in the LD instruction of the step 104 in the program above.
(2) Method of avoiding “OPERATION ERROR” (error code: 4140) in the floating-point data comparison instructions As shown in the modification examples below, connect the contacts of valid data flag in series for each floatingpoint data comparison instruction. (Use AND connection for connecting the contact of the valid data flag and the floating-point data comparison instruction.) Make sure that there is no line (OR connection) between the valid data flag and the floating-point data comparison instruction.
APPENDICES Program examples after modification for Example 1) and 3) in (1) are shown below. 1 Example 4) Program after modification for Example 1) ("OPERATION ERROR" (error code: 4140) is no longer detected.) [Ladder mode] 2 [List mode] 3 APPENDIX Example 5) Program after modification for Example 3) ("OPERATION ERROR" (error code: 4140) is no longer detected.
Appendix 3.4.3 Range check processing for index-modified devices (1) Device range check Error check processing at index modification of devices has been enhanced for the Universal model QCPU. Each index-modified device range is checked, and if the check target device is outside the device range before index modification, the CPU module detects "OPERATION ERROR" (error code: 4101).
APPENDICES 1 Example 2) Detecting "OPERATION ERROR" (error code: 4101) [Ladder mode] [List mode] 2 3 In Example 2, in the ladder block starting from the step 15, the AND<> instruction of the step 17 or 21 is supposed to be not executed when M0 (valid data flag) is off.
(2) Method of avoiding "OPERATION ERROR" (error code: 4101) When the index-modified device range does not need to be checked, use the method 1). When the index-modified device range needs to be checked, use the method 2). 1) Deselect the "Check device range at indexing" item in the PLC RAS tab of the PLC parameter dialog box so that the index-modified device range will not be checked.
APPENDICES Appendix 3.4.4 Device latch function 1 (1) Overview The device latch function*1 for the Universal model QCPU is more enhanced compared to that for the Basic model QCPU and High performance model QCPU. 2 This section describes the enhanced device latch function in the Universal model QCPU. 3 *1: The latch function is used to hold device data even when the CPU module is powered off or reset.
(c) Specifying the latch range of internal user devices Device data of the Universal model QCPU can be latched by specifying a latch range of internal user devices in the same way as for the Basic model QCPU and High Performance model QCPU. The ranges can be set in the Device tab of the PLC parameter dialog box.
APPENDICES Appendix 3.4.5 File usability setting 1 (1) Differences between High Performance model QCPU and Universal model QCPU 2 (a) High Performance model QCPU In the High Performance model QCPU, file usability ("Use PLC file setting" or "Not used") of the following files can be set for each program on the screen opened by clicking the "File usability setting" button on the Program tab of the PLC parameter dialog box.
(b) Universal model QCPU In the Universal model QCPU, file usability of the following files*1 cannot be set for each program on the screen opened by clicking the "File usability setting" button on the Program tab of the PLC parameter dialog box. • File register • Initial device value • Comment Figure App.28 File usability setting screen *1: Even file usability of local device file cannot be set if the serial number (first five digits) of the Q02UCPU, Q03UDCPU, Q04UDHCPU, or Q06UDHCPU is "10011" or earlier.
APPENDICES (2) Method of replacing High Performance model QCPU with Universal model QCPU 1 Replacement method varies depending on the settings in the PLC file tab of the PLC parameter dialog box. 2 TableApp.41 Replacement method Setting in the PLC file tab "Not used." is selected. Setting in Universal model QCPU No change in parameter settings is required. Operation of the Universal model QCPU is the same regardless of the file usability setting in the High Performance model QCPU.
Appendix 3.4.6 Parameter-valid drive and boot file setting (1) Differences between High Performance model QCPU and Universal model QCPU (a) High Performance model QCPU The parameter-valid drive is specified by the switches on the front panel of the High Performance model QCPU. (b) Universal model QCPU The Universal model QCPU automatically determines the parameter-valid drive, depending on the existence of parameters in the drive (program memory, memory card, or standard ROM).
APPENDICES 1 TableApp.
(b) When the parameter-valid drive is set to the memory card (RAM) or memory card (ROM) in the High Performance model QCPU TableApp.43 When the parameter-valid drive is set to the memory card (RAM) or memory card (ROM) Setting in High Performance model QCPU Setting in Universal model QCPU Setting in the Boot file tab of the PLC parameter dialog box Change the setting so that the Universal model QCPU can refer to the parameters in the memory card.
APPENDICES Appendix 3.4.7 External input/output forced on/off function 1 (1) Differences between High Performance model QCPU and Universal model QCPU 2 (a) High Performance model QCPU External input/output can be forcibly turned on/off on the screen opened by selecting [Online] [Debug] [Forced input output registration/cancellation] in GX Developer. 3 (b) Universal model QCPUNote1 The external input/output forced on/off function is not supported in the Universal model QCPU. NoteApp.
Example) Forcibly turning X40, X77, and X7A on, and X41 and Y7B off The programs, "SETX" and "SETY", turns on or off the X and Y devices, which have been registered for forced on/off using the external input/output forced on/off function, at each scan using the SET and RST instructions.
APPENDICES 1 (3) Replacing the COM instruction If the COM instruction is used, add subroutine calls for P10 and P11 before and after the COM instruction. (P10 and P11 are pointers shown in the program examples in (2).) When SM775 is on (Executes refresh set by SD778) and also the 0 bit of SD778 is off (Do not execute I/O refresh), replacement of 2 the instruction is not necessary.
(4) Replacing the RFS instruction If any I/O numbers targeted for forced on/off are included in the partial refresh range specified by the RFS instruction, add subroutine calls for P10 and P11 before and after the RFS instruction. (P10 and P11 are pointers shown in the program examples in (2).) If no I/O number targeted for forced on/off is included, addition of subroutine calls for P10 and P11 is not necessary.
APPENDICES Appendix 3.5 Special Relay and Special Register 1 The Universal model QCPU does not support the use of the special relay and special register described in Appendix 3.5.1 and Appendix 3.5.2. 2 Replace them using the method described in the table or delete the corresponding sections. Appendix 3.5.1 Special relay list 3 TableApp.41 lists the special relay not supported in the Universal model QCPU and measures to be taken. TableApp.
TableApp.45 Special relay not supported in the Universal model QCPU and measures (Continued) Number SM280 SM315 SM330 SM331 SM332 SM390 SM404 SM405 SM430 SM431 SM432 SM433 SM434 SM510 Name/Description CC-Link error Measures Replace the relay with the I/O signals (Xn0, Xn1, and XnF) of the mounted CC-Link module. Communication reserved time delay Set a service processing time value in the PLC system tab of the PLC parameter dia- enable/disable flag log box.
APPENDICES 1 TableApp.45 Special relay not supported in the Universal model QCPU and measures (Continued) Number SM1780*1 SM1781 *1 SM1782*1 SM1783*1 Name/Description Measures 2 Power supply off detection flag Power supply failure detection flag The Universal model QCPU does not store redundant power supply system Momentary power failure detection information in SM1780 to SM1783. Delete the corresponding sections. (SM1780 to flag for power supply 1 SM1783 are always off.
Appendix 3.5.2 Special register list TableApp.42 lists the special register not supported in the Universal model QCPU and measures to be taken TableApp.46 Special register not supported in the Universal model QCPU and measures Number SD80 Name/Description CHK number Measures The Universal model QCPU does not support the CHK instruction. For the replacing method of the CHK instruction, refer to Appendix 3.3.
APPENDICES 1 TableApp.46 Special register not supported in the Universal model QCPU and measures (Continued) Number Name/Description Measures Service interval measurement SD550 module SD551 Service interval time SD552 SD720 The Universal model QCPU does not support the PLAODP instruction. Delete the PLAODP instruction corresponding sections. SD1780 Power supply off detection status SD1781 *1 Power supply failure detection status SD1783 *1 2 function. Delete the corresponding sections.
Appendix 4 Device Point Assignment Sheet TableApp.
INDEX [A] Acknowledge XY assignment . . . . . . . . . . . . . . . 8-16 Annunciator (F) Processing after annunciator off . . . . . . . . . . . 9-14 Processing after annunciator on . . . . . . . . . . . 9-12 ASCII code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-43 Auto mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Auto refresh setting . . . . . . . . . . . . . . . . . . . . . . . . 7-2 [B] B (Link relay) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory card clear . . . . . . . . . . . . . . . . . . . . . 5-15 Function devices (FX, FY, FD) . . . . . . . . . . . . . . 9-35 Function list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 FX (Function input) . . . . . . . . . . . . . . . . . . . . . . . 9-35 FY (Function output) . . . . . . . . . . . . . . . . . . . . . . 9-36 [G] Global device . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-84 GOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Multiple CPU high speed transmission area setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-18 Multiple CPU settings . . . . . . . . . . . . . . . . . . . . . 8-17 Multiple CPU synchronous interrupt . . . . . . . . . . 9-76 [N] N (Nesting) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-70 Nesting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-70 Network No. specification device (J) . . . . . . . . . . 9-78 Network parameters . . . . . . . . . . . . .
Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-24 Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23 Timer limit setting . . . . . . . . . . . . . . . . . . . . . . . . . 8-3 Transferring data to the program memory . . . . . . 5-9 [U] U (I/O No. specification device) . . . . . . . . . . . . . 9-79 U3En\G (Cyclic transmission area device) . . . 9-45 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-36 Units of file sizes. . . . . . . . . . .
Warranty Please confirm the following product warranty details before using this product. 1. Gratis Warranty Term and Gratis Warranty Range If any faults or defects (hereinafter "Failure") found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term, the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company.
Microsoft, Windows, Windows NT, Windows Vista are registered trademarks of Microsoft Corporation in the United States and other countries. Pentium and Celeron are trademarks of Intel Corporation in the United States and other countries. Ethernet is a trademark of Xerox Co., Ltd. in the United States. CompactFlash is a trademark of SanDisk Corporation. VxWorks, Tornado, WindPower, WindSh and WindView are registered trademarks of Wind River Systems, Inc.