Data Historian Status Codes

Data Historian returns a status code with every value it serves. The status code reports whether the value is reliable and, when a request cannot be served, the reason it failed. You encounter these codes wherever GENESIS surfaces a logged value along with its quality—for example in the QUALITY column of a SQL Query Engine result set, or through the quality functions available to calculated tag expressions.

Reading a Status Code

A status code is a 32-bit value, and Data Historian reports it as an unsigned integer. A client that interprets the value as a signed 32-bit integer displays the same code as a negative number, so the tables below give both representations. To convert a signed value to its unsigned equivalent, add 4294967296.

Status codes divide into two families, identified by the prefix of the name:

  • Good—The value is reliable. A Good code other than Good itself carries additional information about the result, such as Good - No Data, when a request succeeds, but the requested time range holds no samples.

  • Bad—The value is not reliable, or the request failed. The rest of the name gives the reason.

Bad - Uncertain reports a value whose accuracy cannot be guaranteed rather than one that is strictly bad. The ISUNCQ and isunc functions return true for this code.

Working with Status Codes in Expressions

Calculated tag expressions read the status code of a data value with qualcode and test its family with isgood, isbad, and isunc. See Data Value Functions.

BI Server queries operate on the status code value itself. ISGOODQ, ISBADQ, and ISUNCQ test the family of a code, and GETDESCQ returns its displayed name:

SELECT getdescq(2147483658) --returns "Bad - User Access Denied"

See Using Quality Functions.

Good status codes:

Status Code

Displayed Name

Signed Value

Unsigned Value

Good

Good

0

0

GoodMoreData

Good - More Data

3

3

GoodNoData

Good - No Data

4

4

GoodEntryInserted

Good - Entry Inserted

5

5

GoodEntryReplaced

Good - Entry Replaced

6

6

GoodLocalOverride

Good - Local Override

9

9

Bad status codes:

Status Code

Displayed Name

Signed Value

Unsigned Value

Bad

Bad

134217728

134217728

BadCommunicationError

Bad - Communication Error

-2147483629

2147483667

BadConfigurationError

Bad - Configuration Error

-2147483616

2147483680

BadContinuationPointInvalid

Bad - Continuation Point Invalid

-2147483620

2147483676

BadDataLost

Bad - Data Lost

-2147483606

2147483690

BadDataUnavailable

Bad - Data Unavailable

-2147483597

2147483699

BadDeviceFailure

Bad - Device Failure

-2147482111

2147485185

BadEntryExists

Bad - Entry Exists

-2147483599

2147483697

BadHistoryOperationUnsupported

Bad - History Operation Unsupported

-2147483596

2147483700

BadInternalError

Bad - Internal Error

-2147483636

2147483660

BadInvalidArgument

Bad - Invalid Argument

-2147483622

2147483674

BadInvalidInParams

Bad - Invalid In Params

-2147483642

2147483654

BadInvalidMethodName

Bad - Invalid Method Name

-2147483639

2147483657

BadInvalidPointName

Bad - Invalid Point Name

-2147483644

2147483652

BadLicenseFailed

Bad - License Failed

-2147483624

2147483672

BadNoBound

Bad - No Bound

-2147483612

2147483684

BadNoData

Bad - No Data

-2147483600

2147483696

BadNoDataAvailable

Bad - No Data Available

-2147483634

2147483662

BadNoEntryExists

Bad - No Entry Exists

-2147483598

2147483698

BadNotImplemented

Bad - Not Implemented

-2147483643

2147483653

BadNotSupported

Bad - Not Supported

-2147483614

2147483682

BadOutOfService

Bad - Out Of Service

-2147482109

2147485187

BadPointFailed

Bad - Point Failed

-2131095059

2163872237

BadResourceUnavailable

Bad - Resource Unavailable

-2147483595

2147483701

BadSensorFailure

Bad - Sensor Failure

-2147482110

2147485186

BadServerFailed

Bad - Server Failed

-2147483641

2147483655

BadServerHalted

Bad - Server Halted

-2147483602

2147483694

BadTimeout

Bad - Timeout

-2147483637

2147483659

BadTypeMismatch

Bad - Type Mismatch

-2147483618

2147483678

BadUncertain

Bad - Uncertain

-1073741824

3221225472

BadUnexpectedError

Bad - Unexpected Error

-2147483640

2147483656

BadUnknownPointName

Bad - Unknown Point Name

-2147483603

2147483693

BadUserAccessDenied

Bad - User Access Denied

-2147483638

2147483658

BadWaitingForInitialData

Bad - Waiting For Initial Data

-2147483633

2147483663