W366-E1-11 CX-Simulator V1.9 Operation Manual
W366-E1-11 CX-Simulator V1.9 Operation Manual
W366-E1-11 CX-Simulator V1.9 Operation Manual
W366-E1-11
SYSMAC
OPERATION MANUAL
Notice:
OMRON products are manufactured for use according to proper procedures by a qualified operator and only for the purposes described in this manual. The following conventions are used to indicate and classify precautions in this manual. Always heed the information provided with them. Failure to heed precautions can result in injury to people or damage to property.
DANGER
Indicates an imminently hazardous situation which, if not avoided, will result in death or serious injury. Additionally, there may be severe property damage.
WARNING
Indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury. Additionally, there may be severe property damage.
Caution
Indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury, or property damage.
Visual Aids
The following headings appear in the left column of the manual to help you locate different types of information. Note Indicates information of particular interest for efficient and convenient operation of the product.
1, 2, 3... 1. Indicates lists of one sort or another, such as procedures, checklists, etc.
OMRON, 2008
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON. No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice. Every precaution has been taken in the preparation of this manual. Nevertheless, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained in this publication.
About Upgrades:
Version 1.1
The following functions have been added to the CX-Simulator with the upgrade from Version 1.0 to Version 1.1.
Version 1.2
The following functions have been added to the CX-Simulator with the upgrade from Version 1.1 to Version 1.2.
Functionality Improved
The following functions have been improved so that the same operation as that performed by the actual PLC is performed by the CX-Simulator. (There were some differences in operation with version 1.1.) Processing when using index registers for automatic incrementing or decrementing with sequence output instructions. Processing the current EM bank is changed during execution of the ladder program. Break processing for nested FOR-NEXT loops. Processing for decrementing counters in certain ladder program structures.
vi
Version 1.3
The following functions have been added to the CX-Simulator with the upgrade from Version 1.2 to Version 1.3.
New Units in the CS and CJ Series are also supported for PLC Unit registration.
Windows XP Supported
Version 1.4
The following functions have been added to the CX-Simulator with the upgrade from Version 1.3 to Version 1.4.
New Units in the CS and CJ Series are also supported for PLC Unit registration.
Version 1.5
The changes that have been made from version 1.4 to version 1.5 of the CX-Simulator to enable support of new CPU Unit models are explained here.
CPU Unit Version Upgrade Compatibility CX-Simulator version 1.5 supports the following CS/CJ-series CPU Units with unit version 3.0.
Series CS/CJ Device type CS1G-H, CS1H-H, CJ1G-H, CJ1H-H, CJ1M
vii
Precautions
CX-Simulator version 1.5 can simulate the operations of a CS/CJ-series CPU Unit with version 3.0 on a personal computer. The simulation, however, operates differently from the actual CS/CJ-series CPU Unit with unit version 3.0 in the system. Processing when using index registers for automatic incrementing or decrementing with sequence output instructions. No-protocol communications instructions sent to the serial port of the Serial Communications Unit will not be executed. CX-Simulator version 1.5 does not support no-protocol instructions (TXDU(256) and RXDU(255)) sent to the serial port of the Serial Communications Unit and will not execute these instructions. The Comms Instructions Settings in FB field in PLC Settings is disabled. The Comms Instructions Settings in FB field (CPU Settings Tab) is a PLC setting specific to the OMRON FB library. Therefore, this setting is disabled when using CX-Simulator version 1.5. Free Running Timers in Auxiliary Area words A000 and A001 are disabled. The Auxiliary Area word 10-ms Incrementing Free Running Timer (A000) and 100-ms Incrementing Free Running Timer (A001) that are supported for CS/CJ-series CPU Units with version 3.0 or later cannot be used in simulation operations.
Version 1.6
The changes that have been made from version 1.5 to version 1.6 of the CX-Simulator to enable support of new functions are explained here.
Version 1.7
The changes that have been made from version 1.6 to version 1.7 of the CX-Simulator to enable support of new functions are explained here.
viii
Version 1.8
The changes that have been made from version 1.7 to version 1.8 of the CX-Simulator to enable support of new functions are explained here.
Version 1.9
The changes that have been made from version 1.8 to version 1.9 of the CX-Simulator to enable support of new functions are explained here.
Version 1.91
The changes that have been made from version 1.9 to version 1.91 of the CX-Simulator to enable support of new functions are explained here.
ix
Version 1.94
The changes that have been made from version 1.9 to version 1.94 of the CX-Simulator to enable support of new functions are explained here.
Version 1.95
The following functions have been added to the CX-Simulator with the upgrade from Version 1.94 to Version 1.95.
CS1H-CPU67H
CPU UNIT
Lot No. Unit version Example for unit version 2.0
CS1-H, CJ1-H, and CJ1M CPU Units manufactured on or before November 4, 2003 do not have a unit version given on the CPU Unit (i.e., the location for the unit version shown above is blank). The unit version of the CJ1-H-R CPU Units begins at version 4.0. The unit version of the CS1-H, CJ1-H, and CJ1M CPU Units, as well as the CS1D CPU Units for Single-CPU Systems, begins at version 2.0. The unit version of the CS1D CPU Units for Duplex-CPU Systems begins at version 1.1. The unit version of the CP1H/CP1L CPU Units begins at version 1.0, except for the CP1H-Y@@@@-@, for which the unit version begins at version 1.1. CPU Units for which a unit version is not given are called Pre-Ver. @.@ CPU Units, such as Pre-Ver. 2.0 CPU Units and Pre-Ver. 1.1 CPU Units. Confirming Unit Versions with Support Software CX-Programmer version 4.0 or later can be used to confirm the unit version using one of the following two methods. Using the PLC Information Using the Unit Manufacturing Information (This method can be used for Special I/O Units and CPU Bus Units as well.) Note CX-Programmer version 3.3 or lower cannot be used to confirm unit versions. PLC Information If you know the device type and CPU type, select them in the Change PLC Dialog Box, go online, and select PLC - Edit - Information from the menus. If you dont know the device type and CPU type, but are connected directly to the CPU Unit on a serial line, select PLC - Auto Online to go online, and then select PLC - Edit - Information from the menus. In either case, the following PLC Information Dialog Box will be displayed.
xi
Unit version
Use the above display to confirm the unit version of the CPU Unit. Unit Manufacturing Information In the IO Table Window, right-click and select Unit Manufacturing information - CPU Unit.
Unit version
Use the above display to confirm the unit version of the CPU Unit connected online.
xii
Using the Unit Version Labels The following unit version labels are provided with the CPU Unit.
These labels can be attached to the front of previous CPU Units to differentiate between CPU Units of different unit versions.
Meaning Designating individual CPU Units (e.g., the CS1H-CPU67H) Designating groups of CPU Units (e.g., the CS1-H CPU Units) Designating an entire series of CPU Units (e.g., the CS-series CPU Units)
xiii
Unit Versions
CS Series
Units CS1-H CPU Units Models CS1@-CPU@@H Unit versions Unit version 4.0 Unit version 3.0 Unit version 2.0 Pre-Ver. 2.0 CS1D CPU Units Duplex-CPU Systems CS1D-CPU@@H Unit version 1.2 Unit version 1.1 Pre-Ver. 1.1 Single-CPU Systems CS1D-CPU@@S CS1 CPU Units CS1 Version-1 CPU Units CS1@-CPU@@ CS1@-CPU@@-V1 Unit version 2.0 No unit version. No unit version.
CJ Series
Units CJ2 CPU Units Models CJ2H-CPU6@-EIP Unit versions Unit version 1.3 Unit version 1.2 Unit version 1.1 Unit version 1.0 CJ2H-CPU6@ Unit version 1.3 Unit version 1.2 Unit version 1.1 CJ2M-CPU3@ CJ2M-CPU1@ CJ1-H CPU Units CJ1H-CPU@@H-R CJ1@-CPU@@H CJ1@-CPU@@P Unit version 1.0
Unit version 4.0 Unit version 4.0 Unit version 3.0 Unit version 2.0 Pre-Ver. 2.0
CJ1M-CPU12/13 CJ1M-CPU22/23
Unit version 4.0 Unit version 3.0 Unit version 2.0 Pre-Ver. 2.0
CJ1M-CPU11/21
CP Series
Units CP1H CPU Units Models CP1H- X@@@@-@ CP1H- XA@@@-@ CP1H- Y@@@@-@ CP1L CPU Units CP1L- M@@@@-@ CP1L- L@@@@-@ Unit versions Unit version 1.1 Unit version 1.0 Unit version 1.1 Unit version 1.0
Note:
CP-series Unit Versions and Supported Functions Unit version 1.0 or 1.1 of the CP-series CP1H/CP1L CPU Units is equivalent to unit version 3.0 of the
xiv
CS/CJ-series CPU Units. Functions added for unit version 4.0 or later of the CS/CJ-series CPU Units are not supported by the CP-series CP1H/CP1L CPU Units. NSJ Series
Models NSJ@-TQ@@(B)-G5D NSJ@-TQ@@(B)-M3D Unit versions Unit version 3.0
OK OK
---------
New application Number-Text String Conversion Instructions: OK instructions NUM4, NUM8, NUM16, STR4, STR8, and STR16 TEXT FILE WRITE (TWRIT) Using ST language programming in tasks OK
OK with CX--Programmer Ver. 7.2 or higher OK with CX--Programmer Ver. 7.2 or higher
xv
OK OK
---------
New application Number-Text String Conversion Instructions: OK instructions NUM4, NUM8, NUM16, STR4, STR8, and STR16 TEXT FILE WRITE (TWRIT) Using ST language programming in tasks OK
OK with CX--Programmer Ver. 7.2 or higher OK with CX--Programmer Ver. 7.2 or higher
xvi
Functions Supported for Unit Version 3.0 or Later The following tables list the functions added for unit version 3.0 and supported by the CX-Programmer. CX-Programmer version 5.0 or higher and CX-Simulator version 1.5 or higher are required to use these functions. CS1-H CPU Units
Function CS1@-CPU@@H Unit version 3.0 or later Function blocks Serial Gateway (converting FINS commands to CompoWay/F commands at the built-in serial port) Comment memory (in internal flash memory) Expanded simple backup data New application TXDU(256), RXDU(255) (support no-protocol instructions communications with Serial Communications Units with unit version 1.2 or later) Model conversion instructions: XFERC(565), DISTC(566), COLLC(567), MOVBC(568), BCNTC(621) Special function block instructions: GETID(286) Additional instruction functions TXD(235) and RXD(236) instructions (support no-protocol communications with Serial Communications Boards with unit version 1.2 or later) OK --OK OK OK Other unit versions -------
OK
---
OK OK
-----
OK
---
OK OK
-----
xvii
Functions Supported for Unit Version 2.0 or Later The following tables list the functions added for unit version 2.0 and supported by the CX-Programmer. CX-Programmer version 4.0 or higher and CX-Simulator version 1.4 or higher are required to use these functions. CS1-H CPU Units
Function CJ1-H CPU Units (CJ1@-CPU@@H) Unit version 2.0 or later Downloading and Uploading Individual Tasks OK ------Other unit versions
Improved Read Protection Using Passwords OK Write Protection from FINS Commands Sent OK to CPU Units via Networks Online Network Connections without I/O Ta- OK bles
---
Communications through a Maximum of 8 Network Levels Connecting Online to PLCs via NS-series PTs Setting First Slot Words Automatic Transfers at Power ON without a Parameter File
OK OK OK for up to 64 groups OK
Automatic Detection of I/O Allocation --Method for Automatic Transfer at Power ON Operation Start/End Times New Application Instructions MILH, MILR, MILC =DT, <>DT, <DT, <=DT, >DT, >=DT BCMP2 GRY TPO DSW, TKY, HKY, MTR, 7SEG EXPLT, EGATR, ESATR, ECHRD, ECHWR Reading/Writing CPU Bus Units with IORD/IOWR PRV2 OK OK OK OK OK OK OK OK
OK
---
xviii
Unit version 1.1 or later OK OK OK OK OK OK (Unit version 1.2 or later) ------OK OK OK OK OK ---------
Pre-Ver. 1.1
xix
OK
--- (Supported OK if I/O tables are automatically generated at startup.) --OK from lot number 030201 OK OK
OK
Connecting Online to PLCs via NS-series OK PTs Setting First Slot Words Automatic Transfers at Power ON without a Parameter File Automatic Detection of I/O Allocation Method for Automatic Transfer at Power ON Operation Start/End Times New application instructions MILH, MILR, MILC OK for up to 64 groups OK OK
OK OK
---------
OK OK OK OK
OK OK OK OK OK
TPO DSW, TKY, HKY, MTR, 7SEG EXPLT, EGATR, ESATR, ECHRD, ECHWR Reading/Writing CPU Bus Units with IORD/IOWR PRV2
OK OK OK
OK OK OK
OK
---
OK
---
OK
---
---
---
xx
Functions Supported by Unit Version for CJ2 CPU Units (CJ2H-CPU6@-EIP, CJ2H-CPU6@)
Functions Added forUnit Version 1.3 CX-Programmer version 9.1 or higher is required to use functions added for unit version 1.3.
CPU Units Models Unit version Function Special instructions for specific CPU Bus Units CJ1W-NC281/NC481/NC881 Position Control Units: PCU HIGH-SPEED POSITIONING (NCDMV(218)) CJ1W-NC281/NC481/NC881 Position Control Units: PCU POSITIONING TRIGGER (NCDTR(219)) New special instructions SIGNED AREA RANGE COMPARE (ZCPS(117)) DOUBLE SIGNED AREA RANGE COMPARE (ZCPSL(118)) Supported. CJ2H CPU Units CJ2H-CPU6@-EIP CJ2H-CPU6@ Unit version 1.3
Supported.
Supported. Supported.
Unit Version 1.2 or Later CX-Programmer version 8.3 or higher must be used to enable using the functions added for unit version 1.2.
Unit Model Unit version Item CJ2H CPU Unit CJ2H-CPU6@-EIP CJ2H-CPU6@ Unit version 1.2
Supported.
CX-Programmer version 8.1 or higher must be used to enable using the functions added for unit version 1.1.
Unit Model Unit version Item High-speed interrupt function Decreased overhead time for interrupt tasks Minimum interval setting of 0.1 ms for Scheduled Interrupt Task Changing the minimum cycle time setting in MONITOR mode Synchronous unit operation Supported. Supported. Not supported. Not supported. Supported. Not supported. CJ2H CPU Unit CJ2H-CPU6@-EIP CJ2H-CPU6@ Unit version 1.1 Unit version 1.0
xxi
Unit Version 1.0 All functions that are supported by unit version 4.0 or later of the CJ1 CPU Units are supported by unit version 1.0 of the CJ2 CPU Units. CX-Programmer version 8.0 or higher must be used to enable using unit version 1.0 of the CJ2 CPU Units.
xxii
xxiii
: Cannot be used, : Can be used except for new functions added for unit versions, : Can be used Note 1. It is not necessary to upgrade the version of the CX-Programmer if functionality that was enhanced for the upgrade of the CPU Unit will not be used. 2. CX-Programmer version 8.1 or higher is required to use the functions added for unit version 1.1. The high-speed interrupt function and changing the minimum cycle time setting in MONITOR mode, however, are also supported by CX-Programmer version 8.02. A Programming Console cannot be used with a CJ2H CPU Unit.
3.
Unit Versions and Programming Devices for CPU Units Other Than CJ2 CPU Units
CPU Unit Functions Required Programming Device CX-Programmer Ver. 3.3 CS/CJ Series CPU Units, Unit Ver. 4.0 CS/CJ Series CPU Units, Unit Ver. 3.0 CS/CJ Series CPU Units, Unit Ver. 2.0 CS1D CPU Units for Single-CPU Systems, Unit Ver. 2.0 CS1D CPU Units for Duplex-CPU Systems, Unit Ver.1.1 Functions added for unit version 4.0 Functions added for unit version 3.0 Functions added for unit version 2.0 Functions added for unit version 2.0 Functions added for unit version 1.1 Ver. 4.0 Ver. 5.0 Ver. 6.0 Ver. 7.0 Ver. 7.2 Ver. 8.0 or later (See note 4.)
: Cannot be used, : Can be used except for new functions added for unit versions, : Can be used Note 1. As shown above, there is no need to upgrade to CX-Programmer version 4.0 as long as the functions added for unit version 2.0 or unit version 1.1 are not used. 2. CX-Programmer version 7.0 or higher is required to use functions added for unit version 4.0. Additional functions are supported if CX-Programmer version 7.2 or higher is used.
xxiv
3.
Unit version 4.2 of the CJ1H-CPU6@-R is supported only by CX-Programmer version 8.0 or higher.
4. CX-Programmer version 8.0 or higher is required to use unit version 4.2 of the CJ1H-CPU6@-R. Unit Versions of CP-series CPU Units and Programming Devices
CPU Unit Model Unit version Ver. 1.1 Ver. 1.0 Ver. 1.1 Ver. 1.0 Ver. 1.0 CX-Programmer version Ver. 6.11 OK OK ------Ver. 6.20 OK OK OK ----Ver. 7.11 OK OK OK OK --Ver. 8.2 or later OK OK OK OK OK
Note 1.
Functionality of CP1H CPU Units with unit version 1.0 or 1.0 and CP1L CPU Units with unit version 1.0 is the same as that for CS/CJ-series CPU Units with unit version 3.0. The functionality added for CS/CJ-series CPU Unit unit version 4.0 is not supported. There is no need to upgrade to CX-Programmer as long as the upgraded functionality is not used.
2.
Device Type Setting The unit version does not affect the setting made for the device type on the CX-Programmer. Select the device type as shown in the following table regardless of the unit version of the CPU Unit.
Series CS Series CPU Unit group CS1-H CPU Units CPU Unit model CS1G-CPU@@H CS1H-CPU@@H CS1D CPU Units for Duplex-CPU Systems CS1D CPU Units for Single-CPU Systems CJ Series CJ2H CPU Units CJ2M CPU Units CJ1-H CPU Units CS1D-CPU@@H CS1D-CPU@@S Device type setting on CX-Programmer CS1G-H CS1H-H CS1D-H (or CS1H-H) CS1D-S
CJ2H-CPU6@(-EIP) CJ2H CJ2M-CPU@@ CJ1G-CPU@@H CJ1G-CPU@@P CJ1H-CPU@@H-R CJ1H-CPU@@H CJ2M CJ1G-H CJ1H-H CJ1M CP1H
CP Series
CP1L
Note
Device types not supported by the CX-Programmer version that is being used will not be displayed on the pull-down list of the Device type Field.
xxv
xxvi
xxvii
TABLE OF CONTENTS
PRECAUTIONS....................................................................................................... XL
1 2 3 4 Intended Audience ................................................................................................................................................ xli General Precautions .............................................................................................................................................. xli Safety Precautions ................................................................................................................................................ xli Application Precautions....................................................................................................................................... xlii
SECTION 1 INTRODUCTION........................................................................................................1
1-1 What Is the CX-Simulator? ...................................................................................................................................... 2 1-2 Features .................................................................................................................................................................... 9 1-3 Convenient Functions............................................................................................................................................. 13 1-4 Applicable PLC models and Computers ................................................................................................................ 14 1-5 Operation List Arranged by Purpose...................................................................................................................... 16 1-6 Comparison of CX-Simulator and SYSMAC CS/CJ-series PLCs ......................................................................... 18
xxviii
APPENDIX HOW TO USE DATA TRACE RECORDING TOOL ....................................... 241 REVISION HISTORY............................................................................................ 253
xxix
CXONE-AL@@C-V4/ AL@@D-V4 CX-One Setup Manual CXONE-AL@@C-V4/ AL@@D-V4 CX-Programmer Ver. 9 Operation Manual CXONE-AL@@C-V4/ AL@@D-V4 CX-Programmer Ver. 9 Operation Manual Function Blocks/Structured Texts CXONE-AL@@C-V4/ AL@@D-V4 CX-Integrator Operation Manual CJ Series CJ2 CPU Unit Hardware Users Manual CJ2H-CPU6@-EIP, CJ2H-CPU6@, CJ2M-CPU1@, CJ2M-CPU3@
W463 W446
W447
W464 W472
Describes the operation of the CX- Integrator. Provides the following information on the CJ2 CPU Units: Overview, system design, hardware specifications, hardware settings, installation, wiring, maintenance, and troubleshooting. Use this manual together with the CJ2 CPU Unit Software Users Manual (W473).
CJ Series CJ2 CPU Unit Software Users Manual CJ2H-CPU6@-EIP, CJ2H-CPU6@, CJ2M-CPU1@, CJ2M-CPU3@
W473
---
Provides the following information on the CJ2 CPU Units: Overview of CPU Unit operation, programming, software settings, CPU Unit functions, and system startup. Use this manual together with the CJ2 CPU Unit Hardware Users Manual (W472).
SYSMAC CS Series CS1G/H-CPU@@-EV1, CS1G/H-CPU@@H Programmable Controllers Operation Manual SYSMAC CJ Series CJ1H-CPU@@H-R, CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1M-CPU@@ Programmable Controllers Operation Manual SYSMAC CS/CJ/NSJ Series CS1G/H-CPU@@-EV1, CS1G/H-CPU@@H, CS1D-CPU@@H, CS1D-CPU@@S, CJ1H-CPU@@H-R, CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1M-CPU@@, NSJ@-@@@@(B)-G5D, NSJ@-@@@@(B)-M3D Programmable Controllers Programming Manual
W339
To learn the basic specifications of the CS-series PLCs, including a basic outline, settings, installation, and maintenance. To learn the basic specifications of the CJ-series PLCs, including a basic outline, settings, installation, and maintenance.
Describes the features, system configuration design, installation, wiring, I/O memory allocation, and troubleshooting of the CS-series PLCs. Use this together with the Programming Manual (W394). Describes the features, system configuration design, installation, wiring, I/O memory allocation, and troubleshooting of the CJ-series PLCs. Use this together with the Programming Manual (W394).
W393
W394
Describes the programming, task functions, file memory functions, and other functions of the CS/CJ-series PLCs.
xxx
Name SYSMAC CS/CJ/NSJ Series CS1G/H-CPU@@-EV1, CS1G/H-CPU@@H, CS1D-CPU@@H, CS1D-CPU@@S, CJ2H-CPU6@-EIP, CJ2H-CPU6@, CJ2M-CPU1@, CJ2M-CPU3@, CJ1H-CPU@@H-R, CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1M-CPU@@, NSJ@-@@@@(B)-G5D, NSJ@-@@@@(B)-M3D Programmable Controllers Instructions Reference Manual SYSMAC CS/CJ/CP/NSJ Series CS1G/H-CPU@@-EV1, CS1G/H-CPU@@H, CS1D-CPU@@H, CS1D-CPU@@S, CJ2H-CPU6@-EIP, CJ2H-CPU6@, CJ2M-CPU1@, CJ2M-CPU3@, CJ1H-CPU@@H-R, CJ1G-CPU@@, CJ1M-CPU@@, CJ1G-CPU@@P, CJ1G/H-CPU@@H, CS1W-SCU@@-V1, CS1W-SCB@@-V1, CJ1W-SCU@@-V1, CP1L-M/L@@@-@, CP1H-X@@@@-@, CP1H-XA@@@@-@, CP1H-Y@@@@-@, CP1E-E@@D@-@, CP1E-N@@D@-@, NSJ@-@@@@ (B)-G5D, NSJ@-@@@@(B)-M3D Communications Commands Reference Manual NSJ5-TQ@@(B)-G5D NSJ5-SQ@@(B)-G5D NSJ8-TV@@(B)-G5D NSJ10-TV@@(B)-G5D NS12-TS@@(B)-G5D NSJ Series NSJ Controllers Operation Manual
Contents Describes the details of the instruction language. For programming, use this together with the CS Series and CJ Series Operation Manuals (CS Series: W339, CJ Series: W393), and Programming Manual (W394).
W342
To learn about communications commands addressed to CS/CJ/CP-series CPU Units and NSJ-series Controllers.
Describes the following information. C-mode commands FINS commands Note: Refer to this manual when sending C-mode or FINS commands to the CPU Unit. This manual describes commands addressed to the CPU Unit without reference to the communications path. (Commands can be sent via the serial ports on the CPU Unit, ports on a Serial Communications Board or Unit, or ports on Communications Units.)
W452
To learn the basic specifications of the NSJ-series NSJ Controllers, including a basic outline, settings, installation, and maintenance.
Describes the following information about the NSJ-series NSJ Controllers: Overview and features Designing the system configuration Installation and wiring I/O memory allocations Troubleshooting and maintenance Use this manual in combination with the following manuals: SYSMAC CS Series Operation Manual (W339), SYSMAC CJ Series Operation Manual (W393), SYSMAC CS/CJ Series Programming Manual (W394), and NS-V1/-V2 Series Setup Manual (V083)
CP1H-X@@@@-@, CP1H-XA@@@@-@, CP1H-Y@@@@-@, SYSMAC CP Series CP1H CPU Unit Operation Manual
W450
To learn the basic specifications of the CP-series CP1H CPU Units, including a basic outline, settings, installation, and maintenance.
W462
To learn the basic specifications of the CP-series CP1L CPU Units, including a basic outline, settings, installation, and maintenance.
CP1H-X@@@@-@, CP1H-XA@@@@-@, CP1H-Y@@@@-@, CP1L-M@@@@-@, CP1L-L@@@@-@ SYSMAC CP Series CP1H/CP1L CPU Unit Programming
W451
Provides the following information on the CP Series CP1H CPU Unit: Overview/Features System configuration Mounting and wiring I/O memory allocation Troubleshooting Use this manual together with the CP1H Programmable Controllers Programming Manual (W451). Provides the following information on the CP Series CP1L CPU Unit: Overview/Features System configuration Mounting and wiring I/O memory allocation Troubleshooting Use this manual together with the CP1H Programmable Controllers Programming Manual (W451). Provides the following information on the CP Series CP1H/CP1L CPU Unit: Programming instructions Programming methods Tasks
xxxi
Name Manual
Cat. No.
Use
Contents
WARNING Failure to read and understand the information provided in this manual may result in
personal injury or death, damage to the product, or product failure. Please read each section in its entirety and be sure you understand the information provided in the section and related sections before attempting any of the procedures or operations given.
xxxii
xxxiii
xxxiv
LIMITATIONS OF LIABILITY
(1) THE ABOVE WARRANTY SHALL CONSTITUTE THE USERS SOLE AND EXCLUSIVE REMEDIES AGAINST OMRON AND THERE ARE NO OTHER WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL OMRON BE LIABLE FOR ANY LOST PROFITS OR OTHER INDIRECT, INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF USE OF THE SOFTWARE. (2) OMRON SHALL ASSUME NO LIABILITY FOR DEFECTS IN THE SOFTWARE BASED ON MODIFICATION OR ALTERATION OF THE SOFTWARE BY THE USER OR ANY THIRD PARTY. (3) OMRON SHALL ASSUME NO LIABILITY FOR SOFTWARE DEVELOPED BY THE USER OR ANY THIRD PARTY BASED ON THE SOFTWARE OR ANY CONSEQUENCE THEREOF.
xxxv
Application Considerations
SUITABILITY FOR USE
THE USER SHALL NOT USE THE SOFTWARE FOR A PURPOSE THAT IS NOT DESCRIBED IN THE ATTACHED USER MANUAL.
xxxvi
Disclaimers
CHANGE IN SPECIFICATIONS
The software specifications and accessories may be changed at any time based on improvements or for other reasons.
EXTENT OF SERVICE
The license fee of the Software does not include service costs, such as dispatching technical staff.
xxxvii
Notation
This manual describes operation items as follows:
Notation Examples
"[ ]" indicates a menu name, key, dialog box name, or button name. However, in some cases where it is obviously a menu name, [ ] is not attached. Example: [File] menu, [Tab] key, [Search] dialog box, [OK] button "|" indicates the hierarchy for a menu or display. Example: "Select [File] | [Create]" indicates "select [Create] from the [File] menu." "Select [PLC] | [Operation Mode] | [Monitor]" indicates "select [Operation Mode] from the [PLC] menu and then select [Monitor]." "Select [System Status] | [Settings] | [UM Setting]" indicates "select the [Settings] button from the [System Status] window and then select [UM Setting] from the pop-up menu." "[ ] + [ ]" indicates pressing multiple keys simultaneously. Example: "[Ctrl] + [S]" indicates "press [S] key with the [Ctrl] key held down." "[Ctrl] + [Shift] + [L]" indicates "press the [L] key with the [Ctrl] and [Shift] keys held down."
xxxviii
xxxix
PRECAUTIONS
This section provides general precautions for using the Programmable Controller (PLC) and related devices. The information contained in this section is important for the safe and reliable application of the Programmable Controller. You must read this section and understand the information contained before attempting to set up or operate a PLC system. 1 Intended Audience ......................................................................................................................... xli 2 General Precautions ....................................................................................................................... xli 3 Safety Precautions.......................................................................................................................... xli 4 Application Precautions ................................................................................................................ xlii
xl
Safety Precautions
Intended Audience
This manual is intended for the following personnel, who must also have knowledge of electrical systems (an electrical engineer or the equivalent). Personnel in charge of installing FA systems. Personnel in charge of designing FA systems. Personnel in charge of managing FA systems and facilities.
General Precautions
The user must operate the product according to the performance specifications described in the operation manuals. Before using the product under conditions which are not described in the manual or applying the product to nuclear control systems, railroad systems, aviation systems, vehicles, combustion systems, medical equipment, amusement machines, safety equipment, and other systems, machines, and equipment that may have a serious influence on lives and property if used improperly, consult your OMRON representative. Make sure that the ratings and performance characteristics of the product are sufficient for the systems, machines, and equipment, and be sure to provide the systems, machines, and equipment with double safety mechanisms. This manual provides information for programming and operating the Unit. Be sure to read this manual before attempting to use the Unit and keep this manual close at hand for reference during operation.
WARNING
It is extremely important that a PLC and all PLC Units be used for the specified purpose and under the specified conditions, especially in applications that can directly or indirectly affect human life. You must consult with your OMRON representative before applying a PLC System to the above-mentioned applications.
Safety Precautions
WARNING
The CX-Simulator simulates PLC operation. However, there are some differences in operation and timings between those of the CX-Simulator and the actual PLC system. Be sure to confirm operation on the actual system as well as debugging the programs on the CX-Simulator before running the actual system. Unexpected operation may cause an accident. Enabling serial communications function of the CX-Simulator may affect the operation of devices connected to the computer. When external devices are not being used, do not enable the serial communications function. Unexpected operation of the external devices may cause an accident. When the CX-Simulator is used together with the Data Link function, the Memory Mapping function of the FinsGateway, or the Cyclic Server of the FinsServer Series, the operation of external devices connected to the personal computer may be affected. Do not activate these functions if they do not need to be used simultaneously. Unexpected operation of the external devices may cause an accident.
Caution
Caution
xli
Application Precautions
Application Precautions
Observe the following precautions when using the CX-Simulator. Confirm the destination is the CX-Simulator when the CX-Simulator is connected online with the CX-Programmer or other applications. When the CX-Simulator is disabled or not connected to the Simulator, the actual system may be activated. Confirm the destination is the PLC when another application connects online with the actual system while the CX-Simulator is activated. Connection may be made not with the actual system but with the CX-Simulator.
xlii
SECTION 1 Introduction
1-1 What Is the CX-Simulator? .......................................................................................................... 2 1-1-1 Summary .......................................................................................................................... 2 1-1-2 Software Configuration of CX-Simulator ........................................................................ 3 1-1-3 Basic Block Diagram........................................................................................................ 5 1-1-4 Summary of CX-Simulator Functions (Comparisons with Actual PLC) ......................... 6 1-2 Features......................................................................................................................................... 9 1-2-1 Features ............................................................................................................................ 9 1-3 Convenient Functions ................................................................................................................. 13 1-4 Applicable PLC models and Computers..................................................................................... 14 1-4-1 Applicable PLC models.................................................................................................. 14 1-4-2 Computer ........................................................................................................................ 15 1-5 Operation List Arranged by Purpose .......................................................................................... 16 1-5-1 Setting Operation Environment...................................................................................... 16 1-5-2 Program Execution ......................................................................................................... 16 1-5-3 Program Debugging ....................................................................................................... 16 1-5-4 Monitor the Status .......................................................................................................... 17 1-5-5 Set Serial Communications Settings............................................................................... 17 1-5-6 Set Network Communications Parameters ..................................................................... 17 1-5-7 Execute Virtual External Input....................................................................................... 17 1-6 Comparison of CX-Simulator and SYSMAC CS/CJ-series PLCs ............................................. 18
Section 1-1
Section 1-1
User program
Inside the computer
Virtual Units
Virtual CPU Unit (CS/CJ/CP Series)
CX- Programmer
CX-Simulator Debugging program Various input data generation tools User program
Computer
Application programs (e.g. CX-Programmer) Debugger Virtual External Input Tool (See note)
CPU Unit
:CX-Simulator
Section 1-1
Contents A platform for CS/CJ/CP-series PLC Emulation Consists of multiple units. Default: Consists of the CPU Unit and the Simulator Communications Unit. CPU Unit A virtual unit corresponding to the actual CPU Unit, including application programs (UM1), debugging programs (UM2), and I/O memory areas. Simulator Communications The CX-Simulator's own virtual and general-purpose Unit communications unit, corresponding to PLC's network communications unit. Possible to communicate with the CX-Programmer. FinsGateway (ver- Connect Simulator Communications Unit in the Ladder Engine with FinsGateway version 2 or higher) sion 2 or higher. Two types are available: Virtual Controller Link Unit and Virtual Ethernet Unit. The CX-Programmer also performs FINS communications with the LadVirtual Communi- der Engine via the Virtual Communications Unit. cations Unit (See note.) Debugger Controls the Ladder Engine and executes various CX-Simulator's own debugging functions. For virtual external Debugging program (UM2) Possible to simulate I/O operation with a program in the I/O functions program area for debugging other than the area for applications (UM1). Command log The log for CX-Programmer's operations (e.g. I/O memory change, Force set/reset) is saved in a file (Command log file). Possible to replay operation for the Ladder Engine using the Data Replay Tool.
Note The FinsGateway Virtual Communications Unit is different from the FinsGateway itself. CX-Simulator does not include the FinsGateway itself.
Section 1-1
Item For virtual external Virtual ExI/O functions ternal Input Tool
Contents Read data in sequence from Command log file, Data Trace file, and Data Replay file, and issue FINS commands to the Ladder Engine to regenerate input data. I/O CondiChange contents of designated I/O memory areas when tions Tool the contents satisfy certain conditions. Data Trace Possible to input trace data (Data trace file) actually Recording obtained from PLC to the Ladder Engine using the Data Tool Replay Tool. Possible to generate long-term data. Multipoint Possible to acquire trace data of more than 50 words from Data Collec- an actual PLC and to input to the Ladder Engine using the tion Tool Data Replay Tool. FinsGateFINS commands send/receive to/from application programs on the way Virtual Computers and the CPU Unit of FinsGateway are possible. Screen discomm. Unit/ play of send messages is also possible. FINS commands send is not Simulator possible (receive is possible). Communications Unit Data Replay Tool
CPU Unit
Debugging program Application program
Section 1-1
Inner Board
*1: Excluding Controller Link Unit, Ethernet Unit, and Serial Communications Unit. *1: Excluding Serial Communications Board
Peripheral device
Program
Task function
Available
None CX-Programmer on the same computer (communicate via FinsGateway Virtual Communications Unit) unusable Application program Share I/O mem(UM1) ory areas. Debugging program (UM2): For external I/O data generation Available (equivalent)
Section 1-1
Item Actual PLC Operating mode Program mode Monitor mode and Run mode Minimum Cycle Time
CX-Simulator Stop Continuous execution of scan Logical cycle time: Substitute cycle time for set value. Actual cycle time: Regulate actual execution time of one cycle on the computer. Scan Run (only one scan) Continuous Scan Run (one scan at regular intervals) Step Run (only one step) Continuous Step Run (repeat address execution at regular intervals) Block Run (Start point, break point, and I/O break conditions can be set.) Scan Replay (Return to the start point of the scan when pausing.) Reset Available PLC unit registration instead (No slot setting) None (Only for cycle time calculation. Controller Link Unit, Ethernet Unit, and Serial Communications Board/Unit performs virtual operation.) None (Only for cycle time calculation. Controller Link Unit, Ethernet Unit, and Serial Communications Board/Unit performs virtual operation.) Generate virtual external input by one of the followings. Overwrite I/O memory areas using the debugging program. Issue FINS commands using the command log and the Data Replay Tool. Issue FINS commands using the data trace file and the Data Replay Tool. Issue FINS commands using the data replay file and the Data Replay Tool. Overwrite I/O memory areas using the I/O Conditions Tool. Virtual cycle time: Estimated cycle time if operated on the actual CS/CJ/CP-series CPU (Application program) Computer cycle time: Actual cycle time on the computer (Application program + debugging program) Available Available (By software, some functions only)
None
Peripheral servicing
Available
External input
Available
Cycle time
Available Available
Section 1-1
Item Network communications unit Serial Communications Board/Unit Other units Various funcForce-set/reset tions Differential monitor Data trace Change set value of timer/counter Online edit Serial communications Network communications Operation of each unit
CX-Simulator Available (Simulator Communications Unit, Ethernet Unit, and Controller Link Unit) Available (Using SYSMAC WAY Host Link System, NT Link, or No-protocol) None Available Available Available Available
Available Available (Only message display) Available (Using FinsGateway Virtual Communications Unit, where send/receive to/from the nodes in the computer.)
Features
Section 1-2
1-2 Features
Using the CX-Simulator with the following features can reduce man-days for program debugging.
1-2-1 Features
Possible to simulate operation of the Virtual CPU Unit on the computer.
The CX-Simulator simulates operation of the SYSMAC CS/CJ/CP-series CPU Unit. The operation of programs can be easily checked without an actual PLC being connected. Using the CX-Simulator combined with the CX-Programmer allows to develop/debug programs on a single computer. Easily use the CX-Programmer on the same computer Programs for the Virtual CPU Unit on the CX-Simulator can be seamlessly debugged with the CX-Programmer that has been used. The powerful monitoring functions (including those for a ladder diagram window and present values) can be used as they used to be. Furthermore, when CX-Programmer version 3.0 or higher is used with CX-Simulator version 1.3, the CX-Simulator can be started and placed online from the CX-Programmer. An estimated cycle time for operation on the actual PLC can be obtained as a virtual cycle time, which is different from an elapsed time on the computer. Use it as a tentative time for operation on the actual PLC.
Start point, break point, and I/O break conditions Scan Replay Check the number and the time of executions of each task Simulated startup of interrupt tasks
Serial communications
In the CX-Simulator, debugging serial communications is possible by: (1) actual communications to an external serial communications device using a
Features
Section 1-2
COM port on the computer, (2) screen display of send messages, or (3) input/output from/to a file. Computer (1)
Debugger: Screen display
Serial Communications Server
FinsGateway
RS-232C
Display the contents of send messages sent by serial communications instructions (No external output is performed.).
Disabling serial communica- Disabling serial communications instructions is possible by settings. This tions instructions possible feature will be used when debugging a program section that is not related to serial communications.
10
Features
Section 1-2
The CX-Simulator can send/receive FINS commands to nodes (the CPU Unit itself, application programs using FinsGateway, or the CPU Unit for FinsGateway) in the computer using network communications instructions in the CPU Unit. This capability enables debugging of network communications with the CPU Unit itself or the CPU Unit for FinsGateway as the tentative communications target. Computer
Application programs
CPU Unit
CPU Unit
The CX-Simulator can receive external FINS commands from external networked computers or actual PLCs.
Computer
Application programs FinsGateway
Virtual Communications Unit
CPU Unit
Display FINS messages sent with network communications instructions on the message display window. (No actual send is executed.)
11
Section 1-2
The CX-Simulator can generate/replay virtual external inputs using various methods to verify program operation. Replay input operation using Save the history of manual input operation (e.g. I/O set/reset by the the command log CX-Programmer and change of DM PVs) and settings by application programs, as a command log file. The saved data can be used instead of the input to the Ladder Engine by replaying using the data replay function as required. Replay inputs using traced data Replay the data of data trace obtained from the actual PLC by the CX-Programmer or the data monitored via a time chart, as inputs to the Ladder Engine using the data replay function.
Replay inputs using the data Replay data of the data reply file (a CSV-format text file) as inputs to ladder reply file engine. The data replay file can be created using commercially available spreadsheet software (e.g. MS-Excel). Simulate I/O using a debugging program Hold a program to generate debugging data (debugging program) besides programs for actual applications (application programs). Input data can be produced using the debugging program. This capability enables to simulate I/O. (Application programs and the debugging program share the I/O memory areas.) When the contents of designated I/O memory area (bits or words) satisfy the contents of condition expression; the values are set to the designated I/O memory area after the designated delay time. Multiple expressions can be set.
12
Convenient Functions
Section 1-3
13
Section 1-4
CJ
Note 1. In this manual, always assume that " CS/CJ-series PLC" also implies CP-series PLCs unless otherwise specified. When performing simulations for a CP-series PLC, use the instructions for the CS/CJ-series PLC. Unit version 1.0 or 1.1 of the CP-series CPU Units is equivalent to unit version 3.0 of the CS/CJ-series CPU Units. Functions added for unit version 4.0 or later of the CS/CJ-series CPU Units are not supported by the CP-series CPU Units. Functions not supported by CP-series PLCs, however, cannot be simulated. 2. In this manual, always assume that "CJ-series PLC" also implies the Controller Section of an NSJ-series NSJ Controller unless otherwise specified. When performing simulations for the Controller Section of the NSJ Controller, use the instructions for the CJ-series PLC. 3. The functions supported for CJ2-series CPU Units correspond to those for CS/CJ-series Units with unit version 4.0 or later.
14
Section 1-4
1-4-2 Computer
The installation procedure for the independent CD-ROM is provided here. Refer to the CX-One Setup Manual (W463, provided with the CX-One) for the installation procedure for the CX-One. Cat. No. W463 Model CXONE-AL@@CV4/AL@@D-V4 Manual name CX-One Setup Manual Contents An overview of the CX-One FA Integrated Tool Package and the CX-One installation procedure
The required RAM memory capacity depends on the size of program created with the CX-Programmer. CX-Simulator will be slow if run on a computer with less than the required RAM memory capacity.
15
Section 1-5
16
Section 1-5
17
Section 1-6
18
Section 1-6
Data Areas
I/O Area Special I/O Unit Area DeviceNet Area and SYSMAC BUS Area
CS/CJ-series PLC CIO 0000 to CIO 0319 CIO 2000 to CIO 2959
CX-Simulator Not allocated actually even if the unit is set. Only Serial Communications Units and Network Communications Units are allocated. Not allocated actually even if the unit is set.
Data Areas
PLC Link Words Optical I/O Unit and I/O Terminal Area Link Relay Area (LR) Work/ Internal I/O area Work Area (WR) Temporary Relay Area Holding Relay Area(HR) Auxiliary Relay Area (AR) DM Area
DeviceNet Area: CIO 0050 to CIO 0099, CIO 0350 to CIO 0399 SYSMAC BUS Area: CIO 3000 to CIO 3049 CIO 0247 to CIO 0250 and A442 I/O Terminal Area: CIO 3100 to CIO 3131
Link Area: CIO 1000 to CIO 1199 Internal I/O Area: CIO 1200 to CIO 1499 CIO 3800 to CIO 6143 Work Area: W000 to W511 TR 00 to TR 15 H 000 to H 511 Auxiliary Area: A 000 to A 959 For CJ2-series PLCs: A 000 to A 1471 and A 10000 to A 11535 DM Area D00000 to D32767 D20000 to D29599 are used by Special I/O Units, D30000 to D31599 are used by CPU Bus Units, and D32000 to D32099 are used by Inner Boards. The Error Log is stored in A100 to A199 and the PLC Setup is stored in the Parameter Area (not a part of I/O Memory). CS/CJ-series CPU Units: EM Area E00000 to E32767 (13 banks max.) CJ2H CPU Units: EM Area E00000 to E32767 (25 banks max.) CJ2M CPU Units: EM Area E00000 to E32767 (4 banks max.) The EM Area in the CS/CJ-series CPU Unit can be accessed directly by most instructions. (There is no EM Area in the CP-series CPU Unit.) Regular instructions can access data in the current bank or any other bank. Part of the EM Area can be converted for use as a file memory. T0000 to T4095 C0000 to C4095 (Timer and counter numbers are independent.)
Same as shown at left. Same as shown at left. Same as shown at left. Same as shown at left. (Refer to 9-3 I/O Memory Allocation for details. Same as shown at left.
EM Area
19
Section 1-6
Same as shown at left.
20
Section 1-6
Data Areas
Item Index Registers Data Registers Arithmetic Flags (such as RE and EQ)
Clock Pulses
PLC setup
Special Area
CS/CJ-series PLC IR0 to IR15 DR0 to DR15 Condition Flags: In the CS/CJ-series CPU Unit these Flags are in a separate area and are specified by labels rather than addresses. With the CX-Programmer, these are specified using global symbols, such as P_Instr_Error and P_Equals." With a Programming Console, they are specified using ER, =, etc. Clock Pulses: In the CS/CJ-series CPU Unit these pulses are in a separate area and are specified by labels such as 1s and 0.1s rather than addresses. In the CS/CJ/CP-series CPU Unit, the PLC Setup is not stored in the DM Area, but a separate area (the Parameter Area) which is not a part of I/O memory. The PLC Setup is edited with CX-Programmer in a table format and user-friendly dialogue. Individual PLC Setup addresses can also be edited with a Programming Console. Available Available for LD, AND, OR, RSET, and SET Available for LD, LD NOT, AND, AND NOT, OR, OR NOT, OUT, OUT NOT, RSET, SET, KEEP, DIFU, DIFD, CMP, CPS, and MOV Available for LD, AND, OR, RSET, SET, and MOV
CX-Simulator Same as shown at left. Same as shown at left. Same as shown at left. (The Programming Console can not be used.)
Same as shown at left. (The Programming Console can not be used.) Refer to 9-3 I/O Memory Allocation.
Same as shown at left. Same as shown at left. Same as shown at left. (Immediate refreshing is not performed.) Same as shown at left. (Immediate refreshing is not performed.) Same as shown at left. (Immediate refreshing is not performed.)
Up-differentiation and immediate refreshing Available for LD, AND, OR, RSET, and SET Downdifferentiation and immediate refreshing Same as shown at left. Instruction operand data Basically operands are specified in binary. format In XFER(070), for example, the number of words is specified in binary (0001 to FFFF or 1 to 65,535 decimal). Specifying data in binary increases the setting range about six-fold. Same as shown at left. Specifying operands requiring If an operand requiring multiple words is specimultiple words fied at the end of an area so that there are not enough words left in the area for the operand, the instruction can be executed and the Error Flag will not turn ON. The program, however, is checked when transferred from the CX-Programmer to the CPU Unit and cannot be transferred with incorrect operand specifications. Such programs also cannot be read from the CPU Unit.
21
Section 1-6
Instructions
Timer/Counter Comparison Data Movement Data Shift Increment/Decrement Symbol Math Conversion Logic Special Math Floating-point Math Table Data Processing Tracking Data Control Subroutines Interrupt Control Step Basic I/O Unit Serial Communications
Network
File Memory Display High-Speed Counter Pulse Control Instructions (CJ1M only) Clock
Debugging
Equivalent (The MILH and MILR instructions, however, cannot be used to control the ON/OFF status of interlocks by forcing ON/OFF the bit specified for the second operand. The interlocks must be controlled through the execution condition of the instruction.) Equivalent (TRSET is equivalent only for CJ2-series PLCs.) Equivalent Equivalent Equivalent Equivalent Equivalent Equivalent (GRAY_BIN, GRAY_BINL, BIN_GRAY, BIN_GRAYL are equivalent only for CJ2-series PLCs.) Equivalent Equivalent Equivalent (A rounding error may occur.) Equivalent Nothing is executed for the CX-Simulator. Equivalent (Nothing is executed for PID.) Equivalent Equivalent Equivalent IORF, IORD, IOWR, TKY, HKY, Nothing is executed for the IORF, 7SEG, and DSW available. IORD, or IOWR instructions. PMCR, and PMCR2 available. Nothing is executed for PMCR or TXD, RXD, and STUP available. PMCR2. TXD, RXD, and STUP operate differently depending on communications parameters. TXDU2, and RXDU2 operate only for CJ2-series PLCs. SEND, RECV, and CMND available. SEND, RECV, and CMND operate CSND available. differently depending on communications parameters. Nothing is executed for CSND. SEND2, RECV2, and CMND2 operate only for CJ2-series PLCs. Equivalent Equivalent (Messages of Programming Console are displayed on the screen.) Nothing is executed for the inINI, SPED, PRV, PRV2, CTBL, PULS, ACC, PLS2, ORG, and PWM structions listed at the left. instructions Equivalent (With the CX-Simulator, however, even if the time in the PLC is adjusted with the DATE instruction, it will be automatically corrected to the time in the computer at the end of the cycle in which the DATE instruction is executed.) Equivalent
CX-Simulator
22
Section 1-6
Equivalent (Messages of Programming Console are displayed on the screen.) Equivalent Equivalent Equivalent Equivalent
TIM/TIMH (Timer No. 2,048 to 4,095), TTIM, TIML, MTIM, and FPD will not operate normally when the cycle time is 100 ms or longer. Make sure that the cycle time is different from that of the CS/CJ/CP-series CPU Unit if set as the computer cycle time. CS/CJ-series PLC CX-Simulator In the CS/CJ-series PLCs, I/O comments can be Same as shown at left. stored in Memory Cards as I/O comment files. (The destination is the hard disk of the computer.) Not available. The battery is not installed when the PLC is shipped from the factory. Install the provided battery before using the PLC. When the battery is installed in the PLC, the clock Adjusted to the clock of the computer when the CX-Simulator is will begin from an arbitrary value. Set the clock started. with a Programming Device or the DATE(735) instruction. Any range of I/O Memory can be saved as a file Same as shown at left. in a Memory Card (flash ROM) or EM file memory (The hard disk of the computer is used as memory cards or EM file with a Programming Device (including Programming Consoles) or the instruction provided memory.) Batch save/read enable to for this operation. A Programming Device or save/read I/O memory, PLC Setup, instruction can be used to read the data back UM, and other settings as the own from file memory. files. These operations can also be performed with FINS commands. Same as shown at left. The entire program can be saved as a file in a (The hard disk of the computer is Memory Card (flash ROM) or EM file memory used as memory cards or EM file with a Programming Device (including Programming Consoles) or the instruction provided memory.) Batch save/read enable to for this operation. A Programming Device or instruction can be used to read the program back save/read I/O memory, PLC Setup, UM, and other settings as the own from file memory. files. These operations can also be performed with FINS commands.
Battery installation
Clock function
I/O Memory
User program
23
Section 1-6
CX-Simulator The peripheral port is not supported.
Peripheral port
RS-232C Host Link, peripheral bus, NT Link (1:N), and port No-protocol. (1:1 links and peripheral bus are not supported for the RS-232C port.) USB port Peripheral bus, EtherNet/IP (CJ2-series PLCs only) Baud rate Peripheral port 300/600/1,200/2,400/4,800/9,600/19,200/ 38,400/57,600/115,200 bps (Baud rates of 38,400/57,600/115,200 bps are not standard for RS-232C.)
The USB port is not supported. The peripheral port is not supported.
RS-232C port
Startup mode
Same as shown at left. (The actual speed will vary depending on the hardware of the computer.) Performed as peripheral servicing. When in Continuous Run, performed as peripheral servicing. When in pausing, the network communications processing is performed. If an interrupt occurs during Host Link servicing, Interrupt is prohibited during peRemote I/O servicing, Special I/O Unit servicing, ripheral servicing and execution of or execution of an instruction, that process will be an instruction. stopped immediately and the task will be executed instead. Only "PRCH: Switch Setting on The CS/CJ-series CPU Unit will start in Programming Console" (default PROGRAM mode if the Startup Mode is set in setting) (Will start in PROGRAM the PLC Setup to PRCH: Switch Setting on mode as a Programming Console Programming Console (default setting) and the is not connected.) CPU Unit is started without a Programming Console connected.
24
Section 1-6
25
SECTION 2 Setup
2-1 Installing and Uninstalling the Software .................................................................................... 26
25
Section 2-1
26
27
Section 3-1
Note
Select PLC PLC Unit Registration Register Network Communications Serial Communications Setting UM Settings PLC Clock Settings PLC Operation Settings Initialize PLC Status Display LED Cycle Time Display Operation Mode UM Settings Display Message Display Alarm Display Detail Status Display Run Scan Run Continuous Scan Run Step Run Continuous Step Run Pause Stop Scan Replay Reset Show Step Run Task Control I/O Break Condition Setting
Status Display
Not supported.
Supported.
Supported.
Supported.
Supported.
Supported.
Read All Save All Replay I/O Condition Operation Data Replay Command Log Connection with Application Programs
Not supported. Not supported. Pop-up Menus Supported. Supported. Not supported. Not supported.
Supported. Supported. Supported. Menus Supported. Supported. Supported. Work CX-Simulator Window
28
Section 3-2
Note
c) Place a checkmark by [Automatically Transfer Program to Simulator] and click the [OK] button.
29
Section 3-2
2. Select [Simulation] | [Simulator Online Connection] from the main menus. The CX-Simulator will be started automatically for the PLC model specified in the selected project and an online connect will be made unrelated to the communications settings in the current project. Note If [Automatically Transfer Program to Simulator] was selected in the tool options, a dialog box for transferring the program to the CX-Simulator will appear and the program will be transferred to the CX-Simulator when the [OK] button is clicked.
Toolbar
Note
The main menus will not be displayed when an online connection to the CX-Simulator has been created from the CX-Programmer.
When an online connection to the CX-Simulator has been created from the CX-Programmer, this pop-up menu is used to select the following functions instead of using the main menus.
30
Section 3-2
Name I/O Condition Data Replay PLC Clock Settings PLC Operation Settings Initialize PLC Always on Top Help
Function Starts the I/O Condition Operation Tool. Refer to I/O Condition under 3-9-5 [Replay] Menu for details. Sets Data Replay and starts the Data Replay Tool. Refer to Data Replay under 3-9-5 [Replay] Menu for details. Sets the cycle time mode, the interval for continuous run, and others. Refer to 3-7-5 PLC Clock Settings for details. Sets the WDT disable, DIP switches, and others. Refer to 3-7-6 PLC Operation Settings for details. Initialize the I/O memory of PLC. Pins the CX-Simulator windows on top. Displays help.
3-2-5 Going Online with the CX-Simulator Already Started from CX-Simulator Menus
[Simulator Online Connection] can be selected to go online with the CX-Simulator even if the CX-Simulator has already been started from CX-Simulator menus. To do this, the CX-Simulator Communications Unit must be the Controller Link. 1,2,3 1. Open a project on the CX-Programmer and set the PLC model to the same model as the one used to start the CX-Simulator. 2. Select [Simulation] | [Simulator Online Connection] from the main menus of the CX-Programmer. An online connect will be made unrelated to the communications settings in the current project.
31
Section 3-3
[Select PLC] of the CX-Simulator setup wizard will be displayed as shown below.
32
Section 3-3
4. Selecting [Create a new PLC] allows to input necessary parameters for the simulation using the PLC setup wizard. Selecting [Open an existing PLC] enables to simulate the PLC with the parameters input so far. 5. When completing inputting parameters, the Ladder Engine will be started up and each window for the Debugger's connection to the CX-Simulator, the Debug Console, and the System Status Setting will be displayed.
Note
Refer to [Exit system] of 3-9 Debug Console Window for the details of the operation when [Exit system].
33
Section 3-4
3-4-1 Method 1: Starting and Going Online from the CX-Programmer (CX-Programmer Version 3.0 or Higher)
1,2,3 1. CX-Programmer Start Start the CX-Programmer. 2. Programming Create a program for debugging by [Create] or by reading an existing project. 3. PLC Online Connection and Program Transfer a) Select [Automatically Transfer Program to Simulator] on the [PLCs] tab under [Tools] | [Options]. b) Select [Simulator Online Connection] from the [Simulation] menu. c) Click the [OK] button on the dialog box for the program transfer option. Refer to 3-2 Starting and Going Online from the CX-Programmer. 4. Trial Run Either turning the mode of the Ladder Engine to MONITOR by the CX-Programmer or pressing the [Continuous Run] button of the [Debug Console] leads to a trial run. Refer to the CX-Programmer Operation Manual. 5. Monitor/ Debug 5-1 Monitor Monitor I/O bit status and PV. Execute force-set/reset, trace, online edit, and others. 5-2 Program Check by Break Set break points and I/O break conditions in the ladder diagram as required and stop the program step by step to monitor the contents of I/O memory. Refer to 4-3 Step Run and Break. 5-3 Cycle Time Monitor Confirm the virtual cycle time so that the program execution time on the actual PLC is within the permissible range. 5-4 Task Operation Check Check the number and time of the task execution in the [Task Control] window. If an interrupt task exists, execute the program with the interrupt timing changed to check the interrupt operation. Refer to 4-4 Task Debugging. 5-5 Serial/ Network Communications
34
Section 3-4
Display the contents of serial/network communications to debug with actual communications. Refer to 5 Debugging Serial Communications and 6 Debugging Network Communications.
6. Debugging by Virtual External Inputs 6-1 Generating Virtual External Inputs Create data/program for virtual external inputs. Refer to 8-3 Generating Virtual External Inputs. 6-2 Virtual Run Generate virtual external inputs using the created data/program to virtually run the ladder diagram in more actual way. Refer to 8-4 Running by Virtual External Inputs. 6-3 Check Results Check the results of the virtual run by the time chart monitor or spreadsheet software. Refer to 8-5 Checking the Result 7. Switching to the actual PLC Disconnect the Simulator and check the program again with the actual PLC connected.
35
Section 3-4
5. Connecting with CX-Programmer CX-Programmer Version 3.0 or Higher a) Select [Automatically Transfer Program to Simulator] on the [PLCs] tab under [Tool] | [Option]. b) Select [Simulator Online Connection] from the [PLC] menu. c) Click the [OK] button on the dialog box for the program transfer option. Refer to 3-2 Starting and Going Online from the CX-Programmer. CX-Programmer Version 2.1 Exiting the PLC Setup wizard will start the Ladder Engine according to the setting. Also, each window for Connect to Simulator, Debug Console, and System Status Setting is displayed. First, select a communications path (unit) in the [Connect to CX-Simulator] window. Second, press the [Connect] button to check the FINS destination address of the Ladder Engine displayed in the Connection Guidance. Refer to 3-8 Connecting to the CX-Programmer Version 2.1 or Lower. 6. CX-Programmer Communications Setting Set the communications setting for the PLC simulated by the CX-Programmer according to the communications unit and the FINS address checked in the [Connect to CX-Simulator] window. Refer to 3-8 Connecting to the CX-Programmer Version 2.1 or Lower. 7. PLC Online Connection Select [Work Online] by the CX-Programmer. When completing online connection, turn the mode of the Ladder Engine to PROGRAM. 8. Program Download Download the program from the CX-Programmer to the CPU Unit of the Ladder Engine in the PROGRAM mode (remain unchanged). Refer to the CX-Programmer Operation Manual. 9. Trial Run Either turning the mode of the Ladder Engine to MONITOR by the CX-Programmer or pressing the [Continuous Run] button of the [Debug Console] leads to a trial run. Refer to the CX-Programmer Operation Manual.
36
Section 3-4
10. Monitor/ Debug 10-1 Monitor Monitor I/O bit status and PV. Execute force-set/reset, trace, online edit, and others. 10-2 Program Check by Break Set break points and I/O break conditions in the ladder diagram as required and stop the program step by step to monitor the contents of I/O memory. Refer to 4-3 Step Run and Break. 10-3 Cycle Time Monitor Confirm the virtual cycle time so that the program execution time on the actual PLC is within the permissible range. 10-4 Task Operation Check Check the number and time of the task execution in the [Task Control] window. If an interrupt task exists, execute the program with the interrupt timing changed to check the interrupt operation. Refer to 4-4 Task Debugging. 10-5 Serial/ Network Communications Display the contents of serial/network communications to debug with actual communications. Refer to 5 Debugging Serial Communications and 6 Debugging Network Communications. 11. Debugging by Virtual External Inputs 11-1 Generating Virtual External Inputs Create data/program for virtual external inputs. Refer to 8-3 Generating Virtual External Inputs. 11-2 Virtual Run Generate virtual external inputs using the created data/program to virtually run the ladder diagram in more actual way. Refer to 8-4 Running by Virtual External Inputs. 11-3 Check Results Check the results of the virtual run by the time chart monitor or spreadsheet software. Refer to 8-5 Checking the Result 12. Switching to the actual PLC Disconnect the Simulator and check the program again with the actual PLC connected.
37
Section 3-5
1,2,3
38
Section 3-5
2. Selecting [Create a new PLC (PLC Setup Wizard)] and clicking the [OK] button will display the [PLC Data folder Settings] window. Here input the name of the new PLC data folder. Selecting the folder is also possible by clicking the [Browse] button. PLC Data Folder Settings
3. Clicking the [Next(N)>] button will display [Select PLC Type] window to select a CPU model.
39
Section 3-5
4. Clicking the [Next(N)>] button will display the [Register PLC Unit] window. Reregister the Unit number instead of I/O Table setting performed in the CX-Programmer. This registration is for calculating the cycle time influenced by each unit, not for actual operation. (For the Network Communications Unit and Serial Communications Unit, this will be used in the actual operation.) PLC Unit Registration
In the initial state, the CPU unit and the Simulator Communications Unit are registered. The Simulator Communications Unit is a virtual network communications unit, dedicated to the CX-Simulator, for the Ladder Engine to perform network communications with external devices. At least one virtual network communications unit (one of Controller Link unit, Ethernet unit, or simulator communications unit) is required to connect the Ladder Engine with a programming tool. Therefore, if the Controller Link unit or Ethernet Unit is not used, the Simulator Communications Unit will be used. Note Refer to 6.Debugging Network Communications for the detail of the Network Communications Unit. Pressing the [Unit Selection List] button will display the Unit Group List. Selecting the required group in the list will display the Units corresponding to the group. Select the group from [Unit Selection List], select the unit to be added, and press the [<<] button to add a unit. Select the unit to be deleted from [Registered PLC Unit List] and press the [>>] button to delete a unit.
40
Section 3-5
If the CPU Bus Unit or the Special I/O Unit is registered, the input dialog box for a Unit number or Machine number will be displayed as shown below. Input Unit number for the CPU Bus Unit and Machine number for the Special I/O Unit. Unit number or Machine number will be converted to Unit address and displayed in the [Registered PLC Unit List].
If a unit is added, the typical I/O refresh interval for each unit will be added to the logical I/O refresh interval. Double-clicking the registered CPU Bus Unit or Special I/O Unit enables to change the Unit number. Note Set the Unit numbers so as not to overlap each other. Register the Units for the number actually to be used. Mismatching number will cause incorrect calculation of the I/O refresh interval. As the Simulator Communications Unit is a virtual unit, the virtual I/O refresh interval will be 0 ms. Unlike an actual PLC, the CX-Simulator does not limit the number of Units (excluding a CPU Bus Unit) to be registered. Refer to 9-2 Cycle Time and Time for the detail of the cycle time. 5. Clicking the [Next(N)>] button after completing the registration of the Units to be used will display the [Network Communications Settings] window. Set for the network communications process from the ladder process to the external devices. Network Communications Settings
Note Note
41
Section 3-5
6. Select the network communications unit requiring setting and press the [Edit] button to display the [Register Network Communications] window.
7. Set the node address and communications operation settings as required. Note The detail settings of local FINS address and communications settings are explained in 6.Debugging Network Communications. 8. Click the [OK] button. Exit the [Register Network Communications] window and return to the [Network communications settings] window. 9. Repeat the operation from 6 to 8 as required for each unit. After completing all settings, click the [Next(N)>] button to display the [Serial Communications Settings] window. For Serial comm. Settings, set for the Serial communications for each Serial port of the unit. Serial Communications Settings
42
Section 3-5
10. Select the serial port requiring setting and press [Edit] button to display the [Serial Port Settings] window shown below.
11.Set Comm. Settings, COM port name, and Enable COM port log as required. Note The detail of [Serial Port Settings] will be explained in 5.Debugging Serial Communications. 12.Click the [OK] button to exit the [Serial Port Settings] window and return to the [Serial Communications Settings] window.
43
Section 3-5
13. Exit the Serial communications window Repeat the operation from 10 to 12 as required. After completing all settings, click [Next(N)>] button to display the [Contents List] window. Contents
14.Pressing the [Complete] button after confirming the contents of the [PLC Setup] wizard will exit the [PLC Setup] wizard. Then the Ladder Engine is started and each window for Work CX-Simulator, CX-Simulator Debug Console, and Status will be displayed.
The
The Ladder Engine of the Simulator will be connected to the CX-Programmer. Execute operation for the Ladder Engine. Display the status of the Ladder Engine and set for the Ladder Engine.
The
The
Refer to the following items for the contents of each window. Work CX-Simulator window 3-8 Connecting to the CX-Programmer Version 2.1 or Lower
The
3-6 Each Part of the Windows 3-6 Each Part of the Windows
44
Section 3-5
15. Clicking the [Connect] button in the [Work CX-Simulator] window will display the network set to CX-Programmer and its FINS address in the [Guide to Connect]. Set for the CX-programmer as guided. Note The details of [Work CX-Simulator] setting will be explained in 3-8 Connecting to the CX-Programmer.
2. Select [Open an existing PLC] and specify the folder. Recently-used PLC data folders are selected from the list. Also possible to set by browsing folders with Browse button. 3. Click the [OK] button to exit the [Select PLC] dialog box. The Ladder Engine is started with the contents set before and each window for Work CX-Simulator, CX-Simulator Debug Console, and Status is displayed. 4. Clicking the [Connect] button in the [Work CX-Simulator] window will display the network and its FINS address set to the CX-Programmer in the [Guide to Connect]. Set to the CX-Programmer guided by the display. Note The details of [Work CX-Simulator] setting will be explained in 3-8 Connecting to the CX-Programmer.
45
Section 3-5
Note
When creating a new PLC or opening an existing PLC, the settings so far will be discarded. Save the data before these operations if the settings so far or the program downloaded to the Ladder Engine are needed.
User-specified folder
User-specified file
User-specified folder
User-specified file
46
Section 3-5
Contain data files peculiar to each PLC used by the CX-Simulator. The following files are contained as data files. File Type PLC Model Setting File Break Condition Setting File Command Log Setting File Automatic Setting File Debugger Setting File I/O Memory File Extension Contents ini PLC model and registered unit setting file bsf I/O break condition setting data file csf Command log setting data file File created when exiting the system dbg Debugger automatic setting file (AUTOEXEC.DBG) dat Automatic setting file for I/O memory consisting of multiple files (Memoryn.dat: the underlined part is a serial number) File created on the [Save all] of the [File] menu in the [Debug Console] window. dbg Debugger setting file dat I/O memory save file
The file created as the file memory is compatible with the one for CS/CJ/CP-series CPU Unit. The operation to the folder for the file memory can be performed in the same way as the file memory for CS/CJ/CP-series CPU Unit. Note 1. If the hard disk capacity of the computer is smaller than that of the file memory, file write may fail. 2. Refer to Section 5 File Memory Functions of CS/CJ Series Programming Manual for the details on the file memory functions.
Log folder
The test data for the CX-Simulator is stored. The following data files for each use are available. File type Command Log File Data Trace File Data Replay File Note Extension Content flg The data file storing CX-Programmer's operation log cdt The compatible data file with the CX-Programmer's data trace file csv CSV-format text file
Refer to 8-3 Generating Virtual External Inputs for the data file in the log folder.
47
Section 3-6
Work CX-Simulator (for connecting CX-Programmer) System Status Setting (for status display)
(for running)
The basic operation of the CX-Simulator is performed in the [CX-Simulator Debug Console] window and the [System Status Setting] window. The [CX-Simulator Debug Console] window executes operation for the Ladder Engine. The [System Status Setting] window displays the status of the Ladder Engine and sets for the Ladder Engine. Note: Only the [Debug Console] window will be displayed when the CX-Simulator is started from the CX-Programmer.
48
Section 3-6
Step run display Setting Task control PLC selection I/O break condition
PLC operation setting I/O Condition Tool startup Data Replay Tool startup
49
Section 3-7
Setting
PLC selection
Messages Alarm
50
Section 3-7
PLC model
Cycle time display Operation mode UM settings display Setting menu display button Alarm display button Outline/detail status display button
Function Display the PLC /CPU model currently set. Display operation status of the Ladder Engine. Display the cycle time mode of the Ladder Engine (Estimated/Simulated cycle time) and the up-to-date cycle time (Unit: ms). Operation Mode Display the operation mode (RUN, MONITOR, or PROGRAM) of the Ladder Engine UM Settings Display Display the UM area able to be accessed by the Ladder Engine and the object name. Setting Menu Display Display the setting menu. button Message Display Display the Message Display window. button Alarm Display button Start the Alarm Display application. Outline/Detail Status Switch the display mode of the System Status Setting Display button window (Outline or Detail).
51
Section 3-7
ERR/ARM
COMM.
NETWORK
Executing programs in RUN/ MONITOR mode. Mode error in system downloading (Not used) Error stop in the PROGRAM mode. Fatal error/Non-fatal error/Ladder Engine error Normal Comm. Port sending/receiving (not used) Other than the above Starting Communications Unit Other than the above
Setting Menu
Pressing the [Settings] Menu button displays the setting menu.
Name Select PLC Register PLC Unit Network comms settings Serial comms settings UM Settings PLC Clock Settings PLC Operation Settings Initialize PLC
Function Create a new PLC (the PLC Setting wizard) and select an existing PLC. Set the unit mounting to PLC. Set for the Network Communications Unit. Set for the Serial Communications Unit. Set for the UM. Set the cycle time mode, the interval for continuous run, and others. Set WDT disable, DIP switches, and others. Initialize the I/O memory of PLC.
52
Section 3-7
Pressing the Outline/Detail Status Display button switches the [System Status Setting] window display between Outline and Detail.
Command Log Settings Yes/No of Command log settings presence I/O Break Condition Yes/No of I/O break condition settings presence Settings
53
Section 3-7
Register PLC Unit Network Communications Setting Serial Communications Setting UM Setting PLC Clock Setting PLC Operation Setting PLC Initializing Note
Changing the node address of the communications unit in the [Network Communications Setting] will restart the Ladder Engine. Restarting the Ladder Engine will clear the I/O memory areas according to the PLC Setup and read the Autoexec file automatically.
54
Section 3-7
Note
Refer to 3-5 Creating a New PLC for the operation in the [Register PLC Unit] window. 2. Click the [OK] button when the unit registration is completed. Changing the Unit configuration will display the Restart message of the Ladder Engine.
3. Click the [OK] button to restart. Clicking the [Cancel] button will return to the [Register PLC Unit] window. Note Restarting the Ladder Engine will clear the I/O memory areas according to the PLC Setup and read the Autoexec file automatically.
3-7-4 UM Settings
The [UM Settings] window allows to set for the UM to store a ladder diagram. Unlike an actual PLC, the CX-Simulator has two program areas: (1) the program area for applications (UM1) where the ladder diagram to be simulated is stored and (2) the one for debugging (UM2) where the ladder diagram generating virtual external outputs.
55
Section 3-7
1,2,3
1. Selecting [UM Settings] in the [System Status Setting] | [Settings] menu will display the [UM Settings] window.
UM
Set the UM for downloading/uploading and editing online by the CX-Programmer. Set whether to execute programs on the UM (enable) or not. Disabling both of UM1 and UM2 simultaneously is not possible. Save the current settings and exit the window. Discard the current settings and exit the window.
UM
OK Cancel
2. Click the [OK] button when UM setting is completed. Note Refer to 8 Debugging Using Virtual External Inputs for how to use the UM2.
56
Section 3-7
Cycle
Time Mode Settings Specify in which mode to display when monitoring the cycle time. Estimated Cycle Time: Virtually estimated cycle time in the actual PLC. Simulated Cycle Time: The elapsed time in the actual computer. interval Specify the execution interval for Continuous step run and Continuous scan run in the unit of 0.1 seconds. Represent maximum CPU occupancy where the Ladder Engine occupies CPU in the computer. Exceeding the maximum occupancy causes Wait to be added in the cycle process automatically. (The initial value is 60%.) Save the current setting and exit the window. Discard the current setting and exit the window.
Scan
Max.
CPU
OK Cancel
57
Section 3-7
Replay
from the top of the Set whether or not to enable online edit when same scan after online Scan Replay/Step Run. Cycle time watching Disable the watchdog timer (WDT). The Watch Cycle Time in the PLC Setup and the WDT instruction setting are disabled. When disabled, a CPU error will not occur even if the cycle time exceeds the setting. Set the equivalent setting to the DIP switches of the CPU Unit. Set to read Autoexec file automatically when the power turns ON (When the Ladder Engine is started.). Set the DIP Switch (A39512) for User-customization. Save the current settings and exit the window. Discard the current settings and exit the window.
Disable
DIP
UM
User
Switch
OK Cancel
58
Section 3-7
Note
Invalid [Enable online edit when Scan Replay/Step Run] makes impossible to use the Scan Replay function. Also, online editing during Step Run automatically enters PROGRAM mode. (When valid, Scan Replay will automatically be performed.) Invalid [Enable online edit when Scan Replay/Step Run] improves the process speed of one scan than when valid. This setting is effective when debugging a large-scale program with the virtual external input.
Yes
Initialize the following I/O memory areas. CIO W DM EM Close the dialog box without initializing the memory.
No
59
Section 3-7
(5) FINS command size FINS command size FINS command size
Message Occurrence time (cycle counter): Instruction (Data length) [Send data] Occurrence time (cycle counter): Instruction Occurrence time (cycle counter): Instruction (Data length) [Setting data]
Note If a non-display character is included for the TXD instruction, it will be displayed in a hexadecimal value. (e.g. CR+LF as <0D><0A)
(1)
(2)
(3)
(4) (5)
(6)
Copy to clipboard The contents of the display buffer in the Message Display window will be copied to the clipboard. Clear screen Clear the display and its buffer. Close Exit the Message Display window.
60
Section 3-8
CPU unit
Ladder Engine
This section describes the procedure for connecting the CX-Programmer version 2.1 or lower with the CPU Unit in the Ladder Engine of the CX-Simulator. Application programs other than the CX-Programmer can be connected in the similar way. With CX-Programmer version 3.0 or higher, the CX-Programmer can be connected to the Virtual CPU Unit in the Ladder Engine by selecting the [Auto Online Function] from the [PLC] menu of the CX-Programmer.
61
Section 3-8
Communications path (Unit) Communications path (Unit) Network address Communications path (Unit) Node address Communications path (Unit) Machine address
Close
Guide to Connect
Network
address
Select a FinsGateway Communications Unit for connecting the Ladder Engine of the CX-Simulator with the CX-Programmer. Display the FINS Address for FinsGateway Communications Unit selected by the target Communications Unit. Setting only Node address is also possible. Start the FinsGateway Communications Unit to connect the Ladder Engine to the CX-Programmer. Connecting to the CX-Simulator will bring the CX-Simulator to the following. The FinsGateway Communications Unit is started. The routing tables for FinsGateway and the Ladder Engine are overwritten. The Serial Communications Server is started following the Serial comm. Settings in the [Serial Communications Settings] window.
Node
address
Machine
address
62
Section 3-8
Disconnect
Exit the FinsGateway Communications Unit started when connecting to the CX-Simulator and return to the status before the startup. Disconnecting the CX-Simulator will bring the CX-Simulator to the following. The FinsGateway Communications Unit stops. Restore the routing table of FinsGateway to the original status. The Serial Communications Server stops. The mode will be in PROGRAM if the Ladder Engine is running. Display the settings for connecting with the CX-Simulator. Exit the window with the present settings.
Guide
to Connect
Close
Note
Correct the Node address of FinsGateway Communications Unit only if it overlaps with the node address of the Network Communications Unit when connecting to the CX-Simulator.
63
Section 3-8
3. Register the FINS address displayed in the Guide to Connect to the CX-Programmer. Double-click the PLC name in the Project Tree of the CX-Programmer to display the [Change PLC] window.
4. Change the [Network Type] to the network type selected by the target Communications Unit in the [Work CX-Simulator] window. Pressing the [Settings] button of the [Network Type] will display the [Network Settings] window.
64
Section 3-8
5. Change the settings of [Network] and [Node] for [FINS Destination Address] to the network address and the node address for the FINS address displayed in the Guide to Connect. The routing table for FinsGateway must be changed if the Network address is to be changed. Note 1. Do not change the unit address for the FinsGateway Communications Unit with FinsGateway setting tool, etc. Changing the unit address may cause the [Connect] operation to fail. 2. Do not set items to the local network table when setting the routing table to the CX-Simulator. The local network table will automatically be changed when [Connect] is executed. If communications with the Ladder Engine can not be executed after setting the routing table, [Disconnect] and then [Connect] again. 3. If a new FinsGateway Communications Unit with the same name is started by the FinsGateway service manager, etc. during [Connect], the new unit will fail to start. The Communications Unit with the same name can not be used simultaneously. 4. For instructions on changing the routing tables, refer to Section 3 of the CX-Integrator Operation Manual (W445).
65
Section 3-9
PLC operation setting I/O Condition Tool startup Data Replay Tool startup
66
Section 3-9
Toolbar
Main menu
Function The title is displayed. Select a menu. Click an icon to select a function.
Stop the execution. The operation mode for the Ladder Engine will become PROGRAM automatically. Pause the execution. The execution can be resumed in each execution mode. Step Run Process each step of the mnemonic codes. Continuous Step Execute Step Run at a fixed interval continuously. Run Scan Run Execute a ladder diagram for a single scan. If Scan Run is executed during Step Run, the program will be executed to its end. Continuous Scan Execute Scan Run at a fixed interval continuously. Run Scan Replay Return the I/O memory status to the one before the scan started during Step Run. The program counter is also cleared. Reset Reset the hardware and perform the Startup procedure. The power interrupt task is started. Note Refer to 4-2 Debugging Operation for each execution operation.
The Icons for Debugging Operation Name Show Step Run Task Control I/O Break Condition Setting Note Function Display the Step Run window. Display the Task Control window. Display the I/O Break Condition Setting window.
67
Section 3-9
Work CX-Simulator
Console Display Settings Exit system IO Condition Data Replay Command log Start Stop Configuration View Log Help Help Help Index About
Replay
68
Section 3-9
File
Read All Save All Work CX-Simulator Console Display Setting Exit
Replay
I/O Condition Operation Data Replay Command Log
Command Log
Start Stop Setting View Log
Help
Contents Help Index About
Note
The menus above may grayed-out depending on the function selected. The gray-displayed menu can not be used during the function execution. The following explains the basic operation by the menu.
69
Section 3-9
[Read all]
Open the [Save all] file. 1,2,3 1.Select [Read all] in the [File] menu.
Look
in
The PLC data folder will be displayed in default. Specify the folder after pressing the drop-down list to move to the other drive and folder. Clicking the file name displayed in the [File name] box will display the file name. Alternatively input the file name of the Save-all file. Select the extension to specify the type of file displayed in the [File name] box. Pressing this button after selecting the Save-all file will read the file. Cancel reading the Save-all file and close the dialog box.
File
name
Files
of type
Open
Cancel
2. Select the Save-all file and then click [Open] button. Note In [Read all], the Debugger Setting File (.dbg) will be specified. Actually, however, the I/O memory file (.dat) that has the same name as the Debugger Setting File (+ serial number) will also be read.
70
Section 3-9
1.Selecting the [Save all] in the [File] will display the following dialog box.
Save
in
The PLC data folder will be displayed in default. Specify the folder after pressing the dropdown list to save into the other drive or folder. Name a Save-all file. Select an extension and specify the type of file displayed in the [File name] box. Press this button when the file name and the folder for save are determined. Cancel saving the file and close the dialog box.
File
name as type
Save
Save
Cancel
2. Select a drive and folder for Save-all 3.Input a file name in the [File name] box or select a file name from the list. 4.Click the [Save] button to save the Save-all file. Note The file will be saved in the format specified with the file type even when it is specified with an extension. Actually the I/O memory file (.dat) that has the same name as the Debugger Setting File (+ serial number) will also be saved.
[Work CX-Simulator]
Refer to 3-8 Connecting with the CX-Programmer Version 2.1 or Lower for Work CX-Simulator.
71
Section 3-9
Select
Select the icon size for the CX-Simulator Debug Console, which will be reflected at the next startup. Set for the event action. Checking [Show a viewer automatically for Alarms] will start the Alarm Display program when an alarm occurs. Checking [Popup a window automatically for Messages] will automatically display the Messages window when its contents are updated. The alarm display is performed only by the event viewer (OS standard). Checking [Always on Top] will display each window for the Debugger in front. Save the present settings and exit the window. Discard the present settings and exit the window.
Event
Alarms
Display Position
Window
OK Cancel
72
Section 3-9
Yes No
Disconnect the CX-Simulator to exit the application Close the dialog box to cancel exiting the CX-Simulator.
2. Clicking the [Yes] button will display the dialog box for saving the Debugger setting. 3. Clicking the [Yes] button will save the current setting to exit the CX-Simulator. 4. Attempting to exit without disconnecting the Simulator will display the dialog box below, followed by the [Work CX-Simulator] window.
73
Section 3-9
[IO Condition]
Start the IO Condition tool to display the [Run] window (the startup window for this tool).
Note
Refer to 8 Debugging Using Virtual External Inputs for the details of the I/O Condition tool.
IO
Input the name of the execution file for I/O Condition. Browsing files with the Browse button is also possible. Input the destination FINS address for monitoring I/O Condition. The FINS address for the Ladder Engine is displayed as the initial value. Changing it during the execution is not possible. Specify whether or not to perform the synchronous process. When in the process, the conditional monitoring will be performed to the Ladder Engine in the unit of a single scan. When in the asynchronous, at a fixed interval. Pressing the Start button will monitor I/O Condition. The button works as Stop button during execution. When starting, the message box is displayed at the destination. The process will be started after confirmation. Display the process status on the Status bar.
Target
dress
Synchronized
Start/Stop
button
Status
Display
74
Section 3-9
Cycle
Count Dis-
play
Destination
Display the cycle increase after starting monitoring. When in asynchronous process, display the count of monitoring operation. Display the model name of connecting destination in the title.
Model
Input the execution file using Browse. Monitor the I/O Condition whose execution flag is D in the set execution file. Not selectable if the execution file is not input. Stop I/O condition monitoring. Not selectable unless monitoring is being executed. Display the I/O Condition Setting window. Exit I/O Condition.
Stop
Configuration Exit
Display Help Contents for Windows Display Help Index for Windows. Display the version information.
Index
About
75
Section 3-9
Configuration Window
In the Configuration window, the IO Condition Equation is set. The IO Condition Equation consists of the logical equation (the conditional equation) combining I/O memory conditions to be monitored, the delay time from when the conditional equation holds till when the output equation is executed, and the settings to the I/O memory to be executed after the delay time elapses.
List of IO Condition Equation Run Flag Display whether or not to execute IO Condition (D(o),N(on),E(rror)). When registering the equation, N is set as the initial value. If the contents of the conditional equation and output equation can not be analyzed, E(rror) will occur. Double-clicking with the line selected will switch between D and N.
Condition
Display the logical equation combining I/O memory conditions to be monitored. Display the time (unit: ms) from when the conditional equation holds till when the output equation is executed. Display the logical equation combining operations to be executed when the conditional equation holds.
Delay
Output
Register
Button
Register the data set in the registration condition as the IO Condition equation.
76
Section 3-9
Registered Condition Describe the Conditional Equation to register in the I/O Condition Condition equation. Insert the contents set in the Insert Equation, insert by Logical Operator button, and paste from the clip board are possible. Delete the contents of the Conditional Equation. or button Insert the character string "or" as a logical operator. and button Insert the character string "and" as a logical operator. << button Insert the contents set in the Insert Equation to the Conditional Equation. Input the delay time (unit: ms) to be registered to the I/O condition Equation. Describe the Output Equation to be registered in the I/O Condition equation. Insert the contents set in the Insert Equation, insert by [Operator] button, and paste from the clipboard are possible.
DEL and << DEL
button
Delay
time
Output
button
button
button
Delete the contents of Output Equation. Insert the character string "and" as a logical operator. Insert the contents set in the Insert Equation.
Select which to insert the Bit Conditional Equation or the Word Conditional Equation Set the Bit Conditional Equation to be inserted to the Conditional/Output Equation.
Value
Select
Select which is the value of Conditional Equation, fixed (upper) or I/O memory (lower). Select I/O memory type. Input the address of I/O memory type. Select from either = or NOT. Selecting NOT will not reflect the value to the Conditional Equation/Output Equation. For "Fixed Value", select ON/OFF as Bit information in the drop down list. For "I/O Memory", set the type and the address.
Value
77
Section 3-9
Word Conditional Set the Word Conditional Equation to be inserted to the Conditional Equation/Output Equation. Equation
Value
Selection
Select which is the value of Conditional Equation, fixed (upper) or I/O memory (lower). Select the I/O memory type. Input the address of I/O memory type. Select =,<>,<=,>=,<,>, or NOT as an operator from the drop down list. Selecting NOT will not reflect the value to the Conditional Equation/Output Equation. For "Fixed Value", input BCD(0 to 9999) or BIN(0x0 to 0xFFFF). For "I/O memory", set the type and the address.
Value
Read the I/O Condition file from the File dialog. If some settings are already input in the window, the current input data will be discarded. If the file already opened by Open in the File menu exists, save the current data to the existing open file. If a file is not open, this selection is not possible.
Save
Save
As
Save the present setting data in the File Save dialog box. Close the Setting window. (Different from Exit of a tool)
Exit
Insert specified number of lines just before the line currently selected. Delete the specified lines Copy the specified lines to the clipboard. The data on the clipboard can be used in the commercial spread sheet software.
Delete Copy
Insert
copied lines Insert the data on the clipboard to the currently specified line. The line data is evaluated when inserting.
Display Help Contents for Windows. Display Help Index for Windows. Display the version information.
Index
About
78
Section 3-9
Start the [Data Replay Settings] window and then Data Replay Tool using the set file.
Replay
file
Input the file name to be replayed by Data Replay Tool. The Command Log file (.flg), the data trace data file (.cdt), and the data replay file (.csv) can be replayed. Input the file name to output the monitor data corresponding to the replay data to. The format of the output file will be that of the data replay file(.csv). If the data to be monitored into the output file is set to the other data replay file, the file can be specified as the output template file. Select the name of the replay file, output file, and output template file specifying the destination for browsing. Set the destination FINS address for the data replay. The FINS address for the Ladder Engine is set in default.
Output
file
Output
template
Browse
FINS
Address
Synchronous OK Cancel
replay Replay synchronously. Start the Data Replay Tool with the present settings. Discard the present settings and exit the window.
79
Section 3-9
Data Replay Tool reads the data in the specified input file and set them in sequence as the virtual external input to the Ladder Engine.
Replay
data Data
Display the replay file set in the [Data Replay Settings] window. Display the output file set in the [Data Replay Settings] window. Display the output template file set in the [Data Replay Settings] window. Pause the data replay. The button works as [Resume] during pausing. Exit the Data Replay Tool forcibly.
Output
Template
Pause
Exit
Display the type of the input data. Status Display the operation status of the Data Replay Tool. Display the destination FINS address for connection where the data is replayed. Display "[Synchronous]" while the synchronous replay is performed.
Destination
Refer to 8-4 Running by Virtual External Inputs for [Data Replay Tool].
[Command log]
Display the sub-menu of the Command Log.
80
Section 3-9
Exit the Command Log. Can not be selected if the Command Log has not been started.
FINS Address Filter Registration List FINS Address Filter Filter Check FINS Command Filter Registration List FINS Command Filter Filter Check
Log
file name
Input the file name for saving the Command Log. If the existing file is specified, the log data will be appended to the bottom of the file. The Log file can be selected by browsing. Read the Command Log settings from the file. Save the Command Log settings to the file.
All
Clear the filter check for all of the registered items of the FINS address filter and the FINS command filter. Select the filter check for all of the registered items of the FINS address filter and the FINS command filter. Save the present settings and exit the window. Discard the present settings and exit the window.
Set
All
OK Cancel
81
Section 3-9
FINS Address Filters Registration List Display the FINS address selectable as the FINS address filter. The [All local nodes] shows all FINS addresses in the computer. Usually specify the [All local nodes] as the filter (registered as the initial value and can not be deleted).
Filter Add Delete Network
Check
Check here if selecting items in the Registration List. Add the FINS address to the Registration List. Delete the selected items in the Registration List.
address
Specify the FINS network address to be added to the Registration List. Specifying "*" will target all of the network addresses. Specify the FINS node address to be added to the Registration List. Specifying "*" will target all of the node addresses. Specify the FINS node address to be added to the Registration List. Specifying "*" will target all of the machine numbers. Specify the name of the FINS address to be added to the Registration List.
Node
address
Machine
address
Name
FINS Command Filters The Registration Display the filter of the FINS commands selectable as List the FINS command filter. When selecting, compare from top of the FINS commands and save the matched commands as the log.
Filter Add
Check
Check here if selecting the item in the Registration List. Add the filter of the FINS command to the Registration List. Delete the selected items in the Registration List.
Delete Command
name
Note
Refer to 8-3 Generating Virtual External Inputs for the details of the Command Log setting.
82
Section 3-9
[Help Contents]
Display the Help Contents of the CX-Simulator. Select [Help Contents] in the [Help] menu to display the [Help Contents] dialog box.
Help
Contents
Display the Help Contents of the CX-Simulator. Display the [Help Index] dialog box. Return to the window displayed just before. Print the selected topic.
[Help Index]
Search for the topic in the online help using the keyword. Select [Help Index] in the [Help] menu to display the [Help Index] dialog box.
[About]
Select [About] in the [Help] menu to display the version information for the CX-Simulator. Close the [About] dialog box. OK Note The license information is not displayed when upgrading from CX-Simulator Ver. 1.3 or higher.
83
Section 3-9
Name Main Menu Task Selection Address Instruction Code (Mnemonic) Display Break Point Display Executing Point Display Start Point display
Function Select a menu. Select a task to display from the tasks registered in the program. Display the program address in the task. Display instruction codes and operands. Display the break points set in the program. Display the program address presently being executed. Specify the execution start point.
84
Section 3-9
Debug
Options Help
Function Close the Step Run window. Copy the contents of the task being displayed to the clipboard. Jump to the specified program address. Jump to the top of the task. Jump to the bottom of the task. Set the start point to the selected step. Reset the start point of the selected step. Set the break point to the selected step. Reset the break point of the selected step. Reset all of the break points. Set whether or not to scroll automatically. Display the Help Contents. Display the Help Index. Display the version information.
Note
1. In the Step window, the lower part of the table has a priority in display. 2. Refer to 4-3 Step Run and Break for the details of Step Run.
85
Section 3-9
Monitor button
Task execution time Task execution count Task status display Task startup interval
[Close] button
Function Select a menu. Select the task to be displayed from the tasks registered in the program (Cycle, interrupt, or All tasks). Task type display Display the task type (Cycle execution task or interrupt task). If multiple interrupt types are set to a single interrupt task, they will be displayed as separate lines. Task No. display Display the task No. of cycle tasks and interrupt tasks. Task settings display For the cyclic task, display "Cycle." For the interrupt task, display its interrupt type (Power interrupt, scheduled interrupt, I/O interrupt, or External interrupt). Task startup interval Display the time (unit: ms) for the clock interrupt task. Task status display For a cyclic task, display the execution status (Initial, Ready, Run, or Wait). For an interrupt task, display Run if it is being executed and nothing if it is not. Task execution count Display the count for each task after the Ladder Engine is started or reset. Task execution time Display the time required to execute each task (The latest value, Unit: ms). If an interrupt task is executed while executing the cyclic task, the execution time for the interrupt task is also added. If set as the computer cycle time, the standby time for pausing with Step Run and Scan Run is added, too. Monitor button Switch between update (monitoring) and not update (stop monitoring) of the window. [Close] button Exit the Task Control window.
86
Section 3-9
Function Display the task menu. Display the information on Help and the version.
Help
87
Section 3-9
OR LIST
[Update] button
OR item add
OR item delete
[OK] button
[Cancel] button
Function Display the conditions selected in AND LIST and OR LIST as the I/O break conditional equation. Update the I/O break condition setting expression in the window with the present configuration of AND LIST and OR LIST. AND LIST AND item selection Select the conditions registered in AND LIST with check boxes. AND item add Add conditions set in [Register I/O Break Condition] to AND LIST. AND item delete Delete the selected conditions in AND LIST. OR LIST OR item select Select conditions registered in OR LIST with check boxes. OR item add Add the conditions set in [Register I/O Break Condition] to OR LIST. OR item delete Delete the selected conditions in OR LIST. Condition settings read Read conditions saved in the I/O break condition Setting file. Condition setting save Save the present settings in the I/O break condition Setting file. [OK] button Set the present I/O break condition and exit the window. [Cancel] button Exit the window without setting the present condition.
88
Section 3-9
The Register IO Break Condition window sets conditions to be registered to AND LIST or OR LIST in the I/O Break Settings window.
Bit condition area type Bit condition address Bit condition value Word condition area type Word condition address Word condition value
[OK] button
[Cancel] button
Name Bit condition or word condition select Bit condition area type Bit condition address Bit condition value Word condition area type Word condition address Word condition operator Word condition value [OK] button [Cancel] button Available Area Type and Address Range Bit Condition Area Name CIO Area Work Area Holding Area Auxiliary Area
Function Select bit condition or word condition as the Conditional Equation to be input. (See the table below.) (See the table below.) Select from ON, OFF, or NOT (value change). (See the table below.) (See the table below.) Select from =, <=, >=, <>, <, >, or NOT (value change). Input the value to be compared in binary (0000 to FFFF). Register the present I/O break condition and exit the window. Exit the window without setting the present condition.
Area Type IO W H A
Address Range 0.00 to 6143.15 0.00 to 511.15 0.00 to 511.15 0.00 to 959.15
89
Section 3-9
Address Range 0 to 6143 0 to 511 0 to 511 0 to 959 0 to 32767 E0_0 to E0_32767 and EC_0 to EC_32767 0 to 4095 0 to 4095
Note Refer to 4-3 Step Run and Break for the details of I/O break condition.
90
91
Section 4-1
92
Debugging Operation
Section 4-2
The Ladder Engine runs in the Monitor mode. A Run operation turns the mode to Monitor even when the mode is changed to Run from the CX-Programmer.
93
Debugging Operation
Section 4-2
Overseeing processing
Computing processing
I/O refresh
Peripheral servicing
Scan Run ( ) Scan Run executes a program from the present executing point by a single scan. The mode turns to Pause when completed. Continuous Scan Run ( ) Continuous Scan Run repeats Scan Run at a fixed interval. The minimum cycle time function of PLC fixes the time from the cycle start time to the next start time. In Continuous Scan Run, on the other hand, fixes the time from the cycle end time to the next start time. Continuous Run ( ) Continuous Run repeats a single scan (cycle) from overseeing processing to peripheral servicing. Changing the mode of the Ladder Engine to Monitor mode from the CX-Programmer will automatically turn to Continuous Run mode. Note Refer to 9-1 CPU Unit Operation for the details of the CPU Unit operation.
94
Debugging Operation
Section 4-2
Overseeing processing
Computing processing
Pause
I/O refresh
Peripheral servicing
There are two types of Step Run: [Single Step Run] and [Continuous Step Run]. Step Run ( ) The Step Run executes a program by step. Executing Single Step Run during Continuous Run or Scan run will pause the program at the top. Continuous Step Run ( ) The Continuous Step Run repeats Step Run at a fixed interval.
4-2-4 Stop ( )
The Stop stops executing the ladder diagram for Continuous Run, Scan Run, Continuous Scan Run, Continuous Step Run, or Pause Changing the mode of the Ladder Engine to the Program mode from the CX-Programmer will stop executing the ladder diagram.
95
Debugging Operation
Section 4-2
4-2-5 Pause ( )
Pause pauses executing the ladder diagram. The situation is also the same when the execution of the ladder program is stopping in Scan Run, Step Run, a break point, or an I/O break condition. While pausing, the peripheral servicing is performed.
The Reset simulates the process in the Ladder Engine when from power interruption to power on. The power interruption task is started at power interruption to allow debugging the power interruption process (only when registered). Returning from the Reset turns the mode to Program.
96
Section 4-3
Online Editing
When performing Online Editing to the Ladder Engine during Step Run or pausing during a cycle, the program execution returns to the status just prior to the cycle start and pauses (when set as Online Editing enabled for Scan Rerun/Step Run).
97
Section 4-3
Monitoring IR
The Step Run enables monitoring the contents of Index Registers (IR) while executing a ladder diagram in the CX-Programmer's [Set Values] window, which used to be impossible. Following diagram shows an example of IR usage extracted from the sample in 6-2 Index Registers of CS/CJ Series Programming Manual(W394). Setting a break pointer within the FOR to NEXT loop (the hatched part in the diagram) enables to check the change of IR within the FOR to NEXT loop.
Program ,IR2 FOR &100 TIM ,IR0+ @D0
,IR1+ ,IR2+
Operand
address
P_On
++ D0 NEXT END
98
Section 4-3
Power flow
0001 0001 00 01
END
000000 000001 000002 000003 000004 000005 000006 000007 000008 000009
000200
Note Be careful when setting a start point in JUMP instructions or a loop rung as shown below. Doing so may cause an unstable JUMP address and an unexpected operation. Setting within a subroutine Setting within a FOR to NEXT loop Setting within a block program Looping may fail (exit the loop unexpectedly) because the loop condition is not evaluated correctly. For JUMP instructions (including subroutines), the JUMP destination address when the JUMP instruction was last executed will be executed or an instruction error will occur. If an instruction error occurs, once stop the program or set to the Program mode and then resume the operation. Note Refer to 2-1 Basic Concepts of CS/CJ Series Programming Manual (W394) for the power flow.
99
Step Run and Break Executing Only Specific Rung (Partial Execution)
Section 4-3
When debugging only a specific rung, set a start point at the top of the rung and a break point at the top of the next rung (shown by the hatching in the diagram) to execute the specified range of the rung. However, when repeating executing a specific rung continuously, reset a start point, which is automatically cleared on execution, after stopping at the break point.
0000 00 0000 01 0000 0000 02 03 0002 00 Program Address 0001 0001 00 01 Instruction Word (Mnemonic) Operand
END
000000 000001 000002 000003 000004 000005 000006 000007 000008 000009
000200
100
Section 4-3
The I/O break condition is expressed with the following elements for both I/O Condition and Word Condition. <Target I/O memory area >(<Condition operator >)(<Value >) Element Content Target I/O memory area Specify the target I/O memory area in its type and address. Condition operator For Word Condition, a condition operator exists. Value For I/O Condition, set ON/OFF/NOT, for Word Condition the fixed value (BIN), and for NOT operator of Word Condition nothing. Condition operators (and values for I/O Condition) to be set are shown below. I/O Condition Value ON OFF NOT Word Condition Operator = < > <= >= <> NOT Contents The bit value is ON(1) The bit value is OFF(0) Hold if the value is changed. Contents Hold if the value is the same as that of the target I/O memory area. Hold if the value is smaller than that of the target I/O memory area. Hold if the value is greater than that of the target I/O memory area. Hold if the value is equal to or smaller than that of the target I/O memory area. Hold if the value is equal to or greater than that of the target I/O memory area. Hold if the value is not equal to that of the target I/O memory area. Hold if the value has been changed.
101
Section 4-3
Here shows the registration procedure for I/O break condition. 1,2,3 1. Display [Register IO Break Condition] by [CX-Simulator Debug Console] | [IO Break Condition] and click the [Add] in the list (AND LIST/OR LIST) for registering I/O break condition to register I/O break condition. Display the [Register IO Break Condition] window.
2. Select either I/O Condition or Word Condition and input the type of the target I/O memory area, condition operator (only Word Condition), and the value followed by the [OK] button.
102
Section 4-3
The I/O break condition expression can be set by combining conditions (Turn on check boxes for conditions registered in AND LIST or OR LIST). The I/O break condition expression is configured by combining [AND LIST] (Conditions are combined with AND operators) and [OR LIST] (Conditions are combined with OR operators) with logical operators (AND/OR). The relationship between [AND LIST] and [OR LIST] is expressed by the following logic expression. ( [AND LIST] ) AND ( [OR LIST] )
I/O break condition setting expression (IO0.0=ON and H1.15=ON) and (DM0>=#7FFF or A401.08=ON)
A maximum of 64 items can be registered in AND LIST and OR LIST respectively. Also, a maximum of 64 combinations of logic expressions can be created for both the lists together.
103
Step Run and Break Operation when I/O Break Condition Met
Section 4-3
Continuous Run with I/O break condition set is executed in the diagram below. I/O break condition holds when the content of DM00000 that is incremented by one-second pulse becomes equal to or greater than #7FFF while both values of IO0.0 and H1.15 are ON, and the ladder diagram execution breaks.
0000 00
H001 15
0001 00
0000 01
W000 00
1s
++ D0 A401 08 TIM 0000 #0020 0001 15
T0000
END
I/O break condition setting expression: (IO0.0=ON and H1.15=ON) and (DM0>=#7FFF or A401.08=ON) For example, if the break occurs when the DM00000 count is completed (Shown by the left arrow in the above diagram), the I/O break line is displayed on the next line in the [Step Run] window and the program pauses. In addition, continuing the running in this condition will cause the execution to pause again in the following case: (1) the I/O break condition expression changes "true"