Omron CJ2 - 02-2010, SYSMAC CJ, SYSMAC CJ2H-CPU6, SYSMAC CJ2M-CPU3, SYSMAC CJ2M-CPU1 User Manual

...
Cat. No. W473-E1-06
CJ2 CPU Unit Software
SYSMAC CJ Series CJ2H-CPU6_-EIP CJ2H-CPU6_ CJ2M-CPU_
USER’S MANUAL
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 wi th respect to the use of the information contained herein. Moreover, because OMRON is con­stantly 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.
SYSMAC CJ Series CJ2H-CPU6@-EIP CJ2H-CPU6@ CJ2M-CPU@@ CJ2 CPU Unit Software
User’s Manual
Revised February 2010
1
CJ2 CPU Unit Software User’s Manual
Introduction
Thank you for purchasin g a CJ-series CJ2H-CPU6@(-EIP) or CJ2M-CPU@@ Progr ammab le Controller. This manual contains information required to use the CJ2H-CPU6@(-EIP) or CJ2M-CPU@@. Please thoroughly read and understand this manual bef ore y ou use the CJ2H-CPU6@(-EIP) or CJ2M-CPU@@.
This manual is intended for the following personnel, who must also have knowledge of electrical sys­tems (an electrical engineer or the equivalent).
• Personnel in charge of installing FA systems
• Personnel in ch arge of designing FA systems.
• Personnel in charge of managing FA systems and facilities.
CJ-series CJ2 CPU Units
• CJ2H-CPU6@-EIP
• CJ2H-CPU6@
•CJ2M-CPU3@
•CJ2M-CPU1@ In this manual, the following notation is used to indicate the CPU Units.
• CJ2H-CPU6@(-EIP): Indicates the CJ2H-CPU6@-EIP and CJ2H-CPU6@ CPU Units.
• CJ2M-CPU@@: Indicates the CJ2M-CPU3@ and CJ2M-CPU1@ CPU Units.
Intended Audience
Applicable Products
CJ2 Series
CJ1H-CPU@@H-R CJ1H-CPU@@H CJ1G-CPU@@H CJ1G -CPU@@P
(Loop CPU Units)
CJ1-H CPU Units
CJ1 CPU Units
CJ1G-CPU@@
CJ1M CPU Units
CJ1M-CPU@@
CJ-series Power Supply Units
CJ-series Basic I/O Units
CJ-series CPU Bus Units
CJ-series Special I/O Units
CS1H-CPU@@H CS1G-CPU@@H
CS1-H CPU Units
CS-series Power Supply Units
CS-series Basic I/O Units
CS-series CPU Bus Units
CS-series Special I/O Units
CS Series
CS1 CPU Units
CS1H-CPU@@(-V) CS1G-CPU@@(-V)
CS1D CPU Units
CS1D CPU Units for Duplex Systems
CS1D-CPU@@H
CS1D-CPU@@S
CS1D-CPU@@P
NSJ5-TQ@@(B)-G5D NSJ5-SQ@@(B)-G5D NSJ8-TV@@(B)-G5D NSJ10-TV@@(B)-G5D NSJ12-TS@@(B)-G5D
NSJ Controllers
NSJ-series Expansion Units
NSJ Series
NSJ5-TQ@@(B)-M3D NSJ5-SQ@@(B)-M3D NSJ8-TV@@(B)-M3D
NSJ Controllers
CJ2H-CPU6@-EIP CJ2H-CPU6@
CS1D CPU Units for Simplex Systems
CS1D Process-control CPU Units
Note: A special Power Supply Unit must
be used for CS1D CPU Units.
CJ2 CPU Units
CJ2H CPU Units
CJ2M CPU Units
CJ2M-CPU3@ CJ2M-CPU1@
2
CJ2 CPU Unit Software User’s Manual
CJ2 CPU Unit Manuals
Information on the CJ2 CPU Units is provided in th e f ollo wi ng man uals . Refer to the appropriate manual for the information that is required.
Wiring
1
2
3
4
5
6
7
This Manual
Mounting and Setting Hardware
Connecting Online to the PLC
Software Setup
Creating the Program
Checking and Debugging Operation
Maintenance and Troubleshooting
Error codes and remedies if a problem occurs
CJ-series CJ2 CPU Unit Hardware User’s Manual (Cat. No. W472)
CJ-series CJ2 CPU Unit Software User’s Manual (Cat. No. W473)
Unit part names and
specifications
Basic system
configuration
Unit mounting
procedure
Setting procedure for
DIP switch and rotary switches on the front of the CPU Unit
For details on built-in EtherNet/IP port, refer to the EtherNet/IP Unit Operation Manual (W465)
Wiring the Power
Supply Unit
Wring Basic I/O Units
and external I/O devices
CX-Programmer Support Software Connecting Cables
Procedures for connecting the CX-Programmer Support Software
Software setting methods for the CPU Unit (including I/O memory allocation, PLC Setup settings, Special I/O Unit parameters, CPU Bus Unit parameters, and routing tables.)
For details on built-in EtherNet/IP port, refer to the EtherNet/IP Unit Operation Manual (W465).
Program types and basic
information
CPU Unit operation
Internal memory
Data management using
file memory in the CPU Unit
Built-in CPU functions
Settings
Checking I/O wiring, setting the
Auxiliary Area settings, and performing trial operation
Monitoring and debugging with
the CX-Programmer
Detailed information on programming instructions
CS/CJ/NSJ Series Instructions Reference Manual (Cat. No. W474)
3
CJ2 CPU Unit Software User’s Manual
The CJ2 CPU manuals are organized in the sections listed in the f o llo wing tab les . Refer to the appropri­ate section in the manuals as required.
Manual Configuration
Hardware User’s Manual (Cat. No. W472)
Section Content
Section 1 Overview
This section gives an overview of the CJ2 CPU Units and describes the features and specifications.
Section 2 Basic System Configu­ration and Devices
This section describes the system configuration for the CJ2 CPU Unit.
Section 3 Nomenclature and Functions
This section describes the part names and functions of the CPU Unit and Configuration Units.
Section 4 Support Software
This section describes the types of Support Software to use to perform programming and debugging and how to connect the PLC to the Support Software.
Section 5 Installation
This section describes the installation locations and how to wire CPU Units and Configu­ration Units.
Section 6 Troubleshooting
This section describes how to check the status for errors that occur during system opera­tion and the remedies for those errors.
Section 7 Inspection and Mainte­nance
This section describes periodic inspection, the service life of the Battery and Power Sup­ply Unit, and how to replace the Battery.
Section 8 Backup Operations This section describes the procedure to back up PLC data.
Appendices
The appendices provide Unit dimensions, details on fatal and non-fatal errors, informa­tion on connecting to serial ports on the CPU Unit, the procedure for installing the USB driver on a computer, and information on load short-circuit protection and line disconnec­tion detection.
Software User’s Manual (Cat. No. W473) (This Manual)
Section Content
Section 1 Overview
This section gives an overview of the CJ2 CPU Units and describes the features and specifications.
Section 2 Internal Memory in the CPU Unit
This section describes the types of memory in the CPU Unit and the data that is stored.
Section 3 CPU Unit Operation This section describes the internal operation of the CPU Unit. Section 4 CPU Unit Initialization This section describes the initial setup of the CPU Unit. Section 5 Understanding Pro-
gramming
This section describes program types and programming details, such as symbols and programming instructions.
Section 6 I/O Memory Areas This section describes the I/O memory areas in the CPU Unit. Section 7 File Operations
This section describes the files that can be stored in the CPU Unit, the storage destina­tion for those files, and file operations.
Section 8 I/O Allocations and Unit Settings
This section describes the I/O allocations used to exchange data between the CPU Unit and other Units.
Section 9 PLC Setup
This section describes details on the PLC Setup settings, which are used to perform basic settings for the CPU Unit.
Section 10 CPU Unit Functions This section describes functions that are built into the CPU Unit. Section 11 Programming Devices
and Communications
This section describes the procedure for connecting the CJ2 CPU Unit to the CX-Pro­grammer or other Support Software and to other devices.
Section 12 CPU Unit Cycle Time This section describes how to monitor and calculate the cycle time.
Appendices
The appendices provide information on programming instructions, execution times, num­ber of steps, Auxiliary Area words and bits, a memory map of the continuous PLC mem­ory addresses, I/O memory operation when power is interrupted, and a comparison of CJ-series and CS-series PLCs.
4
CJ2 CPU Unit Software User’s Manual
Instructions Reference Manual (Cat. No. W474)
Section Content
Section 1 Basic Understanding of Instructions
This section provides basic information on designing ladder programs for a CS/CJ/NSJ­series CPU Unit.
Section 2 Summary of Instruc­tions
This section provides a summary of instructions used with a CS/CJ/NSJ-series CPU Unit.
Section 3 Instructions
This section describes the functions, operands and sample programs of the instructions that are supported by a CS/CJ/NSJ-series CPU Unit.
Section 4 Instruction Execution Times and Number of Steps
This section provides the instruction execution times for each CS/CJ/NSJ-series CPU Unit instruction.
Appendices
The appendices provide a list of instructions by function code and by mnemonic and an ASCII table for the CS/CJ/NSJ-series CPU Units.
5
CJ2 CPU Unit Software User’s Manual
Manual Structure
The following page structure is used in this manual.
Special information in this manual is classified as follows:
Page Structure
Special Information
Precautions for Safe Use
Precautions on what to do and what not to do to ensure using the product safely.
Precautions for Correct Use
Precautions on what to do and what not to do to ensure proper operation and performance.
Additional Information
Additional information to increase understanding or make operation easier.
Level 1 heading Level 2 heading Level 3 heading
Level 2 heading
A step in a procedure
Manual name
Level 3 heading
Page tab
Gives the current headings.
Gives the number of the section.
This illustration is provided only as a sample and may not literally appear in this manual.
Special Information (See below.)
5-13
5 Installation
CJ2 CPU Unit Hardware User’s Manual
noitallatsnI 2-5
5
stnen
opmoC CL
P
gnitcennoC 1-2-5
5-2 Installation
The Units that make up a CJ-series PLC can be connected simply by pressing the Units together and locking the sliders by moving them toward the back of the Units. The End Cover is connected in the same way to the Unit on the far right side of the PLC.
1. Join the Units so that the connectors fit exactly.
2. The yellow sliders at the top and bottom of each Unit lock the Units together. Move the sliders
toward the back of the Units as shown below until they click into place.
Precautions for Correct UsePrecautions for Correct Use
If the locking tabs are not secured properly, the connectors may become loose and not function properly. Be sure to slide the locking tabs until they are securely in place.
5-2-1 Connecting PLC Components
Connector
Hook
Hook holes
Slider
Lock
Release
Move the sliders toward the back until they lock into place.
6
CJ2 CPU Unit Software User’s Manual
7
CJ2 CPU Unit Software User’s Manual
Sections in this Manual
1
10
2
11
3
12
4
5
6
7
8
9
1
10
2
11
3
12
4
5
6
7
8
9
Overview
I/O Memory Areas
File Operations
A
A
Appendices
Internal Memory in the CPU Unit
CPU Unit Operation
CPU Unit Initialization
Understanding Programming
I/O Allocations and Unit Settings
PLC Setup
CPU Unit Functions
Programming Devices and Communications
CPU Unit Cycle Time
8
CJ2 CPU Unit Software User’s Manual
9
CJ2 CPU Unit Software User’s Manual
CONTENTS
Introduction............................................................................................................... 1
CJ2 CPU Unit Manuals............................................................................................. 2
Manual Structure ...................................................................................................... 5
Sections in this Manual............................................................................................ 7
Safety Precautions ................................................................................................. 21
Application Precautions......................................................................................... 25
Operating Environment Precautions.................................................................... 30
Regulations and Standards...................................................................................31
Unit Versions of CJ2 CPU Units ............................................................................ 33
Related Manuals ..................................................................................................... 38
Section 1 Overview
1-1 Overview of CJ2 CPU Units ....................................................................................................1-2
1-1-1 Overview.....................................................................................................................................1-2
1-1-2 CJ2 CPU Unit Features..............................................................................................................1-4
1-2 Basic Operating Procedure .................................................................................................. 1-11
Section 2 Internal Memory in the CPU Unit
2-1 Overview................................................................................................................................... 2-2
2-1-1 Memory Configuration................................................................................................................2-2
2-1-2 Memory Areas and Stored Data................................................................................................. 2-3
2-1-3 Transferring Data from a Programming Device to the CPU Unit........................... ... ................... 2-4
Section 3 CPU Unit Operation
3-1 CPU Unit Internal Operation.............................................................................................. ..... 3-2
3-1-1 Overview.....................................................................................................................................3-2
3-1-2 Cycle Time.................................................... ............................................... ............................... 3-4
3-1-3 Processing at Power Interruptions.............................................................................................. 3-7
3-2 CPU Unit Operating Modes.. .... .......................................... ......................................... ............3-8
3-2-1 Operating Modes........................................................................................................................3-8
3-2-2 Checking the Operating Mode.................................................................................................... 3-9
3-2-3 Changing the Operating Mode.................................................................................................. 3-10
3-2-4 Operating Mode Details............................................................................................................ 3-14
10
CJ2 CPU Unit Software User’s Manual
Section 4 CPU Unit Initialization
4-1 Overview of CPU Unit Initialization................................................................... ... ... ... ............ 4-2
4-1-1 CPU Unit Initial Settings..............................................................................................................4-2
4-2 PLC Setup ................................................................................................................................ 4-8
4-3 Creating I/O Tables.. .......................................... .......................................... ............................ 4-9
4-3-1 I/O Tables....................................................................................................................................4-9
4-3-2 Automatic Allocation..................................................................................................................4-10
4-3-3 Manual Allocation......................................................................................................................4-10
4-4 Setting Routing Tables......... ... .... ... ... ... .......................................... ....................................... 4-11
4-4-1 Routing Tables..........................................................................................................................4-11
4-4-2 Cases in Which Routing Tables Are Required ..........................................................................4-13
4-4-3 Setting and Transferring Routing Tables ...................................................................................4-14
4-5 Setting Allocated DM Area Words for Special I/O Units and CPU Bus Units...................4-15
4-5-1 Setting Allocated DM Area Words for Special I/O Units and CPU Bus Units............................4-15
4-5-2 Setting Procedure .....................................................................................................................4-15
4-6 CPU Bus Unit Setup Area ................................................................. .................................... 4-16
4-6-1 CPU Bus Unit Setup Area.........................................................................................................4-16
4-6-2 Setting Procedure .....................................................................................................................4-16
Section 5 Understanding Programming
5-1 Programming ........................................................................................................................... 5-3
5-1-1 Programming Overview...............................................................................................................5-3
5-1-2 Basic Ladder Diagram Concepts................................................................................................5-6
5-1-3 ST Language...............................................................................................................................5-8
5-1-4 SFC Overview.............................................................................................................................5-9
5-2 Tasks....................................................................................................................................... 5-11
5-2-1 Overview of Tasks.....................................................................................................................5-11
5-2-2 Cyclic Tasks......................... ... ..................................................................................................5-14
5-2-3 Interrupt Tasks ..........................................................................................................................5-20
5-2-4 Designing Tasks........................................................................................................................5-28
5-3 Sections..................................................................................................................................5-38
5-3-1 Overview of Sections................................................................................................................5-38
5-4 Function Blocks..................................................................................................................... 5-40
5-4-1 Function Blocks........................................................... ... ...........................................................5-40
5-4-2 Features of Function Blocks......................................................................................................5-41
5-4-3 Function Block Specifications ...................................................................................................5-42
5-5 Symbols.................................................................................................................................. 5-45
5-5-1 Overview...................................................................................................................................5-45
5-5-2 Types of Symbols......................................................................................................................5-46
5-5-3 Global Symbols.........................................................................................................................5-48
5-5-4 Local Symbols...........................................................................................................................5-48
5-5-5 Network Symbols (CJ2H-CPU6
@-EIP and CJ2M-CPU3@ Only).............................................5-49
5-5-6 Variables in Function Blocks ............................... .. ... .................................................................5-53
5-5-7 Symbol Data Types...................................................................................................................5-54
5-5-8 Automatic Address Allocation to Symbols.................................................................................5-59
5-6 Instructions............................................................................................................................ 5-60
5-6-1 Basic Understanding of Instructions .........................................................................................5-60
5-6-2 Specifying Operands.................................................................................................................5-67
5-6-3 Data Formats.................... ........................................................................................................5-75
5-6-4 I/O Refresh Timing....................................................................................................................5-79
11
CJ2 CPU Unit Software User’s Manual
5-7 Index Registers...................................................................................................................... 5-84
5-7-1 What Are Index Registers?.......................................................................................................5-84
5-7-2 Using Index Registers...............................................................................................................5-84
5-7-3 Processing Related to Index Registers..................................................................................... 5-88
5-7-4 Monitoring Index Registers............................................ .. ... ............................................... ....... 5-89
5-7-5 Sharing Index and Data Registers between Tasks....................................................... ............ 5-90
5-8 Specifying Address Offsets.................................................................................................. 5-92
5-8-1 Overview...................................................................................................................................5-92
5-8-2 Examples of Address Offset Application................................................................................... 5-95
5-9 Checking Programs............................................................................................................... 5-96
5-9-1 Errors during CX-Programmer Input.........................................................................................5-96
5-9-2 Program Checks with the CX-Programmer............................................................................... 5-96
5-9-3 Debugging with the Simulator...................................................................................................5-97
5-9-4 Program Execution Check......................................................................................................5-100
5-10 Precautions.......................................................................................................................... 5-103
5-10-1 Condition Flags................................................................... ... ................................................. 5-103
5-10-2 Special Program Sections ...................................................................................................... 5-108
Section 6 I/O Memory Areas
6-1 I/O Memory Areas.................................................................................................................... 6-2
6-1-1 I/O Memory Area Overview........................................................................................................ 6-2
6-1-2 I/O Memory Area Structure......................................................................................................... 6-4
6-1-3 Holding I/O Memory Values........................................................................................................ 6-6
6-2 I/O Area..................................................................................................................................... 6-8
6-2-1 Input Bits.....................................................................................................................................6-8
6-2-2 Output Bits...................................... ............................................... ...........................................6-10
6-3 Data Link Area ....................................................................................................................... 6-13
6-4 Synchronous Data Refresh Area.......................................................................................... 6-14
6-5 CPU Bus Unit Area ............................... .... ... .......................................... ................................ 6-15
6-6 Special I/O Unit Area ............................................................................................................. 6-16
6-7 Serial PLC Link Area ............................................................................................................. 6-17
6-8 DeviceNet Area ......................... .......................................... ......................................... .......... 6-18
6-9 Work Area............................................................................................................................... 6-19
6-10 Holding Area .......................................................................................................................... 6-20
6-11 Auxiliary Area ........................................................................................................................ 6-22
6-12 Temporary Relay Area...........................................................................................................6-23
6-13 Data Memory Area................................................................................................................. 6-24
6-14 Extended Data Memory Area................................................... .......................................... ... 6-27
6-15 Timer Areas............................................................................................................................ 6-31
6-16 Counter Areas........................................................................................................................ 6-33
6-17 Task Flags .............................................................................................................................. 6-34
6-18 Index Registers...................................................................................................................... 6-35
6-19 Data Registers ....................................................................................................................... 6-40
6-20 Condition Flags ..................................................................................................................... 6-42
6-21 Clock Pulses .......................................................................................................................... 6-44
12
CJ2 CPU Unit Software User’s Manual
Section 7 File Operations
7-1 File Memory.............................................................................................................................. 7-2
7-1-1 Types of File Memory..................................................... .............................................................7-2
7-1-2 Initializing File Memory ...............................................................................................................7-3
7-1-3 Memory Card Precautions ..........................................................................................................7-5
7-2 Types of Files Stored in File Memory .................................................................................... 7-7
7-2-1 File Types................................................... .................................................................................7-7
7-2-2 Creating and Saving Files for File Memory...............................................................................7-10
7-3 File Memory Operations........................................................................................................7-11
7-3-1 Types of File Memory Operations .................................. ...........................................................7-11
7-3-2 File Memory Operating Procedures and File Memory Files......................................................7-13
7-3-3 Restrictions on File Use............................................................................................................7-19
7-3-4 File Sizes........................... ... ............................................... ......................................................7-20
7-3-5 Relation between Support Software and File Memory Files.....................................................7-21
Section 8 I/O Allocations and Unit Settings
8-1 I/O Allocations ......................................................................................................................... 8-2
8-1-1 I/O Allocations.............................................................................................................................8-2
8-1-2 Automatic Allocation....................................................................................................................8-5
8-1-3 Manual Allocation........................................................................................................................8-9
8-1-4 I/O Table Errors and Precautions ..............................................................................................8-17
8-2 Setting CPU Bus Units and Special I/O Units ........... ... ... .... ......................................... .......8-20
8-2-1 Setting Parameters............................ ... .. ..................................................................................8-20
8-2-2 Data Exchange........................ .. ................................................................................................8-24
Section 9 PLC Setup
9-1 Overview of the PLC Setup..................................................................................................... 9-2
9-2 PLC Setup Settings ................................................................................................................. 9-4
9-3 PLC Setup Settings ................................................................................................................. 9-5
9-3-1 Startup Operation Settings..........................................................................................................9-5
9-3-2 CPU Unit Settings.......................................................................................................................9-8
9-3-3 Timings/Synchronous Settings..................................................................................................9-14
9-3-4 Special I/O Unit Cyclic Refreshing............................................................................................9-19
9-3-5 Basic I/O Unit Rack Response Times.......................................................................................9-21
9-3-6 Serial Port Settings...................................................................................................................9-23
9-3-7 Peripheral Service.....................................................................................................................9-30
9-3-8 FINS Protection.........................................................................................................................9-31
Section 10 CPU Unit Functions
10-1 Clock Functions..................................................................................................................... 10-3
10-1-1 Clock Functions......................... ................................................................................................10-3
10-1-2 Times Stored in Memory...........................................................................................................10-4
10-1-3 Free-running Timers..................................................................................................................10-6
10-2 Cycle Time/High-speed Processing..................................................................................... 10-7
10-2-1 Minimum Cycle Time.................................................................................................................10-7
10-2-2 Maximum Cycle Time.................................... ... ... ......................................................................10-8
10-2-3 Monitoring the Cycle Time ........................................................................................................10-9
10-2-4 High-speed Inputs.....................................................................................................................10-9
10-2-5 Background Execution............................................................................................................10-10
10-2-6 High-speed Interrupt Function ................................................................................................10-19
13
CJ2 CPU Unit Software User’s Manual
10-3 Startup Settings and Maintenance..................................................................................... 10-22
10-3-1 Holding Settings for Operating Mode Changes and at Startup............................................... 10-22
10-3-2 Power OFF Detection Delay Setting....................................................................................... 10-24
10-3-3 Disabling Power OFF Interrupts..............................................................................................10-25
10-3-4 RUN Output............................................................................................................................ 10-26
10-3-5 Automatic Transfer at Startup ................................................................................................. 10-27
10-4 Unit Management Functions ...................... ........................................................................ 10-35
10-4-1 Basic I/O Unit Management................................................................. ...................................10-35
10-4-2 CPU Bus Unit Flags/Bits......................................................................................................... 10-37
10-4-3 Special I/O Unit Flags/Bits..................................................... ... ... ...........................................10-38
10-5 Memory Management Functions........................................................................................ 10-39
10-5-1 Automatic Backup.............................................................................................. ..................... 10-39
10-5-2 EM File Memory Functions.......................................................... .. ... ... ...................................10-41
10-5-3 Comment Memory.................................................................................................................. 10-42
10-5-4 Replacing the Entire Program during Operation..................................................................... 10-43
10-6 Security Functions.............................................................................................................. 10-50
10-6-1 Write-protection Using the DIP Switch ...................................................................................10-50
10-6-2 Read Protection Using Passwords .........................................................................................10-50
10-6-3 Program Operation Protection Using Production Lot Numbers..............................................10-55
10-6-4 Write Protection from FINS Commands ................................................................................. 10-56
10-6-5 PLC Names ............................................................................................................................10-60
10-7 Debugging............................................................................................................................ 10-63
10-7-1 Forced Set/Reset................................................................... ... .............................................. 10-63
10-7-2 Test Input................................................................................................................................ 10-64
10-7-3 Differential Monitoring.............................................................................................................10-64
10-7-4 Online Editing .........................................................................................................................10-65
10-7-5 Turning OFF Outputs........... .. ...................................................... .. ... ... ...................................10-67
10-7-6 Tracing Data............................................................................................................................10-68
10-7-7 Storing the Stop Position at Errors ......................................................................................... 10-73
10-7-8 Failure Alarm Instructions....................................................................................................... 10-74
10-7-9 Simulating System Errors............... ... .. ... ..................................................... ... ... ... .................. 10-75
10-7-10 Failure Point Detection............................................................................................................ 10-76
10-8 Synchronous Unit Operation.............................................................................................. 10-78
10-8-1 Overview................................................................................................................................. 10-78
10-8-2 Details on Synchronous Unit Operation..................................................................................10-81
10-8-3 Synchronous Unit Operation Specifications ........................................................................... 10-84
10-8-4 Synchronous Data Refresh..................................................................................................... 10-85
10-8-5 Restrictions in Using Synchronous Unit Operation................................................................. 10-89
10-8-6 Application Procedure............................................................................................................. 10-91
10-8-7 PLC Setup ..............................................................................................................................10-92
10-8-8 Writing the Synchronous Interrupt Task.................................................................................. 10-94
10-8-9 Adjusting and Troubleshooting Synchronous Unit Operation .................................................10-95
Section 11 Programming Devices and Communications
11-1 Accessing a PLC from the CX-Programmer........................................................................ 11-2
11-1-1 Overview................................................................................................................................... 11-2
11-1-2 System Configurations for Accessible PLCs............................................................................. 11-4
11-1-3 Accessing a PLC from the CX-Programmer............................................................................. 11-8
11-1-4 Automatic Online Connection......... ... .....................................................................................11-11
11-2 Serial Communications.. ... ... .... ... .......................................... .......................................... .... 11-15
11-2-1 Overview of Serial Communications....................................................................................... 11-15
11-3 Communications Networks ................................................................................................ 11-29
14
CJ2 CPU Unit Software User’s Manual
Section 12 CPU Unit Cycle Time
12-1 Monitoring the Cycle Time.................................................................................................... 12-2
12-1-1 Monitoring the Cycle Time ........................................................................................................12-2
12-2 Computing the Cycle Time ...................................................................................................12-4
12-2-1 CPU Unit Operation Flowchart..................................................................................................12-4
12-2-2 Cycle Time Overview........ ... ... .. ...................................................... .. ... ... ..................................12-5
12-2-3 I/O Unit Refresh Times for Individual Units...............................................................................12-7
12-2-4 Cycle Time Calculation Exampl e............................................................................................12-11
12-2-5 Online Editing Cycle Time Extension......................................................................................12-13
12-2-6 I/O Response Time.................................................................................................................12-13
12-2-7 Response Time for Built-in Input Interrupts.............................................................................12-14
12-2-8 Response Performance of Serial PLC Links...........................................................................12-15
Appendices
A-1 Instruction Functions..............................................................................................................A-3
A-1-1 Sequence Input Instructions .......................................................................................................A-3
A-1-2 Sequence Output Instructions..................................... ... ..................................................... ........A-5
A-1-3 Sequence Control Instructions...................................................................... .. ... .........................A-6
A-1-4 Timer and Counter Instructions.................................................................................................A-10
A-1-5 Comparison Instructions ...........................................................................................................A-14
A-1-6 Data Movement Instructions ............................................. .. ... .............................................. .....A-18
A-1-7 Data Shift Instructions.............................................................................................. .................A-20
A-1-8 Increment/Decrement Instructions............................................................................................A-24
A-1-9 Symbol Math Instructions............................................ ... ...........................................................A-24
A-1-10 Conversion Instructions.............................................................................................................A-29
A-1-11 Logic Instructions......................................................................................................................A-35
A-1-12 Special Math Instructions..........................................................................................................A-37
A-1-13 Floating-point Math Instructions................................................................................................A-38
A-1-14 Double-precision Floating-point Instructions.............................................................................A-42
A-1-15 Table Data Processing Instructions...........................................................................................A-45
A-1-16 Tracking Instructions.................................................................................................................A-49
A-1-17 Data Control Instructions ....................................................... ... ... .............................................A-50
A-1-18 Subroutine Instructions .............................. ...............................................................................A-54
A-1-19 Interrupt Control Instructions.....................................................................................................A-55
A-1-20 Step Instructions .......................................................................................................................A-56
A-1-21 Basic I/O Unit Instructions.........................................................................................................A-56
A-1-22 Serial Communications Instructions..........................................................................................A-59
A-1-23 Network Instructions .................................................................................................................A-61
A-1-24 File Memory Instructions................................................ ... .. ......................................................A-63
A-1-25 Display Instructions............................................... ... ... ..............................................................A-64
A-1-26 Clock Instructions........................................................... ... ........................................................A-65
A-1-27 Debugging Instructions........................... ..................................................................................A-66
A-1-28 Failure Diagnosis Instructions...................................................................................................A-66
A-1-29 Other Instructions......................................................................................................................A-67
A-1-30 Block Programming Instructions...............................................................................................A-68
A-1-31 Text String Processing Instructions...........................................................................................A-72
A-1-32 Task Control Instructions...........................................................................................................A-75
A-1-33 Model Conversion Instructions..................................................................................................A-75
A-1-34 Special Function Block Instructions..........................................................................................A-76
15
CJ2 CPU Unit Software User’s Manual
A-2 Instruction Execution Times and Number of Steps ...........................................................A-78
A-2-1 Sequence Input Instructions.....................................................................................................A-79
A-2-2 Sequence Output Instructions ..................................................................................................A-79
A-2-3 Sequence Control Instructions .................................................................................................A-80
A-2-4 Timer and Counter Instructions ................................................................................................A-81
A-2-5 Comparison Instructions...........................................................................................................A-82
A-2-6 Data Movement Instructions.....................................................................................................A-83
A-2-7 Data Shift Instructions ..............................................................................................................A-84
A-2-8 Increment/Decrement Instructions............................................................................................A-85
A-2-9 Symbol Math Instructions .........................................................................................................A-85
A-2-10 Conversion Instructions....... .....................................................................................................A-87
A-2-11 Logic Instructions......................................................................................................................A-89
A-2-12 Special Math Instructions.........................................................................................................A-89
A-2-13 Floating-point Math Instructions ...............................................................................................A-89
A-2-14 Double-precision Floating-point Instructions............................................................................. A-91
A-2-15 Table Data Processing Instructions......................... .................................................................A-92
A-2-16 Tracking Instructions.................................................................................................................A-94
A-2-17 Data Control Instructions..........................................................................................................A-94
A-2-18 Subroutine Instructions.............................................................................................................A-95
A-2-19 Interrupt Control Instructions ....................................................................................................A-95
A-2-20 Step Instructions.......................................................................................................................A-96
A-2-21 Basic I/O Unit Instructions ........................................................................................................A-96
A-2-22 Serial Communications Instructions .........................................................................................A-97
A-2-23 Network Instructions.................................................................................................................A-98
A-2-24 File Memory Instructions ..........................................................................................................A-98
A-2-25 Display Instructions................................. ... ..................................................... ... ... ... .................A-98
A-2-26 Clock Instructions .............................. .. ... ... ...............................................................................A-98
A-2-27 Debugging Instructions.............................................................................................................A-99
A-2-28 Failure Diagnosis Instructions...................................................................................................A-99
A-2-29 Other Instructions..................... ................................................ ..............................................A-100
A-2-30 Block Programming Instructions.............................................................................................A-100
A-2-31 Text String Processing Instructions.........................................................................................A-102
A-2-32 Task Control Instructions.............................. ... ..................................................... ... ... .. .. ........A-103
A-2-33 Model Conversion Instructions...............................................................................................A-103
A-2-34 Special Function Block Instructions........................................................................................A-103
A-2-35 SFC Instructions......................................................... ... .........................................................A-103
A-2-36 Function Block Instance Execution Time................................................................................A-104
A-3 Auxiliary Area ......................................................................................................................A-106
A-3-1 Read-only Area (Set by System)............................................................................................A-106
A-3-2 Read/Write Area (Set by User)...............................................................................................A-129
A-3-3 Details on Auxiliary Area Operation............................................. ...........................................A-138
A-4 Memory Map of PLC Memory Addresses..........................................................................A-141
A-4-1 PLC Memory Addresses.........................................................................................................A-141
A-4-2 Memory Map...........................................................................................................................A-142
A-5 Ope ra ti on for Power Interruptions ............................................................................. ........A-143
A-5-1 Power OFF Operation.............................................................................................................A-143
A-5-2 Instruction Execution for Power Interruptions .........................................................................A-145
A-6 EtherNet/IP Connections from Windows XP (SP2 or Higher) or Windows Vista...........A-147
A-6-1 Changing Windows Firewall Settings......................................................................................A-147
A-7 PLC Comparison Charts: CJ-series and CS-series PLCs ...............................................A-150
A-8 Functions Supported for Unit Versions.............................................................................A-154
Index ................................................................................................................Index-1
Revision History .......................................................................................Revision-1
16
CJ2 CPU Unit Software User’s Manual
17
CJ2 CPU Unit Software User’s Manual
Read and Understand this Manual
Please read and understand this manual be f ore using the product. Please consult your OMRON representative if you have any questions or comments.
Warranty and Limitations of Liability
WARRANTY
OMRON's exclusive warranty is that the products are free from defects in materials and workmanship for a period of one year (or other period if specified) from date of sale by OMRON.
OMRON MAKES NO WARRANTY OR REPRESENTA TION, EXPRESS OR IMPLIED, REGARDING NON­INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR PARTICULAR PURPOSE OF THE PRODUCTS. ANY BUYER OR USER ACKNOWLEDGES THAT THE BUYER OR USER ALONE HAS DETERMINED THAT THE PRODUCTS WILL SUITABLY MEET THE REQUIREMENTS OF THEIR INTENDED USE. OMRON DISCLAIMS ALL OTHER WARRANTIES, EXPRESS OR IMPLIED.
LIMITATIONS OF LIABILITY
OMRON SHALL NOT BE RESPONSIBLE FOR SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES, LOSS OF PROFITS OR COMMERCIAL LOSS IN ANY WAY CONNECTED WITH THE PRODUCTS, WHETHER SUCH CLAIM IS BASED ON CONTRACT, WARRANTY, NEGLIGENCE, OR STRICT LIABILITY.
In no event shall the responsibility of OMR ON f or any act e xceed the individual price of the product on which liability is asserted.
IN NO EVENT SHALL OMRON BE RESPONSIBLE FOR WARRANTY, REPAIR, OR OTHER CLAIMS REGARDING THE PRODUCTS UNLESS OMRON'S ANALYSIS CONFIRMS THAT THE PRODUCTS WERE PROPERLY HANDLED, STORED, INSTALLED, AND MAINTAINED AND NOT SUBJECT TO CONTAMINATION, ABUSE, MISUSE, OR INAPPROPRIATE MODIFICATION OR REPAIR.
18
CJ2 CPU Unit Software User’s Manual
Application Considerations
SUITABILITY FOR USE
OMRON shall not be responsible for conformity with any standards, codes, or regulations that apply to the combination of products in the customer's application or use of the products.
At the customer's request, OMRON will provide applicable third party certification documents identifying ratings and limitations of use that apply to the products. This information by itself is not sufficient for a complete determination of the suitability of the products in combination with the end product, machine, system, or other application or use.
The following are some examples of applications for which particular attention must be given. This is not intended to be an exh austive list of all possible uses of the products , nor is it inte nded to imply that the uses listed may be suitable for the products:
• Outdoor use, uses involving potential chemical contamination or electrical interference, or conditions or uses not described in this manual.
• Nuclear energy control systems, combustion systems, railroad systems, aviation systems, medical equipment, amusement machines, vehicles, safety equipment, and installations subject to separate industry or government regulations.
• Systems, machines, and equipment that could present a risk to life or property.
Please know and observe all prohibitions of use applicable to the products. NEVER USE THE PRODUCTS FOR AN APPLICATION INVOLVING SERIOUS RISK TO LIFE OR
PROPERTY WITHOUT ENSURING THAT THE SYSTEM AS A WHOLE HAS BEEN DESIGNED TO ADDRESS THE RISKS, AND THAT THE OMRON PRODUCTS ARE PROPERLY RATED AND INSTALLED FOR THE INTENDED USE WITHIN THE OVERALL EQUIPMENT OR SYSTEM.
PROGRAMMABLE PRODUCTS
OMRON shall not be responsible for the user's programming of a programmable product, or any consequence thereof.
19
CJ2 CPU Unit Software User’s Manual
Disclaimers
CHANGE IN SPECIFICATIONS
Product specifications and accessories may be changed at any time based on improvements and other reasons.
It is our practice to change model numbers when published ratings or features are changed, or when significant construction changes are made. However, some specifications of the products may be changed without any notice. When in doub t, special model numbers may be assigned to fix or establish key specifications for your application on your request. Please consult with your OMRON representative at any time to confirm actual specifications of purchased products.
DIMENSIONS AND WEIGHTS
Dimensions and weights are nominal and are not to be used for manufacturing purposes, even when tolerances are shown.
PERFORMANCE DATA
Perf ormance data given in this manual is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of OMRON's test conditions, and the users must correlate it to actual application requirements. Actual performance is subject to the OMRON Warranty and Limitations of Liability.
ERRORS AND OMISSIONS
The information in this manual has been carefully checked and is believed to be accurate; however, no responsibility is assumed for clerical, typographical, or proofreading errors, or omissions.
20
CJ2 CPU Unit Software User’s Manual
21
CJ2 CPU Unit Software User’s Manual
Safety Precautions
The following notation is used in this manual to provide precautions required to ensure safe usage of a CJ-series PLC. The saf e t y pre c aution s that a re pr ovided are extremely important to safety. Always read and heed the information provided in all safety precautions.
Definition of Precautionary Information
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.
Precautions for Safe Use
Indicates precautions on what to do and what not to do to ensure using the product safely.
Precautions for Correct Use
Indicates precautions on what to do and what not to do to ensure proper operation and perf ormance.
22
CJ2 CPU Unit Software User’s Manual
Symbols
The triangle symbol indicates precautions (including warnings). The specific operation is shown in the triangle and explained in text. This example indicates a precaution for electric shock.
The circle and slash symbol indicates operations that you must not do. The specific operation is shown in the circle and explained in text.
The filled circle symbol indicates operations that you must do. The specific operation is shown in the circle and explained in text. This example shows a general precaution for something that you must do.
The triangle symbol indicates precautions (including warnings). The specific operation is shown in the triangle and explained in text. This example indicates a general precaution.
The triangle symbol indicates precautions (including warnings). The specific operation is shown in the triangle and explained in text. This example indicates a precaution for hot surfaces.
23
CJ2 CPU Unit Software User’s Manual
WARNING
Do not attempt to take any Unit apart or touch the inside of any Unit while the power is being supplied. Doing so may result in electric shock.
Do not touch any of the t erminals or t erminal blocks while the pow er is be ing supplied. Doing so may result in electric shock.
Provide safety measures in external circuits (i.e., not in the Programmable Controller), including the following items, to ensure safety in the system if an abnormality occurs due to malfunction of the Programmable Controller or another external factor affecting the operation of the Programmable Control­ler. "Programmab le Controller" indicates the CPU Unit and all other Units and is abbreviated "PLC" in this manual. Not doing so may result in serious acci­dents.
• The PLC will turn OFF all outputs when its self-diagnosis fu nction detects any error or when a severe failure alarm (FALS) instruction is executed. Unexpected operation, however, may still occur for errors in the I/O control section, errors in I/O memory, and other errors that cannot be detected by the self-diagnosis function. As a countermeasure for all such errors, exter­nal safety measures must be provided to ensure safety in the system.
• The PLC outputs may remain ON or OFF due to deposition or burning of the output relays or destruction of the output transistors. As a countermea­sure for such problems, external safety measures must be provided to ensure safety in the system.
• Provide measures in the computer system and programming to ensure safety in the over all system even if communications errors or malfunctions occur in data link communications or remote I/O communications.
Confirm safety before transferring data files stored in the file memory (Mem­ory Card or EM file memory) to the I/O area (CIO) of the CPU Unit using a peripheral tool. Otherwise, the devices connected to the output unit may mal­function regardless of the operation mode of the CPU Unit.
Fail-safe measures must be taken by the customer to ensure safety in the event of incorrect, missing, or abnormal signals caused by broken signal lines, momentary power interruptions, or other causes. Serious accidents may result from abnormal operation if proper measures are not provided.
24
CJ2 CPU Unit Software User’s Manual
Caution
Execute online edit only after confirming that no adverse effects will be caused by extending the cycle time. Otherwise, the input signals may not be readable.
Confirm safety at the destination node before transferring a program, PLC Setup, I/O tables, I/O memory contents, or parameters to another node or changing contents of the any of these items. Transferring or changing data can result in unexpected system operation.
The CJ2 CPU Units automatically back up the user program and parameter data to flash memory when these are written to the CPU Unit. I/O memory including the DM, EM, and Holding Areas), however , is not written to flash memory.
The DM, EM, and Holding Areas can be held during power interruptions with a battery. If there is a battery error, the contents of these areas may not be accurate after a power interruption. If the contents of the DM, EM, and Hold­ing Areas are used to control external outputs, prevent inappropriate outputs from being made whenever the Battery Error Flag (A402.04) is ON.
Tighten the terminal screws on the AC Power Supply Unit to the torque spec­ified in the operation manual. The loose screws may result in burning or mal­function.
Do not touch the Power Supply Unit when power is being supplied or immedi­ately after the power supply is turned OFF. The Pow er Supply Unit will be hot and you may be burned.
When connecting a personal computer or other peripheral device to a PLC to which a non-insulated Power Supply Unit (CJ1W-PD022) is mounted, either ground the 0 V side of the external power supply or do not ground the exter­nal power supply at all ground. A short-circuit will occur in the external power supply if incorrect grounding methods are used. Never ground the 24 V side, as shown below.
24 V
0 V
FG
CPU Unit
0 V
Wiring in Which the 24-V Power Supply Will Short
Non-insulated DC power supply
Power Supply Unit
Peripheral cable
Peripheral device (e.g., personal computer)
25
CJ2 CPU Unit Software User’s Manual
Application Precautions
Observe the following precautions when using a CJ-series PLC.
z Power Supply
• Always use the power supply voltages specified in the user’s manuals. An incorrect voltage may result in malfunction or burning.
• Exceeding the capacity of the Power Supply Unit may prevent the CPU Unit or other Units from starting.
• Take appropriate measures to ensure that the specified power with the rated voltage and fre­quency is supplied. Be particularly careful in places where the power supply is unstable. An incor­rect power supply may result in malfunction.
• Always turn OFF the power supply to the PLC before attempting any of the following. Not turning OFF the power supply may result in malfunction or electric shock.
• Mounting or dismounting Power Supply Units, I/O Units, CPU Units, Option Boards, or any other Units.
• Assembling the Units.
• Setting DIP switches or rotary switches.
• Connecting cables or wiring the system.
• Connecting or disconnecting the connectors.
• When cross-wiring ter minals, the total current for all the ter minal will flow in the wire. Make sure that the current capacity of the wire is sufficient.
• Observe the following precautions when using a Power Supply Unit that supports the Replace­ment Notification Function.
• Replace the Power Supply Unit within six months if the display on the front of the Power Sup­ply Unit alternates between 0.0 and A02, or if the alarm output automatically turns OFF.
• Keep the alarm output cable separated from power line and high-voltage lines.
• Do not apply a voltage or connect a loa d exceeding the specifications to the alarm output.
• When storing the Power Supply Unit for more than three months, store it at −20 to 30°C and 25% to 70% humidity to preserve the Replacement Notification Function.
• If the Po wer Supply Unit is not installed properly, heat buildup may cause the replacement noti­fication signal to appear at the wrong time or may cause interior elements to deteriorate or become damaged. Use only the standard installation method.
• Do not touch the terminals on the Power Supply Unit immediately after turning OFF the power supply. Residual voltage may cause electrical shock.
• Observe the following precautions to prevent failure due to difference in electrical potential if the computer is connected to the PLC.
• Before connecting a laptop computer to the PLC, disconnect the power supply plug of the computer from the AC outlet. Residual curr ent in th e AC adaptor may cause diff erence in elec­trical potential to occur between the computer and the PLC. After you connect the computer and PLC, supply the power again from the AC adaptor.
• If the computer has an FG terminal, make the connections so that it has the same electrical potential as the FG (GR) terminal on the PLC.
• If the computer is grounded to a separate location, difference in electrical potential may occur depending on the grounding conditions.
z Installation
• Do not install the PLC near sources of strong high-frequency noise.
• Before touching a Unit, be sure to first touch a grounded metallic object in order to discharge any static build-up. Not doing so may result in malfunction or damage.
26
CJ2 CPU Unit Software User’s Manual
• Be sure that the terminal blocks, connectors, Memory Cards, Option Boards, expansion cables, and other items with locking devices are properly locked into place . Impr oper locking may result in malfunction.
• The sliders on the tops and bottoms of th e Power Supply Unit, CPU Unit, I/O Units, Special I/O Units, and CPU Bus Units must be completely locked (until they click into place) after connecting to adjacent Units. The Unit may not operate properly if the sliders are not locked in place. It may not be possible to achieve proper functionality if the sliders are not locked.
z Wiring
• Follow the instructions in this manual to correctly perform wiring.
• Double-check all wiring and switch settings before turning ON the power supply. Incorrect wiring may result in burning.
• Be sure that all terminal screws, and cable connector screws are tightened to the torque specified in the relevant manuals. Incorrect tightening torque may result in malfunction.
• Mount terminal blocks and connectors only after checking the mounting location carefully.
• Leave the label attached to the Unit when wiring. Removing the label may result in malfunction if foreign matter enters the Unit.
• Remove the label after the completion of wiring to ensure prope r heat dissipation. Leaving the label attached may result in malfunction.
• Use crimp terminals for wiring. Do not connect bare stranded wires directly to terminals. Connec­tion of bare stranded wires may result in burning.
• Do not apply voltages to the Input Units in excess of the rated input voltage. Excess voltages may result in burning.
• Always connect to a g ro und of 100 or less when installing the Units . Not connecting to a g round of 100 or less may result in electric shock. A ground of 100 or less must be installed when shorting the GR and LG terminals on the Power Supply Unit.
• Do not apply voltages or connect loads to the Output Units in excess of the maximum switching capacity. Excess voltage or loads may result in burning.
• Do not pull on the cables or bend the cables beyond their natural limit. Doing either of these may break the cables.
• Do not place objects on top of the cables or other wiring lines. Doing so may break the cables.
• Do not use commercially available RS-232C personal computer cables. Always use the special cables listed in this manual or make cables according to manual specifications. Using commer­cially availab le cables may damage the external devices or CPU Unit.
• Never con nect p i n 6 (5- V p o wer supply) on the RS-232C port on the CPU Unit to any device other than an NT-AL001 Link Adapter, CJ1W-CIF11 Converter, and Programmable Terminals (NV3W­M@20L). The external device or the CPU Unit may be damaged.
z Handling
• The Po wer Supply Unit may possibly be damaged if the entire voltage for a dielectric strength test is applied or shut OFF suddenly using a switch. Use a variable resistor to gradually increase and decrease the voltage.
• Separate the line ground terminal (LG) from the functional ground terminal (GR) on the Power Supply Unit before performing withstand voltage tests or insulation resistance tests. Not doing so may result in burning.
• Make sure that the DIP switches and DM Area are set correctly before starting operation.
• After replacing the CPU Unit, a Special I/O Unit, or a CPU Bus Unit, make sure that the required data for the DM Area, Holding Area, and other memory areas has been transferred to the new Unit before restarting operation.
• Confirm that no adverse effect will occur in the system before attempting any of the following. Not doing so may result in an unexpected operation.
• Changing the operating mode of the PL C (i ncluding the set ting of t he st artup operating mod e).
Loading...
+ 610 hidden pages