Omron CJ2 CPU User Manual

Cat. No. W473-E1-07
SYSMAC CJ Series
CJ2H-CPU6@-EIP CJ2H-CPU6@
CJ2M-CPU@@
CJ2 CPU Unit Software
USER’S MANUAL
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 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 July 2010

Introduction

Thank you for purchasing a CJ-series CJ2H-CPU6@(-EIP) or CJ2M-CPU@@ Programmable Controller. This manual contains information required to use the CJ2H-CPU6@(-EIP) or CJ2M-CPU@@. Please thoroughly read and understand this manual before you use the CJ2H-CPU6@(-EIP) or CJ2M-CPU@@.
Intended Audience
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 charge of designing FA systems.
• Personnel in charge of managing FA systems and facilities.
Applicable Products
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.
Optional Pulse I/O Modules can be used for pulse I/O with a CJ2M CPU Unit.
CJ2 Series
CJ2 CPU Units
CJ2H CPU Units
CJ2H-CPU6@-EIP CJ2H-CPU6@
CJ2M CPU Units
CJ2M-CPU3@ CJ2M-CPU1@
Pulse I/O Module for CJ2M CPU Units
CJ1-H CPU Units
CJ1H-CPU@@H-R CJ1H-CPU@@H CJ1G-CPU@@H CJ1G -CPU@@P
(Loop CPU Units)
CJ1M CPU Units
CJ1M-CPU@@
CJ1 CPU Units
CJ1G-CPU@@
CJ-series Basic I/O Units
CJ-series Special I/O Units
CJ-series CPU Bus Units
CJ-series Power Supply Units
NSJ Series
NSJ Controllers
NSJ5-TQ@@(B)-G5D NSJ5-SQ@@(B)-G5D NSJ8-TV@@(B)-G5D NSJ10-TV@@(B)-G5D NSJ12-TS@@(B)-G5D
NSJ Controllers
NSJ5-TQ@@(B)-M3D NSJ5-SQ@@(B)-M3D NSJ8-TV@@(B)-M3D
NSJ-series Expansion Units
CS Series
CS1-H CPU Units
CS1H-CPU@@H CS1G-CPU@@H
CS1D CPU Units
CS1D CPU Units for Duplex Systems
CS1D-CPU@@H
CS1D CPU Units for Simplex Systems
CS1D-CPU@@S
CS1D Process-control CPU Units
CS1D-CPU@@P
CS1 CPU Units
CS1H-CPU@@(-V) CS1G-CPU@@(-V)
CS-series Basic I/O Units
CS-series Special I/O Units
CS-series CPU Bus Units
CS-series Power Supply Units
Note: A special Power Supply Unit must
be used for CS1D CPU Units.
CJ2 CPU Unit Software User’s Manual
1

CJ2 CPU Unit Manuals

