Annex A OPC COM DA to UA mapping ToC Previous

A.4 COM UA proxy for DA Client ToC Previous

A.4.3 Data and error mapping ToC Previous Next

A.4.3.1 General ToC

In an OPC UA Server, Automation Data is represented as a Data Value and and status, in addition additional error data can be provided via Diagnostic Info for a tag

The COM UA Proxy maps the Data Value structure into VQT data and error code.

For successful operations(StatusCode of Good and Uncertain), the COM UA Proxy maps the Status Code of the DataValue to the OPC DA Quality But in case of error(StatusCode of Bad), the Status Code is mapped to the OPC DA Error code.

The StatusCode in the Diagnostic Info returned by the OPC UA Server are mapped to OPC DA Error codes. Figure A.5 illustrates this mapping.

readme_files/image011.png Figure A.5 – OPC UA to OPC DA data & error mapping

A.4.3.2 Value ToC

The COM UA Proxy converts the OPC UA Data Value to the corresponding OPC DA Variant type. The mapping is shown in Table A.6. For DataTypes that are subtypes of an existing base DataType the conversion for the Base DataType is used.

Table A.6 – DataTypes and Mapping

   OPC UA Data type (Bin UA Server)    Variant Data Type (In DA server)
Int16 VT_I2
Int32 VT_I4
Float VT_R4
Double VT_R8
String VT_BSTR
Boolean VT_BOOL
Byte VT_UI1
SByte VT_I1
UInt16 VT_UI2
UInt32 VT_UI4
Int64 VT_I8
UInt64 VT_UI8
DateTime VT_DATE
XmlElement VT_BSTR
ExpandedNodeId VT_BSTR
QualifiedName VT_BSTR
LocalizedText VT_BSTR
StatusCode VT_UI4
ExtensionObject Array of VT_UI1
Array of above OPC UA types Array of corresponding Variant type

A.4.3.3 Quality ToC

The Quality of a Data Value in the OPC UA Server is represented as a StatusCode.

The COM UA Proxy maps the Severity, Subcode and the limit bits of the OPC UA Status code to the lower 8 bits of the OPC DA Quality structure (of the form QQSSSSLL). Figure A.6 illustrates this mapping.

readme_files/image009.png Figure A.6 – OPC UA Status Code to OPC DA quality mapping

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

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

Table A.7 – Quality mapping

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

A.4.3.4 Timestamp ToC

If available, the SourceTimestamp of the DataValue in the OPC UA Server is assigned to the Timestamp for the value in the COM UA Proxy. If SourceTimestamp is not available, then the ServerTimestamp is used.

Previous Next