Read this document and the documents listed in the additional resources section about installation, configuration, and
operation of this equipment before you install, configure, operate, or maintain this product. Users are required to
familiarize themselves with installation and wiring instructions in addition to requirements of all applicable codes, laws,
and standards.
Activities including installation, adjustments, putting into service, use, assembly, disassembly, and maintenance are required
to be carried out by suitably trained personnel in accordance with applicable code of practice.
If this equipment is used in a manner not specified by the manufacturer, the protection provided by the equipment may be
impaired.
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.
ATTENTION: 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.
Identifies information that is critical for successful application and understanding of the product.
Labels may also be on or inside the equipment to provide specific precautions.
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.
ARC FLASH HAZARD: Labels may be on or inside the equipment, for example, a motor control center, to alert people to
potential Arc Flash. Arc Flash will cause severe injury or death. Wear proper Personal Protective Equipment (PPE). Follow ALL
Regulatory requirements for safe work practices and for Personal Protective Equipment (PPE).
Allen-Bradley, CompactBlock Guard I/O, CompactLogix, ControlFLASH, ControlLog ix, DH+, FactoryTalk, FLEX, GuardLogix, Kinetix, L ogix5000, MicroLogix, PanelBuilder, PanelView, PhaseManager, PLC-2, PLC-3,
PLC-5, POINT I/O, POIN T Guard I/O, Rockwell Automation, Rockwell Software, RSBizWare, RSFieldbus, RSLinx, RSLogix 5000, RSNetWorx, RSView, SLC, SoftLogix, Stratix, Stratix 2000, Stratix 5700, Stratix 6000,
Stratix 8000, Stratix 83 00, Studio 5000, Studi o 5000 Logix Desig ner, SynchLink, and Ultra are trademark s of Rockwell Automation, Inc.
ControlNet, DeviceNet, and EtherNet/IP are trademarks of ODVA, Inc.
Trademarks not belonging to Rockwell Automation are property of their respective companies.
Software Updates
(produc t serial nu mber required)
Firmware Updates
(produc t serial nu mber required)
Rockwell Automation® EDS Files
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201511
Preface
Notes:
12Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logix5000 Controller Resources
Logic and Data Memory
Logix
CPU
Backplane CPU
I/O Memory
Program source code
Tag data
RSLinx® tag group lists
I/O data
I/O force tables
Message buffers
Produced/consumed tags
1756-L7x ControlLogix controllers - Memory is separated into isolated sections.
Project Documentation Memor y
Comment descriptions
Alarm log
Extended tag properties
Logic and Data Memory
Logix
CPU
Backplane CPU
I/O Memory
Program source code
Tag data
RSLinx tag group lists
I/O data
I/O force tables
Message buffers
Produced/consumed tags
1768 CompactLogix and 1756-L6x ControlLogix controllers - Memory is separated into isolated sections.
TIP
Top icPag e
Estimate Memory Use16
Controller Connections17
Determine Total Connection Requirements18
CIP Sync20
Controller Mode21
Chapter 1
The Logix CPU executes application code and messages. The backplane CPU
transfers I/O memory and other module data on the backplane. This CPU
operates independently from the Logix CPU, so it sends and receives I/O
information asynchronous to program execution.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201513
CPU usage is based on the number of devices in the I/O tree. About 6% of the
L7x CPU is used for every 100 devices in the I/O tree.
Chapter 1Logix5000 Controller Resources
I/O Memory
Program source code
Tag data
RSLinx tag group lists
I/O data
I/O force tables
Message buffers
Produced/consumed tags
CompactLogix 5370 controllers - Memory is separated into isolated segments.
Logix
CPU
Logic and Data Memory
Comment descriptions
Alarm log
Extended tag properties
Project Documentation Memory
Logic, Data, and I/O Memory
Logix
CPU
Program source code
Tag data
RSLinx tag group lists
I/O data
I/O force tables
Message buffers
Produced/consumed tags
I/O taskComms task
1769 CompactLogix controllers - Memory is in one, contiguous section.
The Logix CPU executes application code and messages.
These controllers have one CPU that performs all operations. Isolated tasks
perform I/O and communication and interact with networks. These tasks
simulate the backplane CPU.
14Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logix5000 Controller ResourcesChapter 1
Logic, Data, and I/O Memory
Logix
CPU
Program source code
Tag dat a
RSLinx tag group lists
I/O data
I/O force tables
Message buffers
Produced/consumed tags
SoftLogix controllers - Memory is in one, contiguous section.
Windows
operating
system
Project Documentation Memory
Comment descriptions
Alarm log
Extended tag properties
The SoftLogix controller has one CPU that works with the Windows operating
system to perform all operations. Rather than using controller priority levels for
I/O and communication tasks, the SoftLogix controller uses Windows priority
levels for these tasks.
The first DeviceNet module is 7400 bytes. Additional DeviceNet modules are 5800 bytes each.
2
Count all communication modules in the system, not just the modules in the local chassis. The count includes device connection modules, adapters, and ports on
PanelView™ terminals.
The equations provide an estimate of the memory that is needed for a controller.
If you configure controllers for redundancy, you must double the memory
resources that are required for a non-redundant application.
1
_____ * 7,400=_____ bytes
2
_____ * 2,000=_____ bytes
To t a l=_____ bytes
Reserve 20…30% of the controller memory to accommodate growth.
RSLinx Software Use of Logix5000 Controller Memory
The amount of memory that RSLinx software needs depends on the type of data
RSLinx software reads. These equations provide a memory estimate.
RSLinx overhead
(per connection)_____* 1345=___ bytes (four connections by default)
Individual tags_____ * 45=___ bytes
Arrays / structures _____ * 7=___ bytes
To t a l=___bytes
You can consolidate tags into an array or a structure to reduce the communication
overhead and the number of connections that are used to obtain the data.
16Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logix5000 Controller ResourcesChapter 1
Compare PLC/SLC MEMORY
The Logix5000 controllers use compiled instructions to provide faster execution
times than PLC or SLC™ processors. The compiled instructions use more
memory when compared to the instructions in PLC and SLC processors.
If you have a PLC/SLC program, you can estimate the number of bytes it takes in
a Logix5000 controller by the following equation:
number PLC/SLC words 18 = number of Logix5000 bytes
Controller Connections
Communication Attribute1756-L7x ControlLogix1756-L6x ControlLogix
Connections500250100256250
Cached messages
Unconnected receive buffers3
Unconnected transmit buffersDefault 20 (can be increased to 40)Default 10 (can be increased to 40)
(1)
32 for messages and block transfers combined
A Logix5000 controller uses a connection to establish a communication link
between two devices. Connections can be made to the following:
• Controller to local I/O modules or local communication modules
• Controller to remote I/O or remote communication modules
• Controller to remote I/O (rack optimized) modules
For more information on connections for I/O, see Communicate with I/O
on page 71.
• Produced and consumed tags
For more information, see Produced and Consumed Data
• Messages
For more information, see Communicate with I/O
• Access to RSLogix 5000® software
• RSLinx software access for HMI or other software applications
The controllers have different communication limits.
(1) See Communicate with Other Devices on page 97 for more information about messages and buffers.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201517
Chapter 1Logix5000 Controller Resources
The limit of connections can ultimately reside in the communication module you
use for the connection. If a message path routes through a communication
module, the connection that is related to the message also counts toward the
connection limit of that communication module.
CompactLogix 5370Built-in Ethernet portsSee the CompactLogix 5370 Controllers User Manual, publication 1769-UM021
SoftLogix 58001784-PCICS128 CIP connections
128 CIP connections
depending on RPI, recommend that you use only 48 connections
(any combination of scheduled and message connections)
256 CIP connections
128 TCP/IP connections
128 CIP connections
64 TCP/IP connections
64 CIP connections
32 TCP/IP connections
depending on RPI, as many as 22 connections can be scheduled
The remaining connections (or all 32, if you have no scheduled connections) can
be used for message connections
64 TCP/IP connections
12 TCP/IP connections
for information on how to count EtherNet/IP nodes on the I/O Configuration
section of RSLogix 5000 software.
127 can be scheduled connections
,
Determine Total
Connection Requirements
The total connections for a Logix5000 controller include both local and remote
connections. Counting local connections is not an issue for CompactLogix
controllers. They support the maximum number of modules that are permitted
in their systems.
When designing your CompactLogix 5370 controllers, you must consider these
resources:
• EtherNet/IP network nodes
• Controller connections
For more information, see the CompactLogix 5370 Controllers User Manual,
publication 1769-UM021
18Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
.
Logix5000 Controller ResourcesChapter 1
IMPORTANT
The ControlLogix and SoftLogix controllers support more communication
modules than the other controllers, so you must tally local connections to make
sure that you stay within the connection limit.
Use this table to tally local connections.
Connection TypeDevice QuantityxConnections per Module=Total Connections
Local I/O module (always a direct connection)x1=
SERCOS Motion modulex3=
ControlNet communication modulex0=
EtherNet/IP communication modulex0=
DeviceNet communication modulex2=
DH+/Remote I/O communication modulex1=
DH-485 communication modulex1=
RSLogix 5000 software access to controllerx1=
Tot a l
A redundant system uses eight connections in the controller.
The communication modules that you select determine how many remote
connections are available. Use this table to tally remote connections.
Connection TypeDevice QuantityxConnections per Module=Total Connections
Remote ControlNet communication module
Configured as a direct (none) connection
Configured as a rack-optimized connection
Remote EtherNet/IP communication module
Configured as a direct (none) connection
Configured as a rack-optimized connection
Remote device over a DeviceNet network
(accounted for in rack-optimized connection for local DeviceNet module)
Safety device on a DeviceNet or EtherNet/IP networkx2=
Other remote communication adapterx1=
Distributed I/O module (individually configured for a direct connection)x1=
Produced tag and first consumer
Each additional consumer
Consumed ta gx1=
Connected message (CIP Data Table Read/Write and DH+)x1=
Block transfer messagex1=
RSLinx software access for HMI or other software applicationsx4=
RSLinx® Enterprise software for HMI or other software applicationsx5=
Tot a l
x
0 or
1
x
0 or
1
x0=
x21=
=
=
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201519
Chapter 1Logix5000 Controller Resources
CIP Sync
CIP Sync is a time synchronization implementation that incorporates
IEEE-1588 standards on the EtherNet/IP protocol. CIP Sync provides the
control system access to synchronization information and transport and routing
of a system clock on standard CIP networks.
• No longer need application code or software to synchronize clocks
between controller, HMI, and other control hardware.
• Open standard lets compatibility with most IEEE-1588 v2 products exist,
letting the integration with GPS and other IT layer devices occur.
• Alarm system automatically picks up time stamps from CIP Sync system
time
• System self-heals, so that if one clock master fails the rest arbitrate to find
the next best clock master.
A ControlLogix controller or 1756-EN2T can become a system clock master.
Other Logix5000 controllers can require application code.
The controller or networked device that wins system clock arbitration is the
Grandmaster clock. The wall clock time can only be set from the system Grand
Master device. If you adjust a controller clock, the controller could reject that
time if it is not or does not become the Grandmaster clock.
You can configure the system clock via RSLogix 5000 software, version 18 and
later, and programmatically via GSV/SSV instructions. Use a GSV/SSV
instruction with the Time Sync object to do the following:
• Enable or disable CIP Sync
• Get or set the time
• Set priority to override other masters
• Get synchronization status
• Get current PTP master status and state information
20Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logix5000 Controller ResourcesChapter 1
IMPORTANT
Controller Mode
The controller mode switch provides a mechanical means to enhance controller
and control system security. You must physically move the switch to change the
operating mode from RUN to REM or to PROG.
Remote lets you change the operational mode to REM RUN or REM PROG via
RSLogix 5000 software.
During runtime, we recommend that you place the controller mode switch in
RUN mode and remove the key (if applicable) from the switch. This practice
helps discourage unauthorized access to the controller or potential tampering
with the controller program, configuration, or device firmware. Place the mode
switch in REM or PROG mode during controller commissioning, maintenance,
and whenever temporary access is necessary to change the program,
configuration, or firmware.
For more information on controller mode switches, see the ControlLogix System
User Manual, publication 1756-UM001
.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201521
Chapter 1Logix5000 Controller Resources
Notes:
22Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logic Execution
Tasks to configure controller execution
Programs to group data and logic
Top icPag e
Decide When to Use Tasks, Programs, and Routines24
Specify Task Priorities25
Manage User Tasks26
Considerations that Affect Task Execution27
Configure a Co ntinuous Task29
Configure a Periodic Task29
Configure an Event Task30
Select a System Overhead Percentage31
Manage the System Overhead Timeslice Percentage32
Access the Module Object33
Develop Application Code in Routines34
Programming Methods35
Controller Prescan of Logic36
Controller Postscan of SFC Logic37
Timer Exe cution3 8
Edit an S FC Online39
Chapter 2
The controller operating system is a ct2000LAK pre-emptive multitasking
system that is IEC 61131-3 compliant.
A task provides scheduling and priority information for a set of one or more
programs. You can configure tasks as either continuous, periodic, or event.
A task contains programs, each with its own routines and program-scoped tags.
Once a task is triggered (activated), the programs that are assigned to the task
execute in the order in which they are listed in the Controller Organizer.
Programs are useful for projects that multiple programmers develop. During
development, the code in one program that uses program-scoped tags can be
duplicated in a second program to minimize the possibility of tag
names colliding.
With firmware revision 15, tasks can contain programs and equipment phases.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201523
Chapter 2Logic Execu tion
Routines to encapsulate
executable code that is written
in one programming language
Routines contain the executable code. Each program has a main routine that is
the first routine to execute within a program. Use logic, such as the Jump to
Subroutine (JSR) instruction, to call other routines. You can also specify an
optional program fault routine.
See Develop Application Code in Routines
on page 34 for information on
selecting programming languages, and how the controller prescans and
postscans logic.
Decide When to Use Tasks,
Use these considerations to determine when to use a task, program, or routine.
Programs, and Routines
ComparisonTaskProgram and Equipment PhaseRoutine
Quantity availableVaries by controller (4, 6, 8, or 32)32 program and equipment phases
FunctionDetermines how and when code is executedOrganizes groups of routines that share a
Use• Most code is expected to reside in a
continuous task
• Use a periodic task for slower processes or
when time-based operation is critical
• Use an event task for operations that
require synchronization to a specific event
Considerations• A high number of tasks can be difficult to
debug
• Can disable output processing on some
tasks to improve performance
• Tasks can be inhibited to prevent execution
• Do not configure multiple tasks at the same
priority
(combined) per task
(100 for ControlLogix and SoftLogix
controllers)
common data area and function.
• Put major equipment pieces or plant cells
into isolated programs
• Use programs to isolate different
programmers or create reusable code
• Configurable execution order within a task
• Isolate individual batch phases or discrete
machine operations
• Data spanning multiple programs must go
into controller-scoped area
• Listed in the Controller Organizer in the
order of execution
Unlimited number of routines per program
Contains executable code (relay ladder,
function block diagram, sequential function
chart, or structured text)
• Isolate machine or cell functions in a
• Use the appropriate language for the
• Modularize code into subroutines that can
• Subroutines with multiple calls can be
• Data can be referenced from program-
• Calling many routines impacts scan time
• Listed in the Controller Organizer as Main,
routin e
process
be called multiple times
difficult to debug
scoped and controller-scoped areas
Fault, and then alphabetically
For more information about equipment phases, see Develop Equipment Phases
on page 117.
24Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logic ExecutionChapter 2
Specify Task Priorities
Each task in the controller has a priority level. A higher priority task (such as 1)
interrupts any lower priority task (such as 15). The continuous task has the
lowest priority; periodic or event tasks always interrupt continuous tasks.
The Logix5000 controller has these types of tasks.
PriorityUser TaskDescription
Highest
Lowest
N/ACPU overhead - serial port and general CPU operations
N/AMotion planner - executed at coarse update rate
N/ASafety task - safety logic
N/ARedundancy task - communication in redundant systems
N/ATrend data collection - high-speed collection of trend data values
Priority 1 Event/PeriodicUser defined
Priority 2 Event/PeriodicUser defined
Priority 3 Event/PeriodicUser defined
Priority 4 Event/PeriodicUser defined
Priority 5 Event/PeriodicUser defined
Priority 6 Event/PeriodicUser defined
1769 CompactLogix controllers process I/O as a periodic task based on the chassis RPI setting
Priority 7 Event/PeriodicUser defined
Priority 8 Event/PeriodicUser defined
Priority 9 Event/PeriodicUser defined
Priority 10 Event/PeriodicUser defined
Priority 11 Event/PeriodicUser defined
Priority 12 Event/PeriodicUser defined
CompactLogix communication and scheduled connection maintenance
Priority 13 Event/PeriodicUser defined
Priority 14 Event/PeriodicUser defined
Priority 15 Event/PeriodicUser defined
ContinuousMessage handler - based on system overhead timeslice
If a periodic or event task is executing when another is triggered, and both tasks
are at the same priority level, the tasks’ timeslice executes in 1 ms increments until
one of the tasks completes execution.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201525
Chapter 2Logic Execu tion
Manage User Tasks
If you want logic to executeUse this taskDescription
All of the timeContinuous taskThe continuous task runs in the background. Any CPU time that is not allocated to other operations or
• At a constant period (such as every 100 ms)
• Multiple times within the scan of your other logic
Immediately when an event occursEvent taskAn event task performs a function only when a specific event (trigger) occurs. Whenever the trigger for
You can configure these user tasks.
tasks is used to execute the continuous task.
• The continuous task runs all of the time. When the continuous task completes a full scan, it restarts
immediately.
• A project does not require a continuous task. If used, there can be only one continuous task.
Periodic taskA periodic task performs a function at a specific time interval. Whenever the time for the periodic task
expires, the periodic task:
• Interrupts any lower priority tasks.
• Executes one time.
• Returns control to where the previous task left off.
the event task occurs, the event task:
• Interrupts any lower priority tasks.
• Executes one time.
• Returns control to where the previous task left off.
See Configure an Event Task
do not support all triggers.
on page 30 for the triggers for an event task. Some Logix5000 controllers
The user tasks that you create appear in the Tasks folder of the controller. The
predefined system tasks do not appear in the Tasks folder and they do not count
toward the task limit of the controller:
• Motion planner
• I/O processing
• System overhead
• Output processing
26Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logic ExecutionChapter 2
Considerations that Affect
Task Execution
ConsiderationDescription
Motion plannerThe motion planner interrupts all other tasks, regardless of their priority.
I/O processingCompactLogix and SoftLogix controllers use a dedicated periodic task to process I/O data. This I/O task:
System overhead
See also Select a System Overhead Percentage on page 31.
Output processingAt the end of a task, the controller performs output processing for the output modules in your system. This
Too many tasksIf you have too many tasks, then the following can occur:
• The number of axes and coarse update period for the motion group affect how long and how often the motion
planner executes.
• If the motion planner is executing when a task is triggered, the task waits until the motion planner is done.
• If the coarse update period occurs while a task is executing, the task pauses to let the motion planner execute.
• CompactLogix controllers, operates at priority 6.
SoftLogix controllers, operates at Windows priority 16 (Idle).
• Higher-priority tasks take precedence over the I/O task and can affect processing.
• Executes at the fastest RPI you have scheduled for the system.
• Executes for as long as it takes to scan the configured I/O modules.
System overhead is the time that the controller spends on message communication and background tasks.
• Message communication is any communication that you do not configure through the I/O configuration folder
of the project, such as MSG instructions.
• Message communication occurs only when a periodic or event task is not running. If you use multiple tasks, make
sure that their scan times and execution intervals leave enough time for message communication.
• System overhead interrupts only the continuous task.
• The system overhead timeslice specifies the percentage of time (excluding the time for periodic or event tasks)
that the controller devotes to message communication.
• The controller performs message communication for up to 1 ms at a time and then resumes the continuous task.
• Adjust the update rates of the tasks as needed to get the best trade-off between executing your logic and
servicing message communic ation.
processing depends on the number of output connections that are configured in the I/O tree.
• Continuous task can take too long to complete.
• Other tasks can experience overlaps. If a task is interrupted too frequently or too long, it must be triggered again
to complete its execution.
• Controller communication can be slower.
• If your application is designed for data collection, try to avoid multiple tasks.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201527
Chapter 2Logic Execu tion
124563
1
2
3
4
5
6
This example depicts the execution of a project with these tasks.
TaskPriorityPeriodExecution TimeDuration
Motion plannerN/A8 ms (course update rate)1 ms1 ms
Event task 11N/A1 ms1
Periodic task 1212 ms2 ms24ms
I/O task—N/A to ControlLogix and SoftLogix controllers75 ms (fastest RPI)1 ms15 ms
System overheadN/ATimeslice = 20%1 ms1
Continuous taskN/AN/A20 ms48 ms
2 ms
6 ms
Motion
Planner
Event Task 1
Peri odic
Tas k 1
I/O Task
System
Overhead
Continuous
Tas k
Legend :
Description
Task executes.Task is interrupted (suspended).
5 101520253035404550
Initially, the controller executes the motion planner and the I/O task (if one exists).
After executing the continuous task for 4 ms, the controller triggers the system overhead.
The period for periodic task 1 expires (12 ms), so the task interrupts the continuous task.
After executing the continuous task again for 4 ms, the controller triggers the system overhead.
The triggers occur for event task 1.
Event task 1 waits until the motion planner is done.
Lower priority tasks experience longer delays.
The continuous task automatically restarts.
28Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logic ExecutionChapter 2
Configure a Continuous Task
The continuous task is created automatically when you open an RSLogix 5000®
software project. A continuous task is similar to how logic executes on PLC-5®
and SLC™ 500 processors. A Logix5000 controller supports one continuous task,
but a continuous task is not required. You can configure whether the task updates
output modules at the end of the continuous task. You can change the continuous
task to either a periodic or event task.
The CPU timeslices between the continuous task and system overhead. Each
task switch between user task and system overhead takes more CPU time to load
and restore task information.
RSLogix 5000 software, version 16 and later, forces at least 1 ms of execution
time for the continuous task, regardless of the system overhead timeslice. This
more efficiently uses system resources because letting shorter execution times of
the continuous task exist means switching tasks more frequently.
System Overhead Timeslice %Communication Execution (msec) Continuous Task Execution (msec)
1019
2014
3312
5011
6621
8041
9091
Configure a Periodic Task
A periodic task executes automatically based on a preconfigured interval. This
task is similar to selectable timed interrupts in PLC-5® and SLC 500 processors.
You can configure whether the task updates output modules at the end of the
periodic task. After the task executes, it does not execute again until the
configured time interval has elapsed.
If your application has a lot of communication, such as RSLinx communication,
use a periodic task rather than a continuous task.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201529
Chapter 2Logic Execu tion
Configure an Event Task
An event task executes automatically based on a trigger event occurring or if a
trigger event does not occur in a specific time interval. You configure whether the
task updates output modules at the end of the task. After the task executes, it
does not execute again until the event occurs again. Each event task requires a
specific trigger.
TriggerDescription
Module Input Data State ChangeWith Logix5000 controllers, a remote input module (digital or analog) triggers an event task that is based on the change of state (COS)
Consumed TagOnly one consumed tag can trigger a specific event task. Use an IoT instruction in the producing controller to signal the production of
Axis Registration 1or 2A registration input triggers the event task.
Axis WatchA watch position triggers the event task.
Motion Group ExecutionThe coarse update period for the motion group triggers the execution of both the motion planner and the event task. Because the motion
EVENT InstructionMultiple EVENT instructions can trigger the same task.
configuration for the module. Enable COS for only one point on the module. If you enable COS for multiple points, a task overlap of the event
task can occur.
• The ControlLogix sequence of events modules (1756-IB16ISOE, 1756-IH16ISOE) use the Enable CST Capture feature instead of COS.
• The embedded input points on the 1769-L16ER-BB1B, 1769-L18ER-BB1B, and 1769-L18ERM-BB1B modules can be configured to trigger
an event task when a COS occurs.
new data.
planner interrupts all other tasks, it executes first.
For more information on event tasks, see:
• Logix5000 Controllers Common Procedures Programming Manual,
publication 1756-PM001
• Using Event Tasks with Logix5000 Controllers,
publication LOGIX-WP003
Guidelines to Configure an Event Task
GuidelineDescription
Place the I/O module being used to trigger an event in the
same chassis as the controller.
Limit events on digital inputs to one input bit on a module.All inputs on a module trigger one event, so if you use multiple bits you increase the chance of a task overlap. Configure
Set the priority of the event task as the highest priority on
the controller.
Limit the number of event tasks.Increasing the number of event tasks reduces the available CPU bandwidth and increases the chances of task overlap.
Placing the I/O module in a remote chassis adds more network communication and processing to the response time.
the module to detect change of state on the trigger input and turn off the other bits.
If the priority of the event task is lower than a periodic task, the event task has to wait for the periodic task to com plete
execution .
Additional Considerations for Periodic and Event Tasks
ConsiderationDescription
Amount of code in the event taskEach logic element (for example, rung, instruction, or structured text construct) adds to scan time.
Task priorityIf the event task is not the highest priority task, a higher priority task can delay or interrupt the execution of the event task.
CPS and UID instructionsIf one of these instructions are active, the event task cannot interrupt the currently executing task. (The task with the CPS or UID.)
Communication interruptsIncoming character processing through the serial port interrupts a task, regardless of the priority of the task.
Motion plannerThe motion planner takes precedence over event or periodic tasks
TrendsTrend data collection takes precedence over event or periodic tasks.
Output processingYou can disable output processing at the end of a task to reduce the amount of task processing time. As of RSLogix 5000 software, version 16,
the Controller Organizer displays whether outputs processing is disabled.
30Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logic ExecutionChapter 2
Continuous Task Restarts
Periodic Task Restarts
Continuous Task
10% CPU Overhead
Continuous Task
25% CPU Overhead
Periodic Task
CPU Overhead
Select a System Overhead
Percentage
The system overhead timeslice specifies the percentage of continuous task
execution time that is devoted to communication and background redundancy
functions. System overhead functions include the following:
• Communicating with programming and HMI devices (such as
RSLogix 5000 software)
• Responding to messages
• Sending messages
• Serial port message and instruction processing
• Alarm instruction processing
• Redundancy qualification
The controller performs system overhead functions for up to 1 ms at a time. If the
controller completes the overhead functions in less than 1 ms, it resumes the
continuous task. The following chart compares a continuous and periodic task.
ExampleDescription
Continuous task
10% CPU overhead
Continuous task
25% CPU overhead
Periodic taskPlacing the same code in a periodic task yields even more time for communication processing. The bottom example
In the top example, the system overhead timeslice is set to 10%. Given 40 ms of code to execute, the continuous task
completes the execution in 44 ms. During a 60 ms period, the controller is able to spend 5 ms on
communication processing.
By increasing the system overhead timeslice to 25%, the controller completes the continuous task scan in 57 ms. The
controller spends 15 ms of a 60 ms time span on communication processing.
assumes that the code is in a 60 ms periodic task. The code executes to completion and then goes dormant until the 60
ms, time-based trigger occurs. While the task is dormant, all CPU bandwidth can focus on communication. Because the
code takes only 40 ms to execute, the controller can spend 20 ms on communication processing. Depending on the
amount of communication to process during this 20 ms window, it can be delayed as it waits for other modules in the
system to process all of the data that was communicated.
The Logix5000 CPU timeslices between the continuous task and system
overhead. Each task switch between user task and system overhead takes
additional CPU time to load and restore task information. You can calculate the
continuous task interval as:
ContinuousTime=(100/SystemOverheadTimeSlice%) - 1
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201531
Chapter 2Logic Execu tion
Program Scan
Time
Tag s Pe r
Second
System Timeslice %
Tags per Second
Program Scan Time in Milliseconds
Manage the System
Overhead Timeslice
Percentage
ConsiderationDescription
Continuous task always has at least 1 ms execution timeRSLogix 5000 software, version 16 and later, forces the continuous task to have at least 1 ms of execution time, regardless
Impact on communication and scan timeIncreasing the system overhead timeslice percentage decreases execution time for the continuous task while it increases
As the system overhead timeslice percentage increases, time that is allocated to
executing the continuous task decreases. If there is no communication for the
controller to manage, the controller uses the communication time to execute the
continuous task.
of the setting for the system overhead timeslice. This results in more efficient controller use because excessive swapping
between tasks uses valuable CPU resources.
communication performance.
Increasing the system overhead timeslice percentage also increases the amount of time it takes to execute a continuous
task - increasing overall scan time.
Unused portion of system overhead timesliceWith RSLogix 5000 software, version 16, you can configure any unused portion of the system overhead timeslice to:
• Run the continuous task, which results in faster execution of application code and increases the variability of the
program scan.
• Process communication, which results in more predictable and deterministic scan time for the continuous task. (This
is for development and testing of an application to simulate communication.)
Individual applications can differ, but the overall impact on communication and
scan time remains the same. The data is based on a ControlLogix5555 controller
running a continuous task with 5000 tags (no arrays or user-defined structures).
32Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logic ExecutionChapter 2
Access the Module Object
The MODULE object provides status information about a module. To select a
particular module object, set the Object Name operand of the GSV/SSV
instruction to the module name. The specified module must be present in the
I/O Configuration section of the controller organizer and must have a
device name.
Create the Add-On Instruction
With Logix Designer Application, version 24.00.00 and later, you can access the
MODULE object directly from an Add-On Instruction. Previously, you could
access the MODULE object data, but not from within an Add-On Instruction.
You must create a Module Reference parameter when you define the Add-On
Instruction to access the MODULE object data. A Module Reference parameter
is an InOut parameter of the MODULE data type that points to the MODULE
Object of a hardware module. You can use module reference parameters in both
Add-On Instruction logic and program logic.
For more information on the Module Reference parameter, see the Logix5000
Controllers Add On Instructions programming manual, publication
1756-PM010
The MODULE object uses the following attributes to provide
status information:
• EntryStatus
• FaultCode
• FaultInfo
• FWSupervisorStatus
• ForceStatus
• Instance
• LEDStatus
• Mode
• Path
The Path attribute is available with Logix Designer application, version 24.00.00
and later. This attribute provides a communication path to the module.
For more information on the attributes available in the MODULE object, see the
Logix5000 Controllers General Instructions Reference Manual, publication
1756-RM003
and the Logix Designer application online help.
.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201533
Chapter 2Logic Execu tion
Develop Application Code in
Routines
Section of Code RepresentsLanguage to Use
Continuous or parallel execution of multiple operations (not sequenced)Relay ladder logic (LD)
Boolean or bit-based operations
Complex logical operations
Message and communication processing
Machine interlocking
Operations that service or maintenance personnel can interpret to troubleshoot the machine or process.
Servo motion control
Continuous process and drive controlFunction block diagram (FBD)
Loop control
Calculations in circuit flow
High-level management of multiple operationsSequential function chart (SFC)
Repetitive sequences of operations
Batch process
Motion control sequencing (via sequential function chart with embedded structure text)
State machine operations
Complex mathematical operationsStructured text (ST)
Specialized array or table loop processing
ASCII string handling or protocol processing
Each routine contains logic in one programming language. Choose a
programming language that is based on the application.
Comparison of Programming Languages
ComparisonRelay Ladder LogicFunction Block DiagramSequential Function ChartStructured Text
Instruction categories• Boolean
• General and trig math
• Timers and counters
• Array management
• Diagnostic
• Serial port and messaging
• ASCII manipulation
• Motion control
Editor st yle• Graphical rungs
• Unlimited rungs
Monitoring• Rung animation
• Data value animation
• Force sta tus
Comments• Ta g
• Rung
• General and trig math
• Timers and counters
• Bitwise logical
• Advanced process
• Advanced drive
• Graphical, free-form drawing
• Unlimited sheets
• Output and input pin data value
animation
•
Tag
• Text b ox
• Step/action with embedded
structured text
• Transition with structure text
comparisons
• Simultaneous and selection
branches
• Stop element
• Graphical, free-form drawing
• Unlimited grid space
• Active steps animation
• Auto display scroll
• Branch/transition force status
• Ta g
• Text box
• Embedded structured text
comments that are stored in CPU
• General and trig math
• Timers and counters
• Bitwise logical
• Array management
• Diagnostic
• ASCII manipulation
• Specialty CPU control
• Motion control
• Advanced process
• Advanced drive
• Te xt u al
• Unlimited lines
• Tag watch pane
• Context coloring
• Multi-line
• End if line
• Comments that are stored in CPU
34Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logic ExecutionChapter 2
Benefits
• Uses more memory
• Fastest execution time because all tag references
are defined before runtime
• Easiest to maintain because rung animation
matches tag values
• Requires more time to create and modify
Benefits
• One copy of code is faste r to develop
• Slowest exec ution time because all tag references
are calculated at run time
• Can be difficult to maintain because the data
monitor is not synchronized to execution
The JSR instruction
passes the index.
Each indexed reference adds
to scan time.
Programming Methods
The capabilities of the Logix5000 controllers make different programming
methods possible. There are trade-offs to consider when selecting a
programming method.
Inline Duplication
Write multiple copies of the code with different tag references.
Indexed Routine
Write one copy of code and use indexed references to data stored in arrays.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201535
Chapter 2Logic Execu tion
Benefits
• One copy operation can occur faster than multiple
index offsets
• Eliminates the need to calculate array offsets at
run time
• The amount of code increases, but so do the
benefits
• Can be difficult to maintain because the data
monitor is not synchronized to execution
The JSR instruction
passes all control
instance data.
A user-defined structure
consolidates control data.
Direct reference to a local
copy of data.
Buffered Routine
Copy the values of an array into tags to directly reference these buffer tags.
Controller Prescan of Logic
Prescan AffectsDescription
Relay ladder logicThe controller resets non-retentive I/O and internal values.
Function block diagram logicAlong with resetting non-retentive I/O and internal values, the controller also clears the EnableIn parameter for every
Structured text logicThe controller resets bit tags and forces numeric tags to zero (0).
Sequential function chart logicEmbedded structured text follows the same rules as listed previously.
36Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
On transition to Run mode, the controller prescans logic to initialize
instructions. The controller resets all state-based instructions, such as outputs
(OTE) and timers (TON). Some instructions also perform operations during
prescan. For example, the ONSR instructions turns off the storage bit.
For information on prescan, see the following resources:
• Logix5000 Controllers General Instructions Reference Manual,
publication 1756-RM003
.
• Logix5000 Controllers Process Control and Drives Instructions Reference
Manual, publication 1756-RM006
.
During prescan, input values are not current and outputs are not written.
function block diagram.
Use the bracketed assignment operator ([:=]) to force a value to be reset during prescan.
If you want a tag that is left in its last state, use the non-bracketed assignment operator (:=).
Prescan differs from first scan in that the controller does not execute logic during
prescan. The controller executes logic during first scan. The controller sets S:FS
for one scan:
• During the first scan that follows prescan.
• During the first scan of a program when it has been uninhibited.
• Each time a step is first scanned (when step.FS is set). You can view the
S:FS bit being set only from the logic that is contained in actions that
execute during the first scan of their parent step (N, L, P, and P1).
Logic ExecutionChapter 2
Add-On Instruction Prescan Logic
An Add-On Instruction prescan logic executes after the main logic executes in
Prescan mode. Use the prescan logic to initialize tag values before execution. For
example, set a PID instruction to Manual mode with a 0% output before its
first execution.
When an Add-On Instruction executes in Prescan mode, any required
parameters have their data passed.
• Values are passed to Input parameters from their arguments in the
instruction call.
• Values are passed out of Output parameters to their arguments defined in
the instruction call.
Controller Postscan of
SFC Logic
SFCs support an automatic reset option that performs a postscan of the actions
that are associated with a step once a transition indicates that the step is
completed. Also, every Jump to Subroutine (JSR) instruction causes the
controller to postscan the called routine. During this postscan:
• Output energize (OTE) instructions are turned off and non-retentive
timers are reset.
• In structured text code, use the bracketed assignment operator ([:=]) to
have tags reset.
• In structured text code, use the non-bracketed assignment operator (:=) to
have tags that are left in their last state.
• Selected array faults, that is, 4/20 and 4/83, can be suppressed. When the
fault is suppressed, the controller uses an internal fault handler to clear it.
Clearing the fault causes the postscan process to skip the instruction
containing the fault and continue with the next instruction. This occurs
only when SFC instructions are configured for automatic reset.
Add-On Instruction Postscan Logic
When an Add-On Instruction is called by logic in an SFC Action and the
Automatic Reset option is set, the Add-On Instruction executes in Postscan
mode. An Add-On Instruction postscan routine executes after the main logic
executes in Postscan mode. Use the postscan logic to reset internal states and
status values or to disable instruction outputs when the SFC action completes.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201537
Chapter 2Logic Execu tion
Timer Execution
Timers in the PLC, SLC, and Logix5000 controllers all store off a portion of the
real-time clock each time they are scanned. The next time through, they compare
this stored value against the current clock and then adjust the ACC value by
the difference.
PLC/SLC ControllerLogix5000 Controller
In a PLC/SLC controller, the timers stores 8 bits at 10 ms/bit. This lets 2.56 seconds (2**8 /
100) of padding before a timer overlaps.
If program execution skips timers, it appears as if the timers pause. Actually, the timers
are overrunning themselves. Depending on when the timer logic next executes, the lost
time varies ranges from 0…2.56 seconds.
A Logix5000 controller uses native 32-bit data, so there is more space to store the time.
The timer stores 22 bits at 1 ms/bit, which equates to 69.905 minutes (2**22 / 1000 ms
per second / 60 seconds per minute).
If program execution skips timers, it takes longer than in PLC/SLC controllers to overrun
the timers. This results in a larger jump in lapsed time when the timer code next executes.
Program execution can skip executing timers due to the following:
• Subroutine not being called
• Jumping over code
• SFC action
• Inactive SFC step
• Event or periodic task not executing
• Equipment phase state routines
SFC Step Timer Execution
An SFC step timer stores the clock time each time the step executes. On
subsequent scans of the step, the controller compares the current clock time with
the last scan and updates the step timer’s ACC by the difference.
When you pause an SFC and then release the SFC, the step timer jumps forward
by the duration of the pause. If you want a step timer to remain at its position
during a pause:
• Latch a recovery bit when the chart pause is released.
• Add an action to the step to store the step timer’s .ACC value and restore
that value when the pause recovery bit is set.
38Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Logic ExecutionChapter 2
Edit an SFC Online
Firmware revision 13 adds support for editing SFCs online. When you edit an
SFC online, the software initially makes the changes in the offline project. When
you accept the changes, they are downloaded to the controller. If you transition
the controller to test or untest edits, the controller resets the SFC and starts
execution at the initial step. If you edit an SFC online, do the following:
• Plan when you test or untest edits to coincide with the SFC executing the
initial step.
• Place structured text logic in subroutines to minimize the impact of
online edits.
• Use an SFR instruction to shift SFC execution to the desired step
programmatically.
In some cases, this can result in the SFC being out of sync with the equipment.
Program logic in the initial step to check the last state and use an SFR instruction
to change to the appropriate step, if needed. One method is to set an index
number in an action of each step. Then when the restart occurs, use the SFR
instruction to jump to appropriate step based on the index value.
As of firmware revision 18, these online edits to an SFC no longer reset the SFC
to the initial step:
• Modified structured text in actions and transitions
• Physically moved steps, actions, and transitions on SFC sheets without
changing the wiring
• Added, deleted, or modified text and description boxes
• Modified indicator tags
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201539
Chapter 2Logic Execu tion
Notes:
40Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Guidelines for Code Reuse
Chapter 3
Modular Programming Techniques
Modular programming guidelines support the delivery of standardized
programming structures, conventions, configurations, and strategies. The goal of
modular programming is to provide consistency.
• Faster and easier development of application software
• Faster and easier testing of application software
• More reliable application software
• Improved maintenance and operation of application software
• Improved interoperability with other equipment and systems
GuidelineDescription
Use user-defined data types (UDTs) to group data.Within a UDT:
Use Add-On Instructions to create standardized modules
of code for reuse across a project.
Use program parameters to share data between
programs.
Use partial import/expor t programs, routines, Add-On
Instructions, and code segments to create libraries of
reusable code.
Use subroutines to reuse code within a program.Subroutines:
• You can mix data types.
• The tag names that you assign self-document the structure.
Use an Add-On Instruction to:
• Encapsulate specific or focused operations, such as a Motor or Valve action. A Conveyor or Tank action is better
managed as a routine.
• Create extensions to the base controller instructions. For example, create an Add-On Instruction to execute an SLC 500
or PLC controller instruction not available in the Logix5000 controllers.
• Encapsulate an instruction from one language for use in another language. For example, create a function block PIDE
instruction for use in relay ladder.
Program parameters:
• Are publicly accessible outside of the program.
• Support external HMI external access on an individual basis for each parameter.
Direct access lets the user reference program parameters in logic without configuring parameters in the local program.
For example, if Program A has an output parameter that is called Tank_Level, Program B can reference the Tank_Level
parameter in logic without creating a corresponding parameter to connect to Program A.
Partial import and export of routines and programs:
• Provides more control over the scope of what is extracted from the project.
• Provides reusable code for larger machine, cell, or unit control.
• Promotes collaboration between multiple engineers, code standardization, and reuse.
The export .L5X file includes all per tinent information, including program configuration, code, user-defined data-types,
tags, and descriptions, in an XML-formatted, ASCII text file. Use partial import/export to:
• Distribute code separately from the project .ACD file.
• Edit and create programs and routines by using other editing tools.
• Can be created and used in standard and safety applications.
• Pass User-Defined Structures (UDT).
• Pass all input and output Parameters by value.
• Subroutines require the most overhead to pass parameters when called.
• Can only be called from within the program they reside.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201541
Chapter 3Modular Programming Techniques
Area/Unit + TypeController Name:
Mixing:ControlLogix
Project in controller Mixing_CLX,
Major Revision 1, Minor Revision 02
Application Name:
Mixing_CLX_C2_092.ACD
Interprocessor communication tagIPC_
Input tagI_
Output tagO_
Remote I/O tagRIO_
Control module class tagDevice ID_
Equipment module class tagEM_
Equipment phase class tagEP_
Naming Conventions
The following conventions are guidelines to help make an engineering library
more reusable by other developers. These guidelines also help the resulting
applications have a more consistent look and feel.
• Names that are meaningful (and readable) to people who use the
application as a later date are most effective.
• Names use controller memory and have limited length, so keep them short
by using abbreviations and acronyms. Use mixed case rather than
underscore characters to indicate words.
• When you use acronyms, use those that are common or provided by
industry standards.
Names for controller logic components must follow these guidelines.
• The name must start with a letter, either upper or lower case
• The name can contain as many as 40 characters; any mix of upper case
letter, lower case letters, numbers, and underscore characters
• Case is not significant. The controller interprets Mix_Tank the same and
mix_tank. However, the software displays the case as entered
• Underscores are significant. The controller interprets AB_CD as unique
from A_BCD
• You cannot have two or more underscore characters in a row
• The name cannot end with an underscore.
Component NameRecommendations
ControllerArea, un it, or units t he controller controls, under score, type of c ontroller
Example:
Controller projectController name, the letter C, 1-digit major revision number, underscore, 2-digit minor revision number
Example:
Increment the minor revision number for any documented engineering change according to the code in the controller
(for example, the code for minor process or equipment changes).
Increment the major revision number for any documented engineering change according to the code in the controller
that implements a design change (for example, code that enhances or reduces controller functionalit y).
TagPrefix with the abbreviation of the type of tag
Examples:
42Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Modular Programming TechniquesChapter 3
Analog inputAI
Analog outputAO
Discrete inputDI
Discrete outputDO
Analog input/output combinationAIO
Discrete input/output combinationDIO
Analog/discrete input/output combinationADIO
Serial dataSIO
Motion dataMIO
DeviceNet dataDNET
EtherNet/IP dataENET
ControlNetCNET
Remote I/O dataRIO
Mixer123 Controller, Local chassis, Slot 4,
Analog Output
Module Name: M123_CLX_L00_S04_AO
Mixer123 Controller, Local chassis, Slot 12,
Discrete Output
Module Name: M123_CLX_L00_S12_DO
Mixer123 Controller, Remote chassis #1,
Slot 1, Analog Input
Module Name: M123_CLX_R01_S01_AI
Mixer123 Controller, Remote chassis #1,
Slot 2, Analog Output
Mixer123 Controller, Local chassis, Slot 5,
Remote I/O
Module Name: M123_CLX _R02_S06_RIO
Component NameRecommendations
I/O or communication moduleController name, underscore, abbreviation of rack location (L=local, R=remote), underscore, the letter S, 2-digit slot
number, underscore, abbreviation of function
Example Functions:
Examples:
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201543
Chapter 3Modular Programming Techniques
Parameter Name Prefixes
Programming structures, such as Add-On Instructions and programs support
parameters for passing values. The convention for prefixes is to abbreviate the
function of the parameter to three letters and an underscore, followed by
additional text to clarify the specific function.
Parameter FunctionPrefixDescription
CommandCmd_Designates a command input, either from the operator via the HMI or from the program.
Examples:
• Cmd_Reset: Clear faults and reset the process
• Cmd_JogServo: Jog a servo axis
• Cmd_Fil lTa nk: Fill a tank w ith a liquid
ConfigurationCfg_Designates a configuration value for the structure. Enter from the HMI or as part of a recipe.
Examples:
• Cfg_JogDirection: Selects the direction a servo jogs: 0=Positive, 1=Negative
• Cfg_BulkFill: Selects the fill rate to use: 0=Slow Rate, 1=Fast Rate
• Cfg_UserUnits: Selects the measure of volume to use: 0=mm, 1=m, 2=gal
StatusSts_Status of the process within the structure.
Examples:
• Sts_Alarm: An alarm condition (such as a HI/LOW alarm) exists within the process
• Sts_ER: An error with an instruction execution within the process has been detected
• Sts_IndexComplete: The servo index move within the process has completed
• Sts_FillInProcess: The tank filling process is underway
ErrorErr_If the Sts_ER bit is on, the Err_ parameter indicates the actual er ror. This can be either a bit level or value level indication.
AlarmAlm_If the Sts_Alm bit is on, the Alm_ parameter indicates which alarm is occurring. This can be either a bit-level or value-
InputInp_ Real-time data used to drive the process. Designates a connection either to a real input point, a control device, or to data
OutputOut_Real-time data driven from the process. Designates a connection to a real output point, a control device, or to data sent
ReferenceRef_ Complex data structures that combine input and output data.These structures pass data into a structure, where some
• Bit le vel error recording supports multiple errors simultaneously, but can require a large number of indicators to
support all error states.
• Value-based error annunciation supports a large quantity of errors within a single indicator. However, this approach
requires that errors are annunciated one at a time.
Examples:
• Err_Value: A non-zero value indicates an error condition
• Err_PCamCalcFault: Indicates that an error has occurred in an MCCP
level indication.
• Bit-level alarming supports multiple alarms simultaneously, but can require a large number of indicators to support
all alarm states.
• Value-based alarm annunciation supports a large quantity of alarms within a single indicator. However, this approach
requires alarms to be annunciated one at a time.
Examples:
• Alm_Value: A non-zero value indicates an alarm condition
• Alm_TankHI: Indicates that a HI level condition has been detected within a tank
received from other processes.
Examples:
• Inp_ServoPosition: Variable providing the input value for a position of a servo
• Inp_ServoRegistrationPosition: Input of a the registration position of the servo
• Inp_InterlockOK: Input indicating external interlocks are met
• Inp_TankLevel: Variable providing the analog input for a tank’ level
• Inp_TankLevelFillRate
to other processes.
Examples:
• Out_GlueGun1: Output signal to turn of Glue Gun 1
• Out_ServoCorrectionDistance: Output of a ser vo registration correction distance
• Out_OverflowValve: Output signal to open the Overflow Valve
• Out_TankLevelError: Output of a difference between target and actual fill level of a tank
process is performed. The results are then loaded back into the structure to be passed out of AOI for use elsewhere.
Example:
Ref_PositionCamRecovery: Provides the data set for calculating a Position Cam with all offsets factored in, as well as the
resulting Position Cam Profile to run in an MAPC instruction
44Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Modular Programming TechniquesChapter 3
Parameter FunctionPrefixDescription
Parameter Par_ Variables that are received from an external source that can be internal or external to the program.
Examples:
• Par_MachineSpeed: Provides a machine's running speed
• Par_TargetFillLevel: Provides a tank's target fill level
Set pointSet_ Variables received from an operator or HMI and are not part of an external source.
Examples:
• Set_MachineMaxSpeed: Provides the setting for a machine's maximum permissible speed
• Set_TankHILevel: Provides the setting for a tank's HI alarm limit
ValueVal_Designates a value that might not be the primary output of the structure.
ReportRpt_Designates a value that is typically used for reporting.
InformationInf_Non-functional data such as an revision level or name for displaying a faceplate.
ReadyRdy_Command-ready bits that are typically Booleans calculated inside the control routines to reflect whether the routine let
Program Command
(optional)
Operator Command
(optional)
PCmd_Command input for commands typically issued by the application program.
OCmd_Command input for commands typically issued by the operator via the HMI.
states change commands. Used with HMI faceplates to enable or disable command buttons.
Examples:
• PCmd_ProgReq - Request for Program Mode made by the application (as opposed to Cmd_ProgProgReq)
• PCmd_AutoReq - Request for Auto Mode made by the application (as opposed to Cmd_ProgAutoReq)
Examples:
• OCmd_ProgReq - Request for Program Mode made by the operator (as opposed to Cmd_OperProgReq)
• OCmd_AutoReq - Request for Auto Mode made by the operator (as opposed to Cmd_OperAutoReq)
Guidelines to for Subroutines
GuidelineDescription
Input and Return parameters depend on the
subroutine logic.
Pass complete timers in and out of subroutines.If a subroutine needs a timer, pass the complete timer tag to the subroutine as an input and return the complete timer
Create a user-defined tag to pass large numbers Input and
Output parameters
Data types must matchFor each parameter in a SBR or RET instruction, use the same data type (including any array dimensions) as the
Follow these parameter guidelines for subroutines.
If the subroutine needs to know the previous state of any Return parameters (the values are used elsewhere in the
project), these values should also be Input parameters:
• If the subroutine contains latch/unlatch logic (holding circuits), intended outputs of the subroutine should be passed
into and returned from the subroutine.
• If the subroutine does not contain latch/unlatch logic, intended outputs of the subroutine only need to be returned
from the subroutine.
tag as an output. Store the timer in a buffer tag outside of the subroutine.
Create and pass a UDT if you have several Input and Output parameters to save on execution time. The more parameters
you pass, the fewer nested JSRs you can perform.
corresponding parameter in the JSR instruction. Using different data types can produce unexpected results.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201545
Chapter 3Modular Programming Techniques
Guidelines for User-defined
Data Types
A UDT lets you organize or group data logically, so that all of the data associated
with a device (such as a pressure transmitter or variable frequency drive) can be
grouped together.
• You can mix data types, such as real or floating point values, counters,
timers, arrays, Booleans, and other UDTs, within one UDT.
• You can copy a UDT from one project to another, and even from one
Logix controller type to another.
• A UDT is self-documenting based on the tag names you assign, and
provides a logical representation of parts or sub-systems.
Naming Conventions for User-Defined Data Types
ElementDescription
Prefix_UDT_
UDT nameFunction or purpose of the UDT
Examples:
Inventory tracking tagUDT_InventoryTracking
Clean in place systemUDT_CIP
Two-state valve control module in control moduleUDT_CMV2S
Water addition in equipment moduleUDT_EM
UDT Member Order
The order in which elements are listed in the UDT can have a significant impact
on memory use if several BOOL, INT, or SINT elements are defined. Memory is
allocated in 4-byte (32-bit) increments, and every DINT, REAL, STRING, or
sub-UDT element always start at the beginning of a 4-byte boundary.
For example, if the first element defined is a BOOL, it uses the first 4 bytes
allocated to the UDT. Other BOOLs can be assigned immediately following
without consuming any more memory, until the first 4 bytes are consumed.
However, if the next element is a DINT, the DINT element allocates another 4
bytes even though the BOOL occupies only a single bit in the first 4 bytes. So for
this example, the 31 bits of memory between the BOOL and the start of the
DINT are allocated but are not accessible.
• UDT memory is allocated in 4-byte increments.
• Elements that occupy 4 bytes or more always start at a 4-byte boundary.
These include DINT, REAL, STRING, any UDT, or any other complex
data structure.
• Elements of smaller data types (BOOL, SINT, or INT) start on the next
byte boundary that matches its size, so that all the data types in the UDT
are fully contained in their respective 4-byte increments. For example, INT
elements start on 2-byte boundaries, SINT elements follow at the next
byte, and BOOL elements in succession occupy consecutive bits within a
byte.
46Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Modular Programming TechniquesChapter 3
In the following example, the UDT on the left, UDT_Tank, has members
arranged by function without regard for memory usage. This makes sense in the
context of implementation, because members toward the top are ordinarily used
in the software code.
However, the disjointed listing of data types in UDT_Tank consumes 25% more
memory than the example UDT on the right, UDT_TankPacked. In
UDT_TankPacked, the BOOL members are grouped according to their
functionality, with the input BOOLs grouped at the top and the output BOOLs
grouped at the bottom. As a result, the data type size is reduced from 80 bytes to
64 bytes.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201547
Chapter 3Modular Programming Techniques
Guidelines for Add-On
Instructions
An Add-On Instruction encapsulates commonly used functions or device
controls. It is not intended for use as a high-level hierarchical design tool. Once
an Add-On Instruction is defined in a project, it behaves similarly to the built-in
instructions that are already available in the programming software. The AOI
appears on the instruction toolbar and in the instruction browser.
GuidelineDescription
Create Add-On Instructions in relay ladder, function block
diagram, or structured text languages.
An Add-On Instruction supports parameters:
• Input (copied in)
• Output (copied out)
• InOut (passed by reference)
Create and modify offline only.Online operation supports monitoring.
An Add-On Instruction executes like a routine.A task with a higher execution priority can interrupt an Add-On Instruction. Use a UID/UIE instruction pair to make sure
The code within an Add-On Instruction can access data
that is specified only via parameters or defined as local.
Use optional Scan mode logic to set up, initialize, or reset
the Add-On Instruction code.
Apply code signatures to Add-On Instructions for revision
control.
Supports all Add-On Instructions and most built-in instructions. Excludes JSR/SBR/RET, JXR, FOR/BRK (relay ladder), SFR,
SFP, SAR, IOT, and EVENT instructions.
GSV/SSV instructions in an Add-On Instruction cannot reference the Module, Message, Axis, Motion Group, or Coordinate
System class names.
Add-On Instructions support function block, relay ladder, and structured text programming languages. Each of the AddOn Instruction logic areas can be any language. For example, the main logic can be function block and the prescan logic
can be relay ladder.
You can nest Add-On Instructions seven levels deep.
As of RSLogix 5000 software, version 18, you can create safety Add-On Instructions in a safety task.
• Limited to 512 total: Input parameter + Output parameter + local tags (no limit on the number of InOut parameters)
• 2 MB maximum data instance (parameters and locals)
• Alarm, axis, axis group, coordinate system, message, motion group, and produced/consumed tags must exist at the
program or controller scope and passed as an InOut parameter
• Can in clude reference s to controller-scope d tags, program-scoped tags, and immediate values.
• Input and Output parameters are limited to atomic (BOOL, SINT, INT, DINT, REAL) data types. Use the InOut parameter
for LINT, user-defined, and structure data types.
• DINT data types provide optimal execution.
• Default values of parameters and local tags are used to initialize the data structure when a tag is created of the
instruction’s data type. When an existing parameter or local tag's default value is modified, the existing tag instances
for that instruction are not updated. When a parame ter or local tag is added to the instruction definition, the tag's
default value is used in the existing tags.
Modifications to Add-On Instructions are made offline. Make changes once to the Add-On Instruction definition to affect
all instances.
an Add-On Instruction’s execution is not interrupted by a higher priority task.
If you have many parameters or specialized options, consider multiple Add-On Instructions
Calling many Add-On Instructions impacts scan time
Copy the local data to a parameter if you want to programmatically access it outside of an Add-On Instruction.
An Add-On Instruction can have logic along with the main logic for the instruction.
• Prescan logic executes on controller startup.
• Postscan logic executes on SFC Automatic reset.
• EnableInFalse logic executes when rung condition is false.
Add-On Instructions can be sealed with a code signature, as of RSLogix 5000 software, version 18. Use the code signature
for revision control and to identify any changes. For safety controllers, the signature can be used to get TUV certification
for a safety Add-On Instruction. For more information, see the Logix5000 Controllers Add-On Instructions Programming
Manual, publication 1756-PM010
.
48Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Add-On Instruction Design Concepts
PCam profile display
PCamProfileDisplay
PCam profile display
PCamProfileDisplay_AOI
To be sure that specific data is passed into or out of the add-on instruction, use a
required parameter. A required parameter must be passed as an argument in
order for a call to the instruction for verification. To pass a required parameter in
ladder diagrams and in structured text, specify an argument tag for the parameter.
• In a function block diagram, required Input parameters and Output
parameters must be wired.
• In a ladder diagram, InOut parameters must have an argument tag.
• If a required parameter lacks an associated argument, the routine that
contains the call to the add-on instruction does not verify.
Naming Conventions for Add-On Instructions
Component NameRecommendations
Add-On InstructionStar t with the application name.
Add a variant name, is applicable.
Capitalize the first letter in all words in the name.
Example:
Modular Programming TechniquesChapter 3
Suffix with underscore AOI, if space permits.
Example:
Comparison of Subroutines and Add-On Instructions
ComparisonSubroutineAdd-On Instructions
Accessibility Within program (multiple copies)Anywhere in controller (single copy)
ParametersPass by valuePass by value or reference via InOut
Numeric parametersNo conversion, you must manageAutomatic data type conversion for Input and Output parameters
InOut parameters must match declared type exactly
Parameters data types
Paramete r check ing
Data encapsulationAll data at program or controller scope (accessible to anything)Local data is isolated (only accessible within instruction)
Monitor/debug
Supported programming languages
Callable fromFBD, LD, SFC, STFBD, LD, SFC, ST
ProtectionLocked and View OnlyLocked and View Only
LogicAny program, equipment phase, routine, Add-On Instruction, or user-
defined data type in the project can be imported/exported via .L5X file.
Controller accessibilityImport on-line with a running controller:
• Add programs, routines, and Add-On Instructions
• Existing programs and routines can be replaced
• Create tags and UDTs
• Name collisions are detected automatically and you are prompted to
rename or bind to existing components
• The data values in the controller are maintained and new tags have their
values initialized from the import file
Logic checkingYou resolve conflicts on import.The software verifies the components that you add to Add-On
DataEditing member definitions of an Add-On Instruction maintains the values
that are assigned to the parameters when:
• Inserting, adding, or deleting members
• Rearranging (moving) members
• Renaming members
• Changing the data types of members
Values for members that are both renamed and moved in the same
operation are not to be maintained.
Create once (single copy) and use anywhere in the same
controller project.
Existing Add-On Instructions can only be edited offline.
New Add-On Instructions can be created online or offline.
Instruction as you create it.
Local data is isolated (only accessible within the instruction).
50Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Modular Programming TechniquesChapter 3
Guidelines for Program
Parameters
Program parameters define a data interface for programs to facilitate data sharing.
Data sharing between programs can be achieved either through pre-defined
connections between parameters or directly through a special notation. Unlike
local tags, all program parameters are publicly accessible outside of the program.
Additionally, HMI external access can be specified on individual basis for each
parameter.
Standard (non-Safety) parameters can be created, edited, and deleted while
online with the controller. The following exceptions apply:
• Parameters cannot be deleted while online if they are connected/bound to
other parameters, or if the control logic references them.
• InOut parameters cannot be deleted while online
• InOut bindings can only be changed online through a Partial Import
Online (PIO) operation
A safety parameter cannot be connected with or bound to a standard parameter
or controller scoped tag. A safety connection cannot be created, modified, or
deleted in a Safety Locked project. Input, Output, and Public parameters support
the External Access attribute. InOut parameters do not.
Program Parameter Description
Input• Input parameters (including members) can only sup port ONE connection. Only one source can be delivering the value
Output• Output parameters (including members) can support multiple connections. For example, lets assume you have a
InOut• InOut parameters can only suppor t ONE connection. You cannot configure connections to any member of an InOut
Public• Public parameters can support MULTIPLE connections. Yo u can configure connections to the base Public parameter or
to the input pa rameter.
• Input Parameter values are refreshed before each scan of a program. The values do not change during the logic
execution so you do not need to write code to buffer inputs.
• A program can write to its own input parameters.
• Data values for Output parameters that are connec ted to controller scope tags or Public parameters are copied after
the scan of a program. In a project with multiple tasks, the data copy for a parameter that is of type BOOL, SINT, INT,
DINT, LINT, or REAL will not be interrupted. A task switch can interrupt the data copy from an Output parameter to a
controller scope tag or Public parameter, or any other predefined or user-defined data type.
BOOL input parameter in Program A and Program B named Input1a and Input1b. You can connect an output
parameter in Program C to Input1a AND Input1b. As stated earlier, this is often referred to as fanning.
• Output Parameter values are refreshed AFTER each scan of a program. Updated output parameter values are NOT
available to the parameters connec ted to that output parameter until the program execution is complete.
• Output parameters that are connected to Public parameters or controller scope tags are copied (pushed) at the end of
the program execution.
• An Output parameter can ONLY be connected to an InOu t parameter if both the Output and InOut parameters are
configured as Constants.
parameter.
• InOut parameters are passed by REFERENCE, which means they simply point to the base tag. In other words, when an
InOut parameter is used in logic, the current value of the parameter that is connected to the InOut Parameter is used.
• An InOut parameter can ONLY be connected to an Output parameter if both the Output and InOut parameters are
configured as Constants. See the tool tip for Output Parameters for a more detailed explanation.
• InOut parameters CANNOT be changed online, unless using the Partial Import Online (PIO).
any member of a Public parameter. This includes User-Defined Structures.
• Public parameters are updated when the source is updated. In other words, when a Public parameter value updates, it
is immediately available to any higher priority tasks that are connected to that parameter.
• •Public parameters can be aliased to Controller Scope Tags. If this functionality is desired, remember that the alias
update is asynchronous to program execution. The public parameter contains the real-time value of the controller
scope tag.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201551
Chapter 3Modular Programming Techniques
Comparison of Program Parameters and Add-On Instructions
ComparisonProgram ParametersAdd-On Instructions
Accessibility Within program (multiple copies)Anywhere in controller (single copy)
ParametersInput / Output (pass by value), InOut (pass by reference), Public (pass
Numeric parameters• Automatic data type conversion for Input and Output parameters
Parameters data types
Paramete r check ing
Data encapsulationAll data at program or controller scope (accessible to anything).
Execution performance• Programs can talk directly and exchange data between them.
Memory useCompact. One Public parameters can be connected or bound to
Edit
by value)
• InOut parameters must match declared type exactly
Atomic, strings, arrays, structures• Atomic data types as In or Out parameters
None, user must manageVerification checks
Programs can talk directly and exchange data between them. Local
tags remain private to the Program. Cannot access Local Tags, only
the parameters.
Online editable.Logic that is animated with data from one calling instance
FBD, LD, SFC, STFBD, LD, ST
• InOut passed by reference
multiple Input, Output or InOut parameters to form a shared memory
space.
Online editable, and supports sub- element connections. Copy / Paste
Programs without disturbing parameter configuration.
Input / Output (pass by value), InOut (pass by reference)
• Automatic data type conversion for Input and Output parameters
• InOut parameters must match declared type exactly
• LINT, user-defined, and structure data types as InOut parameters
Local data is isolated (only accessible within instruction)
line, extended help
• Call is more efficient
• InOut passed by reference
• Call requires more memory
• All references need additional memory
Code modifications are limited to offline in the project file and require
a new download
Data values associated can be modified online and offline
52Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Data TypeDescription
Atomic data type
(BOOL, SINT, INT, DINT, REAL)
Special-use atomic data type
(LINT)
Compound data typ e
(array, structure)
BenefitConsideration
• Individual names
• No limit to the number of tags
• Tag Editor and Data Monitor can filter individual tags and display
any references
• Always listed alphabetically in the Tag Editor and Data Monitor
• Full alias tag support (both the base tag and its bits)
• Can be added when programming online
• Supported as In or Out parameter in an Add-On Instruction
BenefitConsideration
• 64-bit integer value to store date and time values
• Data monitor display radix for Date and Time lets you display a
LINT value as year, month, day, hours, minutes, seconds,
microseconds
BenefitConsideration
• Specific names and user-defined organization are available
• Consolidates information in controller memory
• Optimizes communication time and memory impact
• Arrays can be dynamically indexed
• Can create arrays when programming online
• Alias support for user-defined structures, members of an array,
and bits of a member
Chapter 4
Address Data
Logix5000 controllers support IEC 61131-3 atomic data types, such as BOOL,
SINT, INT, DINT, LINT, and REAL. The controllers also support compound
data types, such as arrays, predefined structures (such as counters and timers), and
user-defined structures.
• Require more communication overhead and, potentially, more
controller memory than compound data types
• Can only change the data type of a flag when programming offline
• The root tag is listed alphabetically in the Tag Editor and Data
Monitor, but the structure members are listed in the order in
which they were defined in the structure
• For math operations or comparisons, copy the LINT value into a
pair of DINTs and then manipulate through code
• Limited to InOut parameter in an Add-On Instruction
• 2 MB data limit per user-defined structure or array
• User-defined structures are padded to enforce 32-bit data
alignment
• Alias tags cannot point to the root tag of an array
• Tag Editor and Data Monitor filtering limited
• Can only create or change a user-defined structure when
programming offline
• Can only change an array when programming offline
• Limited to InOut parameter in an Add-On Instruction
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201553
Chapter 4Address Data
SINTINTDINTREAL
Memory that is reserved for a standalone tag4 bytes4 bytes4 byte s4 bytes
Memory that is reserved for data in a user-defined structure1 byte
(8-bit aligned)
2 bytes
(16-bit aligned)
4 bytes
(32-bit aligned)
4 bytes
(32-bit aligned)
Memory that is used to access a tag in an ADD instruction236 bytes260 bytes28 bytes44 bytes
Execution time on a 1756-L63 controller that is required to perform an
ADD instruction
3.31 s3.49 s0.26 s1.45 s
The Logix CPU reads and manipulates 32-bit data values. The minimum
memory allocation for data in a tag is 4 bytes. When you create a standalone tag
that stores data that is less than 4 bytes, the controller allocates 4 bytes, but the
data only fills the part that it needs.
Data TypeBits
64...323116 158 710
BOOL
SINTNot allocatedAllocated but not used-128...127
INT
DINTNot allocated-2,147,483,648...2,147,483,647
REALNot allocated-3.40282347E38...-1.17549435E
LINTValid Date/Time range is from 1/1/1970 12:00:00 AM coordinated universal time (UTC) to 1/1/3000 12:00:00 AM UTC
Not allocatedAllocated but not used0 or 1
Not allocatedAllocated but not used-32,768...32,767
-38
(negative values)
0
1.17549435E
-38
...3.40282347E38 (positive values)
A tag uses additional memory in the controller to store the tag name and symbol,
and allocate memory for data.
To manipulate SINT or INT data, the controller converts the values to DINT
values, performs the programmed manipulation, and then returns the result to a
SINT or INT value. This requires additional memory and execution time when
compared to using DINT values for the same operation.
Guidelines for Data Types
GuidelineDescription
Use DINT data types whenever possibleThe Logix5000 controllers perform DINT (32 bit) and REAL (32 bit) math operations. DINT data types use less memory and
Follow these guidelines depending on the data type for your application.
execute faster than other data types. Use the following data type:
• DINT for most numeric values and array indexes.
• REAL for manipulating floating point, analog values.
• SINT (8 bit) and INT (16 bit) primarily in user-defined structures or when communicating with an external device that
does not support DINT values.
Group BOOL values into arraysWhen you use BOOL values, group them into DINT arrays to best use controller memory and to make the bits accessible
54Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
via FBC or DDT instructions.
Address DataChapter 4
BOOL[96] = 12 bytes
BOOL arrays use 32-bit
increments of memory
SINT[10] = 12 bytes of memory (2 bytes unused)
INT[5] = 12 bytes of memory (2 bytes unused)
DINT[3] = 12 bytes and REAL[3] = 12 bytes
SINT arrays are padded to use
any left over bytes
INT arrays are padded to use
any left over bytes
DINT and REAL arrays use
4-byte increments of memory
Arrays
An array allocates a contiguous block of memory to store a specific data type as a
table of values.
• Tags support arrays in one, two, or three dimensions.
• User-defined structures can contain a single-dimension array as a member
of the structure.
This arrayStores data likeFor Example
One dimensionTag name
one_d_array
Total number of elements = 7
Valid subscript range DINT[a] where a=0...6
Two dimensionTag name
two_d_array
Total number of elements = 4 5 = 20
Valid subscript range DINT[a,b] where a=0...3; b=0...4
Three dimensionTag name
three_d_array
Total number of elements = 2 3 4 = 24
Valid subscript range DINT[a,b,c] where a=0...1; b=0...2, c=0...3
Typ e
DINT[7]
Typ e
DINT[4,5]
Typ e
DINT[2,3,4]
Dimension 0
7
Dimension 0
4
Dimension 0
2
Dimension 1
--
Dimension 1
5
Dimension 1
3
Dimension 2
--
Dimension 2
--
Dimension 2
4
The data type you select for an array determines how the contiguous block of
memory gets used.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201555
Chapter 4Address Data
Guidelines for Arrays
GuidelineDescription
You can create arrays of most data types, except for
ALARM, AXIS, COORDINATE_SYSTEM, MOTION_GROUP,
and MESSAGE data types.
Type of ArrayBenefitConsiderations
Single (1) dimension• Better support by native file instructions
Double (2) dimension
and
Triple (3) dimension
Nest arrays.The file instructions offer limited support for arrays. To work with array data, create a user-defined structure with one
Select the data type of the array based on the data and
the instructions that manipulate that data.
Limit arrays to 2 MB of data.The maximum array size is 2 MB. The software displays a warning if you try to create an array that is too large. The
Edit a rrays onlin e and off line.You can create arrays w hen online or offline. However, you can mod ify only th e size or data type of an existing array when
A subscript identifies an individual element within the array. A subscript starts at 0 and extends to the number of
elements minus 1 (zero based).
• Single-dimension arrays take less memory and execute faster than two-dimension or three-dimension arrays.
• Direct references to array elements execute faster than indexed references.
• An array can be as large as 2 MB.
• If you create an array of structures, the memory for each element is allocated based on the structure definition.
• Fully supported in user-defined structures and arrays
• Smallest impact (execution time and memory) for
indexed references
• Can create arrays when programming online
• Can provide a more accurate data representation for a
physical system
• Can emulate PLC file/word indirection with a twodimension array
• Can create arrays when programming online
array as a member of the structure. Then create an array tag by using the user-defined structure as its data type.
While SINT and INT arrays can compact more values into a given memory area, they require additional memory and
execution time for each instruction t hat references the array.
software also displays a warning if an array is 1.5...2 MB, even though these sizes are valid.
offline.
• Multiple arrays cannot be indirectly referenced like in
PLC or SLC processors (such as, N[N7:0]:5)
• BOOL arrays are not directly supported by file
instructions
• Can be changed only when programming offline
• Larger impact (execution time and memory) for
indexed references
• File manipulation requires extra code and file
instructions
• Can only be changed when programming offline
Indirect Addresses of Arrays
If you want an instruction to access different elements in an array, use a tag in the
subscript of the array (an indirect address). By changing the value of the tag, you
change the element of the array that your logic references.
When index equals 1, array[index] points here.
array[0]4500
array[1]6000
array[2]3000
array[3]2500
When index equals 2, array[index] points here.
When you directly reference an element in an array (such as MyArray[20]), uses
less memory and executes faster than an indirect reference (MyArray[MyIndex]).
You can also indirectly address bits in a tag (MyDint.[Index]).
If you use indirect addresses, use DINT tags because other data types require
conversion and execute slower. For each indexed access to data, the controller
recalculates the array index. If you access a specific array element multiple times,
copy the data out of the array into a fixed tag and use that tag in subsequent logic.
56Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Address DataChapter 4
OperatorDescriptionOptimal
+AddDINT, REAL
-Subtract/negateDINT, REAL
*MultiplyDINT, REAL
/Divide DINT, REAL
**Exponent (x to y)DINT, REAL
ABSAbsolute valueDINT, REAL
ACSArc cosineREAL
ANDBitwise ANDDINT
ASNArc sineREAL
ATNAr c t ang entR EA L
COSCosineREA L
DEGRadians to degreesDINT, REAL
FRDBCD to integerDINT
LNNatural logREAL
LOGLog base 10REAL
MODModulo divideDINT, REAL
NOTBitwise complementDINT
ORBitwise ORDINT
RADDegrees to radiansDINT, REAL
SINSineREAL
SQRSquare rootDINT, REAL
TANTang entR EA L
TODInteger to BCDDINT
TRNTruncateDINT, REAL
XORBitwise exclusive ORDINT
OperatorDescriptionOptimal
You can also use an expression to specify the index value. For example:
MyArray[10 + MyIndex].
• An expression uses operators to calculate a value.
• The controller computes the result of the expression and uses it as the
index.
• These are valid operators.
Guidelines for Array Indexes
GuidelineDescription
Use the SIZE instruction to determine the number of
elements in an array.
Use immediate values to reference array elements.Immediate value references to array elements are quicker to process and execute faster than indexed references.
Use DINT tags for array indexes.DINT tags execute the fastest. SINT, INT, and REAL tags require conversion code that can add additional scan time to
Avoid using array elements as indexes.The Logix5000 controller does not directly support the use of an array element as the index to look up a value in another
By determining the number of elements in an array at runtime, you can write reusable code that adjusts itself to meet
each instance where it is used.
The SIZE instruction returns the number of elements. Arrays are zero-based, so subtract 1 from the result to determine
the last element position.
an operation.
array. To work around this, you can create an alias to the element and then use this as the index. Or copy the element to a
base tag and use that base tag as the index.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201557
Chapter 4Address Data
Guidelines for User-defined Structures
Table 1 - UDT Guidelines
GuidelineDescription
Group members of the same data type within a structure. You can create members of most data types, except for ALARM, AXIS, COORDINATE_SYSTEM, MOTION_GROUP, and
Arrays within structures can only be 1-dimension.If you include an array as a member, limit the array to one dimension. Multidimension arrays are not permitted in a user-
I/O data that is used in structure must be copied into the
members.
Limit user-defined structures to 500 members.Logix5000 controllers limit user-defined structures to 500 members. If you need more, consider nesting structures within
Limit user-defined structures to 2 MB of data.The maximum UDT size is 2 MB. The software displays a warning if you try to create an UDT that is too large. The software
Limit the size of user-defined structures if they are to be
communicated.
Use the appropriate instruction to load data into a
structure.
Use structure descriptions to automatically create tag
descriptions.
Online and offline editing.You can create user-defined structures when online or offline. However, you can modify only an existing structure when
MESSAGE data types.
Place members that use the same data type in sequence.
A Logix5000 controller aligns every data type along an 8-bit boundary for SINTs, a 16-bit boundary for INTS, or a 32-bit
boundary for DINTs and REALs. BOOLs also align on 8-bit boundaries, but if they are placed next to each other in a userdefined structure, they are mapped so that they share the same byte.
defined structure.
If you include members that represent I/O devices, you must use logic to copy the data into the members of the structure
from the corresponding I/O tags.
Make sure that the data type of the struc ture member matches the I/O data type to avoid data type conversion.
the main structure.
also displays a warning if the UDT is 1.5...2 MB, even though these sizes are valid.
Produced and consumed tags are limited to 500 bytes over the backplane and 480 bytes if over a network.
RSLinx software can optimize user-defined structures that are less than 480 bytes.
Load input values into the user-defined structure at the beginning of the program and copy output values from the
user-defined structure at the end of the program.
• Single bit - Examine On (XIC) and Output Energize (OTE) instructions
• Contiguous bits - Bit Field Distribute (BTD) instruction
• Single value - MOV instruction
• Multiple contiguous values -COP/CPS instruction
Enable the Use Pass-through Description workstation option (Tools > Options > Display) to display the descriptions you
add to the members of structures for each tag that uses that structure data type.
offline.
58Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Address DataChapter 4
MyBit:BOOL
BitTable:BOOL[32]
FaultTable:DINT[3]
BitStructure
Bit1:BOOL
Bit2:BOOL
Fault:BitStructure
Select a Data Type for
Bit Tags
Tag TypeDescription
BOOL tagEach tag accesses a specific bit. Each tag uses 4 bytes.
BOOL arrayA BOOL array combines multiple bits into adjacent words (32-bit words).
DINT arrayA DINT combines multiple bits into adjacent words.
Bits in a Logix5000 controller can exist as: BOOL tags, bits in a BOOL array,
bits in elements of a SINT, INT, DINT array, members of a user-defined
structure, or as bits in a SINT, INT, DINT member of a user-defined structure.
BenefitsConsiderations
• Each bit has a specific tag• Requires extra bandwidth to communication
BenefitsConsiderations
• Consolidates multiple bits into one word
• Better use of memory
• Can address all bits in an array by using indirect
addressing
BenefitsConsiderations
• Consolidates multiple bits into one word
• File instructions, copy instructions, and DDT/FBC
instructions support DINT arrays
• Lets you access the bits by element (word) and
bit number
• Uses more memory
• Cannot use FBC/DDT bit file instruc tions
• BOOL data type only supported by bit instructions
• Cannot use file instructions, copy instructions, or DDT/
FBC instructions
• Requires extra planning to indirectly address bits
• Difficult to address bits in the array by using indirect
addressing
User-defined structureA user-defined structure combines multiple bits into adjacent, individually named words.
BenefitsConsiderations
• Object based
• Consolidates multiple bits into one word
• Third party MMI/EOI products do not directly support
structures.
• Cannot use FBC/DDT bit file instruc tions
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201559
Chapter 4Address Data
Serial Bit Addresses
The BOOL B data table in the PLC-5 and SLC 500 processors supports two
address modes that can address the same bit.
Address ModeDescription
Serial bit
In PLC-5 or SLC software, this addressing mode is
represented as /Bit
Word bit
In PLC-5 or SLC software, this addressing mode is
represented as Word/Bit
Serial bit addressing references all bits as a conti guous list (array) of bits. For example, if you want to reference the third
bit in the second word of a B file, specify B3/18. This method is similar to a BOOL array in a Logix5000 controller where
you specify FaultBit[18].
Word bit addressing identifies a bit within a specific word. For example, B3:1/2 is the same as B3/18 from the serial bit
example. This method is similar to accessing the bits of a SINT, INT, DINT array in a Logix5000 controller where you
specify FaultTable[1].2.
The Logix5000 controller supports both of these addressing modes, but you
cannot use both to reference bits in the same array due to conformance with the
IEC 61131-3 standard. Choose the method that best meets your application
needs. You can copy data between arrays by using both methods.
You can also use an expression to indirectly reference a bit in a DINT array by
using a serialized bit number. For example:
Tag
EndTag
MOV(34, BitRef)
XIC(MyBits[BitRef / 32].[BitRef AND 31])
MyBits : DINT[10]
BitRef : DINT
where:
This expressionCalculates the
[BitRef / 32]Element in the DINT array
If the tag MyBits is an INT or SINT, the divisor is 16 or 8, respectively.
[BitRef AND 31]Bit within the element
If the tag MyBits is an INT or SINT, the mask value is 15 or 7, respectively.
The Diagnostic Detect (DDT) and File Bit Compare (FBC) instructions
provide a bit number as a result of their operation. These instructions are limited
to DINT arrays so you can use them to locate the bit number that is returned
from the example above.
60Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Address DataChapter 4
Guidelines for String
DataTypes
GuidelineDescription
You can create a string data type that is longer or shorter
than the default string data type.
Only some instructions support string data types.These comparison instructions support string tags: EQU, NEQ, GRT, GEG, LES, LEQ, CMP.
Use the SIZE instruction to determine the number of
characters in a string,
Use the DTOS, RTOS, and CONCAT instructions to embed
tag values within a string.
Set the LEN field to indicate the number characters that
are present.
String data types are structures that hold ASCII characters. The first member of
the structure defines the length of the string; the second member is an array that
holds the actual ASCII characters.
The default string data type can contain as many as 82 characters, but you can create custom-length string data types to
hold as many characters as needed.
These serial port instructions support string tags: ARD, ARL, AWA, AWT.
These string-handling instructions support string tags: STOD, DTOS, STOR, RTOS, CONCAT, MID, FIND, DELETE, INSERT,
UPPER, LOWER, SIZE.
These file instructions support string arrays: FAL, FFL, FFU, LFL, LFU, COP, CPS, FSC.
By determining the number of characters in a string at runtime, you can write reusable code that adjusts itself to meet
each instance where it is used.
The SLC 500 processor supports the ability to embed a data-table reference address within a string (inline indirection).
The SLC 500 AWA and AWT instructions can then look up the data value and place an ASCII representation into the
outgoing string. The Logix5000 controller does not directly support this ability. Use the DTOS or RTOS instructions to
convert a value to a string and the CONCAT instruction to merge characters with another string.
The LEN field in the string structure indicates how many characters are in the string. RSLogix 5000 software and the
controller instructions that manipulate strings use the LEN value to determ ine how many positions in the string DATA
array contain valid characters. Both RSLogix 5000 software and the instructions stop processing the DATA array once they
reach the LEN value.
PLC-5/SLC 500 Access of
Strings
The ASCII A data table in the PLC-5 and SLC 500 processors uses a string
format that is similar to the Logix string data type. The main difference is that the
LEN field (length) in a PLC-5/SLC 500 processor is a 16-bit, INT value. The
LEN field in a Logix5000 controller is a 32-bit, DINT field. This difference can
impact converted logic and data communication. The Logix5000 controller
converts the LEN field to the appropriate value and size when a PLC-5/SLC 500
message format is used to read or write a string.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201561
Chapter 4Address Data
Configure Tags
A tag is a text-based name for an area of the controller’s memory where data is
stored. Tags are the basic mechanism to allocate memory, reference data from
logic, and monitor data.
If you want the tag toThen choose this type
Store a value for use by logic within the projectBase
Use another name for an existing tag’s data
(can help simplify long, pre-determined tag names, such as for I/O data
or user-defined structures)
Send (broadcast) data to another controllerProduced
Receive data from another controllerConsumed
Alias
For more information on I/O tags, see Communicate with I/O
Create user-defined structuresUser-defined structures (data types) let you organize your data to match your machine or process.
Use arrays like files to create a group of similar tags.An array creates multiple instances of a data type under a common tag name.
Use the following guidelines for base tags.
• Atomic tags are listed directly in the Tag Editor and Data Monitor and can easily be found by browsing the alphabetical
list.
• Atomic tags can be created online, but the data type can be only modified offline.
Using only atomic tags can impact HMI communication performance as more information must be passed and acted on.
• One tag contains all data that is related to a specific aspect of your system. This keeps related data together and easy
to locate, regardless of its data type.
• Each piece of data (member) gets a descriptive name.
• You can use the structure to create multiple tags with the same data layout.
• User-defined structure can only be modified offline.
RSLinx software optimizes user-defined structures more than standalone tags.
• Arrays let you organize a block of tags that use the same data type and perform a similar function.
• You organize the data in one, two, or three dimensions to match what the data represents.
• Arrays can be only modified offline.
• RSLinx software optimizes array data types more than standalone tags.
Minimize the use of BOOL arrays. Many array instructions do not operate on BOOL arrays, making it more difficult to
initialize and clear an array of BOOL data.
on page 71.
62Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Address DataChapter 4
Table 2 - Base Tag Guidel ines
GuidelineDescription
Take advantage of program-scoped tags.If you want multiple tags with the same name, define each tag at the program scope (program tags) for a different
Use mixed case and the underscore characters.Although tags are not case-sensitive (upper case A is the same as lower case a), mixed case is easier to read. For example,
Consider alphabetical order.RSLogix 5000 software displays tags of the same scope in alphabetical order. To make it easier to monitor related tags,
Use leading zeroes (0) when numbers are part of tag
names
program. This lets you reuse both logic and tag names in multiple programs.
Avoid using the same name for both a controller tag and a program tag. Within a program, you cannot reference a
controller tag if a tag of the same name exists as a program tag for that program.
Tank_1 can be easier to read than tank1.
use similar starting characters for tags that you want to keep together. For example, consider using Tank_North and
Tank_South rather than North_Tank and South_Tank.
RSLogix 5000 software uses a simple sort to alphabetize tag names in the Tag Editor and Data Monitor. This means if you
have Tag1, Tag2, Tag11, and Tag12, the software displays them in order as Tag1, Tag11, Tag12, and then Tag2. If you want
to keep them in numerical order, name them Tag01, Tag02, Tag11, and Tag12.
Create Alias Tags
An alias tag lets you create one tag that represents another tag.
• Both tags share the same value as defined by the base tag.
• When the value of a base tag changes, all references (aliases) to the base tag
reflect the change.
GuidelineDescription
An alias tag references a base tag.When you assign aliases, avoid:
Alias tags do not affect controller execution.During download, the program is compiled into machine executable code and physical memory addresses. While the
Access alias tags from RSLinx software.Because an alias tag appears as a standalone tag to RSLinx software, an alias tag that references a compound array or
• Nesting aliases.
• Using multiple aliases to the same tag.
On upload, the software decompiles the program and uses the physical memory addresses to determine which tags are
referenced in the code. All references to a base tag revert to an alias if one exists. If multiple aliases point to the same tag,
RSLogix 5000 software uses the first alias tag (alphabetically) that it finds.
existence of an alias requires controller memory to store the name, the program performs the same operation for a
reference with an alias or its associated base tag.
structure can require additional communication time. When you reference tags from RSLinx software or other HMI, it can
be fastest to reference base tags directly.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201563
Chapter 4Address Data
Control ler
scope
Program
scope
Phase
scope
Guidelines for Data Scope
Data scope defines where you can access tags. Controller-scoped tags are
accessible by all programs. Program-scoped tags are accessible only by the code
within a specific program; phase-scoped tags are accessible only by the code
within a specific equipment phase.
If you want toThen assign this scope
Use a tag in multiple programs in the same projectController scope (controller tags)
Use a tag in a message (MSG) instruction
Produce or consume data
Use motion tags
Communicate with a PanelView terminal
Reuse the same tag name multiple times for different parts or
processes within a controller
Have multiple programmers work on logic and you want to
merge logic into one project
Program scope (program tags)
Phase scope (phase tags)
Isolate portions of a machine or different stations into separate programs or
equipment phases and use program-scoped or phase-scoped tags. This lets you do
the following:
• Provide isolation between programs and equipment phases
• Prevent tag name collisions
• Improve the ability to reuse code
Guidelines for Tag Names
GuidelineDescription
Create descriptive names but keep them short.Tag names can be from 140 characters long.
Create a naming convention.Develop a tag-naming convention on electrical drawings or machine design. For example, Conv1_Full_PE101 combines
Use correct characters in tag names.Logix5000 tag names follow the IEC 61131-3 standard. You can use:
Pad names to improve sort order.RSLogix 5000 software displays tags in alphabetical order. If you use numbers in your tag names, pad the number with
Use the following guidelines when you name tags.
• Each charac ter of the tag name uses 1 byte of controller memory, rounded to a 4-byte boundar y.
• For example, a tag name with 1…4 characters uses 4 bytes. A tag name with 5 characters uses 8 bytes.
• Tag names are stored in the controller.
• Use structures to reduce the number and size of tags needed.
Program upload preserves tag names.
the sensor function with the photoeye number.
• Letters A through Z.
• Numbers 0…9.
• Underscore character (_).
Tags must start with a letter to avoid confusion with logical expressions. The remaining characters can be any of the
supported characters.
leading zeros so the names sort in the proper order.
For example, tag names: TS1, TS2, TS3, TS10, TS15, TS20, TS30 display as: TS1, TS10, TS15, TS2, TS20,TS3, and TS30.
Pad the numbers with zero so the y display as: TS01, TS0 2, TS03, TS10, TS15, TS20, TS30 .
64Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Address DataChapter 4
Guidelines for Extended Tag
Use the following guidelines for extended tag properties.
Properties
GuidelineDescription
Use extended tag properties to define additional
information, such as limits, engineering units, or state
identifiers, for various components within your controller
project.
Some extended tag properties support pass-through for
data structures and arrays.
You can read extended properties via logic, but you
cannot write to extended properties values in logic.
If an array tag uses indirect addressing to access limit
extended properties in logic, the following conditions
apply.
You can define extended tag properties for these components:
• Tag
• User-defined data type
• Add-On Instruction
Pass-through behavior is available for descriptions, state identifiers, and engineering units and is configurable in data
structures and arrays.
Pass-through behavior is not available for limits.
• Extended properties must be used as an input operand.
• Alias tags with extended properties cannot be accessed in logic.
• Limits can be configured for input and output parameters in Add-On Instructions. However, limit extended properties
must not be defined on an InOut parameter of an Add-On Instruction.
• Limits cannot be accessed inside Add-On Instruction logic.
• If you read an extended property value in logic, it consumes memory equivalent to an equivalent program-scoped tag
of that data type. If you do not use them in logic, extended tag properties use no user memory, only extended
memory.
• If the array tag has limit extended properties that are configured, the extended properties are applied to any array
element that does not explicitly have that particular extended property configured. For example, if the array tag
MyArray has Max configured to 100, then any element of the array that does not have Max configured inherits the
value of 100 when used in logic. However, it is not visible to you that the value inherited from MyArray is configured in
the tag properties.
• At least one array element must have specific limit extended property configured for indirectly referenced array logic
to verify. For example, if MyArray[x].@Max is being used in logic, at least one array element of MyArray[] must have
Max extended property configured if Max is not configured by MyArray.
• Under the following circumstances a data type default value is used:
– Array is accessed programmatically with an indirect reference.
– Array tag does not have the extended property configured.
– A member of an array does not have the extended property configured.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201565
Chapter 4Address Data
Type of TagDescription Display in RSLogix 5000 Software
AtomicFor a BOOL, SINT, INT, DINT, or REAL tag, the description that is associated with the tag is
the only description available for display.
AliasFirst the alias tag description, then the base tag description.
User-defined structure
and Add-On
Instruction
All members use the description for tag, unless you define a specific description for a
member.
For example, MyTimer.DN uses the description for MyTimer if there is no description for
MyTimer.DN.
Atomic array• All references into an array use the description for the array, unless you define a
description for an element of the array.
• For example, MyTable[10] uses the description for MyTable if there is no description
for MyTable[10].
• All indexed references into an array use the description for the array.
• For example, MyTable[Index] uses the description for MyTable.
Structure arrayAll references to a member of a struc ture in an array default to the array definition, unless
you define a description for the structure member of the array.
For example, Table[0].Field1 uses the description for Table if there is no description for
the specific field.
Tag Descriptions
RSLogix 5000 software searches a tag’s origin to locate the first available
description. This reduces the number of descriptions you need to enter. This also
verifies that tag references display associated descriptions.
GuidelineDescription
Tag descriptions display in RSLogix 5000 software
according to the tag’s origin.
For more information, see the Create Tag Descriptions Automatically with UserDefined Data Types White Paper, publication LOGIX-WP004
Protect Data Access Control
at Tag Level
Tag AttributeDescription
External accessDefines how an external application, such as an HMI, historian, or OPC data server, can access a tag. For arrays, this
ConstantDefines whether a tag value remains constant. Tags with this attribute set cannot be changed programmatically.
66Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
With RSLogix 5000 software, version 18 and later, new tag attributes define
access to tag data at runtime.
feature applies to the top level only; for user-defined struc ture, this feature applies to individual members. Possible
values are:
• Read/Write: External applications can both read and modify the tag’s value
• Read Only: External applications can read the tag’s value, but not modify it
• None: External applications can neither read or write the tag’s value
Use RSLinx Classic software, version 2.56, and RSLinx Enterprise software,
version 5.21 or later, for best results with these tag attributes. Using earlier
versions of RSLinx software can result in anomalous behavior from the data
servers with the external access options of Read Only and None.
.
Chapter 5
IMPORTANT
Produced and Consumed Data
Logix5000 controllers support the ability to produce (broadcast) and consume
(receive) system-shared tags.
For two controllers to share produced or consumed tags, both controllers must be
in the same backplane or attached to the same control network. You cannot
bridge produced and consumed tags over two networks.
If there are no other connections, the controller supports these tags.
As aThe controller support
Producer( number of produced tags) 127
Consu mer(number of consumed tags) 250 (or controller maximum)
The total combined number of consumed and produced tags that a controller
supports is:
The actual number of produced and consumed tags that you can configure over
ControlNet or EtherNet/IP in a project depends on the connection limits of the
communication module through which you produce or consume the tags.
Guidelines for Produced and Consumed Tags
GuidelineDescription
You cannot bridge produced and consumed tags over
different networks.
Create the tag at controller scope.You can only produce and consume (share) controller-scoped tags.
Limit the size of the tag
to 500 bytes.
Combine data that goes to the same controller.If you are producing several tags for the same controller:
For two controllers to share produced or consumed tags, both controllers must be attached to the same network. You can
produce and consume tags over ControlNet or EtherNet/IP networks.
If you transfer a tag with more than 500 bytes, create logic to transfer the data in packets.
If you consume a tag over a ControlNet hop, the tag must be 480 bytes. This is a limitation of the ControlNet network,
not the controller.
• Group the data into one or more user-defined structures. This uses fewer connections than producing each
tag separately.
• Group the data according to similar update intervals. To conserve network bandwidth, use a greater RPI for
less critical data.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201567
Chapter 5Produced and Consumed Data
GuidelineDescription
Use one of these data types:
• DINT
• REAL
• Array of DINTs or REALs
• User-defined struc ture
Use a user-defined structure to produce or consume INT or
SINT data.
The data type in the producer and the consumer must
match.
Produce tags that are based on user-defined structures to
non-Logix devices.
Use a programmatic handshake to help ensure data is
exchanged.
Use a CPS instruction to buffer produced and consumed
data.
Use unicast EtherNet/IP communication to reduce
broadcast network traffic.
To share data types other than DINT or REAL, create a user-defined structure to contain the required data.
Use the same data type for the produced tag and the corresponding consumed tag or tags.
To produce or consume INT or SINT data, create a user-defined structure with INT or SINT members. The members can be
individual INTs or SINTs or the members can be INT or SINT arrays. The resulting user-defined structure can then be
produced or consumed.
The data type for a produced or consumed tag must be the same in both the producer and the consumer.
The controller produces tags in 32-bit words. For devices that communicate in other word boundaries, such as 16-bit
words, th e resultin g data in th e target device can be misaligned. To help avoid misalignment, structure the produced data
in a user-defined structure.
Produced tags continually transmit based on the RPI, so it can be difficult to know when new data arrives. You can set a
bit or increment a counter that is embedded in the produced tag to identify to the consumer that new data is present. You
can also provide a return handshake via a reverse produced/consumed tag, so that the original producer knows that the
consumer received and processed the tag.
Use the CPS instruction to copy the data to the outgoing tag on the producer side. Then use another CPS instruction to
copy the data into a buffer tag on t he consumer side.
The CPS instructions provide data integrity for data structures greater than 32 bits.
Important: The controller inhibits all interrupts while it executes a CPS instruction.
To reduce bandwidth use and preserve network integrity, some facilities block multicast Ethernet packets. With
RSLogix 5000 software, version 16, you can configure a produced and consumed tag to use multicast or unicast
connections. Unicast connections help with the following:
• Reduce network bandwidth
• Simplify Ethernet switch configuration
Guidelines to Specify an RPI
Rate for Produced and
When configuring produced and consumed tags, you specify a requested packet
interval (RPI) rate. The RPI value is the rate at which the controller attempts to
communicate with the module.
Consumed Tags
GuidelineDescription
Make sure that the RPI is equal to or greater than the NUT. You use RSNetWor x™ for ControlNet™ software to select the network update time (NUT) and the software schedules the
The smallest (fastest) consumer RPI determines the RPI
for the produced tag.
network connections.
RSNetWorx™ software cannot schedule a ControlNet network if a module and/or produced/consumed tag on the network
has an RPI that is faster than the network update time.
If multiple consumers request the same tag, the smallest (fastest) request determines the rate at which the tag is
produced for all consumers.
68Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Produced and Consumed DataChapter 5
Guidelines to Manage
Connections for Produced
and Consumed Tags
GuidelineDescription
Minimize the use of produced and consumed tags.To reduce network traffic, minimize the size of produced and consumed tags. Also, minimize the use of produced and
Use arrays or user-defined structures.When sending multiple tags to the same controller, use an array or user-defined structure to consolidate the data. The
Configure the number of consumers accurately.Make sure the number of consumers that are configured for a produced tag is the actual number of controllers that
Multiple produced/consumed connections are linked.If there are multiple produced and consumed connections between two controllers and one connectio n fails, all produced
consumed tags to high-speed, deterministic data, such as interlocks.
byte limit of 500 bytes per produced and consumed tag still applies.
consumes the tag. If you set the number higher than the actual number of controllers, you unnecessarily use up
connections.
The default is two consumers per produced tag.
and consumed connections fail.
Consider combining all produced and consumed data into one structure or array so that you only need one connection
between the controllers.
Configure an Event Task
Based on a Consumed Tag
An event task executes automatically based on a preconfigured event occurring.
One such event can be the arrival of a consumed tag.
• Only one consumed tag can trigger a specific event task.
• Use an IoT instruction in the producing controller to signal the production
of new data.
• When a consumed tag triggers an event task, the event task waits for all
data to arrive before the event task executes.
For information on configuring an event task, see Configure an Event Task
page 30,
on
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201569
Chapter 5Produced and Consumed Data
Compare Messages and
Produced/Consumed Tags
MethodBenefitsConsiderations
Read/Write Message• Programmatically initiated
• Communication and network resources that are only used when
needed
• Support automatic fragmentation and reassembly of large data
packets, up to as many as 32,767 elements
• Some connections can be cached to improve retransmission time
• Generic CIP message useful for third-party devices
Produced/Consumed Tag• Configured once and sent automatically based on requested
packet interval (RPI)
• Multiple consumers can simultaneously receive the same data
from a produced tag
• Can trigger an event task when consumed data arrives
• Control Net resources are reser ved up front
• Does not affect the scan of the controller
• Delay can occur if resources are not available when needed
• MSG instruction and processing can impact controller scan
(system overhead timeslice)
• Data arrives asynchronous to program scan (use a programmatic
handshake or an UID/UIE instruction pair to reduce impact, no
event task support)
• Can add additional messages online in Run mode.
• Support limited to Logix5000 and PLC-5 controllers, and the
1784-KTCS I/O Linx and select third-party devices
• Limited to 500 bytes over the bac kplane and 480 bytes over a
network
• Must be scheduled when using ControlNet
• Data arrives asynchronous to program scan (use a programmatic
handshake or CPS instruction and event tasks to synchronize)
• Connection status must be obtained separately
• With RSLogix 5000 version 17 and later, you can configure status
information for a produced/consumed tag
• On an EtherNet/IP network, you can configure produced/
consumed tags to use multicast or unicast connections.
• Cannot create additional produced/consumed tags online in Run
mode.
70Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Chapter 6
IMPORTANT
Communicate with I/O
In Logix5000 controllers, I/O values update at a period, requested packet
interval (RPI), which you configure via Module Property dialog in the I/O
configuration folder of the project. The values update asynchronously to the
execution of logic.
The module sends input values to the controller at the specified RPI. Because this
transfer is asynchronous to the execution of logic, an I/O value in the controller
can change in the middle of a scan.
Buffer I/O Data
If you reference an I/O tag multiple times, and the application could be impacted
if the value changes during a program scan, you must copy the I/O value into a
buffer tag before the first reference of that tag in your code. In your code,
reference the buffer tag rather than the I/O tag.
Use the synchronous copy (CPS) instruction to buffer I/O data. While the CPS
instruction copies data, no I/O updates or other tasks can change the data.
Tasks that attempt to interrupt a CPS instruction are delayed until the
instruction is done. Overuse of the CPS instruction can impact controller
performance by keeping all other tasks from executing.
Buffer I/O data to do the following:
• Prevent an input or output value from changing during the execution of a
program. (I/O updates asynchronous to the execution of logic.)
• Copy an input or output tag to a member of a structure or element of an
array.
• Prevent produced or consumed data from changing during the execution
of a program.
• Make sure all produced and consumed data arrives or is sent as a group
(not mixed from multiple transfers)
• Only use the CPS instruction if the I/O data that you want to buffer is
greater than 32 bits (or 4 bytes) in size
Overuse of the CPS instruction can greatly impact controller performance.
If you have a user-defined structure with members that represent I/O devices, you
must use logic to copy the data into the members of the structure from the
corresponding I/O tags.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201571
Chapter 6Communicate with I/O
Guidelines to Specify an RPI
Rate for I/O Modules
GuidelineDescription
Specify an RPI at 50% of the rate you actually need.Setting the RPI faster (specifying a smaller number) than what your application needs wastes network resources, such as
Group devices with similar performance needs onto the
same module.
Set the ControlNet network update time (NUT) equal to or
less than the fastest RPI.
In an ControlNet system, use even multiples of the NUT for
the RPI value.
In a ControlNet system, isolate I/O communication.If you use unscheduled ControlNet communication or want to be able to add ControlNet I/O at runtime (see page 83
In an EtherNet/IP system, module change of state is
limited to 1/4 of the RPI.
Data transmission depends on the controller.The type of controller determines the data transmission rate.
Configure an RPI rate per module (ControlLogix and SoftLogix) or an RPI rate
per controller (CompactLogix). The RPI value is the rate at which the controller
attempts to communicate with the module.
ControlNet schedule bandwidth, network processing time, and CPU processing time.
For example, if you need information every 80 ms, set the RPI at 40 ms. The data is asynchronous to the controller scan, so
you sample data twice as often (but no faster) than you need it to make sure that you have the most current data.
By grouping devices with similar performance needs on the same module, you consolidate data transmission to one
module rather than multiple modules. This conserves network bandwidth.
When configuring a ControlNet network, set the network update time (NUT) equal to or less than the fastest RPI of the
I/O modules and produced/consumed tags in the system. For example, if your fa stest RPI is 10 ms, set th e NUT to 5 ms for
more flexibility in scheduling the network.
Set the RPI to a binary multiple of the NUT. For example, if the NUT is 10 ms, select an RPI such as 10, 20, 40, 80, or
160 ms.
dedicate one ControlNet network to I/O communication only. On the dedicated I/O network, make sure that there is
the following:
• No HMI traffic
• No MSG traffic
• No programming workstations
• No peer-to-peer interlocking in multi-processor system architectures
If you configure change of state communication for a module in a remote chassis that is connected via an EtherNet/IP
network, the module can send data only as fast as the module RPI. Initially, the module sends its data immediately.
However, when an input changes, the module data is held at the adapter until 1/4 of the RPI is reached to avoid
overloading the EtherNet/IP network with the module communication.
• ControlLogix and SoftLogix controllers transmit data at the RPI you configure for the module.
• CompactLogix controllers transmit data at powers of 2 ms (such as 2, 4, 8, 16, 64, or 128). For example, if you specify
an RPI of 100 ms, the data actually transfers at 64 ms.
),
72Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Communicate with I/OChapter 6
Direct connection
Local ChassisRemote Chassis
Controlle r
Communication
Module
Communication
Module
Digital Inputs
Digital Outputs
Rack-optimized connection
Local ChassisRemote Chassis
Control ler
Communication
Module
Communication
Module
Digital Inputs
Digital Outputs
Communication Formats for
I/O Modules
The communication format determines whether the controller connects to the
I/O module via a direct or a rack-optimized connection. The communication
format also determines the type and quantity of information that the module
provides or uses.
Each module passes its data to/from the controller individually. Communication
modules bridge data across networks.
BenefitsConsiderations
• Each module can determine its own rate (RPI)
• More data can be sent per module, such as diagnostic and analog data
• Supports event task communication
• Requires additional connections and network resources
• This is the only method supported in the local chassis
• I/O data presented as individual tags
The communication module in a remote chassis consolidates data from multiple
modules into a single packet and transmits that packet as a single connection to
the controller.
.
BenefitsConsiderations
• One connection can ser vice a full chassis of digital modules
• Reduces network resources and loading
The rack-optimized format limits data to one 32-bit input word per module in a
• All modules are sent at the same rate
• Unused slots are still communicated
• Still need a direct connection for analog and diagnostic data
• Limited to remote chassis
• I/O data presented as arrays with alias tags for each module
chassis. If you place a diagnostic module in a chassis, the rack-optimized format
eliminates the value that the diagnostic module offers. In this case, it’s better to
use a direct connection so that the diagnostic information from the module is
passed to the controller.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201573
Chapter 6Communicate with I/O
Peer control
O
U
T
P
U
T
I
N
P
U
T
Output Echo
Connection / Peer Control
Output Data
InputInput
ConnectionListen Only
Output modules let peer ownership of input modules to consume input data to
directly control outputs without requiring controller processing. The 1756IB16IF and 1756-IB16IFC modules can be listened to presuming the output
module knows the input data layout and connection information. The
configuration from the controller defines how the peer input data is mapped to
the output modules. The controller can use the other digital points on the
module that are not peer-owned as conventional outputs.
The controller can also use the output data it normally sends to the module with
consumed inputs, letting ‘gate-type’ features enabled by controller logic
selectively letting application of the consumed peer input data.
.
BenefitsConsiderations
• Faster response time because the controller scan time is removed from the equation.
Data is sent directly to the output module from the input module.
• Increases controller performance by reducing the need for event tasks to close loops
quickly.
• Each input module has an AND and OR bit mask that defines the logic that is applied to
each input module.
• You must program the controller for proper relationship with the output modules.
• The peer output module must be in the same chassis as the input module to maximize
response time.
74Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Communicate with I/OChapter 6
IMPORTANT
Electronic Keying
Electronic Keying reduces the possibility that you use the wrong device in a
control system. It compares the device that is defined in your project to the
installed device. If keying fails, a fault occurs. These attributes are compared.
AttributeDescription
VendorThe device manufacturer.
Device TypeThe general type of the product, for example, digital I/O module.
Product CodeThe specific type of the product. The Product Code maps to a catalog number.
Major RevisionA number that represents the functional capabilities of a device.
Minor RevisionA number that represents behavior changes in the device.
The following Electronic Keying options are available.
Keying OptionDescription
Compatible
Module
Disable KeyingIndicates that the keying attributes are not considered when attempting to communicate with a
Exact MatchIndicates that all keying attributes must match to establish communication. If any attribute does
Lets the installed device accept the key of the device that is defined in the project when the
installed device can emulate the defined device. With Compatible Module, you can typically
replace a device with another device that has the following characteristics:
• Same catalog number
• Same or higher Major Revision
• Minor Revision as follows:
– If the Major Revision is the same, the Minor Revision must be the same or higher.
– If the Major Revision is higher, the Minor Revision can be any number.
device. With Disable Keying, communication can occur with a device other than the type specified
in the project.
ATT EN TI ON : Be cautious when using Disable Keying; if used incorrectly, this option can lead to
personal injury or death, property damage, or economic loss.
We strongly recommend that you do not use Disable Keying.
If you use Disable Keying, you must take full responsibility for understanding whether the device
being used can fulfill the functional requirements of the application.
not match precisely, communication with the device does not occur.
Carefully consider the implications of each keying option when selecting one.
When you change Electronic Keying parameters online, it interrupts
connections to the device and any devices that are connected through the
device. Connections from other controllers can also be broken.
If an I/O connection to a device is interrupted, the result can be a loss of data.
More Information
For more detailed information on Electronic Keying, see Electronic Keying in
Logix5000 Control Systems Application Technique, publication LOGIX-
AT001.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201575
Chapter 6Communicate with I/O
SelectIf
NoneThe remote chassis contains only analog modules, diagnostic digital modules, fused output modules, or
communication modules.
On a ControlNet network, use None to add a new chassis to the network while the controller is running.
Rack-OptimizedThe remote chassis only contains standard, digital input, and output modules (no diagnostic modules or fused
output modules).
For a ControlNet network at runtime (controller is online), you can add new digital modules to an existing rack-optimized
connection, but new rack-optimized connections can only be added when offline. An EtherNet/IP network supports new
rack optimized connections both offline and at runtime (online). For more information, see page 83.
Listen Only Rack-OptimizedYou want to receive I/O module and chassis slot information from a rack-optimized remote chassis that is owned by
another controller.
The runtime capability for listen only rack-optimized connections is the same as for rack-optimized connec tions.
ExampleDescription
Remote 17-slot chassis
Slot 0: 1756-CNBR/D
Slots 1…15: analog modules
Slot 16: standard digital module
Option 1: Select Rack Optimization as the communication format for the remote adapter. This example uses 16
controller connections (15 for analog modules and 1 for the rack-optimized connection). This example also
transfers:
• 12 bytes for rack-optimized overhead.
• 12 bytes for the digital module.
• 12 bytes for each of the 15 analog modules, for a total of 180 bytes.
Option 2: Select None as the communication format for the remote adapter. This example also uses 16 controller
connections (1 direct connection to each I/O module). There is no rack-optimized overhead data to transfer.
Recommendation: Option 2 is recommended because it avoids unnecessary network traffic, and thus improves
network performance.
Remote 17-slot chassis
Slot 0: 1756-CNBR/D
Slots 1…8: analog modules
Slots 9…16: digital modules
Option 1: Select Ra ck Optimization as the communication format for the remote adapter. This example uses nine
controller connections (eight for analog modules and one for the rack-optimized connection). This example also
transfers:
• 12 bytes for rack-optimized overhead.
• 12 bytes for each of the 8 d igital modules, for a total of bytes 96 bytes.
• 12 bytes for each of the 8 analog modules, for a total of 96 bytes.
Option 2: Select Rack Optimization for the communication format of the remote adapter. This example uses
16 controller connections (1 direct connection to each I/O module). There is no rack-optimized overhead data to
transfer.
Recommendation: The best option for this example depends on the type of digital I/O modules in the system
and other controller connectio ns. If the total system has many analog modules, diagnostic modules, fused output
modules, or produced/consumed tags, select Option 1 to conserve controller connections. If there are plenty of
controller connec tions available, select O ption 2 to reduce unnecessar y network traffic.
Guidelines to Manage I/O Connections
Use the following guidelines to administer your I/O modules.
Table 3 - I/O Connection Guidelines
GuidelineDescription
The type of I/O module can determine the type of
connection.
Select the communication format for a remote adapter
based on the remote I/O modules.
Analog modules always use direct connections, except for 1771 analog modules that use messaging.
Digital modules can use direct or rack-optimized connections. Communication formats that include optimization in the
title are rack-optimized connections; all other connection options are direct connec tions.
Select one of these formats for a remote adapter.
Use rack-optimized connections to conserve connectionsIf you are trying to limit the number of controller and net work connections, rack-optimized connections can help.
In some cases, all direct connections work best.For a remote adapter that is configured for rack-optimized connections, there is always data that is sent for each slot in
76Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
the chassis, even if a slot is empty or contains a direct connection module. There are 12 bytes of data that is transferred for
rack-optimized overhead between the controller and the remote adapter. In addition, the remote adapter sends 8 bytes
per slot to the controller; the controller sends 4 bytes per slot to the remote adapter.
For a few digital modules in a large chassis, it can be better to use direct connections because transferring the full chassis
information can require more system bandwidth than direct connections to a few modules.
Communicate with I/OChapter 6
Boundary moves according to
scheduled traffic load.
Network Update Time
(NUT) Period Start
·Scheduled traffic
·Each device/node transmits
only once
·Unscheduled traffic
·Network maintenance
Next Network Update Time
(NUT) Period
Control 1771 I/O Modules
The Logix5000 controllers support the following:
• Remote I/O communication to 1771 digital and analog I/O modules
• ControlNet communication to 1771 digital I/O modules
• Block transfer message instructions via a remote I/O or ControlNet
network to 1771 analog and intelligent I/O modules
GuidelineDescription
Distribute 1771 analog I/O modules.Spread 1771 I/O analog I/O modules across multiple chassis to reduce the number of block transfers one
For block transfers over a ControlNet network, increase
the amount of ControlNet unscheduled bandwidth.
1771-ACN15, 1771-ACNR15, or 1771-ASB adapter manages.
Isolate different 1771 chassis on different networks to diversify the communication so no single network communication
module has to manage all block transfer messages.
The traffic load of scheduled communication determines the amount of time available for unscheduled communication.
Increase the controller system overhead to allocate more CPU time to message and block transfer processing.
Program block transfers.Unscheduled data is limited to 510 bytes/node per ControlNet NUT. The 1756-CNB is limited to 128 words per transfer. If
needed, data is sent in multiple packets.
The data transfer occurs asynchronous to the program scan. See page 101 for more information on block transfers.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201577
Chapter 6Communicate with I/O
ControlLogix Controller with 1756-IF8H and
1756-OF8H Modules
HART Field Devices
Communicate with HART
Devices
HART (Highway Addressable Remote Transmitter) is an open protocol that is
designed to connect analog devices in industrial process-measurement
applications. The protocol uses the standard 4…20 mA current loop that is widely
used for such measurements.
The 1756-IFxH and 1756-OFxH modules offer analog and HART connectivity
in one module. You can place modules local to the controller or remote over
ControlNet or EtherNet/IP networks. You do not need external hardware to
access the HART signal.
GuidelineDescription
Enable HART support on only those channels that need
the support.
The update rate for the HART part of a tag is slower than
for the analog part.
The Device Variable Status (PVStatus, SVStatus, TVStatus,
FVStatus) is a relatively new feature in HART systems.
The 1756 HART modules support asset management
software.
All channels share the HART modem, so HART response time is better if you enable only the needed HART channels.
The update rate varies, depending on HART network traffic. If all eight channels have HART enabled, update rates are in
the range of 10 s. Be sure to consider this response time in your control strategy. Also, check the data quality indications
that are provided with the HART data.
If your HART device does not support Device Variable Status, the 1756-IF8H and 1756-OF8H module synthesizes a status
value that is based on the communication status with the HART field device.
The Dynamic Variables do not update as fast as the Analog Signal. The actual rate depends on:
• The number of channels that are configured for HART.
• The number of Pass Through commands.
• The presence of handheld communicators or other secondary masters.
• The response speed of the field device.
HART must be enabled before any asset management access is possible, including scanning for multiplexors. RSLinx
Professional software, RSLinx Gateway software, and RSLinx OEM software let asset management software communicate
through networks and the 1756 backplane.
Endress+Hauser FieldCare asset management software is a Field Device Tool (FDT) frame application. The frame
application runs the Device Type Manager (DTM) files. The DTM files are executable files that are provided by control and
device vendors. There are communication DTMs and device DTMs. Rockwell Automation provides one communication
DTM for RSLinx software and the 1756 backplane and two other communication DTMs for the 1756 HART modules.
Companies like Endress+Hauser provide device DTMs for their instruments and valves. The device DTMs provide
visualization of the parameters that are used to configure, monitor, and maintain the devices.
78Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Communicate with I/OChapter 6
ControlLogix Controller
with 1756-ENBT
Ethernet
RSFieldbus™
OPC
OPC Client
24V DC
Power
Supply
1757-FFLD
Linking Device
H1
Power
Conditioner
24V DC
Power
Supply
Field Dev ice
Field Dev ice
RSFieldbus
24V DC
Power
Supply
Power
Condi tioner
Field Device
Field Device
1757-FFLDC
Linking Device
Control Logix Controller
with 1756-ENBT
and 1756-CNB
Ethernet
Control Net
H1
OPC Client
OPC
24V DC
Power
Supply
Communicate with
FOUNDATION Fieldbus
FOUNDATION Fieldbus is a communication network that is created by the
Fieldbus Foundation. It is a protocol that is designed for distributed control of
process control applications.
Devices
If your application bridges from SelectDescription
EtherNet/IP1757-FFLD2
1757-FFLD4
ControlNet1757-FFLDC2
1757-FFLDC4
Figure 1 - Example Configuration - EtherNet/IP Network to FOUNDATION Fieldbus Network
The 1757-FFLDx linking device bridges from an Ethernet network to either two or four H1 ports.
The 1757-FFLDCx linking device bridges from a ControlNet network to either two or four H1 ports. The
1757-FFLDCx is compatible with ControlLogix redundancy and supports redundant ControlNet media.
Figure 2 - Example Configuration - ControlNet Network to FOUNDATION Fieldbus Network
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201579
Chapter 6Communicate with I/O
Table 4 - Linking Device Guidelines
GuidelineDescription
Use either the EtherNet/IP linking device or the
ControlNet linking device with an HSE server.
Each linking device supports 16 Logix blocks.Each Logix block supports eight digital inputs, eight digital outputs, eight analog inputs, and eight analog outputs. Each
The connections that are required for a linking device
depend on the number of Logix blocks.
The type of device affects the maximum number of
FOUNDATION Fieldbus devices per H1 segment.
Do not exceed the maximum number of virtual
communication relationships (VCRs) on each H1 segment.
Make sure that you have the correct device description
(DD) for each linking device.
Use the right wiring and connection products.Always use a tree or modified tree topology. Never daisy chain devices.
To get the best implementation, understand the details of
a FOUNDATION Fieldbus system.
Rockwell Automation does not support 1757-FFLDC and 1757-FFLD linking devices communicating with the same HSE
server in the same RSFieldbus project.
Logix block uses one CIP connection.
Each linking device uses these connections:
• Two connections to the network communication module
• One connection for each Logix block
Each linking device supports two or four H1 segments, with 8...10 instruments (16 maximum) per each H1 segment.
A VCR is a channel that provides for the transfer of data between FOUNDATION Fieldbus devices. The number of VCRs
require d to send dat a or receive d ata depends on the device and type of data. Each parameter that you pass to or from the
Logix5000 controller uses a VCR. Some devices, such as valves, use more VCRs than transmitters.
As of firmware revision 2.1 and later, the linking device supports a maximum of 64 publisher and 64 subscriber VCRs for
each H1 segment. Earlier firmware revisions support a maximum of 16 publisher and 16 subscriber VCRs for each H1
segment.
DDs are like EDS files for DeviceNet devices. You can find DDs on vendor/organization websites or on media that ships
with the device. A host with DD services can interoperate with all parameters defined in the DD for a field device.
Noise is the most frequent problem, due to:
• Wron g wirin g
• Improper grounding
• Bad connectors
See these references:
• FOUNDATION Fieldbus System User Manual, publication 1757-UM012
• FOUNDATION Fieldbus Design Considerations Reference Manual, publication RSFBUS-RM001
• FOUNDATION Fieldbus Technical Overview at http://www.fieldbus.org
• Relcom Wiring Guide at http://www.relcominc.com
• Pepperl-Fuchs Fieldbus Wiring and Installation Guide
80Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Communicate with I/OChapter 6
The individual tag that is created for the I/O
module in remote slot 1.
For example, a remote ControlNet communication module
(remote_cnb) has an I/O module in slot 1.
The entry in the rack-object tag for the remote
communication module that identifies the I/O
module in remote slot 1.
Create Tags for I/O Data
Each I/O tag is automatically created when you configure the I/O module
through the programming software. Each tag name follows this format:
LOCAL = local chassis or DIN rail
ADAPTER_NAME = identifies remote adapter or bridge
SlotNumberSlot number of I/O module in its chassis
Typ eTyp e of dat a:
I = inputC = configuration
O = outputS = status
MemberNameSpecific data from the I/O module, such as Data and Fault; depends on the module
SubMemberNameSpecific data that is related to a MemberName
Bit (optional)Specific point on the I/O module; depends on the size of the I/O module (0…31 for a 32-point module)
If you configure a rack-optimized connection, the software creates a rack-object
tag for the remote communication module. You can reference the rack-optimized
I/O module individually, or by its element within the rack-object tag.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201581
Chapter 6Communicate with I/O
Controller Ownership
When you choose a communication format, you have to choose whether to
establish an owner or listen-only relationship with the module.
ModeDescription
OwnerThe owner controller writes configuration data and can establish a connection to the module.
Listen-onlyA controller that uses a listen-only connection only monitors the module. It does not write configuration data and can
only maintain a connection to the I/O module when the owner controller is actively controlling the I/O module.
There is a noted difference in the ownership of input modules versus the
ownership of output modules.
ControllingThis OwnershipDescription
Input modulesOwnerAn input module is configured by a controller that establishes a connection as an owner. This configuring controller
Listen-onlyOnce an input module has been configured (an d owned by a controller), other controllers can establish a li sten-only
Output modulesOwnerAn output module is configured by a controller that establishes a connection as an owner. Only one owner
Listen-onlyOnce an output module has been configured (and owned by one controller), other controllers can establish listen-
is the first controller to establish an owner connection.
Once an input module ha s been configured (and owned by a controller), other controllers can establish owner
connections to that module. This lets additional owners to continue to receive multicast data if the original owner
controller breaks its connection to the module. All other additional owners must have the identical configuration
data and identical communication format that the original owner controller has, other wise the connection attempt
is rejected.
connection to that module. These controllers can receive multicast data while another controller owns the module.
If all owner controllers break their connections to the input module, all controllers with listen-only connections no
longer receive multicast data.
connection can be connected to an output module. If another controller attempts to establish an owner connection,
the connection attempt is rejected.
only connections to that module. These controllers can receive multicast data while another controller owns the
module. If the owner controller breaks its connection to the output module, all controllers with listen-only
connections no longer receive multicast data.
82Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
• 1756-CN2, 1756-CN2R, 1756-CN2RTXT any series modules.
• 1756-CNB, 1756-CNBR series D or later communication modules.
Digital I/O modules can be added as rack-optimized connections if the parent module is already configured with rack-optimized connections. While you can
add a new digital I/O module to an existing rack-optimized connection, you cannot add rack-optimized connections while online. Digital I/O modules can
also be added as direct connections.
Analog I/O modules can be added only as direct connections.
Disable the Change of State (COS) feature on digital input modules because it can cause inputs to be sent more quickly than the RPI.
If you plan to add large amounts of I/O to the ControlNet network, dedicate one ControlNet network for I/O. For the dedicated ControlNet network, verify
that there is little or no:
• HMI traffic.
• MSG traffic.
• Programming workstations.
If the module has a Real Time Sample (RTS), disable it or set to a rate that is greater than the RPI.
Considerations for 1756-CN2, 1756-CN2R, 1756-CN2RXT Modules
You can add I/O modules until you reach these limits:
• 80% of CPU utilization of the 1756-CN2, 1756-CN2R, or 1756-CN2RXT communication module.
• Less than 400,000 unscheduled bytes per second are displayed in RSNetWorx™ for ControlNet software after the network has been scheduled.
Considerations for 1756-CNB, 1756-CNBR Modules
Requested Packet Intervals (RPIs) faster than 25 ms for unscheduled modules can overload the 1756-CNB or 1756-CNBR communication module. To avoid
the overload, make these considerations:
• Use a NUT of 10 ms or more.
• Keep the SMAX and UMAX values as small as possible.
You can add I/O modules until you reach these limits:
• 75% of CPU utilization of the 1756-CNB or 1756-CNBR communication module.
• Plan for a CPU-use increase of 1...4% of the 1756-CNB or 1756-CNBR module for each I/O module you add, depending on RPI.
• 48 connections on the 1756-CNB or 1756-CNBR communication module.
• Less than 400,000 unscheduled bytes per second are displayed in RSNetWorx for ControlNet software after the network has been scheduled.
EtherNet/IP networkThe EtherNet/IP I/O modules that you add at runtime can be:
• Added to existing rack-optimized connections
• Added to new rack-optimized connections
• Added as direct connections (you can create rack-optimized connections when adding EtherNet/IP I/O modules at runtime)
You can add I/O modules until you reach the limits of the communication module.
You can add modules when the controller is in Run mode.
RSLogix 5000 SoftwareSupport for Online Addition of Modules
Version 15 and laterAdd 1756 I/O modules to the local chassis, remotely via the unscheduled portion
Version 17 and laterAdd a 1757-FFLDC module remotely via the unscheduled portion of a ControlNet
of a ControlNet network, and remotely via an EtherNet/IP network.
network.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201583
Chapter 6Communicate with I/O
Add Modules at Runtime/Online
Module Type and
Connection Method
In Local ChassisRemote via a ControlNet NetworkRemote via an
EtherNet/IP Network
OfflineRuntime
(1)
OfflineRuntime
(1)
Offline Runtime
Configure Hold Last
Output State
(1)
Offline only
Scheduled Unscheduled ScheduledUnscheduled
Motion - directYesNoN/AN/AN/AN/AN/AN/AN/A
Digital - directYesYesYesYesNoYesYesYesYes - 1756 I/O digital
output modules
Digital - rack-optimizedN/AN/AYesNoYesNoYesYesYes - 1756 I/O digital
output modules
An alog - dir ectYe sYesYe sYe sNoYe sYesYesYes
Generic third party - directYesYesYesYesNoYesYesYesN/A
1756-DNBYesNoYesNoNoNoYesYesN/A
1756-DHRIOYesNoYesNoNoNoYesYesN/A
1756-CNx - no connectionYesYesYesYesNoYesN/AN/AN/A
1794 FLEX™ I/ON/AN/AYesYesNoNoYesNoYes - Analog output
modules only
POINT I/O™N/AN/AYesYesNoNoYesNoYes
(3)
(1) Support for I/O modules added wi th RSLogix 5000 software, version 15.00.00.
(2) Support for 1757-FFLDC devices added w ith RSLogix 5000 software, version 17.00.00.
(3) When you lose communication to the controller, POINT I/O modules ignore the last output state configuration, an d set the outputs to zero.
84Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Communicate with I/OChapter 6
Design Considerations for Runtime/Online Addition of Modules
When you design your network, address these considerations to add modules at
runtime.
Design IssueConsiderations
I/O modulesWhen planning to add 1756 I/O modules at runtime, leave space in the local chassis, remote chassis on a ControlNet network, or remote chassis
Other modulesYou can add 1757-FFLDC devices remotely via the unscheduled portion of a ControlNet network at runtime.
Input transmission rateMake sure the RPIs work for the data you want to send and receive.
Network topologyOn a ControlNet network, install spare taps so you can add modules at runtime without disrupting the network. Each tap must be terminated
Network configurationOn a ControlNet network, plan which communication can be scheduled or unscheduled.
Network performanceYou can add modules at runtime until you impact the capacity of the communication module.
on an EtherNet/IP network for the I/O modules you want to add.
Make sure the added I/O does not depend on change of state data.
so as to not ground out the system. Check ControlNet system requirements to determine how many spare taps your network can support.
• In a ControlNet network with redundant cabling, you can break the trunk and add a tap, but redundant cabling is lost during the module
installation.
• In a ControlNet ring, add a drop off the ring or add new nodes off the coax and disrupt only part of the network.
• You could remove an existing node and add a repeater off that drop. Then reconnect the existing node and add any new nodes off the new
segment.
On an EtherNet/IP network, reserve some connec tion points on the switch so that you can connect additional nodes or switches in the future.
On an EtherNet/IP network, all communication is immediate and occurs based on a module’s RPI (also referred to as unscheduled).
If you know that you need a new chassis with digital modules in the future, configure the network and add it to the I/O configuration tree as
rack optimized. Then inhibit the communication adapter until you need the chassis.
Make sure that you have sufficient communication modules for the connections you plan to add.
For more information, see the Runtime/Online Addition of ControlLogix
(1756) I/O Over ControlNet and EtherNet/IP White Paper,
publication LOGIX-WP006
.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201585
Chapter 6Communicate with I/O
Notes:
86Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Chapter 7
Determine the Appropriate Network
EtherNet/IP™, ControlNet™, and DeviceNet™ networks share a universal set of
communication services. These are the recommended networks for Logix
control systems.
Connects low-level devices directly to
plant-floor controllers—without
interfacing them through I/O modul es
Sensors
Motor starters
Drives
PCs
Push buttons
Low-end HMIs
Bar code readers
PLC processors
Valve manifolds
Small packets; data is sent as needed
Supply power and connectivity to
low-level devices.
Follow these guidelines when planning a network.
Design IssueConsiderations
Network topologyPlan for future connections.
Plan for additional controllers and/or communication modules to handle future I/O modules.
Consider distances between devices.
Determine resiliency requirements.
Network configurationOn a ControlNet network, plan which communication can be scheduled or can be unscheduled.
On an EtherNet/IP network, all I/O communication is based on a the RPI of the module.
Network performanceMake sure that you have sufficient communication modules for the connections you plan to use.
Use available network performance tools.
ChassisConsolidate communication connections for multiple modules to one network node. Group digital I/O modules into a rack-optimized
Input transmission rateMake sure the RPIs work for the data you want to send and receive.
connection to reduce the amount of communication and network bandwidth.
Make sure that I/O added at runtime does not depend on change of state data.
For more information about planning for adding I/O modules at runtime/
online, see Runtime/Online Addition of Modules
on page 83.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201587
Chapter 7Determine the Appropriate Network
Ring with
Switches
Linear
Star
Redundant Star
Device Level Ring
Switch
D
D
D
Switch
DDD
D
DDD
D
DDD
EtherNet/IP Network Topology
EtherNet/IP NetworkTopology
• An EtherNet/IP network supports messaging, produced and consumed tags, and
distributed I/O
• An EtherNet/IP network supports half-duplex/full-duplex, 10 Mbps or
100 Mbps operation
• An EtherNet/IP network requires no network scheduling
• There are several methods available to configure EtherNet/IP network parameters for
devices. Not all methods are always available. These methods are device and configuration
dependent:
– DHCP
– Rockwell Automation BOOTP/DHCP utility
– RSLinx software
– Logix Designer application
– RSNetWorx™ for EtherNet/IP software
– Web b rowser
– SNMP tools
Application Ideas
• Connectivity to commercial devices (such as cameras and phones)
• Business systems with remote access or sharing data
• Applications with motion or safety on the same network.
• Plant management (material handling)
• Configuration, data collection, and control on a high-speed network
• Time-critical applications with no establis hed schedule
• Inclusion of commercial technologies (such as video over IP)
• Internet/Intranet connection
88Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Determine the Appropriate NetworkChapter 7
Required or RecommendedSwitch Feature
RequiredFull-duplex capability on all ports
Recommended• VLAN
• Autonegotiation and manually configurable speed/duplex
• Wire-speed switching fabric
• SNMP
• IGMP snooping constrains multicast traffic to ports associated with a
specific IP multicast group
• Port diagnostics
• Port mirroring (required for troubleshooting)
• STP for loop prevention
• QoS
• Network Address Translation (NAT )
Guidelines for EtherNet/IP Networks
GuidelineDescription
Use these publications.• EtherNet/IP Network Configuration User Manual, publication ENET-UM001
Make sure that the switch has the required features.For EtherNet/IP control, use an industrial-grade switch.
Data transmission depends on the controller.The type of Logix5000 controller determines the data transmission rate.
You can add I/O modules at runtime.With Logix controller firmware, revision 15, you can add 1756 I/O modules to remote chassis connected via an
Data transmission rate depends on the RPI.An EtherNet/IP network broadcasts I/O information to the controller based on the RPI setting. With change of state (COS)
Select unicast EtherNet/IP communication whenever
possible.
Network Address Translation (NAT)Network Address Translation is a service that can translate a packet from one IP address to another IP address. NAT
• ControlLogix and SoftLogix controllers transmit data at the RPI you configure for the module.
• CompactLogix controllers transmit data at powers of 2 ms (such as 2, 4, 8, 16, 64, or 128). For example, if you specify
an RPI of 100 ms, the data actually transfers at 64 ms.
EtherNet/IP network to a running controller. You can configure direct or rack-optimized connections. For more
information see Runtime/Online Addition of Modules on page 83.
enabled and:
• No data changes, the EtherNet/IP module produces data every RPI.
• Data changes, the EtherNet/IP module produces data at a maximum rate of RPI/4.
To reduce bandwidth use and preserve network integrity, some facilities block multicast Ethernet packets. Multicast is a
more efficient method for transmitting data with multiple consumers and redundancy applications.
You can configure multicast or unicast connections for:
• Produced and consumed tags by using the Logix Designer application
• I/O modules by using the Logix Designer application.
Unicast connections help with the following:
• Letting produced and consumed tag communication span multiple subnets
• Reduce network bandwidth.
• Simplify configuration for EtherNet/IP network devices because of unicast default setting for the Logix Designer
application.
translates one IP address to another IP address via a NAT-configured switch. The switch translates the source and
destination addresses within data packets as traffic passes between subnets.
This service is useful if you reuse IP addresses throughout a network. NAT enables devices that share one IP address on a
private subnet to be segmented into multiple identical private subnets while maintaining unique identities on the
public subnet. The terms private and public differentiate the two networks on either side of the NAT device. The terms do
not mean that the public network must be Internet routable.
The implementation of NAT in Stratix™ switches is distinct in these ways:
• One-to-one NAT—The switch uses one-to-one NAT, rather than one-to-many NAT. One-to-one NAT requires that
each source address translates to one unique destination address. Unlike one-to-many NAT, multiple source addresses
cannot share a destination address.
• Layer 2 implementation—The implementation of NAT operates at the Layer 2 (MAC) level. At this level, the switch
can replace only IP addresses and does not act as a router.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201589
Chapter 7Determine the Appropriate Network
Guidelines for Switches in EtherNet/IP Systems
Use a Managed SwitchUse an Unmanaged Switch
• The EtherNet/IP control system is directly connected to the business system via a
switch or router. Proper segregation of the control and business network is always a
good design practice.
• The system has non-Rockwell Automation EtherNet/IP devices that are connected on
the network (except for personal computers). These devices can fail to properly handle
the multicast traffic that is generated by the I/O devices.
• If the system performs troubleshooting. For troubleshooting, you need port mirroring,
which is only supported with a managed switch.
If you use an unmanaged switch, you give up these features:
• Switch port diagnostics
• Port mirroring
• Forced duplex speed
• SNMP
• IGMP snooping
• Web browser to view configuration and diagnostics
• STP or loop prevention
• QoS for network prioritization
In I/O Systems—Only in These Cases
• In an isolated EtherNet/IP architecture, the control system is not directly connected to
the business system. Or, the control system is connected to the business system via a
ControlLogix gateway (for example, a ControlLogix chassis contains two 1756-ENBT
modules; one is connected to the control system and the other is connected to the
business system).
• The EtherNet/IP control system contains only Rockwell Automation devices (except for
personal computers).
• Traffic loading through each device (in packets/sec) is less than the capacity of each
device.
In Non-I/O Systems
• The EtherNet/IP traffic on the network consists of messaging only (MSG instructions,
HMI, program upload/download).
Determine Whether Your System Operates Properly
Rockwell Automation EtherNet/IP devices have embedded diagnostic
web pages.
On this web pageLook for
Ethernet Statistics page
• All media counters
• In Error and Out Error counters
• Rejected Packets counter
Diagnostic Overview page• An absence of connection timeouts.
Numbers near zero (0) and not incrementing.
• Packets/sec counts that are within the capacity of each device.
• MISSED counter-values that are under I/O Packet Counter Statistics that are zero.
If connections frequently break or if HMIs appear to update slowly, reduce traffic
loading. If the situation is multicast-related, it can also help to use managed
switches with IGMP snooping.
90Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Stratix Industrial Switches
Shared I/
O
I/O
I/OI/O
I/O
CPUCPU
ControlNet Network
ControlNet Network
ControlNet Network
SwitchDescription
Stratix 8000™ and 8300 - modular managed with Cisco
technology
Stratix 5700™ - managed • Compac t size
Stratix 6000™ - fixed managed • Optimized for the plant floor
Embedded technology• Two Ethernet ports that are embedded in Allen-Bradley products
Stratix 2000™ - fixed unmanaged • Compact s ize
• Optimized for the enterprise and plant floor
• Stratix 8000 for layer 2; Stratix 8300™ for layer 3 routing capability
• IT friendly - Cisco operating system, feature set, and user interface
• 1783-ETAP, 1783-ETAP1F, 1783-ETAP2F – Ethernet tap modules for connectivity to single-port devices
• IP20 versions
• No configuration required
Determine the Appropriate NetworkChapter 7
ControlNet Network Topology
ControlNet NetworkTopology
• A ControlNet network lets both I/O and messaging on the same wire.
• Multiple controllers and their respective I/O can also be placed on the same
ControlNe t wire.
• When new I/O is added, or when the communication structure on an existing I/O module
change s, you must use RSNet Worx f or ControlNet s oftware to reschedule the network.
• If the network timing changes, every device with scheduled traffic on the network
is affected.
• To reduce the impact of changes, place each CPU and its respective I/O on isolated
ControlNet networks.
• Place shared I/O and produced/consumed tags on a common network available to each
CPU that needs the information.
• Built-in redundant cabling supports I/O network and provides HMI switchover in
redundant ControlLogix system.
Application Ideas
• Default Logix network
• Best replacement for Universal Remote I/O
• Backbone to multiple distributed DeviceNet networks
• Peer interlocking network
• Common devices include: Logix5000 controllers, PanelView terminals, I/O modules,
and drives
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201591
Chapter 7Determine the Appropriate Network
Guidelines for ControlNet Networks
GuidelineDescription
Use these publications.• ControlNet Coax Media Planning and Installation Guide, publication CNET-IN002
Adjust the default RSNetWorx for ControlNet settings.Change these settings in the RSNetWorx for ControlNet software:
Design for at least 400 KB of available, unscheduled
network bandwidth, as displayed by RSNetWorx for
ControlNet soft ware.
Place DeviceNet (1756-DNB) communication modules in
the local chassis.
Limit 1756-CNB, 1756-CNBR connections.For best performance, limit the 1756-CNB, 1756-CNBR to 40...48 connections. Add additional 1756-CNB, 1756-CNBR
For additional connections, consider the 1756-CN2, 1756CN2R, 1756-CN2RXT modules.
If you change network settings, resave each controller
project.
You can add I/O modules at runtime.With Logix controller firmware, revision 15, you can add 1756 I/O modules and some drives to remote chassis connected
Data transmission depends on the controller.The type of Logix5000 controller determines the data transmission rate.
• ControlNet Fiber Media Planning and Installation Guide, publication CNET-IN001
• ControlNet Network Configuration User Manual, publication CNET-UM001
• UMAX (highest unscheduled node on the network)
– Default is 99
– The network takes the time to process the total number of nodes that are specified in this setting, even if there are
not that many devices on the network
– Change to a reasonable level to accommodate the active network devices and additional devices that can be
connected
• SMAX (highest scheduled node on the network)
– Default is 1
– This must be changed for all systems
– Set SMAX < UMAX
Leaving too little bandwidth for unscheduled network communication results in poor message throughput and slower
workstation response.
Unscheduled data transfers on ControlNet occur asynchronous to the program scan and support a maximum of 510
bytes/node per ControlNet NUT.
DeviceNet (1756-DNB) communication modules have multiple, 500-byte data packets that impact scheduled bandwidth.
Placing these modules in the same chassis as the controller avoids this data being scheduled over the DeviceNet network.
If you must place these communication devices in remote chassis, configure the input and output sizes to match the data
that is configured in RSNetWorx for DeviceNet software. This reduces the amount of data that must be transmitted.
modules in the same chassis if you need more connections. To improve system performance, you can add more modules
and split connections among the modules.
If the chassis that contains the CNB module also contains multiple digital I/O modules, configure the CNB communication
format for Rack Optimization. Other wise, use None.
As a cost savings measure, use 1756-CNB, 1756-CNBR modules in chassis that contain only I/O modules for traditional
adapter functionality. Use the 1756-CN2, 1756-CN2R, 1756-CN2RXT modules in the same chassis as the controller for
traditional scanner functionality.
The 1756-CN2/B, 1756-CN2R/B, 1756-CN2RTXT communication modules each support 131 connections, and have higher
performance than previous modules.
The 1756-CN2/A, 1756-CN2R/A communication modules each support 100 connections.
Any time that you edit the network with RSNetWorx for ControlNet software and you save or me rge your edits, connect to
each controller in the system with their respective project file and perform a save and upload. This copies the ControlNet
settings into the offline, database file and makes sure that future downloads of the controller permit it to go online
without having to run RSNetWorx for ControlNet software.
via ControlNet to a runnin g controller. It is recommended to use a 1756-CN2/B, 1756-CNB2R/B, or 1756-CN2RXT module
as the traditional scanner in these applications.
• ControlLogix and SoftLogix controllers transmit data at the RPI you configure for the module.
• CompactLogix controllers transmit data at powers of 2 ms (such as 2, 4, 8, 16, 64, and 128). For example, if you specify
an RPI of 100 ms, the data actually transfers at 64 ms.
92Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Guidelines for Unscheduled ControlNet Networks
Additional 1756-CNB, 1756-CNBR Loading
RPI (ms)
Additional CNB Loading %
Maximum Number of I/O Modules in an Unscheduled Network
RPI (ms)
Number of Unscheduled Modules
GuidelineDescription
You can run an entire ControlNet network as unscheduled. An unscheduled ControlNet network:
• provides for easier network configuration.
• is useful if your I/O updates needs are slower.
• supports the addition of 1756 I/O modules and some drives without placing the controller in Program mode.
• provides an HMI network with fast switchover times in a redundant controller system.
You still must run RSNetWorx for ControlNet software at least once to configure NUT, SMAX, UMAX, and media
configuration settings.
Plan appropriately if you place I/O on an unscheduled
ControlNet network.
1756-CNB, 1756-CNBR only
Set the RPI at 25 ms or slower.
Follows these recommendations for I/O on an unscheduled ControlNet network:
• A 1756-CN2, 1756-CN2R series B or later, or a 1756-CN2RXT is recommended.
• Disable the Change of State (COS) feature on digital input modules because it can cause inputs to be sent faster than
the RPI.
• Set the real-time sample (RTS) on analog cards slower than the RPI
• Dedicate a ControlNet network to I/O only.
• Do not exceed 80% utilization of a 1756-CN2, 1756-CN2R, 1756-CN2RXT communication module.
• Do not exceed 75% utilization of a 1756-CNB, 1756-CNBR communication module.
• Have no more than 48 connections on the 1756-CNB, 1756-CNBR communication module.
• Use a NUT of 10 ms or more.
• Keep the SMAX and UMAX values as small as possible.
Use RPI of 25 ms or slower for unscheduled modules to avoid overload on the 1756-CNB, 1756-CNBR communication
module. Depending on the RPI, the communication module loading increases 1…4% for each I/O module added.
Determine the Appropriate NetworkChapter 7
1756-CNB, 1756-CNBR only
The RPI affects how many I/O modules you can have.
This chart shows the number of modules and associated RPIs so that you do not exceed 75% utilization of the 1756-CNB,
1756-CNBR communication module.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201593
Chapter 7Determine the Appropriate Network
DeviceDeviceDeviceDevice
Single Network
Device
ScannerCPU
Device
Linking
Device
DeviceDevice
CPU
Device
Linking
Device
DeviceDevice
Several Smaller Distributed Networks (Subnets)
Compare Scheduled and Unscheduled ControlNet Communication
Scheduled ControlNet CommunicationUnscheduled ControlNet Communication
DeterministicLess deterministic than scheduled communication
Provides simpler ControlNet installations when scheduled networks are not required
To add scheduled I/O on the ControlNet network, you must:
• Add the I/O to an offline controller project.
• Download the project to the controller.
• Run RSNetWorx to schedule the network requires network to be scheduled (must stop
the network and put the controller in Program mode to schedule a network).
• Save the controller project.
RPI and NUT determine module communication ratesRPI determines module communication rates
MSG and HMI traffic can occur on the same network because they are isolated in
unscheduled traffic
MSG and HMI traffic do not affect I/O communication
Direct and rack-optimized connections to I/OOnly direct connections to I/O (results in being able to use fewer total I/O modules
Supports any firmware revision of a ControlNet communication moduleYou can use any 1756-CN2, 1756-CN2R, 1756-CN2RXT communication module
Supports any I/O platform that can communicate via a ControlNet networkSupports only 1756 I/O modules
Can be changed online without impacting the schedule
New modules can affect other modules communicating via unscheduled bandwidth
Supports 1756 I/O modules and some drives
Recommend 1756-CN2, 1756-CN2R, 1756-CN2RXT
Recommend a dedicate ControlNet network for only I/O modules
MSG and HMI traffic can affect I/O communication
because of the connection limits of controllers and communication modules)
If you use a 1756-CNB, 1756-CNBR communication module, it must be series D or later
DeviceNet Network Topology
DeviceNet NetworkTopology
• You need a DeviceNet scanner to connect the controller to
DeviceNet devices.
• You must use RSNetWorx for DeviceNet software to configure
devices and create the scanlist for the scanner.
• You can configure the network communication rate as 125
Kbps (default and a good starting point), 250 Kbps, or 500
Kbps.
• If each device on the network (except the scanner) sends 4
bytes of input data and receives 4 bytes of output data, you
can use AutoScan to configure the network.
Application Ideas
• Distributed devices
• Drives network
• Diagnostic information
94Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Determine the Appropriate NetworkChapter 7
Guidelines for DeviceNet Networks
GuidelineDescription
Use these publications.• DeviceNet Cable System Manual, publication DNET-UM072
Use the DeviceNet Tag Generator tool.The Logix Designer application includes a DeviceNet tag generator tool that creates device-specific structured tags and
Place DeviceNet (DNB) communication modules in the
local chassis.
Verify the total network data does not exceed the
maximum DNB data table size.
Set up slaves first.Configure a device’s parameters before adding that device to the scanlist. You cannot change the configuration of many
Leave node address 63 open to add nodes.Devices default to node 63 out-of-the-box. Leave node address 63 unused so you can add a new devices to the network.
Leave node address 62 open to connect a computer.Always leave at least one open node number to let a computer be attached to the network if needed for troubleshooting
Don’t forget to set the scanner run bit.For the scanner to be in Run mode, the controller must be in Run mode and the logic in the controller must set the
• DeviceNet Network Configuration User Manual, publication DNET-UM004
logic based on the net work configuration in RSNetWorx for D eviceNet software.
The logic copies data to and from the DNB data array tags to the device tags so that data is presented synchronously
to program scan.
Placing DNB modules in the local chassis maximizes per formance, especially in ControlLogix systems.
Size the input and output image for the DNB modules to the actual devices that are connected plus 20% for future
growth. If you have to place DNB modules in remote chassis, sizing the input and output images is critical for best
performan ce.
A DNB supports:
• 124, 32-bit input words.
• 123, 32-bit output words.
• 32, 32-bit status words.
You can use RSNetWorx for DeviceNet software offline to estimate network data. Use a second DNB if there is more
network data than one module can support.
devices once they are already in the scanlist.
If you configure the scanner first, there is a chance that the scanner configuration cannot match the current configuration
for a device. If the configuration does not match, the device does not show up when you browse the network.
Then change the address of the new device.
or configuration.
scanner’s run bit.
Make sure you have the most current EDS files for
your devices.
RSNetWorx for DeviceNet software uses EDS file to recognize devices. If the software is not properly recognizing a device,
you are missing the correct EDS files) For some devices, you can create an EDS file by uploading information from the
device. Or you can get EDS files from: http://www.ab.com/networks/eds
.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201595
Chapter 7Determine the Appropriate Network
Notes:
96Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Chapter 8
Communicate with Other Devices
The MSG instruction asynchronously reads or writes a block of data to another
device.
If the target device is aSelect one of these message types
Logix5000 controllerCIP Data Table Read
CIP Data Table Write
I/O module that you configure with the Logix Designer
application
SERCOS driveSERCOS IDN Read
PLC-5 controllerPLC5 Typed Read
SLC controller
MicroLogix™ controller
Block transfer moduleBlock Transfer Read
PLC-3® processorPLC3 typed read
PLC-2® processorPLC2 unprotected read
Module Reconfigure
CIP Generic
SERCOS IDN Write
PLC5 Typed Write
PLC5 Word Range Read
PLC5 Word Range Write
SLC Typed Read
SLC Typed Write
Block Transfer Write
PLC3 typed write
PLC3 word ran ge read
PLC3 word range write
PLC2 unprotected write
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201597
Chapter 8Communicate with Other Devices
MSG and Block Transfer
Instructions
Communication
Handler
Data To and From
Logix5000 Controller
Incoming
Outgoing
Unconnected
Buffers
Controller
Connections
Connections
(Buffers)
Open/Close Connections
CIP Generic MSG
Unconnected MSG
Uncached Connected CIP MSG or Block Transfer
Cached Connected
MSG or Block Transfer
Cache Buffers
MSG Buffers
BT Buffers
Cache Messages
Some types of messages use a connection to send or receive data. Some also give
you the option to either leave the connection open (cache) or close the
connection when the message is done transmitting. This table shows messages
that use a connection and whether you can cache the connection.
Message TypeCommunication MethodUses Connection Can Cache
CIP data table read or writeCIPYesYes
PLC2, PLC3, PLC5, or SLC (all types)CIP
CIP with Source ID
DH+YesYes
CIP genericN/AYour option
Block transfer read or writeN/AYesYes
(1) You can connect CIP generic messages, but for most applications we recommend that you leave CIP generic messages unconnected.
(1)
Connection
You r opt ion
(1)
A cached connection remains open until one of the following occurs:
• The controller goes to Program mode.
• You rerun the message as uncached.
• Another message is initiated and a cached buffer is needed.
• An intermediate node in the connection goes down.
Message Buffers
A Logix5000 controller has buffers for unconnected messages and for cached
messages. Buffers store incoming and outgoing message data until the controller
can process the data.
98Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Table 5 - Message Buffer Guidelines
BufferDescription
Ten outgoing unconnected buffers
(20 on 1756-L7x controllers)
You can increase this to 40 by using a CIP Generic message
instruction. Each buffer that you add uses approximately
1.2 KB of I/O memory. See the MSG section in the Logix
5000 Controllers General Instructions Reference Manual,
publication 1756-RM003.
Three incoming unconnected buffersThe incoming unconnected buffers are for:
Cached buffers
Revision 12 and later firmware:
32 cached buffers for any combination of messages and
block transfers
Revision 11 and earlier firmware
16 cached buffers only for messages and 16 cached
buffers only for block transfers
The outgoing unconnected buffers are for:
• Establishing I/O connections to local I/O modules and remote devices on ControlNet, EtherNet/IP, and
remote I/O networks.
• Executing unconnected PLC2, PLC3, PLC5, or SLC (all types) messages over Ethernet/IP or ControlNet (CIP and CIP
with Source ID) networks.
• Initiation of messaging over a DH+ network (uses 2 buffers, one to open the connection and one to transfer data).
• Initiation of uncached block transfers.
• Initiation of uncached CIP read/write message instructions.
• Initiation of cached block transfers.
• Initiation of cached CIP read/write messages instructions.
• CIP Generic message instructions.
• Initial receiving of a cached CIP message instruction.
• Receiving an uncached CIP message instruction.
• Receiving a message over a DH+ network.
• Receiving a CIP Generic message instruction.
• Receiving a read or write request from a ControlNet PanelView™ terminal (unconnected messaging).
• Initial receiving of a read request from an EtherNet/IP PanelView terminal (connec ted messaging).
• Receiving a write request from an EtherNet/IP PanelView terminal (unconnected messaging).
• Receiving an initial request from the Logix Designer application to go online.
• Initial receiving of RSLinx connections.
The cached buffers are outgoing buffers for messages and block transfers. A cached connection helps message
performance because the connection is left open and does not need to be re-established the next time that it is
executed. A cached connection counts towards the total limit of connections for a controller. A cached connection is
refreshed at the connection RPI. All cached entries are closed when the controller transitions to Program mode.
With revision 12 and later firmware, you can cache 32 messages and block transfers (any combination). Previous
revisions of controller firmware let you cache 16 messages only and 16 block transfers only.
The first time a cached message is executed, it uses one of the 10 outgoing unconnected buffers. When the connection
is established, it moves into the cached buffer area.
For optimum performance, do not cache more messages or block transfers than there are cached buffers. If you cache
more than the available cached buffers, the controller looks for a connection that has been inactive for the longest
time, closes that connection, and lets a new connection take its place. The controller closes a cached message or block
transfer, depending on which has been inactive the longest. If all 32 cached connections are in use, the message is
executed as connected and, once it is completed, the connection is closed.
You can multiplex cached connections. If a connectio n is inactive and a message instruction executes that has the same
target and path, it uses that inactive connection. For example, if you have a block transfer read and write to the same
module, interlock the read and write so that only one is active at a time. Then when they are cached, they use the same
cached connection.
Communicate with Other DevicesChapter 8
Outgoing Unconnected Buffers
BuffersUse
1...10The first 10 buffers (default) are shared for unconnected messaging, initiating connected messaging, establishing I/O
11The 11th buffer is dedicated to establishing I/O and produced/consumed connections.
12...40The 12th to the 40th buffers are used only for initiating connected messages and executing unconnected messages. To
connections, and establishing produced/consumed connections.
increase the outgoing buffers to a value higher than 11, execute a CIP generic message to configure that change each time
you transition from Program mode to Run mode.
AB Drives
Rockwell Automation Publication 1756-RM094I-EN-P - September 201599
Chapter 8Communicate with Other Devices
Guidelines for Messages
GuidelineDescription
Message tags must exist as controller-scoped, base tags.The operating system accesses the information in a message tag asynchronously to the program scan. Along with the
You can have more than 32 messages in a program.The controller supports 32 active, cached messages at a time. If you determine that there are more than 32 messages, you
You can use a message to send a large amount of data.Even though there are network packet limitations (such as 500 bytes on ControlNet and 244 bytes on DH+), the controller
Do not manipulate the message status bitDo not change the following status bits of a MSG instruction:
visible fields within the message tag, there are hidden attributes that are only referenced by the background operating
system.
cannot cache all messages. You need extra programming to help ensure that no more than 32 messages are active
simultaneously.
Before controller revision 12, the controller supported 16 active, cached messages at a time.
can send a large amount of data from one MSG instruction. When configuring the message, select an array as the source/
destination tags and select the number of elements (as many as 32,767 elements) you want to send. The controller
automatically breaks the array into small fragments and sends all of the fragments to the destination. On the receiving
side, the data appears in fragments, so some application code can be required to detect the arrival of the last piece.
• DN
• EN
• ER
• EW
• ST
Do not change those bits either by themselves or as part of the FLAGS word. If you do, the controller can have a
nonrecoverable fault. The controller clears the project from its memory when it has a nonrecoverable fault.
Guidelines to Manage Message Connections
GuidelineDescription
Create user-defined structures or arrays.User-defined structures let you organize your data to match your machine or process.
Cache connections when appropriate.If a message executes repeatedly, cache the connection. This keeps the connection open and optimizes execution time.
• One tag contains all data that is related to a specific aspect of your system. This keeps related data together and easy
to locate, regardless of its data type.
• Each individual piece of data (member) gets a descriptive name. This automatically creates an initial level of
documentation for your logic.
• You can use the structure to create multiple tags with the same data layout.
• RSLinx can optimize user-defined structures more than standalone tags.
Opening a connection each time the message executes increases execution time.
If a message executes infrequently, do not cache the connection. This closes the connection upon completion of the
message, which frees up that connection for other uses.
The system overhead timeslice percentage you configure for the controller
determines the percentage of controller time (excluding the time for periodic and
event tasks) that is devoted to communication and background functions. This
includes sending and receiving messages.
For more information, see Select a System Overhead Percentage
on page 31.
100Rockwell Automation Publication 1756-RM094I-EN-P - September 2015
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.