Tags are executed by Tag Groups inside of a Tag Provider. In a typical system, there are a number of Tag Groups and one or more Tag Providers. Tag Providers can be either internal or external.
Tags inside Internal Providers are available to other Ignition Gateways that use the Remote provider type.
When referring to Tag Groups, we often use the words "type" and "mode" interchangeably throughout this manual. Ignition has three Tag Group modes: Direct, Driven, and Leased. There can be different variations of these modes that can change their behavior. For example, the Driven Tag Group has "one-shot" and "any change" options that you can set, and we often refer to these as different "types" of Tag Groups as well. When you create a new Tag Group, you will select one of the three "modes" and any properties you need to build your Tag Group.
Adding and editing Tag Groups is easy in the Designer once you understand how the different Tag Group modes work. It's just a matter of choosing which Tag Group mode you want to use for your Tag, and entering the properties for your Tag Group.
Each Tag in Ignition is assigned a Tag Group which dictates the polling rate and conditions on which the Tag will be evaluated. For example, the Tag Group will dictate how often that value is going to poll from the PLC if it's an OPC Tag, or how often the expression is going to run if it is an Expression Tag, or how often the value is going to query the database if it is a Query Tag. Whatever type of Tag you're using, you can set a Tag Group on that Tag. You can also specify both a Realtime Tag Group and a Historical Tag Group for each Tag.
As you can see, setting Tag Groups on a Tag is easy. You can select multiple Tags in the Tag Browser by right clicking to edit the Tags. This opens the Tag Editor, and sets the Tag Group for all the selected Tags at the same time.
The following table lists the properties for Tag Groups. Note that some properties are available only for specific modes.
|Name||Unique name of the Tag Group.|
The rate of the Tag Group is based on the value of a driving Tag. The condition is a simple comparison between a Tag value and a number. If the condition is true, the Tag Group will execute at the fast rate. If false, it will run at the slow rate. There are two exceptions to this: the Any Change operator, and One-shot mode. Using either of these conditions will not run at a rate. Instead, it will be triggered by a change in the driving Tag's value. Keep in mind that the driving Tag can be an Expression Tag that performs complex calculations and references other Tags. In this way, it's possible to create robust Tag Group triggering.
Base update rate, specified in milliseconds, at which Tags will be executed.
|Leased/Driven Rate||Used by both the Leased and Driven Modes to determine when the Tag Group should run at the fast rate.|
|Driving Expression||The Tag Group executes based on the condition set on the Driving Expression: Tag or Expression. (Driven mode only.)|
How the Comparison Value property should be compared to the Driving Tag's value. If the comparison is true, then the Fast Rate will be used by the Tag Group, otherwise, the Slow Rate will be used.
The Any Change operator works differently than the other operators: The Tag Group will execute immediately whenever the driving Tag changes value. Using the Any Change operator means that the Tag Group no longer uses the Slow Rate or Fast Rate properties. (Driven mode only.)
|Comparison Value||Used by the Driving Comparison property to determine if the Tag Group should execute at the slow or fast rate. (Driven mode only.)|
|One Shot||One-shot will execute once when the comparison condition is true, and not again until the condition becomes false, and subsequently true. (Driven mode only.)|
This mode dictates how OPC values are obtained. The default mode, Subscribed, is preferred because it is more efficient than a read.
|Read After Write|
When enabled, a read request will be sent immediately after a write request. This means that the value on the Tag will be updated much quicker to reflect the latest written value.
Enabling this property is less efficient as a single write to a Tag becomes two separate requests. This is especially helpful with slower Tag Groups as the Tags will show the latest value quicker than the normal execution would allow.
Optimistic Writes are only valid on OPC Tags. Optimistic Writes set a newly written Tag value in Ignition before receiving confirmation of the write from the PLC. This helps the operators see their newly entered value right away and is useful if you have slow a Tag Group rate. A faster rate (1 second or quicker) will have less need to turn on Optimistic Writes.
If enabled, written values will be applied to the Tag in Ignition immediately. Normally, the system must receive confirmation that a write was successful from the device before the Tag in Ignition's value would change. The Optimistic Writes property changes the behavior by assuming the write went through until the next read value or subscription update proves otherwise. Enabling this will make writes appear to execute much quicker.
Works in conjunction with the OPC Optimistic Write Timeout property below. If the Tag in Ignition does not receive confirmation that the new write was successful within the timeout, the Tag will change back to the last known value. While in an ambiguous state, the Tag with have a quality of "Good (Provisional)".
This setting can be paired with the OPC Read After Write: the Ignition Tag will assume the newly written value, while an asynchronous read request is quickly sent out to confirm the write went through.
While the write is pending, values received from subscription activities will override the current value. Assuming an initial value of 0, if a write of 10 is applied to the Ignition Tag, then the Tag will show a value of 10 until the system can confirm the new value. If a subscription update then returns a value of 5, the Ignition Tag will change to 5.
|Optimistic Write Timeout (MS)|
The timeout period for Optimistic Writes. A value of 0 effectively disables the fallback functionality: the new value is maintained on the Tag until the next read or subscription activity.
|Publishing Interval (ms)|
The rate at which data is delivered to the OPC-UA client.
A value of -1 means automatic, allowing the OPC-UA client to determine the rate.
The OPC-UA specifications states that in cases where the sampling interval (the rate as which the server checks the data source for changes) is faster than the publishing interval (rate at which the the data is delivered to the client), the samples may be queued or batched together before publishing. This setting determines the maximum size of that queue. When the maximum is reached and a publish has not yet occurred, oldest samples are dropped first.
Currently, there are not many features in Ignition that utilize multiple entries in the queue, but 3rd party OPC-UA clients may be able to take advantage of this setting.
Note that values on Ignition Tags will only ever show one value at a time, regardless of what this property is set to. (If the value is 0, nothing will be queued.)
Support for this feature is dictated by the driver.
|Min Time Between Samples||Minimum time between samples (integer).|
|Min Time Units||Minimum time in units is defined as: Milliseconds, Seconds, Minutes, Hours, Days, Weeks, Months, and Years.|
|Max Time Between Samples||Maximum time between samples (integer).|
|Max Time Units||Maximum time in units is defined as: Milliseconds, Seconds, Minutes, Hours, Days, Weeks, Months, and Years.|