Information on the CJ2 CPU Units is provided in the following manuals. Refer to the appropriate manual for the information that is required.
This Manual
Mounting and Setting
1
Hardware
2
Wiring
CJ-series CJ2 CPU Unit Hardware User’s Manual (Cat. No. W472)
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)
CJ-series CJ2 CPU Unit Software User’s Manual (Cat. No. W473)
CS/CJ/NSJ Series Instructions Reference Manual (Cat. No. W474)
CJ2M CPU Unit Pulse I/O Module User's Manual (Cat. No. W486)
Specifications and wiring
of Pulse I/O Modules
Available pulse I/O
functions and allocations
Connecting Online to
3
the PLC
Software
4
Setup
Creating the
5
Program
Checking and Debugging
6
Operation
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
Detailed information on programming instructions
Pulse I/O Module
specifications
Wiring methods between
Pulse I/O Modules and external I/O devices
Software setting procedures for Pulse I/O Modules (I/O memory allocations and PLC Setup settings)
Pulse I/O functions
Maintenance and
7
Troubleshooting
2
Checking I/O wiring, setting the
Auxiliary Area settings, and performing trial operation
Monitoring and debugging with
the CX-Programmer
Error codes and remedies if a problem occurs
CJ2 CPU Unit Software User’s Manual
Manual Configuration
The CJ2 CPU manuals are organized in the sections listed in the following tables. Refer to the appropri­ate section in the manuals as required.
Hardware User’s Manual (Cat. No. W472)
Section Content
Section 1 Overview
Section 2 Basic System Configu­ration and Devices
Section 3 Nomenclature and Functions
Section 4 Support Software
Section 5 Installation
Section 6 Troubleshooting
Section 7 Inspection and Mainte­nance
Section 8 Backup Operations This section describes the procedure to back up PLC data.
Appendices
This section gives an overview of the CJ2 CPU Units and describes the features and specifications.
This section describes the system configuration for the CJ2 CPU Unit.
This section describes the part names and functions of the CPU Unit and Configuration Units.
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.
This section describes the installation locations and how to wire CPU Units and Configu­ration Units.
This section describes how to check the status for errors that occur during system opera­tion and the remedies for those errors.
This section describes periodic inspection, the service life of the Battery and Power Sup­ply Unit, and how to replace the Battery.
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
Section 2 Internal Memory in the CPU Unit
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
Section 6 I/O Memory Areas This section describes the I/O memory areas in the CPU Unit.
Section 7 File Operations
Section 8 I/O Allocations and Unit Settings
Section 9 PLC Setup
Section 10 CPU Unit Functions This section describes functions that are built into the CPU Unit.
Section 11 Programming Devices and Communications
Section 12 CPU Unit Cycle Time This section describes how to monitor and calculate the cycle time.
Appendices
This section gives an overview of the CJ2 CPU Units and describes the features and specifications.
This section describes the types of memory in the CPU Unit and the data that is stored.
This section describes program types and programming details, such as symbols and programming instructions.
This section describes the files that can be stored in the CPU Unit, the storage destina­tion for those files, and file operations.
This section describes the I/O allocations used to exchange data between the CPU Unit and other Units.
This section describes details on the PLC Setup settings, which are used to perform basic settings for the CPU Unit.
This section describes the procedure for connecting the CJ2 CPU Unit to the CX-Pro­grammer or other Support Software and to other devices.
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.
CJ2 CPU Unit Software User’s Manual
3
Instructions Reference Manual (Cat. No. W474)
Section Content
Section 1 Basic Understanding of Instructions
Section 2 Summary of Instruc­tions
Section 3 Instructions
Section 4 Instruction Execution Times and Number of Steps
Appendices
This section provides basic information on designing ladder programs for a CS/CJ/NSJ­series CPU Unit.
This section provides a summary of instructions used with a CS/CJ/NSJ-series CPU Unit.
This section describes the functions, operands and sample programs of the instructions that are supported by a CS/CJ/NSJ-series CPU Unit.
This section provides the instruction execution times for each CS/CJ/NSJ-series CPU Unit instruction.
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.
Pulse I/O Module User's Manual (Cat. No. W486)
Section Content
Section 1 Overview
Section 2 I/O Application Proce­dures and Function Allocations
Section 3 I/O Specifications and Wiring for Pulse I/O Modules
Section 4 General-purpose I/O This section describes the general-purpose I/O.
Section 5 Quick-response Inputs
Section 6 Interrupts This section describes the interrupt input function. Section 7 High-speed Counters This section describes the high-speed counter inputs and high-speed counter interrupts.
Section 8 Pulse Outputs
Section 9 PWM Outputs This section describes the variable-duty-factor (PWM) outputs.
Appendices
This section gives an overview of the Pulse I/O Modules and the pulse I/O functions of the CJ2M.
This section lists the pulse functions of the CJ2M CPU Units and describes the overall application flow and the allocation of the functions.
This section provides the specifications and describes the wiring of the Pulse I/O Module.
This section describes the quick-response function that can be used to input signals that are shorter than the cycle time.
This section describes positioning functions, such as trapezoidal control, S-curve control, jogging, and origin search functions.
The appendices provide a table of flag changes for pulse outputs, a comparison table with other models, and a performance table.
4
CJ2 CPU Unit Software User’s Manual

Manual Structure

