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.
This document is referring to features and support available in the asiControlLogix.dll version 58 or later. |
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.
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:
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. |
When using Micro 800 communications, listing structured tags is not supported. |
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:
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. |
Non-Listed tags can still be polled (read and write access) by following these steps:
Data Type (Logix5000) | CIP Type | Description |
---|---|---|
BOOL/Digital | C1 | Example: Program:ReservedTag;C1 |
SINT | C2 | Example: Program:ReservedTag;C2, To access a bit offset, add the “/x” after this. Example: Program:ReservedTag;C2/0 |
INT | C3 | Example: Program:ReservedTag;C3, To access a bit offset, add the “/x” after this. Example: Program:ReservedTag;C3/0 |
DINT | C4 | Example: Program:ReservedTag;C4, To access a bit offset, add the “/x” after this. Example: Program:ReservedTag;C4/0 |
REAL | CA | Example: Program:ReservedTag;CA |
DWORD | D3 | Example: Program:ReservedTag;D3 |
Do not use this modifier for tags that are Listed as it will cause the tag to fail validation. |
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.
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.
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.