Link Tags
Link Tags are used to create a relationship between two server tags. For example, this allows Tag A from Device A to be linked to Tag B from Device B without requiring a third-party client connection. When enabled, a Link Tag writes the value of an Input Tag to an Output Tag, effectively linking the two tags. The Link tag has the string value of <input tag> != <output tag> until the first link occurs, then the string becomes <input tag> == <output tag>. When disabled, a Link Tag does no linking and the OPC DA quality of the tag is “Bad - Out of Service.”
See Also: Array Tags
Identification
: Specify (or edit) the name for the tag. The name can be up to 256 characters in length and cannot contain periods, contain double quotes, or start with an underscore.
: Specify information or an explanatory comment for the tag. The description is a string of up to 255 characters.
: Verify the tag type (selected on creation of the tag; not editable).
Configuration
: Specify if this tag is currently enabled / active. Tags that are enabled have references to other server tags and do computational work. Tags that are disabled have no references to server tags.
Input: Specify (or locate) the tag from the server to be the source of the link and its value is written to the Output Tag.

Note: The Input and Output fields cannot be the same.
Output: Specify (or locate) the tag from the server to be the source of the link and its value is written to the Input Tag. The Output Tag must be writable.

Note: The Input and Output fields cannot be the same.
Dead Value: Specify the value written to the Output if the Input is of bad quality. This value's data type is the data type of the Output. Users must choose dead values that are within the range of the Output tag's data type to ensure that no data is lost. If the field is left empty, the dead value is disabled. If disabled, the Output's value and quality does not change when the Input is bad quality.

Note: If the Output is an array tag, each array element is set equal to the Dead Value.
Trigger Type: Specify when the configured link is active. The options are: Always, While Trigger Comparison True, and On Trigger Comparison True. The default selection is Always. Descriptions of the options are as follows:
• Always: The configured link is active as long as the server is running and the Link Tag is enabled.
• While Trigger Comparison True: The configured link is active when the server is running, the Link Tag is enabled, and the configured trigger comparison evaluates to true. While the logic defined for the trigger in the Comparison and Value fields is satisfied, linking occurs based on the configured Link Mode (i.e. On Data Change of Input Tag or On Interval). When the trigger comparison evaluates to false, no linking occurs.
• On Trigger Comparison True: If the server is running and the Link Tag is enabled, then the input is linked to the output when the logic defined for the trigger in the Comparison and Value fields is satisfied. At that moment, the Input Tag is read and the Output Tag is updated. No link occurs until a change in the trigger value occurs and satisfies the configured trigger logic.
Trigger Tag: Specify (or locate) a tag whose value is compared to the Value parameter using the Comparison parameter (such as Trigger Tag == Value). This parameter is only available to configure when the Trigger Type is While Trigger Comparison True or On Trigger Comparison True.

Notes:
• The specified tag must be a valid server tag and cannot be an array tag. The Trigger and Output Tags cannot be the same.
• While Trigger Comparison True: While the Trigger Tag value satisfies the Comparison and Value configuration, the input is linked to the output based on the Link Mode configuration. No link occurs when the trigger comparison is not met.
• On Trigger Comparison True: The Trigger Tag is scanned at the configured Trigger Scan Rate. Each time a change in the Trigger Tag value that satisfies the Comparison and Value configuration is detected, a read of the Input Tag occurs and the Output Tag is updated. No link occurs until a change in the trigger value occurs and satisfies the configured trigger logic.
Trigger Scan Rate: Specify how often to read the Trigger Tag. The valid range is 50 – 1800000000 milliseconds. The default setting is 1000ms.
Comparison: Specify the logical comparison between the Trigger Tag value and the Value parameter. Options are:
• Trigger Tag > Value: The trigger tag value is greater than the value.
• Trigger Tag >= Value: The trigger tag value is greater than or equal to the value.
• Trigger Tag < Value: The trigger tag value is less than the value.
• Trigger Tag <= Value: The trigger tag value is less than or equal to the value.
• Trigger Tag == Value: The trigger tag value is equal to the value.
• Trigger Tag != Value: The trigger tag value is not equal to the value.
Value: Specify the value to compare to the value of the Trigger Tag. The data type of this value is equal to the data type of the Trigger Tag.
Link Mode: Specify the required conditions to initiate the link. The default selection is On Data Change of Input Tag. Descriptions of the options are as follows:
• On Data Change of Input Tag: The input is linked to the output any time the input is good quality and its value changes.
Tip: When the link mode is
On Trigger Comparison True, a true trigger tag input change also causes a link.
• On Data Change of Input Tag (Ignore Initial Update): The input is linked to the output anytime that the input value changes, except for the initial update (which is ignored and does not count as an input value change). The Link Tag has the string value <input tag> != <output tag> until after the first update successfully completes. At that time, subsequent updates have the string value <input tag> == <output tag>.

Note: An initial update of bad quality is not considered an initial update.
• On Interval: The input is linked to the output every Link Rate (milliseconds).
Link Rate (ms): Specify the frequency of update as defined in this parameter depends on the chosen Link Mode. The valid range is 50 – 1800000000 milliseconds. The default setting is 1000ms. Description of the Link Rate for each of the Link Mode options is as follows:
• On Data Change of Input Tag: The configured Link Rate defines the scan rate of the Input Tag. This is the fastest rate at which a change in the Input value may be detected.
• On Interval: The Link Rate defines the rate at which to update the output. Each time the interval elapses, the Input Tag is read and the Output Tag is updated.

Note: A link for the On Interval Link Mode requires a read of the Input Tag and a write to the Output Tag. These operations are given priority. If the linking is occurring at a fast rate (such as 50 milliseconds) it is possible that other clients operating in exception-based mode could miss data updates. Make sure that linking is occurring no faster than is required.
Array Tags
Link Tags can be used to link array tags, provided the following:
• The arrays are the same size.
• The arrays are the same data type. Otherwise, the values must be moved from one type to another.
It is best to use arrays with the same dimensions. For more information, refer to the table of examples below.
Input Array Tag / Type | Output Array Tag / Type | Succeeds without Error |
|---|
K001[6] | K0100[6] | Yes |
K001[6] | K0100[2][3] | Yes |
K001[2][3] | K0100[6] | Yes |
K001[6] | K0100[2][2] | No |
K001[6] / Word | K0100[6] / DWord | Yes |
K001[6] / Float | K0100[6] / DWord | No |
Note: The examples above use address syntax from the Simulator Driver and do not include the channel and device names.