CLXperf

advertisement
Application Guide:
ControlLogix Data Collection with RSLinx
Updated For RSLinx 2.30.02
Rockwell Software
Document Version: December.4
December 2001
INTRODUCTION............................................................................................................. 4
DESIGN TIPS FOR OPTIMAL PERFORMANCE ..................................................... 4
ENSURE RSLINX AND CONTROLLOGIX VERSIONS ARE CURRENT ENOUGH ...................... 4
HAVE ONLY ONE RSLINX COMMUNICATE TO ANY CONTROLLOGIX PROCESSOR ............. 4
USE RSLINX GATEWAY TO GET DATA INTO MANY STATIONS ....................................... 4
Leverage RSLinx Gateway Correctly.......................................................................... 5
MAXIMIZE CONTROLLOGIX COMMUNICATION POWER .................................................... 5
DESIGN CONTROLLOGIX TAGS WITH HMI IN MIND.......................................................... 6
KEEP TAGS ON SCAN ....................................................................................................... 6
DON’T POLL DATA TOO FAST ............................................................................................ 7
CONFIGURING RSLINX ............................................................................................... 8
TOPIC PARAMETERS ......................................................................................................... 9
Polled Messages.......................................................................................................... 9
Unsolicited Messages.................................................................................................. 9
Communications Time-Out ......................................................................................... 9
Use Symbols .............................................................................................................. 10
RSLOGIX 5000 AUTOMATICALLY CONFIGURES TOPICS IN RSLINX .............................. 10
UNDERSTANDING CONTROLLOGIX DATA COLLECTION ............................ 11
STEP-BY-STEP ................................................................................................................ 11
READ OPTIMIZATION ..................................................................................................... 13
Array optimization .................................................................................................... 13
Boolean Array Optimization ..................................................................................... 14
UDT optimization...................................................................................................... 14
Some scenarios regarding UDT optimization........................................................... 16
First Level or “Scattered” Optimization .................................................................. 16
How much data can be read in a ControlLogix Optimized Packet? ........................ 16
WRITE OPTIMIZATION .................................................................................................... 17
How to Use Write Optimization ................................................................................ 17
Array optimization for writes .................................................................................... 17
How many tags can be sent in a write packet to the ControlLogix? ........................ 17
Data Type .................................................................................................................. 17
Max. Items that fit into a Write Packet ..................................................................... 17
RSLINX “SMART” POLLING ........................................................................................... 18
HOW RSLINX USES CONTROLLOGIX CONNECTIONS ..................................................... 18
COMMUNICATION EVENT LOG ............................................................................. 21
GETTING RSLINX DATA INTO APPLICATIONS ................................................. 23
LOGIX5000 TAG IMPORT UTILITY - IMPORT CONTROLLOGIX TAGS INTO RSVIEW AND
RSSQL .......................................................................................................................... 23
BROWSING AND SELECTING CONTROLLOGIX TAGS ....................................................... 23
MISCELLANEOUS RSLINX FEATURES AND TIPS ............................................. 27
ControlLogix Data Collection with RSLinx
Version: December.4
Page 2
BACKUP/RESTORE RSLINX CONFIGURATIONS TO/FROM A FILE ................................... 27
CONTROLLOGIX DATA MONITOR .................................................................................. 28
RSLINX’S COPY DDE/OPC LINK SUPPORTS BROWSING CONTROLLOGIX TAGS ............ 29
GETTING MODULE INFORMATION IN RSLINX ................................................................ 30
APPLICATION NOTES ................................................................................................ 32
PUT TAGS ON SCAN AT THE SAME TIME ........................................................................ 32
KEEPING TAGS ON SCAN WHEN CHANGING SCREENS WITH RSVIEW ........................... 32
CHANGING CONTROLLOGIX TAGS WHILE ON SCAN ..................................................... 32
If the data types of already existing tags are changed: ............................................ 32
REDUNDANT RSLINX GATEWAY SERVERS WITH RSVIEW’S NODESWITCH COMMAND 33
REDUNDANCY FOR CONTROLLOGIX PROCESSORS.......................................................... 34
USING CONTROLLOGIX STRINGS ................................................................................... 34
PERFORMANCE ........................................................................................................... 35
NETWORK TYPE ............................................................................................................. 35
Comparison of Tags Per Second Throughput performance on different networks .. 35
CONNECTIONS ................................................................................................................ 36
1000 Integers ............................................................................................................ 37
5000 Integers ............................................................................................................ 37
SYSTEM OVERHEAD TIMESLICE ..................................................................................... 37
Using non-array-optimized items: ............................................................................ 37
Effects of the System Time Slice setting on item throughput- NO ARRAY OPTIMIZATIONS.................. 38
Using array-optimized items: ................................................................................... 38
Effects of the System Time Slice setting on item throughput- WITH ARRAY OPTIMIZATIONS .............. 38
System TimeSlice effects on Program Scan Time ..................................................... 40
Effects of the System Time Slice setting on item updates and program scan times
............................................................................................................................... 40
(No array optimizations) ....................................................................................... 40
ControlLogix Data Collection with RSLinx
Version: December.4
Page 3
Introduction
This document provides design tips, troubleshooting, application notes, and performance
data for performing data collection to ControlLogix processors with RSLinx.
Design Tips For Optimal Performance
Ensure RSLinx and ControlLogix versions are current enough
RSLinx and ControlLogix based controllers are continually enhanced to offer improved
data collection performance and features. Reference the chart below to ensure that you
are taking advantage of the various improvements.
Improvement
Minimum RSLinx Version Minimum ControlLogix
Firmware Version
First Level optimization
Array Optimization
UDT Optimization
String Support
Write Optimization
(Greatly enhances batch and
recipe downloads)
RSLinx 2.1*
RSLinx 2.2
RSLinx 2.2 SP1
RSLinx 2.3
RSLinx 2.30.02
4.41*
4.41
4.41
8.x
10.x
*You should have at least RSLinx 2.1 and ControlLogix firmware version 4.41 when
doing any data collection.
Have only one RSLinx communicate to any ControlLogix Processor
We highly recommend having only one RSLinx communicating to any ControlLogix
processor. RSLinx has been designed to optimize communications to so using more than
one RSLinx to any controller will bypass these optimizations and increase the
ControlLogix CPU and memory resources needed to communicate. These resources often
account for data acquisition performance bottlenecks.
It’s OK to have an RSLinx station communicate to more than one ControlLogix
processor. There is no physical limit on how many ControlLogix processors one RSLinx
can communicate to but there is a practical limit imposed by how many tags are being
acquired, workstation CPU resources, etc.
Use RSLinx Gateway To Get Data Into Many Stations
In many applications you may need to get ControlLogix data into several HMI, batch, or
other data collection stations. Leverage RSLinx Gateway to achieve data collection on
several stations without having each station communicate to ControlLogix controller(s)
directly. Each station will connect via Remote OPC to RSLinx Gateway. RSLinx
Gateway optimizes several data collection stations’ requests to the ControlLogix, which
minimizes communication burden. For example, if several stations request the same tag
ControlLogix Data Collection with RSLinx
Version: December.4
Page 4
RSLinx Gateway will only request it once from the ControlLogix and serve it up to each
of the data collection stations. There is no physical limit on how many Remote OPC
clients can connect to RSLinx Gateway.
Leverage RSLinx Gateway Correctly
This is very important. RSLinx Gateway to remote RSView or other remote data
collection applications is used differently than with RSLogix. For data collection, remote
OPC is used. This is achieved by configuring DDE/OPC topics on the RSLinx Gateway
and having the data collection stations connect via Remote OPC. Note that RSLinx will
not even be used on the data collection stations.
In contrast, RSLogix has to have a local RSLinx with a TCP driver that references a
driver on the RSLinx Gateway. Do not use this setup for data collection as it bypasses
RSLinx optimization and creates more communication burden on the ControlLogix.
Eliminate a single point of failure with redundant RSLinx Gateways – This is easily
done with having a backup RSLinx Gateway server available. If the RSLinx Gateway
server fails then all HMI stations can switch their data collection to the backup RSLinx
Gateway server. RSView for example has a simple nodeswitch command that will switch
the data collection from one RSLinx Gateway server to another. See the application Note
section of the document for an example.
TIP: One option to reduce hardware costs is to make one of the HMI stations the RSLinx
Gateway server or backup server.
Maximize ControlLogix Communication Power
The System Overhead Time Slice refers to how often the ControlLogix is able to perform
communications tasks. Communication is considered to be low-priority for the
ControlLogix controller, with higher priorities being placed on motion applications,
periodic tasks, and program scans. A 10% time slice (the default) means that for every
10msec of program scan, 1 msec. will be allocated to processing system overhead tasks
such as communications. For applications 10% is insufficient and you will need to
increase this time slice in order to obtain faster, more responsive data updates. Note that
the tradeoff here is allocating less time to program scans. This is a property inside the
ControlLogix processor and it set with RSLogix 5000.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 5
The “Advanced” tab of the Controller Properties in RSLogix5000, showing the “System
Overhead Time Slice” box.
Design ControlLogix tags with HMI in mind
Read about the various kinds of optimizations that RSLinx performs in this document and
take them into consideration when building data collection projects. For example,
building UDT’s and arrays in the ControlLogix processor to correspond to HMI screens
would be a good way to leverage RSLinx and ControlLogix optimization.
Keep Tags on Scan
When a data collection application puts tags on and off scan RSLinx must negotiate with
the ControlLogix processor and build up ControlLogix Optimized Packets. This accounts
for why it sometimes takes a while to get data when switching between HMI screens or
when starting up an HMI project. In many applications, its better to put all tags on scan
when the project starts. You’ll get the best optimization possible and little delay when
switching between HMI screens. Keeping all tags on scan will use more memory in the
ControlLogix processor but the communications performance will be steadier. Network
traffic will be higher but in many cases that’s not the bottleneck. If your HMI is
constantly putting tags on scan and taking them off, communications will be disrupted
often and you will not get the best optimization between RSLinx and the ControlLogix
processor. You may have to experiment with you particular setup to see what works best
for you.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 6
Don’t poll data too fast
Sometimes you can get better performance by not requesting data so fast. For example, if
you are collecting data every 10ms in an HMI application and updates are too slow try
backing off to collecting the data every 250-500ms or higher. HMI screens can’t update
every 10ms anyway and you will reduce the burden on the ControlLogix processor and
your data collection station.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 7
Configuring RSLinx
Configuring RSLinx to communicate to data collection applications involves creating a
Topic. The RSLinx setup is the same for DDE or OPC applications. For the best
performance we recommend that any ControlLogix processor should not use more than
one RSLinx for data collection. You’re communications will be less efficient if you
create topics on multiple RSLinx stations to the same ControlLogix processor. If several
data collection stations are going to be collecting data then use an RSLinx Gateway. Only
the RSLinx Gateway station will need to have a topic configured. OPC applications know
how to remotely connect to the RSLinx Gateway and collect data using its topic.
Here is the easiest way to create a topic. Note this assumes that a driver is already
configured for the relevant network. We will use Ethernet in this example.
Step 1: In the RSWho window right mouse click on the ControlLogix processor that you
want to configure a topic to. Select “Configure New DDE/OPC Topic”. The DDE/OPC
Topic Configuration dialog will open.
Configuring a topic with a right mouse click in RSWho.
Step 2: A topic with the name of the control program is created. The screen shot below
is of the Data Collection tab of the dialog. It contains some additional parameters that are
discussed below.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 8
RSLinx DDE/OPC Topic Configuration Dialog. Looking at the properties of a
ControlLogix topic
Topic Parameters
Polled Messages
A topic to a ControlLogix processor has to be configured for either polled or unsolicited
messages. Polled messaging should be used if you want RSLinx to poll the ControlLogix
processor for the requested data items. The polling interval specifies how often data items
are read from the controller. This is the interval for which DDE clients will be updated.
OPC clients will be updated at their requested intervals.
Unsolicited Messages
You have to configure a separate topic for unsolicited messages when you want the
ControlLogix processor to send the data to RSLinx via a message instruction. Unsolicited
data sent to RSLinx is passed onto any clients requesting the data items.
Communications Time-Out
This is the number of seconds RSLinx will wait for the processor to acknowledge a
request before RSLinx returns a time-out error to the client. You can increase the
ControlLogix Data Collection with RSLinx
Version: December.4
Page 9
Communications Time-Out for the topic if you are requesting a large amount of data, and
receiving a lot of time-outs in the RSLinx Communication event log. The timeout
message for ControlLogix is “CIP Messaging Error: a message timed out waiting for a
response.”
Use Symbols
This is where you associate the RSLogix 5000 .acd file to the topic for offline browsing.
This will allow you to configure your data collection applications offline since the list of
available tags is associated with the topic. You need to have RSLogix5000 v10 or higher
to use this feature.
Optimize Poke Packets – Enables/Disables write optimization. This option is enabled
by default when a new topic is created in RSLinx 2.30.02 and later. Make sure that this
option is enabled if you upgraded from a previous version of RSLinx and if you are going
to be sending batch/recipe downloads or any other data to the ControlLogix processor.
This option is only available for ControlLogix processors with firmware version 10.x or
above and RSLinx 2.30.02 or later.
RSLogix 5000 Automatically Configures Topics In RSLinx
When saving an .acd project in RSLogix 5000 (version 10 and higher) it will
automatically configure a topic in RSLinx for you. It will also associate the .acd file with
the RSLinx topic. This enables OPC browse aware applications to obtain a list of the
available ControlLogix processor tags when offline. This is useful when building an
RSView project when you don’t have access to the ControlLogix processor that the
project will communicate to.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 10
Understanding ControlLogix Data Collection
Data collection with ControlLogix processors is very different from PLC-5 and SLC
based controllers. Controller tags are structured as data tables in these legacy controllers
so RSLinx already has built in knowledge of the tag data types and how they are
structured. The ControlLogix tag and data type flexibility frees its users from such
restrictive data definitions and allows users to model their data meaningfully. This
flexibility introduces some overhead since RSLinx initially does not have any knowledge
of what tags are available and their data types.
When a data collection application initially requests data from a ControlLogix, RSLinx
will upload a list of all the available tags and their data types. RSLinx will keep this
information in memory. Each time an OPC or DDE application requests data, RSLinx
will determine how to request the data optimally to the ControlLogix packing up to 488
bytes worth of data into each request. Each of these requests from RSLinx to the
ControlLogix is referred to a ControlLogix Optimized Packet. The size of this packet is
limited by the size of a ControlNet packet, which is essentially the network that the back
plane of the 1756 chassis uses.
Step-by-Step
Reading ControlLogix data:
1. A data collection application puts tags on scan through RSLinx’s OPC or DDE
interfaces.
2. RSLinx uploads a list all of the available ControlLogix tags and their data types.
RSLinx stores this list in memory.
3. RSLinx builds ControlLogix optimized packets. Each optimized packet can hold
up to 488 bytes worth of data.
4. Once the packets are built, data can be delivered from RSLinx to data collection
applications via OPC or DDE. It can take several seconds to put several thousand
tags on scan.
Note: RSLinx 2.3 SP1 and ControlLogix firmware 10.x and above employ a faster
method of putting tags on scan and taking them off.
Tags taken off/put on scan: (Typically when switching HMI screens)
5. When tags are taken off scan RSLinx will remove those tags from their
corresponding ControlLogix Optimized Packets. RSLinx will re-optimize
whatever tags are on scan after the removal and recreate as few packets as
possible. All data from that ControlLogix will stop updating until re-optimization
is complete. The ControlLogix cannot send a packet of data while the contents of
the packet are changing.
6. When new tags are put on scan RSLinx will build new optimized packets. If the
tags are already on scan then RSLinx will simply get the data from the existing
ControlLogix Optimized Packets. This is where using RSLinx Gateway to serve
data to multiple data collection stations is more efficient over having several
independent RSLinx stations. The ControlLogix processor needs to build and
ControlLogix Data Collection with RSLinx
Version: December.4
Page 11
service one set on ControlLogix Optimized Packets for the RSLinx Gateway.
Multiple RSLinx stations would require the ControlLogix processor to build and
service a set of ControlLogix Optimized Packets to each RSLinx station, even
when each station is collecting the same data!
Adding, removing, or modifying tags in the ControlLogix processor while collecting
data:
Typically, data collection stations will be running while new programs are downloaded
and/or online changes are made to ControlLogix processors. If using a version of RSLinx
earlier then 2.30 then any change to the ControlLogix processor’s tags will require that
all data collection applications be stopped before the changes are made and then restarted
once the ControlLogix processor has been updated. RSLinx 2.30 has the capability of
detecting these changes but you need to manually instruct RSLinx to update the
ControlLogix tag information.
Improvements have been made to RSLinx 2.30.02 so that data collection can continue
largely uninterrupted when the tags inside of the ControlLogix processor change. RSLinx
now frequently checks the ControlLogix processor to see if any changes have been made
to its tags and in many cases automatically updates the ControlLogix tag information.
Here are some scenarios involving changing the ControlLogix tags while collecting data
with RSLinx 2.30.02.
1. Tags are added to the ControlLogix processor when online with RSLogix
5000:
RSLinx will detect that tags have been added to the ControlLogix processor, log
an event into the RSLinx communication event log, and then update the list of
available tags to include the newly added tags. Data collection stations can start
collecting data from the new tags without stopping the data collection project.
2. Tags are added to the ControlLogix processor by downloading an updated
program:
RSLinx will detect a download, log an event in the communication event log, and
refresh its list of available tags. Data collection will stop while a new program is
being downloaded and will resume when after the download. Data collection
stations can start collecting data from the new tags without stopping the data
collection project.
3. Tags are removed from the ControlLogix processor when online with
RSLogix 5000:
RSLinx will detect that tags have been removed from the ControlLogix processor,
log an event into the RSLinx communication event log, and then update the list of
available tags. All data collection projects should be stopped prior to making
these changes. Restart data collection after the tags are removed from the
ControlLogix processor. All items on scan while removing any tags from the
ControlLogix processor will cause all tags to stop updating until data collection
applications are restarted.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 12
4. Tags are removed from the ControlLogix processor by downloading an
updated program:
RSLinx will detect a download, log an event into the RSLinx communication
event log, and then update the list of available tags to no longer include the
removed tags. All data collection projects should be stopped prior to making these
changes. Restart data collection after the tags are removed from the ControlLogix
processor. All items on scan will stop updating after downloading a new program
into the ControlLogix processor that results in the removal of tags.
5. When the tags in the ControlLogix processor have their data types changed
or when alias tags are re-referenced:
All data collection projects should be stopped prior to making these changes.
Restart them after the data types of the tags in the ControlLogix processor have
changed. RSLinx cannot update this information while data collection is in
progress.
6. When arrayed tags in the ControlLogix processor are re-dimensioned in any
way:
All data collection projects should be stopped prior to making these changes.
Restart them after the data types of the tags in the ControlLogix processor have
changed. RSLinx cannot update this information while data collection is in
progress.
7. Changes of any kind to User Defined Types (UDT’s) whether adding,
deleting, or modifying it’s members in the ControlLogix processor:
All data collection projects should be stopped prior to making these changes.
Restart them after the data types of the tags in the ControlLogix processor have
changed. RSLinx cannot update this information while data collection is in
progress.
Read Optimization
Read optimization allows many tags to be read from the ControlLogix processor in fewer
requests. This conserves valuable ControlLogix CPU and memory resources as well as
minimizing network traffic. Requests from data collection applications to RSLinx are
optimized down to a fewer number of requests from RSLinx to the ControlLogix. These
fewer requests are each ControlLogix Optimized Packets. Without optimization each tag
request from data collection applications would correspond to a request from RSLinx to
the ControlLogix.
There are a few different levels of optimization. Namely UDT, Array, and First Level or
“Scattered”. RSLinx determines the kind of optimization used when tags are put on scan.
The next few sections discuss the different types of optimization.
Array optimization
This kind of optimization grabs several elements of an array and treats them as one item
in the controller. The benefits of this kind of optimization are often reduced as HMI
ControlLogix Data Collection with RSLinx
Version: December.4
Page 13
clients typically must request array elements individually and not a range of elements at
one time. In other words to get the most out of this optimization reference elements of an
array like this: INTArray[0],L10. Instead of INTArray[0], INTArray[1],…,INTArray[9].
If you are not able to use the L notation then array optimization will still occur between
the ControlLogix and RSLinx but there will be more resources used on the PC.
Requirements:
 One, two, or three-dimensional arrays of BOOLS, SINTS, INTS, DINTS, or