Page Structure
The following page structure is used in this manual.
Level 2 heading
Level 3 heading
A step in a procedure
Special Information (See below.)
5-2 Installation
5-2-1 Connecting PLC Components
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.
Hook
Connector
Move the sliders toward the back until they lock into place.
Hook holes
Release
Lock
Slider
5 Installation
Level 1 heading Level 2 heading Level 3 heading
Gives the current headings.
noitallatsnI 2-5
5
Page tab
Gives the number of the section.
gnitcennoC 1-2-5 P
opmoC CL
stnen
Manual name
CJ2 CPU Unit Hardware User’s Manual
This illustration is provided only as a sample and may not literally appear in this manual.
Special Information
Special information in this manual is classified as follows:
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.
5-13
CJ2 CPU Unit Software User’s Manual
5
6
CJ2 CPU Unit Software User’s Manual

Sections in this Manual

1
2
3
4
5
Overview
Internal Memory in the CPU Unit
CPU Unit Operation
CPU Unit Initialization
Understanding Programming
10
11
12
A
CPU Unit Functions
Programming Devices and Communications
CPU Unit Cycle Time
Appendices
1
2
3
4
10
11
12
A
5
6
7
6
7
8
9
8
I/O Memory Areas
9
File Operations
I/O Allocations and Unit Settings
PLC Setup
CJ2 CPU Unit Software User’s Manual
7
8
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 ..................................................................................................... 39
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-12
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
CJ2 CPU Unit Software User’s Manual
9
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-30
5-3 Sections.................................................................................................................................. 5-40
5-3-1 Overview of Sections ................................................................................................................5-40
5-4 Function Blocks..................................................................................................................... 5-42
5-4-1 Function Blocks.........................................................................................................................5-42
5-4-2 Features of Function Blocks......................................................................................................5-43
5-4-3 Function Block Specifications ...................................................................................................5-44
5-5 Symbols.................................................................................................................................. 5-47
5-5-1 Overview ...................................................................................................................................5-47
5-5-2 Types of Symbols......................................................................................................................5-48
5-5-3 Global Symbols.........................................................................................................................5-50
5-5-4 Local Symbols...........................................................................................................................5-50
5-5-5 Network Symbols (CJ2H-CPU6
5-5-6 Variables in Function Blocks .....................................................................................................5-55
5-5-7 Symbol Data Types ...................................................................................................................5-56
5-5-8 Automatic Address Allocation to Symbols................................................................................. 5-61
@-EIP and CJ2M-CPU3@ Only) .............................................5-51
5-6 Instructions ............................................................................................................................ 5-62
5-6-1 Basic Understanding of Instructions .........................................................................................5-62
5-6-2 Specifying Operands.................................................................................................................5-69
5-6-3 Data Formats ............................................................................................................................ 5-77
5-6-4 I/O Refresh Timing.................................................................................................................... 5-81
10
CJ2 CPU Unit Software User’s Manual
5-7 Index Registers ...................................................................................................................... 5-86
5-7-1 What Are Index Registers?....................................................................................................... 5-86
5-7-2 Using Index Registers............................................................................................................... 5-86
5-7-3 Processing Related to Index Registers..................................................................................... 5-91
5-7-4 Monitoring Index Registers....................................................................................................... 5-92
5-7-5 Sharing Index and Data Registers between Tasks................................................................... 5-93
5-8 Specifying Address Offsets.................................................................................................. 5-95
5-8-1 Overview................................................................................................................................... 5-95
5-8-2 Examples of Address Offset Application................................................................................... 5-97
5-9 Checking Programs............................................................................................................... 5-98
5-9-1 Errors during CX-Programmer Input......................................................................................... 5-98
5-9-2 Program Checks with the CX-Programmer............................................................................... 5-98
5-9-3 Debugging with the Simulator................................................................................................... 5-99
5-9-4 Program Execution Check ...................................................................................................... 5-102
5-10 Precautions .......................................................................................................................... 5-105
5-10-1 Condition Flags....................................................................................................................... 5-105
5-10-2 Special Program Sections ...................................................................................................... 5-110
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 Pulse I/O Area ........................................................................................................................ 6-17
6-8 Serial PLC Link Area ............................................................................................................. 6-18
6-9 DeviceNet Area ...................................................................................................................... 6-19
6-10 Work Area............................................................................................................................... 6-20
6-11 Holding Area .......................................................................................................................... 6-21
6-12 Auxiliary Area ........................................................................................................................ 6-23
6-13 Temporary Relay Area........................................................................................................... 6-24
6-14 Data Memory Area ................................................................................................................. 6-25
6-15 Extended Data Memory Area ................................................................................................ 6-28
6-16 Timer Areas............................................................................................................................ 6-32
6-17 Counter Areas........................................................................................................................ 6-34
6-18 Task Flags .............................................................................................................................. 6-35
6-19 Index Registers ...................................................................................................................... 6-36
6-20 Data Registers ....................................................................................................................... 6-41
6-21 Condition Flags ..................................................................................................................... 6-43
6-22 Clock Pulses .......................................................................................................................... 6-45
CJ2 CPU Unit Software User’s Manual
11
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
9-3-9 I/O Module................................................................................................................................. 9-32
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
12
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-76
10-7-8 Failure Alarm Instructions....................................................................................................... 10-77
10-7-9 Simulating System Errors ....................................................................................................... 10-78
10-7-10 Failure Point Detection............................................................................................................ 10-79
10-8 Synchronous Unit Operation.............................................................................................. 10-81
10-8-1 Overview................................................................................................................................. 10-81
10-8-2 Details on Synchronous Unit Operation.................................................................................. 10-84
10-8-3 Synchronous Unit Operation Specifications ........................................................................... 10-87
10-8-4 Synchronous Data Refresh..................................................................................................... 10-88
10-8-5 Restrictions in Using Synchronous Unit Operation................................................................. 10-92
10-8-6 Application Procedure............................................................................................................. 10-94
10-8-7 PLC Setup .............................................................................................................................. 10-95
10-8-8 Writing the Synchronous Interrupt Task.................................................................................. 10-97
10-8-9 Adjusting and Troubleshooting Synchronous Unit Operation ................................................. 10-98
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
CJ2 CPU Unit Software User’s Manual
13
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 Example ............................................................................................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 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 High-speed Counter/Pulse Output Instructions.........................................................................A-56
A-1-21 Step Instructions .......................................................................................................................A-58
A-1-22 Basic I/O Unit Instructions.........................................................................................................A-58
A-1-23 Serial Communications Instructions..........................................................................................A-61
A-1-24 Network Instructions .................................................................................................................A-63
A-1-25 File Memory Instructions...........................................................................................................A-65
A-1-26 Display Instructions...................................................................................................................A-66
A-1-27 Clock Instructions......................................................................................................................A-67
A-1-28 Debugging Instructions .............................................................................................................A-68
A-1-29 Failure Diagnosis Instructions ...................................................................................................A-68
A-1-30 Other Instructions......................................................................................................................A-69
A-1-31 Block Programming Instructions ...............................................................................................A-70
A-1-32 Text String Processing Instructions ...........................................................................................A-74
A-1-33 Task Control Instructions...........................................................................................................A-77
A-1-34 Model Conversion Instructions..................................................................................................A-77
A-1-35 Special Function Block Instructions ..........................................................................................A-78
14
CJ2 CPU Unit Software User’s Manual
A-2 Instruction Execution Times and Number of Steps ...........................................................A-80
A-2-1 Sequence Input Instructions .....................................................................................................A-81
A-2-2 Sequence Output Instructions ..................................................................................................A-81
A-2-3 Sequence Control Instructions ................................................................................................. A-82
A-2-4 Timer and Counter Instructions ................................................................................................A-83
A-2-5 Comparison Instructions ...........................................................................................................A-84
A-2-6 Data Movement Instructions.....................................................................................................A-85
A-2-7 Data Shift Instructions .............................................................................................................. A-86
A-2-8 Increment/Decrement Instructions............................................................................................A-87
A-2-9 Symbol Math Instructions .........................................................................................................A-87
A-2-10 Conversion Instructions ............................................................................................................ A-89
A-2-11 Logic Instructions......................................................................................................................A-91
A-2-12 Special Math Instructions ......................................................................................................... A-91
A-2-13 Floating-point Math Instructions ...............................................................................................A-92
A-2-14 Double-precision Floating-point Instructions............................................................................. A-93
A-2-15 Table Data Processing Instructions ..........................................................................................A-94
A-2-16 Tracking Instructions .................................................................................................................A-96
A-2-17 Data Control Instructions ..........................................................................................................A-96
A-2-18 Subroutine Instructions.............................................................................................................A-97
A-2-19 Interrupt Control Instructions ....................................................................................................A-98
A-2-20 High-speed Counter/Pulse Output Instructions ........................................................................A-98
A-2-21 Step Instructions..................................................................................................................... A-101
A-2-22 Basic I/O Unit Instructions ......................................................................................................A-101
A-2-23 Serial Communications Instructions ....................................................................................... A-102
A-2-24 Network Instructions ...............................................................................................................A-103
A-2-25 File Memory Instructions ........................................................................................................ A-103
A-2-26 Display Instructions.................................................................................................................A-104
A-2-27 Clock Instructions ................................................................................................................... A-104
A-2-28 Debugging Instructions...........................................................................................................A-104
A-2-29 Failure Diagnosis Instructions.................................................................................................A-104
A-2-30 Other Instructions ...................................................................................................................A-105
A-2-31 Block Programming Instructions.............................................................................................A-105
A-2-32 Text String Processing Instructions......................................................................................... A-107
A-2-33 Task Control Instructions ........................................................................................................A-108
A-2-34 Model Conversion Instructions ...............................................................................................A-108
A-2-35 Special Function Block Instructions........................................................................................ A-109
A-2-36 SFC Instructions .....................................................................................................................A-109
A-2-37 Function Block Instance Execution Time................................................................................ A-109
A-3 Auxiliary Area ......................................................................................................................A-111
A-3-1 Read-only Area (Set by System) ............................................................................................A-111
A-3-2 Read/Write Area (Set by User)............................................................................................... A-150
A-3-3 Details on Auxiliary Area Operation........................................................................................A-161
A-4 Memory Map of PLC Memory Addresses..........................................................................A-164
A-4-1 PLC Memory Addresses......................................................................................................... A-164
A-4-2 Memory Map...........................................................................................................................A-165
A-5 Operation for Power Interruptions .....................................................................................A-166
A-5-1 Power OFF Operation.............................................................................................................A-166
A-5-2 Instruction Execution for Power Interruptions .........................................................................A-168
A-6 EtherNet/IP Connections from Windows XP (SP2 or Higher), Windows Vista,
or Windows 7 .....................................................................................................................A-170
A-6-1 Changing Windows Firewall Settings......................................................................................A-170
A-7 PLC Comparison Charts: CJ-series and CS-series PLCs ...............................................A-173
A-8 Functions Supported for Unit Versions.............................................................................A-177
A-8-1 CJ2H CPU Unit.......................................................................................................................A-177
A-8-2 CJ2M CPU Unit ......................................................................................................................A-178
Index ................................................................................................................Index-1
Revision History ....................................................................................... Revision-1
CJ2 CPU Unit Software User’s Manual
15
16
CJ2 CPU Unit Software User’s Manual
Read and Understand this Manual
Please read and understand this manual before 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 REPRESENTATION, 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 OMRON for any act exceed 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.
CJ2 CPU Unit Software User’s Manual
17
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 exhaustive list of all possible uses of the products, nor is it intended 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.
18
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 doubt, 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
Performance 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.
CJ2 CPU Unit Software User’s Manual
19
20
CJ2 CPU Unit Software User’s Manual

Safety Precautions

Definition of Precautionary Information
The following notation is used in this manual to provide precautions required to ensure safe usage of a CJ-series PLC. The safety precautions that are provided are extremely important to safety. Always read and heed the information provided in all safety precautions.
WARNING
Caution
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 performance.
Indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury. Additionally, there may be severe property damage.
Indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury, or property damage.
CJ2 CPU Unit Software User’s Manual
21
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.
22
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 terminals or terminal blocks while the power is being 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. “Programmable 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 function 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 overall 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.
CJ2 CPU Unit Software User’s Manual
23
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 Power 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.
Wiring in Which the 24-V Power Supply Will Short
Non-insulated DC power supply
24 V
Peripheral
0 V
cable
0 V
24
FG
Power Supply Unit
CPU Unit
Peripheral device (e.g., personal computer)
CJ2 CPU Unit Software User’s Manual
Loading...
+ 640 hidden pages