Using the Variables window to access Rockwell device variables

Once you have defined your devices, you can use the Workbench to access the variables that reside in those devices.

  1. From the Workbench left pane, select the Variables icon. The Variables window appears as the right pane.

    The Variables window provides a tree format that lists the started devices in the node. The devices must be in the Started state to be included in the Variables window.
    Each device can be expanded to show the variables that reside in that device.
  2. You can expand or collapse the tree format to zoom in or out on a device’s variables.
    When you get to an individual data element, you have access to the Read and Write functions to read a device’s data element or write a device’s data element.
    For information on data types and data conversion supported by the Rockwell driver, see Rockwell supported access.
  3. You must ensure that the appropriate levels of security access privileges are in place to restrict the access to data elements to those personnel who have the proper knowledge and understanding when reading or writing device data elements. For more information, see System administration > Security.

Some of the data elements may also be configured to be read only within the device using the device’s programming tools.

Rockwell Unsolicited Logix Listener and Unsolicited PLC-5/SLC 500 Listener variables

This view of the Variables window shows the items associated with an the Rockwell Unsolicited Logix Listener device and the Rockwell Unsolicited PLC-5/SLC 500 Listener device. The information identifies the Rockwell PLCs that have connected to the listener and the type of unsolicited messages the PLCs are sending. The first group of variables are counters that provide information on the connections and messages that the listener has serviced in the time that it has been in a started state. Two additional variables provide detailed information on the messages received by the listener and connections that the listener is actively servicing.

The following variables are shown on the Workbench Variables panel for a started Rockwell Unsolicited Logix Listener device and for a Rockwell PLC-5/SLC 500 Listener device:

Variable Name

Variable Description

Active Connections The number of devices currently connected to the Listener device.
Last Connection Timestamp The timestamp of the most recent connection. A value of Wed. Dec 31, 19:00 EST 1969 will be shown when a connection has not been made to the listener device.
Total Connections Accepted The total number of connections that have been accepted since the listener device was started.
Total Connections Closed The number of connections closed since the listener device was started.
Total Connections Rejected The number of connection attempts the listener device has rejected. A connection can be rejected by the listener device for the following reasons:
  • The number of allowed connections as defined in the Maximum Connections parameter of the device definition has been reached
  • A connection can also be rejected if the IP address of the PLC has been denied per the rules set out in the Access List parameter of the device definition.
Total Messages Received The number of messages that have been received by the listener and resulted in a trigger being executed.
Total Messages Rejected The total number of messages received by the listener that were not processed. Here are a few reasons why a message may be rejected:
  • Incorrect format
  • No corresponding Trigger for the message received
  • Incomplete message was received.
Messages An array that contains information specific to the last 20 messages received by the listener. This is a rolling array, so information on only the last 20 messages is maintained. The information in the array is kept as long as the listener device remains in a started state.
Connections An array that contains information specific to each active connection. The size of the array is determined by the Maximum Connections parameter of the device definition. The information in the array is kept as long as the connection is active. The information is dropped as soon as the connection is broken by either the connected PLC or by the listener.

Rockwell Unsolicited Logix Listener and Unsolicited PLC-5/SLC 500 Listener Messages summary variables

The array of the last 20 messages received provides insight into the PLCs that have communicated to the Unsolicited Logix Listener or the PLC-5/SLC 500 Listener. The information in each element of the array is maintained while the Listener is in a started state. This is a rolling array, meaning that the 21st message received will be stored in the first element of the array, overwriting the information that was previously in this element. Each element in the array contains the following variables:

Message variable Description
Timestamp The date and time the message was received by the listener.
Sender IP  IP address of the PLC that sent the message.
Length The length of the message received by the listener.
Data An array that shows up to 50 bytes of the data portion of the message.

Rockwell Unsolicited Logix Listener Connections variables


The Connections array size corresponds to the number of Connections that were defined when the Unsolicited Logix Listener was created. The connection information is maintained for the life of the connection. The information is lost once the connection between the Listener and the PLC is dropped. Each Connections element has the following variables:

Connections variables

Description

IP Address IP address of the PLC that has connected to the listener.
Messages Received The number of unsolicited messages the listener has received from the PLC.
Connect Time Time that the PLC connected to the listener.
Last Message Time Time that the most recent message was received.
Expired Messages A count of the number of large fragmented messages for which a portion of the message was received, but the listener timed out waiting for the complete message to arrive.
Messages An array of information associated with the twenty most recent messages received from this PLC.

Rockwell Unsolicited Logix Listener Connections Messages variables

Each element in the Connections Messages array describes a specific message received from the PLC identified in the Connections element. The message information is maintained for the life of the connection. There are twenty elements in the array. The contents of the elements will wrap around to the first element, once the array is full. The data is deleted once the connection is closed.

Connections Messages variable

Description

Timestamp Time that the message was received by the listener.
Service Code The Service Code value defined for the unsolicited message.
Class The Class value defined for the unsolicited message.
Instance The Instance value defined for the unsolicited message.
Attribute The Attribute value defined for the unsolicited message.
Destination The Destination name that was defined for a Data Table Write unsolicited message.
Message Length The length in bytes of the message.

Rockwell Unsolicited PLC5/SLC 500 Listener Connections variables

The Connections array size corresponds to the number of Connections that were defined when the PLC5/SLC 500 Listener was created. The connection information is maintained for the life of the connection. The information is lost once the connection between the Listener and the PLC is dropped. Each Connections element has the following variables:

Connections variable

Description

IP Address IP address of the PLC that has connected to the Listener.
Messages Received The number of unsolicited messages the Listener has received from the PLC.
Connect Time Time that the PLC connected to the Listener.
Last Message Time Time that the most recent message was received.
Messages An array of information associated with the twenty most recent messages received from this PLC.

Rockwell Unsolicited PLC5/SLC 500 Listener Connections Messages variables

Each element in the Connections Messages array describes a specific message received from the PLC identified in the Connections element. The message information is maintained for the life of the connection. There are twenty elements in the array. The contents of the elements will wrap around to the first element, once the array is full. The data is deleted once the connection is closed.

Connections Messages variable

Description

Timestamp Time that the message was received by the Listener.
Data Table Address The Data Table Address value embedded in the message.
Message Length The length in bytes of the message.