OPC-DA Client supported
access
This page describes the data elements and data types supported by a OPC-DA Client driver.
Data types and data conversion
The OPC-DA Client driver supports the following OPC data types and their mapping to runtime data types as follows:
OPC Data Type | Runtime Data Type |
---|---|
VT_BOOL | BOOL |
VT_I1 | INT1 |
VT_UI1 | UINT1 |
VT_I2 | INT2 |
VT_UI2 | UINT2 |
VT_I4 | INT4 |
VT_INT | INT4 |
VT_UI4 | UINT4 |
VT_UINT | UINT4 |
VT_I8 | INT8 |
VT_UI8 | UINT8 |
VT_R4 | FLOAT4 |
VT_R8 | FLOAT8 |
VT_BSTR | STRING |
VT_DATE | TIMESTAMP |
The OPC-DA Client driver also supports arrays of each of the above data types.
Limitations
- The OPC-DA Client driver does not support the
following OPC data types:
VT_BLOB
VT_BLOB_OBJECT
VT_CARRAY
VT_CF
VT_CLSID
VT_CY
VT_DECIMAL
VT_DISPATCH
VT_EMPTY
VT_ERROR
VT_FILETIME
VT_HRESULT
VT_INT_PTR
VT_LPSTR
VT_LPWSTR
VT_NULL
VT_PTR
VT_RECORD
VT_SAFEARRAY
VT_STORAGE
VT_STORED_OBJECT
VT_STREAM
VT_STREAMED_OBJECT
VT_UINT_PTR
VT_UNKNOWN
VT_USERDEFINED
VT_VARIANT
VT_VERSIONED_STREAM
VT_VOID - The default behavior for the OPC-DA Client driver
is to provide read only support for OPC array
tags.
The reasons why the OPC-DA Client driver defaults all arrays to read only access limits are described in the section Handling of OPC arrays. This can be changed to adhere to the read/write access limitations defined on the OPC Server when defining an OPC-DA Client device.
See Using the Workbench to define an OPC-DA Client device for information on defining a OPC-DA Client device and the Prohibit writing array elements parameter.