REALS.
 There is no option to set in RSLinx. Array optimization happens automatically.
 If the size of the array being requested exceeds 488 bytes then RSLinx will still
array optimize but just use more packets. Try to use tags like
Scenario:
INTArray[100] is defined. The following tags are requested: INTArray[0], INTArray
[20], and INTArray[90]. RSLinx will create a packet requesting all elements between
INTArray[0] and INTArray[90]. The ControlLogix will treat all of these array
elements as one item and one ControlLogix Optimized Packet will be used for
delivering these tags. If later on INTArray[60] is requested then RSLinx will already
have this on scan and no more overhead is needed to deliver the data.
Boolean Array Optimization
Starting with RSLinx 2.2 optimizations to Boolean arrays allow each individual Boolean
item as a single bit object, as opposed to a 32-bit object, as it had done previously. Using
this method, up to 3872 Booleans can fit into one ControlLogix Optimized Packet.
Previously, the maximum was 81 Booleans. When dealing with individual Boolean tags,
and not Boolean-array tags, the tags will still be treated 32-bit items, and only 81 items
will fit into a ControlLogix Optimized Packet.
UDT optimization
A UDT or User Defined Type is a custom data type in the ControlLogix processor. Users
create UDTs containing native data types like INTS, DINTS, FLOATS, other UDTs, and
etc. When elements of a UDT are requested from data collection applications and the
UDT Optimization option is enabled in RSLinx, RSLinx will grab the entire UDT
structure as one item from the ControlLogix processor. This reduces the ControlLogix
processor’s CPU and memory resources needed to serve up data. The more elements of
the UDTs that are used by data collection applications the better the performance. If a
minority of the UDT elements is on scan then it is inefficient for RSLinx to serve up the
entire UDT. In that scenario it would be wise to disable UDT optimization. UDT
optimization can be enabled or disabled for all ControlLogix processors/Topics. This
option cannot be set on a per topic basis. Here is how the option is set.
1. Open the CIP Options.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 14
2. The Optimize User Defined Data Types option is located via the Connection for
ControlLogix Processor tab in the CIP Options dialog.
RSLinx Configure CIP Options dialog
ControlLogix Data Collection with RSLinx
Version: December.4
Page 15
Some scenarios regarding UDT optimization
1. A UDT is larger than 488 bytes:
RSLinx will not perform UDT optimization, just “Scattered” optimization.
2. A UDT contains arrays of SINTS, INTS, DINTS, or REALS:
RSLinx will perform UDT optimization and grab the whole structure. If the UDT is
greater than 488 bytes then array optimization will be performed on any arrays.
“Scattered” optimization will be performed on the remaining elements.
3. An array of UDTs:
RSLinx will perform UDT optimization for each element of the array, building a
ControlLogix optimized packet for each UDT providing that the UDTs are less than 488
bytes.
4. A UDT contained in a UDT:
RSLinx will perform UDT optimization on the outer UDT providing that is less than 488
bytes.
First Level or “Scattered” Optimization
This is the default optimization that occurs when UDT or array optimization does not
apply. RSLinx packs up to 488 bytes worth of tags, which are scattered throughout the
ControlLogix into a ControlLogix Optimized Packet. This type of optimization uses more
ControlLogix CPU and memory than with UDT or array optimization.
How much data can be read in a ControlLogix Optimized Packet?
This table outlines how many items of each native ControlLogix processor data type can
fit into a ControlLogix Optimized Packet. Assumes RSLinx 2.2 and greater.
Data Type
Max. Items that fit into a Read Packet
Boolean
Boolean Arrayed
SINT
SINT Arrayed
INT
INT Arrayed
DINT
DINT Arrayed
REAL
REAL Arrayed
81
3872
81
81
121
243
81
121
81
121
ControlLogix Data Collection with RSLinx
Version: December.4
Page 16
Write Optimization
Write optimization enhances performance for batch or recipe downloads to the
ControlLogix processor. Often times the ControlLogix processor is so busy that write
requests occasionally time-out and the batch/recipe downloads fail. With write
optimization there will be fewer write requests generated from RSLinx to the
ControlLogix processor. Fewer write requests will reduce the work the ControlLogix
processor has to do to accept the batch/recipe downloads and will reduce the occurrence
of batch/recipe download failures.
Each write request from RSLinx to the ControlLogix processor is referred to as an
Optimized Network Write Packet. Before RSLinx 2.30.02 every single tag being written
to had to be sent in its own Optimized Network Write Packet. With write optimization
many tags being written to can be sent in fewer Optimized Network Write Packets. For
write optimization First Level or “Scattered” optimization is used for tags within the
ControlLogix processor that have little or no relation to each other. Write optimization
groups them together into as few Optimized Network Write Packets as possible.
Additionally, there is array optimization but no UDT optimization.
How to Use Write Optimization
The RSLinx topic communicating to the ControlLogix processor needs to have the
“Optimize Poke Packets Option” option enabled. See the Configuring RSLinx section for
details. Also, you should have ControlLogix firmware 10.x or higher.
Array optimization for writes
This is similar to array optimization for reads. Array elements can be optimized even
better as to allow more data to fit into an Optimized Network Write Packet. To take
advantage of array optimization, the array elements being written to must be contiguous
and the write must be issued as once command.
How many tags can be sent in a write packet to the ControlLogix?
Data Type
Max. Items that fit into a Write Packet
Boolean
Boolean Arrayed
SINT
SINT Arrayed
INT
INT Arrayed
DINT
DINT Arrayed
REAL
REAL Arrayed
32
32
32
469
30
234
26
117
26
117
ControlLogix Data Collection with RSLinx
Version: December.4
Page 17
These numbers are accurate for ControlLogix firmware versions 10.x and beyond.
Previous versions of the ControlLogix firmware would yield lower numbers since the
write optimized packets had to contain the actual tags names. Therefore, we recommend
using ControlLogix version 10.x or higher for the best performance. Versions prior to
RSLinx 2.30.02 do not support write optimization.
RSLinx “Smart” Polling
RSLinx smart polling reduces CPU utilization on the RSLinx system when collecting
data. If data is being requested faster than the controller and the network can possibly
send it (by using a very fast poll rate on a slower network, for example), RSLinx will
“back off” the excessive polling, and only poll the data from the processor at the rate it is
actually being sent. This feature is implemented in RSLinx 2.2 and higher. There are no
settings, this happens automatically.
How RSLinx Uses ControlLogix Connections
RSLinx uses connections, a dedicated communications pipe, when collecting data from a
ControlLogix. When reading data from a ControlLogix processor each ControlLogix
Optimized Packet makes use of a connection. It gets its connection from a pool of
connections that is shared by all ControlLogix Optimized Packets. The maximum number
of connections that are used in this pool is configurable but the default is four, which in
many cases is the optimal setting.
RSLinx’s use of connections when writing data to the ControlLogix processor is different
then reads. When writing data to the ControlLogix processor it has the ability to use one
connection or none at all for all writes. If writes to the ControlLogix processor are very
frequent (within 32sec. by default) or continuous then you are better off using a
connection for writes. If you are sending data less frequently then you should not use a
connection for writes. For example, if you had a batch\recipe running every few minutes
you would be better off not using a connection for writes.
Accessing the dialog for configuring the maximum number of read connections used per
ControlLogix and to enable/disable the use of connections for writes.
1. From the RSLinx main menu select Communications…Configure CIP Options.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 18
2. Select the Connections for ControlLogix Processor tab.
3. The maximum number of read connections that RSLinx will use for each
ControlLogix is set here. Also the option for enabling/disabling connections for
writes is on this dialog.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 19
RSLinx Configure CIP Options dialog
ControlLogix Data Collection with RSLinx
Version: December.4
Page 20
Communication Event Log
The RSLinx communication event log will populate with some events that may occur
while performing data collection. Some of these may be communications errors while
other may just indicate a potential problem. The contents of this log can be exported to a
text file.
1. How to access the communication event log from RSLinx’s main menu.
Opening up the Communication Event Log from RSLinx’s main menu
2. The events in the communication event log can be saved to a text file.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 21
RSLinx’s Communication Event Log
ControlLogix Data Collection with RSLinx
Version: December.4
Page 22
Getting RSLinx Data Into Applications
Logix5000 Tag Import Utility - Import ControlLogix Tags Into RSView
and RSSQL
Use the Logix5000 Tag Import utility to import ControlLogix tags from an L5K file into
RSView or RSSQL. The utility generates a csv file that RSView ME and RSView SE can
import from. It also generates a TSV file for RSSQL. RSView32 can import the tags
directly from the utility.
Download this utility and application note from Rockwell Software’s online
knowledgebase: A839 Logix 5000 Tag Import Utility for RSView32, RSView ME / SE
and RSSQL (RSView32)
Browsing and Selecting ControlLogix Tags
Another way of getting tags into applications is by browsing the available ControlLogix
tags and picking the tags of interest. The mechanism that allows this kind of support
RSView and RSSQL are examples of applications that support this OPCBrowse
interface. Note that you can browse the list of available tag online or offline.
Online - RSLinx directly queries the controller for a list of available tags.
Offline – RSLinx queries an RSLogix 5000 .acd file. A topic must be configured to Use
Symbols with the .acd file associated with it. RSLogix 5000 will automatically create this
for you when you save a project. This feature requires RSLinx 2.3 SP1 and RSLogix
version 10 and higher.
Here is an example of browsing ControlLogix tags in RSView.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 23
1. Create a new Node in RSView with these following settings:
Data Source should be “OPC Server”
The server name should be “RSLinx OPC Server”
The “In-Process” server type should be selected.
Do not specify an Access Path.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 24
2) In the RSView Tag Database, create a tag with the following settings:
-
Specify either an “Analog” or “Digital” tag type, as appropriate.
-
Select the data source of the tag to be of type “Device”.
-
For the Node Name, use the Node Name as created in step 1.
-
At this point, a box with three dots will appear next to the “Address” field.
(This is circled on the image below.) Click on this box.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 25
3) The OPC Address Browser window should now appear in RSView. From here,
you can select your RSLinx topic to your ControlLogix processor, and browse
through the address hierarchy to associate your tag with an address.
Browsing ControlLogix tags in RSView
ControlLogix Data Collection with RSLinx
Version: December.4
Page 26
Miscellaneous RSLinx Features and Tips
Backup/Restore RSLinx Configurations To/From A File
This utility can be accessed from the start menu. See the screenshot below for details. It
backups/restores all driver and topic configurations to/from a file.
Accessing the RSLinx Backup-Restore utility from the Windows Start Menu.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 27
ControlLogix Data Monitor
In RSLinx 2.2 or later, there is Data Monitor support for ControlLogix processors. Now,
with a right-mouse click on a ControlLogix processor in RSWho, you can choose the
“Data Monitor” option to monitor your tags. The data monitor is only available with
RSLinx Professional and RSLinx Gateway.
RSWho pop-up menu for the ControlLogix processor
ControlLogix Data Collection with RSLinx
Version: December.4
Page 28
ControlLogix Data Monitor
Tip: Right-mouse click a tag and select Copy To Clipboard. This will populate the copy
to clipboard dialog with the tag that you selected. This allows you to paste a hotlink into
Microsoft Excel or the tag name into another application. RSLinx will use an existing
topic but if none is configured then RSLinx will step you through the configuring one.
RSLinx’s Copy DDE/OPC link supports browsing ControlLogix Tags
Select Copy DDE/OPC Link from the RSLinx main menu
After making your tag selection, you will be able paste a DDE hotlink into Microsoft
Excel or just paste the tag name into another application. (Like VB for example)
ControlLogix Data Collection with RSLinx
Version: December.4
Page 29
Copy DDE/OPC Link dialog.
Getting Module Information in RSLinx
The easiest way of checking which firmware revision in the ControlLogix processor is to
perform the following steps:
(This will work in RSLinx 2.2 and higher)
1. Use the mouse to right-click a ControlLogix processor in RSWho, to bring up the
following pop-up menu.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 30
2. Choose the menu item “Device Properties,” to display a dialog with information on the
device.
This dialog will display the firmware version in the ControlLogix, in the field labeled
“Revision.” Here, we see the firmware version is 8.20. Note that this feature is supported
by most devices – not just ControlLogix processors.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 31
Application Notes
Many tech notes are available online from Rockwell Software’s knowledgebase. Many of
the topics in this section reference those tech notes by document number and title and are
also hyperlinked. Here is the general link to the knowledgebase.
http://support.rockwellautomation.com/
Put Tags on Scan at the Same Time
See tech notes from Rockwell Software’s online knowledgebase
A2062 ControlLogix communication packet optimization techniques and observations
(RSView32)
Keeping Tags On Scan When Changing Screens with RSView
Changing ControlLogix Tags While On Scan
Generally, It’s not a good idea to add/remove/change tags in the ControlLogix while
performing data collection. RSLinx uploads all of the ControlLogix tags and their data
types when the first tag gets put on scan. RSLinx uses this information to build the
ControlLogix Optimized Packets. If the tags in the ControlLogix change then RSLinx
will have to upload the new tag information. This may be done in the following ways:
If the data types of already existing tags are changed:
1. Shutdown all of the data collection applications. RSLinx does not have to be
shutdown and restarted. Computers do not have to be rebooted.
2. Restart the data collection applications after changes are made to the
ControlLogix.
If tags are added or removed from the ControlLogix controller – No data type
changes:
Option 1
1. Shutdown all of the data collection applications. RSLinx does not have to be
shutdown and restarted. Computers do not have to be rebooted.
2. Restart the data collection applications after changes are made to the
ControlLogix.
Option 2 and 3 do not require having to shutdown all of the data collection applications.
Option 2: (RSLinx 2.3 or later required)
1. Add/remove tags offline in RSLogix 5000
2. Download the program into the ControlLogix
3. RSLinx will log an event in the Communication Event Log and upload the new
tag information automatically. Data collection stations will resume data collection
after download is complete.
Option 3: (RSLinx 2.3 or later required)
ControlLogix Data Collection with RSLinx
Version: December.4
Page 32
1. Add/remove tags to/from the ControlLogix online while collecting data.
2. Manually command RSLinx to re-upload ControlLogix tags. This is done in one
of two ways:
a. Perform a read on the predefined item @CLTagUpdateAddressSpace
b. Select the option from RSLinx’s main menu under DDE/OPC
Redundant RSLinx Gateway Servers with RSView’s NodeSwitch
Command
See tech notes from Rockwell Software’s online knowledgebase.
R679 RSView32 6.30.16 Patch for switching between OPC nodes (RSView32)
ControlLogix Data Collection with RSLinx
Version: December.4
Page 33
Redundancy for ControlLogix processors
There are a few options of incorporating redundancy at the ControlLogix level into your
data collection system.
Option 1: Use hardware redundancy. This options will only work if your data collection
is over Controlrequires
Option 2: Use Alias Topics is RSLinx
Option 3: Use RSView’s node switch command.
See tech note from Rockwell Software’s online knowledgebase
A952 Node Level Redundancy - A comparison of the Alias Topic and the NodeSwitch
Command (RSView32)
Using ControlLogix Strings
The addressing syntax for a ControlLogix string data type is String.DATA,SC# (where #
is the number of characters). For example, use STRING.DATA,SC10 to read the first ten
characters of STRING.DATA. You must be at least RSLinx 2.3 and ControlLogix
firmware 8.x to take advantage of this feature.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 34
Performance
Network Type
System setup:
-
Dell computer, Pentium II 400, 128MB RAM, PCI Ethernet NIC card,
running Windows NT 4.0 (SP5)
RSLinx 2.2
Isolated Ethernet network (10Mbps), ControlNet network, DH+ network, DF1
connection.
1756-ENET module, 1756-CNB module, DHRIO module.
Logix5550 processor with firmware version 5.13
Test Procedure:
Several items were put on scan in the RSI OPC Test Client, using four different network
types. The group update rates are set to 1ms for all tests, so that RSLinx will poll for data
as fast as it can.
Default CIP options (4 connections) were used, a 50% Controller Time Slice was used.
Depending on which version of RSLinx you are using, and how your tags are set up,
either one of the two sets of data should be used for the appropriate comparison:
If you are using:
RSLinx 2.1 SP
RSLinx 2.1 SP, using tag requests with the “,L” specifier to
read the data in maximum size blocks.
RSLinx 2.2 with tags that cannot be array-optimized
RSLinx 2.2 with tags that can be array-optimized
Refer to the data for:
RSLinx 2.1 SP
RSLinx 2.2
RSLinx 2.1 SP
RSLinx 2.2
Comparison of Tags Per Second Throughput performance on different
networks
RSLinx 2.1 SP – No array optimizations
100 Integers
(approx. tags/sec)
3000
3000
700
300
Ethernet Card – Ethernet
KTC Card – ControlNet
PKTX Card – DH+
Serial Port – DF1
1000 Integers
~ 5000 Integers
(approx. tags/sec)
(approx. tags/sec)
4500
4600
800
300
4600
4600
900
350
100 Integers
1000 Integers
~ 5000 Integers
(approx. tags/sec)
(approx. tags/sec)
(approx. tags/sec)
RSLinx 2.2 – Using array optimizations
ControlLogix Data Collection with RSLinx
Version: December.4
Page 35
Ethernet Card – Ethernet
KTC Card – ControlNet
PKTX Card – DH+
Serial Port – DF1
7800
6300
1200
500
18000
20000
1500
600
23000
26000
1700
650
Connections
System setup:
-
Dell computer, Pentium II 400, 128MB RAM, PCI Ethernet NIC card,
running Windows NT 4.0 (SP5)
RSLinx 2.2
Isolated Ethernet network (10Mbps)
1756-ENET module
Logix5550 processor with firmware version 4.45
Test Procedure:
Several items were put on scan in the RSI OPC Test Client, the nature of the items are
described in each test. The group update rates are set to 1ms for all tests, so that RSLinx
will poll for data as fast as it can. The Packets per Second numbers were obtained via the
RSLinx Driver Diagnostics.
Depending on which version of RSLinx you are using, and how your tags are set up,
either one of the two sets of data should be used for the appropriate comparison:
If you are using:
RSLinx 2.1 SP
RSLinx 2.1 SP, using tag requests with the “,L” specifier to
read the data in maximum size blocks.
RSLinx 2.2 with tags that cannot be array-optimized
RSLinx 2.2 with tags that can be array-optimized
Refer to the data for:
RSLinx 2.1 SP
RSLinx 2.2
RSLinx 2.1 SP
RSLinx 2.2
From Section 8 of this document, we could conclude that using a 20% Time Slice would
be ideal when performing array-optimized reads. Anything above 20% would not yield
any significant performance enhancements. The following tests therefore use a 20%
System Time Slice for the RSLinx 2.2 tests. For comparison’s sake, the same throughput
tests were performed on RSLinx 2.1 SP2, using both the 20% Time Slice, and a
significantly higher 50% time slice. The results show that you can get much better
performance in RSLinx 2.2 using array optimizations, even with a greatly reduced
System Time Slice in your controller.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 36
100 Integers
Number of
connections:
1
2
4
8
12
RSLinx 2.1 SP2, 20%
Time Slice
(tags/second)
1500
1500
1500
1500
1500
RSLinx 2.1 SP2,
50% Time Slice
(tags/second)
2800
2800
2800
2800
2800
RSLinx 2.2,
20% Time Slice
(tags/second)
7800
7800
7800
7800
7800
Since all 100 items are placed in one ControlLogix Optimized Packet, only one
connection will ever be used, so varying the connections here doesn’t have any effect on
the system.
1000 Integers
Number of
connections:
1
2
4
8
12
RSLinx 2.1 SP2, 20%
Time Slice
(tags/second)
1556
1778
1889
1889
1889
RSLinx 2.1 SP2,
50% Time Slice
(tags/second)
3000
4333
4556
4556
4556
RSLinx 2.2,
20% Time Slice
(tags/second)
10400
15600
17600
18200
18200
In the RSLinx 2.1 SP, it is apparent that there is a bottleneck in the system, as increasing
the number of connections eventually stops having any effect at all on the throughput.
This has to do with the internal processing of the ControlLogix processor, having to
gather each individual integer to send as one packet.
5000 Integers
Number of
connections:
1
2
4
8
12
RSLinx 2.1 SP2, 20%
Time Slice
(tags/second)
1464
1830
1830
1830
1830
RSLinx 2.1 SP2,
50% Time Slice
(tags/second)
3050
4514
4514
4514
4514
RSLinx 2.2,
20% Time Slice
(tags/second)
11421
18225
22599
26001
26001
System Overhead Timeslice
Using non-array-optimized items:
ControlLogix Data Collection with RSLinx
Version: December.4
Page 37
Effects of the System Time Slice setting on item throughput- NO ARRAY OPTIMIZATIONS
4880 individual native tag integers on scan (optimized into 40 packets of exactly 122 integers each)
Network: Ethernet
Using 8 connections
TimeSlice
Packets Per Second
12
Items Per Packet
122
Item per second throughput
10%
20%
30%
22
31
122
122
2684
3782
40%
50%
39
47
122
122
4758
5734
60%
70%
56
64
122
122
6832
7808
100% (program mode)
88
122
10736
1464
Using array-optimized items:
Effects of the System Time Slice setting on item throughput- WITH ARRAY OPTIMIZATIONS
4860 individual native tag integers on scan (optimized into 20 packets of exactly 243 integers each)
Network: Ethernet
Using 8 connections
TimeSlice
Packets Per Second
Items Per Packet
Item per second throughput
10%
20%
69
105
243
243
16767
25515
30%
40%
106
107
243
243
25758
26001
50%
60%
107
107
243
243
26001
26001
70%
100% (program mode)
107
130
243
243
26001
31590
ControlLogix Data Collection with RSLinx
Version: December.4
Page 38
Here are the results of the test in a graphical format:
Using array optimizations in RSLinx 2.2, a point can be reached where the processor is
sending the data as fast as it is able to. This can be seen in the graph where the arrayoptimized item throughput levels off as the System Time Slice is increased.
To demonstrate how the System Time Slice will even affect performance on system
configurations with a smaller amount of tags on scan, and to also demonstrate the Time
Slice’s effect on program scan time, the following test was performed:
488 individual integers were placed on scan via the OPC Test Client. The number of
ControlLogix connections was held at the RSLinx default of 4. With a varying System
Time Slice, both the update rate obtained on the items, and the (approximate) minimum
and maximum Logix5550 program scan times were observed.
ControlLogix Data Collection with RSLinx
Version: December.4
Page 39
System TimeSlice effects on Program Scan Time
Effects of the System Time Slice setting on item updates and program scan times
(No array optimizations)
488 individual native tag integers on scan (optimized into 4 packets of exactly 122 integers each)
Network: ControlNet
Using 4 connections
TimeSlice
10%
20%
30%
40%
50%
60%
70%
Updates per Item
(per second)
1.8
4.1
6.3
8.4
10.8
12.8
14.8
Min. Program Scan Time
12.7
13.8
16.5
19.7
23.8
30.8
42.7
Max Program Scan Time
14.4
15.7
18.1
21.8
25.8
33.1
45.6
ControlLogix Data Collection with RSLinx
Version: December.4
Page 40
Also recall that by modifying the System Time Slice, you are not only adjusting the
communications, but also the scan time. Below is a graph to demonstrate how the scan
time of one particular Logix5550 processor will vary as the Time Slice is adjusted.
(The scan times would fluctuate between the shown Min time and Max time.)
ControlLogix Data Collection with RSLinx
Version: December.4
Page 41
Download