Tag References vs. OPC Items
It is easy to confuse the definition and purpose of Tag reference items (Scan Class) and direct OPC items (Timer) in transaction groups, though they have distinct benefits.
Tags may be referenced inside of groups, however it is critical to remember that they are executed by the Ignition Gateway, according to their scan classes, and independent of the group. Adding a tag into a group is like creating a shortcut to that tag. However, once in the group, the item can be used like any other item. That is, it may be mapped bi-directionally to the database, used as a trigger, be the target of another item, and so on. It is even possible to create an hour meter out of the item. Core properties of the tag such as alarming and scaling, however, are defined in the actual tag, not in the group.
OPC Items in groups (as well as expression items in groups), however, are completely executed by the group. They do not exist outside of the group in which they are defined. They are subscribed and evaluated according to the rate of the group. Generally speaking, it is most common to create OPC items in groups, even if a particular point might already exist in tags. This leads to more understandable group execution, as all evaluation occurs in the group according to the timer and trigger settings. Tag references are useful when it is necessary to have a single value in multiple groups, for example, as a trigger in order to coordinate execution.
OPC Item
OPC Items are the backbone of a group. They get their values from PLCs and the values are then used by other items in the group and/or to write to the database. They are directly subscribed to an OPC server at the rate of the group and are executed by the group so their alarms are evaluated when the group is executed. These items are executed even when the trigger isn't active.
To create a new OPC Item
-
In the Designer, go to Project Browser, and click on Transaction Groups.
The workspace now changes to the Transaction Group workspace. -
Right-click on Transaction Group to create a New Transaction Group, or click on a group you have previously created.
You will now see the workspace changes to look like: -
Right-click in the white area, and choose New Item > New OPC Item.
The Edit group tag window is displayed as follows:
The following table describes all the properties on the Edit group tag window.
OPC Item General Properties |
|
General Properties |
|
Name |
The name of the OPC item in the group. There cannot be duplicate names within a group. |
Data Type |
The datatype used to read values from the PLC. |
OPC Properties Click on the Browse OPC button, in this section, select the tag you want, and Ignition fills out the following fields for you. |
|
OPC Server |
The Selected OPC Server. This is a drop-down list showing all the OPC Servers added in the Ignition Gateway. |
OPC Item Path |
The OPC Item's address Including Device name or Channel if required. |
Value Mode |
|
Property |
Which property of the OPC item you want to use.
|
Mode |
Options for displaying values based on the Item value.
|
Write Target |
|
Mode |
Changes the items directional read/write option.
|
Target Type |
This is the selection for what the Item will write to when the group executes.
|
Target Name |
The name of the column in the database that this Item will write to when the group executes. The Target Name list will populate with all the column names from the Group's target table if the Target Type is Database field. |
AlarmingThe Alarming settings for the OPC items. See Alarming Properties for a full explanation. |
Tag Reference
Tag References are used just like OPC Items, adding the convenience of using a Tag that has already been set up with scaling and alarm data.
Tag Item |
|
General |
|
Name |
The name of the OPC item in the group. There cannot be duplicate names within a group. |
Tag Path |
The path to the tag being referenced. This value is not editable except by clicking the Insert Tag button. There cannot be duplicate names within a group. |
Data Type |
The datatype to write to into the database if this item is not read-only. |
Value Mode |
|
Property |
Which property of the Tag you want to use.
|
Mode |
Options for displaying values based on the Item value.
|
Write Target |
|
Mode |
Changes the items directional read/write option. This is only editable when the target Type is set to Database field.
|
Target Type |
This is the selection for what the Item will write to when the group executes.
|
Target Name |
The name of the column in the database that this Item will write to when the group executes. The Target Name list will populate with all the column names from the Group's target table if the Target Type is Database field. |