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

PI Interface for OPC DA

Data quality information

  • Last UpdatedMay 21, 2025
  • 3 minute read

The OPC Data Access standard specifies a set of quality flags. PI Interface for OPC DA translates the quality flags to the closest approximation in the default System digital state set. The low eight bits of the quality flags are arranged into three fields, quality (QQ), sub-status (SSSS) and limit status (LL), arranged as follows: QQSSSSLL.

Handling data of questionable quality

PI Interface for OPC DA stores either the quality or the value in a PI point, whereas the OPC server returns value and quality in separate fields. If a value is good, it is stored in the point. If a value is bad, a digital state that describes the quality is stored. For questionable-quality data, you can configure the interface to treat the values as good and store them, or treat them as bad and store a digital state. You cannot configure the interface to store a bad-quality value.

To configure handling of questionable-quality data using PI ICU, go to the OPCInt > OPC Server page and enable the desired option, as shown in the following figure.

Questionable quality

Storing both values and quality information

To record both the values reported and the quality information returned with the values, store the quality in a separate PI point. To configure a point to store the quality for the associated ItemID, set location2 to 4. Because OPC qualities are unsigned 16-bit integers, the PI Interface for OPC DA requires an Int32 tag to store them. The qualities are stored in Data Archive without any change, and their status is always GOOD. For details about OPC quality values, download the OPC Data Access specification from the OPC Foundation website or consult the PI_OPCClient User’s Guide.

Quality states

Quality data is composed of three sub-fields. The following tables list the values that are returned.

Good quality

Quality

OPC Definition

PI System Status

11SSSSLL

Non-specific

Good

Except:

110110LL

Local Override

_SUBStituted *

* These values will be marked as questionable, unless you use the following switches to ignore questionable values.

  • If you use /SG=S, then "Local Override" is treated as good. However, it also suppresses bad and questionable values.

  • /SQ=I writes questionable values but suppresses the questionable flag, so that they appear in PI as if they were good.

Not used by OPC

Quality

OPC Definition

PI System Status

10SSSSLL

Invalid

Bad Input

Questionable quality

Quality

OPC Definition

PI System Status

010110 LL

Sub-Normal

Bad_Quality

010101LL

Engineering Units Exceeded

LL=01

Low Limited

Under LCL

LL=10

High Limited

Over UCL

Otherwise

Inp OutRange

010100LL

Sensor Not Accurate

LL=01

Low Limited

Under Range

LL=10

High Limited

Over Range

Otherwise

Out of calibration (if not under or over range)

Invalid Data

010011LL

Invalid

Bad Input

010010LL

Invalid

Bad Input

010001LL

Last Usable Value

No_Sample

010000LL

Non-specific

Doubtful

Bad quality (PI version 3.3 and higher)

Quality

OPC Definition

PI System Status

000111LL

Out of Service

Out of Service

000110LL

Comm Failure

Comm Fail

000101LL

Last Known Value

Scan Timeout

000100LL

Sensor Failure

Equip Fail

000011LL

Device Failure

Unit Down

000010LL

Not Connect

Not Connect

000001LL

Configuration Error

Configure

000000LL

Non-specific

Bad

Custom digital states

To replace the default PI System digital states with custom states using PI ICU, go to the OPCIntData Handling page and set the Alternate Digital State for Questionable/Bad Qualities field. To override the default states, you must specify the full set of replacements, and the numeric values must be contiguous.

The following table lists the digital states and PI statuses that you can override.

Order After Marker State

Default PI status

1

Bad_Quality

2

Under LCL

3

Over UCL

4

Inp OutRange

5

Under Range

6

Over Range

7

Invalid Data

8

Bad Input

9

No_Sample

10

Doubtful

11

Out of Service

12

Comm Fail

13

Scan Timeout

14

Equip Fail

15

Unit Down

16

Not Connect

17

Configure

18

Bad

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