In OPC UA Historical Access the StatusCode is used to indicate the conditions under which a Value or Event was stored, and thereby can be used as an indicator of its usability. Due to the nature of historical data and/or Events, additional information beyond the basic quality and call result code needs to be conveyed to the Client, for example, whether the value is actually stored in the data repository, whether the result was Interpolated, whether all data inputs to a calculation were of good quality, etc.

In the following, Table 17 contains codes with Bad severity indicating a failure; Table 18 contains Good (success) codes.

It is important to note that these are the codes that are specific for OPC UA Historical Access and supplement the codes that apply to all types of data and are therefore defined in OPC 10000-4 , OPC 10000-8 andOPC 10000-13.

Table 17 – Bad operation level result codes

Symbolic Id

Description

Bad_NoData

No data exists for the requested time range or Event filter.

Bad_BoundNotFound

No data found to provide upper or lower bound value.

Bad_BoundNotSupported

Bounding Values are not applicable or the Server has reached its search limit and will not return a bound.

Bad_DataLost

Data is missing due to collection started/stopped/lost.

Bad_DataUnavailable

Expected data is unavailable for the requested time range due to an un-mounted volume, an off-line historical collection, or similar reason for temporary unavailability.

Bad_EntryExists

The data or Event was not successfully inserted because a matching entry exists.

Bad_NoEntryExists

The data or Event was not successfully updated because no matching entry exists.

Bad_TimestampNotSupported

The Client requested history using a TimestampsToReturn the Server does not support (i.e. requested Server Timestamp when Server only supports SourceTimestamp).

Bad_InvalidArgument

One or more arguments are invalid or missing.

Bad_AggregateListMismatch

The list of Aggregates does not have the same length as the list of operations.

Bad_AggregateConfigurationRejected

The Server does not support the specified AggregateConfiguration for the Node.

Bad_AggregateNotSupported

The specified Aggregate is not valid for the specified Node.

Bad_ArgumentsMissing

See OPC 10000-4 for the description of this result code.

Bad_TypeDefinitionInvalid

See OPC 10000-4 for the description of this result code.

Bad_SourceNodeIdInvalid

See OPC 10000-4 for the description of this result code.

Bad_OutOfRange

See OPC 10000-4 for the description of this result code.

Bad_NotSupported

See OPC 10000-4 for the description of this result code.

Bad_IndexRangeInvalid

See OPC 10000-4 for the description of this result code.

Bad_NotWriteable

See OPC 10000-4 for the description of this result code.

Table 18 – Good operation level result codes

Symbolic Id

Description

Good_NoData

No data exists for the requested time range or Event filter.

Good_EntryInserted

The data or Event was successfully inserted into the historical database

Good_EntryReplaced

The data or Event field was successfully replaced in the historical database

Good_DataIgnored

The Event field was ignored and was not inserted into the historical database.

It may be noted that there are both Good and Bad Status codes that deal with cases of no data or missing data. In general Good_NoData is used for cases where no data was found when performing a simple ‘Read’ request. Bad_NoData is used in cases where some action is requested on an interval and no data could be found. The distinction exists if users are attempting an action on a given interval where they would expect data to exist, or would like to be notified that the requested action could not be performed.

Good_NoData is returned for cases such as:

  • ReadEvents where startTime =endTime
  • ReadEvent data is requested and does not exist
  • ReadRaw where data is requested and does not exist

Bad_NoData is returned for cases such as:

  • ReadEvent data is requested and underlying historian does not support the requested field
  • ReadProcessed where data is requested and does not exist
  • Any Delete requests where data does not exist

The above use cases are illustrative examples. Detailed explanations on when each status code is returned are found in 6.4 and 6.7