ControlLogix Tags

 Table Of Contents

Overview

Reading and writing to addresses in the device is accomplished by using tags to represent specific data points. For ACM to provide the OPC client with a list of Tags in the device, the driver must first query the device to obtain this tag listing. This process MUST BE INITIATED manually during configuration and prior to any OPC clients can read/write tags from an HMI or similar. 

Note

This document is referring to features and support available in the asiControlLogix.dll version 58 or later.

Tag Types

ControlLogix® devices have Program/System and User-Defined tags. Program/System tags consist of tags that are used in the scope of a PLC program and are directly used by these programs. There can be some restrictions on their use and how or if they were designed to be accessed externally, such as in an HMI. User-Defined tags (UDT) are Controller scoped and can be an alias of a Program/System tag. This is the preferred way to present a tag to an OPC client as suggested by Allen Bradley®. Tags are further defined as Atomic or Structured. Atomic tags consist of a single data point such as MyAtomicTag. A structured tag is a group of Atomic tags combined under a common name such as MyStructure.MyStructedMemberAtomic.

Tag Discovery (Creating a Tag Listing)

The tag discovery feature allows the driver to query the device and build a listing of the tags available to poll. This feature was created using publicly available documentation provided by Allen-Bradley®. Once this process successfully completes, the driver will create/update a (.TSV) file in the configured ACM data folder. This file is unique to one device configuration object in ACM by its object identifier.

Example: 1024_TAGS.tsv, where 1024 is the unique object identifier within the ACM server configuration. See General Object Configuration for more on this identifier.

This process is started by initiating the Read Device Tags command from the Commands tab of the device configuration.

The ACM logger will have several entries in the log indicating when this process started and when it completed. If it was unable to complete the process, the logger will also make an entry indicating the failure. This process can also be performed on a schedule via the Scheduled Tag Discovery configuration options located on the Device tab.

Here are a few things of note concerning the Tag Discovery process:

  1. Depending on the number of tags and complexity of tag structures in the PLC device load, this process can take several minutes to complete. Adequate time should be given to allow this process to complete uninterrupted.
  2. The ACM Logger will have entries created for the start and completion of this process regardless of the logging options enabled. The completion includes information about the tag file, where it is located, and the number of individual tags listed within it.


Note

By Enabling the Device Options: Enhanced logging for EtherNetIP/CIP message traffic option, the Discovery process will create detailed log entries for each step of the process that are useful for troubleshooting Listed vs Non-Listed tag related issues.

Micro800 Tag Discovery

When using Micro 800 communications, listing structured tags is not supported.

Listed vs Non-Listed Tags

The ControlLogix driver has a feature that allows it to query and store a listing of Tags that are presented to OPC clients when using the driver. The listing includes all UDTs, both atomic and structured, and some non-UDT types such as program and system tags. Some reserved program tag structures are not discover-able via the methods described above and will need to be treated as Non-Listed Tags when activated from an OPC client.

Listed tags are those which are present in the OPC item listing for the device as well as the (.tsv) file created by the Tag Discovery process described above.

Non-Listed tags are those which are not present in the OPC item listing nor in the (.tsv) file.

There are two reasons why a tag would be considered Non-Listed:

  1. The (.tsv) file is not present for this device instance in the ACM configuration for the server being used. In this case the driver will treat ALL TAGS as Non-Listed and will require the data type modifier described below.
  2. The (.tsv) file is present, but the tag does not appear in the file. In this case the driver did not add the tag to the file for one of two reasons:
    1. The tag was flagged as Reserved but the configuration option to Enable Reserved System Tag Discovery was not enabled.
    2. The tag was flagged as Reserved and the configuration option to Enable Reserved System Tag Discovery was enabled, however it is still not listed. In this case the tag is not discover-able by using the methods described in the publicly available documentation.


If a tag’s External Access attribute is set to None in Logix Designer/5000, then the tag cannot be accessed from outside the controller and will not be listed in ACM.

Polling Non-Listed Tags

Non-Listed tags can still be polled (read and write access) by following these steps:

  1. In the ACM Device configuration tab (Device Options), check the box to Enable Non-Listed Tag Validation. This option is enabled by default. This signals the driver to allow the user to enter a tag name not included in the listing. Without this setting enabled, any tag not in the listing will fail to be added in OPC and return a configuration error to the OPC Client requesting the tag. In addition, ACM will log the error. 
  2. Before activating the tag via an OPC client (typed in or from an HMI), add the Non-Listed tag data type modifier to the end of the tag name but before any other modifiers. Refer to the following table on how to use the data type modifier. The modifier is two characters for the CIP Type preceded by a semicolon.
Data Type Modifier
Data Type (Logix5000)CIP TypeDescription
BOOL/DigitalC1

Example: Program:ReservedTag;C1

SINTC2

Example: Program:ReservedTag;C2, To access a bit offset, add the “/x” after this.

Example: Program:ReservedTag;C2/0

INTC3

Example: Program:ReservedTag;C3, To access a bit offset, add the “/x” after this.

Example: Program:ReservedTag;C3/0

DINTC4

Example: Program:ReservedTag;C4, To access a bit offset, add the “/x” after this.

Example: Program:ReservedTag;C4/0

REALCAExample: Program:ReservedTag;CA
DWORDD3Example: Program:ReservedTag;D3

Note

Do not use this modifier for tags that are Listed as it will cause the tag to fail validation.

How can I tell I picked the correct Data Type modifier?

The driver will validate any correct pattern as described above. During the first read attempt after a tag is placed in service, the driver will check the data type entered by the user to see if it matches the reported data type issued in the response. If it does not match, the item will be flagged as Bad in OPC and will not receive a value. The driver will make an entry in the logger indicating the discrepancy. If the data type is correct, then the driver will treat the tag as a Listed tag for the remainder of its activation.

How do I fix a tag that is logged as an incorrect Data Type modifier?

The item must be removed from service (deactivated by the OPC Client) first. Use the logger entry error to obtain the correct data type and update the Data Type modifier to match. Place the item back in service and monitor the value and quality for indications it was successful.

Tag Related Errors

Validation Error on Non-Listed Tag=MyMissingTag. Data Type indicator missing or invalid.

This error is the result of trying to activate a Non-Listed tag without a valid data modifier.

 Error 2 on Open. Could not load or locate the Tag file for this device. The Read Device Tags command will poll the device and generate this file.

This error is logged when the driver is attempting to locate and open the tag file into memory during the item activation process. Items being activated will be treated as Non-Listed.

Read Tag Service Return Code - 04 - for Tag:SuperCoolMissingTag;CA Request Path Syntax Error. Likely Cause: This tag could not be found in the device. Ensure the Tag was entered correctly

This error occurs when the device cannot resolve the tag name as entered by the user (not including the data modifier). The driver is attempting to access a tag using it’s symbolic ANSI name and the device cannot resolve it. Verify this name (case included) is correct.



For assistance, please submit a ticket via our Support Portal, email autosol.support@autosoln.com or call 281.286.6017 to speak to a support team member.