Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

Configuring Quality and Timestamp Tags

  • Last UpdatedDec 02, 2024
  • 3 minute read

The Plant SCADA ABCLX driver can use additional variable tags for quality and time stamp values. Quality or time stamp tags are duplicates of a variable tag, with an appended "!Q" or "!T" or "!M" in the address field to define their purpose. Their data type needs to be Long to enable them to store a quality or time stamp value.

Note: The quickest way to create a quality or timestamp tag in Plant SCADA is to locate the relevant variable tag using the Variable Tags dialog box, edit it as required to create a quality or timestamp tag, and save it. This creates a copy of the original variable tag with the required changes saved.

To create a quality tag:

  1. From the Plant SCADA Studio select System Model activity, then select Variables.

  2. On the menu below command bar, select Variables.

  3. Ad a row to the grid editor.

  4. Type the following information in columns, or in the fields of the Property Grid.

    • In the Tag Name field, enter an appropriate and unique name for the quality tag. Common practice suggests using a name such as "<Tagname>_Quality".

    • In the Data Type field, select Long from the drop-down menu (if not already selected).

    • In the I/O Device field, select the appropriate I/O device for the tag (if not already displayed).

    • In the Address field, enter the name of the tag you want to associate with the quality value (if not already displayed), and append "!Q" directly to the end of the address (without the quotes and without any spaces).

  5. Click Save.

    Note: If there is already an exclamation mark with other declarations included in the tag address, there is no need to include another one. For example, a quality tag monitoring TagName!A[64] can be addressed as TagName!Q.

The quality value generated by the ABCLX driver is a mask of the quality level and quality status field values as per the following table:

Quality level

Quality status

Value (Hex)

QLEVEL_UNCERTAIN

QSTATUS_NONE

0x00

QLEVEL_GOOD

QSTATUS_NOTDEFINED

0x01

QLEVEL_BAD

QSTATUS_INITIAL

0x02

N/A

QSTATUS_STALE

0x03

N/A

QSTATUS_ERRORDATA

0x04

N/A

QSTATUS_WRITE

0x05

Note: The quality is calculated by shifting up the quality level by 8 bits and OR masking in the quality status.

Examples

Quality tag settings for a single long in root of PLC:

Plant SCADA Tag Name

SingleLong_Quality

Plant SCADA Tag Address

SingleLong!Q

Plant SCADA Tag Type

LONG

Quality tag settings for an array of 256 bytes, offset by 256 items within an array of structures at element 32:

Plant SCADA Tag Name

StructureArray_32_.LargeByteArray_256_256_Quality

Plant SCADA Tag Address

StructureArray{32}.LargeByteArray/256!Q

Plant SCADA Tag Type

LONG

To create a timestamp tag:

  1. From the Plant SCADA Studio select System Model activity, then select Variables.

  2. On the menu below command bar, select Variables.

  3. Ad a row to the grid editor.

  4. Type the following information in columns, or in the fields of the Property Grid.

    • In the Tag Name field, enter an appropriate and unique name for the timestamp tag. Common practice suggests using a name such as "<Tagname>_sTimestamp" (for seconds) or "<Tagname>_msTimestamp" (for milliseconds) .

    • In the Data Type field, select Long from the drop-down menu (if not already selected).

    • In the I/O Device field, select the appropriate I/O device for the tag (if not already displayed).

    • In the Address field, enter the name of the tag you want to associate with a timestamp value (if not already displayed), and append "!T" or "!M" (as appropriate).

  5. Click Save.

    Note:
    If there is already an exclamation mark with other declarations included in the tag address, there is no need to include them for timestamping. For example, a timestamp tag monitoring TagName!A[64] can be addressed as TagName!A[64]T.
    • Timestamps store the number of seconds since 01/01/1970 when using the "!T" element, or the number of milliseconds since midnight using the "!M" element. If you want to store a complete time in millisecond accuracy, create two separate timestamp tags, one for seconds and one for milliseconds, each addressed appropriately.

    Examples

    Timestamp tag settings for a single long in root of PLC:

    Plant SCADA Tag Name

    SingleLong_msTimestamp

    Plant SCADA Tag Address

    SingleLong!M

    Plant SCADA Tag Type

    LONG

    Timestamp setting for an array of 256 Bytes offset by 256 items within an array of structures at element 32:

    Plant SCADA Tag Name

    StructureArray_32_.LargeByteArray_256_256_sTimestamp

    Plant SCADA Tag Address

    StructureArray{32}.LargeByteArray/256!A[256]T

    Plant SCADA Tag Type

    LONG

    Note: A timestamp value is based on the time a value change is detected by the ABCLX driver in UTC time, so the timestamp is only as accurate as the polling cycle of the I/O device. If, for example, the data value changed while the unit was not polling, the timestamp value will not be accurate.

    In This Topic
    TitleResults for “How to create a CRG?”Also Available in