Annex A (informative): OPC COM DA to UA Mapping ToC Previous

A.3 COM UA wrapper for OPC DA Server ToC Previous Next

A.3.2 Data and error mapping ToC Previous Next

A.3.2.1 General ToC

In DA server, Automation Data is represented by Value, Quality and Time Stamp for a Tag.

The COM UA Wrapper maps the VQT data to the Data Value and Diagnostic Info structures.

The Error codes returned by the DA server are based on the HRESULT type. The COM UA Wrapper maps this error code to an OPC UA Status Code. Figure A.6 illustrates this mapping.

readme_files/image008.png Figure A.6 – OPC COM DA to OPC UA data & error mapping

A.3.2.2 Value ToC

The data values in the DA server are represented as Variant Data type. The COM UA Wrapper converts them to the corresponding OPC UA data type. The mapping is shown in Table A.32:

Table A.32 – DataTypes and mapping

Variant Data
Type (In DA server)
Data type Mapping in COM UA Server (DataValue structure)
VT_I2 Int16
VT_I4 Int32
VT_R4 Float
VT_R8 Double
VT_BSTR String
VT_BOOL Boolean
VT_UI1 Byte
VT_I1 SByte
VT_UI2 UInt16
VT_UI4 UInt32
VT_I8 Int64
VT_UI8 UInt64
VT_DATE Double
VT_ARRAY Array of OPC UA types


A.3.2.3 Quality ToC

The Quality of a Data Value in the DA server is represented as a 16 bit value where the lower 8 bits is of the form QQSSSSLL (Q: Main Quality, S: Sub Status, L: Limit) and higher 8 bits is vendor specific.

The COM UA Wrapper maps the DA server to the OPC UA Status code as shown Figure A.7:

readme_files/image009.png Figure A.7 - Status Code mapping

The primary quality is mapped to the Severity field of the Status code. The Sub Status is mapped to the SubCode and the Limit is mapped to the Limit Bits of the Status Code.

Please note that the Vendor quality is currently discarded.

Table A.33 shows a mapping of the OPC COM DA primary quality mapping to OPC UA status code

Table A.33 – Quality mapping

OPC DA Primary Quality (Quality & Sub status QQSSSS) OPC UA Status Code
LOCAL_OVERRIDE Good_LocalOverride
SUB_NORMAL Uncertain_SubNormal
SENSOR_CAL Uncertain_SensorNotAccurate
EGU_EXCEEDED Uncertain_EngineeringUnitsExceeded
LAST_USABLE Uncertain_LastUsableValue
CONFIG_ERROR Bad_ConfigurationError
NOT_CONNECTED Bad_NotConnected
COMM_FAILURE Bad_NoCommunication
DEVICE_FAILURE Bad_DeviceFailure
SENSOR_FAILURE Bad_SensorFailure
LAST_KNOWN Bad_OutOfService

A.3.2.4 Timestamp ToC

The Timestamp provided for a value in the DA server is assigned to the SourceTimeStamp of the DataValue in the COM UA Wrapper.

The ServerTimeStamp in the DataValue is set to the current time by the COM UA Wrapper at the start of the Read Operation.

Previous Next