MlTSUBlSHl QnA SERIES
QnACPU GUIDEBOOK
I ' 6
1
M its u b i s h i Pr og ram rn a b I e Con t ro I I e r
I
REVISIONS
Print Date
Jul., 1996
:
*The manual number is given on the bottom left of the back cover.
*Manual Number
IB (NA) 66606-A
Revision ~
First edition
SAFETY CAUTIONS (You must read these cautions before using the product)
In connection with the use of this product, in addition to carefully reading both this manual and the related manuals indicated in this manual, it is also essential to pay due attention to safety and handle the product correctly. The safety cautions given here apply to this product in isolation. For information on the safety of the PC system as a whole, refer to the CPU module User's Manual. These SAFETY CAUTIONS are classified into two grades: "DANGER" and "CAUTION".
Safety caution given when incorrect handling could result in hazardous @ DANGER situations involving the possibility of death or serious injury. A CAUTION Safety caution given when incorrect handling could result in hazardous
Note that, depending on the circumstances, failing to follow a A CAUTION may also have very serious consequences. Both of these classes of safety caution are very important and must be observed. Store this manual carefully in a place where it is accessible for reference whenever necessary, and forward a copy of the manual to the end user.
situations involving the possibility of moderate or light injury or damage to property.
[System Design Precautions]
@ DANGER
Safety circuits should be installed external to the programmable controller to ensure that the system as a whole will continue to operate safely in the event of an external power supply malfunction or a programmable controller failure. Erroneous outputs and operation could result in an accident. 1) The following circuitry should be installed outside the programmable
controller: Interlock circuitry for the emergency stop circuit protective circuit, and for reciprocal operations such as forwardheverse, etc., and interlock circuitry for upper/lower positioning limits, etc., to prevent machine damage.
processing is stopped and all outputs are switched OFF. This happens in the following cases: 0 When the power supply module's over-current or over-voltage protection
0 When an error (watchdog timer error, etc.) is detected at the PC CPU by
Some errors, such as input/output control errors, cannot be detected by the PC CPU, and there may be cases when all outputs are turned ON when such errors occur. In order to ensure that the machine operates safely in such cases, a failsafe circuit or mechanism should be provided outside the programmable controller. Refer to the CPU module user's manual for an example of such a failsafe circuit.
3) Outputs may become stuck at ON or OFF due to an output module relay or transistor failure. An external circuit should therefore be provided to monitor output signals whose incorrect operation could cause serious accidents.
2) When the programmable controller detects an abnormal condition,
device is activated.
the. self-diagnosis function.
A circuit should be installed which permits the external power supply to be switched ON only after the programmable controller power has been switched ON. Accidents caused by erroneous outputs and motion could result if the external power supply is switched ON first.
When a data link communication error occurs, the status shown below will be established at the faulty station. In order to ensure that the system operates safely at such times, an interlock circuit should be provided in the sequence program (using the communication status information). Erroneous outputs and operation could result in an accident. 1) The data link data which existed prior to the error will be held. 2) All outputs will be switched OFF at MELSECNET ( 1 1 , /B, / lo) remote I/O
3) At the MELSECNET/MINI-S3 remote I/O stations, all outputs will be
For details on procedures for checking faulty stations, and for operation statuses when such errors occur, refer to the appropriate data link manual.
stat ions.
switched OFF or output statuses will be held, depending on the E.C. mode setting .
[System Design Precautions ]
A CAUTION
0 Do not bundle control lines or communication wires together with main circuit or power lines, or lay them close to these lines. As a guide, separate the lines by a distance of at least 100 mm, otherwise malfunctions may occur due to noise. When file register R that are outside the range are read, e.g. by a MOV instruction, the file register data will become FFFFH and use of this data will cause malfunctions. Take care not to use file registers that are outside the range when designing programs. For details on instructions, refer to the Programming Manual.
[Cautions on Mounting]
/f\ CAUTION
Use the PC in an environment that conforms to the general specifications in the manual. Using the PC in environments outside the ranges stated in the general specifications will cause electric shock, fire, malfunction, or damage toldeterioration of the product.
Make sure that the module fixing projection on the base of the module is properly engaged in the module fixing hole in the base unit before mounting the module. Failure to mount the module properly will result in malfunction or failure, or in the module falling.
Extension cables should be securely connected to base unit and module connectors. Check for loose connection after installation. A poor connection could result in contact problems and erroneous inputs/outputs.
Plug the memory card firmly into the memory card mounting connector. Check for loose connection after installation. A poor connection could result in erroneous operation.
[Cautions on Wiring]
@ DANGER
0 Switch off the external power supply before staring installation and wiring work. Failure to do so could result in electrical shocks and equipment damage.
0 After installation and wiring is completed, be sure to attach the terminal cover before switching the power ON and starting operation. Failure to do so could result in electrical shocks.
A CAUTION
Be sure to ground the FG and LG terminals, carrying out at least class 3 grounding work with a ground exclusive to the PC. Otherwise there *ill be a danger of electric shock and malfunctions.
Carry out wiring to the PC correctly, checking the rated voltage and terminal arrangement of the product. Using a power supply that does not conform to the rated voltage, or carrying out wiring incorrectly, will cause fire or failure.
Outputs from multiple power supply modules should not be connected in parallel. Failure to do so could cause the power supply module to overheat, resulting in a fire or module failure.
Tighten the terminal screws to the stipulated torque. Loose screws will cause short circuits, fire, or malfunctions,
Make sure that no foreign matter such as chips or wiring offcuts gets inside the module. It will cause fire, failure or malfunction.
Connectors for external connections should be crimped, pressure welded, or soldered in the correct manner using the correct tools. For details regarding crimping and pressure welding tools, refer to the i npu t/ou tpu t module user’s manual. A poor connection could cause shorts, fire, and erroneous operation.
[Cautions on Startup and Maintenance]
@ DANGER
Do not touch terminals while the power is ON. This will cause malfunctions.
Make sure that the battery is connected properly. Do not attempt to charge or disassemble the battery, do not heat the battery or place it in a flame, and do not short or solder the battery. Incorrect handling of the battery can cause battery heat generation and ruptures which could result in fire or injury.
Switch the power off before cleaning or re-tightening terminal screws. Carrying out this work while the power is ON will cause failure or malfunction of the module.
I /T\ CAUTION
In order to ensure safe operation, read the manual carefully to acquaint yourself with procedures for program changes, forced outputs, RUN, STOP, and PAUSE operations, etc., while operation is in progress. Incorrect operation could result in machine failure and injury.
Do not disassemble or modify any module. This will cause failure, malfunction, injuries, or fire.
Switch the power OFF before mounting or removing the module. Mounting or removing it with the power ON can cause failure or malfunction of the module.
When replacing fuses, be sure to use the prescribed fuse. A fuse of the wrong capacity could cause a fire.
[Cautions on Disposal]
/T\ CAUTION
0 Dispose of this product as industrial waste.
INTRODUCTION
Thank you for choosing the Mitsubishi MELSEC-QnA Series of General Purpose Programmable Controllers. Please read this manual carefully so that the equipment is used to its optimum. A copy of this manual should be forwarded to the end User.
CONTENTS
1 . USING THIS MANUAL ............................................... 1 . 1 . 1 . 3 1.1 Terms and Abbreviations Used in This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 2 1.2 Basic Key Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 - 3
2 . QnACPU GENERAL DESCRIPTION .................................... 2 . 1 . 2 . 6
2.1 General Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 1
3 . OPERATING PROCEDURE USING THE QnACPU ........................ 3 . 1 . 3 . 59
3.1 Applicable System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 1 3.2 General Procedure for Overall Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 2 3.3 Starting Up GPP Functions after Completing Peripheral Device Preparations . . . . . . . . 3 - 3
3.3.1 Preparing the IBM PC/AT hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 3 3.3.2 Installing the GPP function software package .......................... 3 - 5 3.3.3 Starting the GPP functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 9 3.3.4 Corrective action when an error occurs .............................. 3 - 10
3.4 Creating Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 1 1 3.4.1 Selecting CPU type used and setting file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 11 3.4.2 Programming in ladder mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 13 .
3.4.3 Appending comments to devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 18 3.4.4 Saving program to hard disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 20 3.4.5 Convenient functions for programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 22
3.5.1 Preparations for operating the CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 29 3.5.2 Writing program to CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 38 3.5.3 Operating the CPU for monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 40 3.5.4 Modifying program while monitoring CPU operation
(online program change (write during RUN)) .......................... 3 - 44 3.5.5 Registering a password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 46 3.5.6 Checking responses to forced faults (PC diagnosis) .................... 3 - 49
3.6 Printing the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 54 3.6.1 Setting the printer and paper size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 54 3.6.2 Printing out the ladder program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 56
3.7 Quitting GPP Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 -59
3.5 Operating the CPU for Monitoring and Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 29
3.6.3 Sample ladder program print-out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 58
4 . MAKING THE MOST OF YOUR QnACPU (1) ............................. 4 . 1 . 4 . 76
4.1 System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 1 4.2 Programming for Individual Control Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 2
4.2.1 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 2 4.2.2 Sample program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 4 4.2.3 Program list monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 9
4.3 Easy Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 14
- I -
,-.>
...
F
YT.."..-. .............
I
4.3.1 Direct access of special-function module buffer memory as devices . . . . . . . . 4 - 14 4.3.2 Accessing word devices as bit units and using differential contacts . . . . . . . . . 4 - 15
4.4 Convenient Functions When Using QnACPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 16 4.4.1 Allocation of optimal device points range for the system used . . . . . . . . . . . . . 4 - 16 4.4.2 Setting device values required by the system as initial values . . . . . . . . . . . . . 4 - 19 4.4.3 Boot operation with a program transferred from memory card
4.4.4 Remote operation of the QnACPU from a distant location . . . . . . . . . . . . . . . . 4 - 35 4.4.5 What are local devices? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 52
4.5 Easy Program Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 56 4.5.1 Simultaneous monitoring by multiple operators . . . . . . . . . . . . . . . . . . . . . . . . 4 - 56 4.5.2 Monitoring devices at any step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 58
to QnACPU internal memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 28
4.6 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-62 4.6.1 Creating one program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 62 4.6.2 Creating multiple programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 - 67
5 . MAKING THE MOST OF YOUR QnACPU (2) ............................. 5 . 1 . 5 . 28
5.1 Programming Before I/O Module Configuration is Determined . . . . . . . . . . . . . . . . . . . . 5 - 1 5.1 . 1 Programming using labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 1
5.2 Utilizing Program Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 16 5.2.1 Program standardization with user-created macros . . . . . . . . . . . . . . . . . . . . . 5 - 16
About Manuals
QSA(Sl)IQ3AIQ4ACPU User’s Manual
and the specifications and handling of memory cards and base units.
QnACPU Programming Manual (Fundamentals)
Describes the performance, functions, and handling of the Q2ACPU(Sl), Q3ACPU. and Q4ACPU,
Describes how to create programs, the names of devices, parameters, and types of program. (Purchased separately)
QnACPU Programming Manual (Common Instructions) Describes how to use sequence instructions, basic instructions, and application instructions.
(Purchased separately)
QnACPU Programming Manual (Special Function)
The manuals related to the QnACPU are listed in the table below. Please order those you require.
16-66608
18-666 1 4
18-6661 5
I Related Manuals I
Type SWOIVD-GPPQ GPP Function Operating Manual (Offline)
Type SWOIVD-GPPQ GPP Function Operating Manual (Online)
Manual Name I Manual Number
16-66623
IB-66624
I 16-66616 Describes thededicated instructions for special function modules available when using the Q2ACPU(Sl), Q3ACPU, and Q4ACPU.
(Purchased separately)
QnACPU Programming Manual (AD57 Instructions) Describes the dedicated instructions for controlling an AD57(Sl) type CRT controller module available when using the Q2ACPU(Sl), QBACPU, or Q4ACPU. 18-6661 7
(Purchased separately)
QnACPU Programming Manual (PID Control Instructions) Describes the dedicated instructions for PID control available when using the Q2ACPU(S1), IB-66618 I Q3ACPU. or Q4ACPU. I (Purchased separately) I
/-
1. USING THIS MANUAL MELSEC-QnA
1. USING THIS MANUAL
This manual explains: 0 What type of CPU the Q2ACPU(Sl), Q3ACPU, and Q4ACPU are; 0 The operating procedures when using QnA; 0 And examples of use of the QnA features.
It includes descriptions of the operations of the S W O IVD-GPPQ GPP function software package (hereafter abbreviated to "GPPQ").
See the manuals listed in the table of related manuals for more details about information and operations described in this manual. Refer to the related manuals for a deeper understanding of the QnACPU functions and GPPQ functions.
The structure of this manual is as follows: Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
USING THIS MANUAL Describes the terms and abbreviations used in this manual and the basic key operations.
QnACPU GENERAL DESCRIPTION Describes the structured files which are a feature of QnACPU and provides a simple explanation of structured programs in multiple files.
OPERATING PROCEDURE USING THE QnACPU Describes the QnACPU operation flow using an example system configuration and describes the GPPQ operations for programming. The operations described include installing the software in the peripheral device, programming, CPU operation, and printing out.
MAKING THE MOST OF YOUR QnACPU (1) Gives tips on programming with multiple files, which is a feature of QnACPU.
MAKING THE MOST OF YOUR QnACPU (2) Describes programming with labels, which is a feature of QnACPU. Also describes how to use macro instructions.
1 - 1
1. USING THIS MANUAL MELSEC-QnA
1.1 Terms and Abbreviations Used in This Manual
The following abbreviations are used in this manual.
(1) QnACPU .......................... An abbreviation for a
Q3ACPU, or Q4ACPU CPU module.
Q2ACPU, Q2ACPU-S1 I
(2) GPPQ (GPP function software) . . . . . . . Abbreviation for the SW 0 IVD-GPPQ GPP function software package.
(3) IBM PC/AT ........................ An IBM PC/AT computer, or 100% compatible (* l) .
(4) Peripheral device capable of GPP functions. . . General term for an IBM PC/AT, or other peripheral device, which operates the GPP function software.
(5) Internal memory.. . . . . . . . . . . . . . . . . . . QnACPU internal RAM for storing sequence programs, etc.
(6) Memory card. ...................... Abbreviation for a Q1 MEM- UOUmemory card.
(7) ACPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General term for MELSEC-A Series PC CPUs.
'1 IBM is a registered trademark of International Business Machines Corporation.
I I I
The RAM memory built into the QnACPU is referred to as "internal memory" in this manual. The term "internal RAM" appearing in SW 0 IVD-GPPQ displays also refers to this internal memory.
1 - 2
1. USING THIS MANUAL MELSEC-QnA
1.2 Basic Key Specifications
The key applications with the GPP functions are listed in the table below.
(1) Key Applications
Key Name
[Tab1
[Ctrl] + [Tab]
[Ctrl]
[Shift]
[Caps Lock]
tAlt1
[Page UP1
[Page Down]
[Insert]
[Delete]
[Home]
Application
Closing windows, halting execution, selecting an instruction Openinglclosing windows
Tab code input, rapid cursor movement
Used in combination with alphanumeric keys and functions keys
Selects the character at the Shift position
Switches between uppercase and lowercase characters
Selects the menu
Scrolls page up (- direction) one screen for ladder, list, or help display
Scrolls page down (+ direction) one screen for ladder, list, or help display
Inserts a space at the cursor position
Deletes the character at the cursor position (clears entire set contents)
Moves the cursor to the home position
Key Name
[F111
[ t I[ J. 11 + I[ + I
[Back Space]
[Enter]
[Ctrl] + [Home]
[Ctrl] + [End]
[Print Screen]
[Scroll Lock]
[Num Lock]
F121
Application
Opens the mode select window
Moves the cursor or scrolls through lines of a ladder or list display ([ t 1 [ J. 11
Deletes the character to the left of the cursor
Inputs the carriage return
Moves the cursor to step 0 in the ladder or list mode
Moves the cursor to the END instruction in the ladder or list mode
~~~ ~~ ~
Copies the screen
Disables scrolling up or down
Sets the numeric keypad for numeric input only
Opens the HELP window
1-3
2. QnACPU GENERAL DESCRIPTION MELSEC-QnA
2. QnACPU GENERAL DESCRIPTION
2.1 General Description
The QnACPU is a PC CPU which is both easier to use and more sophisti- cated than the previous ACPU. In particular, programming efficiency is en- hanced by structured programs and instruction definition with macro instructions. QnACPU offers the following features:
0 High-speed Processing
(1 ) Increased processing speed for both basic and application instructions realizes a further dramatic jump in operation speed (approximately 3-times increase for PCMIX value ratio using Mitsubishi AnU). This realizes dramatic reductions in tact time and allows high-speed
. processing of complex data.
A4UCPU Q4ACPU 1 Basic instructions 0.15 ps 0 . 0 7 5 ~ ~ (2 X) ~
Transfer instructions 0.90 ps 0.225 ps (4 x)
PCMlX value
1.20
PCMlX value: The average number of instructions executed in 1 ps.
High Memory Capacity Serial execution of 124 k steps maximum in internal memory (4-times in- crease) Maximum memory card capacity: 2 M B x 2 (4-times increase)
(2) The highly integrated IC memory card allows large volumes of data to be managed (2 MB x 2 max.).
IC mem ry maximum 2 M B x 2
1) The application of highly integrated IC mem- ory cards has significantly increased the ca- pacity of the expansion data memory (approximately 5-times increase using Mit- subishi AnUCPU). This makes it easier to handle large vol- umes of data.
2) The cards can also be used to save multi- ple programs and store comments.
2-1
2. QnACPU GENERAL DESCRIPTION MELSEC-QnA
Transport and ejection
&= El -------. *
gs Programmer E
Machining *
Programmer C
information control
Program Management Decentralized control of programs and data is possible with a maximum of 128 files. This promotes structured programming and allows debugging and pro- gram maintenance by multiple programmers.
multiple smaller programs. Dividing the program by programmer, by function, or by process, allows multiple programmers to simultaneously develop a program and simplifies re-using the pro- gram. When a program is modified, only the relevant file needs to be changed, which means that unwanted effects on other parts of the program can be minimized. To simplify program maintenance, a com- ment and time-stamp is appended to each
(1) Multiple program management
a Structured Programs Programs can be selected from four types: initial execution, scan execution, low-speed execution, and standby. These programs can be set to run when required, thereby reducing the scan time of the permanently executing scan program.
Power ON
Low-speed program Low-speed program Low-speed program Step 0 to 200 Step 201 to 320 Step 321 to END
2-2
2. QnACPU GENERAL DESCRIPTION MELSEC-QnA
Program Standardization
(1) Macro instructions
This function allows user-created instructions to be created by combin- ing sequence instructions. Using macro instructions allows the device numbers to be easily changed to match the system used, as shown below.
(a) Saved macro Macro instruction name (any name can be applied)
1 Saved macro to change DO-D2
Normal sequence to VDO-VDP. M.MAX (macro)
(b) Macro utilization Replaces VDO-VDP
In put program with RO-R2. Program after macro expansion
> I RO I R l MoVl RO 1 R1 h
MOVl R1 I R2
(2) Programming with labels (program standardization)
If the CPU type is set to "Xtype", standard programs can be created using labels, without considering the CPU model name, I/O ad- dresses, or device number allocation. These standardized programs can be used by allocating devices to the labels to match the system used.
Program Input program generation Label definition
I 1 I 1
I I 1 l a Label: 10 characters max.
After program expansion
2-3
2. QnACPU GENERAL DESCRIPTION MELSEC-QnA
a Reduced Programming Time and Effective Memory Utilization A number of convenient instructions are provided to reduce program- ming time. The number of device points can be allocated to match the system, such that each required device occupies only the required num- ber of points, and unnecessary devices can be removed from the 28 k words of device memory.
MELSEC-A program MELSEC-QnA program
I+SEG K4X10 K481 A I
Shows the contents of the 110 addresses XIY40 (U4) and buffer memory address 2(G2), which indicate the special-function nodule buffer memory
Run on XO leading edge (a)
I
a Flexible Operation Comprehensive editing functions
(a) Simultaneous, parallel editing of four programs.
(b) One-touch switching of the edited program.
(c) Cutting and pasting between edited programs.
(d) Special features, such as vertical and horizontal line connections and parallel coil insertion, for easy creation of ladder programs.
cut - Transparent operation
Paste - (a) The pull-down menus and dialog boxes offer ease of operation
equivalent to commercial software packages. Frequently used functions can be allocated to function keys to en- sure correct operation every time.
Pull-down menus Dialog boxes
Camcs l<N> I
2. QnACPU GENERAL DESCRIPTION MELSEC-QnA
0 Comprehensive Debugging Functions (I) Comprehensive ladder monitor functions
(a) Index-qualified devices and expansion file registers can be moni- tored.
(b) The peripheral device designates the QnACPU monitoring timing, to allow precise monitoring timing. At the designated timing, the peripheral device reads and displays the monitored information.
Monitoring timing set at 200 steps and M100 leading edge. <Example>
~~~~~ ~~~~~
I
2.<*? Condition R u ice Current Ualue i.E*l Device I.< > Ward Device f I - 1
2.C*I step u I 2881-
Z.<*> B i t tkuice CUI00 l - < t >
T Step 200 Cancsl<H>
~~
I I I I Sets the designated bit device status as leading
Sets the ON condition of the designated step as "Always, ON, OFF, leading edge (?) or trailing edge (k)". A setting made during operation (between contacts) is valid.
edge (?) or trailing edge (&).
(2) Debugging by multiple people
Debugging is possible using multiple peripheral devices con- nected to a single QnACPU.
(a) If each peripheral device debugs a separate file name, monitoring, testing, and online program change (write during RUN) can be conducted freely, without affecting any other peripheral device. For example, i f peripheral device A debugs "Machining program" and peripheral device B debugs "Assembly program."
(b) Also, online program change (write during RUN) is possible for the same file from mul- tiple peripheral devices. A program pointer must be pre-designated for the online program change (write during RUN) programs.
serial communications module
Peripheral Peripheral device A device B
2 -5
2. QnACPU GENERAL DESCRIPTION MELSEC-QnA
0 Simple Programming Powerful document-creation support
(1) Integral management of statements and notes with the program.
(2) Comments can be added to all devices.
(3) Comments up to 32 characters and labels up to 10 characters improve program readability.
Label (10 characters)
'START 1 'STOP 1 'MOTOR1 )-
Linel
'MOTOR 1
Turn Line 1 Moto
Comment (32 characters)
2 -6
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
L
POINT I This guide uses an example of connection to the PC CPU via the built-in RS-232C port.
3. OPERATING PROCEDURE USING THE QnACPU
This chapter describes the basic operation of the QnACPU and the prepa- rations and procedures required before operation.
3.1 Applicable System Configuration
The diagram shows the example system used for the following explana- tions. The peripheral device used is an IBM PC/AT.
RS-422 cable (made by the ma)
R5-422
RS-23ZC cable (mads by th8 ran)
PC/AT
Printer cable
I BCD diiital switch (4-dipit x 2) I
X20 ta X3F
I SMD switch x 6
x2 to x7
I Button =itch [adomatically m e t ) x 2 I
i PC-PRZOlH(H2). ar equivalent Confarming to ESC/PZCJB*
3-1
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
Hardware preparation
0 Checking available functions. 0 Selecting RS-232C t) RS-422 converter.
1 ~
I Saving the GPP function software package
Setting start-up environment
3.2 General Procedure for Overall Operation
Section 3.3.1
Section 3.3.2 (1)
Section 3.3.2 (2)
The overall procedure for the basic QnACPU operations described from Section 3.3. The peripheral device is an IBM PC/AT.
r GPP function start-up Section 3.3.3
I Initialization I Section 3.4
Programming in ladder mode
I Select "Create ..." I
Section 3.4.2
Section 3.4.4
Writing programs to CPU Section 3.5.2
Creating device comments Section 3.4.3 I
I Monitoring CPU
I Saving program to hard disk I Section 3.4.4
Section 3.5.3
I Preparation for running CPU i
Section 3.5.1
Modifying program while monitoring CPU
0 Hardware preparations 0 Software preparations
I
Section 3.5.4
Quit GPP functions Section 3.7
I Saving entry code I Section 3.5.5
Section 3.5.6
Printing out (ladder) program Section 3.6
3-2
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.3 Starting Up GPP Functions after Completing Peripheral Device Preparations
The peripheral device hardware settings must be made and the GPP func- tion software package must be set before running the GPP functions.
3.3.1 Preparing the IBM PClAT hardware
The system configuration is shown below.
I IBM PC/AT
Printer cable - MS-OOS/PC-00s system disk P Series PC CPU k z i G d
Applicable IBM PC/AT
The following IBM PC/AT specifications can be used. CPU
(66 MHz)) EMS : 4 MB min. Hard disk free space Other
: 80486SX(20 MHz), or higher (recommended: 80486DX2
: 20 MB min. : Install HIMEM and SMARTDRV drivers.
MS-DOS/PC-DOS operating system disk
Start the operating system disk before starting the personal computer. This system uses the MS-DOS or PC-DOS operating system. Check that the version of the MS-DOS/PC-DOS operating system is version 5.0 or later.
Free space in main memory
At least 540 k bytes free space is required in the main memory of the IBM PC/AT used.
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
PC/AT 9-PIN (RS-232C port)
TXD 3
- 2
RXD
4 DTR
6 DSR .r
8 - CTS
5 - SG
(4) SWOIVD-GPPQ software package
eo nverter port RS-422
FG
2 ~ RXD(+)
15 ~ RXD(-)
3 - TXD(+)
~ TXD(-)
~ DSR(+)
16
4
17 ~ DSR(-)
5 ~ DTR(+)
18 3 ________ DTR(-)
7 SG
20 - SG
21 -
This system disk provides the software package which is installed onto the IBM PC/AT hard disk to run the GPP functions (sequence program environment part) and SFC functions. The software package is contained in the following disks.
3.5-inch disks SWOIVD-GPPQ-1 2 floppy disks SWOIVD-GPPQ-2 1 floppy disk SWOIVD-GPPQ-3 1 floppy disk
SWOIVD-GPPQ-1 is copy protected. Installation of the software package requires 8 M byte minimum of free space on the hard disk.
(5) RS-232C c) RS-422 converter
The computer and the QnACPU are connected by means of an RS-232C tj RS-422 converter. Shown below is an example of the connections between the computer and the QnACPU through the RS-232C c) RS-422 converter. (Con- nect the wires to the RS-232C t) RS-422 as illustrated in the follow- ing figure.)
3 -4
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
C:\>-
3.3.2 Installing the GPP function software package
..... DOS command prompt status
(1) Installation procedure
C :\>A:\I NSTH D
This section describes the procedure to install SWOIVD-GPPQ on the IBM PC/AT hard disk. The installation is based on the conditions shown below.
..... Input the command shown to the left.
Turn ON or RESET IBM PClAT power supply.
1 ..... The drive varies according to the system being
used. Insert system disk No.1 into the designated drive.
I
1 [ Enter1
1 ..... The following screen is displayed.
Select the source and destination drives. Select the source and destination drives
S e l e c t Source and Des t inat ion Driues.
source IE Dest inat ion C:
Source Destination : Drive to install the GPP functions
: Drive where system disk 1 is inserted [Enter]
3-5
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
,.._. The screen shown below is displayed. Select language for installation. Select the language for installation.
[Enter] I
Check system disk 1 is inserted.
1 [Enter]
Change the installation destination directory.
4 [Enter]
I Select automatic setting of the start-up environment. I I I
I I 1
See (2) (a) about the "Y" selection. See (2) (b) about the "N" selection.
I Select Y or N.
(System disk in;tallation starts.)
.....
.....
If the hard disk's available space is insufficient, the message shown below will be displayed. and the install operation will be aborted.
I I n s u f f i c i e n t disk space. I ?lore t h a n 9MB of free HD s p a c e r e q u i r e d .
The available area required in the HD is as follows: 1: JAPANESE/ENGLISH 12 MB 2: JAPANESE 9 MB 3: ENGLISH 9 MB
~~~ __
The SWOIVD-GPPQ and SWOIVD-GPPA are different software packages and must be installed separately. SWOIVD-GPPA is not deleted when SWOIVD-GPPQ is installed.
The following message is displayed.
Insert Systsn Disk i<SWIUD-GPW 113) i n t o Drius 8 :
Press any key when ready.
Set the directory from the following screen.
Change Systen Directory?
[C :\GPWSY S- 1
Any directory can be set, but "\GPPQ\SYS" is required after it. (If omitted, "\GPPQ\SYS" is automatically appended.) Press [Enter] key to proceed without changing the directory.
Install the system disk data according to the on- ..... Follow the instructions displayed on the screen to install system disks 2 and 3.
System disk installation ends.
................................ After CONFIG.SYS is changed, use the GPP functions after resetting and rebooting the computer.
3-6
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(2) Setting the Start-up environment
Environment settings using CONFIG.SYS are required before start- ing the GPP functions.
(a) Automatic set-up
The following message is displayed during installation of the soft- ware package.
~~
Gets Enuimnmnt Uariables - r Modifies WNPIG.SY6. I Perforn Modification<Y/W3? 1 Press [Y] then [Enter] to change FILES (number of files) in CON- FIG.SYS to 30. However, if FILES is already greater than 30, no change is made and the original data is used. The CONFIGSYS settings before the changes are saved as CON FIG.ORG. Note that any existing CONFIG.ORG file is overwritten.
(b) User set-up
The user must set the GPP function start-up environment if "N" is selected in response to the message prompting whether to make the automatic settings after the software package is installed. The following CONFIG.SYS, AUTOEXEC.BAT settings are required to start up the GPP functions.
<ExamDle>PC-DOS Ver. 5.0
[CON FIG . SY SI FILES=30 BUFFERS=20 DOS=HIGH, UMB" COUNTRY=081,932, C:\DOS\CONTRY.SYS SHELL=C:\DOS\COMMAND.COM /P /E:512 DEVICE= C :\DOS\$ FONT.SY S /24=ON D EV I C E=C :\DOS\H I ME M. SYS
D EVICE=C :\DOS\DISP.SY S DEVICE=C :\DOS\$I AS.SYS DEVICE=C:\DOS\ANSI.SYS /X
DEVICE=C:\DOS\EMM386.EXE 4096 RAM FRAME=E000"
[AUTOEXEC.BAT] @ECHO OFF C:\DOS\SMARTDRV.EXE /X*3 PATH C:\WINDOWS;C:\DOS;C:\ SET TEMP=C:\TMP SET DOSDIR=C:\DOS
'1 : XMS manager (required for EMM386SMARTDRV) '2: Reserve 4 MB for EMS '3: Enable the disk cache.
3 -7
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(c) Batch files
To start up the GPP functions, copy the following GPPQ.BAT batch file to the root directory. The drive name is replaced by the drive name designated during system installation.
[ G P PQ. BAT] C: CD C:\GPPQ\SYS GPPQ.EXE
(3) Cautions about environment set-up
(a) A minimum of 540 kbytes free space is required in main memory.
(b) The conditions that have to be set in the CONFIG.SYS file to start
Execution speed increases if more free space is available.
up the GPP functions are as follows: FILES: 30 or more No other specific settings are required.
(c) It is not necessary to incorporate PRINT.SYS (printer driver) and RSDRV.SYS (PC communications driver) into CONFIG.SYS. They are included in the GPP functions.
(d) Incorporate PRINTSYS into CONFIG.SYS to make hard copies.
(e) More than 4 MB of EMS memory is required. Configure your memory settings according to your system.
3 - 8
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.3.3 Starting the GPP functions
This section describes how to start up the GPP functions installed on the IBM PC/AT hard disk.
START (7 Turn ON the IBM PC/AT.
I
3. N e w from PG... 4. W S F C Honitor 5. C W Diagnostic 6 . Quit
3-9
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
Cause
Corrective action
3.3.4 Corrective action when an error occurs
The system floppy disk or hard disk is damaged.
Replace the system floppy disk or hard disk.
(1) Corrective action if the GPP functions cannot be installed.
Cause
A message during installation indicates that the floppy disk is not a master floppy disk.
Incorrect directory designation.
Cause I Installation from a copied floppy disk.
Cause
Corrective action
Functions were installed with the copy command instead of the INSTHD command.
The system floppy disk for the GPP functions is copy-protected. Correct installation is not possible from a copied floppy disk. Reinstall from the master floppy disk.
Installation stops and a message indicates that insufficient free space remains on the hard disk.
Cause 1 The hard disk is too full to install the GPP functions.
Installation of the GPP functions requires at least 8 MB free space on the hard disk. Move user data to floppy disks to ensure sufficient free space on the hard disk. Corrective action
Directory designation cannot contain special symbols, such as: "\", ":", or "2".
Designate the directory using alphanumeric characters. Corrective action
(2) Corrective action if the GPP functions will not start up
The functions cannot be correctly installed using the copy command. Install the GPP functions again by executing the "INSTHD" command. Corrective action
A message indicates that the main memory area is insufficient on start-up, or system goes out of control during GPP function operation.
Insufficient free space in main memory (540 k byte min.) I The "BUFFERS" item is set to 20 or less in CONFIG.SYS Cause
Corrective action
Use the MEM or CHKDSK command to check the main memory free space.
Use the TYPE command to check the CONFIGSYS settings.
Delete unwanted drivers i f the main memory free space is insufficient (see the description of CONFIGSYS in Section 3.3.2).
How to check the CONFIG. SYS settings. C :\TY P E CONFIGSYS
FILES=30 BUFF8ERS=20
: -Z___ BUFFERS size
If the BUFFERS size is set to 20 or less, use the EDIT, EDLIN, or TE command to modify the CONFIGSYS contents.
3-10
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.4 Creating Programs
Use screen operations after starting GPPQ.
"Initial Setting screen" I 3!vEmmP 3. N e w from PG.., 4. M A P C Honitor 5 . CPU Diagnostic 6. Quit - I
1 [l] Select "Create,.."
To Section 3.4.1
3.4.1 Selecting CPU type used and setting file
The following screen is displayed after "Create ..." is selected above. Press the key corresponding to the CPU type used. In this example, Q3ACPU is selected.
I b e . 2.c > 92861 I 3.c > Q38
> I "CPU type select screen"
4
[3] Select "QSACPU"
I [Ente
I 4
Do you want t o execute File Setting?
No<N>
I I
[N] Select "No" I I
[Y] Select "Yes"
2) 1)
3-11
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
VJ CC:\GPPQ\USR 1 y t s n [I-LINE 3 Title CTmNSFER 1
3. tlaachins CC 1 Title CCOMlEYOR 1 4. File C F C 1 Title CQ-CPU 1
Cancel<N>
4
"File setting screen"
The characters and symbols used in the system name, machine name, file name, and titile are unrestricted.
The system name doesn't exist. Do you want t o create it?
No<N>
I I
; The following dialog box is ; i displayed i f the system name \ ; already exists. 6
[Y] Select "Yes" IN] Select "No" I . Return to the CPU
"Processing" is displayed. type select screen.
Do you want to create It?
L _ _ _ _ _ _ _ - - _ - - - - - - - - - - - _ _ _ _ _ - - - _ - - J
3)Parane t er WDeu ice 5 /0n- l ine 6/PC D i a g n o s t i c 7#Do c une n t at i o n 81Pr i n t er 9/P i l e Maintenance h5/Progr.am hW?Ft%t f.an E11 n i t i a l S e t t i n g WOpt i o n D1DOS
P/Quit
"Mode Select screen"
3-12
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.4.2 Programming in ladder mode
The procedure for programming in the ladder mode is shown below.
(1) About the program
The program created to automatically run the conveyor is shown in Fig. 3.2.
(2) Description of operation
The operation of the program to automatically run the conveyor is outlined below. When the workpiece (pallet) stops in front of the conveyor, a warning buzzer sounds for 3 seconds and the conveyor automatically starts. The conveyor stops after it has transported 6 products onto the workpiece. The workpiece is automatically transferred to the next process, the products unloaded, and then returns to the position in front of the conveyor. The flowchart for this procedure appears as follows.
< Start > RUN enable button ON
Yes I I
Operate instruction, sound buzzer
1 3 seconds
since workpiece moved?
> Run conveyor, stop buzzer
6 products transported?
Stop conveyor
3-13
3. OPERATING PROCEDURE USING THE QnACPU -MELSEC-QnA
i j h~!':alI CPLS HB >- I-
Y 7 1 1, <Y78 >-
<TB >- TB I CY71 X x3 K6
<CB >- CRST CB I-
K38 7:
I I Y71
CHCR NB 1-
LEND 1-
(3) Allocation of devices
Operation Operation comm< record
Buzzer output
Warning timer
Conveyor operat
Product count
Count reset
XO. . . . RUN enable button 0 X1. . . . STOP button
X2. . . . Work sensor 0 X3. . . . Product sensor mY70. . . Buzzer output
Y71. . . Conveyor Operation
0 MO . . . . . Operation command 0 M1 . . . . . Operation record 0 M10 . . . . Operating enable 0 M11 . . . . Record operation enable
TO. . . . . . Warning timer 0 CO. . . . . . Product count
Fig. 3.1 Automatic Transport Equipment
Program for automatic conveyor operation (4)
I " Y 3
6
9
13
31
36
37
enable I
Fig. 3.2 Program for Automatic Conveyor Operation
3-14
3. OPERATING PROCEDURE USING THE QnACPU M E LS EC-Qn A
(5) Programming procedure
The program is created using ladder symbols. Operation starts from the mode select screen.
3/Paranater WDeu ice 5/0n -1 i n e 6/PC D i a g n o s t i c 7/Docunentat ion 8 /Pr in t er 9 / P i l e Ma i n t e n anc e &/Program Berrek=.i*L iralrr B / I n i t i a l Sett i n s W0pt ion D/DOS
I P/Quit
"Mode Select screen"
[l] Select "Ladder"
"Ladder Write (insert mode) screen"
3-15
3. OPERATING PROCEDURE USING THE QnACPU M ELSE C-Qn A
It is unnecessary to write MC contacts in the bus line. They are displayed on the screen after pressing [F4] (Convert) key followed by [F2] key to select the
[Key input sequence (a) to (w)]
(a) I F51 [XI [OI [Enter] (+)
(b) [F61 [XI 111 [Enter] (*I
(c) [FBI [MI [CI PI [NI 101 [SPI [MI 111 101 [Enter] ({E)
(d) [Shift] + [F5] [MI [l] [ l ] [Enter]
(e) [+] It] [Insert] [Shift] + [F9] [Enter] [k] [Insert] (overwrite) ( 1 ) (insert)
(qp)
[F7] [MI [ l ] [l] [Enter]. . . . . . . . . . . . . Create vertical line in the (ib) overwrite mode
3-16
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3-17
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3/Parameter 4 /ku ice WOn-line 6/PC Diagnostic ?/Document at ion 8 /Print: e r P/P i l e Ma in t e n an c e n+ak*sg)-3*arn Gensz*nB; fan W I n i t i a l S e t t i n g
D/DOS
lF/Quit
C/Opt ion
3.4.3 Appending comments to devices
1 Operation from the mode select screen. To conduct further operations after creating a sequence program, press [ F l l ] key to display the mode select screen.
"Mode Select screen"
[7] Select "Documentation"
Device
x e x i x 2 x 3 x 4 x 5 X 6 X ? X 8 x 9
X B x c X D X E X P x ia x I1
x n
Comment
[Omrat ing Enabla 12345638901234567890i23456389012
[Si0 - rworR Sensor [Product Sensor I r I c c r
c 1 r I I 1 c I r 1 c 1 I 1
[Input XO comment]
[Input XO device label]
[Input X1 comment]
[Input X1 device label]
[Input X2 comment]
Similarly, create the X3 comment
101 [PI [el [rl [a1 [tl [il [nl tg1 [El [nl tal [bl [I1 [el
[Tab1 [PI [BI [11
[Tab1 [SI [tl to1 [PI
[Tab] [PI PI 121
[Tab1 [WI [OI trl [kl [SI [el tnl [SI to1 [rl [Enter]
"Documentation screen"
3-18
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
[F l ] Device
I I. D:u:e CY78 1
Cancel<N>
[Input device designation] [Y] [7] [O] [Enter] . . . . . . . . . . . . . . Designate Y70
1 [Y] Execute
"Documentation screen"
3-19
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
IC:\GPPQUISR I LINE 1 Tit le [TRANSFER 1
I Title EcoMlWOR 1 4- P i l e IPC 1 T i t l e EItCPU 1
3.4.4 Saving program to hard disk
"Write File screen"
The system name, -7
I I
r - - - - - - - - - - - - - - - - -
Save the sequence program created in Section 3.4.2 to the hard disk. This operation starts from the screen displayed after conversion.
"Ladder Write (insert) screen"
5. Target I.[*] Parameter Z.I*I SequenceAFC Program 3.111 Dauics Col l sn t
Cancel<#>
[Ah] Menu
I
I machine name, and file ; name set in Section 3.4.1 are automatically
I
[l] Select "File"
2/Write.. . 3#Conpare - . . 4/New. -. 5 / P i l e L i s t . . &'Delete. -. 7#End. - - 8#Hacro R e g i s t r a t i o n . . . P/Us i n g Macro.. . A/Hacro Reference.. . W L i b r a r y R e g i s t r a t i o n -. . C/Using L i b r a r y . I I D#Ladder Pat R e g i s t r a t i o n ... E/Us ing Ladder P a t t e r n ...
"File access screen"
[2] Select "Write"
3-20
3. OPERATING PROCEDURE USING THE QnACPU M E LSEC-Qn A
[Y] Execute
T h e f i l e 'PARRtlCParaneter>' a l r e a d y exists. Do you want t o overwrite it? I I No<N>
POINTI The following system name, machine name, and file name defaults are used if no file is set:
0 System name [SYSTEM] 0 Machine name [KIKAI-Gl] 0 File name [MAIN]
The default drive and path is "C:\GPPQ\USR". I I
3 -21
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
0 -
3.4.5 Convenient functions for programming
The parallel coil, line, and cut and paste editing are convenient functions for programming in the ladder mode.
(1) Parallel coils
When coil-equivalent instructions (+!-,<>) are input, the vertical lines and parallel coils are created automatically to create a ladder block. The ladder block below was created using parallel coils.
operations in the ladder write (insert) mode; r - - - - - . - - - - - - - - - - - - - - - - - - - - - - - - - -
L - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Y 7 l
I ' [SET Y?; 4 [Key input sequence (a) to (d)]
(a) IF51 [XI P I [Enter1
(b) tF71 [VI VI [OI [Enter]
(c) [+] [?] [F7] [Y] [7] [ l ] [Enter]. . . . . . . . . . . . Write parallel coils
(d) [+I [TI [F~I [SI [E] [TI [SPI [VI [71[21 [ ~ n t e r i . . . . . ( i ? l . . . . . . . . . . . . . . . . . . . . . . . . . . . Write parallel coils
(+)
(+k)
(+!-I
(e) [F4] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Convert (Convert)
(2) Lines
A ladder block can be created using lines. The ladder block below was created using lines.
3-22
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3) [+I [+I [+I [Enter]
4) [TI [+I [+I [+I [Enter]
\
(Designate copy destination)
(Designate copy destination)
(Designate copy destination)
(Designate copy destination)
5 ) [+-I 14-1 [+I [Enter]
6) [&I [Enter]
7) [k] [Enter]
(a) Provide space before the END instruction for the ladder
Copy line (2)
a [Shift]( ; JFS] [3] [Enter] Reserve space for write operation
(b) Draw lines as shown in the diagram below.
14 : : I 2 ) l
[Key input sequence 1) to 8)]
3 -23
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(c) Write contacts and coils on lines r - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1
1 Operations in the ladder write (overwrite) mode.
: cancel the line mode and press the [Insert] key to select the ' ladder write (overwrite) mode.
I
To continue after operation (b), press the [Esc] key three times to : I I
I
L - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - J MO ')
H1 5, M4 6)
HZ 9 H5 10)
[END
[Key input sequence 1) to 14)]
It is also possible to first draw the contact and coil instruction symbols and subsequently draw the lines. In this case, lines cannot overwrite instruction symbols.
POINTS
Horizontal, vertical, I line, and I lines can be drawn by a single operation. Rectangles, 1 lines, and I lines cannot be drawn using a single operation.
0 Lines can be copied to any position by designating the destination. 0 Lines and contact positions can be drawn as required. Line lengths
and contact positions are corrected during conversion.
3 -24
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(3) Cutting and pasting
Parts of ladder programs can be cut and pasted. The cutting and pasting operations can be conducted in the following units: 0 ladder lines 0 ladder blocks 0 ladder program sections
(a) Cutting and pasting ladder lines
These operations are possible by selecting Edit from the menu or by selecting the ladder edit (insert/overwrite) mode with the func- t ions keys.
1) Operations by selecting Edit from the menu 1 r - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I Select the ladder write (insert/overwrite) mode. (The opera- : tions are also possible in the ladder edit (insert/overwrite) I mode.)
e Cut [Alt] --+ [5] -+ [l] -+ [?]/[.L] -+ [Enter]
I
I
L _ _ _ - _ _ _ _ _ _ _ _ _ - _ _ _ - _ - - - - - - - - - - - - - - - - - - - - - - - - - J
(Menu) (Edit) (Cut) (Designate start) -+ [&I/[?] + [Enter]
(Designate range) (Cut)
0 Paste [ ~ l t i -+ [SI -+ [31+ [?i/[.Li (Menu) (Edit) (Paste) (Designate paste destination) + [Enter]
(Paste)
0 Conversion [F4] (Convert)
with the functions keys
Cut
2) Operations by selecting the ladder edit (insert/overwrite) mode
[Shift] + [F l ] + [?]/[dl -+ [Shift] + [F6] (Edit) (Designate start) (Select line)
-+ [~I/IJI -+ ~ 7 1 (Designate range) (Cut)
Paste [.Ll/[?l -+ ~ 9 1 (Designate paste destination)(Paste)
0 Conversion [FI] + [F4] (Write) (Convert)
(b) Cutting and pasting ladder blocks
Operation by selecting Edit from the menu.
L - - - _ - - - _ _ - - - _ _ _ _ - - - - Select the ladder read mode;
0 cut
r - - - - - - - - - - - - - - - - - - - -
[Alt] -+ [5] -+ [ l ] -+ [?]/[J] -+ [Enter]
-+ [&]/[?I -+ [Enter] (Menu) (Edit) (Cut) (Designate start)
(Designate range) (Cut)
(Menu) (Edit) (Paste) (Designate paste destination) 0 Paste [ ~ l t i + [51 -+ [31 + [?I/[.LI
-+ [Enter]
Not required (Cut and paste changes are directly reflected in memory when [Enter] key is pressed.)
(Paste)
Conversion
3 -25
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
The "Close up" setting affects the program after cut and paste, as follows: "Close up" set. . . . . . . . . . . . The part where a program is cut is closed up.
(The number of program steps remains unchanged after the editing .)
The part where a program is cut is not closed up but filled with NOP instructions. (The number of program steps after the editing increases by the number of steps cut and pasted.)
Method for closing up . . . . . [Altl + [81 + [4] 4 [11 [ l ] Close up the program after
121 Do not close up the program conversion.
after conversion.
1 The default is "Do not close up".
(c) Cutting and pasting ladder program sections
Operations by selecting the ladder edit (insert/overwrite) mode with the function keys
0 cut [Shift] + [F l ] -+ [?]/[l]/[t]/[-+] -+ [F6] (Edit) (Designate cut position) (Select)
-+ [Wi/[+i/[+i + ~ 7 1 (Designate cut range) (Cut)
(Designate cut position) (Paste)
(Write) (Convert)
Paste [W[J iwi / [+ i + ~ 9 1
.Conversion [F l ] -+ [F4]
After cutting a pasting a program section, write the vertical and horizontal lines in the program section before conversion. Other- wise, a message will be displayed indicating that the ladder pro- gram is incomplete.
A cut operation alone is equivalent to deleting ladder blocks, except that the cut ladder
A paste operation after a cut operation is equivalent to copying the cut ladder blocks from
After a cut operation, pasting can be carried out any number of times. This allows the cut
Cutting and pasting are also possible for instruction lists.
blocks are stored in buffer memory.
the buffer memory to the designated position.
ladder blocks to be inserted into any number of programs.
3 -26
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(d) Examples of cutting and pasting
As an example, cutting and pasting will be shown for the ladder program below. All operations act on units of ladder lines. The three lines at 1) are cut and pasted after ladder block 2). The operations are carried out in this example by selecting Edit from the menu.
1 Operations in the ladder write (insert/overwrite) m o d e l r - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
L - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0
r' p I
2) i I I I 1
I I L.
31
36
37
[AM [51 [I] [.11 t.11 [ ~ n t e r l [.11 i.11 [Enter]. . The three lines at 1) are cut. (Menu)(Edit)(Cut) (Designate cut start) (Designate range) (Cut)
K6
[MCR NO 1.
[END )
1 I I I I I I
I I I I I
J
3-27
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(1 1
[Alt] [SI [3] [J] [J] [Enter] . . . . . . . . . . . . . . . . . (Menu) (Edit)(Paste) (Designate (Paste)
paste destination)
Paste after ladder block 2)
3 [HCR NO
[END
n
[F4] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Convert (Convert)
1 Editing complete I
Press [FlO] (Undo) key in the ladder write (insertloverwrite) mode during a cut or paste operation to revert to the previous status (to change the cut or paste destination). Only the previous operation can be undone. The undo operation is not possible after conversion. No undo function is available for cut and paste operations on units of ladder blocks in the ladder read mode.
3-28
3. OPERATING PROCEDURE USING THE QnACPU M ELSEC-QnA
3.5 Operating the CPU for Monitoring and Testing
After setting the switches and internal clock, the program created in Section 3.4.2 is written to the CPU and the CPU is operated to monitor and test the program.
3.5.1 Preparations for operating the CPU
Connect the connectors and set the switches (1) to (3) in the diagram be-
Connect the battery
The battery is unconnected when the CPU is shipped from the factory. Connect the battery, ensuring that the polarity (positive and negative) is correct.
Set the switches
The system setting DIP switches and the RUN/STOP key switch have to be set.
(a) Setting the system setting DIP switches
Set DIP switch #4 to the OFF position. DIP switch #4 disables writing to the CPU and control instructions. It must be set OFF to remove this protection. All other DIP switches can be in either position.
Set to the STOP position.
1 (b) Setting the RUN/STOP key switch
Connect the RS-422 cable
Connect the cable to the RS-232C/RS-422 converter connected to the IBM PC/AT RS-422 connector.
3-29
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(4) Set the QnACPU internal clock
Set the QnACPU internal clock to the current time using operations from the mode select screen.
"Mode Select screen"
3/Paranet er W D e v i c e 5 f On -1 i n e 6 f P C D i a g n o s t i c ?/Documen tat ion 8 f P r i n t er P f P i l e Haintenance &#PPU$p-am Gen*r=aL-iran W I n i t i a l Set t ing C f O p t i o n D/DOS
F f Qu it
[6] Select "PC Diagnostic"
2.< 3 O f f - l i n e I '
[VI Execute
_. - _ _ .. . ... . . - . . r -
I
"PC Diagnostic screen"
3 -30
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
[Alt] Menu
[2] Select "PC"
2/13%1.Ee,,, 3 /C<f wga P% - .. .1
4/New - - I 5/File L i s t . I I
C/Connection S e t t i n g . . . 7/Remote Operation.. . 8/Cle a r Fault H is t ory 9/Time Se t t ing
I [9] Select "Time Setting"
"PC communications screen"
Input Current I. Date 196-84-27 1 96 -84-2 7 2 . T i m e [13:15:681 12:88:ii
3 . Stat ion t o Execute
3 . < > Speci f ied Group 1
Cancel<N>
"Time Setting screen"
Setting the date
Setting the time
Set the time and date for the current designated station (connected PC).
[SPI [91[61[-1 [OI [41[-1 PI [71 [ ~ n t e r i
[SP] [I] [3] [Shift] + [:] [ l ] [5] [Shift] + [:] [ O ] [O] [Enter]
[SPI (111) VI
3 -31
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(5) Format QnACPU internal RAM
format the QnACPU internal RAM using operations from the mode select screen.
WSPC 1 "Mode Select screen"
J/Parame t er 4tDe u ice 5/0n-line WPC D i a g n o s t i c 7 tDocunenta t ion 8/Pr in t e r ? / P i l e Haintenance
E A nit ial Setting C/Opt ion D/DOS
P/Quit
8 Y'ElPS 8kW&4fi f . h E 1% L L#fE
I 4
[5] Select "Online"
I I Interface RS232C <---> W C P U 1arget PC Network:@ S t e :PF PC Typs:Q3f1
[Alt] Menu
"Online memory select screen"
[Z] Select "PC"
3-32
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
B/Conpare.. . 4 M s w . I. 5/Pils List . . - C/Connection Setting. .. 7/Remte Operat ion.. . 8Mrite Option. -. Y/Rswiatsr Password.. . WGlear a l l Deuice Cbmoriss.. . B/PC nun Batch Processing ... C/Delete. -. D A i t l e Statement Daf . . .
"PC communications screen"
[B] Select "PC Mem Batch Processing"
t - - 8
3.< > fill Read 4.< > b l l U r i t e S.< > Pornat<with Option)
1- Cancel<N> I
[2] Select "Format"
[Y] Execute
Do you want to format internal R l t l ?
Yss<Y>
I [Y] Yes
3-33
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(6) Clear the QnACPU latch devices
Clear the QnACPU latch devices using operations from the mode select screen.
3)Parans t er 4/De u ice 5 /On- l i n e C/PC D i a g n o s t i c 7/90 c une n t at i o n 8 /Prin t er ? / F i l e Maintenance &/Prog1=.aro R;ensl%L fraar B / I n i t i a l S e t t i n g C/Opt i o n D/DOS
"Mode Select screen"
P/Qu it
I 1
[5] Select "Online"
"Online memory select screen"
Netuork:B Sta :PP PC Type:Q3R
2 IC C a r d A < m > 3 IC C a r d B<RAt4> 4 I C C a r d B < M >
[Alt] Menu
[2] Select "PC"
3-34
3. OPERATING PROCEDURE USING THE QnACPU M E LSEC-Qn A
I B i t e ... I 3/Compars.. . 4 R ( e w . . . S / P i l e L i s t . . . L/Connection Setting.. . 7/Fknote Operation.. *
8/Write Option.. . P/Rsgister Password... AAlcar a l l Dcuice Remries.. . B/PC Hem Batch Processing ... C/Dalete. . . D f l i t l e Statement Des.. -
"PC communications screen"
4
[A] Select "Clear all Device Memories"
"Clear all Device Memories screen"
l.<*> All F i l e s 2 - < > The Fol lowing P i l e
Driue C 1- P i l e HameC 1
Cance 1<N>
[VI Select "All Device Mern (Including Latch)" and execute
I I Do YOU w a n t t o clear a l l of Device Memories ( i n c l u d i n g Latch)?
I Yes<Y> I
[VI Clear all
~~~
3-35
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(7) Clear the QnACPU fault history
Clear the fault history data in the QnACPU internal RAM memory us- ing operations from the mode select screen.
I "Mode Select screen" 1- S / L i s t 3RParanet er 4fDeu ice 5/0n- 1 i n e 6/PC D i a g n o s t i c 7 /Docunentat ion W P r i n t er P r F i le Plaint enance W/Brogr*atn Genz:r*t h a € B / I n i t i a l S e t t i n g
D/DOS P/Quit
C/Opt
I [6] Select "PC Diagnostic"
I
[VI Execute I
"PC Diagnostic screen"
3 -36
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
Do you want to delete?
No<N>
1)
I I
[Ah] Menu
[2] Select "PC"
6/Connection Setting.. . 8fClear Fau It History P/Time Sett ing WConnect U n i t
"PC communications screen"
[Y] Clear
(A)
3 -37
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.5.2 Writing program to CPU
3/Parameter 4/Deu ice WQn-1 i n e 6/PC D i a g n o s t i c 7/Doc ume n t at ion 8/Printer ?#File Ha in t en ance BIJjPE"0SPlrn CsneP3.t i o n B/ I n it ia 1 Set t in g C/Qpt ion D / D S
,?/Quit
Write the program created in Section 3.4.2 plus the comments created in Section 3.4.3 to the QnACPU using operations from the mode select screen.
; Set the QnACPU RUNETOP key switch to the STOP position. -1 r - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
L - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ~
B/SFC
2/List
"Mode Select screen"
[5] Select "On-line"
In ter face RS232C <---> QnACPU Target PC Platuork:B S t a :I" PC Typs:Q311
Target Henory Contents T i t l e
3 IC Card B<WlH> t 1 4 IC Card B<Ron> c I
"On - I i ne memory select screen"
[0] Select "Internal RAM"
3-38
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
I n t e r f a c e RS232C <--- > pnncw T a r n e t Hem I n t a r n a l Rtlt4 T i t le 1 T a y r s t PC Network:@ S t a :PP PC Typo:Q3tl
3 PC Comment 132 96-84-27 17114 CQ-CPU 3
F i l e s :3 M I X Cant: 331776 Bytes Free Space: 335812 B y t e s
[F l ] Write PC
I n t e r f a c e RS232C <--- > ncm Target PC Network : B S t Z i o n : PF F'C Type : 43h
et b b n I n t e r n a l R(lM Title I 1 I.%% I. F i l s Name IPC 1 T i t l e I I
2. 1st 1. C * l Parameter 2.Ca1 S e q d P C Prog l.<*> Whale Range t 11 S t e p
2.< > S t e p Range I 1-c 1 3.< > S t e p Range P t 3 - C 1 4.< > Black Range E 1 - 1 I
2 < > S cif ZRC I-[ 1
2 . < > S p e c i f y Detail Range
Cancel<W>
6.1 1 F i l s Register l.<*> Whale Range
2 . Dev ice Hem 1.C 1 I n t e r n a l I:<*> &le Lnge
"On-line screen"
"Write to PC screen"
0 Write destination is internal RAM.
0 The PC selected with "Create ..... is automatically displayed as the file name.
The default values are automatically set for the write data parameters and sequence program (Whole Range). Add device comments as write data and write them to the QnACPU. ISPI ~1 ISPI 131 IYI
A message is displayed in the message field during writing to the PC and another message indicates when the write operation is complete.
4
Return to the online memory select screen
POINT 1 The QnACPU will not run when the key switch is set to the RUN position immediately after a new program is written to the QnACPU. The program is first checked and a message is displayed, as follows:
First set to RESET, then to RUN.
Q2A(-S1) .......... RUN LED flashes Q3A, Q4A ......... "PRG.CHECK!!" displayed
3-39
3. OPERATING PROCEDURE USING THE QnACPU M E LSEC-Qn A
I
3.5.3 Operating the CPU for monitoring
screen" r - - - - - - - - - - 1
{Check the file ;
Read the program (written in Section 3.5.2) from the QnACPU before oper- ating and monitoring the QnACPU.
(1) Read the program from the QnACPU using operations from the online memory select screen.
I
I lnterf ace RS232C <---> Qnncpu Target PC Netuork:E Sta :FP PC Type:9311
"On-line memory select screen"
[0] Select "Internal RAM"
"On- li ne
Interface RS232C <---> PnncPu Targst PC Netuork:B Sta :PP PC Type:Q3A Target tien Internal RLR Title
_ _ _ _ _ ~ Tine Title ~
;data type. ; PC Comment 132 96-84-27 17:1+ CP-CPU 1
P i l e s :3 RllX Cont: 331776 Bytes Pres Space: 335872 Bytes
IF21 Read PC
3-40
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
I. [*I Paranaster 2.[*1 Scq/SFC Prog
3.t*1 b u i c e Connsnt . 3.C > Step Range P C 4.C 1 Iku I n i t Ualua 4.< > Block Ranee c 1
I.<*> Whole Range 2.< > Step Range c
- 5.1 1 SirulTtion Data
1.C I Internal I.<*> Whole Range 2 < > s c i f me I:<*> &e Knge 2.< > Specify D e t a i l Range [ ]Pay
Cancel<N> 2.1 1 Link b m r y 3.t I Buff
I 1
I- c I I - c 1
- [ 1
I-c 1
Setting the file name as "PC". PI ISPI [PI IC1
"Read from PC screen"
Read program from QnACPU, excluding device initial values and file register data. mi [ ~ a b i ISPI 141 [51 [VI
A message is displayed in the message field during reading from the PC and another message indicates when the read operation from QnACPU is complete.
Return to the online memory select screen
3 -41
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(2) Monitor QnACPU using ladder monitor operations from the mode select
B/S FG INLadder 2/List 3NParameter
f 1 ] Select "Ladder"
[F3] Monitor
"Ladder Monitor screen"
Use the registered device monitor to monitor the contents of a word device which is not displayed on the ladder monitor screen. The example below monitors the counter CO.
Registered device monitor: [F9] ISPI [CI [ O I [Enter] ISPI ( I l l ) [VI (Registration) (Counter CO) (16-bit)
3-42
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
[Actual System Operation I Watch the ladder monitor screen and confirm the following operations.
1) Turn ON XO to enable the master control program (from MC to MCR) and permit actual system operation. (enable conveyor operation)
2) Y70 (buzzer) lights for 3 seconds after X2 (workpiece sensor) turns ON, then Y71 lights (start conveyor ).
3) After X3 is turned from OFF to ON six times (6 products moved to workpiece), Y71 goes out (stop conveyor). X2 (no workpiece detected) turns OFF.
4) Repeat steps 2) and 3) (equivalent to cycle operation).
5) Press X1 to disable the master control program (from MC to MCR) and end actual system operation. (stop conveyor operation) Operation cannot be restarted after X I is pressed during operation. Repeat the operations from step 1) (enable conveyor operation).
3-43
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.5.4 Modifying program while monitoring CPU operation (online program change (write during RUN))
Use online program change (write during RUN) to modify a program written to the QnACPU. As an example, the timer TO set value K30 (3 seconds) is changed to K60 (6 seconds). Before modifying the program, set the "Write & Conv Setting...".
(1) Set the "Write & Conv Setting ..." to "Write into PC during RUN state." Operations from ladder monitor screen (similar to Section 3.5.3 (2)).
"Ladder M o n it o r sc r ee n "
[Alt] Menu
[8] Select "Options"
3 / A l l Clear 4:/Write & Conu S e t t i n g ... S/Monitor Target S e t t i n g . -.
[4] Select "Writing & Conv Setting...".
3-44
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
2.<*) m 2.<*> m 2. Check Double Coil at Writ ing I.< > Yes
3. Dev ice Cat lnrr at Uritinrr Ins l .< > Continue
- I 2.<*> PaU80 4- Writs During Run S e t t i n g
5 . l b n i t o r i n Writs l b d e l.< > Yes
"Write & Conversion Setting screen"
Set "Write into PC during Run state." [4] [l] [Y]. . . . Revert to ladder monitor screen.
6. Writs Target S e t t i n g i : i 1-Ladder Block
7 . Write f i t h o d at U r i t e During Run I.<*> Mobma1
I). Dise tlC on L e f t - s i d e Power Rail I.< > Yes
2. <*> Disp layed Screen
2.< > R e l a t i v e l y u s i n g P o i n t e r
2 . < e m rmmrmPa Cancel<W>
(2) Modify program Use the following operations to modify the program.
(a) [Fl] [Insert]. . . Set the ladder monitor screen to the write
(b) Press the cursor keys to move the cursor immediately in front of (Write) (Overwrite) (overwrite) mode.
K30 +TO FI
1~~~~ I 4
'~~~~ I (CO
I (CO
[TI [O] (SP] [K] [6] [O] [Enter] . . . Modify the timer TO set value. a
(c) Press [F4] key to convert the program.
A message is displayed in the message field during conversion. Another message indicates that the operation is complete and the step number was changed "Write into PC during RUN state." ends.
(Convert)
(3) Check actual system operation Follow step (2) described in Section 3.5.3 (2) "Actual System Operation" to check that the time Y70 lights has changed from 3 seconds to 6 seconds.
3 -45
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3/Parame ter 40Deu ice 5 0 h - l i n e ,6/PC D i a g n o s t i c '?/Documentation ' 8/Pr i n t e r 9 / P i l e Ha i n t e n an ce B/X.'mgFnrn d;€?asz+at?.osa B / I n i t i a l S e t t i n g WOpt i o n D/DOS
3.5.5 Registering a password
A password can be registered to protect access to the programs in the QnACPU. It can inhibit reading, writing, and display or be used to write protect the programs so that they cannot be accidentally overwritten. Operation from the mode select screen.
WSPC I- P / L i s t "Mode Select screen"
P/Quit 1
[5] Select "On-line"
I n t e r f acm RS232C <---> Qnncw Target PC W s t w r k : B
Target Hemow C o n t e n t s
2 I C Card I<Ron> 3 I C Card B<WlH>
L I I
4 IC
[Ait] Me
I [2] Select "PC"
Online Memory Select e screen"
3 -46
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3/Conpare ... "PC Communications screen" !i/Pile L i s t .. . S/Connection Sett ing. .. 7/Renote Operation. .. WWrite Opt ion. . . 9/Register Password.. . @/Clear a l l Deuica nenories.. . WPC Hen Batch Processing ... C/Pelete.. . WTit lc Statenent D e € . . .
[9] Select "Register Password"
Current I. Password C 1
2. Operation i.<*>
2.C > Cancel Password 3.C > None 4.< > Change Attr ibute
3. nenory i.C*l I n t e r n a l RllH 2. t I IC Hcmry Card 1<RflH> 3.1 1 IC Hemry Card II<ROH> 4.C 1 IC Hemry Card BU?AH> 5.C 1 IC Hemry Card B<ROn>
Canccl<N>
" Register Password screen"
The password can be designated as up to 6 alphanu- meric characters.
Register the password "123456" in the QnACPU to inhibit reading, writing, and display (default) for the internal RAM memory (default). PI 111 ~ - 1 PI [41 [SI PI 1.11 [VI
(New) (Password: 123456) (Read, Write and (Execute) Display Protect)
A message is displayed in the message field when the registration operation is complete.
3-47
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
Cuprent
2. Operation I . < > Change I 1
2.< > Cancel Password
F F B E ? g e nt tr ih te
2.C 1 I C hmry Card I<RllH) 3.C 1 IC tlenory Card fl(ROH> 4.C 1 IC Renory Card B<RAH> 5. C 1 I C Renory Card B<ROH)
1. Password E1234561 N S W
I.<*> Read-Write and Display Protect 2.< > Write Protect
3. tkmry l-C*I I n t e r n a l WFI
Cancel<N>
~OINTS I
" Register Password screen"
(1) Check the password operation after temporarily quitting the IBM PC/AT GPP functions. They password does not become effective until the GPP functions are quit.
(2) Follow the procedures below to initially set the password to access a QnACPU for which an password has been set. Repeat the operations on the previous page to display the register password screen.
Set the password and select "None" [I1
VI [SPI 1.11 1.11 [&I [.11 [SPI [VI
111 121 [31141 PI 161 (Current) (Registered password: 123456)
(Operation) (Move cursor to "None") (Select) (Execute)
A message is displayed in the message field when the operation is complete. If the password is incorrect, a message indicates that the file cannot be accessed and file access is not permitted.
(3) If the password is completely forgotten, the PC memory must be formatted, by the method described below.
A message is displayed in the message field when the formatting of the QnACPU internal RAM is complete (the memory contents have been cleared).
3-48
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.5.6 Checking responses to forced faults (PC diagnosis)
The output module is forcibly removed during QnACPU operation to simu- late the AY42 (64-point) output module falling out of the PC CPU system in Section 3.1.
(1) Check QnACPU error indicator flashing and error message display
Check that the error indicator flashes and that the following message appears in the message display window:
Display message: UNIT VERIFY E R R .
(2) Determine cause using PC diagnosis
Follow the procedure below to determine the cause of the error with PC diagnosis using operations from the mode select screen.
8/S FC 2 / L i s t
I -.
3/Parane t er 4/Deu ice 50th-1 i n e C/PC D i a g n o s t i c 7/Docunrsn t at i o n 8 / P r i n t e r P / F i l e Flaintenance WPpe,ya*an Gene ri& furs W I n i t i a l S e t t i n s
"Mode Select screen"
F/Quit I [6] Select "PC Diagnostic"
Came 1<N> I '-
[VI Execute
I 1)
3 -49
3. OPERATING PROCEDURE USING THE QnACPU M ELSE C-Qn A
1)
"PC Diagnostic I
X 8 1 2 3 4 5 6 7
X 8 1 2 3 4 5 6 7
I---
- screen"
[Ah] Menu
[4] Select "Dispyay"
3/CPU Message 4/Unit Detail Display 5/CPU P a n e l
[ I ] Select "Current Error Display"
Y L - B - l Y 28: 2 ~ 2 1 28:52:at I-- Error Unit : -1-.% O' %ki?
Guidance :Being rpecif ied by PROWTO i n s t r u c t i o n but it is not a S p e c i a l Punct i o n Unit.
"Current Error Display screen"
Indicates the module in Slot 1 of the base unit.
Cause of error
I I
3-50
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
(3) Checking the module causing the I/O module verification error
The PC diagnosis indicated the cause of the error as "Being specified by FROM/TO instruction but it is not a Special Function Unit." (unit verification error). Next, monitor the following special registers to determine the module causing the error.
Name
I/O module verification error module number
I/O verification table
- Special Register Function
Stores the 110 signal (latest number) of the module where the 110 module verification error occurred.
Stores the I/O module verification error information in 16-bit units as a bit pattern. 0 : no error 1: error
SD61
SD 1400 to
SD1431
B/SPc I- 2 / L i s t "Mode Select screen"
Monitor SD61, then SD1400. Operate from the mode select screen.
0 - (insert) screen" CMD 1-
-
3/Parame ter 4 / k u ice 5 A n - l i n e C/PC D i a g n o s t i c 7/Documen t at i o n W P r i n t e r 9 / F i l e Haintenance a /X>ra gs&m Cen sn*nt in?! B/Lnit ial Set t ing C/Opt ion D/DOS F/Quit
[ 11 Select "Ladder"
"Ladder Write
3 - 51
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
1)
I [Ah] Menu
[6] Select "Monitor/Test".
I I "Monitor/Test Select screen" 3/FM/WF C*$SC" - -
J [l] Select "Batch monitor"
CSDCl I 2. D i s p l a y Form I.<*> B i t 81 Ward
2.C > B i t Multi P o i n t s 3. C > Word H u l t i P o i n t 4.C 3 T/C Mult i -Points
1- Cance 1<N>
Set special register SD61. The display format is bit & word monitor (default). ISPI [SI [Dl t61 t11 [Enter]
(Select) (Monitor device SD61)
"Batch Monitor Device Setting screen"
I
. [VI Execute
3-52
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
Monitoring SD61 Device Monitor
hexadecimal
Indicates that the I/O number
- where verifica- . . . . - . - - - - tion error oc-
I curred was X,
[FI ] Device
I
Y40.
1 "Monitor Device Setting screen"
C S D I 4 W 1
CancslCN)
Set the next monitor device SD1400. PSI PSI [I1 [41'[01 [OI [Enter]
(Previous device No. is cleared.) - ... .
I [Y] Execute
Monitoring "Bit&word SD1400 Device
Device SM4m 8M4B.i
SDL483 sm482
Ual :Hex 8 1 2 3 4 5 6 7 8 9 A B C D E P Monitor screen"
Indicates that the I/O module verification error occurred for XY40 to 4F, XY50 to 5F, XY60 to 6F, and XY70 to 7F.
3-53
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.6 Printing the Program
Print out the program created in Section 3.4.2 plus the comments, machine names, and contact/coil destinations created in Section 3.4.3 on a PC-PR201 H printer.
3.6.1 Setting the printer and paper size
Set the type of printer used and the paper size using operations from the mode select screen.
0/S FC I- 2 / L i s t -. -~ 3/Paranster #Device 5/Qn-1 i n e 6/PC D i a g n o s t i c 7/llocunen t at i o n 8/Pr i n t e r !?/File Haintenance f4 / P m ~ P a m Ge 3l E Pile kusa B A n i t i a l S e t t i n g C/Opt i o n D#Dos
"Mode Select screen"
P/Quit
I [8] Select "Printer"
"Printer Mode
3. SPC
[ I [ I E l
4. Ladder [ I 5. I n s t r u c t i o n L i s t C 3 6 . Contact Coil C 3 7. Device Used [ I 8 . I C S e t t i n g Ualue C I 9 . Label. Dcu Cnt C 3 a- Statsnent . Note I I B. Deu &m/Init Ual C 1 C. PC Diagnost ic C 3 D. Pat, N a c , L i b C 1 E. F i l e L i s t t J F. Registered Data
screen"
Defalut is cut paper, A4 (V).
[Alt] Menu
[2] Select "Paper size"
3-54
" I I ,
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
"Paper Size Setting screen"
[7] Select "Fan-Fold Paper, 9 (H) x 1 1 (V)"
5. Instruct ion L i s t I 3 6 . Contact Coil I 1 7. Deuice Used [ I 8 . I C S e t t i n g Ualue t 3 9. Label. Deu Cnt t I L. Statenent. Note t 1 B. Deu IleWJnlt U a l I 1 C. PC Diawnostic t 3 D. Pat. Hac. Lib 1 3 E. F i l e L h t t l P. Registered Data,
"Printer Mode screen"
3 -55
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.6.2 Printing out the ladder program
Select "Ladder" as the print item, then set the print format, including print- ing conditions, printing method, whether headers and footers are added, and the print start position, using operations from the printer mode screen.
. Parameter 3. SPC 4. Ladder 5. Ins truc t ion L i s t 6 . Contact Coil 7. Device Used 8 . I C S e t t i n g Ualue 9 . L a b e l . Dsu cnt A. Statcnent. Wotc E. Deu HenlInit Ual C. PC Diagnostic D. Pat. Hac. L ib E. F i l e L i s t P. Registered Data
t I c c I I I I t t t I I
1 3 1 3 1 1 1 3 1 1 1 1 1 1
1.11 ... [J] [SP] Select "Ladder". 1 (Press 3 times)
"Printer Mode screen"
I. C o n d i t i o n l . C * l S k i Blank Line 2. [*I wit ! D e v i c e Comment I.<*> 6 1 1 Characters 2 . < > D i s lay Image
3.C 1 With g t a t e n e n t / w o t e 4.[*1 With Deuice Label 5.[*1 With Contact User I.( > A l l <User R i g h t ) 2 .< > S c i f i e d <User R i g h t ) 3 . 0 0 nE <User Under) 4.< ) S c i f i e d <User Under)
6. [=I W i t P C o i l User
2. Pornat l.<*> Standard<P C o n t a c t s ) 2.< ) S t a n d a r d < l l C o n t a c t s ) 3 . < ) Detail<') C o n t a c t s ) 4 . C ) Detail<ll C o n t a c t s ) 5 . < ) RNK <9 C o n t a c t s ) 6 . < > I N K <ll Contacts)
E 81-r 1
Cancsl<N>
"Ladder Print Setting screen"
Set the condition, format, and step print range. Set with [SP] or [?]/[&I keys.
: The default settings are: "Skip Blank Line", "No Device Comment", "No Device Label", "No Contact User", "No Coil User" , "Format:
; Standard (9 Contacts)", and "Step Print Range: A1 1".
1 r - - - I - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
: I I
L - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ~
3-56
3. OPERATING PROCEDURE USING THE QnACPU M ELSEC-QnA
1)
I [Fl] Print -- I n i t i a l 1 11
2 * < > - - * I n i t i a l [ 11-1 11 3-< > Block t - * I n i t i a l Ualue Block # - C 11 4.< > No Printing
2. Header I-< > Comon 2 - < > Per I t e m 3.<*> No
I .< > Common 2.< > Per I t e m 3.<*> No
3. Footer
4. Print Inter-line Space I.< > Yes 2-<*> No
5. Open N e w Page I.<*> Yes 2.< > No
Cancel<N>
6 . Left Uargin
7. Top Uargin C 6 ICharacter
C 2 l R o w
"Printing screen"
Set the print execution conditions. Set the left and top margins only, leaving other items as default values. Set left margin. [6] [SP] [Enter]. . . . . . . 6 characters Set top margin. [J] [SP] [2] [Enter]. . . . 2 rows
The default settings are: "Page Type = -**-", "Header: No", "Footer: No", "Print Inter-line Space: No", "Open New Page: Yes".
I I
6
[Y] Print
Executes rinting. 111 right$
I NoCN) I 1
[Y] Yes . . . Start printing
3-57
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
otion
3.6.3 Sample ladder program print-out
An example of a ladder program print-out is shown below.
€noble a opcr Dtim
A I I
Record a cnab Id 6i
I I
I
L M I 0 T NO
Cm
Enobk 1%" s opcr
3 1 y 0 31
A 2 3 I
Work a I-
I I
opmt ion co mmnc
8 I 111 I I I
I I
B
Womin q time r
I I
1 GI (Y71
C O W or ow mtion
Y71
KE co
Produc Produc t cOun t
B 1 1 1 I E
n1
convey Produc 31 ,": [RST CO
or ope I mtion 1 mun t
36 [MCR NO
3-58
3. OPERATING PROCEDURE USING THE QnACPU MELSEC-QnA
3.7 Quitting GPP Functions
Quite the GPP functions using operations from the model select screen.
B/SFC
2 / L i s t "Mode Select screen"
3 /Parame t e c 4#Reuice S/On-line 6/PC Diagnostic 7/Documentat ion 8/Pr in t er 9 I F i l e Ha in t en an ce ~,+*PPngPr?m I;*.mePaf; fnaa B/Initial Setting C/Opt ion D/DOS
P/Quit
[F] Select "Quit"
Q u i t s e d i t i n g 'C:thPC' - Do you want t o save t h e m t o the f i l e before q u i t t i n g ?
No(N> CancelCS>
1 [N] No (Quit without writing to file)
. . . DOS command prompt status after quitting GPP functions
3-59
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
AX40
4. MAKING THE MOST OF YOUR QnACPU (1)
AY40 AY40
This chapter describes methods to make the best use of your QnACPU, which differ from the conventional ACPU operations.
A62P
4.1 System Configuration
QJACPU AX40
The system configuration shown below is used for the descriptions in this chapter.
Xoo to XOF I I I
WY40 to XlY5F XlY60 to XlY7F
A68AD A62DA
Memory card: Q1 MEM-512SE
4 - 1
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
-- - , . . . ,
Initial program Scan program . . Step 0 to END Step 0 to END " . ' :;~.~;
, .: . .
4.2 Programming for individual Control Processes
-- La J , , , , , , , , ,
I . , L . .. Scan program ; ... Scan program .'.. : Step 0 to E N D , Step 0 to END ' "' I ....
, . . . .
The QnACPU handles sequence programs as files, so that sequence pro- grams can be divided up into control processes for program design. This section describes this method of programming.
4.2.1 File structure
(1) Program execution can be matched to the type of control.
Programs can be selected from four types: initial execution, scan exe- cution, low-speed execution, and standby. These programs can be set to run when required, thereby reducing the scan time of the permanently executing scan program.
{a) Initial execution (initial program)
A program executed once only when the QnACPU is set to RUN. Used for initialization.
(b) Scan execution (scan program)
A permanently executing program. Equivalent to a conventional program running from step 0 to END. Can include sub-routine programs and interrupt programs.
(c) Low-speed execution (low-speed program)
A program which is not entirely executed each scan but which is executed over several scans, using the constant scan surplus time or a set time. Used for programs run at low frequency, such as scheduled in- spection programs.
(d) Standby (standby program)
A program which is executed when a certain start condition is met, such as a sub-routine program or an interrupt program. Used when the sub-routine programs and interrupt programs are held as library data and are handled separately to the main pro- gram.
Power ON
4-2
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(2) File Management
The sequence program and other data handled by the QnACPU is managed as files. Whereas programs were conventionally handled as main programs and sub-programs, the QnACPU allows structured pro- gramming, such that each type of program can be broken down for individual programmers or processes.
Power ON F INITIAL 1
INITIAL 2
Low-speed program
Standby program
I SCHEDULE
'1 If constant-scan or low-speed program execution time is set. '2 On request
4 -3
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
INITIAL
MACH IN IN G
ASSEMBLY
4.2.2 Sample program
The example below executes the files listed in the table.
lnitia
Scan Program for machining.
Scan Program for assembly.
Program to set the initial data.
File Name I Type I Description
TRANSPORT
INSPECTION
Scan Program for transporting.
Standby Program for inspection.
MONITOR I Low-speed I Program for monitoring.
(1) Create each program and write it to the CPU. Set the RUNISTOP key switch to STOP. See Chapter 3 for details on programming and writing to the CPU.
(2) Set the parameters to execute multiple files, and write them to the CPU.
0/S FC
2 / L i s t 3/Parameter 4/Deuice 5 #On -1 i n e 6#PG D i a g n o s t i c 7#Docunentat i o n S / P r i n t e r P / F i l e Maintenance W h Y 3 3 P a m $;e rs e Fat: i o B/I n it i a l S e t t i n n - W O p t i o n D/DOS
"Mode Select screen"
[3] Select "Parameter"
4-4
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
Cur ran t S t a t u s None Def a u l t Def a u l t
4.< > Device S e t t i n g D e f a u l t 5.C > PC w1S S e t t i n g D e f a u l t ti.< > L M l l l o c a t i o n None 7.< > HELSECNETII,/It# S e t t i n g None I 8 .< > MEXSECNETAINI S e t t i n r r None 9.< > a u x i l i a r y S e t t i n g - ~ a.< > SFC D e f a u l t I B.< > XN l l l l o c a t i o n Confirm I 1- Cancel<N)
[5] [Y] Select "PC RAS Setting"
"Parameter screen"
"PC RAS Setting scree1
2 .
3-
1. S e t t i n g 2. I n i t Exec UDT C Ins 3. Slow Exec UDT C Ins
1. Bat t e ry Check <Yes> 2. Fuse Blown Check <Yes> 3. I& Unit Conpare <Yes>
I. Calculat ion <Pause > 2. Extended Ins (Pause > 3. Fuse Blown (Pause > 4. I/O Unit Conpare <Pause > 5 . S p Unit Access <Pause > 7. I C Card Operate (Pause >
Error Check
Ope-Mode at Error
6 . IC card Access <Pause >
5 . Annunciator Display b d e I . P t Display <Yes> 2. Comment Display <Mo > 3. Occurred Time <No >
I-<*> I n t e r n a l M H 2.< > Following Record F i l e s
6. Fau l t H i s to ry
Drive L: I P i l e L 1 History[ 3
7. Slow Program Exec T i n e C Ins
Cance l<N>
[4] [l] [2] [O] [Enter] Set 120 ms constant scan
1. UBI I . S e t t i n g c 2aeins 2. I n i t Exec WDT C Ins 3. Slow Exec UDT C Ins
I. Batter Check <Yes> 2. Puss d o w n Check <Yes> 3. I/O Unit Conpare <Yes>
I. Calcu la t ion <Pause > 2. Extended Ins <Pause > 3. Fuse Blown <Pause > 4. I /O Unit Conpara (Pause > 5 S U n i t Access (Pause > 7. IC Card Operate <Pause >
2. Error Check
3. Opc-tlode at Er ro r
6 : 18 C ard nccess <Pause >
1. Constant Scan i 1213ms
5. Annunciator Display )lode I. F # Display <Yes> 2. Connent Display <No > 3. Occurred T i n e <No >
l . C * > I n t e r n a l RAtl 2.C > Following Record F i l e r
6. Fault H i s to ry
Drive C 1 P i l e c 1 History1 I
7. Slow Program Exec Tine i Ins
Cancel<N>
Setting screen" "PC RAS
4 - 5
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
CiGr&nt S t a t u s 1.C > PC Nane D e f i n i t i o n None 2.C > PC S y s t e m S s t t i n g Daf ault 3-C > PC P i l e S e t t i n g D e l ault
D e f a u l t S e t None
7 . C > HELSECWETII./IB Sett ins Nons 8.C > WELsECWET~tlIHI S e t t i n g None 9.C > h u x i l i a r y S e t t i n g 8.< > SPC Default
I B.C > X/Y R l l o c a t i o n Confirm I - . C a n c s l < N >
i
[9] [Y] Se lec t "Auxiliary Sett ing"
"Parameter s c r e e n "
I C a n c e l C N ) . . I
I "Program Set t ing s c r e e n " I
7 8
18
12
E x e c u t e
< > < > < > < > < > < > < > < > < >
S e t s t h e programs t o execute S e t program #I S e t program #2
[AI [SI [SI [El [MI P I [LI VI [Enter] [Enter] S e t program #3 [TI [RI [AI [NI [SI [FI [El [RI [Enter] IEnterI S e t program #4 [TI [E] [SI [TI [Enter] [SP] [SP] [SP] [Enter] S e t program #5 [MI [O] [N] [I ] [TI [0] [R] [Enter] [SP] [SP] [Enter] S e t program #6
I 111 [NI (11 [TI [I1 [AI [LI [Enter] [SPI [Enter] [MI [AI [CI [HI [ I1 P I [El [Enter] [Enter]
4-6
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
.Ct.--
Current Status
RFEF E e
I- Cancel<N>
# -
"Auxiliary Setting screen"
1 2 3 4 5 6 7 8 9 18 11 12
Program
tINlTIBL 1 ttlllCHINE 1 [ASSEHBLY I CTRBNSPERI [TEST 1 [HONITOR 1
t 1 c 1
[ D l
C 1 c 1 c 1
Executa
<Scan> <Scan> <Scan>
<Slow>
< > < > < > < >
"Program setting screen"
Do YOU want t o resister t h e parameter?
No<n>
[Y] Register parameters
[Alt] [ Z ] [ Z ] Select "Write to PC"
4 - 7
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
4)
I 1 I1 cur1 UGC Target PC Network : B Sta t ion : FF PG Type : Q3A
Hem I n t e r n a l Mil T i t l e C 1 1. F i l e N a m e C ) Y I I W I T i t l e t 1 2. Tgt I.[*] Parameter
2 . I x l Seq/SPC Pros I.<*> Uhole Ran- C IH Step 2.< > Step Range C 1-c 1
3.C 1 Deuiee Coment 3.< > Step Range P C 1 - I 1 4.1 1 Dsu I n i t Ualue 4.< > Block Range C 1 - C 1 5.L 3 Simulation D a t a 6 . I 1 F i l s Register I.<*> Uhole Range
2. Dsuice h n I.[ 1 I n t e r n a l I:<*> u t l e #anso 2 < > s c i f Z R C 1- c 1
2.< > Specify D e t a i l Range
1. . ' Cancel<N>
"Write to PC screen"
-. . - - - - - .- - - - - Target PC Wstuork : 6 S t i t i o n : FP PC Type : 431 Target )(am I n t e r n a l RAN Ti t le C 1
1. File 1. F i l e Nane CPAJKlil 1 Ti t le C 1 2. Tgt I.[*] Paramete:
I l.<*> U h o l e Range C IH Step - 2.< > Step Range 1 1- C 1 3.C 1 Device Comment 3.< > Step Range P C 1 - E 1 4,C 1 Deu J n i t Ualue 4-< > Block Range C 1 - C 1 5.C 1 Simulation Data 6.C 1 F i l e Regis ter I.<*> Whole Range
2. Device k k n 1.t 1 I n t e r n a l I:<*> #ange 2 < > s c i f ZRt 1- C 1
2.< > Specify Detail Range - 1: . -..iEwa Cancel<N>
"Write to PC screen"
[Y] Write parameters to CPU
(3) Execute the programs ' 1
Turn the CPU key switch from "STOP" to "RESET" to "RUN".
*1 If the key switch is turned from STOP to RUN. The CPU displays a message, as follows, and checks the program.
The CPU runs the programs when the key switch is set from STOP to RESET to RUN.
Q2ACPU, Q2ACPU-SI : RUN LED flashes Q3ACPU, Q4ACPU : "PRG. CHECK!!" displayed
4-8
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
4.2.3 Program list monitor
Displays the processing time for the program executed in Section 4.2.1
3 / P a r a n e t e r 4/Deu ice 5,'On-line 6/PC D i a g n o s t i c 7/Doc unen t at i o n 8/Pr i n t er Y/Fi l e Haintenance fi /'f)Y?agram @t?rscP& <ut1 lB/Ini t i a l S s t t i n g Ci'Opt i o n D/DOS
"Mode select screen"
[l] Select "Ladder"
"Ladder Write screen"
[Ah] [2] [4] Select "Newly from PC" (Match the name of the GPPQ file with the read program name.) I
1)
4 -9
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QIIA
I I n t erf ace RS232C -- > 4nncpu Target PC Network : B S t a t i o n : PP PC Type : Q3A Target tkn I n t e r n a l RAM T i t l e C 1 I
1 T i t l e C ! R E F i . [*I Parameter - 2.C*l Ssq/GFC Program 3.C*I Deuice Comment 4.[*1 Deuica I n i t i a l Ualue 5 . C 1 S i d a t i o n Data
CancelCN)
1
&
[Ctrl] [L] Display file list
I I n t e r f a c e RS232C <---> QnACPU Target PC Metwork : 8 S t a t i o n : PP PC Type : Q3A Target k n I n t e r n a l mn T i t l e I 1 I
P i l e s 17 )#X Cont 323584 B y t e s I- Cncl<N> Pres Suace 323584 B@s=
I I
[SP] [J] [J] [J] [$I [&I [J] [SP] [Enter] Select read file
I <---> ncm 1
n t e r f a c e RS232C :aqet PC Network : B S t 2 i o n : PP PC T y p e : Q3A Target Hen I n t e r n a l RBH T i t l e C I
IIKINITOR 1 T i t l e C i.C*I Pararater 2.C*I Ssq/GPC Program 3.C 1 Device Cornent 4.C 1 Device I n i t i a l Ualue 5.L 1 S imulat ion Data
Cancel<N)
1
"Newly from PC screen"
"File List screen"
"Newly from PC screen"
[Y] Read parameters and sequence programs from CPU.
4-10
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
2)
"Ladder Read screen" (example)
1
I I
[F3] Monitor
"Ladder Monitor screen"
IAlt] [6] [6] Select "Program Batch Monitor" I
"Program Batch Monitor screen"
I Cancel<H> I
[ l ] [VI Run program batch monitor
4-11
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
S l o w
<Tima Details / Scan, c ( b )
I Prograr Exec Scan T i m Ex Tines
1 INITIAL I n i t B.i&hS l x 2 M l C H I N E Scan B.iBBns 1488 x 3 ISSENBLY Scan 8.iWns 1488 x 4 TRllNSFER Scan B.lBBns 1488 x 5 TEST Wait B.BBBns 0 x
" Program List Monitor screen" (Displayed values for this example only. Actual values may vary.)
Key to the Screen
(a) "Total Scan Time"
Displays the watchdog times set with "5 . PC RAS Setting" in the parameter mode and the total scan time for each program type.
1) "Mon time"
Displays the watchdog times for the scan programs, initial pro- grams, and low-speed programs. A watchdog error occurs if displayed scan time exceeds the CPU watchdog time.
2) "Max Scan"
Displays the total of the times displayed in "Time Details / Scan".
(b) "Time Details / Scan"
Displays the scan time details.
1) "Program"
Displays the total execution time for the scan programs.
2) "END Proc Time"
3) "Slow Prog"
Displays the END processing time.
Displays the total execution times set for low-speed programs, if low-speed program execution times are set.
4) "Wait for Con"
Displays the constant scan wait time if constant scan is set. However, "0.000 ms" is displayed i f a low-speed program execu- tion time is also set.
4-12
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(c) " Program Status"
Displays the execution status of the programs selected with "9. Auxiliary setting" in the parameter mode.
1 ) "Program"
Displays the program names in the order of the set parameters.
2) "Exec"
Displays the type of program set with the parameters.
3) "Scan Time"
Displays the actual scan time (present value). The scan time is displayed as "0.000 ms" when program operation is stopped (standby status).
4) "Ex Times"
Displays the number of executions as a value from 0 to 65536, starting from zero when measurement was started. The number of executions value is held when program operation is stopped.
4-13
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
function
Module
4.3 Easy Programming
4.3.1 Direct access of special-function module buffer memory as devices
The AGPU used FROM/TO instructions for buffer memory read and write operat ions. The QnACPU simplifies sequence programs by allowing direct access of a special-function module buffer memory as devices.
Example Accessing buffer memory addresses 0 and 10 of the special-function module mounted at X/Y40.
ACPU Write
1 l-it7[FROM H4 K1D DO K1 t
QnACPU Write Write
L
Read
Module buffer memory
Module buffer memory
Processing speed with direct access is the same as with the FROM/TO instructions. Frequently used buffer memory contents should be temporarily moved to a data register to increase processing speed.
4-14
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
4.3.2 Accessing word devices as bit units and using differential contacts
Bit designation can be used for real numbers, character strings, and word devices.
4 Onlv the designated bit of DO is turned ON.
(1) Bit designation
Handles a part of word device data as a bit device.
Example
When DO, bit 3 is ON, R3, bit 5 turns ON.
(R3.5 4 (2) Differential contact
Uses a leading edge or trailing edge as an input device.
Example At the leading edge of XO, the 16 bits of data, MO to M15, are transferred to DO. r
4-15
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
4.4 Convenient Functions When Using QnACPU
4.4.1 Allocation of optimal device points range for the system used
The number of device points was fixed with the conventional ACPU. However, the QnACPU allows allocation of the optimal device points range to suit the system used. The settings are shown in the table below.
Item
Number of devices
Latch range (latch clear key en- abled)
Latch range (latch clear key dis- abled)
Local device range
Description
Sets the number of internal device points.
Sets the latch range which can be cleared by the latch clear key.
Sets the latch range which cannot be cleared by the latch clear key.
Set the range of local devices enclosed in the a program.
Setting Range
32 k points maximum can be set for one device, in a total range of 29 k words (excluding device X, Y, S).
Only one range per device
Only one range per device
Only one range per device
Default Value
X : 8 k points (fixed) Y : 8 k points (fixed) M : 8 k points L : 8 k points B : 8 k points F : 2 k points SB : 2 k points V : 2 k points S T : 2 k points ST : 0 k point C : 1 kpoint D : 12 k points W : 8 k points SW: 2 k points
: 8 k points (fixed)
No setting
No setting
No setting
4-16
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(1) Change internal relays, M, to 10 k points, and data registers, D, to 1 k points. (DO to D500: latch clear key enable; D501 to D1023: latch clear key disable)
3/Parane ter 4#Deuice Won- 1 i n e 6/PG D i a g n o s t i c 7/Doc umen t a t ion 8/Pr i n t er !?/File Haintenance W/$z*s$parn c;SrSlo~& ksn B/I n i t i a l S e t t ing C A p t i o n D/DOS
"Mode select screen"
[3] Select "Parameter"
3.< > PC F i l e S e t t i n g Def ault 4.< > Dewice S e t t i n g D e f a u l t 5 .< > PC JWS S e t t i n g Default 6.< > I/O f l l l o c a t i o n None 7.C > BELSECNETII./IB S e t t i n g None 8.C > MELSECNETAINI S e t t i n g Nons - 9 .< > auxiliary S e t t i n g a . < > SPC Default
B.< > I N B l l o c a t i o n Confirm
Cancel<N>
[4] [Y] Select "Device Setting"
"Parameter screen"
4-17
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
Devices Tota1<28.8>K Word
"Device Setting screen (default values)"
[c] [Del] [ l ] [O] [Enter] Change internal relays (M) from 8 k (default) to 10 k. [&] ... Move cursor to data register item. I t 1 [Dell [Dell 111 Change data registers (D) from 12 k (default) to 1 k. [+] [+] [O] [+] [5] [ O ] [0] Set latch clear key enable latch range from DO to
D500. [+I [SI [OI V I [+I 111 io1 PI [31 [ ~ n t e r i
Set latch clear key disable latch range from D501 to D1023.
I &
"Device Setting screen (set values)"
Do you w a n t to register the parameter?
Mo<N>
1 [Y] Register parameter
. 4-18
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
Settablel Not
Settable
X X
X X X X X x X X
X
4.4.2 Setting device values required by the system as initial values
Settablel Device
Settable Name Devlce Name Not
T (contact) X FD T (coil) X B T (present value) 0 SB C (contact) X W c (coil) X sw C (present value) 0 G ST (contact) X R ST (coil) X P ST (present value) 0 I D 0 N SD 0 z
Device initial values preset in the peripheral device can be automatically transferred to the device memory, file registers, and special-function mod- ule when the CPU is switched from STOP to RUN. This eliminates the need for a data initial setting program.
Memory card or program memory
i - - ? 1 STOP to R A memory Device
I I \ - Setting the device initial values
To set the device initial values, the device initial value file must be stored in the CPU program memory or in the memory card. Initial values can be set for the devices listed in the table below.
Devlce Name
X Y M L F SM FX FY V DX DY
Special-func- tion module
Settablel Not
Settable
X X X 0 0 X 0 X X X X
Devlce Name
SZ S TR BL U J ZR
Settablel Not
Setta ble
Devlce Name
Settablel Not
Settable
4-19
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(1) Set device initial values: DO=O, D l = l , D2=2, D3=3, 04=4, D5=5
I 3/Parane t er , WDeu ice 5.4811- l i n e ~6/PG D i a g n o s t i c ,7 /Docunentat ion W P r i n t er 9 / F i l e Haintenance IR .em gPan cs n e Fa* io 81 B H I n i t i a l S e t t i n g - C/Opt i o n
P/Quit
I
"Mode select screen"
[4] Select "Device"
Disp1ay:IC-Bit Type : Dec h a 1 Charactsr Strin +I +2 +3 +I +5 +6 +7 f!il23456789lIBCDd
B m e m B B m.........-.... B B m B 0 B m ................
n m B B
R
0 ................ ................ ................ ................ -..-*.--.-..--.. ................ ................ 5 72 R E B E B fa B B ................ I .-
80 88 96 184 112 128
0 B B B B B
................ ................ ................ ................ ................ -..-..-..--..-..
"Device setting screen (before setting)"
[+I 111 [+I PI [+I 131 [+I [41 [+I PI Set DO=O, D1=1, D2=2, D3=3, D4=4, and D5=5. I
4-20
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
b u i c e DB
v ice 8 8 16 24 32 48 48 56 64 72 88 88 96
104 112 120
+0
0 0 0 0 0 0 0 0 B 0 0 0 0 0 0
e Dioplay:l6-Bit +I +2 +3 I 2 3 0 0 0 0 0 0 0 0 B 0 0 0 B 0 8 8 B 8 m R A - - - 0 8 0 0 B 0 8 0 B B B 8 0 0 8 0 0 0 8 0 8 0 0 0
'I y p : Dec inal +;* +6 0
0 B 0 0 0 0 0 0 0 8 0 8 0 0 8 0 0 0 0 8 8 0 0 0 0 0 0 0 8 B 0 B 8 0 0 0 0 0 0 0 0 0 0
Character St ran +7 81234567891sCDEB! 0 ................ 8 ................ 0 ................ 8 ................ 0 ................ 0 .-.--.-*.-..--.- 0 ................ 8 ................ B ................ 8 ................ 8 ................ B ................ 0 ................ 0 ................ 0 -.__..-..-..*--.
e .......... m-.--
[Alt] [5] [4] Select "Device Initial Value Range"
# I # of Deu I F i r s t Device last Device I Comment
I
[6] [+] [D] [ O ] [Tab] [Enter] Set device initial value range.
"Device setting screen (after setting)"
"Device Initial Value Range screen (before setting)"
4 - 21
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
S # of Deu
3 t 81 4 1 81 s t 81 6 1 e1 ? t e1
01 9 1 10 t 81 11 t 81 12 t 81
; :-;
e i c
F i r s t %vice Last Dsuics Cannent
1->clK 1 I->[ 1 c I->[ 1
I: I->[ 1 c I->[ 1 c I->[ 1 c I->[ 1 c I->[ 1
I->[ 1 c I->[ 3 c I->[ 1 c I->[ I
:"
Do you w a n t to register?
b < N > CancslCS)
[Y] Register device initial value range settings
"Device Initial Vahe Range screen (after setting)"
4-22
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(2) Write device initial values to PC
3)
vice 4 B 8 16 24 32 48 48 56 6 4 72 BB 88 96
104 112 128
Display:l6-Bit +I +2 *3
0 1 2 3 8 El B B B B B 0 0 B B 0 B 0 8 B B B 8 B B 8 0 8 B B 0 8 e B B B E E B e
Type :Dec +4 +5
B B s- B B B B B B 8 B 0 0 B B 0 0 B B B B 0 B e B B B B B
Character S t r i n g +6 +7 Bi23456789LBCDEP 0 0 .......... m--.- B 0 ................ e B ................
: i n a l
B 8 ................ B B ................ e B ................ 0 B ................ B 0 ................ B 0 ................ 0 B ................ 0 B ................ B B .___..--.-----.- B B ................ B B ._..----.--.---- 8 El ................ B B * _ _ _ _ * . - - - - - - - . -
[Ah] [2] [2] Select "Write to PC"
"Device setting screen"
Network : B S t a t i o n : PP Interna l RAM T i t l e I Name C P I A I W 3 T i t l e I I.[*] Parameter Z.C*l Seq/SFC Prog I.<*>
2.< > 3.C 1 Device Comment 3.< > 4.C 1 Deu I n i t Value 4 .< > 5.C 1 S i r u l a t i o n Data 6.C 1 P i l e Reg i s ter I.<*>
2.< > 1.C 1 Interna l 1 - <*>
2.< >
PC TYW : 931
U h o l e Range C IK Step
Step Range P t I - C Black Range C 1 - C
U h l e Range S cif ZRC I-[
S p e c i f y P e t a i l Range
S t e p Range C I-[
UEle #an,,
3 1
1 1
3
1
I Cancel<H> I
"Write to PC screen"
4-23
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
- 8
terface RS232C <---> QneCF'U- Target PC Hetwork : B S t a t i o n . PP PC T y w : 431 Tar et Hen I n t e r n a l RRtl Title C I
I . P i l e I. F i l e N a w CINITIlLil T i t l e C 1 2 . T g t 1.C 1 P a r a w t e r
2.C 1 Seq/SFC Pros I.<*> Whole Range [ IK S t e p
3.C 1 Device Comment 3.< > Step Range P C 1 - C 1
6.C 1 P i l e Register I.<*> U h o l e Range
2. Device Hen i.C 1 Interna l i-<*> Whole Range
2.< > S t e p Range C I-c 1
4.< > Block Range C 1 - C 1
2.< > Specify ZRC I-c 1
2.< > Specify Detail Range
Cance 1 < W > I
[Y] Execute "Write to PC"
[Deuice D@
u i c s 0 8 16 24
+B 6 6 6 B
Display: 16-Bit +I +2 +3 I 2 3 B 0 B B 6 8 0 6 6
Type :Dee i m a l + I + +6 0
B 6 6 B 6 B B
Character S t r i n +7 Bi23456789fiECDEf e .......... m.... 0 ................ 0 .------------.-. B ................
6 0 6 0 0 0 6 B ..---.---.-.-.-. g: E 0 0 e B 6 6 B 6 ................ ~~ ._ 6 0 6 0 e 6 B 6 6 0 6 0 0 B 6 B ................
0 0 6 $3 0 6 0 .----------.-..- 0 0 0 0 0 0 0 ................ pn 72 e e
80 6 B 6 6 0 E 0 B ................ e 0 8 0 6 0 B B .-------.----..* 6 B 0 0 0 B B B ................ B B B 0 0 0 0 B ___________ .____ 6 6 0 6 6 0 B e ................ :E 8 8 B 6 6 B B e ................
"Write to PC screen"
"Device setting screen"
4-24
4. MAKING THE MOST OF YOUR QnACPU (1) M ELSEC-QnA
(3) Set parameters
Set with the parameters which device initial value file is effective.
WSPC VLadder I 2 / L i s t 3HParameter
5/0n- l i n e 6/PC D i a g n o s t i c ?/Documentat i o n 8/Prin t er 9 / P i l e Maintenance n *+Pa*u $$Tam G?2 R 9 rat 5, BB B/I n it i a l S e t t i n g C/Qpt i o n R/ROS
F/Quit
"Mode select screen"
[3] Select "Parameter"
Current S t a t u s None Default
3 . < > PC P i l e G e t t i n g D e f a u l t 4.< > D e v i c e S e t t i n g S e t 5 . C > PC MS Sest ina Default 6.< > I/O f i l l o c a t i o h Hone 7.< > l l E ~ E C N E T I I . / I B S e t t i n g None S.< > ?lELSECNET/HINI S e t t i n g Mons 9.C > Auxiliary G e t t i n g a.< > SPC Dsf ault
B . < > X/Y R l l o c a t i o n C o n f i r n
Cancel<N>
[3] [VI Select "PC File Setting"
"Parameter screen"
4-25
4. MAKING THE MOST OF YOUR QnACPU (1) M E LSEC- Qn A
3. Device I n i t i a l Ualua I.< > Not Used 2.<*> Pro ram N a n s is Used .< > Program N a n e is Used
--lull I 1 L i v e CBI - - i u s I 1 Driue C 1 F i l e I 1 Pile C 1 Capacity I 1 K
ie Following F i l e s 3 . C > Use tlm Pol lou ing P i l e s
I 2
ura 3.< > Use tl I Drj
"PC File Setting screen"
2. Comment F i l e Used by I n s t r u c t i o n 4. F i l e f o r Local Deuice I.<*> Not Used I.<*> Not Used 2.< > Pro ram Name is Used 2.< > Use the Following F i l e s
3 . C > Use t h e Following F i l e s P i l e C 1 &ius t 1
Drive t 1 F i l e t 1
Drive C 1
Cancel<N>
1.11 1.11 [SPI 1.11 ISPI I31 [.111II [NI [I1 [TI [I1 [AI ILI 111 [Enter1 Set the memory card B RAM area file name to "INITIALl" I
~~- I. <*>-&t-Used 2.< > Pro r a m Name is Used Liue c I 3 . < > U s e t h e Following F i l e s
P r i u s C 1 F i l e I 1 Capacity t 1 X
briue C81
Drive C31 F i l e CINITIILll
3.<*> Use the Following P i l e s
2. Connent F i l e Used by I n s t r u c t i o n 4. F i l e f o r Local Deuice I.<*> Not Used l.<*> Not Used 2.< > Pro r a m Nane is Used Z . < > Use the Following P i l e s
3 . < > Use t h e Following F i l e s Drive C 1 F i l s C 1
& i u s c 1
Drive C I F i l e I 1
Cancel<N>
[VI Set PC file
l.< > PC Nane D e f i n i t i o n None Default S e t
4.< > Deuice S e t t i n g S e t 5.< > PC RAS S e t t i n u D e f a u l t 6:c i IAi i i i iGi t i&i &ne 7.< > ?4ELSECWECII./IB S e t t i n g None e.< > tlELSECMET/HINI S s t t i n s Hone - ?.< > A u x i l i a r y S e t t i n g R . < > SPC D e f a u l t
B.< > X / Y A l l o c a t i o n Confirn I I . - - * * - x a ~ Cancel<H>
(4) Execute
"Parameter screen"
"PC File Setting screen"
Device initial values written when CPU is switched from STOP to RUN or when the power is turned ON.
4-26
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(5) Cautions
Device initial values take priority when the settings overlap a latch range.
4-27
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
4.4.3 Boot operation with a program transferred from memory card to QnACPU internal memory
A memory card is required for boot operation. Boot operation is possible by setting the system setting switch and the parameter boot file. Boot operation is a function for automatic transfer from the memory card to program memory, as defined in the boot file settings, when the power is turned on or the CPU is switched from STOP to RUN.
CPU internal Memory card program memory
Automatic transfer
+
4-28
4. MAKING THE MOST OF YOUR QnACPU (1) M E LS EC-Qn A
Procedure to Set Boot Operation
The procedure to set boot operation is shown in the flowchart below.
Start 1 Install memory card, turn ON power switch
turn ON the memory card power switch.
Set CPU hardware
Turn O N SW1 of CPU system setting switch 1.
1 Set boot file
I Set the parameter boot file and store it in the reading source drive in the parameters.
1
Start RUN I I Turn ON CPU power supply (set STOP to
i---L---i Boot complete
I I The BOOT indicator turns ON.
I Start operation
4-29
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
File Name
INITIAL
MACHINING
ASS E MBLY
TRANSPORT
Boot operation is described using the files in the table below.
Type Description
Device initial values Device initial value
Sequence Program for machining
Sequence Program for assembly
Sequence Program for transporting
Switch
NO1
(1) Set switches
Setting
Turn ON to enable boot operation
Turn ON SW1 of system setting switch 1.
NO4
OFF
OFF
OFF
NO3 NO2 Storage area
OFF OFF Internal memory (Drive 0:)
OFF ON Slot 1 RAM (Drive 1:)
ON OFF Slot 1 ROM (Drive 2:)
NO4
I OFF I ON I ON I Slot2 RAM (Drive 3:) I 1 %. 1 OF: ~ 1 Slot2 ROM (Drive4:) 1 OFF Do not use
ON ON
(1) Q2ACPU, Q2ACPU-SI (2) Q3ACPU, Q4ACPU
System setting switch 1
- System setting switch 1
* View with front cover open
4-30
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(2) Set boot file
Set the parameter boot file.
0/SFC
2 / L i s t ~~~ ~
3 /Parameter 4 /De v ice 5 /On-l ine 6/PC D i a g n o s t i c 7/Document at i o n B / P r i n t e r 9 /File Ha i n t e n a n c e $3PPraagranr C5m*%at ion B/I n i t i a l S e t t i n n - W O p t ion I D/BOS
F / Q u i t
I
"Mode select screen"
[3] Select "Parameter"
D e f a u l t 3.< > PC F i l e S e t t i n g D e f a u l t 4 .< > D e v i c e S e t t i n g Default 5 . < > FC M S S e t t i n g D e f a u l t 6.< > I/O f i l l o c a t i o n None 7.C > IIELSECNETII./IB S e t t i n g None 8 . < > IIEELSEGNET/HINI S e t t i n g Nons ?.< > luxiliary S e t t i n g tl.< > SFC D e f a u l t
B . < > X / Y R l l b c a t i o n Conf irn
Cancel<N> I [9] [Y] Select "Auxiliary Setting"
"Parameter screen"
4-31
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
Current Status "Auxiliary Setting screen" I I Cancc 1<N>
[2] [Y] Select "Boot"
I ':-- screen"
C a n c e l < N > I . . I
[ l ] [YJ Select "Boot File"
Program 1" c c c 1 1
c 1 1
f <
TX Src Drive
c 1 c 1 1 1 C l
TX Dest Drive
c 3
c 1
"Boot File Setting screen" (before setting)
[I] [N] [I] [TI [I] [A] [L] [Enter] [SP] [SP] [SP] [SP] [Enter] [3] [Enter] [0] [Enter] Set program #1
[MI [A] [C] [HI [I] [N] [E] [Enter] [Enter] [3] [Enter] [O] [Enter] Set program #2 [A] [SI [SI [E] [MI [B] [L] [Y] [Enter] [Enter] [3] [Enter] [0] [Enter]
Set program #3 [TI [R] [A] [N] [SI [F] [E] [R] [Enter] [Enter] [3] [Enter] [0] [Enter]
Set program #4
4-32
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
I I 11 l a 3 4 5 6 7 8 9 10 11 I 2
[INITIAL 3 < D e w lnit [HACHINE 1 <Sequence CASSEHBLY I <Sequence CTWNSFERI <Sequence 1-1 < c I < c 1 <
I < I < Ili
c 1 c c c
> > > > > > > > > > > >
I 1 I * I I I
Do you uant t o ragister the pararater?
b < H >
[VI Register parameter
"Boot File Setting screen (after setting)"
4-33
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(3) Set boot options
During boot operation the ACPU memory contents are cleared but for the QnACPU, program files are written to a free area of internal memory. Set the boot options as shown below to clear the internal memory. In this case, the parameters are also cleared, so make sure that the CPU system setting switch 1 does not select the internal memory (drive 0) as the enabled parameter drive.
3)
I Cancel<N> . .
"Boot Setting screen"
I P I tYl
"Boot Option Setting screen" i.i > C l e a r I n t e r n a l RllH
Cancel<W>
(4) Execution
Boot operation is executed under the following conditions:
Power turned ON (reset) when the key switch tion; CPU is switched from STOP to RUN.
The sequence program is executed immediately is complete.
(5) Cautions
During boot operation, a program file with the transfer destination is overwritten.
is in the RUN posi-
after boot operation
same name at the
During boot operation, up to 2 or 3 seconds are required to reach RUN status. Boot operation is also executed after a power interruption occurs. Therefore, after boot operation has been completed once, turn OFF SW1 of CPU system setting switch 1. The transferred file contents may be damaged if the power is turned off or the module is reset during program transfer from the memory card to the internal memory card (boot operation).
4-34
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
4.4.4 Remote operation of the QnACPU from a distant location
Remote operations of the QnACPU are possible, as shown in the table be- low.
The relationship between the key switch positions and the permitted re- mote operation is also shown in the table.
RUN
RUN RUN
STOP STOP
Latch STEP-RUN STOP PAUSE RESET
Remote Remote
NG NG STEP-RUN STOP PAUSE operation operation
STOP STOP STOP RESET ;;',',",h
(1) Remote RUNETOP
Set the key switch in the RUN position to carry out remote RUN and STOP. Two methods are available for remote RUN and STOP:
(a) Method using remote RUN contact
Set the remote RUN contact (X) with the parameters. The CPU is in STOP status when the contact is ON or RUN status when the contact is OFF.
~ P a r a n e t e r 4 / D s u i c e 5 /On - 1 i n e W P C Diagnost ic 7/Documentat i o n 8/Pr i n t er ? /F i l e l lain t en an ce fi/PE.ogram G%numt i n n B/I n i t i a l S e t t i n n - C/Opt i o n I D/M)S F/Qui t
"Mode Select screen"
[3] Select "Parameter"
4 -35
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
- - I C u r r e n t S t a t u s None
m e t t i n g Default 3.< > PC ~ l l a S e t t i n g Def a u l t
Def a u l t I 4.< > Device S e t t i n a 5.< > PC ms s e t t i n g &fat& 6 . C > L/O A l l o c a t i o n None 7.< > NELSHCNETII,/IB S e t t i n g None 0.< > NELSECNETflINI S e t t i n g None 9.C > A u x i l i a r y G e t t i n g n.< > SFC Defaul t
E.( > X / Y A l l o c a t i o n C o n f i r n I Cancel<N)
[2] [Yl Select "PC System Setting"
"Parameter screen"
"PC System Setting screen (before setting)"
2. RUN-P(IUSE Contact RUN X C I PAUSE X C I
3. a i i o u Remote h o o t I.< > YOS 2.<*> No
4. Output a t STOP->RUN I.<*> P r i o r t o Calc 2.< > after one Scan
5 . Common P o i n t e r t from I 1
6. General Data Process t l l l l n i t / t r y
7. lb of Pres S l o t s < 16 > 8 . Systen I n t e r r u p t I. 1st I n t e r r u p t Counter CC I 2. I28 Const Inteawall: l 6 S l n s 3. I29 Const I n t e w a l C e l m s 4. I38 Const I n t e w a l C 2Blms 5. I31 Const I n t e w a l t 1Blms
I Cancel<N> I
[2] [l] [O] Set X10 as RUN contact
I.
a.
3-
4.
T i m e r I n t e r v a l 1. Slow C IBBIns 2. Pas t C IB lns
RUN-PIUSE Contac t RUN X t 181 PnUSE X I 1
ni iow Rcnote Reset i.<w yet 2.< > No
I.<*> P r i o r t o Calc 2.C > a f t e r one Scan
Output a t STOP->RUN
5. Connon P o i n t e r # from t 1
6. General Data P r o c s s s t I l U n i t / t r y
7 . 8 of Free S l o t s < 16 > 8 . Sys ten I n t e r r u p t I. 1st I n t e r r u p t Counter CC 2. I28 Const I n t e r v a l [ 1 W h o 3. 129 Const I n t a r u a l I 4631nt 4. I38 Const In t e rua lC 2 8 1 ~ s 5. I31 Const I n t e r u a l t I E t J m s
1
I CancelCN> I
"PC System Setting screen (after setting)"
[Yl Execute PC system setting
4-36
4. MAKING THE MOST OF YOUR QnACPU (1) M E LSE C-Qn A
(b) Method using operations from peripheral device or special-func- tion module
Operation is controlled with RUN and STOP instructions from a pe- ripheral device. The example below shows a remote STOP operation followed by a remote RUN operation.
3 4 5 6 7 8 0 w B C D
/List (Parameter /Dsu ice a n - line /PG Diagnsst ic '/Document at ion /Printer /F i l e Maintenance /PFDgPan Gnnemt: i o n ;/I nit ial Set t ins :/Opt ion i#DOS
"Mode Select screen"
[5] Select "On-line"
"On-line screen"
Interface RS232C <--- > mcm Target PC Network:9 Sta :PP PC Type:QJA Ta e t Kmory Contents T i t l e
C D r d
1 I C Card R<RfiM> c I 2 i c ~ a r d n ~ w m c 1 3 IC card B m n > c 1 4 I C C a r d B < R t M > c 1
[Ah] [2] [7] Select "Remote Operation"
4-37
4. MAKING THE MOST OF YOUR QnACPU (1) M ELSE C-Qn A
"Remote Operation screen" I n t e r f a c e RS232C <--> QnftCPU Target F'C Network : B S t a t i o n : PP PC Type : Q3A CPU S t a t u s RUN
3. S p e c i f y i n Execution S t a t i o n I.<*> k r r e n t S p e c i f i e d S t a
2 . C > STOP 2 . C > fill S t a t i o n s 3-< > PAUSE 3.C > Smcify Group C I 4.< > STEP-RUN
I 5 . C > Clear Latch 6 . < > Reset
2. f i c t ion in RUN. STEP-RUN Mode I. Device kmry <Don't C l e a r > 2. S i g n a l Plow < Store>
Cancel<W> . . I [l J [2] [Y] Select "STOP"
Do you want t o e x e c u t e Remote STOP?
Yea<Y>
[Y] Execute remote STOP
"On-line screen"
Inter face RS232C <--> bncw
l a et Nemmry Contents T i t l a
Targot PC Network'B S t a :PP PC Type:Q3R
< D r d ?
I IC card n<wIn) c 1 2 ~ c ~ a r d f i c m ) I 1 3 IC Card B<Mti> I 3 4 IC Card B < m > c I
[Alt] [2] [7] Select "Remote Operation"
4-38
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
I n t e r f a c e RS232C <--- > QnRCPU T a r g e t PC Network : 0 S t a t i o n : PP PC Type : Q3R CPU S t a t u s RUN
3. S p e c i f y i n Execution S t a t i o n I.<*> &rent S p e c i f i e d S t a 2.< > A 1 1 S t a t i o n s
=T?FRul4 2.< > STOP 3.< > MUSE 3.< > Specify Group C 1 4.< > STEP-RUN 5 . < > Clear Latch 6 - < > Reset
1. Dcuice fluwry <Don't Clear> 2. S i g n a l Flow < S t o r e >
2. h c t i o n i n RUN. STEP-RUN node
F- Cancsl<N)
[ l ] [l] [Y] Select "RUN"
Do you want t o e x e c u t e Rerote RUN?
Yes<Y>
"Remote Operation screen"
[Y] Execute remote RUN
4-39
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(2) Remote PAUSE
When the remote PAUSE is executed, the CPU stops and the 110 status is held. Set the key switch in the RUN position to carry out remote PAUSE. Two methods are available for remote PAUSE.
(a) Method using remote PAUSE contact
To use the remote PAUSE contact, turn ON the remote PAUSE enable coil (SM206) with the sequence program. Set the remote PAUSE contact (X) with the parameters. The CPU is in PAUSE status when the contact is ON or RUN status when the contact is OFF.
wspc - P / L i s t
I3/Parane t er 4 / h u ice 50'0n-line 60'PG D i a g n o s t i c 70'Docunen t at i o n 8/Prin t e r P / F i l e Maintenance f#&P?3$p%$h &?fkePat io81 B/I n it i a l Set t i n cr
"Mode Select screen"
[3] Select "Parameter"
I None 2.C > PC S y s t e n S e t t i n g D e f a u l t 3 . C > PC File S e t t i n g D e f a u l t 4.C > D s u i c e S e t t i n g Def a u l t 5 . C > PC RAS S e t t i n g Dei ault 6.< > I d A l l o c a t i o n None 3.C > tiELSECNETII,/I0 S e t t i n g None 0 . C Z HELSECNETAINI S s t t i n a Nons - . . . _ _ ..- 9.c > Buxiliary S e t t i n g 8 . C > SPC Qef a u l t
E.< > XN A l l o c a t i o n C o n f i r n
-
CancelCN)
[2] [Y] Select "PC System Setting"
"Parameter screen"
4 -40
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
I . Slow [ 18BIns 5. Connon P o i n t e r t f r o n 1 I 2. P a s t t 1lSlns
6. General Data Process 1 1 l U n i t / t r y I 2. RUN-PAUSE Contac t RUH x t I 7. t of h e e S l o t s < 16 > MUSE X C 1
3.
4.
A l l o w Renote Reset i.< > Yes
Output a t STOP->RUN
2.<*> No
I.<*> Prior t o Calc 2.c > After one Scan
8 . System I n t e r r u p t 1. l o t I n t e r r u p t Counter C[ 2. I28 Cunst I n t e r v a l [ 100 Ino 3. I29 Cont t I n t r r u a l C 4 l n r 4. I38 Const I n t e r v a l C 2elns 5 . 131 Const I n t e r v a l C 19lns
I. Cancel<N> I
1
[2] 1.11 [l] [l] Set X11 as the PAUSE contact
1. T i m e r I n t e r v a l I . Slow [ l8BIns 5. Connon P o i n t e r t fron E I 2. P a s t [ iehs
6. General Data Process[ l l U n i t / t r y
2. RUN-PAUSE Contact RUH X C 1 7. t of Free S l o t s < 16 > MUSE X C I l l
8 . System I n t e r r u p t 3. Allow Remote Reset i.< > Yes I. 1st I n t e r r u p t Counter C[ 1
2 . < w No 2. I28 Const I n t e r u a l l 1001m 3. I29 Const I n t e r v a l 1 461nt
4. Output a t STOP->RUN 4. I38 Const I n t e r v a l C 2Blms l.<*> P r i o r t o Calc 5. I31 Const I n t e r u a l l 1Blms 2.< > After one Scan
"PC System Setting screen (before setting)"
"PC System Setting screen (after setfing)"
[VI Set PAUSE contact
4-41
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(b) Method using operations from peripheral device
Operation is controlled with the remote PAUSE instruction from a peripheral device.
"Mode Select screen"
3 i P a r a n e t e r 4 iDeu ice 5 i O n - l i n e C i P C D i a g n o s t i c 7iDoe urn n t at i o n 8 i P r i n t cr 9 i P i l e Maintenance RbPPS3~Paw G*3ak2a%I;i.<3nr B A n it ial S e t t i n g CiOpt i o n Dim
PiQuit
[5] Select "On-line"
Interface RS232C <-> Qnncm Target PC Netwrk:B Sta :PF PC Type:Wtl
?a e t k m r y Contents T i t l e < D r * v 3 i IC ~ a r d n<Rnn> t I a ~ c c a r d n < m > 1 1 3 IC Card B<WH> 1 I 4 IC Card B<ROII> t 3
"On-line screen"
[Alt] [2] [7] Select "Remote Operation"
4-42
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
I n t e r f a c e RS232C <--- > Qnncw Target PC Network : 0 S t a t i o n : PP PC Type : Q3A C W Status RUN I - T % R u n
2.< > STOP 3.C > PAUSE 4.< > STEP-RUN 5.C > C l e a r Latch
3. S p e c i f y i n Execution S t a t i o n l.<*> 8urrent Spec iE ied S t a 2.< > 111 S t a t i o n s 3-< > S p e c i f y Group C 1
6.< > Reset
I. Device k m r y <Don't C l e a r ) 2. S i g n a l Plow <
2. action i n RUN. STEP-RUN node
Store> CancelCN)
[SP] [3] [YJ Select "PAUSE"
Do you want to execute Remote MUSE?
Y e s < Y >
"Remote Operation screen"
[Y] Execute remote PAUSE
4-43
4. MAKING THE MOST OF YOUR QnACPU (1) .MELSEC-QnA
(3) Remote STEP-RUN
Operation is controlled with the remote STEP-RUN instruction from a peripheral device.
"Mode Select screen" WSFC I- 2 / L i s t 3 / P a r a m t e r 4/Deu ice 5 /On-line WPC D i a g n o s t i c 7/Documentat i o n 8 / P r i n t e r Y/F i l e H a i n t e nance $>/Fr*ngrsa CmuraZia?n B/I n it i a l S e t t i n g C/Opt i o n D/DOS
P/Quit
[5] Select "On-line"
Interface RS232C <---> m l c w Target PG k t w r k : B S t a :PP PC Type:Q3n
"On-line screen"
[Alt] [2] [7] Select "Remote Operation"
4-44
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
I n t e r f a c e RS232C <--> QnllCW Target PC N e t w r k : b3 S t a t i o n : FP PC Type : Q3A CW S t a t u s RUN I b. 8
I.<*> RUN 2.< > STOP 3.< > MUSE 4.< > STEP-RUN 5.C > Clear Latch
3. S p e c i f y i n Execution S t a t i o n I.<*> %rrsnt S p e c i f i e d S t a 2 . C > R 1 1 S t a t i o n s 3.< > Specify Group C I
6.< > Reset
I. Device Hemiry < h n ' t C l e a r > 2 . S i g n a l Plow < S t o n >
2 . Rction i n RUN, STEP-RUN node
CanceliN>
[SP] [4] [Y] Select "STEP-RUN"
Do you W a n t t o execute Renots STEP RUN?
Ycr<Y> rn
[Y] Execute remote STEP-RUN
"Remote Operation screen"
4-45
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(4) Remote latch clear
Set the key switch in the STOP position to carry out remote latch clear. The remote latch clear operation is carried out from the peripheral device.
2 3 4 5 6 7 8 9
B C D
/ L i s t /Parameter /Deuice /On- line /PC D i a g n o s t i c '/Do cumen t at i o n /Printer ' / F i l e Maintenance
I M n i t i a l Setting :/Opt i o n I/DOS
.k'Pd$$PaVb &S3EPi3#: fPtn
"Mode Select screen"
[5] Select "On-line"
l n t s r f acs RS232C <--> Qnncw I Target PC Network-B Sta :PP PC TypeiQ3A
[Ah] [2] [7] Select "Remote Operation"
"On-line screen"
4-46
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
I n t e r f a c e RS232C <--- > QnACPU Target PC Network : B S t a t i o n : FF PC Type : 93cI CPU S t a t u s RUN
3 . S p e c i f y i n g Execution S t a t i o n I.<*) RUN I. C*c) Current S p e c i f i e d S t a 2-C > STOP 2.< > A l l S t a t i o n s 3.< > PlUSE 3 . < > S p e c i f y Croup C 1 4.C > STEP-RUN S-< > Clear Latch 6-< > Reset
I. Device Menory <Don't Clear) 2. S i g n a l Flow < S t o r e )
2 . Act ion i n RUN, STEP-RUN Mode
CancelCN)
[SP] [5] [Y] Select "Clear Latch"
Do you want t o execute Remote L.CLR? Y e s < Y >
"Remote Operation screen"
[Y] Execute Remote L.CLR
4 -47
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(5) Remote RESET
Set the key switch in the STOP position to carry out remote RESET. Enable remote RESET with the parameters and carry out the remote RESET operation from the peripheral device.
Z / L i s t 3/Paramet e r 4/Deuice Won- l i n e 6/PC D i a g n o s t i c 7#Documentat i o n 8/Pr i n t er 9 / F i l e H a i n t enance BFPm gram G m s 3P3.B; i 4L rl W l n i t i a l S e t t i n g €./Opt i o n D/DOS
"Mode Select screen"
[3] Select "Parameter"
Current S t a t u s I None h Defaul t - 31< > PC FZle S e t t i n g Default 4.< > P e u i c e S e t t i n g Defaul t 5 . < > PC RQS S e t t i n g Defaul t 6 .< > I#O l l l o c a t i o n None 7.< > IlELSECNETII,/IB S e t t i n g None E.< > HELSECNETAINI S e t t i n g None 9 . < > a u x i l i a r y S e t t i n g fl.< > SPC Qef ault
B.< 3 X / Y l l l o c a t i o n Confirm
C a n c e l < N > I
"Parameter screen"
[2] [VI Select "PC System Setting"
4-48
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
1. Slow I IBeIms 5. Common P o i n t e r S f rom C I 2 . F a s t I I&llmo
6 . General Data ProeessC l l U n i t / t r y
2. RUN-MUSE Contac t RUH X C 1 7. t of Free S l o t s < 16 >
3. A l l o w Renote Reset I.( > Yes 1. l o t I n t e r r u p t Counter C t 1 2.<*> I40 2. I28 Const I n t e r u a l C 1881ms
3. I29 Const I n t e r u a l C MIA+ 4. Output at STOP->RUM 4. 130 Const I n t e r v a l [ 28lns
I-<*> P r i o r to Calc 5 . I31 Const I n t e r u a l C IBlms 2.C > Rftsr one Scan
PAUSE X t I 8 . System I n t e r r u p t
CanceltN)
[3] [ l ] Select "Allow Remote Reset Yes" I
1. T i m e r I n t e r v a l 1. Slow I IBBlrs 5. Common P o i n t e r II f r o r I 1 2. F a s t I i 8 l m s
6 . General Data P r o c s s s I l J U n i t / t r y
2. RUM-PAUSE Contac t RUH X E 1 7 . # of Pres S l a t s < 16 >
3. A l l o w Renote Reset I. l o t I n t e r r u p t Counter C t 1 2.<*> No 2. 128 Const I n t e r u a l C 18811~
3. I29 Const I n t e r u a l C 481nt 4. Output a t STOP->RUM 4. I3B Const I n t s r u a l I 2eIns
I.<*> P r i o r t o Calc 5 . I31 Const I n t e r u a l C i B l m s 2.C > l f t e r one Scan
PAUSE X C 1 8 . S y t t c n I n t e r r u p t
Cancel<N>
[Y] Set "Allow Remote Reset Yes"
"PC System Setting screen (before setting)"
"PC System Setting screen (after setting)"
4-49
4. MAKING THE MOST OF YOUR QnACPU (1) M E LSEC-Qn A
3 .< > PG F i l e S e t t i n g I 4.< > Deuice S e t t i n g
5.C > PC RAS S e t t i n g 6.< > I/O l l l l o c a t i o n 7.< > llELSECHETII,/IB S e t t i n g 8 . C > IIELSECNET/tlINI S e t t i n s
None Set Default Defaul t Default None None None
0 ; i j Auxiliary S e t t i n g A . < > SPC Default
E.< 3 X/Y A l l o c a t i o n Confirm
-
Cance 1<N>
[Fl 11 Select “Mode Select screen”
WSPC i /Ladder
- - 2 / L i s t
4/Deu ice w- S f l n - l i n c 6/PC D i a g n o s t i c 7 / h c u n e n t a t i o n W P r i n t er 9 / P i l e H a i n t enance d/Prograst Gsr3wPiu.t: ion B / I n i t i a l S e t t i n g WOpt i o n D/DOS
F/Quit
“Mode Select screen”
IS] Select “On-line”
I 3)
“Parameter screen”
4-50
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
"On - I in e screen " > Qnncw RS232C <--- In ter face
Network:@ S t a :FF PC Type:Q31
[Ah] [2] [7] Select "Remote Operation"
I n t e r f a c e RS232C <--- > QnACPU Target PC Network : B S t a t i o n : FF PC Type : 931 CPU S t a t u s RUN
3. S p e c i f y i n g Execut ion S t a t i o n I.<*> RUN 1. <*> Current S v e c i f i e d Sta 2-< > STOP 2.< > R11 S t a t i o n s 3-< > P1USE 3.c > Specify Croup c I 4.< > STEP-RUN 5 - < > Clear Latch 6-< > Reset
I. Device Ilermry <Don't Clear) 2 . S i g n a l Flow <
2 . l c t i o n i n RUN. STEP-RUN Hode
Store) C a n c c l < N >
[SP] 161 Select "Reset"
Do you want t o execute Remote RESET?
Y e s < Y >
[VI Execute Remote RESET
4-51
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
4.4.5 What are local devices?
The QnACPU is able to handle each device in each program file as a sepa- rate device. These devices are called "local devices."
- Program file A - - Program file B -
\
1 - Program file C
MOV K2 DO 7 \ I /
[Each handled as a separate device]
0 A memory card is required to use local devices.
Parameter settings are required to use local devices.
The following devices can be used as local devices. M : internal relay V : edge relay T : normal timer ST : retentive timer C : counter D : data register
4-52
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(1) Set 1 k point (MO to M1023) of the internal relays as local devices
IP/SPC -1 "Mode Select screen" 2 / L i s t I 3/Parameter
I4/Deu ice I -. - - . _- - 5 /On-line 6/PC D i a g n o s t i c 7/Documentat i o n 8 / P r i n t e r 9 / F i l e Maintenance 9 / Pre9Pal:s Ces3s $?a 1: i e?-* B R I n i t i a l S e t t i n g C/Opt i o n D/DOS
F /Pui t
[3] Select "Parameter"
Current S t a t us None Defau l t Defau l t
2 . < > PC System S e t t i n g I 3 .< > PC P i l e S e t t i n g 4.< > Device S e t t i n g - I 5 . < > PC RAS S e t t i n a
Default Default -
6 . < > 1 1 0 l l l o c a t i o ; None 7.< > HELSECNETII,/lB S e t t i n g None 8 . < > HELSECNET/tlINI S e t t i n g None 9.C > A u x i l i a r y S e t t i n g R.< > SPG Defau l t
B .< > X/Y A l l o c a t i o n Confirm
Cancel<N> I [4] [VI Select "Device Setting"
"Parameter screen"
4-53
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
Input Relay Output Relay Y 16 I n t e r n a l Relay ll I 0
Link Relay B 16 Lnnunciator P 10 Link Sp Relay SB 16 Edge Relay u 10 S t e p Relay s I 0 T i n e r T I 0
Latch Relay L I 0
Lcunlt T ~ P Sf 10 Counter I 0 D a t a Register Link Register Link Su Reg 1 ,f I:1 16
2K 1 I-c 2K 2K 1 c I-c 1
c 1- t 1 c 1- [ 1 c I-t 1 t I-t 1
c 1- E 1 c I-[ 3 c 1- c 1 t 1- I 1 c I-[ 1
"Device Setting screen (before setting)"
[F3] Change from latch to local devices ,-
Deu ice Input Relay Output R s l a I n t e r n a l Relay Latch Relay Link Relay Rnnunciator Link Sp Relay Edge Relay S t e p Relay T i m e r Lcunl t Tiner Counter Data Register Link Register Link Su Rea
SB
:e= Total - - Deuicer
8K 8K
1-1 I 8K1 t 8K1 1 2x1
t 2x1
C 2x1 C 8K1 I iK1 1 12K1 C 8K1
28.8>M Uorc
2X
en
2K - I "Device Settinn Local Device
c 1- c 1
I c 1- c 1
c 1- t 1 c 1- c 1 c I-[ 1 t I-t 1
screen (before setting)"
4-54
4. MAKING THE MOST OF YOUR QnACPU (1) M ELSE C-Q n A
Device Input Relay Output Relay I n t e r n a l Relay Latch Relay Link Relay Annunciator Link Sp Relay Edge Relay S t e p Relay T i m e r bcumlt T i m e r Counter Data R e g i s t e r Link Register Link Sp Rag
Dcu :es Tota l - Dcuicas
8K 8K I4;
C 2Kl C 2K1 C 2K1 C RKl C IKI c 12BI C BKI
2H
8 1
2K
C 81-1 18231
c I-[ 1
t I-[ 1 c 1-1 1 c 1- [ 1 c I-[ 3
Do you want t o register the parameter?
No<N>
[Y] Register the parameter
"Device Setting screen (after setting)"
4-55
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
4.5 Easy Program Debugging
This section describes the easy debugging functions.
4.5.1 Simultaneous monitoring by multiple operators
Monitoring is possible by multiple operators. Setting the other station monitor file in the system settings allows high-speed monitoring. (Setting of the host station monitor file is not required). Each other station monitor file occupies 1 k step.
( 1 ) Setting the other station monitor file
e/s FC 2 0 L i s t 3/Parane t er
E
IrlRDeuice I ~ ~ i i - i i n e WPC D i a g n o s t i c 7/Documen t at i o n 8/Prin t er ? /Fi le Maintenance fLm?ogr*aR Ce?rssrati E/I n i t i a l S e t t i n s - WOpt ion D/DOS
.uw
"Mode Select screen"
$
[5] Select "On-line"
"On-line screen"
I Inter face RS232C <-> QDLCW T a r g e t PC ktuork:B S t a :PP PC T 9 p e : W A I
+ [Alt] [2] [B] Select "PC Memory Batch Processing"
4-56
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
I. System llrea E I l l Steps
Canccl<H>
"PC Memory Batch Processing screen" 2.< > Pomat 3-< > All Read 4.< > tl11 Write 5.< > Fornat<with Option)
Cancel<N>
"System Area Setting screen"
4
[5] [VI Select "Format (with Option)"
"System Area Setting screen (before setting)" I E 81X Steps
I Cancel<N> I
4
[SP] [l] [Enter] Set system area to 1 k step
Do you want t o format i n t e r n a l WIH?
(2) Monitor See Chapter 3 for information about monitoring.
4-57
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
4.5.2 Monitoring devices at any step
Monitor conditions can be set for precise monitoring of the PC operating status or monitoring of local devices. In addition to monitoring during the END processing, the monitor condi- tions allow monitoring to be set at a step number, a step continuity state, or a device state.
(1) Read the monitored file from the PC CPU
"Mode Select screen"
3/Parameter 4/Deuice 5 /On- 1 i n e 6/PC D i a g n o s t i c 7/Doc unen t at i o n 8 / P r i n t e r P / F i l e Haintenance B Pv%wg:P&n3 G%? 31 8 Fat I.m B / I n i t i a l S e t t i n g C/Opt i o n D/DOS
F/Quit
[l] Select "Ladder"
[Alt] [2] [4] Select "Newly from PC"
Select "Newly from PC" to match the GPP file name with the CPU file name.
4-58
4. MAKING THE MOST OF YOUR QnACPU (1) M ELSE C- Qn A
I n t e r f a c e RS232C <--- > pnncpu
Target Men Interna l RllH T i t l e C 1 T a r g e t PC Network : El S t a t i o n : PP PC Type : 93R
1)
display screen (after selecting)"
c 1. [*I 2.C*I 3.C*l 4. [*I 5.c 1
3 T i t l e C Parameter Seq/SPC Program Device Comment Device Initial Ualue S i n u l a t i o n Data I . Cancel<N>
1
"Newly from PC screen"
[Ctrl] [L] Display file list
"File name display screen (before selecting)"
R S ~ C <---> Qnncpu Hetwork : El S t a t i o n : PP PC Type : 93A
I n t e r f a c e Target PC Target Bltm In terna l RllH Title C
1 INlTIRLi D e w I n i t 122 96-M-29 ie:s6 c 3 MUICHIME QnR Seq 2148 96-M-29 ie:28 c 1 BSSERBLY Qnb Seq 2148 96-84-29 18:21 C 1 TWINSFER QnR Seq 2148 96-84-29 m 2 2 c 1 TEST PnR Seq 2148 96-04-29 18:23 C 1 WITOR mi seq 2164 96-84-29 1835 C 1
I P i l e s :8 M X Gont 319488 Bytes Gncl<N) I [SPI i.11 [$I 1.11 t.11 t.11 t.11 P I
Select parameter and the file name "MONITOR" I
Files :8 MK Cont 319488 Bytes
[Enter]
4-59
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
"Newly from 1 PC screen" I I n t e r f a c e RS232C <--> QnlCPU
Target PC Wetwork : €l S t a t i o n : FF PC Type : 431 Target f b m Interna l RIlH T i t l e C
CPKMITOR 1 T i t l e C 1 1. [*I Parameter 2 . [*I ScqdPC Prograa 3.1 1 Douice Corrant 4.L 1 Device I n i t i a l Ualua 5.C 1 Simulat ion Data
PiE!!Fl
I ---bd Cancel<N)
4
tY1
"Ladder Read
[F3] Start monitoring
"Ladder Monitor screen''
[Ah] [6] [6] Select "Monitoring Condition"
I 3)
4-60
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
- 3
2.< > Condition Device Current U a l u e I.[ 1 Device I.<*> Uord Deuice I I- C K e
2.C 1 S t e p tl C 91- <Always>
2.< > B i t Deuice I I - < t >
Cancel<N>
"Monitoring Condition screen (before setting ) "
I.< > Nonitor A l w a y s .
2 - <*> Condition Device 1.C-1 Device I.< > Word Device C
2.<*> B i t Device 1x2
Current b l u e 1- E K 0 1 1 =-
2 . c I step t I m i - <aimys>
Cance l<N>
[Y] Monitor with detailed conditions
<ne > 0
Y 2 i 0 E 2 -' : tm >
<re > 4 4
6 , [END 1
$22
"Monitoring Condition screen (after setting)"
"Ladder Monitor screen"
4 - 61
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
A62P
4.6 Programming
Q3ACPU AX40 AX40 AY40 AY40 A68AD A62DA
4.6.1 Creating one program
* - Q3A CPU
Digital operations -
This section shows how to create a program for the imaginary system be- low.
k &
= 3 2 7
e ?
52 E a
8 z 8 z E €
a a ,.
This system maintains a constant temperature in the cabin.
Cabin
transducer
The temperature sensor measures the cabin temperature in the range from 0 OC to 50 OC.
Converts the measured temperature to a voltage between 0 V and 10 V.
converter
converter module
Inverter
Converts the 0 V to 10 V voltage to a digital value from 0 to 2000.
Digital values are written to the DIA converter module to stop the extrac- tor fan when the temperature is less than 20 "C, run it at high setting when the temperature exceeds 30 "C, and at low setting when the tem- perature is between 20 "C and 30 "C.
The digital value is converted to a voltage between 0 V and 5 V and sent to the inverter.
This voltage drives the extractor fan.
Allocation of devices used XO . . . . . . . . . . Stop switch X41 . . . . . . . . . A/D converter READY signal DO . . . . . . . . . . Stores cabin temperature X61 . . . . . . . . . D/A converter READY signal Y20 to Y2F. . . Cabin temperature display
4-62
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(1) Create temperature regulation program
3/Parameter U D e v ice ~ Q n - 1 i n e 6/PC Diagnost SG ?/Document at i o n 8/Prin t e r 9#Pi le Maintenance WBrag8.am Cenar14klt i o n B/I n i t i a l Set t i n g W O p t i o n D/Dos P/Quit
I
"Mode Select screen"
[ 11 Select "Ladder"
"Ladder write screen (before programming)"
[Ins] Change Write (insert) to Write (overwrite) [F6] [XI [O] [Enter] [F5] [XI [4] [ l ] [Enter] n $ ? * ' Write (*) (+I- 1
(-) [K] [4] [0] [SP] [D] [O] [Enter] " { I 8' K40 DO -j- " Write
1~81 VI [SPI [UI 141 [\I [GI 111 V I [SPI
4-63
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
1)
"Ladder Write screen (during programming)"
I
Continue this process to create the following ladder program, [4] Convert
"Ladder Write screen (after programming)"
I I>- tm we I-[<- w ~ 3 e 3-
4-64
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
1 T i t l e I 1
MJ CC:\GP%USR
3. k c h i n s C)IACHINEI 1 T i t l e 4. Pile L)IAIN 1 T i t l e 6 1
ytten YSTEH 1 i 1
(2) Write created program to file
"Write File screen (before setting)"
1 1 1 1
5. Target i . C * l Parameter Z.C*I Sequence/SPC Program 3.C*I Deuice Comment
Cancel<N>
" Fi I e Writ e screen (after setting)"
PI P S I [BSI PSI P S I [Bsl P S I P S I P S I [PI [R] [O] [GI [R] [A] [MI [Enter] Change machine name to "PROGRAM"
[4] [BS] [BS] [BS] [BS] [TI [E] [MI [PI [Enter] Change file name to "TEMP"
[5] [l] [3] Change write object to sequence program
I . D r i u e f l a t h CC:\CPPQ\USR 2 . System CSYSTE?l 1 Title C 3. ehchine CPROGRIlR 1 Title C 4. P i l e [TEMP I Title C
5. ramet l.C*l Parameter - Cancel<N> I
4 [Y] Write file
The machine nane doesn't ex is t . Do you want t o create it?
No<N>
[Y] Create new machine name
4-65
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
3)
"Ladder Write screen"
I t> DB me 1
c n w K8 Ge
[Fl 11 Display mode select screen
4-66
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
0 -j D15 0 + D16 1
4.6.2 Creating multiple programs
0 -+ D17
This section shows how to create a program to add extra functions to the system described in section 4.6.1.
Vision sensor
Classifies the eggs laid by the chickens into small, medium, and large sizes, and packs them as tens into boxes.
Start line
I Small Large
1
Allocation of devices used 0 X10. . . Line start switch 0 X11 . . . Line stop switch 0 Y30. . . Line start output 0 M15 . . Small egg counter sensor
0 M16 . . Medium egg counter sensor 0 D16. . . Number of medium eggs
0 M17 . . Large egg counter sensor
0 Y32. . . Extract small eggs 0 Y33. . . Extract medium eggs
Y34. . . Extract large eggs
0 M 10. . . Line start internal relay 0 M11 . . . Line stop internal relay
0 D 1 5 . . . Number of small eggs storage
storage
storage
pack
0 D17. . . Number of large eggs
0 Y 3 5 , . . Change to small egg pack 0 Y36 . . . Change to medium egg
0 Y37 . . . Change to large egg pack
4-67
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
WSPC I- P / L i s t
(1) Create size-selection program
"Mode Select screen"
3/Parane ter WDeu ice 5 /On-line 6/PC D i a g n o s t i c 7/Do c ume n t at i o n 8 / P r i n t e r 9 / F i l e Maintenance B,'PPQgPaR Cerrax**xi*n W I n i t i a l S e t t i n g C/Opt i o n D/DOS
c I
P/Quit 1 I +
[B] Select "Initial Setting"
I . - mE!F?mP 3, from Pc.. - 4. Close f i l e . . . 5 , PC Type Chg-..
I POINT I "Initial Setting screen" The program created in Section 4.6.1 remains because up to
4
[l] Select "Create ..."
I "Create screen" I
I-- . i.< ? Q2P 2.< ? 42asi I 4-< 4411 I~ Cancsl<N>
[3] [Y] Select "Q3A
4-68
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
e
I DO you want to execute F i l e Set t ing? I
-- [END 1-
WSPC WLadder 2 / L i s t 3/Paramster Wlleuice S/On-lins 6/PC Diagnostic 7#l locunentat ion 8 /Pr in t er P / P i l e k i n t e n a n c e
WOpt ion WWS
WQuit 2)
"Mode Select screen"
4 [l] Select "Ladder"
"Ladder Write screen (before program m i ng )"
[Ins] Change Write (insert) to Write (ovfiprite) [F5] [Shift] + [Fi'] [XI [i] [O] [Enter]
IF81 [SI [El [TI P P I [MI [I1 [Ol [Enter]
" +- " Write (-+I (n
,+SET H10 I- 1I Write
4-69
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
"Ladder Write screen (during programming)"
Continue this process to create the following ladder program. [F4] Convert
"Ladder Write screen (after program mi ng)"
I
I* X I M6
I+ X i D17
(2) Set the file name to "SIZE" and write the file. The operation is the same as described in Section 4.6.1 (2).
(3) Write program to the CPU. See Section 3.5.2 for details about the write operation.
4-70
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
_ _ 3RParaneter 4/Deuice 5 /On-line 6/PC Diagnostic ?/Documentat ion 8RPrin t er 9/P ile Ha in t en ance
B/Initial S e t t i n g C A p t ion WDOS P/Quit
iatPP#gl8'*wm G*3mF&k i.aa
(4) Create the packing program
"Mode Select Screen"
[B] Select "Initial Setting"
1- I I 3 - New f r o m PC ...
4. Close file.. . 5- PC Type Chg- . . I
"Initial Setting screen"
i
[l] Select "Create ..."
"Create screen"
I . .
I . < > Q2R 2.C > 92RSi
3.C > 940
5.c > Xtypc
# .
Canccl<N> . .
[3] [Y] Select "Q3A
4-71
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
Do you want t o execute F i l s Se t t ing?
m b < N >
WLaddsr 2/List 3#Parane t er 4/Deu ice
I 5/0n-line I C/pC Diimos t ic
I 7/Docuncitat ion 8/Prin t er I 3/F ile Maintenance F/Quit I
"Mode Select screen"
I [ 1 ] Select "Ladder"
"Ladder Write screen (before programming)"
4-72
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
2)
"Ladder Write screen (during programming)"
I
Continue this process to create the following ladder program [F4] Convert
"Ladder Write screen (after programming)"
(5) Set the file name to "PACKING" and write the file. The operation is the same as described in Section 4.6.1 (2).
(6) Write program to the CPU. See Section 3.5.2 for details about the write operation.
4-73
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
(7) Set parameters
"Mode Select screen"
&'List 3 / P a r a m ter 4/Deu ice S/On-lina 6/PC D i a g n o s t i c ' ? / ~ o c u ~ e n t at i o n 8 / P r i n t er ? / F i l e Maintenance R A? %Y3 SF.3 w G* nrr, Far: i o 111 B A n i t i a l S e t t i n g W O p t ion a/nos F / Q u i t
I I
[3] Select "Parameter"
Default Default
4.< ? Device Setting Def ault 5 - < > PC R116 S e t t i n m Default 6 i i i Ih-r i iGcat ioE None 7 .< > llELSECNEIII./iB Setting None 8 .< ? HELSECNETMINI Settina None 9 . < ? ttixiiiary Setting A . < > SFC Default R.< ? XN allocation Confirm
-
CancelCN> I [9] Select "Auxiliary Setting"
I.< > PC Ham Definition None Z . < > PC 8 +ten Setting Default 3.< > PC FL Setting Default 4.C ? Device Setting Default 5.C > PC M S Setting Default 6.C > I/O llllocation None 7 ; ~ > ii~~s~CiiEIlI,/ifii Setting None 8 .< ? HELSEMETAINI Settinw None
fl.< > SFC Default
E.< > IN Allocation Confirn Cancel<N>
"Parameter screen (before setting)"
"Parameter screen (after setting)"
4-74
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
Current Status "Auxiliary Setting screen" Nnnc I
I Cancel<N> . . I
[ l ] [VI Select "Program"
"Program Setting screen (before setting)"
[TI [El [MI [PI [Tab] [Enter]
[SI [I1 [ZI [El [TabJ IEnterJ
[PI [AI [CI [Kl [ I 1 [Nl [GI [Tab] [Enter]
Set program name "TEMP" as a scan program Set program name "SIZE" as a scan program Set program name "PACKING" as a scan program
"Program Setting screen (after setting)"
I
4-75
. . , ,
4. MAKING THE MOST OF YOUR QnACPU (1) MELSEC-QnA
I 1 I
I I Do you want t o register the pamnetey?
[Y] Register parameters
[Esc] Close parameter screen
(8) Write to CPU. See Section 4.2.2.
4-76
5. MAKING THE MOST OF YOUR QnACPU (2)
5. MAKING THE MOST OF YOUR QnACPU (2)
5.1 Programming Before 110 Module Configuration is Determined
MELSEC-QnA
By adding labels to the sequence program, a QnACPU program can be cre- ated before the I/O module configuration is determined.
5.1.1 Programming using labels
The example shown below is used to explain programming with labels.
When the conveyor RUN switch is pressed, the warning buzzer sounds for 3 seconds and the conveyor automatically starts. The conveyor stops when the system detects that 6 products have been transported.
Sensor
5 -1
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
Label
sw1
COUNT
OPERATION
(1) Create the sequence program using the labels below.
Device Comment
XO Operation command for conveyor
CO 6-product product count
MO Operation in progress
START
BUZZER
TIMER
SENSOR
Y71 Operation start command
Y70 Operation start buzzer
TO
X l Product detection
3 second timer for buzzer
1- I "Initial Settina screen"
2. Reads New F l . . . 3. New fron PC ... 4. Close file.. . I 5 . PC Type Chg ... I
[ l ] Select "Create ...I'
1- I "Create screen" I.< > Q2A 2.< > Q2ASi C 4.C > 441
I 5.< > Xtype
Cancs 1 < N >
151 [VI Select PC type "Xtype"
5 - 2
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
Do you want t o execute Pile S e t t i n g ?
No<N>
" Mod e S e I e c t sc re en "
W P a r a m t er 4/De v ice 5/0n-line 6/PC Diagnast ic 7/Docunentat ion WPrin t er 9 /F i l e Haintenance fl&~tqp*an Ge rtewtt ilurr B A n i t i a l S e t t i n g C#pt ion WDOS
I €'/Quit
[ l] Select "Ladder"
5-3
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
To define a label, insert an apostrophe
+
"Ladder Write screen (before programming)"
"Ladder Write screen (during programming)"
r
5 - 4
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
Continue this process to create the following ladder program. [F4] Convert
"Ladder Write screen (after programming)"
[ F l l ] Select "Mode"
5-5
5. MAKING THE MOST OF YOUR QnACPU (2) M E LS EC-Q n A
4)
I
(2) Assign devices and comments to the labels
"Mode Select screen" 2/List- 3/Paranwrtsr 4 /Deuice W Q n - l i n e 6/PC D i a g n o s t i c 7 A o c u n e n t a t i o n 8 / P r i n t e r ?/File Plaintenance
B A n i t i a l S e t t i n a f i * ' ' h K k ~ F ~ ? % f&Be3Yit fOR
[A] Select "Program Generation"
1
c w m 1r 1r I COPEWITION I C IC 1 [START I C I t 1 rBuzm 11 I[ 1
IC 1 IC 1 I t 1 I t 1 IC 1 IC 1 IC 1 1r 1 11 I IC 1 1r 1 I t 1 IC 1 IC 1
"Program Generat ion screen (before setting)"
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
IC IC IC IC I C I t I t IC 3 c IC IC IC
IC IC IC IC IC IC IC IC IC IC IC IC
I
Continue this process to assign devices and comments to the labels.
"Program Generat ion
setting)" IOPEWITION lCN0 screen (after CSTRRT l C Y 7 l tmlzzER I C Y 7 8 [IlNER IC10 1[3 second timer f [SENSOR I C X I ICProduct d s t e c t i o
POINT I The comments set in the Program Generation screen become the comments in the program after program expansion.
5 - 7
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
(3) Write the program to file
[Alt] [ l ] [2] Select "Write File"
CC:\GPPQ\USR y s t e m YSTEH 1 Tit le C
3. tlachine CNIH11411 Title C +. P i l e EMIN 1 Tit le C
5. T a r g e t I.[*] Parameter Z.C*l Sequence/SPC Program 3.C*I Deuice C o n a n t I.[*] Label Assi nnant
Cancel<N>
1 1 1 1
"Write File screen (before setting)" I P I [BSl tBS1 [BSI P S I P S I P S I P S I P S I [XI [TI [VI [PI [El [Enter] Change machine name to "XTYPE"
[5] [l] Change write object to sequence program and device comment.
I. Driue/Path CC:\CPPlhUSR 2 . System CSYSTEN 1 Ti t le C 3. Nachine CXTYPE 1 T i t l e c 4. P i l e CMBEL 3 T i t l e C I 5 . Target
3.C*l Deuice Connant 4.[*3 L a b e l I l s s i nnent
Cancel<n>
1 I I 1
"Write File screen (after setting)"
[Y] Write file Execte
5-a
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
The machine name doesn't exis t . Do you want t o create it?
No<N>
[VI Create new machine name
J L r IC
Conmnt ICOparation command for conusyor I 1C6-produet product count 1 ICOparation in progress I IC0psration start comand 1 ICOperation start buzzer 1 IC3 second tinar for buzzer 1 1 [Product detection, 1 1r 1 IC IC IC IC IC IC IC IC IC IC I C
1 1 1 1 I I 1 1 I I 1
"Program Generation screen"
5-9
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
I - I.[*] Sequence, SPC Program 2.C*I Label -> Deuics Comnent
2. Exp D s t Path S sten Hachine File IC: \GPPQ\USR I I S Y k J l IC 11 1
(4) Expand general-purpose program to an actual program
" Program Expansion screen (before setting)"
[Ah] [2] Select "Program Generation"
I.[*] Sequence, SPC Program 2.C*I Label -> Deuics Comment
2. Exp D s t Path S ten h c h i n e File tC:\CPPQWSR I C S Y h l lCQ36 liulBEL I
IC: \CPPQUlSR I C S Y h l ICXTYPE 1 3. R e f macro Path s sten Ilschine
Cancel<H>
rn "Program Generation screen" 3/Program Expansion i Merge ...
"Program Expansion screen (after setting)"
[l] Select "Program Expansion"
[Q]-[3] [A] [Tab] [L] [A] [B] [E] [L] [Enter] Change machine name and file name
5-10
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
9)
I
Machine name doesn't ex i s t . Do you want to create machine ExpDst?
No<N>
"PC Type Setting screen (before setting)" Path C:\GPPQ\USR System SYSTEII tlachine Q3A
I < QLR > 1- Cancel<N>
[SP] [SP] [SP] Select PC type "Q3A
1 . .
"PC Type Setting screen (after setting)" Path C:\GPPQ\USR S y s t e m SYSTEM tlachine Q3R I. PG T r p a IRcJIT;EI * .
Canse 1<N>
5-11
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
E a D s 1 D s u i c e csu1 icxe CCOUEFI ICCPJ
txmu) ICTB
[OPEWITION ICNB CSTAW ICY71 twzm ICY7e
CSENSOR ICX1 1 IC t IC c I C t IC r IC c 11. c IC r IC r IC t I t r 1 E c IC
Comment IIOperation comnand for oonueyor IC6-product roduct count perati at ion P, progrsss ICOpsration start command 110pration start buzzer IC3 aetand tiner for buzzer ICPmduct detection, 1r
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
"Program Generation screen"
5-12
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
Driue/Path IC:\GPPQ\USR 1 PC Type Title
43i : ~ 3 1 : 431 : Gr I G#l= ;
HANYOU 't? :
43A : SYS + snnpm
(5) Read the expanded program
"Read File screen (directory display)"
[Ah] [ l ] [ l ] Select "Read File"
Driuenath :C:WPPP\USR S y s t e m :SYSTER Title : Nachinc :%TYPE Title : I "Read File screen"
Title
362 96-85-13 18:22
I File<=>: 3 Free i96861824Byte<+> Cancel<N>I
[Ctrl]+[D] Directory display
I I Systen<s> 4 Uachine<s> 15 Free is6861824Byte<s> F h - . : Cancel<N>
[J] [&I [J] [d] [J] [J] [k] [J] [Y] Select machine name "Q3A"
5-13
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
I "Read File screen" I Driur/Path :C:\GPPO\USR I Sys ter :LYSTM - &chine : 431 I T i t l e :
T i t l e :
File Type Size Date T i n e T i t l e UlBEL Comment 3 U 96-85-13 18:23 : -
I F i l e < t > : 2 Pres 1&861824Byts<r> Cancel<N> I
[SP] [VI Select file name "LABEL"
Curpent editing targets w i l l be lost. All r ight?
NoCN)
I [VI
'*Program Generation screen"
[Fl 11 Display "Mode Select screen"
5-14
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
I B/S FC i /Ladder 2 / L i s t 3 /PaPaD,e t e lid 4/De v ice 5/Qn .. 3.3.ns &J PG 'Uii agno L t 9.c 7/Do c ume n t at i o n 8/Prin t er 9 / F i l e Maintenance
B/I n it i a l S e t t i n g C#Opt i o n D/DOS
F/Qu it
.~
I
"Mode Select screen"
4
[l] Select "Ladder"
I
"Ladder Read screen"
5-15
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
5.2 Utilizing Program Resources
5.2.1 Program standardization with user-created macros
Macro instructions are instructions which read and utilize ladders pre- saved in a peripheral device. Using macro instructions improves program productivity. This section describes how to use the macro instructions.
(1) Create the following sequence program and write it to file
(2) Read the file and register the macro
[HIM Di D3 1
5 - C < = M D2 1 [HIM W D3 1
iB CHnD 1
u -r> m DZ I
"Ladder Write screen (before programming)"
"Ladder Write screen"
[Alt] [I] [ l ] Select "Read File"
5-16
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
Driue/Path :C:WPPQ\USR Systen :SYSTEM Tit le : llachine : Q3A Title :
P i l e T y p e S i z e Date T i m e T i t l e
Mlcm Qn seq - - * . . MBEL C o m n t 3:: ;:-E-*: ;kg I MBEL Qnn seq 155 96-85-15 Ia:16 :
F i l e < t > : I Free 96976896Byte<s>
[&I [SP] Select file name "MACRO"
DriudPath :C:\GPPQ\USR Sys ten :SYSTEM Title : Machine :We Tit le :
P i l e Type S i z e Date T i n e T i t l e
Cancel<N> Pile&>: I Free 96976896Byts<r> . .
Current e d i t i n g targets w i l l be l o s t . fill right?
No<N>
"Read File screen (before setting)"
"Read File screen (after setting)"
5-17
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
D o you want t o change f i l e nans t o that is read?
NnCN)
I I
[VI
"Ladder Read screen"
<= D1 D2 I IIWJ D2 D3 I
[Alt] [l] [8] Select "Macro Registration"
"Ladder Read screen
registration destination)"
IIWJ D2 D3 (designate macrc
p-p 9 -1
[Enter] Designate step 0 as beginning of Macro Registration destination
5-18
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
5
10
"Ladder Read screen
-I<= Di D2 1 IWJ DZ D3 I- (designate macro C ~ N D registation range)
1.11 Designate the macro registration range up to step 9
[Enter] Enter macro registration range
5 - 19
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
I C 1 2 - UDI:C I t 1 _ _ 3. UD2:C 4. UD3:E 5. UD4:C I I C
I C I t
1 1 1
I Cancc 1<N>
[l] [D] [l] [Enter] [Enter] Set D1 as VDO
[2] [D] [2] [Enter] [Enter] Set 02 as VD1
[3] [D] [3] [Enter] [Enter] Set D3 as VD2
"Macro Registration screen (before setting)"
POINT
A maximum of five variable devices r (VD) can be set.
6
1. UDB:CDI 1 [Number of product R 1 2. UM:CD2 1 [Number of product B 1 3. UD2:CD3 I t12axinun nuaber of products 1
I t 1 I t 1 zm!J!lm[
5. UM:C
I Cance 1<N>
I CC:\GPPP\USR
yaten CSYOTRl 3 Title C 3. Hachins CQ31 I Title C 4. F i l e ClyICRO 3 Title C
1 3 I 1
Cancsl<W> I. I I
"Macro Regist ration screen (after setting)"
"Write File screen (before setting)"
5-20
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
" Write File
setting)"
I CC:\GPPQ\USR 1 screen (after Title C ysten YSTEn 3
Title C 3. &chine CQ31 1 4. File CMCBI 3 T i t l e C
3 1
Canccl<N>
V I [F l ] Select "Ladder Write"
5-21
, I , ?
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
Drius/Path :C:\GPPQ\USR
Hachino :4311 T i t l e : Systen :SYSTEII Title :
Pi la<r>: 1 Free 10'7347968Byte<t> Cancel<N>
2
(3) Read a registered macro file and utilize the macro.
"Read File screen (before setting)"
[Alt] [I] [9] Select "Use Macro"
"Ladder Write screen"
[SP] Select file "MACOI"
5-22
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
Driue/Path :C:\GPPQ\USR S y s t s n :SYSTEH Title : Nachine :431\ Title :
F i l e < s > : 1 Free 187347968Byte<+> 1- Cancc 1<N)
"Read File screen (after setting)"
, I '
Deuica Wane Comment4Statement) -C 1 Number of product A 2. UD1:C 1 N u m b e r a f product B 3 . UD2:C 1 )laxitmum number of products; 4. F i r s t 1/0 Number U:C 1 I CancclCN)
"Macro Use screen (before setting ) "
[ l ] [D] [ l ] [O] [Enter] Set D10 as VDO
[2] [D] [ l ] [ l ] [Enter] Set D11 as VD1
[3] [D] [ l ] [2] [Enter] Set D l 2 as VD2
[4] [O] [Enter] Set 0 as the first I10 number
5-23
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
I a 1 Nuunbsr of product I ) f-CDi0 Deuice Name
2 - UD1:CDiI 1 Nunber of product B 3. UD2:CDiZ 1 Haxinun nunber of products
"Macro Use screen (after setting)"
4. F i r s t IN0 Number U:C 81 I Cancc 1<N>
"Ladder Write screen (before
CrWfU D2 D3 macro use)"
[&I [Enter] Set step 10 as the first step to macro use
5-24
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
1 - <Number of product R > - <Number of product B > = Cllaxiun number of products > -I> DIB D11 1 ItIOU D l 9 D12 1-
B -r> D I D2 1 ItIOU DI D3 1
5 -I<= D I D2 1 [W D2 03 1
IE -I> DIE D I I 1 Imxl DIE M2 1
149 -E<= Dit3 D I I I ItIOU D I I D i 2 1
154
161 [END 1
r 5
UDE U M UD2
i t
I 149 EM
154
161
[Alt] [4] [3] Turn on statement display (OFF-ON)
"Ladder Write screen (after macro use)"
" Ladder Writ e
.I<- Dit3 MI 1 3OEND 1
41
5-25
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
(4) Macro use with macro instruction "M. file name u VD1 U VD2 U 03".
Driue/Path :C:\GPPP\USR Uachine :I2311 Tit le : system .SYSTEn Tit le :
P i l e 1- Size Date Tim Tit le
P i l e i s ) : 1 Free 1878a8288Byteit> CancelCN>
Read the file with file name "MACRO" from machine name "Q3A".
"Macro Ref Setting screen"
B -r> M ~2 I C W M M I
5 -t<= M D2 3 CHOU D2 D3 1
10 [END 1
"Ladder Read screen"
[Fl] Change Read to Write [Alt] [l] [A] .Select "Macro Ref Setting"
5-26
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
CPlOU D i D3 : El-'I> D I D2 1
5 .t<= D1 D2 1 CW D2 D3 : I
I 0 ' [END
"Ladder Write screen (before macro use)"
@ - E > DI DZ 1 CNW D1 D3 1
5 -C<= D i DZ 1 CROU D2 D3 1 I
ie [END 1
I I [F4] Convert
11)
"Ladder Write screen (after macro use)"
5-27
5. MAKING THE MOST OF YOUR QnACPU (2) MELSEC-QnA
[Ah] [4] [3] Turn on statement display (OFFjON)
IN D i D 3 1 IN W D 3 1
1 1 >
;c MayICRo : IyIcB1. I UDGi - < N u m b e r of product II U D I - ( N u n b e r of product B > UD2 = Cnaxinun number of products > ,@I[> D l 0 D l l 1 rmnr me ~ 1 2 1
"Ladder Write screen (after conversion)"
"Ladder Write screen (with statement display ON)"
5-28
IMPORTANT
(1) Design the configuration of a system to provide an external protective or safety inter
(2) The components on the printed circuit boards will be damaged by static electricity, locking circuit for the PCs.
so avoid handling them directly. If it is necessary to handle them take the following precautions.
(a) Ground your body and the work bench.
(b) Do not touch the conductive areas of the printed circuit board and its electrical parts with non-grounded tools, etc.
Under no circumstances will Mitsubishi Electric be liable or responsible for any consequential damage that may arise as a result of the installation or use of this equipment.
All examples and diagrams shown in this manual are intended only as an aid to understanding the text, not to guarantee operation. Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative examples.
Owing to the very great variety in possible applications of this equipment, you must satisfy yourself as to its suitability for your specific application.
A MlfSUBSSHI ELECTRIC CORPORATION HEAD 0FFICE:MITSUEISHI DENKl BLDG MARUNOUCHI TOKYO 100TELEX J24532 CABLE MELCOTOKYO
NAGOYA WORKS : 1 - 1 4 , YADA-MINAMI 5 , HIGASHI-KU , NAGOYA, JAPAN
When exported from Japan, this manual does not require application to the Ministry of International Trade and lndustrv for service transaction Dermission.
IB (NA) 66606-A (9607) MEE Printed in Japan Specifications subject to change without notice.