Skip to content

Tag Actors

The following features are exposed in the Designer’s Tag Browser, and supplement or alter the data flow for the tags to which they are applied.

The Republish and Bulk Script actions take copies of fresh data arriving from a tag’s value source and duplicate the copies to an OPC item or to a designated script function.

The Divert Write actions intercept the value being written to a tag and deliver to a specified OPC item instead. The user may configure diversion of either the engineering value or the raw value. (If both diversions are configured, only the engineering value diversion will occur.)

Republish Action

This feature, when enabled on a tag (any kind), will cause the final value to be transmitted to an arbitrary target OPC Server and Item Path. Batching is applied with a fifty (50) millisecond delay. Batching is per OPC Server, or if the Item Path contains a square-bracketed device name, per OPC Server and Device.

Any failures to deliver are discarded. The delivery to the given OPC target occurs in parallel with the further operation of the Tag Actor pipeline.

Tag Properties

JSON Property Data Type
republishEnabled Boolean When true, the following server and item path properties are applied.
republishToServer String The name of the OPC Server connection containing the following Item Path.
republishToItem String The Item Path (Node ID) to which the value it to be delivered. Only non-null values with Good quality will be delivered.

Bulk Script Action

This feature, when enabled on a tag (any kind), will cause the final value to be handed off to a script function in the Gateway Scripting Project. The function must accept a single argument, which will be a list of the values that were batched together. Batching is applied with a fifty (50) millisecond delay. Batching is per complete package.module.function name.

Any failures to locate script functions, or when executing a script function, are discarded. Bulk scripts should perform their own error handling and/or logging. Script execution occurs in parallel with the further operation of the Tag Actor pipeline.

Tag Properties

JSON Property Data Type
bulkScriptEnabled Boolean When true, the following package.module.function setting is applied.
bulkScriptFunction String The full package.module.function name of the script function in the Gateway Scripting Project that will be called to handle the batched values. The function must take one positional parameter: the list of items to handle. The item object is documented below.

Bulk Item Objects

Java Field Data Type
entryTS Long The value of `System.nanoTime()` when this item was placed in the batch queue.
source TagPath The complete tag path object identifying the source of the value.
qv QualifiedValue The same value, with associated quality and timestamp, that is delivered to the tag, essentially the same as a tag event's `currentValue`.

Divert Engineering Write Action

This feature, when enabled on a tag (excluding memory tags), will cause the written value, before scaling in the write direction, but after clamping (either raw or engineering clamps), to be transmitted to an arbitrary target OPC Server and Item Path. Batching is applied with a five (5) millisecond delay. Batching is per OPC Server, or if the Item Path contains a square-bracketed device name, per OPC Server and Device.

If set up on a memory tag, the diversion will simply not occur, with no notice.

Any other failures to deliver yield a failure of the overall value write. The tag’s normal value source will not receive the written value via the normal pipeline.

Tag Properties

JSON Property Data Type
divertEngWriteEnabled Boolean When true, the following server and item path properties are applied.
divertEngWriteToServer String The name of the OPC Server connection containing the following Item Path.
divertEngWriteToItem String The Item Path (Node ID) to which the value is to be delivered.

Divert Raw Write Action

This feature, when enabled on a tag (excluding memory tags), will cause the written value, after scaling in the write direction, to be transmitted to an arbitrary target OPC Server and Item Path. Batching is applied with a five (5) millisecond delay. Batching is per OPC Server, or if the Item Path contains a square-bracketed device name, per OPC Server and Device.

If set up on a memory tag, the diversion will simply not occur, with no notice.

Any other failures to deliver yield a failure of the overall value write. The tag’s normal value source will not receive the written value via the normal pipeline.

While the other actions can be used together, this action will not work if the Divert Engineering Write action is configured, as that action will consume the write value before this action sees it.

Tag Properties

JSON Property Data Type
divertRawWriteEnabled Boolean When true, the following server and item path properties are applied.
divertRawWriteToServer String The name of the OPC Server connection containing the following Item Path.
divertRawWriteToItem String The Item Path (Node ID) to which the value is to be delivered.

Read Substitution Action

This feature, when enabled on a tag (any atomic type), will monitor a pair of secondary tags, one a boolean condition, and the other an alternate (raw/unscaled) value source. When both the condition tag and the source tag have Good quality, and the condition tag supplies a boolean TRUE, the value from the source will be injected into the tag as a substitute.

While substitution is occuring, the original value source of the subject tag will be monitored, so that the last received value can be delivered to the tag when the condition turns false. (Or condition or alternate source cease having Good quality.)

While substitution is occuring, any attempt to write to the subject tag will be rejected with a Read Only quality code.

The intended use of this feature is to supply a static good value to user interfaces and/or historians when a machine is turned off, or is otherwise known to be producing meaningless data.

This could also be used to swap to an alternate communication path on failures, as long as writes are handled separately.

Tag Properties

JSON Property Data Type
readSubstEnabled Boolean When true, the following condition and source tag path properties are applied.
readSubstCondition String Tag path to boolean condition controlling substitution. May be relative.
readSubstSource String Tag path to alternate (raw) value source to substitute on demand. May be relative.
Back to top