Q CPU User Manual Fuction and Programming130022
Q CPU User Manual Fuction and Programming130022
MELSEC System Q
User's Manual
(Functioning and Programming)
CPU Modules
Q CPU (Q Mode)
When using Mitsubishi equipment, thoroughly read this manual and the associated manuals introduced in
this manual. Also pay careful attention to safety and handle the module properly.
These SAFETY PRECAUTIONS classify the safety precautions into two categories: "DANGER" and
"CAUTION".
Note that the ! CAUTION level may lead to a serious consequence according to the circumstances.
Always follow the instructions of both levels because they are important to personal safety.
Please save this manual to make it accessible when required and always forward it to the end user.
[Design Precautions]
! DANGER
• Install a safety circuit external to the PLC that keeps the entire system safe even when there are
problems with the external power supply or the PLC module. Otherwise, trouble could result
from erroneous output or erroneous operation.
(1) Outside the PLC, construct mechanical damage preventing interlock circuits such as
emergency stop, protective circuits, positioning upper and lower limits switches and
interlocking forward/reverse operations.
(2) When the PLC detects the following problems, it will stop calculation and turn off all output in
the case of (a). In the case of (b), it will stop calculation and hold or turn off all output
according to the parameter setting.
(a) The power supply module has over current protection equipment and over voltage
protection equipment.
(b) The PLC CPUs self-diagnosis functions, such as the Watch dog timer error, detect
problems.
In addition, all output will be turned on when there are problems that the PLC CPU cannot
detect, such as in the I/O controller. Build a fail safe circuit exterior to the PLC that will make
sure the equipment operates safely at such times. Refer to " LOADING AND
INSTALLATION" in High Performance model QCPU (Q Mode) User's Manual (Hardware
Design, Maintenance and Inspection) for example fail safe circuits.
(3) Output could be left on or off when there is trouble in the output module relay or transistor.
So build an external monitoring circuit that will monitor any single outputs that could cause
serious trouble.
A-1 A-1
[Design Precautions]
! DANGER
• When overcurrent which exceeds the rating or caused by short-circuited load flows in the output
module for a long time, it may cause smoke or fire. To prevent this, configure an external safety
circuit, such as fuse.
• Build a circuit that turns on the external power supply when the PLC main module power is
turned on. If the external power supply is turned on first, it could result in erroneous output or
erroneous operation.
• When there are communication problems with the data link, refer to the corresponding data link
manual for the operating status of each station.
Not doing so could result in erroneous output or erroneous operation.
• When connecting a peripheral device to the CPU module or connecting a personal computer or
the like to the intelligent function module to exercise control (data change) on the running PLC,
configure up an interlock circuit in the sequence program to ensure that the whole system will
always operate safely.
Also before exercising other control (program change, operating status change (status control))
on the running PLC, read the manual carefully and fully confirm safety.
Especially for the above control on the remote PLC from an external device, an immediate
action may not be taken for PLC trouble due to a data communication fault.
In addition to configuring up the interlock circuit in the sequence program, corrective and other
actions to be taken as a system for the occurrence of a data communication fault should be
predetermined between the external device and PLC CPU.
! CAUTION
• Do not bunch the control wires or communication cables with the main circuit or power wires, or
install them close to each other. They should be installed 100 mm (3.94 inch) or more from each
other.
Not doing so could result in noise that would cause erroneous operation.
• When controlling items like lamp load, heater or solenoid valve using an output module, large
current (approximately ten times greater than that present in normal circumstances) may flow
when the output is turned OFF to ON.
Take measures such as replacing the module with one having sufficient rated current.
A-2 A-2
[Installation Precautions]
! CAUTION
• Use the PLC in an environment that meets the general specifications contained in High
Performance model QCPU (Q Mode) User's Manual (Hardware Design, Maintenance and
Inspection). Using this PLC in an environment outside the range of the general specifications
could result in electric shock, fire, erroneous operation, and damage to or deterioration of the
product.
• Hold down the module loading lever at the module bottom, and securely insert the module fixing
latch into the fixing hole in the base unit. Incorrect loading of the module can cause a
malfunction, failure or drop.
When using the PLC in the environment of much vibration, tighten the module with a screw.
Tighten the screw in the specified torque range.
Undertightening can cause a drop, short circuit or malfunction.
Overtightening can cause a drop, short circuit or malfunction due to damage to the screw or
module.
• When installing more cables, be sure that the base unit and the module connectors are installed
correctly.
After installation, check them for looseness.
Poor connections could cause an input or output failure.
• Securely load the memory card into the memory card loading connector.
After installation, check for lifting.
Poor connections could cause an operation fault.
• Completely turn off the external power supply before loading or unloading the module.
Not doing so could result in electric shock or damage to the product.
[Wiring Precautions]
! DANGER
• Completely turn off the external power supply when installing or placing wiring.
Not completely turning off all power could result in electric shock or damage to the product.
• When turning on the power supply or operating the module after installation or wiring work, be
sure that the module's terminal covers are correctly attached.
Not attaching the terminal cover could result in electric shock.
A-3 A-3
[Wiring Precautions]
! CAUTION
• Be sure to ground the FG terminals and LG terminals to the protective ground conductor. Not
doing so could result in electric shock or erroneous operation.
• When wiring in the PLC, be sure that it is done correctly by checking the product's rated voltage
and the terminal layout.
Connecting a power supply that is different from the rating or incorrectly wiring the product could
result in fire or damage.
• External connections shall be crimped or pressure welded with the specified tools, or correctly
soldered.
Imperfect connections could result in short circuit, fires, or erroneous operation.
• Be sure there are no foreign substances such as sawdust or wiring debris inside the module.
Such debris could cause fires, damage, or erroneous operation.
• The module has an ingress prevention label on its top to prevent foreign matter, such as wire
offcuts, from entering the module during wiring.
Do not peel this label during wiring.
Before starting system operation, be sure to peel this label because of heat dissipation.
• Correctly connect the battery. Also, do not charge, disassemble, heat, place in fire, short circuit,
or solder the battery.
Mishandling of battery can cause overheating or cracks which could result in injury and fires.
• Switch all phases of the external power supply off when cleaning the module or retightening the
terminal or module mounting screws. Not doing so could result in electric shock.
Undertightening of terminal screws can cause a short circuit or malfunction.
Overtightening of screws can cause damages to the screws and/or the module, resulting in
fallout, short circuits, or malfunction.
A-4 A-4
[Startup and Maintenance precautions]
! CAUTION
• The online operations conducted for the CPU module being operated, connecting the peripheral
device (especially, when changing data or operation status), shall be conducted after the
manual has been carefully read and a sufficient check of safety has been conducted.
Operation mistakes could cause damage or problems with of the module.
• Use a cellular phone or PHS more than 25cm (9.85 inch) away from the PLC.
Not doing so can cause a malfunction.
• Switch all phases of the external power supply off before mounting or removing the module.
If you do not switch off the external power supply, it will cause failure or malfunction of the
module.
• Before touching the module, always touch grounded metal, etc. to discharge static electricity
from human body, etc.
Not doing so can cause the module to fail or malfunction.
[Disposal Precautions]
! CAUTION
• When disposing of this product, treat it as industrial waste.
[Transportation Precautions]
! CAUTION
• When transporting lithium batteries, make sure to treat them based on the transport regulations.
(Refer to Appendix 5 for details of the controlled models.)
A-5 A-5
REVISIONS
The manual number is given on the bottom left of the back cover.
Print Date * Manual Number Revision
Dec., 1999 SH (NA)-080038-A First edition
Dec., 2000 SH (NA)-080038-B Add the Q33B type main base unit and Q63B type extension base unit.
Change Chapter 11 (1) to (3) to Section 11.1 to 11.3.
Unify the name from the software package (GPP function, ladder logic test
tool function, GPPW, etc) to the product name (GX Developer, GX
Configurator).
Add the explanation of the following functions of which serial number's upper
five digits were added in 02092 (02092 -A)
• Automatic write to standard ROM
• Forced ON/OFF correspondence for external I/O
• Remote password setting
• Increment of Q12HCPU and Q25HCPU standard RAM capacity
• MELSECNET/H remote I/O network correspondence
• Interrupt module (QI60) correspondence
Correction
Section 1.1, Section 2.1, 2.2, Chapter 3, Section 4.2, 4.2.1, 4.2.2, 4.2.3, 4.6,
Section 5.2, 5.3, Section 6.1, 6.9.3, Section 7.3 (3) (4), 7.6.5, 7.8, 7.14, 7.18,
7.19.1, 7.20.1, Chapter 9, Section 10.2, 10.10, Section 11.3, Appendix 1,2
Addition
Section 2.3, Section 4.1.3, 4.2.5, Section 5.4, 5.5.2, 5.6.2, Section 6.6, 6.6.2,
6.7, Section 7.6.3, 7.7.2, 7.7.3, 7.9.1, 7.9.3, 7.16, 7.17, 7.17.2, 7.20.1,
Section 10.10
Jun., 2001 SH (NA)-080038-C The explanation of the multiple PLC system added to the function version B
of the QCPU was added to Chapters 13 to 19.
General name for QCPU was changed to the High Performance model
QCPU.
The Q52B and Q55B extension base units and PC CPU module were added.
Overall correction
Apr., 2002 SH (NA)-080038-D Addition of the high speed interrupt function (Section 7.20) added to the serial
No. whose upper 5 digits are 04012 (04012 ) and the
description of the Q2MEM-2MBS SRAM card
Overall correction
A-6 A-6
Print Date * Manual Number Revision
Jul., 2003 SH (NA)-080038-F
Correction
SAFETY PRECAUTIONS, Section 2.1, Section 6.2, 6.7, Section 10.2.11,
Section 13.1, 13.3, Section 14.1, Chapters 16, Section 16.3.2, Appendix 2
Addition
Appendix 5, 5.1, 5.2
This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent
licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property
rights which may occur as a result of using the contents noted in this manual.
1999 MITSUBISHI ELECTRIC CORPORATION
A-7 A-7
INTRODUCTION
Thank you for choosing the Mitsubishi MELSEC-Q Series of General Purpose Programmable Controllers.
Please read this manual carefully so that equipment is used to its optimum.
CONTENTS
SAFETY INSTRUCTIONS ...........................................................................................................................................A- 1
REVISIONS ....................................................................................................................................................................A- 6
CONTENTS....................................................................................................................................................................A- 8
Manuals...........................................................................................................................................................................A-19
How to Use This Manual ...............................................................................................................................................A-20
Generic Terms and Abbreviations................................................................................................................................A-21
1 OVERVIEW 1 – 1 to 1 - 11
1.1 Features..................................................................................................................................................................... 1- 2
1.2 Programs ................................................................................................................................................................... 1- 5
1.3 Convenient Programming Devices and Instructions ............................................................................................ 1- 8
3 PERFORMANCE SPECIFICATION 3- 1 to 3- 3
A-8 A-8
4.6 Data Clear Processing ............................................................................................................................................4-39
4.7 I/O Processing and Response Lag........................................................................................................................4-40
4.7.1 Refresh mode.................................................................................................................................... 4-40
4.7.2 Direct mode ....................................................................................................................................... 4-43
4.8 Numeric Values which Can Be Used in Sequence Programs ...........................................................................4-45
4.8.1 BIN (Binary code) .............................................................................................................................. 4-47
4.8.2 HEX (Hexadecimal)........................................................................................................................... 4-48
4.8.3 BCD (Binary Coded Decimal) ........................................................................................................... 4-49
4.8.4 Real numbers (floating decimal point data)...................................................................................... 4-50
4.9 Character String Data..............................................................................................................................................4-53
5.1 Relationship Between the Number of Stages and Slots of the Extension Base Unit ...................................... 5- 1
5.2 Installing Extension Base Units and Setting the Number of Stages .................................................................. 5- 2
5.3 Base Unit Assignment (Base Mode) .................................................................................................................... 5- 3
5.4 What are I/O Numbers?.......................................................................................................................................... 5- 7
5.5 Concept of I/O Number Assignment...................................................................................................................... 5- 8
5.5.1 I/O numbers of main base unit, Slim type base unit and extension base unit ................................ 5- 8
5.5.2 Remote station I/O number............................................................................................................... 5-10
5.6 I/O Assignment by GX Developer..........................................................................................................................5-11
5.6.1 Purpose of I/O assignment by GX Developer .................................................................................. 5-11
5.6.2 Concept of I/O assignment using GX Developer ............................................................................. 5-13
5.7 Examples of I/O Number Assignment...................................................................................................................5-16
5.8 Checking the I/O Numbers .....................................................................................................................................5-19
7 FUNCTION 7- 1 to 7-94
A - 10 A - 10
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL FUNCTION MODULE
8- 1 to 8- 9
8.1 Communication Between High Performance model QCPU and Q-series Intelligent Function Modules...... 8- 1
8.1.1 Initial setting and automatic refresh setting using GX Configurator ................................................ 8- 2
8.1.2 Communication using device initial value......................................................................................... 8- 3
8.1.3 Communication using FROM/TO instruction ................................................................................... 8- 4
8.1.4 Communication using the intelligent function module device.......................................................... 8- 4
8.1.5 Communication using the instructions dedicated for intelligent function modules.......................... 8- 5
8.2 Request from Intelligent Function Module to High Performance model QCPU ............................................... 8- 6
8.2.1 Interrupt from the intelligent function module ................................................................................... 8- 6
8.3 Communication Between High Performance model QCPU and AnS Series Special Function Modules..... 8- 7
8.3.1 Communication using device initial value......................................................................................... 8- 7
8.3.2 Communication using FROM/TO instruction ................................................................................... 8- 8
8.3.3 Communication using the intelligent function module device.......................................................... 8- 8
8.3.4 Effects of quicker access to the special function module and countermeasures against them ..... 8- 9
A - 11 A - 11
10.6 Index Registers (Z) ..............................................................................................................................................10-40
10.6.1 Switching between scan execution type programs and low speed execution type programs ... 10-41
10.6.2 Switching between scan/low speed execution type programs and interrupt/
fixed scan execution type programs ............................................................................................ 10-42
10.7 File Registers (R).................................................................................................................................................10-44
10.7.1 File register capacity ..................................................................................................................... 10-45
10.7.2 Differences in memory card access method by memory card type ............................................ 10-45
10.7.3 Registering the file registers ......................................................................................................... 10-46
10.7.4 File register designation method .................................................................................................. 10-50
10.7.5 Precautions in using file registers ................................................................................................. 10-51
10.8 Nesting (N) ...........................................................................................................................................................10-53
10.9 Pointers (P)...........................................................................................................................................................10-54
10.9.1 Local pointers ................................................................................................................................ 10-54
10.9.2 Common pointers.......................................................................................................................... 10-55
10.10 Interrupt Pointers (I)...........................................................................................................................................10-57
10.11 Other Devices ....................................................................................................................................................10-59
10.11.1 SFC block device (BL) ................................................................................................................ 10-59
10.11.2 SFC transition device (TR) ......................................................................................................... 10-59
10.11.3 Network No. designation device (J)............................................................................................ 10-59
10.11.4 I/O No. designation device (U).................................................................................................... 10-60
10.11.5 Macro instruction argument device (VD).................................................................................... 10-61
10.12 Constants ...........................................................................................................................................................10-62
10.12.1 Decimal constants (K)................................................................................................................. 10-62
10.12.2 Hexadecimal constants (H)......................................................................................................... 10-62
10.12.3 Real numbers (E) ........................................................................................................................ 10-63
10.12.4 Character string ( " " )................................................................................................................ 10-63
10.13 Convenient Uses for Devices...........................................................................................................................10-64
10.13.1 Global devices and local devices ............................................................................................... 10-64
10.13.2 Device initial values..................................................................................................................... 10-70
12 PROCEDURE FOR WRITING PROGRAMS TO HIGH PERFORMANCE MODEL QCPU 12- 1 to-12- 8
A - 12 A - 12
13 OUTLINE OF MULTIPLE CPU SYSTEM 13- 1 to 13- 6
13.1 Features...............................................................................................................................................................13- 1
13.2 Outline of Multiple CPU System .......................................................................................................................13- 3
13.3 Differences with Single CPU System ..............................................................................................................13- 5
A - 13 A - 13
18 PROCESSING TIME FOR MULTIPLE CPU SYSTEM HIGH PERFORMANCE MODEL
QCPUs 18- 1 to 18- 3
A - 14 A - 14
(Related manual)..................................................................High Performance Model QCPU (Q Mode) User's Manual
(Hardware Design, Maintenance and Inspection)
CONTENTS
1. OVERVIEW
1.1 Features
3. GENERAL SPECIFICATIONS
5.1 Specification
5.1.1 Power supply module specifications
5.1.2 Selecting the power supply module
5.1.3 Precaution when connecting the uninterruptive power supply
5.2 Names of Parts and Settings
A - 15 A - 15
7. MEMORY CARD AND BATTERY
APPENDICES
A - 17 A - 17
APPENDIX 4 Transportation Precautions
APPENDIX 4.1 Controlled models
APPENDIX 4.2 Transport guidelines
INDEX
A - 18 A - 18
Manuals
Related Manuals
Manual Number
Manual Name
(Model Code)
High Performance Model QCPU (Q Mode) User's Manual (Hardware Design, Maintenance
and Inspection) SH-080037
This manual provides the specifications of the CPU modules, power supply modules, base units, (13JL97)
extension cables, memory cards and others. (Sold separately)
A - 19 A - 19
How to Use This Manual
This manual is prepared for users to understand memory map, functions, programs and devices of the CPU
module when you use MELSEC-Q Series PLCs.
(5) Chapters 9 and 10 Describe parameters and devices used in the CPU
modules.
REMARK
This manual does not explain the functions of power supply modules, base units,
extension cables, memory cards and batteries of CPU module.
For these functions, refer to the manual shown below.
• High Performance Model QCPU (Q Mode) User's Manual (Hardware Design,
Maintenance and Inspection)
A - 20 A - 20
Generic Terms and Abbreviations
The following abbreviations and general names for Q02CPU, Q02HCPU, Q06HCPU Q12HCPU, and
Q25HCPU are used in the manual.
A - 21 A - 21
Generic Term/Abbreviation Description
I/O or intelligent function module controlled by the control CPU. For example, when
Controlled module the module mounted on slot 3 is controlled by the CPU No. 2, the module on slot 3 is
the controlled module of the CPU No. 2.
Numbers assigned to differentiate between the High Performance model QCPU and
motion CPU mounted in a multi CPU system. The CPU on the CPU slot is the CPU
CPU numbers
No. 1, the one on slot 0 is the CPU No. 2, the one on slot 1 is the CPU No. 3, and the
one on slot 2 is the CPU No. 4.
System mounted with the High Performance model QCPU on the CPU slot to exercise
Single CPU system
control.
PC CPU module MELSEC-Q Series corresponding PC CPU module
High Performance model QCPUs and/or Motion CPUs other than the control CPU.
Non-control CPUs For example, when the module mounted on slot 3 is controlled by the CPU No. 2, the
CPU Nos. 1, 3 and 4 are the non-control CPU of the module on slot 3.
System mounted with up to four High Performance model QCPU, Motion CPU and PC
Multiple CPU system
CPU module on the main base unit to exercise control.
A - 22 A - 22
MEMO
A - 23 A - 23
1 OVERVIEW
MELSEC-Q
1. OVERVIEW
1 This manual describes the functions, programs and devices of the High Performance
model QCPU.
Refer to the following manual for the specifications, etc. of the power supply modules,
base units, extension cables, memory cards and battery.
High Performance Model QCPU (Q Mode) User's Manual (Hardware Design,
Maintenance and Inspection)
Functions are added when the High Performance model QCPU is updated.
The added functions can be discriminated by the function version/serial number of the
CPU module.
Table 1.1 gives the added functions and the corresponding GX Developer versions.
When using the added function, confirm the function version/serial number and the GX
Developer version.
Table 1.1 List of Functions Added to High Performance Model QCPU and Function
Versions/Serial Numbers
Update Details of High Performance Model QCPU
Corresponding
Function
Serial No. Added functions GX Developer
version
• Automatic write to standard ROM
• Enforced ON/OFF for external I/O
• Remote password setting
• Increased standard RAM capacity of
A "02092" or later Version 6 or later
Q12HCPU, Q25HCPU
• Compatibility with MELSECNET/H remote
I/O network
• Interrupt module (QI60) compatibility
— • Compatibility with the multiple PLC system Version 6 or later
• Installation of PC CPU module into the
"03051" or later multiple PLC system
Version 7 or later
• High speed interrupt function
• Compatibility with index modification for
module designation of dedicated instruction
• Selection of refresh item for COM
Version 7.10L
"04012" or later instruction
or later
• Extended life battery of SRAM card
B • Compatibility with 2Mbyte SRAM card
• Increased standard RAM capacity of
Q02HCPU, Q06HCPU
• SFC program online batch change
"04122" or later • File memory capacity change
Version 8 or later
• CC-Link remote network additional mode
• Incomplete derivative PID operation
Version 8.03D or
"05032" or later function
later
• Floating-point comparison instruction
speedup
POINT
(1) Refer to Section 2.3 for the serial No. and function version of the High
Performance model QCPU.
(2) Refer to Appendix 4 for details.
1-1 1-1
1 OVERVIEW
MELSEC-Q
1.1 Features
Q25HCPU(USB) 12
Q25HCPU(RS-232) 30
Q2ASHCPU 86
A2USHCPU-S1 94
0 10 20 30 40 50 60 70 80 90 100 (Unit:s)
(5) AnS series I/O module or special function module are available.
For Q series, if an appropriate module is not available, the AnS series I/O
module or special function module can also be used for the High Performance
model QCPU through the use of the QA1S65B/QA1S68B extension base unit.
1-2 1-2
1 OVERVIEW
MELSEC-Q
98mm
(3.86
inch) PULL
REMARK
• The number of file registers that can be handled changes depending on the
function version/serial number of the CPU module used.
CPU Module Type Number of File Registers
Q02CPU 32k points
Q02HCPU First 5 digits of serial number are "04011" or earlier 32k points
Q06HCPU First 5 digits of serial number are "04012" or later 64k points
Q12HCPU First 5 digits of serial number are "02091" or earlier 32k points
Q25HCPU First 5 digits of serial number are "02092" or later 128k points
Refer to Section 2.3 to confirm the function version and serial number of the High
Performance model QCPU.
1-3 1-3
1 OVERVIEW
MELSEC-Q
REMARK
1) Features (9) to (12) are functions added to the High Performance model QCPU
whose serial number is "02092" or later in its upper 5 digits.
2) The remote password facility can be executed when the Ethernet module or
serial communication module of function version B and GX Developer Version 6
or later are used.
3) In addition to the remote password, there are the following protection facilities for
the High Performance model QCPU.
Protection of the whole CPU module by making system settings of the High
Performance model QCPU
Protection of the memory card by setting the write protect switch of the memory
card
File-by-file protection using password
4) The MELSECNET/H remote I/O network facility can be executed when the
MELSECNET/H network module of function version B and GX Developer
(Version 6 or later) are used.
5) The feature in (13) is the function added to the High Performance model QCPU
whose first five digits of serial No. are "03051" or later.
1-4 1-4
1 OVERVIEW
MELSEC-Q
1.2 Programs
Program Memory
card
Standard ROM 1 RAM
Parameter Parameter
Program Program
File register File register
(only read process
is enabled) ROM
Parameter
Standard RAM 2
Program
File register
File register
When Flash card
is used, only read
process is enabled
1: The standard ROM is used when parameters and programs are written
to ROM.
2: The standard RAM is used when access to the file register need to
speed up.
Program
1-5 1-5
1 OVERVIEW
MELSEC-Q
Programs stored in the standard ROM/memory card are executed after they
are booted to (read to) the QCPU program memory. (Programs to be booted
to the QCPU are designated on the “(PLC) Parameter" dialog box, and the
parameter drive is designated by a DIP switch setting at the QCPU.)
High Performance model QCPU
Program memory
Execution of program booted
Parameter from the standard ROM or memory
card to the program memory.
Program
Boot
Memory card Standard ROM
Parameter Parameter
Program Program
Therefore, the program creation can be split among several designers so that
they control and manage the programs by process or function.
Only the relevant programs should be modified or debugged when the
specifications are changed.
Designer A Program A
Programs A to C
Designer B Program B are executed in
sequence. 1
Designer C Program C
REMARK
1: See Section 4.2 for details on the execution sequence.
1-6 1-6
1 OVERVIEW
MELSEC-Q
Ship in Program A
REMARK
1: Programs split by process can be further split by function.
2: See Section 4.2 for details on the execution sequence and execution conditions.
1-7 1-7
1 OVERVIEW
MELSEC-Q
The QCPU features devices and instructions which facilitate program creation. Some
of them are described below.
Switches b10 M5
of D0 ON and M10
The 1/0 status OFF (1/0).
of b5 of D0 is used
as ON/OFF data.
MOV K4M0 D0
: D0.5
b15 b14 b13 b12 b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 Bit designation
D0 1/0 1/0 Word device designation
Y100 M0 X1
Y100
ON at leading Y100
edge of X0
1-8 1-8
1 OVERVIEW
MELSEC-Q
(d) The buffer memory of intelligent function module (e.g. Q64AD, Q62DA) can
be used in the same way as devices when programming.
[In the case of High Performance model QCPU] [In the case of AnS]
X0 X0
+P U4\G12 D0 FROMP H4 K12 D10 K1
Readout of Q64AD
buffer memory's
+P D10 D0
address 12 data
Power supply module
:U4\G12
Q64AD (16 points)
Q64AD (16 points)
Q62AD (16 points)
Output (16 points)
Output (16 points)
Input (16 points)
Input (16 points)
Input (16 points)
Intelligent function
module designation
POINT
By making the automatic refresh setting of the used intelligent function module
using GX Configurator, the corresponding data can be read/written from/to the
device memory of the CPU module without access being made directly to the buffer
memory.
(e) Direct access to link devices (LX, LY, LB, LW, SB, SW) of MELSECNET/H
network modules (e.g. QJ71LP21-25) is allowed without refresh settings.
X0
+P J5\W12 D0
:J5\W12
QJ71LP21-25
Network No.5
1-9 1-9
1 OVERVIEW
MELSEC-Q
X0Z1 V0Z1
M0Z1 Pulsing M0 to M999
M1000
INC Z1 Increment Index Register (Z1) (+1)
[Timing chart]
ON
X0 OFF
ON
When Z1=0 V0 OFF
ON
M0 OFF
1 Scan
ON
X1 OFF
ON
When Z1=1 V1 OFF
ON
M1 OFF
1 Scan
REMARK
: NUL indicates "00H (character string END)".
1 - 10 1 - 10
1 OVERVIEW
MELSEC-Q
Program B
RET
M10 P1000 call
0 CALLP P1000
(b) The use of sub-routine call instructions with arguments simplifies the
creation of sub-routine programs which are called several times.
Sub-routine program
Argument designation Destination data
P0 call source data
M0 SM400 M0
0 CALLP P0 W0 K4X0 R0 P0 MOV FD0 FD2
Always
Argument from FD2
ON
Argument to FD1 M0
Argument to FD0 MOV FD1 FD2
Subroutine program
designation
Argument designation RET
M10 P0 call
100 CALLP P0 W10 K4X10 R10
REMARK
: For details on the argument I/O condition, see Section 10.3.1.
1 - 11 1 - 11
2 SYSTEM CONFIGURATION FOR SINGLE CPU SYSTEM
MELSEC-Q
MITSUBISHI
MITSUBISHI
LITHIUM BATTERY
MITSUBISHI
LITHIUM BATTERY
Battery
Battery holder
(Q7BAT)
Q7BAT-SET
POINTS
1: The number of memory cards to be installed is one sheet.
The memory card must be selected from SRAM, Flash, and ATA according to the
application and capacity.
With commercial memory cards, the Operation is not assured.
2: QA1S65B and QA1S68B extension base units are used for the power supply module, I/O
module, and special function module of the AnS series.
3: The Q series power supply module is not required for the Q5 B type extension base unit.
4: As a power supply module, use the Q61P-A1, Q61P-A2, Q62P or Q64P.
The slim type power supply module (Q61SP) cannot be used.
2-1 2-1
2 SYSTEM CONFIGURATION FOR SINGLE CPU SYSTEM
MELSEC-Q
(b) When slim type main base unit (Q3 SB) is used
MITSUBISHI
MITSUBISHI
LITHIUM BATTERY
Memory card *1
High Performance model QCPU
(Q2MEM-1MBS,Q2MEM-2MBS, Battery
(Q02CPU,Q02HCPU,Q06HCPU,
Q2MEM-2MBF,Q2MEM-4MBF, (Q6BAT)
2 Q2MEM-8MBA,Q2MEM-16MBA,
Q12HCPU,Q25HCPU)
Q2MEM-32MBA)
MITSUBISHI
LITHIUM BATTERY
Battery
Battery holder
(Q7BAT)
Q7BAT-SET
POINTS
1: One memory card is installed.
Select the memory card from the SRAM card, Flash card and ATA card according to the
application and capacity.
When the memory card available on the market is used, operation is not guaranteed.
2: The slim type main base unit does not have an extension cable connector. The extension
base or GOT cannot be connected.
3: As a power supply module, use the slim type power supply module (Q61SP).
The Q61P-A1, Q61P-A2, Q62P or Q64P cannot be used as a power supply module.
2-2 2-2
2 SYSTEM CONFIGURATION FOR SINGLE CPU SYSTEM
MELSEC-Q
MITSUBISHI
RS-232 cable
(QC30R2)
Personal Computer
PC card adapter GX Developer Version 4 or later
(Q2MEM-ADP) (SW4D5C-GPPW-E)
1: For writing into memory card on GX Developer, and USB cable, refer to the
operating manual of the GX Developer.
2-3 2-3
2 SYSTEM CONFIGURATION FOR SINGLE CPU SYSTEM
MELSEC-Q
Invalid
Invalid
O O
IU IU
NT NT
51F 53F 55F 57F 59F 7BF 7DF 7FF
Maximum number of
Seven Extension Stages
Extension Stages
Maximum number of
I/O modules to be 64 modules
installed
Maximum number of
4096
occupied I/O points
Main base unit Q33B, Q35B, Q38B, Q312B
Extension base unit Q52B, Q55B, Q63B, Q65B, Q68B, Q612B, QA1S65B, QA1S68B
Extension cable QC05B, QC06B, QC12B, QC30B, QC50B, QC100B
(1) Extension bases unit of up to seven stages can be used.
(2) Do not use extension cable longer than an overall extension length of 13.2m(43.31ft.).
(3) When using an extension cable, do not bind it together with the main circuit (high voltage and heavy current)
line or do not lay down them closely to each other.
(4) When setting the No. of the expansion stages, set it in the ascending order so that the same No. is not set
simultaneously by two extension base units.
(5) When Q5 B, Q6 B and QA1S6 B types of extension base units are mixed, first connect the Q5 B,
Q6 B type and then connect the QA1S6 B type.
When setting the No. of the extension stages, set it from Q5 B/Q6 B in order.
Notes Although there are no particular restrictions in the order of the installation of the Q5 B and Q6 B, refer to
Section 6.6 for usability.
(6) Connect the extension cable from OUT of the extension cable connector of the base unit to IN of the
extension base unit on the next stage.
(7) If 65 or more modules are installed, an error will occur.
(8) When bus-connected, the GOT occupies one extension stage and one slot.
(9) The High Performance model QCPU processes the GOT as a 16-point intelligent function module. Hence,
connection of one GOT decreases the number of controllable points on base unit by 16 points.
(10) As a power supply module, the Q61SP cannot be used.
Use the Q61P-A1, Q61P-A2, Q62P or Q64P as a power supply module.
2-4 2-4
2 SYSTEM CONFIGURATION FOR SINGLE CPU SYSTEM
MELSEC-Q
(b) When slim type main base unit (Q3 SB) is used
Slim type main base unit (Q35SB)
0 1 2 3 4 Slot No.
Power supply
00 20 40 60 80
CPU module
module
System configuration
1F 3F 5F 7F 9F
2-5 2-5
2 SYSTEM CONFIGURATION FOR SINGLE CPU SYSTEM
MELSEC-Q
This section describes hardware and software packages compatible with QCPU.
(1) Hardware
(a) The number of modules to be installed and functions are limited depending on
the type of the modules.
Limit of number of modules
Applicable Module Type
to be installed
• QJ71LP21
• QJ71BR11
Q Series MELSECNET/10H
• QJ71LP21-25 Up to 4 units
network module
• QJ71LP21G
• QJ71LP21GE
• QJ71E71
Q series Ethernet interface
• QJ71E71-B2 Up to 4 units
module
• QJ71E71-100
Q series CC-Link system • QJ61BT11
No limit
master local module • QJ61BT11N
No limit
MELSECNET/MINI-S3 data • A1SJ71PT32-S3
(setting of automatic refresh
link module • A1SJ71T32-S3
function not allowed)
• A1SD51S
AnS series special function • A1SD21-S1
Total of 6 units
module shown on the right • A1SJ71J92-S3
(When GET/PUT service is used)
• A1SI61
Interrupt module One unit only
• QI60
: A maximum of 4 modules if the network parameters for CC-Link are set and
controlled by the GX Developer. There is no restriction in the number of modules
when the parameters are set by the special-purpose instructions for the CC-Link.
For details on the CC-Link System Master Local Unit that can set parameters with
the special-purpose instructions, refer to the user's manual for the CC-Link Master
Local module.
(b) When the AnS series special-function modules shown below are used, a
limitation is given to an accessible device range.
• A1SJ71J92-S3 type JEMANET interface module
• A1SD51S type intelligent communication
(c) A graphic operation terminal can be used only for the GOT900 series (Basic
OS matching Q mode and communication driver must be installed).
The GOT800 series, A77GOT, and A64GOT cannot be used.
2-6 2-6
2 SYSTEM CONFIGURATION FOR SINGLE CPU SYSTEM
MELSEC-Q
(e) A dedicated instruction for the next module which was present in the QnA/A
series program instruction cannot be used for the High Performance model
QCPU. Re-writing using FROM/TO instruction is required.
Module Name Type
High speed counter module A1SD61, A1SD62, A1SD62D(-S1), A1SD62E
MELSECNET/MINI-S3 A1SJ71PT32-S3, A1SJ71T32-S3
Positioning module A1SD75P1-S3(P2-S3/P3-S3)
ID module A1SJ71ID1-R4, A1SJ71ID2-R4
(f) Some system configurations and functions are restricted when writing the
parameter of the "High speed interrupt fixed scan interval" setting.
Refer to the following manual for the restrictions when the parameter of the
"High speed interrupt fixed scan interval" setting has been written.
• High Performance model QCPU (Q mode) User's Manual
(Function Explanation, Program Fundamentals)
Note that the above restrictions do not apply to the High Performance model
QCPU of serial number "04011" or earlier since it ignores the "High speed
interrupt fixed scan interval" setting.
POINT
(1) Refer to Section 2.3 for the serial No. and function version of the High
Performance model QCPU.
(2) Refer to Appendix 4 for details.
2-7 2-7
2 SYSTEM CONFIGURATION FOR SINGLE CPU SYSTEM
MELSEC-Q
The CPU module serial No. can be confirmed on the rated plate and GX Developer's
system monitor.
(1) Confirming the serial No. on the rated plate
Function version
(2) Confirming the serial No. on the system monitor (list of product
information)
The CPU module serial No. and function version can be confirmed with the list of
product information on the GX Developer (Version 6 or later) system monitor.
Serial Nos. and function versions of the intelligent function module and CPU
module can also be confirmed.
2-8 2-8
3 PERFORMANCE SPECIFICATION
MELSEC-Q
3. Performance Specification
The table below shows the performance specifications of the CPU module.
Performance Specifications
Model
Item Remark
Q02CPU Q02HCPU Q06HCPU Q12HCPU Q25HCPU
Control method Repetitive operation of stored program
Direct I/O is possible by
I/O control mode Refresh mode direct I/O specification
(DX , DY )
Relay symbol language, logic symbolic language,
Programming language
MELSAP3 (SFC), MELSAP-L, Function block,
(Sequence control dedicated language)
structured text (ST) 3
Processing speed LD X0 0.079 s 0.034 s
(Sequence instruction) MOV D0 D1 0.237 s 0.102 s
381
Total number of instructions
(excluding intelligent function module dedicated instructions)
Constant scan (ms)
Set parameter values to
(Function for setting the scan timer to fixed 0.5 to 2000 (configurable in increments of 0.5 ms)
specify
settings)
Program 2 Program memory
28k step 60k step 124k step 252k step See Section 6.2.
capacity (Drive 0)
Memory card (RAM)
Capacity of loading memory cards (2Mbyte max.) See Section 6.5.
(Drive 1)
Memory card (ROM) Installed memory card capacity
See Section 6.5.
(Drive 2) (Flash card: 4 Mbyte max., ATA card: 32 Mbyte max.)
Memory Standard RAM
64kbyte 128kbyte 5 256kbyte 3 See Section 6.4.
capacity (Drive 3)
Standard ROM
112 kbyte 240 kbyte 496 kbyte 1008 kbyte See Section 6.3.
(Drive 4)
CPU shared memory
8 kbyte See Section 14.2.4.
3
Program memory 28 60 124 252 1 See Section 6.2.
Memory card (RAM) 256 See Section 6.5.
Memory Flash card 288 See Section 6.5.
Maximum number card
ATA card 512 See Section 6.5.
of stored files (ROM)
Only one file register
Standard RAM 2
and one local device
Standard ROM 28 60 124 252 See Section 6.3.
Standard ROM number of writings Max. 100000 times
1: 124 is the maximum number of programs that can be executed on High Performance model QCPU. 125 or more programs cannot be
executed.
2: The maximum number of sequence steps (for one program) for which the parameters are stored in another drive and executed with the
High Performance model QCPU can be calculated with the following expression.
(Program size) - (File header size (default: 34 steps))
Refer to the High Performance model QCPU (Q Mode) User's Manual (Function Explanation, Program Fundamentals) for details on
the program size and file.
3: The memory capacity of the Q12HCPU or Q25HCPU whose first five digits of serial No. are "02091" or earlier is 64k bytes.
(Refer to Section 2.3 for the serial No. confirmation method.)
4: The CPU shared memory is not latched. The CPU shared memory is cleared when the power is turned on to the PLC or when the
CPU module is reset.
5: The memory capacity of the Q02HCPU or Q06HCPU whose first five digits of serial No. are "04011" or earlier is 64k bytes.
(Refer to Section 2.3 for the serial No. confirmation method.)
3-1 3-1
3 PERFORMANCE SPECIFICATION
MELSEC-Q
3-2 3-2
3 PERFORMANCE SPECIFICATION
MELSEC-Q
Pointer [P]
of in-file pointer / shared pointers.
256 points (I0 to 255)
The number of device
The specified intervals of the system interrupt pointers I28 to I31 can
Interrupt pointer [ I ] points is fixed.
be set with parameters.(0.5 to 1000ms, 0.5 ms/unit)
Default I28 : 100ms I29 : 40ms I30 : 20ms I31 : 10ms
Special relay [SM] 2048 points (SM0 to 2047)
Special register [SD] 2048 points (SD0 to 2047)
Function input [FX] 16 points (FX0 to F)
Function output [FY] 16 points (FY0 to F) 7
Function register[FD] 5 points (FD0 to 4) 7
Device having a direct access to link device.
MELSECNET/10(H) use only.
Link direct device
Specified form : J \X ,J \Y ,J \W ,
J \B ,J \SW ,J \SB
Device having a direct access to the buffer memory of the intelligent
Intelligent function module device
function module. Specified form : U \G
L0 to 8191 (default)
Latch (power failure compensation) range
(Latch range can be set for B, F, V, T, ST, C, D, and W.) Set parameter values
RUN and PAUSE contacts can be set from among X0 to 1FFF, to specify
Remote RUN/PAUSE contact
respectively.
Year, month, day, hour, minute, second, day of the week
(leap year automatic distinction)
Clock function Accuracy -3.18 to +5.25s (TYP. +2.12s) /d at 0°C
Accuracy -3.93 to +5.25s(TYP. +1.90s)/d at 25°C
Accuracy -14.69 to +3.53s(TYP. -3.67s)/d at 55°C
Allowable momentary power failure period Varies according to the type of power supply module.
5VDC internal current consumption 0.60A 0.64A 0.64A 0.64A 0.64A
H 98mm (3.86inch)
External dimensions W 27.4mm (1.08inch)
D 89.3mm (3.52inch)
Weight 0.20kg 0.20kg 0.20kg 0.20kg 0.20kg
6: The step relays are devices for the SFC function.
7: In a program, only FX0 to FX4 and FY0 to FY4 can be used.
REMARK
For general specifications, refer to the High Performance Model QCPU (Q Mode)
User's Manual (Hardware Design, Maintenance and Inspection).
3-3 3-3
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
(b) There are 3 types of sequence program: main routine programs, sub-routine
programs, and interrupt programs.
For details on these programs, see the following sections of this manual:
• Main routine programs : Section 4.1.1
• Sub-routine programs : Section 4.1.2
• Interrupt programs : Section 4.1.3
File A
Main routine
program
FEND
P0 Sub-routine
program
RET
I0 Interrupt
program
IRET
END
REMARK
For details on the sequence instructions, basic instructions, and application
instructions, refer to the " QCPU (Q Mode)/QnACPU Programming Manual
(Common Instructions)".
4-1 4-1
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
X0 Right bus
0 Y20
X1 X2 X3
Step No. 2 Y21
Y23 4
X4 X5
8 Y24
Y24
X0 to X5 : Indicate inputs.
Y20 to Y24 : Indicate outputs.
4-2 4-2
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
END processing
REMARK
1: For details on the END/FEND instruction, refer to the "QCPU (Q
mode)/QnACPU Programming Manual (Common Instructions)".
2: If only one program is executed, it is processed under the "scan execution type
program" condition without designation by the program in the PLC parameters.
4-3 4-3
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
P0 Y10
RET
Sub-routine
program P8 Y11
RET
P1 Y12
RET
END
REMARK
: See Section 10.9 for details on local and common pointers.
See Section 10.8 for details on sub-routine program nesting.
4-4 4-4
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
4-5 4-5
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
POINT
The interrupt pointers include a pointer designed for only the high speed interrupt
function (I49).
When you have used I49, do not use interrupt programs, which use the other
interrupt pointers I0 to I48, I50 to I255, and fixed scan execution type programs.
If any fixed scan execution type program or the like is run, the interrupt program
using I49 cannot be executed at the preset interrupt cycle intervals.
See Section 7.20 for details on the high speed interrupt function.
REMARK
1: See Section 10.10 for details on interrupt factors and interrupt pointers.
I0 Y10
IRET
Interrupt
program
I32 Y11
IRET
I28 Y12
IRET
END
Interrupt pointer
4-6 4-6
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
END
4-7 4-7
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
(b) When an interrupt factor occurs, the interrupt program with the interrupt
pointer number corresponding to that factor is executed.
However, interrupt program execution varies according to the condition at
that time.
1) If two or more interrupts occur at the same time:
The interrupt programs are executed, starting with the one
corresponding to an interrupt pointer number (I ) of the highest
priority. 2
The remaining interrupt programs remain on stand-by until processing
of the higher priority interrupt program is completed.
If the same interrupt factor as that being executed occurs before the
interrupt program is processed, the interrupt factor is stored in the
memory and, after the interrupt program has been processed, the
same interrupt program is executed again.
2) When an instruction is being executed:
The interrupt program may be executed by interrupting the execution
of an instruction in the main routine program. When the same device is
used in both the main routine program and interrupt program, device
data may be separated.
To prevent the separation of the device data, the following measures
must be taken.
(a) Do not specify the device, to which data will be written in the
interrupt program, directly in the main routine program, but use
another device by shifting the data with a transfer instruction, etc.
(b) If inconvenience is caused when the instruction is interrupted in the
main routine program, execute it after disabling the interruption
with the DI instruction.
However, since the interrupt program will not interrupt during access to
the device of each argument of the instruction, data separation will not
occur on an argument basis.
3) Interruption during a network refresh:
If an interrupt factor occurs during a network refresh operation, the
network refresh operation is suspended, and the interrupt program is
executed.
This means that "assurance of blocks in cyclic data at each station"
cannot be secured by using a device designated as a destination of
link refresh operation on the MELSECNET/H Network System. 3
Interrupt factor
Interrupt program
execution
Network refresh
execution
4-8 4-8
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
REMARK
1: For details on the IMASK and EI instructions, refer to the "QCPU (Q
mode)/QnACPU Programming Manual (Common Instructions).
To execute interrupt programs I0 through I31 and I48 through I255, use an EI
instruction to enter the interrupt programs into an interrupt enabled status.
2: See Section 10.10 for details on the priority ranking of interrupt programs.
3: For assurance of station unit blocks in cyclic data, see the "MELECNET/H
Network System Reference Manual."
(c) When the interrupt program is executed in the default setting of the High
Performance model QCPU, the save and restoration of the index register
value and the save and restoration of the file register block No. are
performed at the time of switching between the main routine program and
interrupt program.
Refer to Section 10.6.2 for details..
4-9 4-9
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
ON
X0 OFF
ON
M0 OFF
Switched OFF by PLS M0 instruction
Switched ON by PLS M0 instruction at X0 leading edge (OFF to ON)
4 - 10 4 - 10
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
Programs executed by High Performance model QCPU can be stored in the High
Performance model QCPU's program memory, standard ROM or memory card.
Programs can be stored in the standard ROM or memory card as a single program, but
also as multiple programs by splitting them into separate programs for each control
function.
This permits the programming procedure to be split up among several program
designers, who can design separate programs for each operation and can store them
in the standard ROM or memory card.
When multiple programs are executed by High Performance model QCPU, "program
name (file name)" and "execute type" settings of the programs must be designated.
Control by one program Control by separating
into multiple programs
Program A
Program B
Store by separating
Control contents B Control contents B
the code according
to control contents.
Program n
4 - 11 4 - 11
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
1)
2)
3)
4)
5)
6)
1) Program name
This column is used to specify a program name (file name) of the
program to be executed by High Performance model QCPU.
2) Execute type
This column is used to specify the execute type of the program defined
in the "Program name" column. See Section (b).
3) Fixed scan
This column is used to specify time intervals at which to an execution
type program.
The Fixed Scan setting range is determined by the units of time
intervals as follows:
• In the unit "ms": 0.5 to 999.5
• In the unit "s": 1 to 60
4) In units
This column is used to specify the units (ms/s) of fixed scan intervals.
4 - 12 4 - 12
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
POINT
Not all execute types need to be set for the High Performance model QCPU.
Use the items marked with " " as needed, such as the Initial execution, low speed
execution, stand-by and fixed scan execution type programs.
4 - 14 4 - 14
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
PSCAN PSCAN
Initial execution Scan execution Low speed execution
type program type program type program
(b) The following table shows the timing of changing the execute type of a
program by using a PSCAN, PLOW, PSTOP or POFF instruction.
Executed instruction
PSCAN PSTOP POFF PLOW
Execute type before change
No change - remains Output is turned OFF
Scan execution type
scan execution type. in the next scan.
Becomes stand-by
Becomes stand-by
type. Becomes low speed
Initial execution type type from the next
Becomes scan type.
scan after that.
execution type.
No change - remains
Stand-by type No processing.
stand-by type.
Low speed execution Low speed execution
type execution is Low speed execution type execution is
stopped: becomes type execution is stopped, and output is No change - remains
Low speed execution type scan executions from stopped: becomes turned OFF in the low speed
the next scan. stand-by type from the next scan. Becomes executions.
(Execution from step next scan. stand-by type from the
0.) next scan after that.
Output is turned OFF
in the next scan.
Becomes scan Becomes stand-by Becomes low speed
Fixed scan execution type Becomes stand-by
execution type. type. type.
type from the next
scan after that.
POINT
1: If the fixed scan execution type program is changed to another execution type,
you cannot return to the fixed scan execution type.
4 - 15 4 - 15
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
Initial execution
type program A
Initial execution
type program n
END processing
Scan execution
type program
4 - 16 4 - 16
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
(b) The High Performance model QCPU measures the initial scan time and
stores the result in special registers (SD522, SD523). 1
The initial scan time can be checked by monitoring the SD522 and SD523
special registers.
SD522 SD523
If the SD522 value is 3, and the SD523 value is 400, the initial scan time is
3.4 ms.
POINT
1: The accuracy of the initial scan time stored at the special registers is ± 0.1 ms.
The initial scan time count will continue even if a watchdog time reset
instruction (WDT) is executed at the sequence program.
(b) The low speed execution type program is executed after the execution of
the initial execution type program is completed.
To use the low speed execution type program, specify the time that is
longer than the sum of the initial scan time and the execution time of the
low speed execution type program.
(c) When the initial scan time exceeds the set initial execution monitor time,
"WDT ERROR (error code: 5000)" occurs, and High Performance model
QCPU operation is stopped.
POINT
When the initial execution monitor time is designated, there will be a 10 ms error in
the count value.
Therefore, a monitor time setting (t) of 10 ms will result in a "WDT ERROR" when
the initial scan time is in the range 10 ms < t < 20 ms.
4 - 17 4 - 17
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
END processing
0 END 0 END 0
Scan execution type program B
0 END 0 END
Scan execution type program C
Scan time
4 - 18 4 - 18
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
If the SD520 value is 3, and the SD521 value is 400, the initial scan time is 3.4
ms.
POINT
1: The accuracy of the scan time stored at the special registers is ± 0.1 ms. The
scan time count will continue even if a watch dog timer reset instruction (WDT)
is executed at the sequence program.
POINT
The WDT measurement error is 10 ms.
Therefore, a WDT setting (t) of 10 ms will result in a "WDT ERROR" if the scan
time is in the following range: 10 ms < t < 20 ms.
REMARK
Use the GX Developer's Program Monitor List to check the execution time of a
program being executed. See Section 7.11.1 for details on the GX Developer's
Program Monitor List.
4 - 19 4 - 19
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
4 - 20 4 - 20
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
1 If a constant scan time has been designated, the low speed execution
type program will be executed repeatedly during the constant scan's
surplus time.
Therefore, the low speed execution type program's execution time
varies from scan to scan.
As the low speed execution type program will not be executed at all if
the constant scan's surplus time is 0.5 ms or less, a constant scan time
setting should be designated which provides a surplus time of more
than 0.5 ms.
2 If a low speed program execution time has been designated, the low
speed execution type program will be executed repeatedly in
accordance with that time setting.
Therefore, the scan time will vary from scan to scan.
3 If a constant scan time has been designated, the surplus time after
completion of low speed END processing is waiting time, and execution
of a scan execution type program starts when the constant scan time
has elapsed.
This means that the scan time is constant in each scan.
However, if the surplus time after the constant scan is less than 0.5 ms,
low speed execution type programs cannot be executed. If using a low
speed execution type program, set the constant scan time so that the
surplus time is 0.5 ms or longer.
4 If a "low speed program execution time" has been designated, scan
execution type program operation is started ignoring the surplus time
after completion of low speed END processing.
This means that the scan time differs in each scan.
(b) If a low speed execution type program cannot be processed within constant
scan surplus time or within the low speed program execution time, program
execution is temporarily stopped and the remainder of the program is
executed in the next scan.
4 - 21 4 - 21
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
1 : Asynchronous method
(1) Constant scan time setting
The low speed execution type program is operated under the following conditions as shown
below.
• Constant scan time : 8ms
• Total scan execution type program time : 4ms to 5ms
• Execution time of low speed execution type program A : 1ms
• Execution time of low speed execution type program B : 3ms
• END processing/low speed END processing : 0ms (0 ms is used to simplify the illustration)
END END END END
processing processing processing processing
0 8 16 24 (ms)
4 - 22 4 - 22
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
2 : Synchronous method
(1) Constant scan time setting
The low speed execution type program is operated under the following conditions as shown
below.
• Constant scan time : 8ms
• Total scan execution type program time : 4ms to 5ms
• Execution time of low speed execution type program A : 1ms
• Execution time of low speed execution type program B : 3ms
• END processing/low speed END processing : 0ms (0 ms is used to simplify the illustration)
END END END END
processing processing processing processing
0 8 16 24 32 (ms)
1ms 1ms
Low speed execution type program A
4 - 23 4 - 23
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
4 - 24 4 - 24
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
(b) The low speed scan time is measured by the High Performance model
QCPU, and the result is stored in special registers (SD528 to SD535). 1
The low speed scan time can therefore be checked by monitoring the
SD528 to SD535 special registers.
If the SD528 value is 50, and the SD529 value is 400, the low speed scan
time is 50.4 ms.
POINT
1: The accuracy of the scan time stored at the special registers is ± 0.1 ms.
The scan time count will continue even if a watchdog time reset instruction
(WDT) is executed in the sequence program.
POINT
The low speed execution time measurement occurs at low speed END processing.
Therefore a “PRG TIME OVER” error will occur if the low speed execution monitor
time (t) is designated as 100 ms, and the measured low speed scan time at low
speed END processing exceeds 100 ms.
4 - 25 4 - 25
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
P100 Sub-routine
program Stand-by type program
I0 Interrupt
program
P100 RET
Sub-routine program
I0 IRET
Interrupt program
4 - 26 4 - 26
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
4 - 27 4 - 27
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
2) When changing the execute type of the scan execution type programs
and stand-by type programs by the scan execution type programs
having the condition for switching the execution type.
• The scan execution type program being executed changes the next
program to be executed from a stand-by type program to a scan
execution type program.
• If the condition realizes when "ABC" and "GHI" programs have been
set to scan execution type, and "DEF" program to stand-by type, the
execute types of "ABC" and "DEF" programs are switched as shown
below.
When M0 is on
M0
PSCAN "DEF"
PSTOP "ABC"
Scan execution type program: DEF Scan execution type program : GHI
4 - 28 4 - 28
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
(d) The execute type of program is switched at END processing. The program
execute type does not change while the program is being executed.
If different execute type is specified for a same program in a same scan,
the last-specified execute type becomes effective.
END processing END processing END processing
Execution program "GHI" "ABC" "GHI" "GHI" "DEF" "GHI"
name
REMARK
1) : The "GHI" and "DEF" programs are executed in the order as set at the
"Program" tab screen in the “(PLC) Parameter" dialog box.
4 - 29 4 - 29
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
Common pointer
Program B (Stand-by type program)
Program B
RET
P508 Y11
RET
P501 Y12
RET
END
REMARK
: See Section 10.9 for details on common pointers and local pointers.
4 - 30 4 - 30
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
I0 Y10 Write
IRET
Interrupt
program
I32 Y11
IRET
I28 Y12
IRET
END
Interrupt pointer
(This does not have to be created in order.)
REMARK
: See Section 10.10 for details on interrupt pointers.
4 - 31 4 - 31
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
Interrupt factor
Fixed scan
execution type
program execution
Link refresh
execution
Fig. 4.5 Execution of Fixed Scan Execution Type Programs during Network Refreshing
REMARK
1: Refer to the following manual on the block assurace of cyclic data for each
station.
• Q-Corresponding MELSECNET/H Network System Reference Manual
4 - 32 4 - 32
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
(3) Setting of fixed scan execution type program for high speed
execution and overhead time
When fixed scan execution type programs are executed, the processing below is
performed.
• Save and return of index resister
• Save and return of file name of file resister in use
If "High Speed Execution" is selected from the interrupt program/fixed scan
execution type program at the "PLC system" tab screen in the “(PLC) Parameter"
dialog box, the processing above will not be performed.
As a result, the overhead time for the fixed scan execution type programs can be
reduced.
Overhead time
CPU type High speed execution is not High speed execution is
selected selected
Q02CPU 380 s 230 s
Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPU 165 s 100 s
X0 OFF
ON
OFF
M0
Switched OFF by PLS M0 instruction
Switched ON by PLS M0 instruction at X0 leading edge (OFF to ON)
(b) During the execution of a fixed scan execution type program, interruption is
prohibited (DI). Therefore, do not execute EI/DI instructions during the
programming of the fixed scan execution type program.
(c) During the programming of a fixed scan execution type program, a timer
cannot be used.
Because the timer updates the current values and turns ON/OFF at the
time of execution of OUT T instruction, if the timer is used during the
programming in the fixed scan execution type program, the current values
will be updated only when the fixed scan execution type program is
executed, and normal measurement will be disabled.
4 - 33 4 - 33
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
(d) The following commands cannot be used in the fixed scan execution type
program.
• COM
• ZCOM
(e) When a fixed scan execution type program is executed, an interruption must
be allowed by an EI instruction in the initial execution type program/scan
execution type program.
(f) When the interrupt program/fixed scan execution type program is executed
at a measuring time such as the scan time or execution time, the values of
the interrupt program/fix scan execution type program are added to the
measured time.
Thus, if the interrupt program/ fixed scan execution type program is
executed, the values stored in the following special registers and
GX Developer monitor values will become longer than when the interrupt
program/ fixed scan execution type program is not executed.
1) Special registers
• SD520, SD521: Current scan time
• SD522, SD523: Initial scan time
• SD524, SD525: Minimum scan time
• SD526, SD527: Maximum scan time
• SD528, SD529: Current scan time for low speed
• SD532, SD533: Minimum scan time for low speed
• SD534, SD535: Maximum scan time for low speed
• SD540, SD541: END processing time
• SD542, SD543: Constant scan wait time
• SD544, SD545: Cumulative execution time for low speed execution
type programs
• SD546, SD547: Low speed execution time
• SD548, SD549: Scan program execution time
• SD551, SD552: Service interval time
2) GX Developer monitor values
• Execution time measurement
• Scan time measurement
• Constant scan
4 - 34 4 - 34
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
This is a preprocessing for sequence operation execution, and is performed only once
as shown in the table below.
When the initial processing is completed, the High Performance model QCPU goes in
the RUN/STOP switch setting status. (See Section 4.4.)
REMARK
1: Indicates that the parameter or program was changed in a STOP status and the
CPU was placed in a RUN status without being reset.
(Move the RUN/STOP switch from STOP to RUN (RUN LED flickers) to STOP
to RUN.)
Fully note in the above switch operation that normal operation may not be
performed since the previous data may not be maintained in the case of the
pulse conversion instruction (PLS, _P) depending on the program change.
In I/O refresh, an input (X) is received from the input module/intelligent function
module, and output (Y) of the High Performance model QCPU is sent to the output
module/intelligent function module.
The I/O refresh is executed before the sequence program operation starts.
During constant scan execution, the I/O refresh is executed after the constant scan
delay time has elapsed.
(The I/O refresh is executed at each constant scan cycle.)
4 - 35 4 - 35
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
When automatic refresh of intelligent function modules is set, communication with the
intelligent function modules of the designated data is performed.
Refer to the manual of the intelligent function modules, for details on the automatic
refresh setting of intelligent function modules.
(a) When a refresh request is made from the network module, refresh
processing is performed.
(b) When the trace point of the sampling trace is set at every scan (after END
instruction execution), the set device status is stored in the sampling trace
area.
POINT
(1) When the constant scan function (See Section 7.2) is set, END processing time
result is stored until when END processing is completed or the next scan starts.
(2) When executing the low speed execution type program, the low speed END
processing starts after the all low speed execution type programs are
completed.
See Section 4.2.3 for details on the low speed execution type program and low
speed END processing.
4 - 36 4 - 36
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
The High Performance model QCPU has three types of operation status; RUN, STOP
and PAUSE status.
The High Performance model QCPU operation processing is explained below:
(1) RUN Status Operation Processing
(a) RUN status indicate that the sequence program operation is performed from
step 0 to END (FEND) instruction to step 0 repeatedly.
(b) When entering the RUN status, the output status saved at STOP status is
output by setting "Previous status" as "Output mode at STOP to RUN" at
the "PLC system" tab screen in the “(PLC) Parameter" dialog box.
(c) It usually takes 1 to 3 seconds to prepare for staring the sequence program
operation since STOP status is switched to RUN status, though it might be
longer depending on the system.
(2) STOP Status Operation Processing
(a) STOP status indicates that the sequence programs are stopped by
RUN/STOP switch or remote STOP function. (See 7.6.1 for details on
remote STOP function.)
High Performance model QCPU might enter STOP status when a stopping
error occurs.
(b) When entering the STOP status, save the output status and turn off all
output.
The device memory of other than the output (Y) is retained.
(3) PAUSE Status Operation Processing
(a) The PAUSE status indicates that the sequence program operations are
paused by remote PAUSE function while maintaining the output and device
memory status. (See Section 7.6.2 for details on remote PAUSE function.)
(4) High Performance model QCPU Operation Processing with
RUN/STOP Status
Operation Processing of
High Performance Sequence
Device memory
mdel QCPU program
External output
operation
RUN/STOP processing
status M, L, S, T, C, D Y
4 - 37 4 - 37
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
POINT
The High Performance model QCPU performs the following in any of RUN, STOP,
and PAUSE status:
• I/O module refresh processing
• Data communication with GX Developer and serial communication module
• Refresh process of MELSECNET/H and CC-Link
For this reason, I/O monitor and test operation using GX Developer, reading/writing
from the serial communication, communication with another station using
MELSECNET/H, and communication with a remote station over the CC-Link can
be made even in the STOP or PAUSE status.
The High Performance model QCPU detects a momentary power failure when the
input power voltage supplied to the power supply module is lower than the regulated
ranges.
When the High Performance model QCPU detects a momentary power failure, the
following operation processing is performed:
(1) When momentary power failure occurs for a period shorter than the
permitted power failure time
(a) The output is maintained when the momentary power failure occurs, and file
name of the file accessed and error history are logged. Then the system
interrupts the operation processing. (The timer clock continues.)
(b) When there is an SFC continue specification, a system saving processing is
performed.
(c) When a momentary power failure ends, the operation processing is
resumed.
(d) Even if the operation is interrupted due to momentary power failure, the
watch dog timer (WDT) measurement continues. For example, if the GX
Developer PLC parameter mode WDT setting is set at 200 ms, when a
momentary failure of 15 ms occurs at scan time 190 ms, the watch dog
timer error is set.
(2) When a power failure occurs for a period longer than the permitted
power failure time
The High Performance model QCPU starts initially. (PLC power is turned on.)
The same operation processing as that after the following operation occurs.
• Power ON
• Resetting using RESET/L. CLR switch
• Remote setting using GX Developer
4 - 38 4 - 38
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
Data in (c) is cleared by operating "latch clear" with the RESET/L.CLR switch, or
operating "remote latch clear" from GX Developer.
See Section 7.6.4 for details on the remote latch clear.
(b) The devices in which RESET/L.CLR switch is set to invalid can only be
cleared by an instruction or GX Developer.
1) Instruction to clear method
Reset with the RST instruction or send "0" with the MOV/FMOV
instruction.
2) GX Developer clear method
Clear all device memory in the online PLC memory clear (including
latch).
Refer to the GX Developer operating manual for details of the GX
Developer operation methods.
POINT
To clear file registers or local devices, use the RST instruction to perform a reset
operation, or use the MOV/FMOV instruction to transmit "0".
REMARK
Refer to following manual for the MOV/FMOV instruction.
• QCPU (Q mode)/QnACPU Programming Manual (Common instructions)
4 - 39 4 - 39
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
In the direct mode, the batch communication with I/O modules is performed before
sequence program operation starts.
By creating a sequence program with direct access I/O, I/O processing can be
performed in a direct mode to communicate with I/O module at execution of each
instruction in the sequence program.
For details on direct access I/O, see Section 10.2.1 and 10.2.2, respectively.
Network
module
• Input refresh:
Before start of the sequence program operation, input data are batch-read from the
input module (1) and ORed with the GX Developer input area or remote input refresh
area data, and the results are stored into the input (X) device memory.
• Output refresh:
Data in the output (Y) device memory is output in a batch 2) to the output module
before sequence program operation starts.
• When an input contact instruction has been executed:
Input information is read 3) from the input (X) device memory, and a sequence
program is executed.
• When an output contact instruction has been executed:
Output information is read 4) from the output (Y) device memory, and a sequence
program is executed.
• When an output OUT instruction has been executed:
The sequence program operation result 5) is stored in the output (Y) device memory.
Fig.4.7 I/O Information Flow in Refresh Mode
4 - 40 4 - 40
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
REMARK
1: The peripheral device input area can be switched ON and OFF by the following:
• Test operation by the GX Developer
• A network refresh by the MELSECNET/H network system
• Writhing from a serial communication module
• CC-Link automatic refresh
2: The output (Y) device memory can be switched ON and OFF by the following:
• Test operation by GX Developer
• A network refresh by the MELSECNET/H network system
• Writhing from a serial communication module
• CC-Link automatic refresh
3: The remote I/O refresh area indicates the area used when automatic refresh
setting is made to the input (X) with MELSECNET/H and CC-Link.
Automatic refresh of the remote input refresh area is executed during END
processing.
4 - 41 4 - 41
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
Ladder examples
X5 Ladder that turns the Y5E output
55 Y5E
ON when an X5 input turns ON.
ON
OFF
External contact
ON
OFF
X5
QCPU ON
devices OFF
Y5E
ON
OFF
External load
Lag time
(Minimum 1 scan)
Y5E output turns on fastest if the external contact is turned ON immediately before
the refresh operation. Then X5 turns ON at the input refresh, Y5E turns ON at step
56, and the external load turns ON at the output refresh following execution of the
END instruction. In this case, the time lag between the external contact ON and the
external load ON is 1 scan.
ON
OFF
External contact
ON
OFF
X5
QCPU ON
devices OFF
Y5E
ON
OFF
External load
Lag time
(Maximum 2 scan)
Y5E turns on slowest if the external contact is turned ON immediately after the
refresh operation. Then X5 turns ON at the input refresh, Y5E turns ON at step 56,
and the external load turns ON at the output refresh following execution of the END
instruction. In this case, the time lag between the external contact ON and the
external load ON is 2 scan.
Fig.4.8 Timing chart showing response of Output "Y" when Input "X" turns ON
4 - 42 4 - 42
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
1) Input
2) GX Developer
Input (X) input area module
3) 1
device
DX0 memory
4) 2
Output (Y)
Y20 Output
device
DY25 5) module
memory
REMARK
1: The GX Developer input area can be turned ON and OFF by the following:
• Test operation by GX Developer
• Writing from a serial communication module
2: The output (Y) device memory can be turned ON and OFF by the following:
• Test operation by the GX Developer
• A network refresh by MELSECNET/H network system
• Writing from a serial communication module
• CC-Link automatic refresh
3: The remote input refresh area indicates the area used when automatic refresh
setting is made to the input (X) with MELSECNET/H and CC-Link.
Automatic refresh of the remote input refresh area is performed during END
processing.
4 - 43 4 - 43
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
Ladder examples
DX5 Ladder that turns the DY5E output
55 DY5E
ON when an DX5 input turns ON.
ON
OFF
DX5
ON
OFF
DY5E
DY5E output turns fastest ON if the DX5 input is turned ON immediately before the
step 55 operation. If DX5 is ON when step 55's LD DX5 is executed, DY5E will turn
ON within that scan.
Therefore, in this case, output DY5E lags minimally behind input DX5.
0 55 56 END 0 55 56
ON
OFF
DX5
ON
OFF
DY5E
Lag time
(Maximum of 1 scan)
DY5E output turns ON slowest if the DX5 input is turned ON immediately after the
step 55 operation. In this case, the DY5E output will turn ON during the next scan.
In this case output DY5E lag max.1 scan behind input DX5.
Fig.4.10 Timing chart showing response of Output "Y" when Input "X" turns ON
4 - 44 4 - 44
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
Numeric and alphabetic data are expressed by "0" (OFF) and "1" (ON) numerals in the
High Performance model QCPU.
This expression form is called "binary code" (BIN).
The hexadecimal (HEX) expression form in which BIN data are expressed in 4-bit
units, and the BCD (binary coded decimal) expression form are applicable to the High
Performance model QCPU.
Real numbers may also be used. (See Section 4.8.4)
The numeric expressions by BIN, HEX, BCD, and Decimal (DEC) notations are shown
in Table 4.1 below.
4 - 45 4 - 45
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
4 3 2 1
BCD input
XF X0
BIN data
BCD D5 K4Y30
Y3F Y30
BIN data
4 - 46 4 - 46
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
2 15 2 14 2 13 2 12 2 11 2 10 2 9 28 27 26 25 24 23 22 2 1 20
4 - 47 4 - 47
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
4 - 48 4 - 48
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
4 - 49 4 - 49
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
1. [Mantissa] × 2 (characteristic)
The bit configuration used for internal expression of floating decimal point data is
shown and explained below.
b23 to b30 FFH FEH FDH 81H 80H 7FH 7EH 02H 01H 00H
Non- Non-
n numeric 127 126 2 1 0 -1 -125 -126 numeric
4 1 2 0 0 0 0 0
4 - 50 4 - 50
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
3 F 4 0 0 0 0 0
POINT
(1) The monitor function for GX Developer permits monitoring the real number data
of the High Performance model QCPU.
However, if an attempt is made to monitor the data that cannot be represented
as a real number, e.g. "FFFFH", "_____" is displayed.
(2) For a "0" value, "0" will be indicated at all the b0 to b31 bits.
(3) It is possible to select either "Perform internal arithmetic operation in double
precision" or "Do not perform internal arithmetic operation in double precision"
with the floating point arithmetic processing on the PLC parameter's PLC
system settings. (The result of the operation will be short precision regardless
of the floating point arithmetic processing setting.)
It is recommended that "Do not perform internal arithmetic operation in double
precision" is selected if increased speed for the real arithmetic operations is
required, and "Perform internal arithmetic operation in double precision" is
selected if precision is required when applying compatibility with conventional
equipment.
• Only internal arithmetic operations will be performed at double precision (64-
bits) when "Perform internal arithmetic operation in double precision" is
selected (default setting.)
Precision will be increased for commands that use many real arithmetic
operations with internal arithmetic operations, such as the SIN command and
COS command, when double precision is set.
• Real arithmetic operations will be performed faster owing to the internal
arithmetic operations being performed with short precision (32-bit) when "Do
not perform internal arithmetic operation in double precision" is set, and there
are also cases where a certain amount of precision will be lost.
4 - 51 4 - 51
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
REMARK
In binary notation, the portion of the value following the decimal point is calculated
as follows:
0.1 1 0 1
This bit expresses 2-1 This bit expresses 2-2 This bit expresses 2-3 This bit expresses 2-4
4 - 52 4 - 52
4 SEQUENCE PROGRAM CONFIGURATION AND EXECUTION
CONDITIONS
MELSEC-Q
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Column
b8 b7 b6 b5 b4 b3 b2 b1 0 1 2 3 4 5 6 7 8 9 A B C D E F
Low
0 0 0 0 0 NUL (SP) 0 @ P ` p
0 0 0 1 1 ! 1 A Q a q
0 0 1 0 2 " 2 B R b r
0 0 1 1 3 # 3 C S c s
0 1 0 0 4 $ 4 D T d t
0 1 0 0 5 % 5 E U e u
0 1 1 0 6 & 6 F V f v
0 1 1 1 7 ' 7 G W g w
1 0 0 0 8 ( 8 H X h x
1 0 0 1 9 ) 9 I Y i y
1 0 1 0 A * : J Z j z
1 0 1 1 B + ; K [ k {
(Comma)
1 1 0 0 C , < L l |
(Minus)
1 1 0 1 D - = M ] m }
(Period)
1 1 1 0 E . > N ^ n
Under
line
1 1 1 1 F / ? O _ o
4 - 53 4 - 53
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
This section describes the necessary information on the I/O number assignment for the
data exchange between High Performance model QCPU and I/O modules or intelligent
function modules.
5.1 Relationship Between the Number of Stages and Slots of the Extension Base Unit
High Performance model QCPU allows the system configuration using eight base
units: one main base unit and seven extension base units.
However, the number of available slots (modules) is limited to 64 slots including empty
slots.
An error (SP. UNIT LAY ERR.) occurs when a module (input, output, or intelligent
function module) is installed to the 65th or subsequent slots.
Be sure to install modules within the range of 64 slots. (An error does not occur as
long as all modules are installed within the range of 64 slots, even if the total number of
slots of the main and extension base units results in 65 slots or more [e.g. When 6 12-
slot base units are installed].)
0 1 2 3 4 5 6 7 8 9 10 11 Slot No.
Power supply
QCPU
Setting of extension
stage
Q312B 5
(See Section 5.2.)
12 13 14 15 16 17 18 19 20 21 22 23
Power supply
Q612B
24 25 26 27 28 29 30 31 32 33 34 35
Power supply
2
Q612B
36 37 38 39 40 41 42 43 44 45 46 47
Power supply
3
Q612B
48 49 50 51 52 53 54 55 56 57 58 59
Power supply
4 Q612B
60 61 62 63
Power supply
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
Invalid
5 Q612B
5-1 5-1
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
5.2 Installing Extension Base Units and Setting the Number of Stages
There are two types of extension base units: Q5 B/Q6 B for mounting of Q-Series
modules and QA1S6 B and for mounting AnS Series modules.
(2) Setting order of the stage numbers for extension base units
Extension base units require the setting of the extension stage numbers (1 to 7)
using the stage No. setting connector.
Assign the extension stage numbers starting from 1 to 7 to the extension base
units in the connected order starting from the one connected to the main base
unit.
Setting of extension
Q38B Main base unit
stage
Stage setting
connector 8 9 10 11 12 13 14 15
Power supply
1
Extension base unit for mounting module
Q68B corresponding to the Q Series
(Q5 B/Q6 B is connected to
the main base unit or Q5 B/Q6 B.)
16 17 18 19 20 21 22 23
Power supply
2
QA1S68B
5-2 5-2
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
There are "Auto" and "Detail" modes to assign the number of modules can be mounted
in the main and extension base units of High Performance model QCPU.
(1) Auto mode
In Auto mode, the slot numbers are assigned to the main and extension base
units according to the number of slots than can be occupied.
The I/O numbers are assigned according to the modules which can be mounted
to the current base unit.
(a) For 3-slot base unit: 3 slots are occupied
Q33B type main base unit
0 1 2
Power supply
CPU module
5-3 5-3
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
Power supply
CPU module
Q68B type extension base unit
8 9 10 11 12 13 14 15
Power supply
5-4 5-4
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
Empty
Empty
Empty
Prohibit
Prohibit
Prohibit
Prohibit
5-5 5-5
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
(3) Setting screen and setting items for Base mode of GX Developer
(e)
5-6 5-6
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
I/O numbers are used in sequence programs for importing ON/OFF data to High
Performance model QCPU from outsides and outputting ON/OFF data from High
Performance model QCPU to outsides.
Input (X) is used for the importing of ON/OFF data to High Performance model QCPU.
Output (Y) is used for outputting ON/OFF data from High Performance model QCPU.
I/O numbers are expressed as hexadecimal.
When using 16-point I/O modules, I/O numbers are consecutively assigned to the slots
having 0 to F, 16 points, as follows.
The module mounted in the base unit assigns the following:
• For the input module, "X" is assigned at the beginning of the I/O number.
• For the output module, "Y" is assigned at the beginning of the I/O number.
For the case of input module For the case of output module
X 0 0 0 X 0 1 0 X 0 2 0 Y 0 3 0 Y 0 4 0
Power CPU
supply module
module
X2C
X 0 0 F X 0 1 F X 0 2 F Y 0 3 F Y 0 4 F
16 input 16 input 16 input 16 output 16 output
points points points points points
5-7 5-7
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
5.5.1 I/O numbers of main base unit and extension base unit
High Performance model QCPU assigns I/O numbers at power-on or reset according
to the following items.
As a result, High Performance model QCPU can be controlled without performing I/O
assignment using GX Developer.
To assign I/O numbers, follow the items below:
5-8 5-8
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
The following shows the example of the I/O number assignment when the base unit is
set in Auto mode without I/O assignment:
Output module
Output module
Input module
Input module
Input module
Power supply module
CPU module
Allocate the I/O number with
the I/O points of each slot
16 16 32 16 64
points points points points points
......... I/O numbering direction
X00 X10 X20 Y40 Y50
The slot numbers of the 1st stage's extension
X0F X1F X3F Y4F Y8F base unit continue from the last slot number
Q65B (5 slots occupied) of the main base unit.
Extension
cable
5 6 7 8 9
Output module
function module
function module
function module
Power supply module
Empty
Intelligent
Intelligent
Intelligent
Output module
Output module
function module
function module
function module
Power supply module
Input module
Input module
Intelligent
Intelligent
Intelligent
2
IN OUT
16 16 32 32 32 16 16 16
points points points points points points points points
X110 X120 130 150 170 Y190 Y1A0 Y1B0
POINT
The above example shows the case where the intelligent function module has 32
I/O points.
The number of occupied I/O points may vary depending on the intelligent function
module.
Refer to the manual of the intelligent function module being used and check the
number of the I/O points before assigning the I/O numbers.
5-9 5-9
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
It is possible to allocate High Performance model QCPU device input (X) and output
(Y) to remote station I/O modules and intelligent function modules and control the
modules in the MELSECNET/H remote network, the CC-Link and other remote I/O
systems.
QJ61BT11
QJ71LP21
QX41
QX41
QY41
QY41
QX41
QY41
QJ72LP25
Q64AD
Q64AD
CPU module
Power supply
Power supply
Allocation of
QCPU input (X) and
MELSECNET/H output (Y) possible
Remote Remote
station station
CC-Link
When using High Performance model QCPU device input (X) and output (Y) in remote
stations, I/O numbers that succeed the numbers used by the main base unit and
extension base units' I/O modules and intelligent function modules will be allocated.
For example, if X/Y0 to X/Y3FF are being used by the main base unit and extension
base units' I/O modules and intelligent function modules, then numbers above X/Y400
can be used by the remote station.
However, the I/O numbers for remote stations should be set in consideration of
additions to the main base unit and extension base units' I/O modules and intelligent
function modules.
For example, if 1024 points from X/Y0 to X/Y3FF are being used by the main base unit
and extension base units, and 256 points from X/Y400 to X/Y4FF are to be held back
for use with future additions, then the situation shown in the diagram below is to be
observed.
I/O (X/Y)
X/Y0
I/O numbers being used by the main base unit and
to
extension base units
X/Y3FF
X/Y400
to Held back for future additions
X/Y4FF
X/Y500 For MELSECNET/H
remote I/O station
X/Y1FFF
POINT
If network parameter setting is not made in the CC-Link system, 2048 points in the
range from X/Y1000 to X/Y17FF are assigned to the master local module of the
CC-Link having the lowest number.
REMARK
There is restriction on the order of allocating I/O numbers for MELSECNET/H
remote I/O networks, CC-Link or other networks.
5 - 10 5 - 10
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
(4) Setting the input response time of input modules and interrupt
modules (I/O response time)
To match the input response time of the input modules and interrupt modules to
the system, select "Type" at the "I/O assignment" tab screen in advance. (For
details, see Section 7.7.)
5 - 11 5 - 11
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
POINT
(1) The I/O assignment is necessary for changing the response time of the input
modules and the switch of intelligent function modules.
For the I/O assignment, input module response time setting, intelligent function
module switch setting, and error-time output mode setting, the PLC must be
powered off then on again (ON to OFF to ON) or the High Performance model
QCPU must be reset.
(2) If any of the I/O modules other than the 16-point modules fails without I/O
assignment being made using GX Developer, the I/O numbers after that module
may change, leading to a malfunction. Therefore, it is recommended to make
I/O assignment using GX Developer.
5 - 12 5 - 12
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
(a) Slot
Displays the slot No. and the ordinal position of the slot in the base unit.
If the base unit is not designated in Detail mode, the stage number of the
base unit is shown as " ", and the ordinal number of a slot is counted
from slot 0 of the main base unit.
(b) Type (For High Performance model QCPU)
Select the type of module being mounted from the followings:
• Empty (Empty slot)
• Input (Input module)
• Hi Input (Q Series high speed module) 1
• Output (Output module)
• I/O Mix (I/O mixed module)
• Intelligent (Intelligent function module or AnS corresponding special
function module)
• Interrupt (Q Series interruption module) 2
If the type is not designated, the type of the actually mounted module is used.
REMARK
1: "Hi input" can be set using GX Developer Version 5 (products after SW5D5C-
GPPW-E)
2: "Interrupt" can be set using GX Developer Version 6 (products after SW6D5C-
GPPW-E)
5 - 13 5 - 13
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
(b) If the designated number of occupied points is less than that of the actually
mounted intelligent function module, "SP. UNIT LAY ERR." will occur.
(c) If the designated number of occupied I/O points is higher than that of the
actually mounted I/O module, the points exceeding the points of the actually
mounted module are set as dummies.
5 - 14 5 - 14
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
(d) Be sure to set the same module type for the mounted module and the I/O
assignment.
If the module type of the I/O assignment is different from that of the actually
mounted module, the module may not work normally.
For the intelligent function module, make sure that the numbers of I/O
points are the same.
Actually installed module I/O assignment Result
Input module Output/Empty Empty
Output module Input/Empty Empty
Input module/output module Intelligent Error (SP. UNIT LAY ERR.)
Empty Empty
Intelligent function module
Input/output Error (SP. UNIT LAY ERR.)
Empty slot Intelligent No error occurs.
(e) Be sure to assign the I/O numbers so that the last I/O number is within the
range of FFFH or less. An error (SP. UNIT LAY ERR.) occurs when the last
I/O number exceeds FFFH. (System monitor of GX Developer shows
" " as an I/O address.)
5 - 15 5 - 15
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
This section shows the examples of the I/O number assignment using GX Developer.
(a) System configuration and I/O number assignment before the I/O
assignment with GX Developer
Q38B
0 1 2 3 4 5 6 7
Input module
Input module
Input module
Output module
Output module
Output module
Output module
Power supply module
Empty
CPU module
32 32 32 16 32 32 32 32
points points points points points points points points
X00 X20 X40 60 Y70 Y90 YB0 YD0
8 9 10 11 12 13 14 15
function module
function module
function module
function module
Output module
Output module
Output module
Power supply module
Empty
Intelligent
Intelligent
Intelligent
Intelligent
1 IN OUT
32 32 32 32 16 32 32 32
points points points points points points points points
F0 110 130 150 170 Y180 Y1A0 Y1C0
REMARK
1: This is the case where the number of points for an empty slot is set to 16 at the
"PLC system" tab screen in the “(PLC) Parameter" dialog box.
5 - 16 5 - 16
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
Select 32 points.
(When the type is not selected,
the type of the installed module
will be selected.)
(c) I/O number assignment after the I/O assignment with GX Developer
Q38B
0 1 2 3 4
Output module 5 6 7
Output module
Output module
Output module
Input module
Input module
Input module
Empty
Power supply module
CPU module
32 32 32 32 32 32 32 32
points points points points points points points points
X00 X20 X40 60 Y80 YA0 YC0 YE0
8 9 10 11 12 13 14 15
Empty
Output module
Output module
Output module
function module
function module
function module
function module
Power supply module
Intelligent
Intelligent
Intelligent
Intelligent
1
IN OUT
32 32 32 32 16 32 32 32
points points points points points points points points
100 120 140 160 180 Y190 Y1B0 Y1D0
5 - 17 5 - 17
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
(a) System configuration and I/O number assignment before the I/O
assignment with GX Developer
Q38B
0 1 2 3 4 5 6 7
Output module
Output module
Output module
Output module
Input module
Input module
Input module
Empty
Power supply module
CPU module
32 32 32 16 32 32 32 32
points points points points points points points points
X00 X20 X40 60 Y70 Y90 YB0 YD0
8 9 10 11 12 13 14 15
Output module
Output module
Output module
Empty
function module
function module
function module
function module
Power supply module
Intelligent
Intelligent
Intelligent
Intelligent
1
IN OUT
32 32 32 32 16 32 32 32
points points points points points points points points
F0 110 130 150 170 Y180 Y1A0 Y1C0
5 - 18 5 - 18
5 ASSIGNMENT OF I/O NUMBERS
MELSEC-Q
(c) I/O number assignment after the I/O assignment with GX Developer
Q38B
0 1 2 3 4 5 6 7
Output module
Output module
Output module
Output module
Input module
Input module
Input module
Input module
Power supply module
CPU module
32 32 32 32 32 32 32 32
points points points points points points points points
X00 X20 X40 X200 Y70 Y90 YB0 YD0
8 9 10 11 12 13 14 15
Output module
Output module
Output module
function module
function module
function module
function module
Power supply module
Empty
Intelligent
Intelligent
Intelligent
Intelligent
1 IN OUT
32 32 32 32 16 32 32 32
points points points points points points points points
F0 110 130 150 170 Y180 Y1A0 Y1C0
System monitor of GX Developer allows the check of the mounted modules of High
Performance model QCPU and their I/O numbers. (For system monitor, refer to
Section 7.20.)
5 - 19 5 - 19
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(b) It is impossible to set and use the same extension stage number with two or
more extension base units.
6-1 6-1
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
6-2 6-2
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(a) Programs used for arithmetic operations of the High Performance model
QCPU are stored in the program memory. Programs stored in the standard
ROM or on a memory card are booted (read) into the program memory for
arithmetic operation.
(b) Parameters and programs are stored in the standard ROM. These data are
used for ROM operation of the High Performance model QCPU.
(c) File register and local device data is stored in the standard RAM. The use
of file registers in the standard RAM will enable high speed access as is the
case with data registers.
6-3 6-3
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
REMARK
1: Boot the program memory to execute a program.
2: Data can be written by operating from the GX Developer. Device comments
cannot be used in an instruction of a sequence program.
3: The read from a sequence program requires several scans.
4: A sequence program allows the read only. No data can be written through
access from a sequence program.
5: A standard RAM hold a single file.
6: Data can be written or read with the following instructions:
• S.FREAD (allows the batch read from a specified file on a memory card)
• S.FWRITE (allows the batch write to a specified file on a memory card)
The table below shows file names and extensions of data files stored in the High
Performance model QCPU or on a memory card.
Data name File name
Parameter PARAM.QPA
Intelligent function module
IPARAM.QPA
parameter
Program .QPG
Device comment .QCD
Device initial value .QDI
File register .QDR
Local device .QDL
Debug data .QTD
Failure history data .QFD
PLC user data .
The portions can be named by the user.
6-4 6-4
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(b) The table below shows the drive numbers used to specify a selected
memory (program memory, standard RAM, standard ROM or memory card)
when using a sequence program. The drive number must be used to
specify a selected memory when the read/write is made through access
from a serial communication module.
6-5 6-5
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(c) Before using the High Performance model QCPU for the first time, the
program memory must be formatted by GX Developer.
For details on the formatting procedure by GX Developer, refer to GX
Developer manuals.
(3) Format
(a) Formatting
Choose "Online" "Format PLC memory" to open the Format PLC
memory dialog box. Select "Program memory/Device memory" from the
Target Memory list box.
6-6 6-6
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
User files
REMARK
1) 1: This table shows an example in which 0 k step is allocated for a system area.
2) 2: In computing the memory capacity, 1 step is equal to 4 bytes.
3) 3: Maximum number of executable program is 124. More than 124 programs
can not be executed.
6-7 6-7
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(b) Programs stored in the standard ROM can be used after being read
(boosted) to the program memory in accordance with the setting made at
the "Boot file" tab screen in the “(PLC) Parameter" dialog box.
(d) Writing into standard ROMs is performed with the GX Developer's on-line
"PLC Writing" (flash ROM) of "Create Program Memory ROM" (see Section
6.6.1.) It is also possible to write in a standard ROM from the memory card
with "Automatic writing in the standard ROM" without using GX Developer.
POINTS
(1) Before writing data to a standard ROM, all previous data stored in the standard
ROM are erased. Therefore, all data stored in a standard ROM must be read
out and copied into the program memory at first. There, read through and
modify it as necessary. Then, write the modified data back into a standard
ROM at a time. Please note that an error may occur if data stored in the
standard ROM is used in a sequence program, with data being written in the
standard ROM.
(2) For details on the formatting procedure by GX Developer, refer to GX
Developer manuals.
REMARK
In computing a memory capacity, 1 step is equal to 4 bytes.
6-8 6-8
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(b) The standard ROM must be formatted by using GX Developer when using
the High Performance module QCPU for the first time. Refer to the GX
Developer manual for details on the formatting method.
(c) Data can be written into the standard RAM by using the online function:
"Write to PLC."
(3) Formatting
(a) Formatting
To format a standard RAM, choose "Online" "Format PLC memory" and
then select "Standard RAM" in the "Target memory" list box. See Section
6.2 for the PLC Memory Format dialog box.
(b) Memory capacity after formatted
Table 6.3 shows the memory capacity of standard RAM.
6-9 6-9
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(4) Precautions
When setting file registers and local devices in the standard RAM, memory
capacity is secured in 1024 byte units for the Q12HCPU/Q25HCPU that have the
serial number whose upper five digits are “02092” or later.
Memory capacity is secured in 512 byte units for the Q12HCPU/Q25HCPU,
Q02CPU, Q02HCPU and Q06HCPU that have the serial number whose upper
five digits are "02091" or earlier.
POINT
When specifying file registers using the serial access method (ZR ) with
commands that access the standard RAM on "02092" and subsequent High
Performance model QCPUs, the amount of time required for processing each
command from "02091" and previous High Performance model QCPUs will be
prolonged. (QnCPU: Average 0.65µs, QnHCPU: Average 1.1µs)
The processing time when the MOV command is used is shown below.
Q12HCPU Q02CPU
Command “02092” “02091” “02092” “02091”
or later or earlier or later or earlier
MOV K0 R0 0.11 0.11 0.26 0.26
MOV K0 ZR0 3.55 2.88 7.71 6.64
6 - 10 6 - 10
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(b) There are three types of memory cards for use in the High Performance
model QCPU: SRAM card, Flash card, and ATA card.
POINTS
(1) Before the memory card can be used for the first time, the memory card must
be formatted by GX Developer.
For details on the formatting procedure by GX Developer, refer to the GX
Developer manuals.
(2) Before writing data into a Flash card, all previous data stored on the Flash card
are erased. For this reason, to write data into the Flash card, you must first
read and copy all previous data stored in the Flash card before writing
necessary data. Please note that an error may occur if data stored in the Flash
card is used in a sequence program, with data being written on the Flash card.
(3) Format
The SRAM card and ATA card must have all been formatted.
Since the SRAM card and ATA card purchased are not yet formatted, use them
after formatting with GX Developer.
(The Flash card need not be formatted.)
POINT
Do not format ATA card using other than GX Developer.
(If it is formatted using format function of Windows , the ATA card may not be
R
(b) Precautions
When the SRAM card or ATA card is formatted, the "memory card
information area" is automatically secured, reducing the space by the size
of the "memory card information area".
6 - 11 6 - 11
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
1: The indicated memory capacities of the SRAM card and ATA card are those
after formatting.
6 - 12 6 - 12
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
6.6.1 Writing Data to the standard ROM or to the Flash card using GX Developer
The "write to PLC" function in the GX Developer Online menu does not allow the user
to write files into a standard ROM or on a Flash card. For writing files to a standard
ROM or to a Flash card by operating from GX Developer, GX Developer Online menu
provides two functions: "Write the program memory to ROM" and "Write to PLC (Flash
ROM)."
(b) When the "Write a memory to ROM" function is executed, all files stored in
the standard ROM or Flash card are erased before a batch of files stored in
a program memory are written. No files can be added to the standard ROM
or Flash card.
(c) The memory capacity of a standard ROM or Flash card is the same as that
of a program memory. A memory of a larger size than the memory capacity
of a program memory cannot be used.
(d) To execute the "Write the program memory to ROM" function, set the length
of GX developer's time-check to 60 seconds or longer. Shorter time-check
may cause a time-out on the GX Developer side. To execute the "Write the
program memory to ROM" function via the CC-Link network by operating
from a GX Developer at a local station, set the length of CC-Link's CPU
monitoring time (SW0A) to 60 seconds or longer. The default is 90
seconds. Use the default value when making the setting.
(b) The "Write to PLC (Flash ROM)" function can fill all available space in a
standard ROM or Flash card. If a program that contains a small number of
steps is written to a Flash card, it will take long to fill the Flash card with
programs. When a RS-232 interface is mounted at Q2MEM-4MBF, a baud
rate of 115.2k bps takes about 14 minutes. To write data to a Flash card,
increase a baud rate or use a USB interface. If the "Write to PLC (Flash
ROM)" function is executed from a local station, communication time will be
longer.
(c) To execute the "Write to PLC (Flash ROM)" function, set the length of
GX Developer's time-check to 60 seconds or longer. Shorter time-check
may cause a time-out on the GX Developer side. To execute the "Write to
PLC (Flash ROM)" function via the CC-Link network by operating from GX
Developer at a local station, set the length of CC-Link's CPU monitoring
time (SW0A) to 60 seconds or longer. The default is 90 seconds. Use the
default value when making the setting.
6 - 13 6 - 13
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(d) When the "Write to PLC (Flash ROM)" function is executed, all files stored
in the standard ROM or on the Flash card are erased before a batch of files
specified by GX Developer are written. No files can be added to the
standard ROM or Flash card. To add new files to old files, read all the old
files from High Performance model QCPU and write them again into the
High Performance model QCPU.
(e) The "Write to PLC (Flash ROM)" function can be executed when the High
Performance model QCPU is in RUN status. However, for the following
cases, execute the "Write to PLC (Flash ROM)" function after the High
Performance model QCPU enters into STOP status.
1) The file registers of the Flash card is used in a sequence program.
2) The file registers are used in a sequence program by setting the file
register to "set not to use" in the PLC parameter.
If the "Write to PLC (Flash ROM)" function is executed when the High
Performance model QCPU is in RUN status, an error may occur and the
High Performance model QCPU may stop running.
(f) While the "Write to PLC (Flash ROM)" function is executed, the read/write
cannot be made from other modules. This may cause a time out on the side
of other modules.
POINT
When the High Performance model QCPU is expanded to STOP status and Write
to PLC (Flash ROM) is being performed, do not set it in RUN status.
RUN cannot be performed normally during Write to PLC (Flash ROM).
Perform RUN after Write to PLC (Flash ROM) is completed.
6 - 14 6 - 14
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
6.6.2 Automatic write to standard ROM (Auto Download all Data from Memory card to
Standard ROM)
"Automatic write to standard ROM" function writes the parameters and sequence
programs stored on the memory card into the High Performance model QCPU's
standard ROM without using GX Developer. (The writing of parameters and sequence
programs into the memory card is performed by GX Developer (Version 6 or later.)
With this function, the parameters and sequence programs are booted from the
memory card to the program memory, and the booted parameters and sequence
programs are then written from the program memory into the standard ROM, as shown
below.
High Performance model QCPU
Memory card Program memory
• Parameters • Parameters
Boot
• Sequence • Sequence
programs programs
Writing
Standard ROM
• Parameters
• Sequence
programs
"Automatic write to standard ROM" is used to change the High Performance model
QCPU programs that perform ROM operations with the standard ROM.
Overwriting in the standard ROM is performed by GX Developer, but using "Automatic
write to standard ROM" moves the memory card in which the parameters and the
changed programs are written to the High Performance model QCPU, so that they are
written into the standard ROM from the memory card.
"Automatic write to standard ROM" is available with a combination of the High
Performance model QCPU with the upper five digits of its serial No. as "02092" or later
and GX Developer Version 6 or later.
If the memory card, in which "Automatic write to standard ROM" is set, is mounted in the
High Performance model QCPU whose the upper five digits of its serial No. is the
"02092," or later the boot operations are performed from the standard ROM.
The followings are necessary for "Automatic write to standard ROM".
• Set "Automatic write to standard ROM settings" in the “(PLC) Parameters dialog box".
• Memory card on which the parameters and programs are stored.
• Memory card mounted onto the High Performance model QCPU and the High
Performance model QCPU switch settings.
POINT
Perform "Automatic write to standard ROM" after the High Performance model
QCPU control is suspended.
A suspension error (BOOT OK (Error Code: 9020)) occurs when automatic write to
standard ROM is completed.
It is necessary to reset the High Performance model QCPU or restart, the power
supply to the PLC after "Automatic write to standard ROM" is completed.
6 - 15 6 - 15
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(c) The parameters and programs will be booted from the standard ROM to the
program memory to enable actual operations when the PLC is switched on.
6 - 16 6 - 16
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(2) Precautions
This section indicates the precautions for performing "Automatic write to standard
ROM"
(a) If the file to be booted from the memory card shares the same name as a
file in the program memory, the memory card data will be overwritten. Also,
if the file to be booted from the memory card does not share the same
name as a file in the program memory, it will be added to the program
memory. The "FILE SET ERROR (Error code: 2401)" will occur at this time
if the capacity of the program memory is exceeded.
(b) It is possible to select whether to perform the boot after the program
memory has been cleared, or perform the boot without clearing the program
memory when booting from the memory card to the program memory.
Performing the boot after the program memory has been cleared when
"Automatic write to standard ROM" prevents the program memory from
overflowing during the boot.
(c) The "Auto Download all Data from Memory card to Standard ROM" setting at
the "Boot file" tab screen is valid only when the High Performance model
QCPU parameter valid drive is to "Memory Card".
The "Auto Download all Data from Memory card to Standard ROM" setting
at the "Boot file” tab screen is disabled if the parameter valid drive is set to
"Program Memory" or "Standard ROM".
6 - 17 6 - 17
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
6 - 18 6 - 18
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(3) Changing Program Files While the High Performance model QCPU
is in the Run Status.
(a) While the High Performance model QCPU is in RUN status,
addition/change/deletion of program files from the standard ROM or
memory card to the program memory can be made by using any of the
following instructions in a sequence program.
• PLOAD (Loading program from memory card)
• PUNLAOD (Unloading program from program memory)
• PSWAP (Load + Unload)
For details on the PLOAD, PUNLAOD and PSWAP instructions, refer to the
QCPU (Q Mode)/QnACPU Programming Manual (Common Instructions).
(b) Even if a program file is changed while the High Performance model QCPU
is in RUN status, the settings specified at the "Program" tab screen the
“(PLC) Parameter" dialog box will remain unchanged. When the High
Performance model QCPU is in STOP status, the settings made at the
"Program" tab screen in the “(PLC) Parameter" dialog box must be adjusted
to any changes (addition, change or deletion of program names) made
when the High Performance model QCPU was in RUN status.
If no adjustment is made at the "Program" tab screen in the “(PLC)
Parameter" dialog box, an error may occur when the High Performance
model QCPU enters into RUN status from STOP status.
(b) If programs are written in the program memory during RUN status while a
boot run is performed from a memory card (RAM), any change made will be
reflected in the programs stored on the memory card (RAM). For details on
the writing of programs during RUN status, see Section 7.10.
(c) If programs are written in the program memory during RUN status while a
boot run is performed from a standard ROM/memory card (ROM), any
change made will not be reflected in the programs stored in the standard
ROM or the memory card (ROM).
(d) At the "Boot file" tab screen in the “(PLC) Parameter" dialog box, set the
maximum number of boot files to the number of files stored in the program
memory. The number of boot files will be decreased by one in the following
cases where:
• A header is specified.
• A PLC parameter in which a boot file setting is maded is booted.
(e) If boot operation is made under the following conditions, it may take
maximum 200 ms for each 1k steps (4kbyte) during boot sequence.
• To boot from an ATA card.
• To boot from standard ROM with an ATA card mounted.
6 - 19 6 - 19
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
6 - 20 6 - 20
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
Execution program
The area is allocated in file size unit.
(b) As shown below, the size of a program stored in the High Performance
model QCPU includes all the above components.
1) File header: The file name, file size, and file creation data, etc., are
stored in this area.
The file header size changes between 25 and 35 steps (100 and 140
bytes) depending on the device setting in the PLC parameter dialog
box.
2) Execution program: The created program is stored in this area.
1 step is 4 bytes.
3) Memory allocated for "Write during RUN": This area is used when write
during RUN that write during RUN increases the number of steps is
executed from GX Developer.
Default value is set to 500 steps (2000 bytes).
The number of memory allocated for "Write during RUN" can be
changed using the online write to PLC program.
The number of memory allocated for "Write during RUN" can be
redefined if the number of memory allocated is not sufficient for write
during RUN. (See Section 7.12.1.)
6 - 21 6 - 21
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
PRECAUTIONS
(Example) The capacity of the program whose executed program part has 491
steps is displayed on GX Developer as shown below. (The file header
is fixed to 34 steps.)
File header 34 steps
Display on GX Developer:
34 steps + 491 steps = 525 steps
2) Since a file is stored on the program memory in file size unit, the program
capacity displayed during programming with GX Developer may differ from the
capacity of the program file on the High Performance model QCPU.
Refer to Section 6.9.3 for details.
6 - 22 6 - 22
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
GX Developer online operation allows the files which are stored in the program
memory, standard ROM and memory card, to perform the file operations in the table
below.
However the available file operations vary according to the presence or absence of a
password (registered by GX Developer), the High Performance model QCPU "write
protect" switch setting status, and the High Performance model QCPU RUN/STOP
status.
REMARK
1) The codes (A, B, C, D) used at the "operation enabled/disabled" item in the above
table are explained below.
Table 6.6 Operation enabled/disabled
Code Description
A When "write prohibit" password is registered in a file
B When "read/write prohibit" password is registered in a file
C When the High Performance model QCPU's "system protect" switch is ON
D When High Performance model QCPU RUN status is in effect
6 - 23 6 - 23
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
(b) If files and data in the memory of the High Performance model QCPU is
backed up using the battery (Q6BAT), the program memory data will not be
lost when the power is switched OFF during the following file operations
which cause a file shift.
• File size change
• PLC memory arrangement
• New file creation
• Writing a program file during the RUN status
• Writing a program in excess of memory allocated for 'Write during RUN'
• Reading a file with the PLOAD instruction
Files stored in the memory card will not be lost unless the memory card is
removed from the High Performance model QCPU while the power is OFF.
POINT
If the above operations are done, the half-processed data will be stored in the High
Performance model QCPU internal memory, and will be restored when power is
switched ON again. A battery backup is required in order to save internal memory
data for this reason.
REMARK
For details on the PLOAD instruction, refer to the QCPU (Q Mode)/QnACPU
Programming Manual (Common Instructions).
6 - 24 6 - 24
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
The file size differs with the types of files used. When a program memory, standard
RAM, standard ROM, and memory card are used, calculate the size of a file by
referring to the table 6.7 shown below.
6 - 25 6 - 25
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
The memory capacity for files indicates a capacity after the files have been written to
the memory area.
For the files transferred from the memory card to the program memory in boot
operation, note that the secured memory capacity changes after transfer.
Memory Area
File Size Unit of Program Memory/Standard
ROM/Flash Card 1
CPU Module Type
Q02CPU
Q02HCPU 128 steps/512 bytes 2
Q06HCPU
Q12HCPU 256 steps/1024 bytes 2
Q25HCPU 512 steps/2048 bytes 2
1: The file size unit of the Flash card applies to the case where the
program memory contents are written to the Flash card via the CPU
module using GX Developer.
2: 1024 steps/4096 bytes for the CPU module whose first five digits of
serial No. are "04121" or earlier.
(b) File size units classified by memory cards
1: The file size unit of the Flash card applies to either of the following
cases.
1) Where files are written to the Flash card via the CPU module using
GX Developer.
2) Where files bypass the CPU module and are written to the Flash
card using GX Developer.
6 - 26 6 - 26
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
Parameter Parameter
564 bytes
file file
Sequence Sequence
525 steps
program program
6 - 27 6 - 27
6 MEMORIES AND FILES HANDLED BY HIGH PERFORMANCE MODEL QCPU
MELSEC-Q
3) Calculation result
File name File capacity Memory capacity
512 steps
PARAM.QPA 564 bytes
(2048 bytes)
Sequence program
525 steps
capacity
1536 steps
MAIN.QPG Steps secured for write
500 steps (6144 bytes)
during RUN
Total 1025 steps
2048 steps
Memory capacity total
(8192 bytes)
POINT
(1) The file, which was executed in the CPU whose serial No. is "04122" or later,
may not be executed in the CPU whose serial No. is "04121" or earlier.
(2) About combination of write to PLC and GX Developer
The following table indicates the combinations of the CPU module and GX
Developer versions used when files are read from the CPU module to GX
Developer and written to the other CPU module.
Legend : Write to PLC enabled : Restrictions on write to PLC
6 - 28 6 - 28
7 FUNCTION
MELSEC-Q
7 FUNCTION
Function of High Performance model QCPU module is as follows:
7.1 Function List
Functions of High Performance model QCPU are listed below:
Item Description Reference section
Constant scan This function executes the program in a set time interval regardless of the program scan time. Section 7.2
Latch function This function maintains the device data when performing the reset operation during power off. Section 7.3
Output status selection function for
This function selects the output Y status (output before STOP/output after the calculation execution)
transition from STOP status to RUN Section 7.4
when the CPU module is set from STOP status to RUN status.
status
Clock function This function executes the CPU module internal clock. Section 7.5
Remote operation This function operates the CPU module from a remote place. Section 7.6
Remote RUN/STOP This function stops and starts operating the CPU module. Section 7.6.1
Remote PAUSE This function stops the CPU module operation while retaining the output (Y) of the CPU module. Section 7.6.2
Remote RESET This function resets the CPU module when the CPU module is in a STOP status. Section 7.6.3
Remote latch clear This function clears the latch data of the CPU module when the CPU module is in a STOP status. Section 7.6.4
Input response time selection for input The response time of the input module/ Composite I/O module compatible with Q Series can be
Section 7.7.1
module compatible with Q Series selected from 1 ms, 5 ms, 10 ms, 20 ms and 70 ms with this function. (Default: 10 ms)
Input response time selection for high
The response time of the high speed input module compatible with Q Series can be selected from
speed input module compatible with Section 7.7.2
0.1 ms, 0.2 ms, 0.4 ms, 0.6 ms and 1 ms with this function. (Default: 0.2 ms)
Q Series
Input response time selection for
The response time of the interrupt module compatible with Q Series can be selected from 0.1 ms,
interrupt module compatible with Q Section 7.7.3
0.2 ms, 0.4 ms, 0.6 ms and 1 ms with this function. (Default: 0.2 ms)
Series
This function sets whether the output to the Q series compatible output module, hybrid I/O module
Error-time output mode setting Section 7.8
or intelligent function module will be cleared or held when the CPU module results in a stop error.
Hardware error-time CPU operation This function sets whether the operation of the CPU module will be stopped or continued when the
Section 7.8
mode setting hardware error of the intelligent function module occurs.
Switch setting of intelligent function Use this function for various settings of the intelligent function module. (Refer to each intelligent
Section 7.10
module compatible with Q Series function module for the details of the setting.)
This function monitors the status of programs and devices on the CPU module by operating from
Monitoring function Section 7.11
the GX Developer.
Set monitor conditions This function monitors using a fine timing of the CPU module. Section 7.11.1
This function monitors and/or tests the local devices of the designated program using the GX
Monitor/test local Devices Section 7.11.2
Developer.
7 Turn ON/OFF external I/O This function forcibly turns the external I/O of the CPU module on or off from the GX Developer. Section 7.11.3
Write during RUN This function writes programs when the CPU module is in the RUN status. Section 7.12
This function displays the processing time of a program being executed, the number of times to
Measure execution time Section 7.13
execute an interrupt program, and the execution time of a program.
Program list monitor This function displays the processing time of a program being executed. Section 7.13.1
Interrupt program monitor This function displays the number of times to execute an interrupt program. Section 7.13.2
Scan time measurement This function measures the execution time of a program between selected steps. Section 7.13.3
Sampling trace function This function samples specified device data from the CPU module at a specified timing. Section 7.14
Multiple-user debugging function This function enables multiple users to debug programs by using several GX Developers. Section 7.15
Watch dog timer This function monitors operational delays caused by CPU module's hardware and program errors. Section 7.16
Self-Diagnosis function This function enables the CPU module to check for failures. Section 7.17
Failure history This function stores a failure history of diagnosis results in the memory. Section 7.18
This function prevents the programs from being modified from GX Developer, serial communication
System protect Section 7.19
module or like.
This function provides read/write protection for files stored in the CPU module against access from
Password registration Section 7.19.1
the GX Developer.
A function to prevent illegal access from external sources with serial communication modules and
Remote password Section 7.19.2
Ethernet modules.
System display This function connects to the GX Developer and monitors system configuration. Section 7.20
LED display This function enables the front-mounted LEDs to indicate the operating conditions of the CPU module. Section 7.21
LED display This function indicates the normal or abnormal operating conditions of the CPU module. Section 7.21.1
Preference setting This function sets failure preferences to turn off LED displays. Section 7.21.2
This function executes an interrupt program by fixed scan interrupt at 0.2ms to 1.0ms intervals
High speed interrupt function Section 7.22
using the interrupt pointer I49.
This function monitors the access interval time (time between the access acceptance of the CPU
Module service interval time read module and the next access acceptance) of the intelligent function module, network module or Section 7.23
peripheral device.
7-1 7-1
7 FUNCTION
MELSEC-Q
Wait time
5ms 2ms 6ms 1ms 5ms 2ms
Scan time when constant scan is set to 10 ms during multiple program execution
Sequence program A
Sequence program B
Sequence program C 7
END processing
Wait time
8ms 2ms 9ms 1ms
10ms 10ms
REMARK
When using a low speed execution type program, the constant scan function setting
or low speed execution type program execution time must be set.
7-2 7-2
7 FUNCTION
MELSEC-Q
(b) Set the set time of the constant scan longer than the maximum scan time of
the sequence program. Also, set the constant scan set time shorter than
the WDT set time.
(WDT Set Time) > (Constant Scan Set Time) > (Sequence Program maximum Scan Time)
If the sequence program scan time is longer than the constant scan set time,
the High Performance model QCPU detects PRG.TIME OVER (an error
code: 5010), the sequence program is executed with the scan time by
ignoring the constant scan.
Constant scan setting
0 1 2 3 4 1 2 3 4 5 1 2 3 4 1 2 3 4 ms
Constant
scan
0 END 0 END 0 END 0 END 0
Sequence
program
3.5ms 0.5ms 3.5ms 3.4ms 0.6ms
4ms 5.3ms 4ms 0.5ms 4ms
Fig. 7.2 Operation when the Scan Time is longer than the Constant Scan
If the time is longer than the WDT set time, the High Performance model
QCPU detects a WDT error and stops the program execution.
7-3 7-3
7 FUNCTION
MELSEC-Q
(c) The sequence program processing stops during the wait time from the last
END processing execution until the next scan starts.
1) If a low speed execution type program is executed, it will be interrupted
for - 0.5 ms (a constant scan time setting).
2) If an interrupt factor occurs after the END processing is performed, the
interrupt program or fixed scan execution type program is executed.
REMARK
Refer to "QCPU (Q mode)/QnACPU Programming Manual (Common Instructions)"
for the command processing time.
7-4 7-4
7 FUNCTION
MELSEC-Q
(b) The latch can be used to continue control by maintaining the production
quantity, defect count, and address even when there is a momentary power
failure for more than the permissible amount of time.
7-5 7-5
7 FUNCTION
MELSEC-Q
POINT
File registers (R) cannot be cleared with latch clear.
(See Section 10.7 for clearing file registers.)
(4) Precautions
(a) Even if the device has been latch-specified, it will not be latched the when
the local device or the device initialization is specified.
(b) The device details of the latch range are maintained with the battery
(Q6BAT) attached to the High Performance model QCPU.
1) The battery is necessary to latch the device if ROM operation is
performed using the sequence program that has been stored on the
standard ROM or memory card.
2) Take care that, if the battery connector is disconnected from the
connector of the High Performance model QCPU when PLC is turned
off, the latch range device memory is not retained but becomes
undefined.
7-6 7-6
7 FUNCTION
MELSEC-Q
7.4 Setting the Output (Y) Status when Changing from/to STOP Status to/from RUN Status
(1) Output (Y) Status when changing from STOP Status to RUN Status
When changing from RUN status to STOP status, the RUN status output (Y) is
stored in the sequence and all the outputs (Y) are turned OFF.
The status after transition from STOP to RUN can be selected from the following
two options with the High Performance model QCPU.
• The output status prior to STOP is output.
• The output is cleared.
(Default: After transition from STOP to RUN, the output (Y) status prior to
STOP is output then the program is executed.)
(a) Output (Y) status prior to STOP is output
After the output (Y) status before the STOP status is output, the sequence
program calculations are performed.
Fig. 7.3 Processing when Change from STOP Status to RUN Status
7-7 7-7
7 FUNCTION
MELSEC-Q
(2) Setting the Output (Y) Status when Changing from STOP Status to
RUN Status
The output (Y) status before the STOP status when switching from STOP status
to Run status can be set at the "PLC System" tab screen in the “(PLC)
Parameter" dialog box.
(3) Precaution
If an output (Y) is forcefully turned ON with the High Performance model QCPU
in the STOP status, it will not remain in the ON status even if the STOP status is
switched to the RUN status.
The output status is effected as set for "Output mode at STOP to RUN" at the
"PLC System" tab screen.
7-8 7-8
7 FUNCTION
MELSEC-Q
7-9 7-9
7 FUNCTION
MELSEC-Q
MOVP K8 D1 Month 8
DATEWR D0
REMARK
1) Time Data can be written to and read from by special relays (SM210 to SM213)
and special registers (SD210 to SD213).
See Appendix 1 for details on special relay. See Appendix 2 for details on
special registers.
2) : The figure below shows the clock data stored in D10 to D16.
D10 1999 4 digits in AD
D11 8 Month
D12 10 Date
D13 11 Hour See Section 7.5(1).
D14 35 Minute
D15 24 Second
D16 2 Day of the week
7 - 10 7 - 10
7 FUNCTION
MELSEC-Q
(3) Precautions
(a) The clock data is not set prior to shipment.
The clock data is used in High Performance model QCPU system and
intelligent function module for failure history and other functions. Be sure to
set the accurate time when operating the High Performance model QCPU
for the first time.
(b) Even when a part of the time data correcting, all data must be written to the
clock element again.
(c) The data to be written to the clock element is checked in the range
described in (1) (b) of Section 7.5.
For this reason, if improbable clock data in the range described in (1) (b) of
Section 7.5 is written to the clock element, correct clock operation is
unavailable.
Example
Writing to clock element CPU module operation status
February 30 Executed Error is not detected
When DATEWR instruction is executed:
32 of month 13 Not executed OPERATION ERROR (Error code 4100)
When SM210 is on: SM211 is on
7 - 11 7 - 11
7 FUNCTION
MELSEC-Q
The High Performance model QCPU provides the RUN/STOP switches for switching
between the STOP status and the RUN status. The RESET/L.CLR switch also
provides the Reset and Latch Clear functions.
The High Performance model QCPU can allow control of the High Performance model
QCPU operation status by external operations
(GX Developer function, intelligent function module, and remote contact).
The following four options are available for remote operations:
• Remote RUN/STOP
• Remote PAUSE
• Remote RESET
• Remote LATCH CLEAR
REMARK
The serial communication module is used as the example to describe the intelligent
function module.
(b) Using remote RUN/STOP for the following remote operations are useful:
1) When the High Performance model QCPU is at a position out of reach
2) When performing RUN/STOP of the control board High Performance
model QCPU externally
7 - 12 7 - 12
7 FUNCTION
MELSEC-Q
OFF
Remote RUN contact
STOP
RUN
CPU module: RUN/STOP status
STOP status
Fig. 7.4 Time Chart for RUN/STOP with Remote RUN Contact
STOP status
7 - 13 7 - 13
7 FUNCTION
MELSEC-Q
(3) Precautions
(a) Take note of the following, because STOP has priority in High Performance
model QCPU:
1) The High Performance model QCPU enters the STOP status when
remote STOP is performed from remote RUN contact, GX Developer,
or by using serial communication module.
2) To set the High Performance model QCPU to RUN status from STOP
status again, perform the remote RUN from the external factor (remote
RUN contact, GX Developer, serial communication module, etc.) from
which the remote STOP was performed.
REMARK
The RUN/STOP status is described below:
• RUN Status ...............Status in which the calculations are repeatedly executed
from step 0 to the END/FEND instruction in the sequence
program.
• STOP Status .............Status in which the sequence program calculations are
stopped and the output (Y) is all OFF.
7 - 14 7 - 14
7 FUNCTION
MELSEC-Q
(b) This can be used to maintain the output (Y) on even if the High
Performance model QCPU is changed to STOP status, in such areas as
process control.
POINT
The output (Y) is turned off upon a stopping error.
To retain the output even upon a stopping error, use I/O allocation of PC
parameters to set output retention.
OFF
SM206
ON
OFF ON when
SM204 PAUSE
PAUSE
condition
RUN met
RUN/PAUSE
status
PAUSE status
7 - 15 7 - 15
7 FUNCTION
MELSEC-Q
0 END
0 END 0
0 END
ON
OFF
Remote PAUSE
command ON
OFF
Remote RUN
command ON
OFF ON when
SM204
PAUSE PAUSE
condition
RUN met
RUN/PAUSE
status
PAUSE status
(3) Precaution
To set the output (Y) ON/OFF status when change to the PAUSE status, perform
an interlock with the PAUSE status contact (SM204).
M20 Y70 ON/OFF is determined with the
Y070 ON/OFF of the M20 in the PAUSE status.
X000 SM204
Y071 Turns off at PAUSE status.
M0
Y072 Turns on at PAUSE status.
SM204
7 - 16 7 - 16
7 FUNCTION
MELSEC-Q
Allow the
"Remote reset"
(b) When the High Performance model QCPU is in RUN status, use remote
STOP to arrange the STOP status.
(c) Reset High Performance model QCPU by the remote RESET operation.
1) For the GX Developer, this is performed by on-line remote operation.
2) The serial communication module and Ethernet interface module are
controlled by commands complying with the MC protocol.
For details of the MC protocol, refer to the following manual.
• Q Corresponding MELSEC Communication Protocol Reference Manual
7 - 17 7 - 17
7 FUNCTION
MELSEC-Q
(3) Precautions
(a) To perform the remote RESET, check the "Allow" check box of the "Remote
reset" section at the "PLC system" tab screen in the “(PLC) Parameter"
dialog box, and then write parameters into High Performance model QCPU.
If the "Allow" check box is not checked, a remote RESET operation is not
performed.
(b) Remote RESET cannot be performed when the High Performance model
QCPU is in RUN status.
(c) After the reset operation is complete, the High Performance model QCPU
will enter operation status set at the RUN/STOP switch.
1) With the RUN/STOP switch in the "STOP" position, the High
Performance model QCPU enters into the "STOP" status.
2) With the RUN/STOP switch in the "RUN" position, the High
Performance model QCPU enters into the "RUN" status.
(d) Take care that Remote RESET does not reset High Performance model
QCPU if an error occurs in the High Performance model QCPU due to
noise.
If Remote RESET does not reset, use the RESET/L.CLR switch to reset or
turn the PLC off.
POINT
(1) If Remote RESET is executed when the High Performance model QCPU is
stopped due to an error, the High Performance model QCPU enters the
operation status set at the RUN/STOP switch after it is reset.
(2) Even if "Remote reset" is set as "Allow" at the "PLC system" tab screen in the
“(PLC) Parameter" dialog box, the remote process of the GX Developer is
completed.
However, the High Performance model QCPU is not reset since the reset
process is not performed in it.
If the status of the High Performance model QCPU does not change though a
reset process is performed from GX Developer, check if the "Remote reset" is
set as "Allow" at the "PLC System" tab screen in the “(PLC) Parameter" dialog
box.
7 - 18 7 - 18
7 FUNCTION
MELSEC-Q
(b) Remote latch clear is useful when the High Performance model QCPU is in
the following areas. In these cases, the operations are performed in
combination with the remote RUN/STOP.
• When the High Performance model QCPU is at a position out of reach
• When externally performing latch clear of the High Performance model
QCPU inside a control panel.
(b) Use the Latch Clear to bring the High Performance model QCPU to the
Latch Clear status.
1) The GX Developer operations are performed by on-line remote
operation.
2) The serial communication module and Ethernet interface module are
controlled by commands complying with the MC protocol.
For details of the MC protocol, refer to the following manual.
• Q Corresponding MELSEC Communication Protocol Reference Manual
(c) To return the High Performance model QCPU to RUN status after the
remote latch clear, perform a remote RUN operation.
(3) Precautions
(a) Either remote latch clear or latch clear by RESET/L.CLR switch cannot be
performed when the High Performance model QCPU is in RUN status.
(b) The latch range for the device set at the "Device" tab screen in the “(PLC)
Parameter" dialog box includes a range that makes latch clear
(RESET/L.CLR switch) valid or invalid.
Remote latch clear operation is reset in the range of latch clear valid
setting.
(c) Devices that are not latched are cleared when the remote latch clear is
performed.
The data in the failure history storage memory of the High Performance
model QCPU will also be cleared by a remote latch clear operation.
7 - 19 7 - 19
7 FUNCTION
MELSEC-Q
7.6.5 Relationship of the remote operation and High Performance model QCPU RUN/STOP
switch
1 When performing the operation with remote RUN contact, "RUN-PAUSE contact" must be
set at the "PLC system" tab screen in the “(PLC) Parameter" dialog box.
2 When performing the operation with remote PAUSE contact, "RUN-PAUSE contact" must
be set at the "PLC system" tab screen in the “(PLC) Parameter" dialog box. In addition, the
remote PAUSE enable coil (SM206) must be set ON.
3 "Remote reset enable" must be set at the "PLC system" tab screen in the “(PLC)
Parameter" dialog box.
4 RESET or LATCH CLEAR can be performed if the High Performance model QCPU
changed to the STOP status by a remote operation.
5 This includes a situation where the High Performance model QCPU is stopped due to error.
7 - 20 7 - 20
7 FUNCTION
MELSEC-Q
7.7 Selecting the Input Response Time of the Q Series Module (I/O Response Time)
OFF
External input
ON
OFF
Input module
(3) Reactions
(a) Higher input response time may result in response to inputs being
influenced by noise. Set the desired input response time by taking into
consideration the operating environment of an input module in use.
(b) No change can be made to the input response time of an AnS Series
corresponding input module. An input response time setting is not made for
a slot of an AnS Series corresponding input module.
(c) The input response speed setting is valid in the following cases.
• After the PLC is turned on
• When the High Performance model QCPU is reset
7 - 21 7 - 21
7 FUNCTION
MELSEC-Q
7.7.2 Selecting the response time of the high speed input module
(1) Selecting the response time of the high speed input module
Changing the response time of the high speed input module means to amend the
input response speed for high speed input modules (QX40-S1) that support the
Q Series to 0.1 ms, 0.2 ms, 0.4 ms, 0.6 ms and 1 ms.
Input from external devices is accepted at the input response speed set for the
high speed input module. The default setting for the input response time is
0.2 ms.
ON
OFF
External input
ON
High-speed OFF
input module
(3) Precautions
(a) The system will be adversely affected by noise, etc., when the input
response time is set to high speed. Set the input response time in
consideration of the operating environment.
(b) The GX Developer Version 5 (SW5D5C-GPPW-E) or later is required when
changing the response time of the high speed input module.
The input response time of the high speed input module cannot be
amended with the GX Developer Version 4(SW4D5C-GPPW-E.) (Fixed at
0.2 ms (default setting.)
(c) The input response speed setting is valid in the following cases.
• After the PLC is turned on
• When the High Performance model QCPU is reset
7 - 22 7 - 22
7 FUNCTION
MELSEC-Q
OFF
External input
ON
OFF
Interrupt module
(3) Precautions
(a) The system will be adversely affected by noise, etc., when the input
response time is set to high speed. Set the input response time in
consideration of the operating environment.
(b) The input response time cannot be amended for the A1SI61 (interruption
module that supports the AnS Series.) No processing will be performed
with interruption modules that support the AnS Series, even if the input
response time is set in the slot.
(c) The GX Developer Version 6 (SW6D5C-GPPW-E) or later is required when
changing the response time of the interrupt module.
The input response time of the interrupt module cannot be amended with
the SW5D5C-GPPW-E or earlier GX Developers. (Fixed at 0.2 ms (default
setting.))
(d) The input response speed setting is valid in the following cases.
• After the PLC is turned on
• When the High Performance model QCPU is reset
7 - 23 7 - 23
7 FUNCTION
MELSEC-Q
(3) Precautions
The error-time output mode setting is made valid when:
The PLC CPU is powered ON; or
The CPU module is reset.
Failure to perform either operation after changing the error-time output mode
setting will result in "PARAMETER ERROR (error code: 3000)".
7 - 24 7 - 24
7 FUNCTION
MELSEC-Q
(3) Precautions
(a) The hardware error-time CPU operation mode setting is made valid when:
• The PLC CPU is powered ON; or
• The CPU module is reset.
Failure to perform either operation after changing the hardware error-time
CPU operation mode setting will result in "PARAMETER ERROR (error
code: 3000)".
7 - 25 7 - 25
7 FUNCTION
MELSEC-Q
(3) Precautions
(a) Do not apply the switch setting for an intelligent function module to an AnS
Series corresponding special function module.
If the switch setting for an intelligent function module is specified for an AnS
Series corresponding special function module, an error (SP.PARA.ERROR)
will occur.
(b) For details on the switch setting for an intelligent function module, refer to
the manual of the intelligent function module in use.
(c) The switch settings for interruption modules with the GX Developer Version 6
(SW6D5C-GPPW-E) or later are made by setting the type to "Interruption".
The switch settings for interruption modules with the SW5D5C-GPPW-E or
earlier GX Developers are made by setting the type to "Intelligent".
Refer to the following manual for further details on the interruption module's
switch settings.
• Building Block I/O Module User's Manual
(d) The switch setting of the intelligent function module is valid in the following
cases.
• After the PLC is turned on
• When the High Performance model QCPU is reset
7 - 26 7 - 26
7 FUNCTION
MELSEC-Q
REMARK
When "Step No. [ 0]" is specified, set the condition to "Always".
7 - 27 7 - 27
7 FUNCTION
MELSEC-Q
POINT
If a step between the AND/OR blocks is specified as a monitor condition, monitor
data is sampled 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 2nd
step is ON (Step No. [ 2] = <ON>).
(1) When the 2nd step is connected by the AND instruction:
As shown below, the monitor execution condition is established when both "X0"
and "X1" are ON.
Circuit mode List mode
2nd step
0 LD X0
X0 X1 X2 1 AND X1
0 Y20
2 AND X2
3 OUT Y20
(2) When the 2nd step is connected between the AND/ON blocks:
As shown below, the monitor execution condition is established when "X1" is
ON. Whether "X0" is ON or OFF, it does not affect the monitor execution
condition.
0 LD X0
2nd step
1 LD X1
X0 X1 X2 2 AND X2
0 Y20
3 OR X3
X3 4 ANB
5 OUT Y20
(3) If the beginning of a ladder block not at Step 0 is specified in Step No. as a
detailed condition, monitor data is collected when the execution status of the
instruction immediately before execution becomes the specified status. If (Step
No. [ 2] = <ON>) is specified in the following ladder, monitor data is collected
when OUT Y10 turns ON.
X0 0 LD X0
0 Y10
1 OUT Y10
X1 2 LD X1
2 Y11
3 OUT Y11
POINT
When "Step No.[100]=<-P->, Word Device [D1]=[K5]" is specified as the detailed
condition in the following circuit, a monitor execution condition is established at the
leading edge of the 100th step where D1=5.
X0 M0 100th step
Y20
INC D1
M0
X0
D1 = 5
Monitor timing
(QCPU)
7 - 29 7 - 29
7 FUNCTION
MELSEC-Q
(3) Precautions
(a) When monitoring after setting the monitor condition, the file displayed on GX
Developer is monitored. Match the file to be monitored by executing the
"New PLC Read" and file name on GX Developer.
(b) When monitoring the file register which is not specified, 0 is displayed.
(c) Perform the monitoring by matching the device allocation of the High
Performance model QCPU and GX Developer.
(d) When monitoring the buffer memory of the intelligent function module, the
scan time takes longer, as well as when executing the FROM/TO
instruction.
(f) The monitoring detailed condition setting can only be set in circuit monitor.
(g) When the same device is specified as the monitor condition and monitor
stop condition, specify "ON" or "OFF".
(h) The monitoring conditions will not be established unless the following
specified steps commands are executed when "Step No." has been
specified for the monitoring conditions.
1) When skipping steps specified with the CJ command, the SCJ
command and the JMP command.
2) When the specified step is the END command, the FEND command
exists while the program is running, and the END command is not
executed.
(i) Do not reset the High Performance model QCPU while monitoring
conditions are being registered.
7 - 30 7 - 30
7 FUNCTION
MELSEC-Q
If the local device monitor setting is made and Program "B" is displayed, for
example, this makes it possible to monitor the local devices in Program "B".
High Performance model QCPU
X1 X11 X21
MOVP K3 D9 MOVP K8 D9 MOVP K6 D9
7 - 31 7 - 31
7 FUNCTION
MELSEC-Q
Select "Tool".
(3) Precautions
(a) It is only a single program that local devices can be monitored or tested by
operating from a single GX Developer. Local devices in multiple programs
cannot be monitored or tested by operating from a single GX Developer.
(c) If local devices in a stand-by type program are monitored, scan time is
extended for some time because local device data is read and saved. See
Section 10.13.1 for details.
(d) Local devices in a fix scan execution type program cannot be monitored or
tested.
7 - 32 7 - 32
7 FUNCTION
MELSEC-Q
Enforced ON/OFF operations from GX Developer will forcibly switch the external I/O
on and off.
The information registered for ON/OFF will be cancelled with GX Developer
operations.
A GX Developer Version 6 or higher is required to use this function.
It is possible to perform enforced ON (enforced ON registration,) enforced OFF
(enforced OFF registration) and cancel enforced ON/OFF (cancel registration) with the
enforced ON/OFF function.
The operations for performing enforced ON, enforced OFF and canceling enforced
ON/OFF are shown in the table below.
Operation Input (X) operation Output (Y) operation
During canceling Performs sequence program Outputs the results of sequence
(no operations) operations with external input. program operations externally.
Performs sequence program Outputs "ON" externally regardless
During enforced ON operations in the enforced ON of the results of sequence program
status. operations.
Performs sequence program Outputs "OFF" externally
During enforced OFF operations in the enforced OFF regardless of the results of
status. sequence program operations.
The operations when enforced ON/OFF is performed are shown in the diagram below.
Sequence execution
M0
Y10
X0 External input Y11
forcibly set at OFF
Y10
M1
Set at ON on the rudder
even during enforced OFF
(external output set at OFF)
END
7 - 33 7 - 33
7 FUNCTION
MELSEC-Q
(c) The input and output eligible for enforced ON/OFF are shown below.
1) Input (X) and output (Y) for modules mounted on the base unit.
2) I/O (X/Y) of High Performance model QCPU or I/O (LX/LY) of
MELSECNET/H modules to be refreshed High Performance model
QCPU.
3) I/O (X/Y) of High Performance model QCPU or I/O (RX/RY) of CC-Link
to be refreshed High Performance model QCPU.
When enforced ON/OFF registration is performed for devices outside the
above refresh ranges (ex: empty slots) only the High Performance model
QCPU device memory is set at ON/OFF, and this is not output externally.
7 - 34 7 - 34
7 FUNCTION
MELSEC-Q
(e) The timing for external I/O enforced ON/OFF is shown in the table below.
Refresh area Input Output
• During END processing (input • During END processing (output
refresh) refresh)
• During the execution of • During the execution of
I/O modules on the
commands that used direct commands that used direct
base unit (X, Y)
access input (DX) (LD, LDI, AND, access output (DY) (OUT, SET,
ANI, OR, ORI, LDP, LDF, ANDP, DELTA, RST, PLS, PLF, FF, LDF,
ANDF, ORP, ORF) MC)
I/O of High
Performance model • During END processing (MELSECNET/H refresh)
QCPU to be refreshed • During execution of the COM command
from LX, LY of • During execution of the ZCOM command
MELSECNET/H
I/O of High
Performance model • During END processing (CC-Link refresh)
QCPU to be refreshed • During execution of the COM command
from RX, RY of CC- • During execution of the ZCOM command
Link
(f) A total of thirty-two devices can be registered for enforced ON and OFF.
(g) Sequence program operations take precedence when used with an output
Y contact.
(h) The enforced ON, OFF and cancelled status (including those that are not
set up) can be confirmed with GX Developer. Confirmation is also allowed
with the MODE judgment LED when at least one device is registered. (the
MODE LED will flicker.)
(i) It is possible to register enforced ON/OFF for external I/O in the same CPU
module from multiple GX Developers connected to the network.
However, when enforced ON/OFF is registered in the same device from
multiple GX Developers, it will assume the most recent registered ON/OFF
status.
Owing to this, there are cases when the GX Developer executed first will
display different ON/OFF information to the CPU module ON/OFF information.
When performing enforced ON/OFF from multiple GX Developers, ensure
that the most up-to-date information is set with the "Load Registration
Status" switch before executing the enforced ON/OFF procedure.
7 - 35 7 - 35
7 FUNCTION
MELSEC-Q
4)
1)
5)
2)
3)
6)
7 - 36 7 - 36
7 FUNCTION
MELSEC-Q
When the High Performance model QCPU is in the RUN status, you can write
programs or files in any of the following steps:
• Writing data in the circuit mode during RUN (see Section 7.12.1).
• Writing data by using pointers during RUN (see Section 7.12.2).
• Writing a batch of files during RUN (see Section 7.15.2).
(b) The program can be changed without stopping the process in High
Performance model QCPU program by performing writing data in the circuit
mode during RUN status.
X0 X2
Y30
X1
X3 X4
SET M10
X5
END
GX Developer
MELSECNET/H
7 - 37 7 - 37
7 FUNCTION
MELSEC-Q
(2) Precautions
Take a note of the following when writing during RUN:
(a) The memory that can be written during RUN is only program memory.
1) If the write during RUN is performed while booting a program from a
memory card (RAM), the program to be booted will be changed. While
booting, it takes some time until the write during RUN is completely
executed.
2) If the write during RUN is performed while booting a program from the
standard ROM or memory card (ROM), the program to be booted will
not be changed.
Before turning off the PLC or resetting the High Performance model
QCPU, write the program memory into the standard ROM or memory
card (ROM).
(c) When a low speed execution type program is being executed, the RUN
write is started once the low speed execution type program is complete.
Also, the low speed execution is stopped temporarily during a RUN write.
1) 2) 3) 4)
Scan execution type Scan execution type Scan execution type Scan execution type
program step 0 to END program step 0 to END program step 0 to END program step 0 to END
Low speed execution Low speed execution Low speed execution Low speed execution
type program step type program step type program step type program step
0 to 200 201 to 320 321 to END 0 to 120
(d) If the write during RUN is executed while the PLOAD, PUNLOAD or
PSWAP instruction is executed, the processing will enter into a stand-by
status for the write during RUN. If the write during RUN is executed while
the PLOAD, PUNLOAD or PSWAP instruction is executed, the execution of
the instruction is delayed until the write during RUN is executed.
7 - 38 7 - 38
7 FUNCTION
MELSEC-Q
(e) The capacity of a High Performance model QCPU's program file is a sum of
the capacity of the program created and steps used for the write during
RUN. The write during RUN is executed when the capacity of a program file
is increased. If the capacity of a program file becomes larger than what it
was before, steps can be assigned for the write during RUN. This means
that the write during RUN can be executed only when enough space is
available in a user memory area. If steps are assigned again while the write
during RUN is executed, scan time could be extended for a value shown
below in the table. Controls are interrupted for a value shown below in the
table.
Step for Write During RUN
CPU Type
If Not Changed If Assigned Again
QnCPU max. 2 ms max. 30 ms.
QnHCPU max. 1 ms max. 90 ms
(f) High Performance model QCPU does not work correctly, if the following
instructions are written during RUN write.
1) Trailing edge instruction
If the execution conditions of the following trailing edge instructions are
not arranged upon completion of writing, the trailing edge instruction is
executed.
• LDF
• ANDF
• ORF
• MEF
• PLF
2) Leading edge instruction
If the execution conditions for leading edge instructions (PLS instruction
and P instruction) are arranged upon completion of writing, leading
edge instruction is not executed.
The leading edge instruction is executed when the execution conditions
are OFF then ON.
3) SCJ instruction
If the execution conditions of the SCJ instruction are arranged upon
completion of writing, a jump to the designated pointer occurs even in a
scan cycle.
7 - 39 7 - 39
7 FUNCTION
MELSEC-Q
High Performance model QCPU Built-in Memory Card (RAM) Memory Card (ROM)
Memory Name
Program Memory Standard RAM Standard ROM SRAM Card Flash Card ATA Card
Parameter
Intelligent function
module parameter
Program
Device comment
Device initial value
File register
Local device
Debug data
Failure history data
PLC user data
Writing of
program file A
Program file A
Personal computer
(GX Developer)
POINT
The file-write during RUN allows writing three types of files:
• Program: program memory, SRAM card, ATA card
• Device comment: program memory, SRAM card, ATA card
• File register: standard RAM, SRAM card
Any other files cannot be written while the High Performance model QCPU is in the
RUN status.
7 - 40 7 - 40
7 FUNCTION
MELSEC-Q
(2) Precautions
The precautions for file-write during RUN are as follows.
(a) The file-write during RUN can be executed when any of the following
conditions is met.
1) Program memory
• When continuous space is available.
• When space is available.
2) Memory card
• When space is available.
(b) Please note that scan time could be extended as shown below in the table if
the file-write during RUN is executed. Controls are stopped for some time
as specified by a value in the table.
Event QnCPU QnHCPU
When continuous space is available in a program memory max. 80 ms max. 300 ms
When space is available in a program memory max. 80 ms max. 300 ms
When space is available in a memory card (except ATA card) max. 120 ms max. 570 ms
Please note that scan tame is extended for 1.25 seconds at 30 k step when
an ATA card is in use.
(c) Please note that no access can be made from an instruction in a sequence
program while a batch of files is written, with the High Performance model
QCPU in the RUN status. While the file-write during RUN is being
executed, an instruction to make access to a file is not executed.
(d) Do not execute file write during RUN simultaneously from multiple locations.
Doing so may erase program file contents.
(e) If a sequence program file being executed is written when the High
Performance model QCPU is in the RUN status, the following will not work
properly. After the write is complete, a fall instruction is executed only when
its execution condition is OFF.
• LDF
• ANDF
• ORF
• MEF
• PLF
(f) If batch write of SFC program files during RUN is executed, an initial start is
made after execution.
POINT
The following CPU module and GX Developer versions are required to execute
batch write of SFC program files during RUN.
• CPU module whose serial No. is "04122" or later
• GX Developer Version 8 or later
7 - 41 7 - 41
7 FUNCTION
MELSEC-Q
This is a function to display the processing time of the program being executed.
This is used to find out the effect of each program's processing time on the total scan
time.
There are three functions to the execution time measurement. The details of each
function are indicated in sections 7.13.1 to 7.13.3.
• Program monitor list
• Interrupt program monitor list
• Scan time measurement
(b) The scan time, number of times executed, and processing time by item can
be displayed for each program.
a)
c)
7 - 42 7 - 42
7 FUNCTION
MELSEC-Q
7 - 43 7 - 43
7 FUNCTION
MELSEC-Q
(3) Program can be started and stopped on the program list monitor
screen.
(a) Startup program button
Clicking the startup program button displays the following dialog box.
1)
2)
1) Program name
Only the program, that is set at the "Program" tab screen in “(PLC)
Parameter" dialog box, can be selected. It is not allowed to enter a
program name freely.
2) Startup mode
A stand-by type program for "Scan execution", "Low speed execution"
or "Fixed scan execution" can be set.
Startup mode defaults to the value that was set by choosing [PLC
Parameter] - <Program>. ms or s can be selected as the unit.
7 - 44 7 - 44
7 FUNCTION
MELSEC-Q
1)
2)
1) Program name
Only the program, that is set at the <Program> tab in the “(PLC)
Parameter" dialog box, can be selected.
It is not allowed to enter a program name freely.
2) Stop mode
• Executing "After stop, output stop" for the scan execution type turns
off the output (non-execution processing) at the next scan. The
program is put in the standby status at and after the next scan. (This
operation is the same as performed when the POFF instruction is
executed.)
• Executing "After stop, output stop" for the low speed execution type
suspends the execution of the low speed execution type and turns
off the output at the next scan. The program is put in the standby
status at and after the next scan. (This operation is the same as
performed when the POFF instruction is executed.)
• Executing "After stop, output stop" for the standby program stops the
program after one-scan OFF is executed as scan execution.
For this reason, "Execute count" is also increased by 1.
• "Execute count" is also increased by 1 if an error occurs in the
RET/IRET instruction during execution of one-scan OFF in the
standby program.
At this time, the execution type is "scan execution".
POINT
Depending on the instruction, the output may not turn OFF if "After stop, output
stop" is executed.
For details, refer to the section of the POFF instruction in the following manual.
• QCPU (Q Mode)/QnACPU Programming Manual (Common Instructions)
(4) Precaution
The scan time of a constant scan execution type program being executed is not
displayed on screen, but a dash (-) is displayed in the Scan Time column.
7 - 45 7 - 45
7 FUNCTION
MELSEC-Q
(b) This is used to confirm the execution status of the interrupt program.
The following shows an execution example of the interrupt program monitor list:
a) b)
a) "Execute count"
The number of times the interrupt program was executed is displayed.
This function starts counting the number when High Performance
model QCPU is in RUN status (When the number reaches 65536
times, it is reset to 0).
b) "Common Comment"
This indicates device comments created on interrupt points (I0 to
I255).
7 - 46 7 - 46
7 FUNCTION
MELSEC-Q
(b) To specify a scan time measurement range, follow either of the following
two steps:
• Make the setting on the "Ladder monitor" window.
• Make the setting on the "Scan Time Measurement" dialog box.
(c) The time for the subroutines and interrupt program can be measured as
well.
(d) The time includes the time required for processing sub-routines, when the
sub-routine CALL command is within the range of scan time measurement.
The amount of time required for executing interruption programs and fixed
scan execution type programs is all added to this.
Measurement range
Main
program
Sub-routine
program
Measurement range
Y20
50 M0
Y21
52 M1
Y22
104 M2
106 END
7 - 47 7 - 47
7 FUNCTION
MELSEC-Q
Y21
52 M1
Y22
104 M2
106 END
(3) Precautions
(a) Set the "Measurement limit" so that the value of "Start step" is larger than
that of "End step".
(b) The scan time to skip to another program file cannot be measured.
(c) If the measurement time is less than 0.100 ms, 0.000 ms is displayed.
(d) If a measurement range is specified between the FOR instruction and the
NEXT instruction, scan time will show the execution time of making a
measurement in the measurement range between specified steps.
7 - 48 7 - 48
7 FUNCTION
MELSEC-Q
POINT
(1) The SRAM card (Q2MEM-1MBS, Q2MEM-2MBS) is required to store the trace
data and trace results.
After mounting the SRAM card to the High Performance model QCPU, execute
sampling trace.
(2) Sampling trace is not executed if the Flash card (Q2MEM-2MBF, Q2MEM-
4MBF) or ATA card (Q2MEM-8MBA, Q2MEM-16MBA, Q2MEM-32MBA) is
installed, because the cards cannot store the trace data and trace results.
If the trigger point is executed, the sampling trace area data is latched after sampling as many times as specified.
7 - 49 7 - 49
7 FUNCTION
MELSEC-Q
(e) The trace result displays the ON/OFF status of the bit device for the
sampling cycle, and the current value of the word device.
POINT
Device details are read under trigger conditions specified in the trigger point setting.
Sampling is performed for each scan. Before the sampling is finished by a trigger
operation of a peripheral device, data is sampled twice because the sampling
timing is the same as that of trigger conditions.
7 - 50 7 - 50
7 FUNCTION
MELSEC-Q
(f) The execution status of the sampling trace function is stored in the special
relay (SM800, SM802, SM804 and SM805).
If an error occurs while the sampling trace function is used, SM826 turns
on. By using special relays in a sequence program, the execution status of
the sampling trace function can be checked.
1) After the "trace data" and "trace conditions" set using GX Developer
are written to the High Performance model QCPU, SM800 (sampling
trace ready) turns on. SM800 indicates whether the sampling trace can
be executed or not.
2) When a sampling trace start request is accepted, the sampling trace
starts and SM802 (sampling trace executing) turns on. SM802
indicates whether the sampling trace is executed or not.
• A trace from GX Developer starts.
• SM801 is turned on.
3) When a next trigger condition is satisfied, SM804 (after sampling trace
trigger) turns on. SM804 indicates whether the trigger conditions are
satisfied or not.
• A trigger from GX Developer executed.
• The TRACE instruction is executed.
• SM803 is turned on.
4) After the sampling trace is completed, SM805 (sampling trace
complete) is turned on.
Trigger SM801 SM801 Trigger Trace
execution OFF ON execution complete
Number of Number of
trace after trace after
trigger Clear the trace count trigger
SM800
(Sampling trace ready)
SM801
(Sampling trace start)
SM802
(Sampling trace executing)
SM803
(Sampling trace trigger)
SM804
(After sampling trace trigger)
SM805
(Sampling trace complete)
When trace is interrupted from GX Developer, the SM800 is also turned off.
7 - 51 7 - 51
7 FUNCTION
MELSEC-Q
Number of Number of
trace after trace after
trigger Clear the trace count trigger
SM800
(Sampling trace ready)
SM801
(Sampling trace start)
SM802
(Sampling trace executing)
SM803
(Sampling trace trigger)
SM804
(After sampling trace trigger)
SM805
(Sampling trace complete)
When trace is interrupted from GX Developer, the SM800 is also turned off.
7 - 52 7 - 52
7 FUNCTION
MELSEC-Q
1) Bit Device
Maximum of 50 bit devices can be set as follows.
• X, DX, Y ,DY, M, L, F, SM, V, B, SB
• T(contact), T(coil), ST(contact), ST(coil)
• C(contact), C(coil)
• J \X, J \Y, J \B, J \SB, BL \S
2) Word Device
Maximum of 50 word devices can be set as follows.
• T(current value), ST(current value), C(current value), D, SD, W, SW,
R, Z, ZR,
• U \G, J \W, J \SW
7 - 53 7 - 53
7 FUNCTION
MELSEC-Q
1) No. of traces
a) The "No. of times" sets the number of times to execute the
sampling trace from trace execution to trace complete.
b) The "After trigger number of times" sets the number of times to
executes the sampling trace from trigger execution to trace
complete.
Trace start Trigger point Trace complete
7 - 54 7 - 54
7 FUNCTION
MELSEC-Q
7 - 55 7 - 55
7 FUNCTION
MELSEC-Q
(c) The created trace data and trace condition is written to the memory card.
The trace file is written to the memory card (SRAM card).
The trace file is written to the memory card (SRAM card) from the "Write to
PLC" dialog box in the "Sampling Trace" dialog box.
The files are written in the memory card (SRAM card) with file names, so
multiple trace files can be stored.
(d) Sampling trace is executed.
The sampling trace is executed at the " Execute and status" tab screen in
the "Sampling Trace" dialog box.
7 - 56 7 - 56
7 FUNCTION
MELSEC-Q
POINT
Sampling trace is executed only once.
When re-executing, execute the TRACE instruction, and reset the sampling trace.
(3) Precautions
(a) SRAM card is required for sampling trace.
Set the sampling trace file in the memory card (SRAM).
(b) The sampling trace can be executed from other station on the network or
serial communication module. However, the trace cannot be executed from
multiple areas at once. The trace can only be executed from one area with
High Performance model QCPU.
(c) The trace information (trace file) registered in the High Performance model
QCPU is registered in the SRAM card and latched. As the condition data is
stored in the trace file, even if the power is off or the High Performance
model QCPU is reset, the sampling trace can be executed under registered
trace conditions.
At power on/reset of High Performance model QCPU, latched trace
information is cleared in the cases where:
• The SRAM card registered in a trace file is not inserted
• The trace file is corrupted
This requires registering trace information once again by operating from
GX Developer.
To clear data, perform the latch-clear operation with the RESET/L.CLR
switch.
To perform sampling trace again after latch clear, execute sampling trace
after selecting "Regist trace".
(d) This is performed by connecting the High Performance model QCPU and
GX Developer.
(e) While in STOP status, the High Performance model QCPU cannot read
sampling trace results. To enable the High Performance model QCPU to
read the sampling trace results, enter the High Performance model QCPU
into RUN status.
(f) When executing the sampling trace, ensure that trigger conditions cannot
be satisfied at trigger points. If the trigger conditions are met when
executing the sampling trace, they will not be recognized as trigger
conditions.
7 - 57 7 - 57
7 FUNCTION
MELSEC-Q
7 - 58 7 - 58
7 FUNCTION
MELSEC-Q
(3) Precautions
(a) The detailed condition setting of the monitor can only be set from one area.
(b) Monitoring can be performed even if a station monitor file is not set, but high
speed monitoring cannot be performed.
The system area is in the same area as the program memory, so the area
of the stored program decreases when the system area is set.
(c) When a user-defined system area of 15k steps is created, simultaneous
monitoring of a single CPU from 16 areas can be speeded up.
7 - 59 7 - 59
7 FUNCTION
MELSEC-Q
1)
2)
7 - 60 7 - 60
7 FUNCTION
MELSEC-Q
(b) The specified circuit of the pointer is displayed to write the circuit after
conversion during RUN.
The following is an example of GX Developer A writing during RUN from P0
and GX Developer B writing during RUN from P1. The program area
surrounded with is the area to be written during RUN.
END END
(3) Precautions
Precautions on "write during RUN" is the same as precautions on "write during
RUN in the circuit mode" in Section 7.12.1. For further information, see Section
7.12.1.
7 - 61 7 - 61
7 FUNCTION
MELSEC-Q
(3) Precautions
(a) An error of 0 to 10 ms occurs in the measurement time of the watch dog
timer. Set the watch dog timer for a desired value by taking such an error
into account.
(b) The watch dog timer is reset with the WDT instruction in the sequence
program. If the watch dog timer expires while the FOR and NEXT
instructions are repetitiously executed, reset the watch dog time with the
WDT instruction.
FOR K1000
NEXT
7 - 62 7 - 62
7 FUNCTION
MELSEC-Q
(c) The scan time value is not reset even if the watch dog timer is reset in the
sequence program.
The scan time value is measured to the END instruction.
REMARK
1) Scan time is the time from when the High Performance model QCPU starts
processing a sequence program at Step 0 until it restarts processing another
sequence program with the same filename at Step 0.
The scan time is not the same at every scan, and differs, depending on
• Whether the commands used are executed or not executed.
• Whether to execute or not an interrupt program and a fixed scan execution
type program.
2) To execute at the same scan time at every scan, use the constant scan function.
For details of the constant scan function, see section 7.2.
7 - 63 7 - 63
7 FUNCTION
MELSEC-Q
Self-Diagnosis List
Diagnosis description Error message Diagnostic timing
7 - 65 7 - 65
7 FUNCTION
MELSEC-Q
SFC block structure error CAN´T SET(BL) When switched from STOP to RUN
SFC step structure error CAN´T SET(S) When switched from STOP to RUN
SFC syntax error SFCP.FORMAT ERR. When switched from STOP to RUN
SFC operation check error
SFCP.OPE.ERROR When an instruction is executed
(Default... Stop) 1
SFC program execution error SFCP.EXE.ERROR When switched from STOP to RUN
SFC block execution error BLOCK EXE.ERROR When an instruction is executed
SFC step execution error STEP EXE.ERROR When an instruction is executed
Watch dog error supervision WDT ERROR Always
PLC error
Program time exceeded PRG.TIME OVER Always
• Always
Other CPU major error MULTI CPU DOWN
• When the power is turned on/when reset
Multiple CPU
Multiple CPU consistency error CPU VER.ERR. • When the power is turned on/when reset
Other CPU minor error MULTI CPU ERR. • Always
BOOT OK BOOT OK • When the power is turned on/when reset
7 - 66 7 - 66
7 FUNCTION
MELSEC-Q
The High Performance model QCPU can execute the interrupt program of the interrupt
pointer that is set as the interrupt object when an error occurs.
Only when the error set to "continue" at the "PLC RAS" tab screen in the “(PLC)
Parameter" dialog box occurs, the High Performance model QCPU executes the
interrupt program corresponding to the error. When the error set to "stop" there occurs,
the interrupt program (I32) for "Stop all errors" is executed.
POINT
(1) The interrupt pointers I32 to I39 is at an execution disable mode when the
power is started or High Performance model QCPU is reset. When using I32 to
I39, use the IMASK instruction and EI instruction to enable execution.
(2) : The I32 interrupt program is not executed upon the following serious errors.
• MAIN CPU DOWN
• END NOT EXECUTE
• RAM ERROR
• OPE CIRCUIT ERR.
When an error occurs, the LED located on the front of the High Performance model
QCPU turns on / flickers.
See Section 7.21 for the details on the LED operation.
7 - 67 7 - 67
7 FUNCTION
MELSEC-Q
High Performance model QCPU error cancel operation can be performed only for error
that can continue the High Performance model QCPU operation.
POINT
(1) When error cancellation is performed by storing the code of the error to cancel
is stored in SD50, the lower 2 digits of the code number is ignored.
[Example]
When the error codes 2100 and 2101 occur, canceling the error code 2100 will
also cancel the error code 2101.
When 2100 and 2111 occur in the error code and error code 2100 is canceled,
error code 2111 is canceled as well.
(2) If the cause of the error is not in the CPU module, the error cause cannot be
resolved if error cancellation is performed using the special relay (SM50) and
special register (SD50).
[Example]
Since "SP. UNIT DOWN" is an error that occurred on the Q bus, the error
cause cannot be resolved if error cancellation is performed using the special
relay (SM50) and special register (SD50).
Refer to the error code list in the High Performance model QCPU (Q mode)
User's Manual (Hardware Design, Maintenance and Inspection), and resolve
the error cause.
7 - 68 7 - 68
7 FUNCTION
MELSEC-Q
The High Performance model QCPU can store the failure history (results detected from
the self-diagnosis function and the time) in the memory.
POINT
The detection time uses the High Performance model QCPU internal clock, so
make sure to set the correct time when using the High Performance model QCPU
for the first time.
(b) When storing more than 16, the history can be stored in the memory card
file using PLC RAS setting in the “(PLC) Parameter” box.
(c) When the history count set in the parameter and that stored in the memory
card are different after the following operation is performed, the contents of
the memory card history file is cleared, then the 16 failure data in the High
Performance model QCPU failure history storage memory is trandferred to
the history file.
1) When the history count in the parameter history file is changed in the
middle of operation.
2) When a memory card, which has a different history count from that set
in the parameter, is mounted.
POINT
Even if the failure history file set in the parameter does not exist in the memory
card, the error will not occur in the High Performance model QCPU.
The High Performance model QCPU stores the failure to the failure history storage
file.
7 - 69 7 - 69
7 FUNCTION
MELSEC-Q
The High Performance model QCPU has a few protection functions (system protect) to
prevent the program changes by a third party other than the designer (from GX
Developer function or serial communication module).
There are the following methods for system protects.
Valid
Item to protect Protect valid file Protection description Method Remarks
Timing
Set the High
Prohibits all write/control
Performance model Valid for
All of CPU All files instructions to the High Always
QCPU system setting devices too
Performance model QCPU
switch SW1 on.
Memory card Performs drive protect for the Set write-protect switch
All files Always —
module memory card, and write protect. on the memory card on.
Changes the attribute for each
Programs Change the attribute for
file as follows:
File module Device comments the file in the Password Always —
1) Read/Write display prohibit
Device initial values Registration.
2) Write prohibit
The control instruction, read/write display, and write mentioned above are as follows:
Item Description
High Performance model QCPU operation instruction by
Control instruction
remote operation. (Remote RUN, remote STOP, etc.)
Read/Write display Program read/write operations.
Operation related with write processing such as program
Write
writes the program and tests.
POINT
The following functions set the “(PLC) Parameter" and High Performance model
QCPU dip switches are performed even when the High Performance model QCPU
system's SW1 setup switch is set to ON and the system protect function is
activated.
• Booting from the standard ROM and the memory card
• Automatic write to standard ROM
Password is used to prohibit reading and writing data of the program and comments in
High Performance model QCPU from GX Developer.
The Password Registration is set for the specified memory (program memory/standard
memory/memory card) program file, device comment file, and device initial file.
Either of the following two descriptions is to be registered.
• The file name is not displayed and read/write cannot be performed as well.
• Write cannot be performed to the file. (Read only)
If the password is registered, file operations from GX Developer cannot be performed
unless the same password is input.
7 - 70 7 - 70
7 FUNCTION
MELSEC-Q
(a)
POINT
(1) Password-protected files are limited to program files, device comment files, and
device initial value files. Other files cannot be password-protected.
(2) The password registered to a file can not read out from the file.
If the password can not be remembered, file operation other than following can
not be performed.
• Program memory/Memory card: Format PLC memory
• Standard ROM: Write to PLC (Flash ROM)
Take notes of the password registered and keep it on hand.
7 - 71 7 - 71
7 FUNCTION
MELSEC-Q
The remote password function prevents illegal access to the High Performance model
QCPU by users in remote locations.
The remote password function is enabled for use by setting it up in the High
Performance model QCPU.
When the remote password function has been set, a check will be run on remote
passwords when users in remote locations attempt to access the High Performance
model QCPU with serial communication modules or Ethernet modules with modem
functions.
GX Developer
Ethernet
QJ71E71
Power supply
CPU module
7 - 72 7 - 72
7 FUNCTION
MELSEC-Q
For example, an outline of what will happen during remote password lock/unlock
processing with an Ethernet module is shown below.
QJ71E71
Power supply
CPU module
7 - 73 7 - 73
7 FUNCTION
MELSEC-Q
POINT
Refer to the following manuals for further details on the remote password function.
• Using Serial Communication Modules
Q Corresponding Serial Communication Module Users' Manual (Application)
• Using Ethernet Modules
Q Corresponding Ethernet Interface Module Users' Manual (Basic)
7 - 74 7 - 74
7 FUNCTION
MELSEC-Q
7.20 Monitoring High Performance model QCPU System Status from GX Developer
(System Monitor)
(a) (d)
(b) (e)
(c)
(f) (g)
7 - 75 7 - 75
7 FUNCTION
MELSEC-Q
(e) Base
The Base section indicates the status of base units used and modules
installed. The Module column indicates the status of a module when the
module is in an abnormal condition.
7 - 76 7 - 76
7 FUNCTION
MELSEC-Q
(a) (c)
(b)
(d)
(e)
(f)
(g)
7 - 77 7 - 77
7 FUNCTION
MELSEC-Q
7 - 78 7 - 78
7 FUNCTION
MELSEC-Q
The High Performance model QCPU has an LED to indicate the High Performance
model QCPU operation status on the front of the High Performance model QCPU.
The display details of each LED are described below.
7 - 79 7 - 79
7 FUNCTION
MELSEC-Q
(3) Method to not display the ERR. LED, USER LED, and BAT. LED
The ERR. LED, USER LED, and BAT. LED have the same priorities explained in
Section 7.21.2.
When an error number for an LED is deleted from this priority, the LED will not
turn on even if an error with that error number occurs.
(See POINT in Section 7.21.2 for the setting method.)
7 - 80 7 - 80
7 FUNCTION
MELSEC-Q
When multiple factors that can be displayed occur, the display is performed with the
following conditions:
1) A stop error is displayed without condition.
2) An operation continue error is displayed according to the priority factor number set
as the default.
The priority can be changed. (Set with special registers SD207 to SD209)
3) When errors with the same priority level occur, the error detected first is displayed.
The priority is set with the special registers SD207 to SD 209 in the following manner:
(Factor number default value: Hexadecimal)
15 to 12 11 to 8 7 to 4 3 to 0 bit 15 to 0 bit
SD207 Priority order 4 Priority order 3 Priority order 2 Priority order 1 SD207 4 3 2 1
SD208 Priority order 8 Priority order 7 Priority order 6 Priority order 5 SD208 8 7 6 5
7 - 81 7 - 81
7 FUNCTION
MELSEC-Q
The description and default priority for the factor number to be set in the special
registers SD207 to SD209 are as follows:
Factor number
Priority Description Remarks
(Hexadecimal)
1 1 AC/DC DOWN Power shutoff
UNIT VERIFY ERR. I/O module verification error
2 2 FUSE BREAK OFF Fuse shutoff
SP.UNIT ERROR Intelligent function module verify error
OPERATIN ERROR Calculation error
LINK PARA. ERROR Link parameter error
3 3
SFCP OPE.ERROR SFC instruction calculation error
SFCP EXE.ERROR SFC program execution error
ICM.OPE.ERROR Memory card operation error
4 4
FILE OPE.ERROR File access error
Constant scan setting time time up over
5 5 PRG.TIME OVER
Low speed execution monitoring time time up
6 6 CHK instruction
7 7 Annunciator
8 8 ——
9 9 BATTERY ERR.
10 A Clock data
POINT
(1) When leaving the LED turned off at the error described above, set the factor
number setting area (each 4 bits), which stores the factor number
corresponding to SD207 to SD209 to "0".
[Example]
To leave the ERR. LED off when a fuse shutoff error is detected, set the
factor number setting area to "0" where the error number is "2".
SD209 SD208 SD207
0 0 A 9 8 7 6 5 4 3 0 1
Because the factor number "2" is not set, the ERR. LED remains off even if the
fuse shutoff is detected. In this case, even if another error with the factor
number "2" (I/O module verify error or intelligent function module verify error) is
detected, the ERR. LED remains off.
(2) Even if the LED is set to be turned off, error code storage is performed for SM0
(Diagnostic error flag) on, SM1 (self-diagnosis flag) on, and SD0 (CPU
diagnostic error register).
7 - 82 7 - 82
7 FUNCTION
MELSEC-Q
When an interrupt program is created using the interrupt pointer I49, the QnHCPU can
run a program by making high speed, fixed-cycle interrupts at intervals of 0.2ms to
1.0ms.
And, the QnHCPU improves the I/O response by refreshing the I/O signals and
intelligent function module buffer memories in the parameter-set ranges before and
after the execution of the high speed interrupt program.
High accuracy control, e.g. accurate positioning detection, is available with the PLC
CPU alone.
Interrupt cycle interval: 0.2ms (parameter setting)
Step 0 END
Main routine program
(Scan time 1ms)
Waiting time
X input
I49 overhead
Y output
7 - 83 7 - 83
7 FUNCTION
MELSEC-Q
POINT
Since the high speed interrupt function need to pick up interrupts at very short
intervals of 0.2ms to 1.0ms with the interrupt pointer I49, please do not run the
interrupt programs, which use the other interrupt pointers I0 to I48, I50 to I255, and
fixed scan execution type programs.
If any of the interrupt and fixed scan execution type programs is executed, interrupt
cannot be made at the cycle intervals set for the high speed interrupt function.
Refer to Section 7.22.3 for other restrictions.
7 - 84 7 - 84
7 FUNCTION
MELSEC-Q
The high speed interrupt program execution function is designed to run an interrupt
program according to the setting of high speed interrupt pointer I49.
Set the high speed interrupt pointer I49 at "High speed interrupt I49 fixed scan interval"
after choosing "PLC system" - "System interrupt settings" - "High speed interrupt
setting" on the PLC parameter screen.
(2) If the interrupt disable period continues longer than the set interrupt cycle interval,
high speed interrupt may be ignored.
(High speed interrupt is ignored once when it occurs twice during interrupt
disable.)
7 - 85 7 - 85
7 FUNCTION
MELSEC-Q
High speed I/O refresh is a function that updates I/O signals between the I/O and
intelligent function modules and CPU module at interrupt cycle intervals.
High speed buffer transfer is a function that updates data between the intelligent
function module buffer memories and CPU module devices at interrupt cycle intervals.
(1) To execute this function, set "High speed interrupt I49 fixed scan interval" that was
set in Section 7.22.1 and "High speed I/O regresh setting" and "High speed buffer
transfer setting".
POINT
It is recommended to mount the target modules of this function on the main base.
(Access time to modules mounting on the main base is shorter than that on the
extension base.)
7 - 86 7 - 86
7 FUNCTION
MELSEC-Q
The settings for high speed I/O refresh and high speed buffer transfer are as follows.
Number of
Item Sub Item Contents Restrictions
Settings
Head device No. I/O and intelligent function Up to 6 points for
Start (X/Y)
High speed I/O (X0 to XFF0/Y0 to YFF0) modules X input and Y
refresh setting Number of transferred bits Specify multiples of 16 output,
Points
(16 to 4096) only. 1 respectively.
Head I/O address / 10H Intelligent function
Starting I/O No.
(0 to FFH) modules only 2
Buffer memory Intelligent function
High speed Head address (0 to FFFFH) Up to 6 points for
start modules only
buffer transfer read and write,
Number of transferred bits Specify even addresses
setting Points respectively.
(1, 2 to FFFEH) and even words only 3
PLC side
Head device No. D, W, R, ZR only
device start
1: Only multiples of 16 can be set for both the head device No. and the number of transferred bits.
2: Since the QA base cannot be connected, the A/QnA series intelligent function modules are not the target.
(When the QA base is connected, "PARAMETER ERROR (3006)" is detected.)
"PARAMETER ERROR (3006)" is also detected if an error occurs in intelligent function module mounting check or
buffer memory capacity check.
3: Only when the specified number of transferred words is 1, an odd address can be specified.
(2) This function's execution requires both the EI instruction is in execution, and I49 is
not masked by the IMASK instruction. By default, I49 is not masked by the
IMASK instruction.
7 - 87 7 - 87
7 FUNCTION
MELSEC-Q
The following chart shows the processing times of the high speed interrupt function
between a start and an end.
Main routine program
Waiting time
X input
I49 overhead
Y output
High speed I/O refresh and high speed buffer transfer take the following processing
times in their processings.
7 - 88 7 - 88
7 FUNCTION
MELSEC-Q
7 - 89 7 - 89
7 FUNCTION
MELSEC-Q
7.22.4 Restrictions
This section explains the items to be noted when the high speed interrupt function is
executed.
Depending on the items, a WDT error may occur or high speed interrupt may not be
executed at preset cycle intervals if the corresponding restrictions are not satisfied.
The restrictions are roughly classified into the following four different items.
(1) Items that are all disabled when high speed interrupt setting is made
(2) Items that are disabled only within high speed interrupt
(3) Items that hold high speed interrupt by interrupt disable
(4) Items to be noted in addition to (1) to (3)
The time taken to run an interrupt program once should not exceed the preset time of
the interrupt cycle interval. (If that time exceeds the preset time of the interrupt cycle
interval, high speed interrupt operation cannot be guaranteed.)
(1) Items that are all disabled when high speed interrupt setting is
made
No. Item Restriction When Used
1 Q02CPU No function for Q02CPU. Parameter error is detected.
QA1S6 B or QA6 B base is not
2 Base unit Parameter error is detected.
available.
3 Multiple PLC system Multiple PLC system is not available. Checked at parameter setting of GX Developer.
PR/PRC, UDCNT1/2, PLSY, PWM, SPD,
Any of the instructions indicated on left is not available
4 Instruction PLOADP/PUNLOADP/PSWAPP
and error is detected.
instructions are not available.
Instruction that will take longer
Since interrupt is disabled during instruction execution,
5 Instruction processing time than high speed interrupt
high speed interrupt is not available at preset cycle.
cycle is not available.
Response to instruction search will be slow, or
6 Programming unit Programming unit is not available. communication error may occur on programming unit
side.
The following two SFC functions are not
available.
1) SFC transition monitor check function Functions given on the left are not available and are
7 SFC
using SM90 to 99, SD90 to 99 ignored.
2) Fixed-time executed block execution
function
Time-based sampling trace is not
available.
Sampling trace is not available and is ignored.
8 Sampling trace (Sampling trace can be used every scan
(When trace read is performed, data may not be set.)
or when detailed conditions are
executed.)
Interrupt program (I0
Interrupt program (I0 to I48, I50 to I255) Since multiple interrupts are disabled, high speed
to I48, I50 to I255),
9 and fixed scan execution type program is interrupt is not available at preset cycle while any
fixed scan execution
not available. interrupt or fixed scan execution type program is run.
type program
Since interrupt is disabled during online program
correction, a high speed interrupt start is delayed during
Online program Online program correction is not that period and therefore high speed interrupt is not
10 correction, online file available. available at preset cycle.
batch-write Online file batch-write is not available. (The following time is taken.
• Max. 102 s for online program correction
• Max. 300ms for online file batch-write)
Since interrupt is disabled when file registers having the
same file name as the program name are changed,
File registers having
high speed interrupt is not available at preset cycle.
the same file name File registers having the same file name
11 (The following time is taken.
as the program as the program name is not available. • Max. 410 s for standard RAM
name
• 400 s + 100 s number of program files for
SRAM card)
7 - 90 7 - 90
7 FUNCTION
MELSEC-Q
(2) Items that are disabled only within high speed interrupt
No. Item Restriction When Used
In high speed interrupt program, device
Device comment in high speed interrupt program is
1 Device comment comment that is the same as program
overwritten.
name is not saved/restored.
In high speed interrupt sequence, index Index register in high speed interrupt program is
2 Index register
register is not saved/restored. overwritten.
Bus access flag In high speed interrupt program, bus SM390 value in high speed interrupt program is
3
SM390 access flag SM390 is not saved/restored. overwritten.
In high speed interrupt, forced ON/OFF is not executed
High speed X/Y refresh area cannot be
4 Forced ON/OFF and is ignored.
turned ON/OFF forcibly.
(Does not result in time-out error.)
Detailed condition Cannot be specified within high speed Is not executed properly.
5
monitor interrupt program. (Does not result in time-out error.)
Execution time Cannot be specified within high speed Is not executed and is ignored.
6
measurement interrupt program. (Does not result in time-out error.)
7 - 91 7 - 91
7 FUNCTION
MELSEC-Q
(b) Using the file registers outside the setting range (range in excess of the
maximum number of points) for high speed buffer transfer does not result in
an error and does not transfer data to outside the range. (The contents of
the other devices are not corrupted.)
(c) As in the other interrupt programs, there are the following items as
precautions for program creation.
1) The device turned on by the PLS instruction in the high speed interrupt
program remains on until the same interrupt program is executed again.
2) While the high speed interrupt program is executed, DI (interrupt disable)
is established. Do not execute the EI/DI instruction in the high speed
interrupt program.
3) Timers cannot be used in the high speed interrupt program.
4) If the high speed interrupt program is executed during time measurement
such as scan time or execution time measurement, the high speed
interrupt program running time is added to the measurement time.
Hence, if the high speed interrupt program is executed, the values to be
stored into the following special registers and the monitor values of GX
Developer become longer than the values when the high speed interrupt
program is not executed.
(Special registers)
• SD520, SD521: Current scan time
• SD522, SD523: Initial scan time
• SD524, SD525: Minimum scan time
• SD526, SD527: Maximum scan time
• SD528, SD529: Current scan time for low speed
• SD532, SD533: Minimum scan time for low speed
• SD534, SD535: Maximum scan time for low speed
• SD540, SD541: END processing time
• SD542, SD543: Constant scan waiting time
• SD544, SD545: Low speed program cumulative execution time
• SD546, SD547: Low speed program execution time
• SD548, SD549: Scan program execution time
• SD551, SD552: Service interval time
(GX Developer monitor values)
• Execution time measurement
• Scan time measurement
• Constant scan
7 - 92 7 - 92
7 FUNCTION
MELSEC-Q
The High Performance QCPU can monitor the service interval time (time from service
acceptance to next service acceptance) of the intelligent function module, network
module or GX Developer. This indicates the frequency at which access to the CPU
occurs from outside.
1
To read the module service interval time , operate the following special relay and
special registers.
REMARK
1: The module service interval indicates the time between a transient request such
as monitor, test, program read/write.
The access interval in cyclic communication from the network module is not
stored.
7 - 93 7 - 93
7 FUNCTION
MELSEC-Q
(Program example)
When reading the module service interval time of the intelligent function module of
X/Y160
POINT
To read the service interval time when access is made from GX Developer of the
other station on the network, set the I/O number of the network module.
7 - 94 7 - 94
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL
FUNCTION MODULE
MELSEC-Q
8.1 Communication Between High Performance model QCPU and Intelligent Function
Modules
The following methods enable the communication between High Performance model
QCPU and intelligent function modules:
• Initial setting or automatic refresh setting using GX Configurator
• Device initial value
• FROM/TO instruction
• Intelligent function module device
• Instructions dedicated for intelligent function modules
The following table shows the communication timing for the communication methods
with intelligent function modules described above:
Communication timing Storage location 1
High 2
Communication method with intelligent function 3
Power Performance STOP Instruction END High
modules
ON model QCPU RUN execution processing Performance Intelligent
reset model QCPU
Initial setting — — —
GX Configurator
Automatic refresh setting — — — — —
8 Device initial value — — —
FROM/TO instruction 4 — — — — —
Intelligent function module device 4 — — — — —
Instructions dedicated for intelligent function modules
— — — — —
4
REMARK
1: Indicates whether the data (designated by the GX Configurator, of the device
initial value, etc.) is stored in High Performance model QCPU or in an intelligent
function module.
2: Represents the internal memory of High Performance model QCPU or a
memory card.
3: "Intelligent" represents an intelligent function module.
4: Represents the program using the intelligent function module device, the
FROM/TO instruction, or the instructions dedicated for intelligent function
modules.
8-1 8-1
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL
FUNCTION MODULE
MELSEC-Q
8-2 8-2
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL
FUNCTION MODULE
MELSEC-Q
The designated auto refresh setting data is stored in the intelligent function
parameters of High Performance model QCPU.
REMARK
For the details of GX Configurator, refer to the manual of the intelligent function
module being used.
REMARK
1) For the device initial value, see Section 10.13.2.
2) For the intelligent function module device, see Section 10.5.
8-3 8-3
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL
FUNCTION MODULE
MELSEC-Q
REMARK
1) For the details of the FROM/TO instruction, refer to the following manuals.
• QCPU (Q mode)/QnACPU Programming Manual (Common Instructions)
2) For the details of the buffer memory of the intelligent function module, refer to the
manual of the intelligent function module being used.
POINT
When reading and processing the data of the intelligent function module frequently
in the program, use the FROM instruction to read the data at one point in the
program and store and process it in a data register, instead of using the intelligent
function module device every time.
Otherwise, the intelligent function module device accesses the intelligent function
module every time the instruction is executed, resulting in longer scan time for the
program.
REMARK
For the intelligent function module device, see Section 10.5.
8-4 8-4
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL
FUNCTION MODULE
MELSEC-Q
8.1.5 Communication using the instructions dedicated for intelligent function modules
(b) A completion device should be designated for the instruction dedicated for
intelligent function modules.
The designated completion device turns ON for one scan when the
execution of the instruction dedicated for intelligent function modules is
completed.
When the completion device turns ON, another instruction dedicated for
intelligent function modules can be executed to the same intelligent function
module.
To use two or more instructions dedicated for intelligent function modules to
one intelligent function module, be sure to execute the next instruction
dedicated for intelligent function modules after the completion device turns
ON.
(2) Note
(a) If the instruction dedicated for intelligent function modules are executed and
High Performance model QCPU is switched from RUN to STOP before the
completion device turns ON, the completion device turns ON one scan later
when High Performance model QCPU is switched to RUN next time.
(b) The instruction dedicated for intelligent function modules can be executed to
the intelligent function modules of the main base unit and extension base
unit.
The instruction dedicated for intelligent function modules cannot be
executed to the intelligent function module installed to the remote I/O
station of MELSECNET/H.
REMARK
For the instruction dedicated for intelligent function modules and the completion
device, refer to the manual of the intelligent function module being used.
8-5 8-5
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL
FUNCTION MODULE
MELSEC-Q
8.2 Request from Intelligent Function Module to High Performance model QCPU
data transmission
Serial communication
Occurrence of
module reception
interrupt
Interrupt program
PLC CPU
execution
FEND
SM400
I BUFRCVS
8-6 8-6
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL
FUNCTION MODULE
MELSEC-Q
8.3 Communication Between High Performance model QCPU and AnS Series Special
Function Modules
High 2
Communication method with special function
Performance STOP Instruction END High 3
modules Power ON
model QCPU RUN execution processing Performance Special
reset model QCPU
Device initial value — — —
FROM/TO instruction 4 — — — — —
Intelligent function module device 4 — — — — —
REMARK
1: Indicates whether the data of the device initial value is stored in High
Performance model QCPU or in a special function module.
2: Represents the internal memory of High Performance model QCPU or a
memory card.
3: "Special" represents a special function module.
4: Represents the program using the intelligent function module device or the
FROM/TO instruction.
REMARK
1) For the device initial value, see Section 10.13.2.
2) For the intelligent function module device, see Section 10.5.
8-7 8-7
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL
FUNCTION MODULE
MELSEC-Q
REMARK
1) For the details of the FROM/TO instruction, refer to the following manuals.
• QCPU (Q mode)/QnACPU Programming Manual (Common Instructions)
2) For the details of the buffer memory of the special function module, refer to the
manual of the special function module being used.
POINT
When reading and processing the data of the special function module frequently in
the program, use the FROM instruction to read the data at one point in the program
and store and process it in a data register, instead of using the intelligent function
module device every time.
Otherwise, the intelligent function module device accesses to the special function
module every time the instruction is executed, resulting in longer scan time for the
program.
REMARK
For the intelligent function module device, see Section 10.5.
8-8 8-8
8 COMMUNICATION WITH INTELLIGENT FUNCTION MODULE/SPECIAL
FUNCTION MODULE
MELSEC-Q
8.3.4 Effects of quicker access to the special function module and countermeasures against
them
(a) Special function modules which assign priority to the FROM/TO instruction
1) When the FROM/TO instruction is executed, the special function module
stops its processing and processes the FRO/TO instruction first.
As a result, the processing time of the special function module becomes
longer, resulting in watch dog timer error of the special function module.
2) The followings are the special function modules which assign priority to
the FROM/TO instruction.
• A1S64AD, A1S68AD
• A1S62RD3, A1S62RD4
• A1S68DAV, A1S68DAI
• A1S68TD
• A1SD75P1(-S3), A1SD75P2(-S3), A1SD75P3(-S3)
• A1SD75M1, A1SD75M2, A1SD75M3
SM415
FROMP H0 K1 D0 K1
REMARK
1) To change the clock value of SM415, store the new value in SD415.
2) For details of SM415, see appendix 1. For details of SD415, see appendix 2.
8-9 8-9
9 PARAMETER
MELSEC-Q
9 PARAMETER
(2) When any PLC parameter setting has been changed, power off and then on the
PLC (ON OFF ON) or reset the QCPU.
If the High Performance model QCPU is switched from STOP RUN without
any operation after the PLC parameter setting change, the new parameter setting
may not become valid or PARAMETER ERROR (error code: 3000) may occur.
9-1 9-1
9 PARAMETER
MELSEC-Q
Output mode at STOP to RUN 1003H Designates the output(Y) mode at STOP-RUN switching.
File register 1100H Designates the file for file registers to be used in the program.
Comment file used in a command 1101H Designates the file for comments to be used in the program.
Designates the file for the device initial values to be used in the
Initial Device value 1102H
CPU module.
File for local device 1103H Designates the file for local devices to be used in the program.
9-2 9-2
9 PARAMETER
MELSEC-Q
— — —
— — —
Previous status (produce the status of Produce the status of an output (X) before STOP/Clear the
Section 7.4
an output (X) before STOP output (output is 1 scan later)
Perform internal arithmetic operation Check/Not Checked to perform internal arithmetic operation
Section 4.8.4
with double precision with double
No setting I50 to I255, leading I/O No, leading SI No. Section 10.10
No setting C0 to C22722 (Counter setting points can be set up to 256.) Section 10.2.11
I28: 100.0 ms
I29: 40.0 ms
0.5 to 1000 ms (0.5 ms units) Section 10.10
I30: 20.0 ms
I31: 10.0 ms
Section 4.1.3
The high speed execution is disabled. Enable/Disable the high speed execution.
Section 4.2.5
The start of an intelligent function Yes/No to synchronize the start of an intelligent function
—
module is synchronized. module.
Special relays/special registers after Yes/NO to use the special relays/special registers after Section 10.3.2
SM1000/SD1000 are used. SM1000/SD1000. Section 10.3.3
— — —
• Not used
Not used • Use the same file name as the program Section 10.7
• Use the designated file
• Not used
Not used • Use the same file name as the program —
• Use the following file
• Not used
Not used • Use the same file name as the program Section 10.13.2
• Use the following file
• Not used
Not used Section 10.13.1
• Use the following file
9-3 9-3
9 PARAMETER
MELSEC-Q
Latch(1) head/end
2001H Designates the latch range where the latch clear key is enabled.
(Latch clear key enabled)
Latch(2) head/end
2002H Designates the latch range where the latch clear key is disabled.
(Latch clear key disabled)
Local device head/end 2003H Designates the device range used for local devices.
9-4 9-4
9 PARAMETER
MELSEC-Q
Record in PLC RAM Record in PLC RAM/Record in the following history file Section 7.17
— — —
X: 8 k points
Y: 8 k points
M: 8 k points
L: 8 k points
B: 8 k points
X(8 k points), Y(8 k points), S(8 k points), SB(2k points) and
F: 2 k points
SW(2 k points) are fixed.
SB: 2 k points
Including the above points(3.7 k words), a total range of 29 k Section 10.1
V: 2 k points
words is available. Section 10.2
S: 8 k points
• For one device: Max. 32 k points
T: 2 k points
• Total number for the bit devices: Max. 64 k points
ST: 0 k point
C: 1 k point
D: 12 k points
W: 8 k points
SW: 2 k points
Only 1 range is designated for each device of B, F, V, T, ST,
No setting Section 7.3
C, D, W.
Only 1 range is designated for each device of L, B, F, V, T,
No setting Section 7.3
ST, C, D, W.
Only 1 range is designated for each device of M, V, T, ST, C,
No setting Section 10.13.1
D.
Program name, execution type (fixed scan for fixed scan
No setting Section 4.2
execution), file use setting, I/O refresh setting
Do not clear the program memory Do not clear the program memory during boot. /
Section 6.6.2
during boot. Clear the program memory during boot.
Type, data name and source drive
No setting (The destination drive is automatically set in the program Section 6.6
memory.)
Do not execute automatic refresh to Do not execute automatic refresh to the standard ROM. /
Section 6.6.2
the standard ROM. Do not execute automatic refresh to the standard ROM.
9-5 9-5
9 PARAMETER
MELSEC-Q
I/O
Assign- 400H Designates the model of the installed module. (Memorandum for
ment Model name
users who do not use the CPU module.)
Points Designates the number of points of each slot.
Head XY
Designates the first input and output numbers of each slot.
(Head I/O number)
Designates the model of the used main base unit and extension
Base model name base unit. (Memorandum for users who do not use the CPU
module.)
Designates the model of the power supply module installed to the
Power module model
Standard main and extension base units. (Memorandum for users who do
name 401H
setting not use the CPU module)
Extension cable model Designates the model of the extension cable. (Memorandum for
name users who do not use the CPU module)
Designates the number of slots of the main and extension base
Number of slots
units. The number of slots is designated for each base unit.
Switch setting 407H Designates various switches of the intelligent function module.
Error time output Designates whether the output is cleared or retained upon a
403H
module stopping error of the control PLC.
H/W error time CPU Designates whether the control PLC continues operation or it is
4004H
Detailed operation mode stopped upon a hardware error of the intelligent function module.
setting Designates the response time of the input module, high speed
I/O response time 405H
input module and I/O mixture module.
Designates the control PLC of the I/O module and intelligent
Control CPU 406H
function module.
Contents of I/O allocation, MELSECNET/Ethernet setting and CC-
Acknowledge XY assignment —
Link setting can be checked.
Multiple CPU setting — Defines settings for establishment of a multiple CPU system.
No. of CPU E00H Designates the number of CPUs used in the multiple CPU system.
Designates the operation of the multiple CPU system upon a
stopping error of the PLC No.2 to No.4 CPU modules.
Operating mode E01H
The multiple CPU system is stopped if a stopping error occurs to
the PLC No.1 (Fixed)
Designates whether online module change will be enabled or
Online module change setting E006H disabled for other CPU modules. (When it is enabled, the out of
group I/O status cannot be imported.)
Designates whether the input status of the input module and
Out of group input setting intelligent function module controlled by other PLCs are acquired
E04H or not.
Designates whether the output status of the output module
Out of group output setting
controlled by other PLCs are acquired or not.
Designates the devices and the number of points for which data
E002H
Refresh settings write/read will be performed by automatic refresh between CPU
E003H
modules in the multiple CPU system.
9-6 9-6
9 PARAMETER
MELSEC-Q
No setting • 2,3,5,8,10,12
• See the manual of the intelligent function module to be
No setting Section 7.6
used.
Clear • Cleared/retained Section 7.8
Stop • Stopped/continue —
Input, I/O mixture: 10 ms • Input, I/O mixture: 1 ms, 5 ms, 10 ms, 20 ms, 70 ms
Section 7.7
High speed input: 0.2 ms • High speed input: 0.1 ms, 0.2 ms, 0.4 ms, 0.6 ms, 1.0 ms
PLC No.1 • PLC No.1, PLC No.2, PLC No.3, No.4 Section 14.2.1
— — —
— — —
1 module • 1 to 4 modules Section 14.2.1
Stop all CPUs upon error of PLC No.n • Stop or do not stop all PLCs upon an error of PLC No.n. Section 14.2.8
Online module change is disabled for • Online module change is enabled/disabled for other CPU
—
other CPU modules modules.
Do not permit outputs to outside group • Permit or do not permit outputs to outside the group. Section 17.2
• Setting range of each CPU: 0 to 2048 points (in 2-point
intervals) / module
Max. 4k points (4096 points) /
system
• Device on CPU side: B, M, Y, D, R, ZR
No setting Devices equivalent to the number of points Section 16.1
set for the transmission range from the
designated device number are occupied.
• 16 points are occupied with B, M and Y for
each point of transmission range.
• 1 point is occupied with D, W, R and ZR for
each point of transmission range.
9-7 9-7
9 PARAMETER
MELSEC-Q
9-8 9-8
9 PARAMETER
MELSEC-Q
9-9 9-9
9 PARAMETER
MELSEC-Q
9 - 10 9 - 10
9 PARAMETER
MELSEC-Q
No QJ71E71/QJ71C24
No 0000H to 0FE0H
— —
9 - 11 9 - 11
9 PARAMETER
MELSEC-Q
9 - 12 9 - 12
10 EXPLANTION OF DEVICES
MELSEC-Q
10 EXPLANTION OF DEVICES
This chapter describes all devices that can be used in the High Performance model
QCPU.
The names and data ranges of devices which can be used in the High Performance
model QCPU are shown in Table 10.1 below.
10
10 - 1 10 - 1
10 EXPLANTION OF DEVICES
MELSEC-Q
REMARK
1: For the timer, retentive timer, and counter, bit devices are used for the "contact"
and the "coil", and the word device is used for the "present value".
2: The actual number of usable points varies according to the intelligent/special
function module.
For details regarding the buffer memory's "number of points", refer to the
Intelligent/Special Function Module Manual.
3: Inputs, outputs, step relays, link special relays, link special registers remain at
their default values, which cannot be changed.
4: In a program, only FX0 to FX4 and FY0 to FY4 can be used.
10
10 - 2 10 - 2
10 EXPLANTION OF DEVICES
MELSEC-Q
The "number of usable points" setting is designated in advance (default value) for
internal user devices.
However, this setting can be changed at the "Device" tab screen in the “(PLC)
Parameter" dialog box.
Default value
"Dev. point" can be changed
for the device where a "Dev. point"
value is shown in brackets.
10 - 3 10 - 3
10 EXPLANTION OF DEVICES
MELSEC-Q
(b) For timer (T) retentive timer (ST), and Counter (C):
For the timer, retentive timer, and counter, 16 points are calculated as 18
words.
(T, ST, C total number of points)
(Timer, retentive, counter capacity) = 18 (Word)
16
POINT
(1) When an internal user device's "number of usable points" setting is changed,
the following files which were created under the previous setting cannot be
used as they are.
• The sequence program
• The SFC program
After changing the setting, the sequence program and SFC program must be
read from the High Performance model QCPU to GX Developer, and then they
must be written back to the High Performance model QCPU again.
10 - 4 10 - 4
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Inputs transmit commands or data to the High Performance model QCPU
from an external device such as push-button switches, selector switches,
limit switches, digital switches.
Push-button switch
Digital switch
1 2 3
(b) If the input point is the Xn virtual relay inside the High Performance model
QCPU, the program uses the Xn's N/O contact or N/C contact.
Virtual relay
PB1 X0
Programmable
X0 controller
LS2 X1
X1
PB16
XF
XF
(c) There are no restrictions on the number of Xn N/O contacts and N/C
contacts used in a program, provided the program capacity is not
exceeded.
X0 X2
Y20
No restrictions on X0 X1 X2
the quantity used. Y21
Y21
X0
Y23
10 - 5 10 - 5
10 EXPLANTION OF DEVICES
MELSEC-Q
0
X10
ON/OFF
data
REMARK
1: See Section 4.7.1 for details on the refresh mode.
10 - 6 10 - 6
10 EXPLANTION OF DEVICES
MELSEC-Q
(c) The same input number can be designated for a refresh input and a direct
access input.
If the number is used as a refresh input after being used as a direct access
input, the operation is executed with the ON/OFF data read by performing a
direct access input.
POINT
(1) When debugging a program, an input (X) can be set to ON/OFF as described
below.
• OUT Xn instruction
OUT X1
ON/OFF command
X1
10 - 7 10 - 7
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Outputs give out the program control results to the external devices such as
solenoid, electromagnetic switch, signal lamp and digital display.
Signal lamp
Sequence
operation
Contact
(b) Outputs give out the result equivalent to one N/O contact.
(c) There are no restrictions on the number of output Yn N/O contacts and N/C
contacts used in a program, provided the program capacity is not
exceeded.
Programmable No restrictions on the quantity used.
controller
Load
X0
Y20 M51
Y20
X1 Y20 X2
Y21
Y20 X3
Y22
Output module
Output module
Output module
Input module
Input module
CPU module
OUT Yn
Equivalent to internal relay
10 - 8 10 - 8
10 EXPLANTION OF DEVICES
MELSEC-Q
0
Y10
DY10
ON/OFF data output
REMARK
1: See Section 4.7.1 for details on the refresh mode.
10 - 9 10 - 9
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Internal relays are auxiliary relays which cannot be latched by the
programmable controller's internal latch (memory backup).
All internal relays are switched OFF at the following times:
• When power is switched from OFF to ON.
• When reset occurs.
• When latch clear operation is executed.
(b) There are no restrictions on the number of contacts (N/O contacts, N/C
contacts) used in the program, provided the program capacity is not
exceded.
No restrictions on the quantity used.
M0 switches ON at X0 OFF to ON
X0
SET M0 The internal relay (M0) ON can only be used for internal
High Performance model QCPU processing, and cannot
M0 K20 be output externally.
T0
X2 M0
M2047
REMARK
Latch relays (L) should be used when a latch (memory backup) is required.
See Section 10.2.4 for details on latch relays.
10 - 10 10 - 10
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Latch relays are auxiliary relays which can be latched by the programmable
controller's internal latch (memory backup).
Latch relay operation results (ON/OFF information) are saved even in the
following cases:
• When power is switched from OFF to ON.
• When reset occurs.
The latch is backed up by the High Performance model QCPU battery.
(b) Latch relays can be switched OFF by pertorming latch clear for the High
Performance model QCPU. However, the latch relay set as "Latch (2):
Cannot clear with Latch Clear key" at the "Device" tab screen in the “(PLC)
Parameter" dialog box cannot be turned off, even when the RESET/L.CLR
switch/remote latch clear is made for latch clear of it.
(c) There are no restrictions on the number of contacts (N/O contacts, N/C
contacts) used in the program, provided the program capacity is not
exceeded.
X2 L0
L2047
REMARK
Internal relays (M) should be used when a latch (memory backup) is not required.
See Section 10.2.3 for details on internal relays.
10 - 11 10 - 11
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Anunciators are internal relays used for fault detection programs created by
the user.
(b) When anunciators switch ON, a special relay (SM62) switches ON, and the
Nos. and quantity of the anunciators which switched ON are stored at the
special registers (SD62 to SD79).
• Special relay :SM62.................... :Switches ON if even one anunciator
switches ON.
• Special register :SD62 .................... No. of first anunciator which switched
ON is stored here.
SD63 .................... The number (quantity) of anunciators
which are ON is stored here.
SD64 to SD79...... Anunciator Nos. are stored in the order
in which they switched ON.
(The same anunciator No. is stored at
SD62 and SD64.)
The anunciator No. stored at SD62 is also registered in the "fault history
area".
(c) Using annunciators for a fault detection program, an equipment fault or fault
presence/absence (annunciator number) can be checked by monitoring the
special register (SD62 to SD79) when the special relay (SM62) switches
ON.
Example
The program which outputs the No. of the ON annunciator (F5) is shown below.
10 - 12 10 - 12
10 EXPLANTION OF DEVICES
MELSEC-Q
SD62 0 50 50 50
SD63 0 1 2 3
SD64 0 50 50 50
SD65 0 0 25 25
SD66 0 0 0 2047 Up to 16 annunciator
SD67 0 0 0 0 No. can be stored.
SD79 0 0 0 0
2) Processing at CPU
"USER" LED at High Peformance model QCPU front is ON.
3) Setting the display priority at error occurrence to SD207 - SD209
allows you to select whether the ERR. LED is to be ON or OFF when
the annunciator turns ON.
10 - 13 10 - 13
10 EXPLANTION OF DEVICES
MELSEC-Q
REMARK
For details on the LEDR and BKRST instruction, refer to the QCPU(Q
mode)/QnACPU Programming Manual(Common Instructions).
10 - 14 10 - 14
10 EXPLANTION OF DEVICES
MELSEC-Q
SD62 0 50 50 50 25
SD63 0 1 2 3 2
SD64 0 50 50 50 25
SD65 0 0 25 25 2047
SD66 0 0 0 2047 0
SD67 0 0 0 0 0
SD79 0 0 0 0 0
SD62 0 50 50 50 50
SD63 0 1 2 3 2
SD64 0 50 50 50 50
SD65 0 0 25 25 2047
SD66 0 0 0 2047 0
SD67 0 0 0 0 0
SD79 0 0 0 0 0
POINT
If an error occurs to continue operation with the higher-priority over an anunciator
when the anunciator is switched ON, eliminate the error by executing an LEDR
instruction. See Section 7.20.2 for priority. In this case, executing an LEDR
instruction will not switch the anunciator OFF. To switch the anunciator OFF, you
must first eliminate the error before executing the LEDR instruction because the
error takes priority over the anunciator.
10 - 15 10 - 15
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) An edge relay is a device which stores the operation results (ON/OFF
information) from the beginning of the ladder block.
Edge relays can only be used at contacts, and cannot be used as coils.
X0 X1 X10 V1
Edge relay
Stores the X0, X1 and X10 operation results
(b) The same edge relay number cannot be used twice in programs executed
by the High Performance model QCPU.
[Timing chart]
ON
X0 OFF
ON
When Z1=0 V0 OFF
ON
M0 OFF
1 Scan
ON
X1 OFF
ON 1 scan ON at X1 leading edge
When Z1=1 V1 OFF
ON
M1 OFF
1 Scan
REMARK
1: The ON/OFF information for X0Z1 is stored at the V0Z1 edge relay.
For example, the X0 ON/OFF information is stored at V0, and the X1 ON/OFF
information is stored at V1.
10 - 16 10 - 16
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) A link relay is the High Performance model QCPU relay used to refresh the
High Performance model QCPU from the MELSECNET/H network
module's link relay (LB) and to refresh the MELSECNET/H network
module's link relay (LB) from the High Performance model QCPU data.
High Performance model QCPU MELSECNET/H network module
Link relay Link relay
B0 LB0
Link refresh Link refresh setting range
Internal relays or latch relays can be used for data ranges not used by the
MELSECNET/H network system.
• Range where no link relay latch is performed...Internal relay
• Range where link relay latch is performed........Latch relay
(b) There are no restrictions on the number of contacts (N/O contacts, N/C
contacts) used in the program.
X2 B0
B1FFF
REMARK
1) For details on the network parameters, refer to the For Q Corresponding
MELSECNET/H Network System Reference Manual.
2) The MELSECNET/H Network Module has 16384 link relay points assigned.
High Performance model QCPU has 8192 link relay points assigned. When using
subsequent points after Point 8192, change the number of link relay points at the
"Device" tab screen in the “(PLC) Parameter" dialog box.
10 - 17 10 - 17
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) A link special relay indicates the communication status and error detection
of an intelligent function module, such as the MELSECNET/H Network
Module.
(b) Because link special relays are switched ON and OFF in accordance with
various problems which may occur during a data link, they serve as a tool
for identifying data link problems.
REMARK
For details on link special relays used at the QCPU, refer to the QCPU (Q
mode)/QnACPU Programming Manual (Common Instructions).
POINT
Because the step relay is a device exclusively for the SFC program, it cannot be
used as an internal relay in the sequence program.
If used in this manner a SFC error will occur, and system operation will be stopped
(system down).
10 - 18 10 - 18
10 EXPLANTION OF DEVICES
MELSEC-Q
Timers are of up-timing, with the time measurement beginning when the coil switches
ON, and ending (time out) when the current value exceeds the set value.
The current value matches the set value when a "time-out" occurs.
There are two types of timers: a low/high speed that allows the current value to return
to "0" when a timer coil switches OFF, and a retentive timer that retains the current
value even when a timer coil switches OFF.
Timers Timers Low speed timers
High speed timers
Retentive timers Low speed retentive timers
High speed retentive timers
With a timer setting (instruction format), a device is assigned for a low speed timer or
high speed timer. The OUT T0 instruction is used to assign a device for a low -speed
timer. The OUTH T0 instruction is used to assign a device for a high speed timer.
With a timer setting (instruction format), a device is assigned for a low speed retentive
timer or high speed retentive timer. The OUT T0 instruction is used to assign a device
for a low speed retentive timer. The OUTH T0 instruction is used to assign a device for
a high speed retentive timer.
Low-speed timers
(1) Definition
(a) Low speed timers are valid only while the coil is ON.
(b) The time measurement begins when the timer's coil switches ON, and the
contact switches ON when a "time-out" occurs. When the timer's coil
switches OFF, the current value becomes "0", and the contact switches
OFF.
[Ladder example]
K10 When X0 switches ON, the T0 coil switches ON, and the
X0
contact switches ON 1 second later. (The low-speed timer
T0
measures time in 100 ms units.)
[Time chart]
ON
X0 OFF
ON
T0 coil OFF
1s
ON
T0 contact OFF
(b) The time measurement units setting can be designated in 1 ms units within a
1 ms to 1000 ms range.
This setting is designated at the "PLC system" tab screen in the “(PLC)
Parameter" dialog box.
10 - 19 10 - 19
10 EXPLANTION OF DEVICES
MELSEC-Q
High-speed timers
(1) Definition
(a) High speed timers are valid only while the coil is ON. A high speed timer is
marked with a symbol "H".
(b) The time measurement begins when the timer's coil switches ON, and the
contact switches ON when the time elapses. When the timer's coil switches
OFF, the current value becomes "0", and the contact switches OFF.
[Ladder example]
High-speed timer display
X0 H K200 When X0 switches ON, the T200 coil switches ON, and
T200 the contact switches ON 2 second later. (The high-speed
timer measures time in 10 ms units.)
[Time chart]
ON
X0 OFF
ON
T200 coil OFF
2s
ON
T200 contact OFF
(b) The time measurement units setting can be designated in 0.1ms units within
a 0.1 ms to 100 ms range.
This setting is designated at the "PLC system" tab screen in the “(PLC)
Parameter"dialog box.
10 - 20 10 - 20
10 EXPLANTION OF DEVICES
MELSEC-Q
Retentive timers
(1) Definition
(a) Retentive timers measure the "coil ON" time.
(b) The measurement begins when the timer coil switches ON, and the contact
switches ON when a time-out (coil OFF) occurs.
Even when the timer coil is OFF, the current value and the contact ON/OFF
status are saved. When the coil is switched ON again, the time
measurement resumes from the current value which was saved.
(c) There are 2 retentive timer types: low speed retentive timer, and high speed
retentive timer.
(d) The RST T instruction is used to clear (reset) the current value and switch
the contact OFF.
[Ladder example]
X0 K200
X0 ON time is measured as 20 seconds when the timer
ST0
measures time in 100 ms units.
ON
X0 OFF
ON
T0 coil OFF
15s 5s
ON
X1 OFF
REMARK
In order to use retentive timers, a retentive timer "number of points used" setting
must be designated at the "Device" tab screen in the “(PLC) Parameter" dialog box.
10 - 21 10 - 21
10 EXPLANTION OF DEVICES
MELSEC-Q
(b) When the OUT T instruction is executed, the current value is added to the
scan time measured at the END instruction.
If the timer coil is OFF when the OUT T instruction is executed, the
current value is not updated.
[Ladder example]
X0 H K8
T0
ON
QCPU's X0 OFF
ON
T0 coil OFF
ON
T0 contact OFF
10 ms 1 2 1 2 3 1 2 1 2 3 1 2 1 2 3
measurement
Measured value
at END instruction 2 3 2 3 2 3
10 - 22 10 - 22
10 EXPLANTION OF DEVICES
MELSEC-Q
(c) The timer response accuracy from when reading input (X), until when
outputing it is + (2-scan time + timer time limit setting).
(b) When a timer (for example. T1) coil is ON, the OUT T1 instruction cannot be
skipped using a CJ instruction, and so forth.
If the OUT T instruction is skipped, the timer current value will not be
updated.
(c) Timers cannot be used in interrupt programs and fixed scan execution
programs.
(d) If the timer set value is "0", the contact turnes ON when the OUT T
instruction is executed.
(e) If the set value changes to a value which is higher than the current value
following a timer "time-out", the "time-out" status will remain in effect, and
timer operation will not be performed.
(f) If a timer is used at a low speed execution type program, the current value
will be added to the low speed scan time when the OUT T instruction is
executed.
See Section 4.3.2 for details on the low speed scan time.
(g) If two timers are used, the ON/OFF ladders should be created as shown
below.
T0 K10
T1 1 second measurement
following T0 ON
T1 K10
T0 1 second measurement
when T1 ON
T0
M0 ON/OFF repeated every
1 second
10 - 23 10 - 23
10 EXPLANTION OF DEVICES
MELSEC-Q
Counters are "up-timing" types, with the contact being switched ON when the count
value equals the set value (count-out condition).
There are two counter types: counters which count the number of input condition start-
ups (leading edges) in sequence programs, and counters which count the number of
interrupt factor occurrences.
Counters
(1) Definition
A counter is a device which counts the number of input condition leading edges
in sequence programs.
(b) The current value update (count value + 1) is performed at the leading edge
(OFF to ON) of the OUT C instruction.
The current value is not updated in the following OUT C instruction
statuses: OFF, ON to ON, ON to OFF
[Ladder example]
X0 K10
C0
ON
C0 coil OFF
10 - 24 10 - 24
10 EXPLANTION OF DEVICES
MELSEC-Q
(c) Multiple counters can be used within a single scan to achieve the maximum
counting speed.
In such cases, the direct access input (DX ) method should be used for
the counter input signals. 1
OUT OUT OUT OUT OUT
END C C C END C C
Sequence
program
Execution
RST C0 OFF
instruction
Count value cleared & contact OFF Count value cleared & contact OFF
C0
RST C0
In the above ladder example, when M0 turns from OFF to ON, the coil of C0
turns ON, updating the current value. When C0 reaches the preset value finally,
the contact of C0 turns ON, and the execution of the RST C0 instruction clears
the current value of C0. At this time, the coil of C0 also turns OFF.
When M0 is still ON in the next scan, the current value is updated since the coil
of C0 turns from OFF to ON at the execution of the OUT C0 instruction. (The
current value turns to 1.)
10 - 25 10 - 25
10 EXPLANTION OF DEVICES
MELSEC-Q
ON
Coil of C0 OFF
Current value update & Current value is updated
contact ON Coil of C0 OFF since coil of C0 turns from
OFF to ON.
RST C0 OFF
C0 M0
RST C0
REMARK
1) 1: See Section 10.2.1 for details on direct access inputs.
2) 2: The "duty" is the count input signal's ON-OFF time ratio expressed as a
percentage value.
T1
When T1 T2 n = 100
T1+T2
T2
When T1 < T2 n = 100
T1+T2
T1 T2
ON
Count input signal OFF
10 - 26 10 - 26
10 EXPLANTION OF DEVICES
MELSEC-Q
Interrupt counters
(1) Definition
Interrupt counters are devices which count the number of interrupt factor
occurrences.
C555 I255
10 - 27 10 - 27
10 EXPLANTION OF DEVICES
MELSEC-Q
(4) Precautions
(a) One interrupt pointer is insufficient to execute interrupt counter and interrupt
program operation.
Moreover, an interrupt program cannot be executed by an interrupt counter
setting designated at the "PLC system" tab screen in the “(PLC) Parameter"
dialog box.
(b) If the processing items shown below are in progress when an interruption
occurs, the counting operation will be delayed until processing of these
items is completed.
The count processing starts after the execution of programs is completed.
Even if the same interruption occurs again while processing of these items
is in process, only one interruption will be counted.
• During execution of sequence program instructions
• During interrupt program execution
• During execution of a fixed scan execution type program
(c) The maximum counting speed of the interrupt timer is determined by the
longest processing time of the items shown below.
• Instruction with the longest processing time among the instructions used
in the program
• Interrupt program processing time
• The processing time of a fixed scan execution type program
(d) The use of too many interrupt counters will increase the sequence program
processing time, and may cause a "WDT ERROR".
If this occurs, reduce the number of interrupt counters or the counting
speed for the input pulse signal.
(e) The interrupt counter's count value can be reset by using the RST C
instruction in the sequence program prior to the FEND instruction.
(f) The interrupt counter's count value can be read out by using the sequence
program MOV instruction.
10 - 28 10 - 28
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Data registers are memory devices which store numeric data (-32768 to
32767, or 0000H to FFFFH).
(b) Data registers, which consist of 16 bits per point, read and write data in 16-
bit units.
b15 b0
Dn
(c) If the data registers are used for 32-bit instructions, the data will be stored in
registers Dn and Dn + 1. The lower 16 bits of data are stored at the data
register No. (Dn) designated in the sequence program, and the higher 16
bits of data are stored in the designated register No. + 1 (Dn + 1). For
example, if register D12 is designated in the DMOV instruction, the lower
16 bits are stored in D12, and the upper 16 bits are stored in D13.
Two data registers can store a range of numeric data from -2147483648 to
2147483647 or from 0H to FFFFFFFFH.
(d) Data stored by the sequence program is maintained until another data save
operation occurs.
10 - 29 10 - 29
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) A link register is the High Performance model QCPU memory used to
refresh the High Performance model QCPU with data from the link registers
(LW) of intelligent function modules including MELSECNET/H network
module.
Link registers are used to store numeric data (-32768 to 32767, or 0000H to
FFFFH).
High Performance model QCPU MELSECNET/H network module
Link register Link register
W0 LW0
Link refresh
Link refresh setting range
(b) Link registers, which consist of 16 bits per point, read and write data in 16
bit units.
b15 b0
Wn
(c) If the link registers are used for 32-bit instructions, the data is stored in
registers Wn and Wn + 1. The lower 16 bits of data are stored in the link
register No. (Wn) designated in the sequence program, and the higher 16
bits of data are stored in the designated register No. + 1 (Wn + 1).
For example, if link register W12 is designated in the DMOV instruction, the
lower 16 bits are stored in W12, and the upper 16 bits are stored in W13.
(d) Data stored by the link register is maintained until another data is save.
REMARK
The MELSECNET/H network module has 16384 link register points. The High
Performance model QCPU has 8192 link register points. When subsequent points
after Point 8192 are used for link registers, change a "number of points" setting of
link registers at the "Device" tab screen in the “(PLC) Parameter" dialog box.
10 - 30 10 - 30
10 EXPLANTION OF DEVICES
MELSEC-Q
REMARK
For details on network parameters, refer to the Q Corresponding MELSECNET/H
Network System Reference Manual.
(1) Definition
(a) Link special registers are used to store data on the communication status
and errors of an intelligent function
(b) Because the data link information is stored as numeric data, the link special
registers serve as a tool for identifying the locations and causes of faults.
REMARK
For details on link special registers used in the QCPU, refer to the QCPU(Q
mode)/QnACPU Programming Manual (Common Instructions).
10 - 31 10 - 31
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Function devices are used in a sub-routine program with arguments to
perform write/read of data between the sub-routine call source with
argument and the sub-routine program with argument.
Example
If FX0 and FD1 are used at the sub-routine program, and if M0 and D0 are designated by the sub-routine
CALL instruction, the M0 ON/OFF data is transferred to FX0, and the D0 data is transferred to FD1.
[Sub-routine program CALL source] [Sub-routine program]
X0 FX0
CALL P0 M0 D0 P0 MOV FD1 R0
RET
(b) Because the function devices used for each sub-routine program CALL
source can be set, the same sub-routine program can be used without
regard to other sub-routine CALL sources.
10 - 32 10 - 32
10 EXPLANTION OF DEVICES
MELSEC-Q
REMARK
For a procedure for using function devices, refer to the QCPU (Q mode)/QnACPU
Programming Manual (Common Instructions).
10 - 33 10 - 33
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
A special relay is used to store High Performance model QCPU status data.
REMARK
1) For details on special relays which can be used by the High Performance model
QCPU, refer to Appendix 1.
2) : This takes effect only after you have turned on the "Use special relay/special
register form SM1000/SD1000" check box in the "Compatibility with A-PLC"
section at the "PLC system" tab screen in the “(PLC) Parameter" dialog box.
10 - 34 10 - 34
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
A special register is used to store High Performance model QCPU status data
(diagnosis and system information).
REMARK
1) For details on special relays which can be used by the High Performance model
QCPU, refer to Appendix 2.
2) : This takes effect only after you have turned on the "Use special relay/special
register form SM1000/SD1000" check box in the "Compatibility with A-PLC"
section at the "PLC system" tab screen in the “(PLC) Parameter" dialog box.
10 - 35 10 - 35
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) At END processing of sequence program, a data refresh (data transfer) is
performed between the High Performance model QCPU and the
MELSECNET/H network modules. Link direct devices are used to directly
access the link devices in the MELSECNET/H network modules.
(b) Designation method
• Link direct devices are designated by network No. and device No.
Designation method: J \
Device No.
Input...........................X0
Output........................Y0
Link relay.................. B0
Link register...............W0
Link special relay.......SB0
Link special register ..SW0
Network No.(1 to 239)
W0
W10
B0 LB 0
Link range
Refresh
range
send range
Writing range
10 - 36 10 - 36
10 EXPLANTION OF DEVICES
MELSEC-Q
2) Although writing is also allowed in the "refresh range" portion of the link
device range (specified by refresh parameters), the link module's link
device data will be rewritten when a refresh operation occurs.
Therefore, when writing by link direct device, the same data should
also be written to the High Performance model QCPU related devices
designated by refresh parameter.
[Refresh parameter settings]
Network No. : 1
High Performance model QCPU(W0 to W3F) Network module (LW0 to LW3F)
[Sequence program]
(b) Reading
Reading by link direct device is allowed in the entire link device range of
network modules.
POINT
Only one network module capable of writing/reading link direct devices can be used
per network number.
If two or more network modules are installed at the same network number, the
network module with the lowest first I/O number will be the one that handles
writing/reading using link direct devices.
For example, if station No.1 and station No.2 network modules are installed in
network No.1 as shown in the figure below, the station No.2 network module will
handle link direct device operations.
Network No.1
Network module
Network module
Power supply module
CPU module
Station Station
No.2 No.1
Writing/reading using link direct devices not allowed
Writing/reading using link direct devices allowed
10 - 37 10 - 37
10 EXPLANTION OF DEVICES
MELSEC-Q
Table 10.4 Differences Between "Link Direct Devices" and "Link Refresh"
REMARK
1) For details on the MELSECNET/H network system, refer to the Q Corresponding
MELSECNET/H Network System Reference Manual.
2) For details on network parameters, common parameters, and network refresh
parameters, refer to the following manuals:
• Detailed information : Q Corresponding MELSECNET/H Network System
Reference Manual
• Setting procedures : GX Developer Operating Manual, Windows Version
10 - 38 10 - 38
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) The intelligent function module devices allow the High Performance model
QCPU to directly access the buffer memories of intelligent function
modules/special function modules which are mounted on at the main base
unit and extension base units.
(b) Intelligent function module devices are designated by the intelligent function
module/special function module I/O No., and the buffer memory address.
Designation method: U \G
Buffer memory address (setting range: 0 to16383 (decimal)) 1
Intelligent function module/special function module I/O No.
Setting: If the I/O No. is a 3-digit value, designate the first 2 digits.
For X/Y1F0.....X/Y1F0
Designate "1F"
Setting range: 00H to FEH
When digital output values of channels (CH.1 to CH.4) of the Q64AD Type
Analog-Digital Conversion Module (X/Y20 to 2F) mounted at Slot 2 of the main
base unit are stored in D0 to D3, the I/O number and the buffer memory address
are specified as shown below.
Q64AD
BMOV U2\G11 D0 K4
REMARK
1: For details on buffer memory addresses and applications, refer to the intelligent
function module/special function module manual.
10 - 39 10 - 39
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Index registers are used in the sequence program for indirect setting (index
qualification) designations.
An index register point is used for index modification.
X0
MOVP K5 Z0
SM400
BCD D0Z0 K4Y30
(c) Index registers, which consist of 16 bits per point, read and write data in
16bit units.
b15 b0
Zn
(d) If the index registers are used for 32-bit instructions, the data is stored in
registers Zn and Zn +1.
The lower 16 bits of data are stored in the index register No. (Zn)
designated in the sequence program, and the upper 16 bits of data are
stored in the designated index register No. + 1.
For example, if register Z2 is designated in the DMOV instruction, the lower
16 bits are stored in Z2, and the upper 16 bits are stored at Z3.
DMOV D0 Z2
REMARK
For index modification using the index register, refer to the following manual.
QCPU (Q mode) / QnACPU Programming Manual (Common instructions)
10 - 40 10 - 40
10 EXPLANTION OF DEVICES
MELSEC-Q
10.6.1 Switching between scan execution type programs and low speed execution type
programs
When switching from a scan execution type programs or low speed execution type
program to another program type, the index register (Z0 to Z15) data is saved
(protected) and reset.
(a) When switching from a scan execution type program to a low speed
execution type program occurs, the scan execution type program's index
register data is saved, and the low speed execution type program's index
register data is restored.
(b) When switching from a low speed execution program to a scan execution
type program occurs, the low speed execution type program's index
register data is saved, and the scan execution type program's index register
data is restored.
Switch- Switch- Switch-
ing Low speed ing ing Low speed
Scan execution Scan execution
Executed program execution execution
type program type program
type program type program
1 2
Z0=1 Z0=0 to Z0=3 Z0=1 to Z0=6 Z0=3
Index register value
Saved Reset Saved Reset Saved Reset
10 - 41 10 - 41
10 EXPLANTION OF DEVICES
MELSEC-Q
10.6.2 Switching between scan/low speed execution type programs and interrupt/fixed scan
execution type programs
10 - 42 10 - 42
10 EXPLANTION OF DEVICES
MELSEC-Q
10 - 43 10 - 43
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) File registers are expansion devices for data registers.
(b) File register data is stored in files in the standard RAM, the memory card.
Refer to the table as follows:
CPU Module Type Number of File Registers
Q02CPU 32k points
Q02HCPU, Q06HCPU 64k points
Q12HCPU, Q25HCPU 128k points
Use a memory card to store much more points if necessary.
MOV K100 R2
Standard RAM/Memory card
File register
R0
R1
"100" is written to R2.
R2
(c) File registers, which consist of 16 bits per point, read and write data in 16bit
units.
b15 b0
Rn
(d) If the file registers are used for 32-bit instructions, the data will be stored in
registers Rn and Rn + 1.
The lower 16 bits of data are stored in the file register No. (Rn) designated
in the sequence program, and the upper 16 bits of data are stored in the
designated file register No.+ 1.
For example, if file register R2 is designated in the DMOV instruction, the
lower 16 bits are stored in R2, and the upper 16 bits are stored in R3.
DMOV D0 R2
Two file registers can be used to store numeric data from -2147483648 to
2147483647 or from 0H to FFFFFFFFH.
(e) The content of the file register is retained if power-off or reset operation is
performed. (It is not initialized if latch clear is conducted.)
To initialize the file register contents, perform data clear operation in a
sequence program or using GX Developer.
Example: To clear R0 to R999
FMOV K0 R0 K1000
• When using GX Developer, select file register all clear in the PLC memory
clear of the Online dialog box to clear the data.
10 - 44 10 - 44
10 EXPLANTION OF DEVICES
MELSEC-Q
REMARK
For details regarding the High Performance model QCPU memory cards, see
Section 6.1.
File registers are stored in three types of memories: standard RAM, SRAM card, and
Flash card.
Note that the file register access method differs depending on the memory type.
10 - 45 10 - 45
10 EXPLANTION OF DEVICES
MELSEC-Q
To use file registers, register the file registers with the High Performance model QCPU
in the following steps.
Start
10 - 46 10 - 46
10 EXPLANTION OF DEVICES
MELSEC-Q
(a)
(b)
(c)
(b) When selecting "Use the same file name as the program"
1) This setting should be selected when the file registers having the same
file name as the sequence program are to be used.
3) The number of file register to use can be set by writing to PLC online.
Example
When file registers (A to C) having the same name as the programs (A to C) are to be used,
operation is as shown below.
At program A execution --- File register A is accessed.
At program B execution --- File register B is accessed.
At program C execution --- File register C is accessed.
Synchronized
Program A execution R0 File register A
Synchronized
Program B execution R0 File register B
Synchronized
Program C execution R0 File register C
10 - 47 10 - 47
10 EXPLANTION OF DEVICES
MELSEC-Q
POINT
File registers dedicated to each program may not be designated with some
instructions. Refer to the allowable device in the programming manual of each
instruction for details.
(b)
10 - 48 10 - 48
10 EXPLANTION OF DEVICES
MELSEC-Q
(3) Registering the File Register File with the High Performance model
QCPU
If you click on the following check boxes at the "PLC file" tab screen in the “(PLC)
Parameter" dialog box, you must register a file register file with the High
Performance model QCPU:
• Not used
• Use the same file name as the program
For registration of a file register file, use the "Write to PLC" dialog box.
(a)
(d)
(b)
(c)
1) The capacity of file registers can be specified from ZR0 in the units of 1
point. Note that the capacity is secured in 256 point units as a file. If file
registers cannot be assigned from ZR0, this will result in a file register
file that contains points from ZR0 to the last point. For example, if the
storing range of file registers are designated from ZR1000 to ZR1791,
a file register file will contain points from ZR0 to ZR1791. Specify file
registers from ZR0 because undefined data is from ZR0 to ZR999. A
check on the capacity of file registers is made in the units of 1k points.
The capacity of file registers should be specified from R0 in the units of
1k points.
(d) Storing a file register file in the High Performance model QCPU's memory
This button is used to store a file register file with the specified number of
points in the specified High Performance model QCPU's memory.
10 - 49 10 - 49
10 EXPLANTION OF DEVICES
MELSEC-Q
MOV D0 R0 Block 0
R32767
RSET K2 R0 designation R0
for block 2
Block 1
MOV D0 R0 R32767
R0
Block 2
Memory card
MOV D0 ZR32768 ZR0
(Block 0)
ZR32767
MOV D0 ZR65536 ZR32768
(Block 1)
ZR65535
ZR65536
(Block 2)
10 - 50 10 - 50
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Using file register Nos. not registered or outside the registered
range
(a) When file register files are not registered in the High Performance model
QCPU, no error occurs even if reading/writing to file registers
Reading data from a file register results in the following:
• Undefined data is stored in the standard RAM.
• "0H" is stored in a memory card.
(b) Writing/reading file register Nos. outside the registered range (points)
No error occurs even if reading/writing occurs to these file registers.
Reading data from a file register results in the following:
• Undefined data is stored in the standard RAM.
• "0H" is stored in a memory card.
(b) The available file register capacity can be checked in the file register
capacity storage register (SD 647). 1
The file register capacity is stored in SD647 in 1k point units.
REMARK
1 : If a file register file is switched to another, the file register capacity of the
currently selected file register file is stored in SD647.
10 - 51 10 - 51
10 EXPLANTION OF DEVICES
MELSEC-Q
[Program example 1]
The file register "range of use" is checked at the beginning of each program.
Designates 4k points
SM400
< SD647 K4 M0 Final file register range check
M0
Y0 Alarm processing
M0 Transfer command
MOVP K4X20 R0 Writing to file register
[Program example 2]
The file register "range of use" is checked after executing the QDRSET instruction.
M0 Transfer command
MOVP K4X20 R0 Writing to file register
[Program example 3]
For block switching.
SM400
< SD647 K33 M0 Final file register range
check
M0
Y0 Alarm processing
10 - 52 10 - 52
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
Nesting devices are used to nest MC or MCR master control instructions when
programming operating conditions.
Executed regardless of
A, B, C condition statuses.
10 - 53 10 - 53
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
Pointer devices are used in jump instructions (CJ, SCJ, JUMP) or sub-routine call
instructions (CALL, ECALL).
A total of 4096 pointers can be used (total for all programs being executed).
(1) Definition
(a) Local pointers are pointers which can be used independently in program
jump instructions and sub-routine call instructions.
Local pointers cannot be used from other program jump instructions and
sub-routine CALL instructions.
Use an ECALL instruction to call a sub-routine subprogram in a program file
that contains local pointers.
(b) The same pointer No. can be used in each of the programs.
Program A Program B
Same pointer is
used.
CALL P0 CALL P0
FEND FEND
P0 P0
RET RET
END END
REMARK
For further information on jump instructions and sub-routine call instructions, see the
QCPU (Q Mode)/QnACPU Programming Manual (Common Instructions).
10 - 54 10 - 54
10 EXPLANTION OF DEVICES
MELSEC-Q
P0 to P99 occupy P0 to P199 occupy 200 points P0 to P299 occupy 300 points Total of 600
100 points points used.
(1) Definition
(a) Common pointers are used to call sub-routine programs from all programs
being executed in the High Performance model QCPU.
Program A Program C
FEND RET
P205
Program B
RET
CALL P205
END
FEND
Label
10 - 55 10 - 55
10 EXPLANTION OF DEVICES
MELSEC-Q
P0 to P99 occupy 100 points P0 to P99 occupy 100 points P0 to P199 occupy 200 points
POINT
(1) In the jump instruction, jumping to common pointers in other programs is not
allowed.
Common pointers should be used only with sub-routine call instructions.
10 - 56 10 - 56
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Interrupt pointers are used as labels at the beginning of interrupt programs.
Interrupt pointer (interrupt program label)
I
Interrupt program
IRET
(b) A total of 256 interrupt points (I0 to I255) can be used (total for all programs
being executed).
REMARK
1: To use the intelligent function module interrupt, the intelligent function module
setting (interrupt points setting) is required at the "PLC system" tab screen in the
“(PLC) Parameter" dialog box.
(For the interrupts from the intelligent function module, see Section 8.2.1.)
10 - 57 10 - 57
10 EXPLANTION OF DEVICES
MELSEC-Q
(b) A list of interrupt pointer Nos. and interrupt factors is given in Table 10.5
below.
Table 10.5 List of Interrupt Pointer Nos. and Interrupt Factors
I No. Interrupt Factors Priority I No. Interrupt factors Priority
Ranking Ranking
I0 1st point 237 I32 3 Errors that stop operation 1
I1 2nd point 238 I33 Empty ——
I2 3rd point 239 UNIT VERIFY ERR.
I3 4th point 240 I34 FUSE BREAK OFF 2
I4 5th point 241 SP. UNIT ERROR
I5 6th point 242 OPERATION ERROR
I6 QI60/A1SI61 7th point 243 I35 SFCP OPE. ERROR 3
I7 8th point 244 Error factor 4 SFCP ECE. ERROR
interrupt module EX. POWER OFF
I8 9th point 245
factor
I9 10th point 246 I36 ICM. OPE ERROR 4
I10 11th point 247 FILE OPE. ERROR
I11 12th point 248 I37 Empty ——
I12 13th point 249 I38 PRG. TIME OVER 5
I13 14th point 250 I39 CHK instruction execution 6
I14 15th point 251 Anunciator detection
I15 16th point 252
I40 to —— Empty ——
I16 1st point 224 I48
I17 2nd point 225
I18 3rd point 226 I49 Internal timer factor 0, 2 to 1.0mg 5 7
I19 4th point 227
I20 Sequence start 5th point 228
I21 6th point 229
generator module
I22 7th point 230
I23 factor 1 8th point 231
I24 9th point 232 Specifies which intelligent
I50 to Intelligent function
I25 10th point 234 function module is used 18 to 223
I255 module factor 6
I26 11th point 235 with parameters.
I27 12th point 236
I28 100ms 256
I29 Internal timer factor 40ms 255
I30 2 20ms 254
I31 10ms 253
REMARK
1 : 1st to 12th points are allocated in order, beginning from the sequence start
generator module installed closest to the High Performance model QCPU.
2 : The internal times shown are the default setting times.
These times can be designated in 0.5 ms units through a 0.5 to 1000 ms range
set at the "PLC system" tab screen in the "(PLC) Parameter" dialog box.
3 : When an error interruption with "I32 (error that stops operation)" occurs, the
High Performance model QCPU is not stopped until I32 processing is
completed.
4 : Execution of error interruptions is prohibited for the interrupt pointer Nos. I32 to
I39 when the power is turned on and during a High Performance model QCPU
reset. When using interrupt pointer Nos. I32 to I39, set the interruption
permitted status by using the IMASK instruction.
5 : Set the time-out period of the internal timer by choosing "PLC system" -
"System interrupt setting" - "High speed interrupt setting" on the PLC parameter
screen.
Set it in the setting range 0.2 to 1.0ms in 0.1ms increments.
6 : To use the intelligent function module interrupt, the intelligent function module
setting (interrupt points setting) is required at the "PLC system" tab screen in
the “(PLC) Parameter" dialog box.
(For the interrupts from the intelligent function module, see Section 8.2.1.)
POINT
7: When I49 is set in the PLC parameters, other interrupt programs (I0 to I48, I50
to I255) or fixed scan execution type programs must not be executed. If or
fixed scan execution type program or the like is executed, the interrupt
program using I49 cannot be executed at the set interrupt cycle intervals.
10 - 58 10 - 58
10 EXPLANTION OF DEVICES
MELSEC-Q
This device is used for checking if the block designated by the SFC program is valid.
For details on the use of SFC block devices, refer to the QCPU(Q mode)/QnACPU
Programming Manual (SFC).
This device is used for checking if a forced transition is designated for a specified
transition condition in a specified SFC program block.
For details regarding the use of SFC transition devices, refer to the QCPU(Q
mode)/QnACPU Programming Manual (SFC).
(1) Definition
The network No. designation device is used to designate the network No. in data
link instructions.
JP.READ Jn S1 S2 S3 D
REMARK
For details on data link instructions, refer to the Q Corresponding MELSECNET/H
Network System Reference Manual.
10 - 59 10 - 59
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
I/O No. designation devices are used with instructions dedicated to intelligent
function module to designate I/O numbers.
GP.READ Un S1 S2 S3 D
REMARK
For details on intelligent function module instructions, refer to the corresponding
manual for the intelligent function module to be used.
10 - 60 10 - 60
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
Macro instruction argument devices are used with ladders registered as macros.
When a VD setting is designated for a ladder registered as a macro,
conversion to the designated device is performed when the macro instruction is
executed.
> D0 D1 MOV D0 R0
<= D0 D1 MOV D1 R0
REMARK
1) 1 : With the macro instruction argument device, VD0 to VD9 can be used in one
ladder registered as a macro instruction.
2) The GX Developer read mode provides an option to view a program in macro
instruction format.(Choose "View" - "Macro Instruction format display" to view
macro instructions.)
10 - 61 10 - 61
10 EXPLANTION OF DEVICES
MELSEC-Q
10.12 Constants
(1) Definition
Decimal constants are devices which designate decimal data in sequence
programs.
They are designated as "K "settings (e.g. K1234), and are stored in the High
Performance model QCPU in binary (BIN) code.
See Section 4.8.1 for details on binary code.
(1) Definition
Hexadecimal constants are devices which designate hexadecimal or BCD data in
sequence programs.
(For BCD data designations, 0 to 9 digit designations are used.)
Hexadecimal constants are designated as "H " settings (e.g. H1234).
See Section 4.8.3 for details on hexadecimal code.
10 - 62 10 - 62
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
Real numbers are devices which designate real numbers in the sequence
program.
Real numbers are designated as "E "settings (e.g. E1.234).
X1
EMOVP E1.234 D0
REMARK
n 3
1:The "+3" in the above example represents a 10 value (10 ).
(1) Definition
Character string constants are devices used to designate character strings in
sequence programs.
They are designated by quotation marks (e.g. "ABCD1234").
10 - 63 10 - 63
10 EXPLANTION OF DEVICES
MELSEC-Q
When executing multiple programs in the High Performance model QCPU, local
devices among the internal user devices can be designated to execute each of the
programs in an independent manner.
Moreover, the device initial settings allow the data setting for devices and intelligent
function modules/special function modules without using a program.
A number of programs can be stored and executed in the High Performance model
QCPU.
High Performance model QCPU devices are classified into "global devices" shared by
all the programs being executed and "local devices" used independently by each of the
programs.
M0 Internal relay
Y12 M0 ON/OFF
M0 ON/OFF data
Program B
M0
Y11
M0 ON/OFF data
(b) When executing multiple programs, the "shared range" for all programs, and
the "independent range" for each program must be designated in advance.
Example: Internal relay
M0 Shared by all programs
Used in program A The "range of use" must be designated for each program.
Used in program B
Used in program C
10 - 64 10 - 64
10 EXPLANTION OF DEVICES
MELSEC-Q
If local devices are designated as M7000 or later, they can be used independently in each
program executing M7000 or later.
Program A Memory card
For program A
M7000
Internal relay
Y12
M7000 ON/OFF
M7000 ON/OFF data
Program B
For program B
M7000 Internal relay
Y11 M7000 ON/OFF
(b) Five device types can be used as local devices: internal relays (M), edge
relays (V), timers (T, ST), counters (C), and data registers (D).
(c) Programs used as local devices exchange the local device file data stored
in the memory card with the data in the device memory of High
Performance model QCPU.
Therefore the scan time is extended by this data exchange time.
Program A Program B Program C
Sequence program
POINT
The local device may not be designated with some instructions.
Refer to the allowable device in the programming manual of each instruction for
details.
REMARK
Refer to Section 10.2 for the concept of the number of words of the devices used as
local devices.
10 - 65 10 - 65
10 EXPLANTION OF DEVICES
MELSEC-Q
2) When local device settings are designated, the drive and file name
where the local device data is to be stored must be designated at the
"PLC file" tab screen in the “(PLC) Parameter" dialog box.
3) To write data from the GX Developer onto the High Performance model
QCPU, specify whether to use a local device at the "PLC file" tab
screen in the “(PLC) Parameter" dialog box. If a local device is not
specified, the local devices used for previously-executed programs are
selected. This does not require replacing local devices in a memory
card with the device memory of the High Performance model QCPU. If
local devices are not used for Program B while executing Programs A,
B, and C, the local devices are used as shown below.
Used local device of program A
Program A Program B Program C Program A Program B
Sequence program
POINT
Unless designated as "local devices", all devices are global devices.
(e) Using local devices used by the file where a sub-routine program is stored
It is possible to use local devices that are used by the file where a sub-
routine program is stored when executing a sub-routine program.
Whether or not such local devices are used is set by special relay "SM776"
ON/OFF setting.
10 - 66 10 - 66
10 EXPLANTION OF DEVICES
MELSEC-Q
X0 Execution of the
CALL P100 P100
sub-routine program
X2
INCP D0 Sub-routine
program
RET
END
Read/write of the
Local devices used by local devices Local devices used by
the file name: ABC the file name: DEF
X0
CALL P100 Execution of the P100
sub-routine program
X2
INCP D0 Sub-routine
Read/write of the program
local devices
RET
END
2) Cautions
• If SM776 is ON, the local device data is read when the sub-routine
program is called and the local device data is saved after the execution of
the RET instruction. Accordingly, scan time is elongated by the time as
when a sub-routine program is executed once with the setting of "SM776:
ON". (See Section 10.13.1)
• ON/OFF setting of SM776 is enabled in CPU modules.
Setting in file units is not enabled.
• If the ON/OFF setting of SM776 is changed while a sequence program is
executed, the control is made according to the information after change.
REMARK
For details on SM776, see Appendix 1.
10 - 67 10 - 67
10 EXPLANTION OF DEVICES
MELSEC-Q
(f) Using local devices when executing an interrupt/fixed scan execution type
program
It is possible to use local devices in the file where an interrupt/fixed scan
execution type program is stored when executing an interrupt/fixed scan
execution type program.
The local devices can be set available/unavailable by special relay "SM777"
ON/OFF setting.
1) Switching over local devices by setting ON/OFF for a special relay
(SM777)
SM777
Executes operation with the local devices in the file which was
OFF executed before the execution of the interrupt/fixed scan execution
type program.
Executes operation with the local devices in the file where the
ON
interrupt/fixed scan execution type program is stored.
X0
DECP D1 I0
Occurrence
X2
of interrupt INCP D0 Execution of the
Interrupt
interrupt program
program
IRET
END
Read/write of the
local devices
Local devices used by Local devices used by
the file name: ABC the file name: DEF
X0
DECP D1 I0
Occurrence
X2
of interrupt INCP D0 Execution of the
Interrupt
interrupt program
program
IRET
END
Read/write of the
local devices
Local devices used by Local devices used by
the file name: ABC the file name: DEF
REMARK
For details on SM777, see Appendix 1.
10 - 68 10 - 68
10 EXPLANTION OF DEVICES
MELSEC-Q
2) Cautions
• If SM777 is ON, the local device data is read before the
interrupt/fixed scan execution type program is executed and the local
device data is saved after the execution of the IRET instruction.
Accordingly, scan time increases when an interrupt/fixed scan
execution type program is executed once with the setting of "SM777:
ON". (See Section 10.13.1)
• ON/OFF setting of SM777 is enabled in CPU module units.
Setting in file unit is not enabled.
• If the ON/OFF setting of SM777 is changed while a sequence
program is executed, the control is made according to the information
after change.
The local device data cannot be cleared by operating from the GX Developer.
To clear the local device data, follow the above-listed steps 1) and 2).
10 - 69 10 - 69
10 EXPLANTION OF DEVICES
MELSEC-Q
(1) Definition
(a) Using device initial value registers, the data used for a program in device or
intelligent function module buffer memories without using a data setting
program.
The use of device initial values provides a shortcut to specify device data in a
program without using a device data setting program (initial program).
(b) In order to use the device initial values, the device initial data must be
created with GX Developer in advance, and this data must be stored as a
device initial value file in the High Performance model QCPU's program
memory, standard RAM or memory card.
At power ON, or on switching from STOP to RUN, the High Performance
model QCPU writes the data from the device initial value file to the specified
device or intelligent function module buffer memory.
High Performance model QCPU
"Device initial
Intelligent
value data"
function
setting
module
10 - 70 10 - 70
10 EXPLANTION OF DEVICES
MELSEC-Q
(b) Designate the device initial value data settings in the "device mode" screen.
[Device initialization range setting screen] [Device mode screen]
(c) At the "PLC file" tab screen in the “(PLC) Parameter" dialog box, designate
the name of the file where the device initial value data is to be stored.
[PLC file screen]
(d) Write the device initial value data and parameter settings to the High
Performance model QCPU.
10 - 71 10 - 71
10 EXPLANTION OF DEVICES
MELSEC-Q
(b) Device initial values cannot be used in areas where no setting is made for
switching from STOP to RUN (for data that is changed by a program at
power ON). Create a program to specify a device by using the MOV
instruction in the main routine program. Use the TO instruction to write data
to the buffer memory of the intelligent function module.
REMARK
For details on the setting procedures for the "device initial value range", "device
initial value data" items, and for writing the device initial values to the High
Performance model QCPU, refer to the GX Developer Operating Manual.
10 - 72 10 - 72
11 HIGH PERFORMANCE MODEL QCPU PROCESSING TIME
MELSEC-Q
This chapter describes how to estimate the length of High Performance model QCPU
11
processing time.
(b) The table below shows the length of END processing time.
CPU Type END Processing Time
Q02CPU 0.38 ms
Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPU 0.15 ms
11 - 1 11 - 1
11 HIGH PERFORMANCE MODEL QCPU PROCESSING TIME
MELSEC-Q
11 The following functions increase the length of scan time. When using any of the
following functions, add a value of extended time to values obtained from Section 11.1.
• MELSECNET/H refresh • Local devices
• CC-Link automatic refresh • Execution of multiple programs
• Sampling trace • Installation/removal of a memory card
• GX Developer monitoring • File register with the same filename as a program.
11 - 2 11 - 2
11 HIGH PERFORMANCE MODEL QCPU PROCESSING TIME
MELSEC-Q
(a) The table below shows the processing time required when 64 data register
points are assigned by the registered monitor.
CPU Type Processing Time
Q02CPU 0.10 ms
Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPU 0.06 ms
(b) The table below shows the processing time required when monitoring
conditions are specified.
Processing Time
CPU Type When steps are When devices
in match are in match
Q02CPU 0.05 ms 0.01 ms
Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPU 0.03 ms 0.01 ms
11 - 3 11 - 3
11 HIGH PERFORMANCE MODEL QCPU PROCESSING TIME
MELSEC-Q
The length of scan time can be shorted by making changes to the PLC Parameter
setting as follows:
• A series CPU compatibility
• Arithmetic operation of floating-point
11 - 4 11 - 4
12 PROCEDURE FOR WRITING PROGRAMS TO HIGH PERFORMANCE
MODEL QCPU
MELSEC-Q
This chapter describes the procedure for writing programs created at the GX
Developer to the High Performance model QCPU.
This section describes the procedure for writing one program to the High Performance
model QCPU and executing it.
In order to create a program, the program size, number of device points used, and the
program file name, etc., must be set in advance.
12 - 1 12 - 1
12 PROCEDURE FOR WRITING PROGRAMS TO HIGH PERFORMANCE
MODEL QCPU
MELSEC-Q
12.1.2 Procedure for writing programs to the High Performance model QCPU
The procedure for writing programs and parameters created with GX Developer to the
High Performance model QCPU standard ROM is shown below.
In order to write programs and parameters to the High Performance model QCPU
standard ROM, the valid parameters settings must be designated by the High
12 Performance model QCPU DIP switches (SW2, SW3), and the boot settings must be
designated in the PLC parameter mode.
For details regarding High Performance model QCPU DIP switches, refer to the High
Performance model QCPU(Q mode) User's Manual(Hardware Design, Maintenance
and Inspection).
When writing programs and parameters to the High Performance model QCPU
program memory, the steps indicated by asterisks ( ) below are not required.
Procedural steps shown in boxes are performed at the GX Developer, and those
shown in boxes are performed in the High Performance model QCPU.
Start
Change the
NO
number of device See Section 10.1.2.
points?
YES
1)
12 - 2 12 - 2
12 PROCEDURE FOR WRITING PROGRAMS TO HIGH PERFORMANCE
MODEL QCPU
MELSEC-Q
1)
YES
2)
12 - 3 12 - 3
12 PROCEDURE FOR WRITING PROGRAMS TO HIGH PERFORMANCE
MODEL QCPU
MELSEC-Q
2)
12 - 4 12 - 4
12 PROCEDURE FOR WRITING PROGRAMS TO HIGH PERFORMANCE
MODEL QCPU
MELSEC-Q
This section describes the procedure for writing multiple programs split up according to
function, process, designer to the High Performance model QCPU and executing
them.
12 - 5 12 - 5
12 PROCEDURE FOR WRITING PROGRAMS TO HIGH PERFORMANCE
MODEL QCPU
MELSEC-Q
12.2.2 Procedure for writing programs to the High Performance model QCPU
The procedure for writing programs and parameters created by GX Developer to the
memory card mounted in the High Performance model QCPU memory card interface
is shown below.
In order to write programs and parameters to the High Performance model QCPU
memory card, the memory card must be mounted, the valid parameters drive settings
must be designated by the High Performance model QCPU DIP switches (SW 2, SW
3), and the boot settings for the PLC parameters must be designated by GX
Developer.
For details regarding High Performance model QCPU DIP switches, refer to the High
Performance model QCPU (Q mode) User's Manual (Hardware Design, Maintenance
and Inspection).
When writing programs and parameters to the High Performance model QCPU
program memory, the steps indicated by asterisks ( ) below are not required.
Procedural steps shown in boxes are performed at GX Developer side, and those
shown in boxes are performed at the High Performance model QCPU side.
Start
Change the
NO
number of device See Section 10.1.2.
points?
YES
1)
12 - 6 12 - 6
12 PROCEDURE FOR WRITING PROGRAMS TO HIGH PERFORMANCE
MODEL QCPU
MELSEC-Q
1)
YES
NO Designate local
See Section 10.13.1.
devices?
YES
YES
2)
12 - 7 12 - 7
12 PROCEDURE FOR WRITING PROGRAMS TO HIGH PERFORMANCE
MODEL QCPU
MELSEC-Q
2)
CPU module's "BOOT" If a boot file setting is not made (or when
LED switches ON. writing parameters or programs onto the
program memory), the "BOOT" LED does
not light up.
End
12 - 8 12 - 8
13 OUTLINE OF MULTIPLE CPU SYSTEM
MELSEC-Q
13.1 Features
Everything controlled on a single CPU Mechanical control made even father by load dispersion in
accordance with control tact
(b) It is possible to increase the amount of memory used throughout the entire
system by spreading the memory used between several High Performance
model QCPUs.
Used memory
90% One CPU module added
• Program memory expanded
• Device memory expanded
13 - 1 13 - 1
13 OUTLINE OF MULTIPLE CPU SYSTEM
MELSEC-Q
(b) The High Performance model QCPU can use the FROM/S.TO instruction to
read data from other CPU as necessary.
(d) The High Performance model QCPU can issue instructions dedicated to
communication between multiple CPUs, to read or write device data from/to
the Motion CPU.
The High Performance model QCPU can issue events to the PC CPU
module. 2
REMARK
1: Refer to the manual of the Motion CPU for instructions dedicated to Motion.
2: Refer to the manuals of Motion CPU and PC CPU module for instructions
dedicated to the communication between multiple CPUs.
13 - 2 13 - 2
13 OUTLINE OF MULTIPLE CPU SYSTEM
MELSEC-Q
PLC CPU
Motion CPU
PC CPU module
CPU module
Output module
Output module
function module
function module
Input module
Input module
Input module
Power supply
Intelligent
Intelligent
(b) The CPU module that controls the I/O modules and intelligent function
modules is known as the "Control CPU".
The I/O modules and intelligent function modules controlled by the control
PLC are known "controled modules".
Other modules not controlled by the control CPU are known as "non-
controlled modules".
REMARK
1: For further information on PC CPU module, consult CONTEC Co.,Ltd.
Tel:+81-6-6472-7130
2: Indicates the grouping configuration on the GX Developer.
CPU module1 indicates the "CPU No.1," and "1" on the I/O module and
intelligent function module indicates that their control CPU is the CPU No.1.
13 - 3 13 - 3
13 OUTLINE OF MULTIPLE CPU SYSTEM
MELSEC-Q
Input module
Output module
Input module
Output module
function module
function module
Power supply
CPU module
CPU module
Intelligent
Intelligent
1 2 1 1 1 1 2 2 2
13 - 4 13 - 4
13 OUTLINE OF MULTIPLE CPU SYSTEM
MELSEC-Q
The differences between single CPU system and multiple CPU system are explained
below.
13 - 5 13 - 5
13 OUTLINE OF MULTIPLE CPU SYSTEM
MELSEC-Q
(8) Processing during resets and errors (see Sections 14.2.7 and
14.2.8)
The processing performed when resets and errors occur are different for the
multiple CPU system's CPU No.1 and the CPU No.2 to CPU No.4.
(a) High Performance model QCPU for CPU No.1 can be reset with a multiple
CPU system.
CPU modules for CPU No.2 to No.4 and Motion CPU cannot be reset.
(b) Multiple CPU system operations will be suspended when a stop error
occurs with the CPU No.1.
It is possible to select whether to suspend or continue with multiple CPU
system operations when a stop error occurs with CPU Nos. 2 to 4 and
Motion CPU.
13 - 6 13 - 6
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
MITSUBISHI
MITSUBISHI
LITHIUM BATTERY
Battery
Battery holder
(Q7BAT)
Q7BAT-SET
POINT
1: Only one memory card can be mounted.
Select the memory card SRAM, Flash and ATA in accordance with application and capacity.
When commercial memory cards, the operation is not assured.
2: The additional QA1S65B and QA1S68B base units are used as the AnS Series power supply
module, the I/O module and the special function module.
3: For further information on PC CPU module, consult CONTEC Co., Ltd Tel: +81-6-6472-7130
4: The Q Series power supply module is not required for the Q5 B extension base unit.
5: The motion CPU and PC CPU module do not accept a battery..
6: As a power supply module, use the Q61P-A1, Q61P-A2, Q62P or Q64P. The slim type power
supply module (Q61SP) cannot be used.
14 - 1 14 - 1
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
(b) When slim type main base unit (Q3 SB) is used
MITSUBISHI
MITSUBISHI
LITHIUM BATTERY
Memory card *1
High Performance model QCPU
(Q2MEM-1MBS,Q2MEM-2MBS, Battery
(Q02CPU,Q02HCPU,Q06HCPU,
Q2MEM-2MBF,Q2MEM-4MBF, (Q6BAT)
Q12HCPU,Q25HCPU)
Q2MEM-8MBA,Q2MEM-16MBA,
Q2MEM-32MBA) Motion CPU *4
MITSUBISHI
LITHIUM BATTERY
Battery
Battery holder
(Q7BAT)
Q7BAT-SET
14
POINT
1: One memory card is installed.
Select the memory card from the SRAM card, Flash card and ATA card
according to the application and capacity.
When the memory card available on the market is used, operation is not
guaranteed.
2: The slim type main base unit does not have an extension cable connector. The
extension base or GOT cannot be connected.
3: As a power supply module, use the slim type power supply module (Q61SP).
The Q61P-A1, Q61P-A2, Q62P or Q64P cannot be used as a power supply
module.
4: The Motion CPU do not accept a battery.
14 - 2 14 - 2
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
MITSUBISHI
RS-232 cable
(QC30R2)
1: For writing into memory card on GX Developer, and USB cable, refer to the
operating manual of the GX Developer.
POINT
1) Refer to the Motion Controller User’s Manual for connection between the Motion
CPU and peripheral modules.
2) The GX Developer installed in a Personal computer connected to the Motion
CPU is not used to communicate with the High Performance model QCPU.
3) You cannot install GX Developer and Motion CPU software package in a single
PC.
4) Refer to the manual of the PC CPU module for the connection between the PC
CPU module and peripheral modules.
14 - 3 14 - 3
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
Extension cable
OUT
1F 3F 5F 7F 9F BF DF FF 11F
13F 15F 17F 19F 1BF1DF 1FF 21F 23F 25F 27F 29F
System
OUT
OUT
configuration
IN
IN
2BF 2DF2FF 31F 33F 35F 37F 39F 55F 57F 59F 5BF 5DF5FF 61F 63F
OUT
IN
IN
3BF3DF 3FF 41F 43F 45F 47F 49F 65F 67F 69F 6BF 6DF6FF 71F 73F
OUT
IN
IN
14 - 4 14 - 4
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
14.2.1 Function versions of High Performance model QCPU, Motion CPUs and PC CPU
module that can be used, and their mounting positions
14 - 5 14 - 5
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
(2) High Performance model QCPU, Motion CPU and PC CPU module
mounting positions
(a) Up to four modules of High Performance model QCPU can be mounted in
the CPU slots (starting from the slot on the right side of power supply
module closely) and the neighboring slots up to slot 2.
There must be no empty slot between CPU modules.
1 —
module
PC CPU module
CPU module
CPU module
CPU module
Power supply
Motion CPU
Power supply
Power supply
CPU module
1
2
module
module
module
CPU module
CPU module
CPU module
CPU module
CPU module
Power supply
Power supply
Power supply
Motion CPU
Motion CPU
Motion CPU
module
module
module
3
CPU 0 1 2 CPU 0 1 2
1
PC CPU module
PC CPU module
Motion CPU
1
Power supply
CPU module
CPU module
CPU module
Power supply
—
module
module
CPU module
CPU module
CPU module
Power supply
Power supply
Motion CPU
Motion CPU
CPU module
CPU module
CPU module
CPU module
CPU module
Power supply
Motion CPU
4
module
module
module
14 - 6 14 - 6
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
Motion CPU
Motion CPU
Motion CPU
CPU module
Power supply
1
PC CPU module
1
CPU module
CPU module
Power supply
CPU module
CPU module
CPU module
PC CPU module
Power supply
Motion CPU
module
module
module
CPU 0 1 2 3
PC CPU module
1
Motion CPU
Motion CPU
CPU module
Power supply
module
(b) Motion CPUs are mounted together on the slot to the right of the High
Performance model QCPU.
High Performance model QCPUs cannot be mounted to the right of Motion
CPUs.
Mounting is allowed Mounting is not allowed
CPU 0 1 2 CPU 0 1 2
CPU module
CPU module
CPU module
CPU module
Power supply
Power supply
Motion CPU
Motion CPU
Motion CPU
Motion CPU
module
module
(c) Mount the PC CPU module at the right end in the multiple PLC system.
No CPU module can be mounted on the right side of the PC CPU module.
CPU 0 1 2 3
PC CPU module
Motion CPU
CPU module
Power supply
module
Motion CPU
Power supply
Power supply
CPU module
CPU module
CPU module
CPU module
Empty
Empty
module
module
14 - 7 14 - 7
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
POINT
To add a High Performance model QCPU or Motion CPU to a system where the
PC CPU module is used, shift the PC CPU module to the right because no CPU
module is allowed on the right side of the PC CPU module.
(2) High Performance model QCPU, Motion CPU and PC CPU module
CPU numbers
(a) CPU numbers are allocated for identifying the High Performance model
QCPUs, Motion CPUs and PC CPU module mounted on the main base unit
in the multiple CPU system. The CPU No.1 is allocated to the CPU slot,
and the CPU No.2, No.3 and No.4 are allocated to the right of the CPU
No.1.
CPU slot: CPU No.1
Slot: CPU No.2
Slot: CPU No.3
Slot: CPU No.4
CPU module
CPU module
CPU module
CPU module
Power supply
module
(b) The High Performance model QCPU stores the host number in the special
register (SD395).
It is recommended to build a program for checking the host number using
the High Performance model QCPU.
This will enable easy verification when High Performance model QCPUs
are not mounted correctly and when programs are written into other CPUs
with the GX Developer.
In the program shown below, the annunciator (F1) is set to ON when the
High Performance model QCPU writing programs is a CPU other than the
CPU No.1 (SD395 = 1.)
The "USER" LED on the front of the High Performance model QCPU is
illuminated when the annunciator (F1) is set to ON. The number of the
annunciator that has been set at ON will also be stored in a special register
(SD62).
REMARK
For the own number confirmation method for the Motion CPU and PC CPU module,
refer to the manual of the Motion CPU and PC CPU module.
14 - 8 14 - 8
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
14.2.2 Precautions when using Q Series I/O modules and intelligent function modules
REMARK
• The function version of intelligent function modules can be confirmed at the rated
name plate of the intelligent function module and with the GX Developer's "System
monitor product information list window" (see Section 2.3.)
• See Section 14.2.4 for details on restrictions on the number that can be used with
intelligent function modules.
14 - 9 14 - 9
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
14.2.3 Limitations when mounting AnS Series corresponding I/O modules and special
function modules
Power
supply CPU CPU CPU CPU Module Module Module Module Module Module Module Module Module
module module module module module
1 2 3 4 1 1 2 2 3 4 4 4 4 Module No.
Q312B
Power
AnS AnS AnS AnS AnS AnS AnS AnS
supply Module Module Module Module Module Module Module Module
module Same CPU set as the control CPU
2 2 2 2 2 2 2 2
QA1S68B
Power
AnS AnS AnS AnS AnS
supply Module Module Module Module Module
module
2 2 2 2 2
QA1S68B
The Module No. shown in the illustration represents the
following:
CPU 1 to 4 : CPU's CPU number
Modules 1 to 4 : Control CPU's CPU number
14 - 10 14 - 10
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
14 - 11 14 - 11
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
The following table indicates restrictions on the number of modules that can be
mounted in multiple CPU system. Ensure that the number of modules mounted is
within these ranges.
Number of modules that can be Number of modules that can be
Product Model
mounted per system mounted per PLC
• QJ71LP21
• QJ71BR11 Maximum of four PLC to PLC Maximum of four PLC to PLC
Q series MELSECNET/H
• QJ71LP21-25 networks and remote I/O networks and remote I/O
network modules
• QJ71LP21G networks networks
• QJ71LP21GE
• QJ71E71
Q series Ethernet
• QJ71E71-B2 Maximum of four Maximum of four
interface modules
• QJ71E71-100
Q series CC-Link system • QJ61BT11
No limit No limit
master/local modules • QJ61BT11N
No restrictions No restrictions
MELSECNET/MINI-S3 • A1SJ71PT32-S3
(however, the automatic refresh (however, the automatic refresh
data link modules • A1SJ71T32-S3
function cannot be set up) function cannot be set up)
• A1SD51S
• A1SD21-S1
AnS series corresponding
• A1SJ71J92-S3 Maximum of six Maximum of six
Special function modules
(When the GET and PUT
services are used)
• A1SI61 Only one
Maximum of four
Interruption modules Only one
• QI60 (maximum of three when the
A1SI61 is in use)
: A maximum of 4 modules per PLC (16 modules per system) can be controlled if the
network parameters for CC-Link are set and controlled by GX Developer. There is
no restriction in the number of modules when the parameters are set by the
instructions dedicated to the CC-Link.
14 - 12 14 - 12
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
14 - 13 14 - 13
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
After parameters such as multiple CPU settings are changed, reflect the changes
to keep uniformity among all CPUs in the multiple CPU system, then reset the
CPU No.1.
It is possible to transfer across and use the CPU settings and I/O Assignments
set up for other projects with GX Developer.
(See section 19.2.3 for details on transferring and using multiple CPU settings
and I/O Assignments.)
(a) Number of CPUs setting (setup necessary)
1) The number of CPU modules to be used on a multiple CPU system are
set at the PLC parameter's "Multiple CPU settings" screen in the (PLC)
Parameter dialog (indicated with the "A" arrow.)
A
2) Ensure that the No. of CPU set for the multiple CPU system is the
same as the number of CPUs actually mounted.
When an empty slot is secured for the purpose of mounting additional
CPU modules in the future, set "PLC (Empty)" at the "I/O assignment"
tab screen in the (PLC) "Parameter" dialog box.
For example, when setting "4" as "No. of CPU" in the "Multiple CPU
settings" screen and securing one of them for future use, set slot 3 to
"CPU (Empty)" (indicated with the "B" arrow.)
14 - 15 14 - 15
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
14 - 16 14 - 16
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
(a) The multiple CPU system will be started up if all CPUs have the same
settings.
(b) The operations described in table 14.4 will be performed when all CPUs do
not have the same settings.
In this event, check the multiple CPU settings and I/O Assignment, and set
all CPUs with the same settings.
To start the multiple CPU system, reset the High Performance model
QCPU for CPU No.1 or turn off and on the CPU (power ON OFF ON).
(For the action after the High Performance model QCPU for CPU No.1 is
reset, see Section 14.2.7.)
POINT
After multiple CPU system parameters unavailable with the Motion CPU are
changed for the High Performance model QCPU or PC CPU module in a multiple
CPU system including a Motion CPU, be sure to reset the High Performance model
QCPU for CPU No.1 or turn off and on the CPU. (Otherwise the High Performance
model QCPU or PC CPU module checks consistency with multiple CPU system
parameters of the Motion CPU, causing a "PARAMETER ERROR (error code:
3012)."
14 - 17 14 - 17
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
It is possible to reset the entire multiple CPU system by resetting the CPU No.1.
The CPU modules for CPU No.2 to No.4, I/O modules and intelligent function modules
will be reset when the CPU No.1 is reset.
If a stop error occurs for any of the CPUs on the multiple CPU system, either reset the
CPU No.1 or restart the sequencer (power supply ON OFF ON) after the problem
has been recovered.
(Recovery is not allowed by resetting the CPU modules for CPU No.2 to No.4 for which
stop errors have occurred.)
0 1 2 3 4 5 6 7
CPU No.1 CPU module
CPU No.2 CPU module
CPU No.3 CPU module
CPU No.4 CPU module
Power supply
module
POINT
(1) It is not possible to reset the CPU modules for CPU No.2 to No.4 individually in
the multiple CPU system. If an attempt to reset any of the CPU modules for
CPU No.2 to No.4 during operation of the multiple CPU system, a "MULTIPLE
CPU DOWN (error code: 7000)" error will occur for the other CPUs, and the
entire multiple CPU system will be halted. However, depending on the timing in
which the CPU modules have been reset, there are cases where errors other
than the "MULTIPLE CPU DOWN" error will halt the other CPUs.
(2) A "MULTIPLE CPU DOWN (error code: 7000)" error will occur regardless of
the operation mode set at the "Multiple CPU settings" screen within the (PLC)
Parameter dialog box. (stop/continue all other CPUs on the CPU modules for
CPU No.2 to No.4 error) when the CPU modules for CPU No.2 to No.4 are
reset (See Section 14.2.8 for details on the multiple CPU setting operation
modes.)
14 - 18 14 - 18
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
14.2.8 Processing when High Performance model QCPU stop errors occur
The operations for the entire system will differ when a CPU No.1 stop error occurs and
when any of CPU No.2 to No.4 stop error occurs in the multiple CPU system.
(2) When a stop error occurs at the CPU No. other than No.1
Whether the entire system is halted or not is determined by the multiple CPU
setting's "Operating Mode" setting when a stop error occurs in the CPU modules
for CPU No.2 to No.4.
The default setting is for all CPUs to be stopped with a stop error.
When you do not want to stop all CPUs at occurrence of a stop error in any of the
CPU modules, click the check box that corresponds to the CPU No. whose error
will not stop all CPUs. (Arrow D)
(a) A "MULTIPLE CPU DOWN (error code: 7000)" error occurs for the CPU
modules and the multiple CPU system will be halted when a stop error is
occurs in CPU modules for which the "All station stop by stop error of CPU
'n' " has been set. (See POINT on the next page for details.)
(b) A "MULTIPLE CPU ERROR (error code: 7010)" error occurs for all other
CPUs but operations will continue when a stop error occurs in CPU
modules for which the " All station stop by stop error of CPU 'n' " has not
been set.
14 - 19 14 - 19
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
POINT
A "MULTIPLE CPU DOWN" stop error will be occur for the CPU on which the error
was detected when a stop error occurs.
There are cases where the timing of error detection will search for the CPU on
which the stop error that has caused the "MULTIPLE CPU DOWN" error occurs,
not the first CPU on which a stop error occurs, and the entire system will assume
the "MULTIPLE CPU DOWN" status.
For example, if a stop error occurs in the CPU No.2 and the CPU No.3 is halted as
a direct consequence of this, there are cases where the CPU No.1 will be halted
because of the stop error on CPU No.3 depending on the timing of error detection.
CPU module No.1 Halted with an "OPERATION ERROR"
Owing to this, there are cases where a different CPU No. to the CPU that initially
caused the stop error will be stored in the error data's common information
category.
In this event, remove the reason for the error on the CPU that caused the stop error
in addition to the "MULTIPLE CPU DOWN" error when restoring the system.
In the illustration shown below, the cause of the CPU No.2 error that did not cause
the "MULTIPLE CPU DOWN" error is removed.
14 - 20 14 - 20
14 SYSTEM CONFIGURATION OF MULTIPLE CPU SYSTEM
MELSEC-Q
14.2.9 Reducing the time required for multiple CPU system processing
(3) Reducing the time required for multiple CPU system processing
The following methods are available for reducing the amount of time required for
multiple CPU system processing.
• Combine modules with many access points, such as MELSECNET/H and CC-
LINK refresh, etc., together into a main base unit.
• Set modules with many access points, such as MELSECNET/H and CC-LINK
refresh, etc., as control module on a single CPU module, and ensure that
simultaneous access does not occur.
• Reduce the number of MELSECNET/H and CC-LINK refresh access points.
• Reduce the number of automatic refresh points between CPU modules.
POINT
It is possible to reduce scan time by changing the following PLC parameter
settings:
• A Series CPU compatibility setting
• Floating point arithmetic processing
See Section 18.3 for details.
14 - 21 14 - 21
15 ALLOCATING MULTIPLE CPU SYSTEM I/O NUMBERS
MELSEC-Q
CPU module
CPU module
module
2) Example: Three modules are mounted and one empty slot exists
0 1 2 3 4 5 6 7
Power supply
CPU module
CPU module
CPU module
Empty
module
CPU module
CPU module
CPU module
module
REMARK
• If the number of CPU modules mounted on the main base unit is smaller than the
number set at the "Multiple CPU setting" of “(PLC) Parameter" dialog box, the
slot(s) on the right of the actually mounted CPU modules is (are) set as "CPU
(Empty).
• The I/O number for the multiple CPU system can be confirmed with the system
monitor.
15 - 1 15 - 1
15 ALLOCATING MULTIPLE CPU SYSTEM I/O NUMBERS
MELSEC-Q
15.1.2 I/O number of High Performance model QCPU, Motion CPU and PC CPU module
I/O numbers are allocated to the CPU modules with the multiple CPU system in order
to allow interactive communications between the CPU modules with the following
commands.
• Multiple CPU commands
• Motion dedicated commands
• Dedicated communication commands between multiple CPUs
The I/O numbers for the CPU modules are fixed for the slots on which they are
mounted and cannot be amended.
The table below shows the I/O number allocated to each CPU module when the
multiple CPU system is composed.
CPU module
CPU slot Slot 0 Slot 1 Slot 2
mounting position
First I/O number 3E00H 3E10H 3E20H 3E30H
The CPU modules I/O numbers are used in the following cases.
• When writing data in the host CPU's CPU shared memory with the S.TO instruction.
1 15
• When reading data from other CPU's CPU shared memory with the FROM
instruction. 1
• When reading data from other CPU's CPU shared memory with the intelligent
function module device (U_\G_). 1
• When specifying the High Performance model QCPU to be accessed with the
Ethernet module. 2
• When specifying the High Performance model QCPU to be accessed with the serial
communication module. 3
REMARK
1: See Chapter 16 for details on among High Performance model QCPU, Motion
CPU and PC CPU module.
2: Refer to the Ethernet module's manual for details on accessing the High
Performance model QCPU with the Ethernet module.
3: Refer to the serial communication module's manual for details on accessing the
High Performance model QCPU with the serial communication module.
15 - 2 15 - 2
15 ALLOCATING MULTIPLE CPU SYSTEM I/O NUMBERS
MELSEC-Q
Sets up the High Performance model QCPU/Motion CPU/PC CPU module that are to
control the multiple CPU system's I/O modules and intelligent function modules.
(a) Q Series I/O modules and intelligent function modules can be selected as
control CPUs for each slot.
(b) AnS Series I/O modules and intelligent function modules are set as control
CPUs on the same CPU modules.
Q38B
0 1 2 3 4 5 6 7
CPU module
CPU module
CPU module
Power supply
module
QA1S68B
16 17 18 19 20 21 22 23
Power supply
module
15 - 3 15 - 3
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
16 - 1 16 - 1
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
16 - 2 16 - 2
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
• 2 k points (2 k words)
per CPU.
• 8 k points (8 k words)
for all CPUs. The CPU shared memory
• Setting is in units of (CPU share memory)
2 points (2 words). is set in two points, and the
bit device becomes 32 points
when bit device is specified
on the CPU device.
Not refreshed as the number of points for CPU No.3 and CPU No.4 is 0
16 - 3 16 - 3
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
4): The CPU shared memory occupied with automatic refresh refreshing
becomes the total of setting 1 to setting 4.
The first and last addresses of the CPU shared memory being used
will be displayed in hexadecimals when the number of transmission
points are set.
The CPU for which the transmission points have been set in setting 1
and setting 2 will become the last address of the setting 2 CPU shared
memory. (Up until 811H is used for CPU No.1 and CPU No.2, and up
until 821H is used for the CPU No.4 in the illustration shown below.)
The CPUs that transmits only setting 1 will become the last address of
the setting 1 CPU shared memory. (CPU No.3 is up to the setting 1
address in the illustration shown below.)
5): The same number of transmission points must be set for all CPUs on
the multiple CPU system. A "PARAMETER ERROR" occurs if the
number of transmission points for one CPU is different.
(b) CPU devices
The following devices can be used for automatic refresh purposes (other
devices cannot be set up with the GX Developer.)
Settable devices Caution
Data register (D)
• The device in the left column occupies one point for
Link register (W)
every transmission point
File register (R, ZR)
Link relay (B) • Multiples of 0 or 16 are specified for the first number.
Internal relay (M) • The device in the left column occupies one point for
Output (Y) every transmission point.
16 - 4 16 - 4
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
The first and last will be calculated automatically with the GX Developer
16 - 5 16 - 5
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
16 - 6 16 - 6
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
CPU No.1
Device CPU shared memory
Reading performed Setting 1
B0 Writing during the
Other CPU's with the CPU No.1 CPU No.1 CPU No.1
END process
shared memory END process to transmission transmission
data (No.1) data (No.1)
CPU No.2
CPU No.2 reception CPU No.1
CPU No.2 transmission data (No.1) transmission
data (No.1)
ss data (No.2)
ce
CPU No.2 transmission
CPU No.3 reception
D pro
data (No.1)
data (No.2) EN Maximum
Maximum the CPU No.1
CPU No.4 reception ng transmission 2 k words
2 k words CPU No.2 transmission uri
data (No.1)
gd data (No.3)
data (No.3)
itin
Setting 2 Wr
ss
CPU No.2 transmission CPU No.1
e
W0
oc
data (No.4) CPU No.1 transmission
pr
transmission data (No.4)
D
data (No.2)
EN
CPU No.3
e
th
CPU No.2 reception
ing
CPU No.3 transmission data (No.2) User's free area
r
data (No.1)
du
g
s
CPU No.3 reception
in
es
CPU No.3 transmission data (No.2)
rit
roc
W
data (No.2)
Maximum
Dp
CPU No.4 reception
2 k words CPU No.3 transmission data (No.2)
EN
data (No.3) Maximum
Setting 3
the
CPU No.3 transmission
8 k words
ng
data (No.4) D0 CPU No.1
uri
transmission
gd
data (No.3)
itin
CPU No.4 Wr
CPU No.2 reception
CPU No.4 transmission data (No.3)
data (No.1)
CPU No.3 reception
CPU No.4 transmission data (No.3)
data (No.2)
Maximum
CPU No.4 reception
2 k words CPU No.4 transmission data (No.3)
data (No.3)
Setting 4
CPU No.4 transmission
data (No.4)
M0 CPU No.1
transmission
data (No.4)
(3) Precautions
(a) Device ranges set for the use of the automatic refresh function cannot be
set in local devices.
If the device ranges set for the use of the automatic refresh function are set
in local devices, the settings will not be reflected back onto the refresh data.
(b) Do not set devices for the use of the automatic refresh function in the file
register of all programs.
If devices for the use of the automatic refresh function are set in the file
register of all programs, automatic refresh will be performed on the file
register that corresponds with the last scan execution type program
executed.
16 - 7 16 - 7
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
(c) There are cases where old data and new data will become mixed up for
each CPU depending on the timing of refreshing the host CPU and reading
data from other CPUs.
When performing the automatic refresh function, create an interlock
program similar to the one shown below that uses the first device to be
refreshed for each CPU, and do not use the data from other CPUs when
old data does get mixed up with new data.
An example of a program set up with the following multiple CPU setting
refresh settings is shown below.
• CPU device: D0
• CPU No.1 transmission points: 1024 points (D0 to D1023)
• CPU vNo.2 transmission points: 1024 points (D1024 to D2047)
D1023
D1024 Used for the CPU No.2 interlock
D2047
Example of a program on the transmission side Example of a program on the reception side
Interlock with b0 of the CPU No.2 Interlock with b0 of the CPU No.1
Writing first device (D1024) first device (D0)
command
D1024.0 D0.0
Operation using the
Transmission data
transmission data
set in D0 to D1023
(D0 to D1023)
D0.0 D1024.0
b0 of the CPU No.1 first device (D0) b0 of the CPU No.2 first device
for the use of the interlock is set at (D1024) for the use of the interlock
ON when transmission data setting has is set at ON when operations using
been completed. the received data have been completed.
16 - 8 16 - 8
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
16.2 Communication with Multiple CPU Dedicated Instructions and Intelligent Function
Module Devices
(1) Communication with multiple CPU dedicated instructions (S. TO
instruction / FROM instruction) and intelligent function module
device (U \G )
The High Performance model QCPU of a multiple CPU system can use an S. TO
instruction, FROM instruction and intelligent function module device (U \G ) to
access the CPU shared memory of the High Performance model QCPU, Motion
CPU and PC CPU module.
The data written in the CPU shared memory of the host CPU with a S. TO
instruction can be read by another CPU using a FROM instruction or intelligent
function module device (U \G ).
Contrary to the automatic refresh function for the CPU shared memory, it is
possible to read data directly when this instruction is executed.
An outline of a process where data written in the CPU shared memory of CPU
No.1 with an S. TO instruction is read by the CPU No.2 using an FROM
instruction or intelligent function module device (U \G ) is shown in the figure
below.
CPU No.1 CPU No.2
CPU shared memory CPU shared memory
Host CPU's operation Host CPU's operation
information area information area
System area System area
Automatic refresh area for the
use of No.1 machine writing
2) Read with FROM
Data written with instruction or U \G
the S. TO instruction
POINT
The Motion CPU cannot use the S. TO instruction, FROM instruction or intelligent
function module device.
Use "automatic refresh of the CPU shared memory" or "communication dedicated
instructions between multiple CPUs" to communicate between the High
Performance model QCPU and Motion CPU.
For the accessing method from the PC CPU module to the CPU shared memory,
refer to the manual of the PC CPU module command between multiple CPUs.
16 - 9 16 - 9
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
(2) Precautions
(a) The following values are set in the CPU module's first I/O number with the
FROM instruction, the S. TO instruction and instructions that use U \G .
PLC No. PLC No.1 PLC No.2 PLC No.3 PLC No.4
Value set in the first I/O number 3E0H 3E1H 3E2H 3E3H
(b) Do not perform writing as reading in the system area or automatic refresh
area for the CPU shared memory (see Section 16.4).
(c) An error will not occur when CPUs accessed with the FROM instruction, the
S. TO instruction and instructions that use U \G are reset.
However, access execution flag (SM390) will remain OFF when instruction
execution has been completed.
(d) Establish an interlock to prevent simultaneous access during interactive
data communication with the FROM instruction, the S. TO instruction and
instructions that use U \G .
There are cases where old data and new data will be mixed together if
simultaneous access is carried out.
(e) The instruction that uses the S. TO instruction/U \G cannot be used to
write data to the CPU shared memory of other PLCs.
"SP. UNIT ERROR (error code: 2115)" occurs if data is written to the CPU
shared memory of other CPUs with the instruction that uses U \G .
"SP. UNIT ERROR (error code: 2117)" occurs if data is written to the CPU
shared memory of other CPUs with the instruction that uses the S. TO
instruction.
(f) "SP. UNIT ERROR (error code: 2114)" also occurs if data is written into the
CPU shared memory of the host CPU with instructions that use U \G .
( g) "SP. UNIT ERROR (error code: 2114)" occurs if data is read from the CPU
shared memory of the host CPU with the FROM instruction and instructions
that use U \G .
(h) "SP. UNIT ERROR (error code: 2110)" also occurs if access is attempted
on a non-mounted CPU with instructions that use U \G .
16 - 10 16 - 10
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
16.3 Interactive Communications between The High Performance model QCPU and Motion
CPU
16.3.1 Control commands from the High Performance model QCPU to the Motion CPU
It is possible to issue control commands from the High Performance model QCPU to
the Motion CPU, and read and write device data with the Motion dedicated CPU
instructions listed below.
(Control commands from Motion CPU to Motion CPU can not be used.)
For example, it is possible to start up the Motion CPU's motion SFC from the High
Performance model QCPU with the S (P).SFCS instruction.
S.SFCS instruction
POINT
One High Performance model QCPU module can operate up to 32 " Motion
dedicated CPU instructions " and "communication dedicated commands between
multiple CPUs (omitting the S (P).GINT instruction)" at one time. However, if the
Motion dedicated CPU instructions and communication dedicated instructions
between multiple CPUs (omitting S (P).GINT instruction) are made at the same
time, the instructions will be executed in order from the first instruction accepted. If
there are 33 or more unexecuted instructions, an "OPERATION ERROR (error
code: 4107)" will be triggered.
REMARK
Refer to the Motion CPU Programming manual for details on and the necessity of
use of the motion only instructions.
16 - 11 16 - 11
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
It is possible to read and write device data into the Motion CPU from the High
Performance model QCPU with the communication dedicated instructions between
multiple CPUs listed in the table below.
(Reading or writing can not take place from the High Performance model QCPU to the
High Performance model QCPU, the High Performance model QCPU to PC CPU
module, Motion CPU to the High Performance model QCPU, or Motion CPU to Motion
CPU.)
CPU module
Instruction name Description Motion PC CPU
CPU module
S.DDWR
Writes host CPU device data into other CPU devices.
SP.DDWR
S.DDRD
Reads other CPU device data into the host CPU.
SP.DDRD
S.GINT
Requests start up of other CPU interruption programs.
SP.GINT
For example, High Performance model QCPU device data can be written into the
Motion CPU's device data with the S.DDWR instruction of the communication
dedicated instruction between multiple CPUs.
High Performance model QCPU Motion CPU
S.DDWR instruction
Writes in the
device memory
Reads the device
memory
Device memory Device memory
POINT
One High Performance model QCPU can operate up to 32 " Motion dedicated CPU
instructions " and "communication dedicated commands between multiple CPUs
(omitting the S (P).GINT instruction)" at one time. However, if the Motion dedicated
CPU instructions and communication dedicated instructions between multiple
CPUs (omitting S (P).GINT instruction) are made at the same time, the instructions
will be executed in order from the first instruction accepted. If there are 33 or more
unexecuted instructions, an "OPERATION ERROR (error code: 4107)" will be
triggered.
REMARK
Refer to the Motion CPU Programming Manual for details on and the necessity of
use of the communication dedicated instructions between multiple CPUs.
16 - 12 16 - 12
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
The CPU shared memory is for exchanging data between CPU modules, and consists
of 4,096 words between 0H and FFFH.
The CPU shared memory consists of four areas; the host CPU operation information
area, the system area, the automatic refresh area, and the user's free area.
An area consisting of the number of automatic refresh points from 800H is used as the
automatic refresh area when the automatic refresh of device data is set up.
The beginning of the user's free area starts from the address immediately after the end
of the automatic refresh area.
800H to 811H becomes the automatic refresh area if the number of automatic refresh
points is 18 (11H points,) and the area after 812H becomes the user's free area.
The configuration of the CPU shared memory and the necessity of accessing
sequence programs are shown in the illustration below.
Host CPU Other CPUs
CPU shared memory Writing 1 Reading Writing Reading 2
0H
Host CPU operation
to Disable Disable Disable Enable
information area
1FFH
200H
to System area Disable Disable Disable Disable
7FFH
800H
Automatic refresh area Disable Disable Disable Disable
to
User's free area Enable Disable Disable Enable
FFFH
REMARK
1: Use the S. TO instruction to write the free user area of the host CPU from the
High Performance model QCPU.
The Motion CPU is not provided with a S. TO instruction, so that it cannot write
in the free user area of the host CPU.
For the writing method from the PC CPU module to the free user area of the
host PLC, refer to the manual of the PC CPU module.
2: To read from the High Performance model QCPU, use the FROM instruction or
intelligent function module device (U \G ).
Because the Motion CPU is not provided with the FROM instruction or
intelligent function module device, data cannot be read from the Motion CPU.
For reading from the PC CPU module, refer to the manual of the PC CPU
module.
16 - 13 16 - 13
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
(b) The host CPU's operation information area is updated when the contents of
the corresponding register change. However, there are times when changes
in the corresponding register are relayed by a maximum of 200ms when the
High Performance model QCPU's scan time is 200ms or less.
There are times when changes in the corresponding register are delayed
by 200ms or more if the High Performance model QCPU's scan time
exceeds 200ms.
(c) The High Performance model QCPU of another CPU can use FROM
instruction or intelligent function module device to read data from the action
data area of the host CPU.
However, because there is a delay in data updating, use the read data for
monitoring purposes.
REMARK
1: For the Motion CPU, 5H to 1CH of the host CPU's operation information area is
not used. If 5H to 1CH of the host CPU's operation information area is read from
the Motion CPU, it will be read as "0."
2: Refer to the corresponding special registers for further details.
16 - 14 16 - 14
16 COMMUNICATION BETWEEN CPU MODULES IN MULTIPLE CPU
SYSTEM
MELSEC-Q
16 - 15 16 - 15
17 COMMUNICATIONS BETWEEN THE MULTIPLE CPU SYSTEM'S I/O
MODULES AND INTELLIGENT FUNCTION MODULES
MELSEC-Q
The relationship between control CPUs and control modules (I/O modules, intelligent
function modules, special function modules) is the same as with independent CPU
systems.
There is no restriction to control the control module with the control CPU.
It is possible for non-control CPUs to read the contents of the intelligent function
module's buffer memory.
It is also possible to load non-control module input (X) ON/OFF data and another CPU
module output (Y) ON/OFF data with the CPU parameters.
Input modules, composite I/O module controlled by other CPUs can be used as
interlocks for the host CPU, and the output status to external equipment being
controlled by other CPUs can be confirmed.
However, it is not possible for non-control CPUs to output ON/OFF data to output
modules, composite I/O module or intelligent function modules, or write in the buffer
memory of intelligent function modules.
17
17 - 1 17 - 1
17 COMMUNICATIONS BETWEEN THE MULTIPLE CPU SYSTEM'S I/O
MODULES AND INTELLIGENT FUNCTION MODULES
MELSEC-Q
(1) Loading input (X) from input modules and intelligent function
modules
The "Out of group input/output settings" setting in the PLC parameter's multiple
CPU settings determines whether input can be loaded from input modules and
intelligent function modules being controlled by other CPUs.
I/O sharing when using Multiple CPUs
All CPUs can read all inputs
All CPUs can read all outputs
(a) When "Load input condition outside of group" has been set
1) Loads ON/OFF data from the input and intelligent function modules
being controlled by the other CPUs by performing input refresh before
a sequence program calculation starts.
2) Input (X) loading is performed for the modules mounted onto the
following additional base unit slots.
I/O allocation type Mounted module Remarks
Input module —
None
Intelligent function module —
Input module —
Input 17
Output module Loads OFF data
Intelli. Intelligent function module —
17 - 2 17 - 2
17 COMMUNICATIONS BETWEEN THE MULTIPLE CPU SYSTEM'S I/O
MODULES AND INTELLIGENT FUNCTION MODULES
MELSEC-Q
(a) When "Load output condition outside of group" has been set
1) Loads to the host CPU's output (Y) the ON/OFF data that is output to
the output and intelligent function modules by the other CPUs by
performing output refresh before a sequence program calculation
starts.
2) Output (Y) loading is performed for the modules mounted onto the
following additional base unit slots.
I/O allocation type Mounted module
Output module
None
Intelligent function module
Input module
Output Output module
Composite I/O module
Intelli. Intelligent function module
17 - 3 17 - 3
17 COMMUNICATIONS BETWEEN THE MULTIPLE CPU SYSTEM'S I/O
MODULES AND INTELLIGENT FUNCTION MODULES
MELSEC-Q
module
function module
function module
Input module
Input module
Output module
Output module
Power supply
function module
Intelligent
Intelligent
Intelligent
Intelligent
module
function
CPU No.1
CPU No.1
CPU No.1
CPU No.1
CPU No.2
CPU No.2
CPU No.2
Control CPU
settings
(b) It is not possible to write in the buffer memory of intelligent function modules
being controlled by other CPUs.
• TO instruction
• Intelligent function module devices (U \G )
• Intelligent function modules dedicated commands
An "SP UNIT ERROR (error code: 2116)" will be triggered if an attempt to
write in the intelligent function module controlled by other CPUs is carried
out.
0 1 2 3 4 5 6 7 Slot No.
CPU module No.1
Output module
Output module
function module
function module
function module
Input module
Input module
Power supply
Intelligent
Intelligent
Intelligent
module
CPU No.1
CPU No.1
CPU No.1
CPU No.1
CPU No.2
CPU No.2
CPU No.2
Control CPU
settings
17 - 4 17 - 4
17 COMMUNICATIONS BETWEEN THE MULTIPLE CPU SYSTEM'S I/O
MODULES AND INTELLIGENT FUNCTION MODULES
MELSEC-Q
17 - 5 17 - 5
18 PROCESSING TIME FOR MULTIPLE CPU SYSTEM HIGH
PERFORMANCE MODEL QCPUs
MELSEC-Q
The concept behind multiple CPU system scanning time is the same as the single CPU
system.
See Section 11.1 for details of the scan time concept.
This chapter provides explanations on the factors to be added to the scan time
calculated as explained in Section 11.1 and the method of calculating processing time
when configuring multiple CPU system.
18 - 1 18 - 1
18 PROCESSING TIME FOR MULTIPLE CPU SYSTEM HIGH
PERFORMANCE MODEL QCPUS
MELSEC-Q
The processing time for multiple CPU system is prolonged in comparison with single
CPU system when the following functions are used.
Add the following values to the values calculated in Sections 11.1 and 18.a to acquire
the amount of time used by these functions.
• Multiple CPU system automatic refresh
• MELSECNET/H refreshing
• CC-Link automatic refresh
(a) The amount of time required to perform the refresh function set up with the
multiple CPU settings.
This value is the total amount of time required for writing into the host
CPU's CPU shared memory, and the amount of time required to read from
other CPUs' CPU shared memories.
These values are added when setting up the refresh settings with the PLC
parameter multiple CPU settings.
(b) The automatic refresh period of the CPU shared memory is calculated in the
following equation.
(Automatic refresh time) = (N1 + (received word points) N2) (number of other
CPUs) + (N3 + (transmitted word points) N4) ( s)
• The received word points must equal the word points transmitted by other CPUs.
For example, if the host CPU is the CPU No.1, then this value must equal the number of
points transmitted for the CPU No.2 to CPU No.4.
• Use the following values for N1 to N4.
CPU type N1 N2 N3 N4
Q02CPU 82 s 0.52 s 106 s 0.17 s
Q02HCPU, Q06HCPU, Q12CPU, Q25HCPU 27 s 0.44 s 27 s 0.08 s
18 (c) The amount of time required for the automatic refresh process will be
prolonged by the following amount of time when processing is duplicated
with the automatic refresh function on other PLCs.
(Prolonged time) = (transmitted/received word point) N5
(number of other CPUs) ( s)
18 - 2 18 - 2
18 PROCESSING TIME FOR MULTIPLE CPU SYSTEM HIGH
PERFORMANCE MODEL QCPUS QCPUS
MELSEC-Q
(a) The amount of time required for performing the refresh process between
High Performance model QCPU and MELSECNET/H network modules.
Refer to the following manual for details on the refresh time for
MELSECNET/H.
• Q Corresponding MESLECNET/H Network System Refresh Manual
(b) The amount of time required for the automatic refresh process will be
prolonged only by the following amount of time when requests for
refreshing are issued by other MELSECNET/H modules at the same time
on a multiple CPU system.
(Prolonged time) = (transmitted/received word point) N5
(number of other CPUs) ( s)
The number of words transmitted/received is the total value of the following transferal data.
(LB + LX + LY + SB)
• Link refresh data : + LW
16
(LB + LX + LY + SB)
• Data transferred to the memory card's file register : + LW
16
LB
• Transferal between data links :( + LW) 2
16
Refer to the following table for N5
N5
CPU type Systems with only a Systems that include
main base unit additional base units
Q02CPU
0.54 s 1.30 s
Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPU
(a) The amount of time required for performing the refresh process between
High Performance model QCPU and CC-Link master local modules.
Refer to the following manual for details on the automatic refresh time for
CC-Link.
• QJ61BT11 CC-Link System Master Local Module User's Manual
(c) The amount of time required for the automatic refresh process will be
prolonged only by the following amount of time when requests for
refreshing are issued by other CC-Link modules at the same time on a
multiple CPU system.
(Prolonged time) = (transmitted/received word point) N5
(number of other CPUs) ( s)
The amount of data transmitted/received is the following transferal data.
(RX + RY + SB)
• Link refresh data : + SW
16
Refer to the following table for N5
N5
CPU type Systems with only a Systems that include
main base unit additional base units
Q02CPU
0.54 s 1.30 s
Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPU
18 - 3 18 - 3
19 STARTING UP THE MULTIPLE CPU SYSTEM
MELSEC-Q
Start
Purpose of each device and allocation •••••••••••••••••••• To use automatic refresh of CPU share memory,
reserve continuous refresh points.
For automatic refresh of CPU share memory, see
section 16.1.
Selection of module to be used •••••••••••••••••••• Select the modules for realizing the functions executed in
the multiple CPU system.
Installation of module •••••••••••••••••••• Install the selected module to the main base unit and
expansion base units.
Connection of PC and QCPU (CPU No.1) 1 •••••••••••••••••••• Connect the PC from which GX Developer has been
started, and the QCPU with the QCPU of the CPU No.1
using RS-232 cable or USB cable.
Parameter and program writing •••••••••••••••••••• Write parameters and sequence programs to the CPU
No.1. For CPU No.2 to No.4, select and write the
applicable CPU according to the connection destination
19 designation.
CPU No.1 QCPU resetting •••••••••••••••••••• Set the RESET/L. CLR switch of the QCPU of the CPU
No.1 in the RESET position.
19 - 1 19 - 1
19 STARTING UP THE MULTIPLE CPU SYSTEM
MELSEC-Q
1)
RUN/STOP switch setting of all CPUs •••••••••••••••••••• Select RUN at the RUN/STOP switch of the QCPU for CPU
No.1 to No.4.
Confirmation and recovery of errors •••••••••••••••••••• If errors occurs, confirm the details and recover the situation
with the GX Developer's system monitor.
All CPUs debugged •••••••••••••••••••• CPU No.1 to CPU No.4 on the multiple CPU system debugged
individually.
19
19 - 2 19 - 2
19 STARTING UP THE MULTIPLE CPU SYSTEM
MELSEC-Q
19.2 Setting Up the Multiple CPU System Parameters (Multiple CPU Settings, Control CPU
Settings)
This section explains the procedures for setting up the multiple CPU system
parameters with GX Developer.
Refer to the GX Developer's operation manual for details on setting up all other
parameters.
The following shows an example procedures for setting up the multiple CPU system
parameters.
GX Developer
Power supply module
19 - 3 19 - 3
19 STARTING UP THE MULTIPLE CPU SYSTEM
MELSEC-Q
Start
1)
19 - 4 19 - 4
19 STARTING UP THE MULTIPLE CPU SYSTEM
MELSEC-Q
1)
2)
19 - 5 19 - 5
19 STARTING UP THE MULTIPLE CPU SYSTEM
MELSEC-Q
2)
End
19 - 6 19 - 6
19 STARTING UP THE MULTIPLE CPU SYSTEM
MELSEC-Q
19.2.3 Using existing preset multiple CPU settings and I/O allocations
Start
1)
19 - 7 19 - 7
19 STARTING UP THE MULTIPLE CPU SYSTEM
MELSEC-Q
1)
The multiple CPU settings and I/O Assignment Setting data are
read and written into the specified project when "OK" is selected.
2)
19 - 8 19 - 8
19 STARTING UP THE MULTIPLE CPU SYSTEM
MELSEC-Q
2)
End
19 - 9 19 - 9
APPENDICES
MELSEC-Q
APPENDICES
The headings in the table that follows have the following meanings.
Item Function of Item
Number • Indicates the number of the special relay.
Name • Indicates the name of the special relay.
Meaning • Indicates the nature of the special relay.
Explanation • Contains detailed information about the nature of the special relay.
• Indicates whether the relay is set by the system or user, and, if it is set by the system, when
setting is performed.
<Set by>
S : Set by system
U : Set by user (in sequence program or test operation at a GX Developer)
S/U : Set by both system and user
<When set> indicated only if setting is done by system.
Each END : Set during each END processing
Set by (When set)
Initial : Set only during initial processing
(when power supply is turned ON, or when going from STOP to
RUN)
Status change : Set only when there is a change in status
Error : Set when error is generated
Instruction execution : Set when instruction is executed
Request : Set only when there is a user request
(through SM, etc.)
• Indicates special relay M9 corresponding to the ACPU.
Corresponding ACPU (Change and notation when there has been a change in contents)
M9 • Items indicated as "New" have been newly added for High performance model
QCPU/QnACPU.
• Indicates the corresponding CPU type name.
+Rem: Can be applied to all CPU types and MELSECNET/H remote I/O modules.
: Can be applied to all types of CPU
Corresponding CPU QCPU: Can be applied to High Performance model QCPU
QnA: Can be applied to QnA series and Q2ASCPU Series
Remote: Can be applied to the MELSECNET/H remote I/O modules.
Each CPU type name: Can be applied only to the specific CPU. (e.g. Q4ARCPU, Q3ACPU)
POINT
(1) SM1200 to SM1255 are used for QnACPU.
These relays are vacant with QCPU.
(2) Special relays SM1500 and later are dedicated for Q4ARCPU.
App - 1 App - 1
APPENDICES
MELSEC-Q
App - 2 App - 2
APPENDICES
MELSEC-Q
App - 3 App - 3
APPENDICES
MELSEC-Q
App - 4 App - 4
APPENDICES
MELSEC-Q
App - 5 App - 5
APPENDICES
MELSEC-Q
App - 6 App - 6
APPENDICES
MELSEC-Q
App - 7 App - 7
APPENDICES
MELSEC-Q
App - 8 App - 8
APPENDICES
MELSEC-Q
OFF : Performs link refresh • Selects whether only the general data process is
ON : Performs no link performed for the execution of the COM instruction or the U New
Selection of link
refresh link refresh process is also performed.
refresh
SM775 processing during QCPU
COM instruction OFF : Performs all refresh serial
execution processes • Selects whether all refresh process or the refresh set with
U New number
ON : Performs the refresh SD778 is performed when COM instruction is executed.
04012 or
set the SD778
later
Enable/disable
OFF : Local device disabled • Determines whether to enable/disable the local device in U (Status
SM776 local device at New
ON : Local device enabled the program CALLED at CALL. change)
CALL
Enable/disable
OFF : Local device disabled • Determines whether to enable/disable the local device at U (Status
SM777 local device in New
ON : Local device enabled the execution of interrupt programs. change)
interrupt program
OFF : CC-Link dedicated
CC-Link
instruction executable • Switches ON when the number of the CC-Link dedicated
dedicated U (Status
SM780 ON : CC-Link dedicated instructions that can be executed simultaneously reaches New QnA
instruction change)
instruction not 32. Switches OFF when the number goes below 32.
executable
executable
PID bumpless QCPU
processing OFF : Matched • Specifies whether the set value (SV) will be matched with serial No.
SM794 U New
(for incomplete ON : Not matched the process value (PV) in the manual mode. 05032 or
derivative) later
(7) Debug
Corresponding
Set by Applicable
Number Name Meaning Explanation ACPU
(When Set) CPU
M9
S (Status
Trace preparation • Switches ON when the trace preparation is completed. New QCPU
OFF : Not ready change)
SM800
Sampling trace ON : Ready S (Status
• Goes ON when sampling trace is ready New QnA
preparation change)
• Trace is started when this relay switches ON.
Trace start • Trace is suspended when this relay switches OFF. U M9047 QCPU
OFF : Suspend
SM801 (All related special Ms switches OFF.)
ON : Start
Sampling trace • Sampling trace started when this goes ON
U M9047 QnA
start • Suspended when OFF (Related special M all OFF)
Trace execution S (Status
• Switches ON during execution of trace. M9046 QCPU
in progress change)
OFF : Suspend
SM802 Sampling trace
ON : Start S (Status
execution in • Goes ON during execution of sampling trace M9046 QnA
change)
progress
• Trace is triggered when this relay switches from OFF to
Trace trigger U M9044 QCPU
ON. (Identical to TRACE instruction execution status)
SM803 OFF ON: Start • Sampling trace trigger goes ON when this goes from
Sampling trace
OFF to ON (Identical to STRA instruction execution U M9044 QnA
trigger
status)
S (Status
After trace trigger • Switches ON after trace is triggered. New QCPU
OFF : Not after trigger change)
SM804
After sampling ON : After trigger S (Status
• Goes ON after sampling trace trigger New QnA
trace trigger change)
App - 9 App - 9
APPENDICES
MELSEC-Q
App - 10 App - 10
APPENDICES
MELSEC-Q
POINT
The processing time may be longer when converted special relays are used with QCPU.
Uncheck "A-series CPU compatibility setting" within the PC system setting in GX Developer
parameters when converted special relays are not used.
REMARK
The following are additional explanations about the Special Relay for Modification column.
1 When a special relay for modification is provided, the device number should be changed to
the provided QCPU/QnACPU special relay.
2 When is provided, the converted special relay can be used for the device number.
3 When is provided, the device number does not work with QCPU/QnACPU.
App - 11 App - 11
APPENDICES
MELSEC-Q
: 1 minute clock indicates the name of the special relay (M9034) of the ACPU.
App - 12 App - 12
APPENDICES
MELSEC-Q
App - 13 App - 13
APPENDICES
MELSEC-Q
App - 14 App - 14
APPENDICES
MELSEC-Q
App - 15 App - 15
APPENDICES
MELSEC-Q
App - 16 App - 16
APPENDICES
MELSEC-Q
App - 17 App - 17
APPENDICES
MELSEC-Q
App - 18 App - 18
APPENDICES
MELSEC-Q
App - 19 App - 19
APPENDICES
MELSEC-Q
App - 20 App - 20
APPENDICES
MELSEC-Q
App - 21 App - 21
APPENDICES
MELSEC-Q
The special registers, SD, are internal registers with fixed applications in the PLC.
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 and remote I/O
modules.
Data stored in the special registers are stored as BIN values if no special designation has been
made to the contrary.
The headings in the table that follows have the following meanings.
POINT
(1) SD1200 to SD1255 are used for QnACPU.
These relays are vacant with High Performance model QCPU.
(2) Special register SD1500 and later are dedicated for Q4ARCPU.
App - 22 App - 22
APPENDICES
MELSEC-Q
App - 23 App - 23
APPENDICES
MELSEC-Q
3: Refer to REMARK.
REMARK
1) Extensions are shown below.
SD10 SD11
Extension name File type
Higher8 bits Lower8 bits Higher8 bits
51H 50H 41H QPA Parameters
51H 50H 47H QPG Sequence program/SFC program
51H 43H 44H QCD Device comment
51H 44H 49H QDI Device initial value
51H 44H 52H QDR File register
51H 44H 53H QDS Simulation data
51H 44H 4CH QDL Local device
51H 54H 53H QTS Sampling trace data (For QnA)
51H 54H 4CH QTL Status latch data (For QnA)
51H 54H 50H QTP Program trace data (For QnA)
51H 54H 52H QTR SFC trace file
51H 46H 44H QFD Trouble history data
App - 24 App - 24
APPENDICES
MELSEC-Q
Set by Corresponding
Corresponding
Number Name Meaning Explanation (When ACPU
CPU
set) D9
SD5 3 Time (value set)
SD6 Number Meaning
SD7 SD5 Time : 1 µs units (0 to 999 µs)
SD6 Time : 1 ms units (0 to 65535 ms)
SD8
SD7
SD9 SD8
SD10 SD9
SD10
SD11 SD11 (Vacant)
SD12 SD12
SD13 SD13
SD14
SD14 SD15
App - 25 App - 25
APPENDICES
MELSEC-Q
App - 26 App - 26
APPENDICES
MELSEC-Q
Information on 2 Information on 1
Blown fuse Number of module • Value stored here is the lowest station I/O number of the module
SD60 S (Error) D9000
number with blown fuse with the blown fuse.
I/O module I/O module +Rem
• The lowest I/O number of the module where the I/O module
SD61 verification verification error S (Error) D9002
verification number took place.
error number module number
S
Annunciator Annunciator • The first annunciator number (F number) to be detected is stored
SD62 (Instruction D9009
number number here.
execution)
S
Number of Number of
SD63 • Stores the number of annunciators searched. (Instruction D9124
annunciators annunciators
execution)
App - 27 App - 27
APPENDICES
MELSEC-Q
SD64 When F goes ON due to OUT F or SET F , the F numbers which D9125
go progressively ON from SD64 through SD79 are registered.
SD65 The F numbers turned OFF by RST F are deleted from SD64 - D9126
SD79, and the F numbers stored after the deleted F numbers are
SD66 shifted to the preceding registers. D9127
Execution of the LEDR instruction shifts the contents of SD64 to
SD67 SD79 up by one. D9128
(This can also be done by using the INDICATOR RESET switch on
SD68 D9129
the of the Q3A/Q4ACPU.)
After 16 annunciators have been detected, detection of the 17th will
SD69 D9130
not be stored from SD64 through SD79.
SET SET SET RST SET SET SET SET SET SET SET
SD70 F50 F25 F99 F25 F15 F70 F65 F38 F110F151 F210 LEDR D9131
Table of SD62 0 50 50 50 50 50 50 50 50 50 50 50 99 ...(Number
SD71 Annunciator detected) S D9132
detected
detection SD63 0 1 2 3 2 3 4 5 6 7 8 9 8 ...(Number of (Instruction
annunciator annunciators
SD72 number detected) execution) New
numbers SD64 0 50 50 50 50 50 50 50 50 50 50 50 99
SD65 0 0 25 25 99 99 99 99 99 99 99 99 15
SD73 SD66 0 0 0 99 0 15 15 15 15 15 15 15 70 New
SD67 0 0 0 0 0 0 70 70 70 70 70 70 65
SD74 SD68 0 0 0 0 0 0 0 65 65 65 65 65 38 New
SD69 0 0 0 0 0 0 0 0 38 38 38 38 110
SD70 0 0 0 0 0 0 0 0 0 110 110 110 151
SD75 New
SD71 0 0 0 0 0 0 0 0 0 0 151 151 210
(Number
SD72 0 0 0 0 0 0 0 0 0 0 0 210 0
SD76 detected) New
SD73 0 0 0 0 0 0 0 0 0 0 0 0 0
SD74 0 0 0 0 0 0 0 0 0 0 0 0 0
SD77 SD75 0 0 0 0 0 0 0 0 0 0 0 0 0 New
SD76 0 0 0 0 0 0 0 0 0 0 0 0 0
SD77 0 0 0 0 0 0 0 0 0 0 0 0 0
SD78 New
SD78 0 0 0 0 0 0 0 0 0 0 0 0 0
SD79 0 0 0 0 0 0 0 0 0 0 0 0 0
SD79 New
S
• Error codes detected by the CHK instruction are stored as BCD
SD80 CHK number CHK number (Instruction New
code.
execution)
SD90 Corresponds to SM90 • Set the annunciator number (F number) that D9108
will be turned ON when the step transition
SD91 Corresponds to SM91 watchdog timer setting or watchdog timer D9109
time limit error occurs.
SD92 Corresponds to SM92 D9110
Step transition b15 to b8 b7 to b0
SD93 Corresponds to SM93 D9111
watchdog
SD94 timer setting F number for Corresponds to SM94 D9112
value timer set value F number setting Timer time limit
U
SD95 (Enabled only and time over Corresponds to SM95 (0 to 255) setting D9113
when SFC error (1 to 255 s:
SD96 Corresponds to SM96 D9114
program (1 s units))
SD97 exists) Corresponds to SM97 New
• Turning ON any of SM90 to SM99 during an
SD98 Corresponds to SM98 active step starts the timer, and if the New
transition condition next to the corresponding
SD99 Corresponds to SM99 step is not met within the timer time limit, the New
set annunciator (F) turns ON.
Stores the
CH1 preset
3 : 300bps, 6 : 600bps, 24 : 2400bps, 48 : 4800bps
transmission transmission QCPU
SD105 96 : 9600bps, 192 : 19.2kbps, 384 : 38.4kbps S New
speed setting speed when Remote
576 : 57.6kbps, 1152 : 115.2kbps
(RS232) GX Developer
is used.
App - 28 App - 28
APPENDICES
MELSEC-Q
3 Vacant 2 1
1 : CPU switch status 0: RUN
1: STOP S(Every
2: L.CLR END New QCPU
2 : Memory card switch Always OFF processing)
3 : DIP switch b8 through b12 correspond to SW1
through SW5 of system setting
switch 1.
0: OFF, 1: ON
Status of Status of CPU b13 through b15 are vacant.
SD200
switch switch
• The CPU switch status is stored in the following format:
b15 to b12b11 to b8 b7 to b4 b3 to b0
3 Vacant 2 1
1 : CPU key 0 : RUN
Status of switch 1 : STOP
2 : L.CLR
2 : Memory cards switch b4 corresponds to memory card A,
S(Every
and b5 corresponds to memory
END New QnA
card B
processing)
OFF at 0; ON at 1
3 : DIP switch b8 through b12 correspond to SW1
through SW5 of system setting
switch 1.
b14 and b15 correspond to SW1
and SW2 of system setting switch
2, respectively.
OFF at 0; ON at 1
App - 29 App - 29
APPENDICES
MELSEC-Q
8 7 6 5 4 3 2 1
S (Status
8 7 6 5 4 3 2 1 New QnA
change)
1 : RUN 5 : BOOT
2 : ERROR 6 : CARD A (Memory card A)
3 : USER 7 : CARD B (Memory card B)
4 : BAT.ALARM 8 : Vacant
Operating 2 1
Operating
SD203 status of
status of CPU 1 : Operating status of CPU 0 :RUN
CPU
1 :STEP-RUN
2 :STOP S (Every
D9015 format
3 :PAUSE END
change
processing)
2 : STOP/PAUSE cause 0 :RUN/STOP switch
1 :Remote contact
2 : Remote operation from the
GX Developer or Serial
Communication.
3 :Internal program instruction
Note: Priority is earliest first 4 :Errors
App - 30 App - 30
APPENDICES
MELSEC-Q
App - 31 App - 31
APPENDICES
MELSEC-Q
App - 32 App - 32
APPENDICES
MELSEC-Q
Information of 2 Information of 1
Number of
SD290 points • Stores the number of points currently set for X devices
allocated for X
Number of
SD291 points • Stores the number of points currently set for Y devices +Rem
allocated for Y
Number of
SD292 points • Stores the number of points currently set for M devices
allocated for M
Number of
SD293 points • Stores the number of points currently set for L devices
allocated for L
Number of
SD294 points • Stores the number of points currently set for B devices +Rem
allocated for B
Number of
SD295 Device points • Stores the number of points currently set for F devices
allocated for F
allocation
Number of
(Same as S (Initial) New
points
SD296 parameter • Stores the number of points currently set for SB devices +Rem
allocated for
contents) SB
Number of
SD297 points • Stores the number of points currently set for V devices
allocated for V
Number of
SD298 points • Stores the number of points currently set for S devices
allocated for S
Number of
SD299 points • Stores the number of points currently set for T device
allocated for T
Number of
points
SD300 • Stores the number of points currently set for ST devices
allocated for
ST
Number of
SD301 points • Stores the number of points currently set for C devices
allocated for C
App - 33 App - 33
APPENDICES
MELSEC-Q
App - 34 App - 34
APPENDICES
MELSEC-Q
App - 35 App - 35
APPENDICES
MELSEC-Q
S (Every
Minimum scan time • Stores the minimum value of the scan time except that of an D9018 format
SD524 END
(in 1 ms units) initial execution type program into SD524 and SD525. change
Minimum scan processing)
(Measurement is made in 100µs units.)
time S (Every
Minimum scan time SD524: Stores the ms place. (Storage range: 0 to 65535)
SD525 END New
(in 100 µs units) SD525: Stores the µs place. (Storage range: 0 to 900)
processing)
Maximum scan time • Stores the maximum value of the scan time except that of D9019 format
SD526
(in 1 ms units) an initial execution type program into SD526 and SD527. S (Every change
Maximum scan
(Measurement is made in 100µs units.) END
time Maximum scan time
SD527 SD526: Stores the ms place. (Storage range: 0 to 65535) processing) New
(in 100 µs units)
SD527: Stores the µs place. (Storage range: 0 to 900)
Current scan Current scan time • Stores the current scan time of a low speed execution type
SD528
time (in 1 ms units) program into SD528 and SD529. (Measurement is made in S (Every
for low speed 100µs units.) END New
Current scan time
SD529 execution type SD528: Stores the ms place. (Storage range: 0 to 65535) processing)
(in 100 µs units)
programs SD529: Stores the µs place. (Storage range: 0 to 900)
Minimum scan Minimum scan time • Stores the minimum value of the scan time of a low speed
SD532
time for (in 1 ms units) execution type program into SD532 and SD533. S (Every
low speed (Measurement is made in 100µs units.) END New
Minimum scan time
SD533 execution type SD532: Stores the ms place. (Storage range: 0 to 65535) processing)
(in 100 µs units)
programs SD533: Stores the µs place. (Storage range: 0 to 900)
Maximum scan Maximum scan time • Stores the maximum value of the scan time except that of
SD534
time for (in 1 ms units) the first scan of a low speed execution type program into S (Every
low speed SD534 and SD535. (Measurement is made in 100µs units.) END New
Maximum scan time
SD535 execution type SD534: Stores the ms place. (Storage range: 0 to 65535) processing)
(in 100 µs units)
programs SD535: Stores the µs place. (Storage range: 0 to 900)
END processing time • Stores the time from the end of a scan execution type
SD540
END (in 1 ms units) program to the start of the next scan into SD540 and S (Every
processing SD541. (Measurement is made in 100µs units.) END New
END processing time
SD541 time SD540: Stores the ms place. (Storage range: 0 to 65535) processing)
(in 100 µs units)
SD541: Stores the µs place. (Storage range: 0 to 900)
Constant scan wait • Stores the wait time for constant scan setting into SD542
SD542 S (First
Constant scan time (in 1 ms units) and SD543. (Measurement is made in 100µs units.)
END New
wait time Constant scan wait SD542: Stores the ms place. (Storage range: 0 to 65535)
SD543 processing)
time (in 100 µs units) SD543: Stores the µs place. (Storage range: 0 to 900)
App - 36 App - 36
APPENDICES
MELSEC-Q
App - 37 App - 37
APPENDICES
MELSEC-Q
Drive 4
Fixed at "3".
(Standrd ROM)
App - 38 App - 38
APPENDICES
MELSEC-Q
File register
SD640 Drive number: • Stores drive number being used by file register S (Initial) New
drive
SD641 • Stores file register file name (with extension) selected at parameters
SD642 or by use of QDRSET instruction as ASCII code.
b15 to b8 b7 to b0
SD643
SD641 Second character First character
SD644 SD642 Fourth character Third character
File register File register
SD645 SD643 Sixth character Fifth character S (Initial) New
file name file name
SD644 Eighth character Seventh character
SD645 First character of extension 2EH(.)
SD646 Second character of
SD646 Third character of extension extension
File register File register • Stores the data capacity of the currently selected file register in 1 k S (Status
SD647 New
capacity capacity word units. change)
File register File register S (Status
SD648 • Stores the currently selected file register block number. D9035
block number block number change)
Comment Comment • Stores the comment drive number selected at the parameters or by S (Status
SD650 New
drive drive number the QCDSET instruction. change)
App - 39 App - 39
APPENDICES
MELSEC-Q
SD651 • Stores the comment file name (with extension) selected at the
parameters or by the QCDSET instruction in ASCII code.
SD652 b15 to b8 b7 to b0
SD651 Second character First character
SD653 Comment file Comment file SD652 Fourth character Third character S (Status
SD653 Sixth character Fifth character New
name name change)
SD654 SD654 Eighth character Seventh character
SD655 First character of extension 2EH(.)
SD655
SD656 Third character of extension Second character of
extension
SD656
Boot
designation • Stores the drive number where the boot designation file ( .QBT) is
SD660 S (Initial) New
file drive being stored.
number
SD661 Boot • Stores the file name of the boot designation file ( .QBT).
b15 to b8 b7 to b0
operation
SD662 SD661 Second character First character
designation File name of
SD662 Fourth character Third character
SD663 file boot SD663 Sixth character Fifth character S (Initial) New
SD664 designation SD664 Eighth character Seventh character
file SD665 First character of extension 2EH(.)
SD665 Second character of
SD666 Third character of extension extension
SD666
SD718
Accumulator Accumulator • For use as replacement for accumulators used in A-series programs. S/U New
SD719
Program No. Program No.
• Stores the program number of the program to be loaded by the
designation designation
SD720 PLOAD instruction when designated. U New QCPU
for PLOAD for PLOAD
• Designation range: 1 to 124
instruction instruction
No. of vacant
registration
• Stores the number of vacant registration area for the request for
area for CC- S (During
SD730 0 to 32 communication with the intelligent device station connected to New QnA
Link execution)
A(1S)J61QBT61.
communicati
on request
• Special register that temporarily stores keyboard data input by means S (During
SD736 PKEY input PKEY input New QnA
of the PKEY instruction. execution)
App - 40 App - 40
APPENDICES
MELSEC-Q
b0 to b14:
0:Do not • Selects whether or not the data is refreshed when the COM
refresh instruction is executed.
1:Refresh • Designation of SD778 is made valid when SM775 turns ON.
Refresh
b15 b14 to b5 b4 b3 b2 b1 b0
processing b15 bit
SD778 1/0 0 1/0 1/0 1/0 1/01/0
selection 0: General QCPU
I/O refresh
SD778 when the data U New Serial number
CC-Link refresh
COM processing MELSECNET/H refresh 04012 or later
instruction is executed Automatic refresh of intelligent
executed 1: General function modules
App - 41 App - 41
APPENDICES
MELSEC-Q
PID limit
b15 b1 b0 QCPU
SD794 setting
0: Limit set SD794 Loop 16 to Loop 2 Loop 1 Serial No.
TO (for U New
1: Limit not set 05032
SD795 incomplete SD795 Loop 32 to Loop 18 Loop 17 or later
derivative)
SD806 • Stores file name (with extension) from point in time when status latch
was conducted as ASCII code.
b15 to b8 b7 to b0
SD807
SD806 Second character First character
SD807 Fourth character Third character
SD808
Status latch Status latch SD808 Sixth character Fifth character S (During
New
file name file name SD809 Eighth character seventh character execution)
SD809
First character of
SD810 2EH(.)
extension
SD810
Third character of 2nd character of
SD811
extension extension
SD811
• Stores step number from point in time when status latch was
SD812 QnA
conducted.
SD812 Patterm
SD813 Block number
SD813 SD814 Step No./Transition condition No.
SD815 Sequence step No.(L)
Status latch Status latch SD816 Sequence step No.(H) S (During D9055 format
SD814
step step execution) change
Contents of pattern data
15 14 to 4 3 2 1 0 (Bit number)
SD815 0 0 to 0 0
App - 42 App - 42
APPENDICES
MELSEC-Q
SD901 • Stores file name (with extension) in ASCII code if file was being
accessed during power loss.
b15 to b8 b7 to b0
SD902
SD901 2nd character 1st character
File name Access file
SD902 4th character 3rd character
SD903
SD903 6th character 5th character S (Status
active during name during New
SD904 8th character 7th character change)
SD904 power loss power loss
1st character of
SD905 extension 2EH(.)
SD905
3rd character of 2nd character of
SD906 extension extension
SD906
App - 43 App - 43
APPENDICES
MELSEC-Q
REMARK
App - 44 App - 44
APPENDICES
MELSEC-Q
8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1
Stores setting
status made at
D9004 SD1004 MINI link errors QnA
parameters Bits which correspond to faulty Bits which correspond to the signals of
AJ71PT32(S3) are turned on. AJ71PT32(S3), shown below, are
(modules 1 to 8) turned on as the signals are turned on.
• Hardware error (X0/X20)
• MINI(S3) link error datection (X6/X26)
• MINI(S3) link communication error
(X7/X27)
App - 45 App - 45
APPENDICES
MELSEC-Q
App - 46 App - 46
APPENDICES
MELSEC-Q
Year Month
• Stores the day and hour in BCD.
b15 to b12 b11 to b8 b7 to b4 b3 to b0 Example
Clock data
D9026 SD1026 SD211 Clock data 31th, 10 o'clock
(day, hour) H3110
Day Hour
• Stores the Minute and second in BCD.
b15 to b12 b11 to b8 b7 to b4 b3 to b0 Example:
Clock data
D9027 SD1027 SD212 Clock data 35 minutes,
(minute, second) 48 seconds
Minute Second H3548
Extension file • Stores the block No. of the extension file register
D9035 SD1035 SD648 Use block No.
register being used in BCD code.
• Designate the device number for the extension file
register for direct read and write in 2 words at SD1036
and SD1037 in BIN data.
D9036 SD1036 Use consecutive numbers beginning with R0 of block
Device number
No. 1 to designate device numbers.
Extension file when individual Exetension file register
registerfor devices from 0
D9038 SD1038 SD207 Priorities 1 to 4 • Sets priority of ERROR LEDs which illuminate (or
flicker) to indicate errors with error code numbers.
• Configuration of the priority setting areas is as shown
below.
LED display b15 to b12 b11 to b8 b7 to b4 b3 to b0
SD207 Priority 4 Priority 3 Priority 2 Priority 1
D9039 SD1039 SD208 priority ranking Priorities 5 to 7
SD208 Priority 7 Priority 6 Priority 5
• For details, refer to the applicable CPUs User’s
Manual and the ACPU Programming manual
(Fundamentals).
App - 47 App - 47
APPENDICES
MELSEC-Q
App - 48 App - 48
APPENDICES
MELSEC-Q
D9110 SD1110
Step transfer Timer setting valve Timer setting
D9111 SD1111 monitoring timer and the f number at (1 to 255 s in seconds)
setting time out
F number setting
D9112 SD1112
(By turning on any of MSM708 to SM1114, the
D9113 SD1113 monitoring timer starts. If the transfer condition
following a step which corresponds to the timer is not
established within set time, set annunciator (F) is
D9114 SD1114
tuned on.)
App - 49 App - 49
APPENDICES
MELSEC-Q
verification errors.
Indicates I/O module verify error.
D9121 SD1121
• I/O module verify check is executed also to remote
I/O station modules.
D9122 SD1122 (If normal status is restored, clear is not performed.
Therefore, it is required to perform clear by user
D9123 SD1123 program.)
• When one of F0 to 255 (F0 to 2047 for AuA and AnU)
is turned on by SET F 1 is added to the contents of
SD63. When RST F or LEDR instruction is
executed, 1 is subtracted from the contents of SD63.
Annunciator
Annunciator (If the INDICATOR RESET switch is provided to the
D9124 SD1124 SD63 detection
detection quantity CPU module, pressing the switch can execute the
quantity
same processing.)
• Quantity, which has been turned on by SET F is
stored into SD63 in BIN code. The value of SD63 is
maximum 8.
SD64 0 50 50 50 50 50 50 50 50 50 50 50 99
SD65 0 0 25 25 99 99 99 99 99 99 99 99 15
D9130 SD1130 SD69
SD66 0 0 0 99 0 15 15 15 15 15 15 15 70
SD67 0 0 0 0 0 0 70 70 70 70 70 70 65
SD68 0 0 0 0 0 0 0 65 65 65 65 65 38
D9131 SD1131 SD70
SD69 0 0 0 0 0 0 0 0 38 38 38 38 110
App - 50 App - 50
APPENDICES
MELSEC-Q
App - 51 App - 51
APPENDICES
MELSEC-Q
Reverse loopback
Stores the local or remote I/O station number at which QnA
loopback is being executed.
Station Station that Master
D9205 SD1205 implementing implemented forward station
Station 1 Station 2 Station 3 Station n
loopback loopback
Stores conditions for When a local station is switched to STOP or PAUSE QnA
Local station
D9214 SD1214 up to numbers 33 to mode, the bit corresponding to the station number in
operation status
48 the register becomes "1".
Example: When station 7 switches to STOP mode,
Stores conditions for
Local station b6 in SD1212 becomes "1" , and when
D9215 SD1215 up to numbers 49 to
operation status SD1212 is monitored, its value is "64
64
(40H)".
App - 52 App - 52
APPENDICES
MELSEC-Q
Local station 17 to 32 SD1221 L32 L31 L30 L29 L28 L27 L26 L25 L24 L23 L22 L21 L20 L19 L18 L17
SD1222 L48 L47 L46 L45 L44 L43 L42 L41 L40 L39 L38 L37 L36 L35 L34 L33
parameters Stores conditions SD1223 L64 L63 L62 L61 L60 L59 L58 L57 L56 L55 L54 L53 L52 L51 L50 L49
D9222 SD1222 non-conforming; for up to numbers
If a local station acting as the master station of tier three
remote I/O 33 to 48
detects a parameter error or a remote I/O station whose
station I/O I/O assignment is abnormal, the bit of the device number
allocation error corresponding to the station number of that local station
Stores conditions or remote I/O station turns to "1".
D9223 SD1223 for up to numbers Example: When local station 5 and remote I/O station
49 to 64 14 detect an error, b4 and b13 in SD1220
become "1" , and when SD1220 is monitored,
its value is "8208 (2010H) " . QnA
Stores conditions Stores the local or remote station numbers while they are
D9224 SD1224 for up to numbers communicating the initial data with their relevant master
1 to 16 station.
Device Bit
Stores conditions number b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
D9225 SD1225 for up to numbers SD1224 L/R
16
L/R
15
L/R
14
L/R
13
L/R
12
L/R
11
L/R
10
L/R
9
L/R L/R L/R L/R L/R L/R L/R L/R
8 7 6 5 4 3 2 1
Local station 17 to 32 SD1225 L/R
32
L/R
31
L/R
30
L/R
29
L/R
28
L/R
27
L/R
26
L/R
L/R L/R L/R L/R L/R L/R L/R L/R
25
24 23 22 21 20 19 18 17
L/R L/R L/R L/R L/R L/R L/R L/R
L/R L/R L/R L/R L/R L/R L/R L/R
and remote I/O Stores conditions SD1226 48 47 46 45 44 43 42 41
40 39 38 37 36 35 34 33
L/R L/R L/R L/R L/R L/R L/R L/R
L/R L/R L/R L/R L/R L/R L/R L/R
SD1227 64 63 62 61 60 59 58 57
56 55 54 53 52 51 50 49
D9226 SD1226 station initial for up to numbers
communications 33 to 48 The bit corresponding to the station number which is
underway currently communicating the initial settings becomes "1" .
Example: When stations 23 and 45 are communicating,
Stores conditions b6 of SD1225 and b12 of SD1226 become
D9227 SD1227 for up to numbers "1", and when SD1225 is monitored, its value
49 to 64 is "64 (40H)", and when SD1226 is monitored,
its value is "4096 (1000H)"
Stores conditions Stores the local or remote station numbers which are in
D9228 SD1228 for up to numbers error.
Device Bit
1 to 16 number b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Stores conditions SD1228 L/R
16
L/R
15
L/R
14
L/R
13
L/R
12
L/R
11
L/R
10
L/R
9
L/R
8
L/R
7
L/R
6
L/R
5
L/R
4
L/R
3
L/R
2
L/R
1
L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R
D9229 SD1229 for up to numbers SD1229 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R
Local station 17 to 32
SD1230 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R L/R
SD1231 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
and remote I/O Stores conditions
station error The bit corresponding to the station number with the error
D9230 SD1230 for up to numbers
becomes "1" .
33 to 48
Example: When local station 3 and remote I/O station
Stores conditions 14 have an error, b2 and b13 of SD1228
D9231 SD1231 for up to numbers become "1", and when SD1228 is monitored,
49 to 64 its value is "8196 (2004H)".
App - 53 App - 53
APPENDICES
MELSEC-Q
App - 54 App - 54
APPENDICES
MELSEC-Q
App - 55 App - 55
APPENDICES
MELSEC-Q
(13) For redundant systems (Host system CPU information 1) for Q4AR only
SD1510 to SD1599 are only valid for redundant systems. They are all set to 0 for standalone
systems.
Corresponding
Set by Corresponding
Number Name Meaning Explanation ACPU
(When set) CPU
D9
• Set the basic period (1 second units) use for the process
SD1500 Basic period control instruction using floating point data.
Basic period U New
SD1501 tome
Floating points data = SD1501 SD1500
Process control Process control
• Shows the detailed error contents for the error that occurred S (Error
SD1502 instruction detail instruction detail New
in the process control instruction occurrence)
error code error code
Process control Process control
instruction instruction • Shows the error process block that occurred in the process S (Error Q4AR
SD1503 New
generated error generated error control instruction. occurrence)
location location
Operation mode • Shows the power out time (S) during the automatic switch
Hot start switch
SD1512 during CPU from hot start to initial start in the operation mode when the S (Initial) New
power out time
module start up CPU module is started up.
Switch request Request origin • Stores the request origin at work No. when the SM1590 is S (Error
SD1590 New
network No. network No. turned on. occurrence)
App - 56 App - 56
APPENDICES
MELSEC-Q
(14) For redundant systems (Other system CPU information 1) for Q4AR only
SD1600 to SD1659 is only valid during the back up mode for redundant systems, and refresh
cannot be done when in the separate mode. When a standalone system SD1600 to SD1699
are all 0.
Special Register List
Corresponding
Set by Corresponding
Number Name Meaning Explanation ACPU
(When set) CPU
SD 2
• Stores as BIN code the error No. of the error that occurred
Diagnosis error S (Each
SD1600 Diagnosis error during the other system CPU module diagnosis. New
No. END)
• Stores the latest error currently occurring.
SD1601 • SD1600 stores the updated date and time.
Diagnosis error
SD1602 Diagnosis error • Stores each of the BCD two digits. S (Each
occurrence New
occurrence time • Refer to SD1 to SD3 for the storage status. END)
SD1603 time
(SD1 SD1601, SD2 SD1602, SD3 SD1603)
Error Error • Stores the error comment information/individual information
S (Each
SD1604 information information classification code. New
END)
classification classification • Refer to SD4 for the storage status.
SD1605
SD1606
SD1607
• Stores the common information for the error code.
SD1608
• Refer to SD5 to SD15 for the storage status.
SD1609
Error common Error common (SD5 SD1605, SD6 SD1606, SD7 SD1607, S (Each
SD1610 New
information information SD8 SD1608, SD9 SD1609, SD10 SD1610, END)
SD1611
SD11 SD1611, SD12 SD1612, SD13 SD1613,
SD1612 SD14 SD1614, SD15 SD1615)
SD1613
SD1614
SD1615 Q4AR
SD1616
SD1617
SD1618
• Stores the individual information for the error code Refer to
SD1619
SD16 to SD26 for the storage status.
SD1620
Error individual Error individual (SD16 SD1616, SD17 SD1617, SD18 SD1618, S (Each
SD1621 New
information information SD19 SD1619, SD20 SD1620, SD21 SD1621, END)
SD1622
SD22 SD1622, SD23 SD1623, SD24 SD1624,
SD1623 SD25 SD1625, SD26 SD1626)
SD1624
SD1625
SD1626
CPU module • Stores the CPU module switch status. S (Each
SD1650 Switch status New
switch status • Refer to SD200 for the storage status. (SD1650 SD200) END)
• Stores the CPU module's LED status.
CPU module - • Shows 0 when turned off, 1 when turned on, and 2 when S (Each
SD1651 LED status New
LED status flicking. END)
• Refer to SD201 for the storage status. (SD1651 SD201)
CPU module
CPU module • Stores the CPU module operation status. Refer to SD203 for S (Each
SD1653 operation New
operation status the storage status. (SD1653 SD203) END)
status
1 Stores other system CPU module self-diagnosis information and system information.
2 Shows the special register (SD ) for the host system CPU module.
App - 57 App - 57
APPENDICES
MELSEC-Q
REMARK
1 : 1st to 12th points are allocated in order, beginning from the sequence start
generator module installed closest to the High Performance model QCPU.
2 : The internal times shown are the default setting times.
These times can be designated in 0.5 ms units through a 0.5 to 1000 ms range
set at the "PLC system" tab screen in the “(PLC) Parameter" dialog box.
3 : When an error interruption with "I32 (error that stops operation)" occurs, the
High Performance model QCPU is not stopped until I32 processing is
completed.
4 : Execution of error interruptions is prohibited for the interrupt pointer Nos. I32 to
I39 when the power is turned on and during a High Performance model QCPU
reset. When using interrupt pointer Nos. I32 to I39, set the interruption
permitted status by using the IMASK instruction.
5 : Set the time-out period of the internal timer by choosing "PLC system" -
"System interrupt setting" - "High speed interrupt setting" on the PLC parameter
screen.
Set it in the setting range 0.2 to 1.0ms in 0.1ms increments.
6 : To use the intelligent function module interrupt, the intelligent function module
setting (interrupt points setting) is required at the "PLC system" tab screen in
the “(PLC) Parameter" dialog box.
(For the interrupts from the intelligent function module, see Section 8.2.1.)
POINT
7: When you have set I49 in the PLC parameters, do not execute other interrupt
programs (I0 to I48, I50 to I255) and fixed-cycle programs. If any fixed-cycle
program or like is run, the interrupt program using I49 cannot be executed at
the preset interrupt cycle intervals.
App - 58 App - 58
APPENDICES
MELSEC-Q
The High Performance model QCPU has been updated to add functions and change
the specifications.
The functions and specifications that can be used with the High Performance model
QCPU change depending on the function version and serial No.
For function details, refer to the High Performance model QCPU (Q mode) User's
Manual (Function Explanation, Program Fundamentals).
App - 59 App - 59
APPENDICES
MELSEC-Q
GX Developer
SW4D5C-GPPW-E
SW5D5C-GPPW-E Version Version
Version 6 Version 7 Version 8
Added Function 7.10L 8.03D
Automatic write to standard ROM
External I/O can be turned ON/OFF
forcibly
Remote password setting
Compatibility with MELSECNET/H
remote I/O network
Interrupt module (QI60)
compatibility
Compatibility with the multiple CPU
system
Installation of PC CPU module into
the multiple CPU system
High speed interrupt
Compatibility with index
modification for module designation — — — — — —
of dedicated instruction
Selection of refresh item for COM
— — — — — —
instruction
SFC program online batch change
File memory capacity change
CC-Link remote network additional
mode
Incomplete derivative PID
operation function
Floating-point comparison
— — — — — —
instruction speedup
: Available, : N/A, — : Function not related to GX Developer
App - 60 App - 60
APPENDICES
MELSEC-Q
When transporting lithium batteries, make sure to treat them based on the transport
regulations.
The batteries for the High Performance model QCPU (including memory cards) are
classified as follows:
Classification for
Product name Model Product supply status
transportation
Q series battery Q7BAT Lithium battery
Lithium battery with Dangerous goods
Q series battery Q7BAT-SET
holder
Q series battery Q6BAT Lithium battery
Q series memory card battery Q2MEM-BAT Lithium coin battery
Non-dangerous goods
Q2MEM-1MBS Packed with lithium coin
Q series memory card
Q2MEM-2MBS battery (Q2MEM-BAT)
Comply with IATA Dangerous Goods Regulations, IMDG code and the local transport
regulations when transporting products after unpacking or repacking, while Mitsubishi
ships products with packages to comply with the transport regulations.
Also, contact the transporters.
App - 61 App - 61
INDEX
Ind
[A] Duty ..............................................................10-25
Accuracy of initial scan time...................... 4-16 DX (Direct access input)..............................10- 6
Accuracy of scan time ............................... 4-18 DY (Direct access output)............................10- 9
Annunciator (F) ........................................ 10-12
ASCII code................................................. 4-51 [E]
ATA card .................................................... 6-11 E (Real numbers).........................................10-62
Auto mode ................................................. 5- 3
Edge relay(V) ...............................................10-16
Automatic write to standard ROM............. 6-14
END processing .............................................4-34
[B] Enforced ON/OFF..........................................7-31
Enforced ON/OFF for external I/O ................1- 4
B (Link relay)............................................ 10-17
Execute type ..................................................4-10
Base mode................................................. 5- 3
BCD (Binary coded decimal)..................... 4-47 Execution time measurement........................7-39
Execution time of the low speed execution type
BIN (Binary code) ...................................... 4-45
program..........................................................4-19
BL (SFC block device)............................. 10-58
Boot Run .................................................... 6-17 Extension.............................................. 6- 2, 6- 4
[C] [F]
C (Counter).................................................. 10-24 F (Annunciator) ............................................10-12
Catalog PLC memory.................................... 6-18 Failure history.................................................7-64
Character string............................................. 4-51 FD (Function register)..................................10-31
Clock function ................................................ 7- 9 File register...................................................10-43
Precision .................................................... 7-11 Access method.........................................10-44
Common pointer.......................................... 10-54 Designation method .................................10-49
Concept of I/O assignment ........................... 5- 8 Registering ...............................................10-45
Concept of I/O assignment using File size ..........................................................6-18
GX Developer................................................ 5-12 Fixed scan execution type program ..............4-31
Constant scan................................................ 7- 2 Flash card.......................................................6-12
Constants..................................................... 10-61 Floating decimal point data............................4-48
Counter (C).................................................. 10-24 Function device (FX, FY, FD)......................10-31
Count processing..................................... 10-24 Function version............................... 13- 5, 14- 4
Maximum counting speed ....................... 10-25 FX (Function input) ......................................10-31
FY (Function output) ....................................10-31
[D]
D (Data register).......................................... 10-28 [G]
Data register (D).......................................... 10-28 Global device ...............................................10-63
Data stored on the memory card .................. 6- 4 GX Configurator ................................. 8- 2, 14-12
Decimal constants (K) ................................. 10-61 GX Developer ............................................... A-18
Device initial value...................................... 10- 69
Device list .................................................... 10- 1 [H]
Direct access input ...................................... 10- 6 H (Hexadecimal constants) .........................10-61
Direct access output.................................... 10- 9 HEX (Hexadecimal) .......................................4-46
Direct mode ................................................... 4-41 Hexadecimal constants (H) .........................10-61
Drive Number. ............................................... 6- 5 high speed interrupt function ........................7-81
High speed retentive timer (ST) ..................10-21
Index - 1 Index - 1
High speed timer (T) .................................. 10-20 [M]
M (Internal relay)..........................................10-10
[I] Macro instruction argument device (VD).....10-60 Ind
I (Interrupt pointer)....................................... 10-56 Main routine program.....................................4- 3
I/O No. designation device (Un).................. 10-59 Memory card ..................................................6-11
Index register (Z) ......................................... 10-39 Monitor condition setting................................7-25
Initial execution monitor time ........................ 4-16 Monitoring the local devices ..........................7-30
Initial execution type program....................... 4-15
Initial scan time.............................................. 4-16 [N]
Input response time....................................... 7-21 N (Nesting) ...................................................10-52
Intelligent function module device (U \G ). 10-38
Internal relay (M) ......................................... 10-10 [O]
Internal system device ................................ 10-31 Output (Y).....................................................10- 8
Internal user device..................................... 10- 3
Interrupt module ............................................ 5-11 [P]
Interrupt pointer (I)....................................... 10-56 P (Pointer) ....................................................10-53
Interrupt program........................................... 4- 6 Password........................................................7-65
PLOW instruction ...........................................4-14
[J] POFF instruction ............................................4-14
J (Network designation device)................... 10-58 Pointer (P) ....................................................10-53
J \B (Link relay) .................................. 10-35 Precautions for the use of device initial values ..10-71
J \SB (Link special relay) ................... 10-35 Precautions when using timers ...................10-23
J \SW (Link special register) .............. 10-35 Priority of LED ................................................7-76
J \W (Link register) ............................. 10-35 Procedure for using device initial values.....10-70
J \X (Link input) .................................. 10-35 Processing at annunciator OFF...................10-14
J \Y (Link output) ................................ 10-35 Processing at annunciator ON ....................10-12
Program construction.....................................1- 6
[K] Program execute type....................................4-10
K (Decimal constants) ................................. 10-61 Program memory ...........................................6- 6
Program monitor list.......................................7-39
[L] PSCAN instruction .........................................4-14
L (Latch relay).............................................. 10-11 PSTOP instruction .........................................4-14
Latch function ................................................. 7- 5 Purpose of I/O assignment............................5-11
Latch relay (L).............................................. 10-11 Purpose of I/O assignment using
LED display ................................................... 7-74 GX Developer ................................................5-11
Link direct device......................................... 10-35 [Q]
Link register (W) .......................................... 10-29 QCPU ............................................................ A-18
Link relay (B) ............................................... 10-17 QI60...................................................... 2- 4, 7-23
List of Interrupt factors ................................ 10-57 QnCPU .......................................................... A-18
App-55 QnHCPU ....................................................... A-18
Local device................................................. 10-63
Low speed END processing ......................... 4-23 [R]
Low speed execution monitor time............... 4-24 R (File register) ............................................10-43
Low speed execution type program ............. 4-19 Reading from the time data ...........................7- 9
Low speed retentive timer (ST)................... 10-21 Real numbers (E)...........................................4-48
Low speed scan timer ................................... 4-23 10-62
Low speed timer (T) .................................... 10-19 Refresh input................................................10- 6
Index - 2 Index - 2
Refresh mode................................................ 4-38 ST (Retentive timer: OUT ST ) ................10-21
Refresh output............................................. 10- 9 Stand-by type program ..................................4-25
Remote latch clear ........................................ 7-19 Standard RAM ...............................................6- 9
Remote operation.......................................... 7-12 Standard RAM memory capacity ..................6- 9
Remote PAUSE............................................. 7-15 Standard ROM ...............................................6- 8
Remote password ................................7- 1, 7-67 Step relay (S) ...............................................10-18
Remote RESET............................................. 7-17 Sub-routine program......................................4- 4
Remote RUN/STOP...................................... 7-12 SW (Link special register)............................10-30
Remote station I/O number........................... 5-10 Switch setting of intelligent function module .7-21
Retentive timer (OUT ST )....................... 10-21 System protect ...............................................7-65
RUN status .................................................... 4-35
[T]
[S] T (Timer).......................................................10-19
S (Step relay)............................................... 10-18 Timer (T).......................................................10-19
SB (Link special relay) ................................ 10-18 Accuracy...................................................10-22
Scan execution type program ....................... 4-17 Processing................................................10-22
Scan time....................................................... 4-18 TR (SFC transition device) ..........................10-58
SD (Special register) ................................... 10-34
SD415 (2n-ms clock setting)......................... 8- 9 [U]
SD520, SD521 (Scan time: present value) .. 4-18 U (I/O No. designation device) ....................10-59
SD522, SD523 (Initial scan time) ................. 4-16 U \G (Intelligent function module device)...10-38
SD524, SD525 (Scan time: Maximum value)...... 4-18 User memory..................................................6- 3
SD526, SD527 (Scan time: Minimum value)....... 4-18
SD528, SD529 (Low speed scan time: Present value) [V]
................................................................................... 4-24 V (Edge relay) ..............................................10-16
SD530, SD531 (Low speed scan time: Initial value) VD (Macro instruction argument device).....10-60
............................................................................... 4-24
SD532, SD533 (Low speed scan time: Minimum value) [W]
................................................................................... 4-24 W (Link register)...........................................10-29
SD534, SD535 (Low speed scan time: Maximum Watch dog timer.............................................7-57
value) .............................................................. 4-24 WDT (Watch dog timer).................................7-57
Self-diagnosis function .................................. 7-59 Write during RUN........................7-35, 7-37, 7-55
Sequence program........................................ 4- 1 Writing to the time data .................................7- 9
Serial No. ....................................................... 1- 1
Setting range in the internal user device .... 10- 3 [X]
Setting the number of stages........................ 5- 2 X (Input)........................................................10- 5
SFC block device (BL) ................................ 10-58
SFC transition device (TR).......................... 10-58 [Y]
Single precision floating decimal point data ..... 4-48 Y (Output).....................................................10- 8
Size (File capacity) ........................................ 6- 2
SM (Special relay) ....................................... 10-33 [Z]
SM415 (2n-ms clock) .................................... 8- 9 Z (Index register)..........................................10-39
Link special register (SW) ........................... 10-30 ZR (Serial number access format of file register)
Link special relay (SB) ................................ 10-18 ......................................................................10-49
Special register (SD) ................................... 10-34
Special relay (SM) ....................................... 10-33
SRAM card .................................................... 6-11
Index - 3 Index - 3
WARRANTY
Please confirm the following product warranty details before starting use.
3. Overseas service
Overseas, repairs shall be accepted by Mitsubishi's local overseas FA Center. Note that the repair conditions at each FA
Center may differ.
6. Product application
(1) In using the Mitsubishi MELSEC programmable logic controller, the usage conditions shall be that the application will
not lead to a major accident even if any problem or fault should occur in the programmable logic controller device, and
that backup and fail-safe functions are systematically provided outside of the device for any problem or fault.
(2) The Mitsubishi general-purpose programmable logic controller has been designed and manufactured for applications
in general industries, etc. Thus, applications in which the public could be affected such as in nuclear power plants and
other power plants operated by respective power companies, and applications in which a special quality assurance
system is required, such as for Railway companies or National Defense purposes shall be excluded from the
programmable logic controller applications.
Note that even with these applications, if the user approves that the application is to be limited and a special quality is
not required, application shall be possible.
When considering use in aircraft, medical applications, railways, incineration and fuel devices, manned transport
devices, equipment for recreation and amusement, and safety devices, in which human life or assets could be greatly
affected and for which a particularly high reliability is required in terms of safety and control system, please consult
with Mitsubishi and discuss the required specifications.
Microsoft Windows, Microsoft Windows NT are registered trademarks of Microsoft Corporation in the United States and
other countries.
Pentium is a registered trademark of Intel Corporation in the United States and other countries.
Ethernet is a registered trademark of Xerox. Co., Ltd in the United States.
Other company and product names herein are either trademarks or registered trademarks of their respective owners.
MITSUBISHI ELECTRIC
MITSUBISHI ELECTRIC EUROPE GEVA AUSTRIA UAB UTU POWEL LITHUANIA Avtomatika Sever Ltd. RUSSIA
EUROPE B.V. Wiener Straße 89 Savanoriu pr. 187 Lva Tolstogo St. 7, Off. 311
German Branch AT-2500 Baden LT-2053 Vilnius RU-197376 St Petersburg
Gothaer Straße 8 Phone: +43 (0) 2252 / 85 55 20 Phone: +370 (0) 52323-101 Phone: +7 812 / 11 83 238
D-40880 Ratingen Fax: +43 (0) 2252 / 488 60 Fax: +370 (0) 52322-980 Fax: +7 812 / 11 83 239
Phone: +49 (0) 2102 / 486-0 e mail: [email protected] e mail: [email protected] e mail: [email protected]
Fax: +49 (0) 2102 / 486-1120
e mail: [email protected] TEHNIKON BELARUS INTEHSIS SRL MOLDOVA CONSYS RUSSIA
Oktjabrskaya 16/5, Ap 704 Cuza-Voda 36/1-81 Promyshlennaya St. 42
MITSUBISHI ELECTRIC FRANCE BY-220030 Minsk MD-2061 Chisinau RU-198099 St Petersburg
EUROPE B.V. Phone: +375 (0)17 / 22 75 704 Phone: +373 (0)2 / 562 263 Phone: +7 812 / 325 36 53
French Branch Fax: +375 (0)17 / 22 76 669 Fax: +373 (0)2 / 562 263 Fax: +7 812 / 147 20 55
25, Boulevard des Bouvets e mail: [email protected] e mail: [email protected] e mail: [email protected]
F-92741 Nanterre Cedex
Phone: +33 1 55 68 55 68 Getronics b.v. BELGIUM Getronics b.v. NETHERLANDS Electrotechnical RUSSIA
Fax: +33 1 55 68 56 85 Control Systems Control Systems Systems Siberia
e mail: [email protected] Pontbeeklaan 43 Donauweg 2 B Partizanskaya St. 27, Office 306
B-1731 Asse-Zellik NL-1043 AJ Amsterdam RU-121355 Moscow
MITSUBISHI ELECTRIC IRELAND Phone: +32 (0) 2 / 467 17 51 Phone: +31 (0) 20 / 587 67 00 Phone: +7 095/ 416-4321
EUROPE B.V. Fax: +32 (0) 2 / 467 17 45 Fax: +31 (0) 20 / 587 68 39 Fax: +7 095/ 416-4321
Irish Branch e mail: [email protected] e mail: [email protected] e mail: [email protected]
Westgate Business Park, Ballymount
IRL-Dublin 24 TELECON CO. BULGARIA Beijer Electronics AS NORWAY Electrotechnical RUSSIA
Phone: +353 (0) 1 / 419 88 00 4, A. Ljapchev Blvd. Teglverksveien 1 Systems Siberia
Fax: +353 (0) 1 / 419 88 90 BG-1756 Sofia N-3002 Drammen Shetinkina St. 33, Office 116
e mail: [email protected] Phone: +359 (0) 2 / 97 44 05 8 Phone: +47 (0) 32 / 24 30 00 RU-630088 Novosibirsk
Fax: +359 (0) 2 / 97 44 06 1 Fax: +47 (0) 32 / 84 85 77 Phone: +7 3832 / 22-03-05
MITSUBISHI ELECTRIC ITALY e mail: — e mail: [email protected] Fax: +7 3832 / 22-03-05
EUROPE B.V. e mail: [email protected]
Italian Branch INEA CR d.o.o. CROATIA MPL Technology Sp. z o.o. POLAND
Via Paracelso 12 Drvinje 63 ul. Sliczna 36 Elektrostyle RUSSIA
I-20041 Agrate Brianza (MI) HR-10000 Zagreb PL-31-444 Kraków ul. Garschina 11
Phone: +39 039 6053 1 Phone: +385 (0) 1 / 36 67 140 Phone: +48 (0) 12 / 632 28 85 RU-140070 Moscow
Fax: +39 039 6053 312 Fax: +385 (0) 1 / 36 67 140 Fax: +48 (0) 12 / 632 47 82 Phone: +7 095 / 514 9316
e mail: [email protected] e mail: — e mail: [email protected] Fax: +7 095 / 514 9317
e mail: [email protected]
MITSUBISHI ELECTRIC SPAIN AutoCont CZECH REPUBLIC Sirius Trading & Services srl ROMANIA
EUROPE B.V. Control Systems s.r.o. Str. Biharia No. 67-77 Elektrostyle RUSSIA
Spanish Branch Nemocnicni 12 RO-013981 Bucuresti 1 Krasnij Prospekt 220-1
Carretera de Rubí 76-80 CZ-702 00 Ostrava 2 Phone: +40 (0) 21 / 201 1146 Office No. 312
E-08190 Sant Cugat del Vallés Phone: +420 59 / 6152 111 Fax: +40 (0) 21 / 201 1148 RU-630049 Novosibirsk
Phone: +34 9 3 / 565 3131 Fax: +420 59 / 6152 562 e mail: [email protected] Phone: +7 3832 / 10 66 18
Fax: +34 9 3 / 589 2948 e mail: [email protected] Fax: +7 3832 / 10 66 26
INEA d.o.o. SLOVENIA e mail: [email protected]
e mail: [email protected] louis poulsen DENMARK Stegne 11
MITSUBISHI ELECTRIC UK industri & automation SI-1000 Ljubljana ICOS RUSSIA
EUROPE B.V. Geminivej 32 Phone: +386 (0) 1-513 8100 Industrial Computer Systems Zao
UK Branch DK-2670 Greve Fax: +386 (0) 1-513 8170 Ryazanskij Prospekt 8a, Office 100
Travellers Lane Phone: +45 (0) 70 / 10 15 35 e mail: [email protected] RU-109428 Moscow
GB-Hatfield Herts. AL10 8 XB Fax: +45 (0) 43 / 95 95 91 Phone: +7 095 / 232 - 0207
e mail: [email protected] Beijer Electronics AB SWEDEN Fax: +7 095 / 232 - 0327
Phone: +44 (0) 1707 / 27 61 00 Box 426 e mail: [email protected]
Fax: +44 (0) 1707 / 27 86 95 UTU Elektrotehnika AS ESTONIA S-20124 Malmö
e mail: [email protected] Pärnu mnt.160i Phone: +46 (0) 40 / 35 86 00 NPP Uralelektra RUSSIA
MITSUBISHI ELECTRIC JAPAN EE-11317 Tallinn Fax: +46 (0) 40 / 35 86 02 ul. Sverdlova 11a
CORPORATION Phone: +372 (0) 6 / 51 72 80 e mail: [email protected] RU-620027 Ekaterinburg
Office Tower “Z” 14 F Fax: +372 (0) 6 / 51 72 88 Phone: +7 34 32 / 53 27 45
e mail: [email protected] ECONOTEC AG SWITZERLAND Fax: +7 34 32 / 53 27 45
8-12,1 chome, Harumi Chuo-Ku Postfach 282 e mail: [email protected]
Tokyo 104-6212 Beijer Electronics OY FINLAND CH-8309 Nürensdorf
Phone: +81 3 6221 6060 Ansatie 6a Phone: +41 (0) 1 / 838 48 11 SSMP Rosgidromontazh Ltd. RUSSIA
Fax: +81 3 6221 6075 FIN-01740 Vantaa Fax: +41 (0) 1 / 838 48 12 23, Lesoparkovaya Str.
MITSUBISHI ELECTRIC USA Phone: +358 (0) 9 / 886 77 500 e mail: [email protected] RU-344041 Rostov On Don
AUTOMATION Fax: +358 (0) 9 / 886 77 555 Phone: +7 8632 / 36 00 22
e mail: [email protected] GTS TURKEY Fax: +7 8632 / 36 00 26
500 Corporate Woods Parkway Darülaceze Cad. No. 43 Kat. 2 e mail: —
Vernon Hills, IL 60061 UTECO A.B.E.E. GREECE TR-80270 Okmeydani-Istanbul
Phone: +1 847 / 478 21 00 5, Mavrogenous Str. Phone: +90 (0) 212 / 320 1640 STC Drive Technique RUSSIA
Fax: +1 847 / 478 22 83 GR-18542 Piraeus Fax: +90 (0) 212 / 320 1649 ul. Bajkalskaja 239, Office 2 - 23
Phone: +302 (0) 10 / 42 10 050 e mail: [email protected] RU-664075 Irkutsk
Fax: +302 (0) 10 / 42 12 033 Phone: +7 3952 / 24 38 16
e mail: [email protected] CSC Automation Ltd. UKRAINE Fax: +7 3952 / 23 02 98
MIDDLE EAST REPRESENTATIVE 15, M. Raskova St., Fl. 10, Office 1010 e mail: [email protected]
Meltrade Automatika Kft. HUNGARY UA-02002 Kiev
TEXEL Electronics Ltd. ISRAEL 55, Harmat St. Phone: +380 (0) 44 / 238-83-16 STC Drive Technique RUSSIA
Box 6272 HU-1105 Budapest Fax: +380 (0) 44 / 238-83-17 Poslannikov Per. 9, str.1
IL-42160 Netanya Phone: +36 (0)1 / 2605 602 e mail: [email protected] RU-107005 Moscow
Phone: +972 (0) 9 / 863 08 91 Fax: +36 (0)1 / 2605 602 Phone: +7 095 / 790-72-10
Fax: +972 (0) 9 / 885 24 30 e mail: [email protected] Fax: +7 095 / 790-72-12
e mail: [email protected] e mail: [email protected]
SIA POWEL LATVIA
Lienes iela 28
LV-1009 Riga
Phone: +371 784 / 22 80 AFRICAN REPRESENTATIVE
Fax: +371 784 / 22 81
e mail: [email protected] CBI Ltd. SOUTH AFRICA
Private Bag 2016
ZA-1600 Isando
Phone: +27 (0) 11/ 928 2000
Fax: +27 (0) 11/ 392 2354
e mail: [email protected]