Tag References (IEC 61131-3)

Help Contents


A Tag Reference is a way of referring to a SCADA tag from IEC 61131-3 code. For example:

Tag ReferenceDescription
%"Processor1.Tank Level" A reference to the tag Processor1.Tank Level.
%"Processor1.Tank Level.FullName" A reference to the FullName property of the tag Processor1.Tank Level.

Relative and Absolute Tag References

Tag references can be absolute or relative:

Referring to Properties of Tags

A Tag Reference can refer to a property of a tag. To refer to a tag property, append a period (.) character followed by the property name.

For example, the tag reference %"Example Graphic.Tank Level.MaxScale" could refer to the MaxScale property of an Analog Data Point Tag.

Indirect Tag References

An indirect tag reference uses the value of one tag to define the target of the tag reference.

To create an indirect tag reference enclose a tag reference inside less than (<) and greater than (>) characters. For example:

%"<Display Phase>.Value"

The actual tag reference is the value of the Display Phase appended with the text string .Value. If the value of Display Phase is "Phase 1", the resulting tag reference is Phase 1.Value.

The tag reference enclosed inside the less than (<) and greater than (>) characters must be an absolute tag reference.

Data Type

The data type associated with an indirect tag reference is always STRING. Use a Type Cast to convert the indirect tag reference to the type you require. For example:

TO_REAL( %"<Display Phase>.Value" )

An indirect tag reference returns an empty string if there are any errors. For example:

Performance Considerations

Using indirect tag references may result in slower performance compared to using direct tag references.

The target of a direct tag reference is located when the direct tag reference is created. This results in efficient operation because the value can be retrieved by a simple lookup operation.

The target of an indirect tag reference can not be worked out in advance. The following steps are required to read a indirect tag reference:

  1. Read the value of the tag reference inside the less than (<) and greater than (>) characters.
  2. Create the target tag name.
  3. Locate the target tag.
  4. Read the value of the target tag.

Standards Compliance

Tag References are an extension to the IEC 61131-3 standard.

Further Information

Common Elements

To learn about other IEC 61131-3 Common Elements.


For the meaning of terms used in Fernhill SCADA.