Logix5000 Data Access
Reference Manual
(Catalog Numbers XXX XXX XXXX XXX
XXX XXX)
Important User Information
Solid state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the
Application, Installation and Maintenance of Solid State Controls (publication SGI-1.1 available from your local Rockwell Automation sales
office or online at http://literature.rockwellautomation.com) describes some important differences between solid state equipment and hard-
wired electromechanical devices. Because of this difference, and also because of the wide variety of uses for solid state equipment, all
persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable.
In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or
application of this equipment.
The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements
associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the
examples and diagrams.
No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in
this manual.
Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited.
Throughout this manual, when necessary, we use notes to make you aware of safety considerations.
WARNING
Identifies information about practices or circumstances that can cause an explosion in a hazardous environment, which may
lead to personal injury or death, property damage, or economic loss.
IMPORTANT
ATTENTION
Identifies information that is critical for successful application and understanding of the product.
Identifies information about practices or circumstances that can lead to personal injury or death, property damage, or economic
loss. Attentions help you identify a hazard, avoid a hazard, and recognize the consequence
SHOCK HAZARD
Labels may be on or inside the equipment, for example, a drive or motor, to alert people that dangerous voltage may be present.
BURN HAZARD
Labels may be on or inside the equipment, for example, a drive or motor, to alert people that surfaces may reach dangerous
temperatures.
Allen-Bradley, Rockwell Automation, and TechConnect are trademarks of Rockwell Automation, Inc.
Trademarks not belonging to Rockwell Automation are property of their respective companies.
Preface
CIP Services
Addressing Examples
Programmable Controller
Communication Commands
Table of Contents
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Logix5000 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
When to Use this Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Chapter 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
CIP Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Logix Data Stuctures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Segment Encoding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Data Type Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Returned Data Formats with Data Type Reporting Value . . . . . . 12
Array Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
CIP Service Request/Response Format . . . . . . . . . . . . . . . . . . . . . 14
Commands Supported by Logix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Read Data Fragmented Format Service . . . . . . . . . . . . . . . . . . . . . 16
CIP Write Data Table Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Data Table Read-Modify-Write (RMW) Message . . . . . . . . . . . . . 17
Get Attributes List Service of Template. . . . . . . . . . . . . . . . . . . . . 19
Read Template Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Write Data Fragmented Format Service. . . . . . . . . . . . . . . . . . . . . 21
Multiple Service Packet Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Chapter 2
Access Atomic and Pre-Defined Data Types . . . . . . . . . . . . . . . . . . . . 26
Access User-Defined Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Chapter 3
PLC-2 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Unprotected Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Protected Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Unprotected Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Protected Bit Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Unprotected Bit Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
PLC-5 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Read Modify Write. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Read Modify Write N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Typed Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Typed Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Word Range Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Word Range Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Bit Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
SLC Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
SLC Protected Typed Logical Read with 3 Address Fields . . . . . . 46
1
Publication 1756-RM005B-EN-P - June 2008
2 Table of Contents
PLC-5 Commands
SLC Commands
SLC Protected Typed Logical Write with 3 Address Fields . . . . . 46
SLC Protected Typed Logical Read with 2 Address Fields . . . . . . 46
SLC Protected Typed Logical Write with 2 Address Fields . . . . . 47
Chapter 4
Read Modify Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Reply format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Read Modify Write N. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Reply format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Typed Read. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Reply format: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Typed Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Reply format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Word Range Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Reply Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Word Range Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Reply format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Bit Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Reply format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Chapter 5
SLC Protected Typed Logical Read with 3 Address Fields . . . . . . . . . 58
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Reply format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
SLC Protected Typed Logical Write with 3 Address Fields. . . . . . . . . 58
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Reply format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
SLC Protected Typed Logical Read with 2 Address Fields . . . . . . . . . 59
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Reply format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
SLC Protected Typed Logical Write with 2 Address Fields. . . . . . . . . 59
Command format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Reply format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Map an Address
Appendix A
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Publication 1756-RM005B-EN-P - June 2008
Purpose
This documents describes how to access data from a Logix5000 controller
using the following methods:
Preface
• Control and Information Protocol (CIP)
This native mode of communication for Logix5000 controllers is based
on the CIP common protocol of these networks:
– EtherNet/IP
– ControlNet
– DeviceNet
These services are also supported over the DF1 Serial Port.
• Programmable Controller Communication Commands (PCCC), for
compatibility with PLC and SLC controllers:
– PLC-2 Commands
– PLC-5 Commands
– SLC Commands
PCCC commands are transferred over CIP networks and supported on
the DF1 Serial Port. These commands typically access Logix5000 data
that you map to a compatibility file.
Logix5000 Data
The Logix5000 controller stores data in tags, in contrast to a PLC-5 or SLC
controller, which stores data in data files. Logix5000 tags have these properties:
• Name which identifies the data:
– up to 40 characters in length.
– does not include a file number.
• Scope:
– Controller (global), which you can access directly.
– Program (local), which you can not access via an external device.
• Data type, which defines the organization of the data.
3Publication 1756-RM005B-EN-P - June 2008
3
Preface
When to Use this Document Before using this document, make sure you:
• are extremely familiar with CIP,
• have a copy of the CIP specification; and
• are properly licensed through Open DeviceNet Vendors Association
(ODVA) and/or ControlNet International (CI) to use the technology.
For more information on the CIP specification, contact ODVA or CI at the
web address listed below.
Related Documentation
For additional information, refer to the following manuals:
Manual
DF1 Protocol and Command Set Reference
Manual, publication 1770-6.5.16
Common Industrial Protocol Networks
Library
Location
www.rockwellautomation.com/literature
www.odva.org
Glossary
This document uses the following acronyms and terms:
Term
PLC-5
PLC-2
SLC
CIP
GEN STS
request path
segment
tag
STS / EXT STS
TNS
address offset
system address
packet offset
total transaction
Definition
a type of Allen-Bradley Programmable Logic Controller
an older type of Allen-Bradley Programmable Logic Controller
an Allen-Bradley Small Logic Controller
Common Industrial Protocol
CIP message general status
frog, need definition
the logical addressing mechanism used in paths
character name of data
status of the message transmission
16 bit unique transaction identifier
a 2 byte field which indicates byte offset from the start of a file or tag
a multi-byte field which indicates where to start the operation
indicates how much further from system address to continue the
operation
indicates total extent of intended operation
4
Publication 1756-RM005B-EN-P - June 2008
Chapter 1
CIP Services
The following sections describe the inherent mode of communications and
addressing of the Logix5000 controller. You can use the following services to
access Logix5000 data:
• CIP Read Data Table Service (0x4c)
• Read Data Fragmented Format Service (0x52)
• CIP Write Data Table Service (0x4d)
• RMW Service Response Parameters
• Data Table Read-Modify-Write (RMW) Service
• Accessing Templates
• Get Attributes List Service of Template (0x03)
• Read Template Service (0x4c)
• Combining Multiple Requests
• Multi-Request Service (0x0a)
• Generic CIP Messages
Introduction
Before you use CIP services, review the following introductory information:
For
See Page
CIP Data Types
Logix Data Stuctures
Segment Encoding
Data Type Reporting
Returned Data Formats with Data Type
Reporting Value
Array Indexing
CIP Service Request/Response Format
6
7
9
11
12
13
14
5Publication 1756-RM005B-EN-P - June 2008
5
Chapter 1 CIP Services
CIP Data Types
Data type information is very important in all aspects of CIP communications.
The type information is used for reading, writing, and, if necessary,
deciphering structures. The Logix5000 controller supports a large variety of
data types:
• atomic: a bit, byte, 16-bit word, or 32-bit word), each of which stores a
single value. (CIP refers to these as Elementary Data Types)
• structure: a grouping of different data types that function as a single
unit and serves a specific purpose. Depending on the needs of your
application, you can create additional structures, which are referred to as
user-defined structures.
• array: a sequence of elements, each of which is the same data type:
– You can define data in zero, one, two, or three dimensions, as
required. (Zero or one dimension are the most common.)
– You can use either atomic or structure data types.
The following table identifies the atomic data types:
To store a:
Use this data type:
Bit
Bit array
8 bit integer
16 bit integer
32 bit integer
32 bit float
BOOL
BOOLEAN ARRAY (32 bit
chunks)
SINT
INT
DINT
REAL
Logix5000 contains over 80 predefined structures from sample timers and
counters to complex PID and motion structures. In addition, module-defined
structures are created each time a new module is added to the module tree.
6
Publication 1756-RM005B-EN-P - June 2008