Supported VT data types
- Last UpdatedAug 19, 2024
- 2 minute read
The following table describes the supported VT types.
|
VT Suffix |
Description |
|---|---|
|
/VT_BSTR |
Automation String |
|
/VT_BOOL |
Boolean |
|
/VT_I1 |
Char |
|
/VT_I2 |
2-byte Signed Integer |
|
/VT_I4 |
4-byte Signed Integer |
|
/VT_I8 |
8-byte Signed Integer |
|
/VT_UI1 |
Unsigned Char |
|
/VT_UI2 |
2-byte Unsigned Integer |
|
/VT_UI4 |
4-byte Unsigned Integer |
|
/VT_UI8 |
8-byte Unsigned integer |
|
/VT_UINT |
Unsigned machine Integer |
|
/VT_INT |
Signed machine Integer |
|
/VT_R4 |
4-byte Real |
|
/VT_R8 |
8-byte Real |
|
/VT_DATE |
Time stamp |
|
/VT_CY |
8-byte Currency |
|
/VT_BSTR[ ] |
Automation String array |
|
/VT_BOOL[ ] |
Boolean array |
|
/VT_I1[ ] |
Char array |
|
/VT_I2[ ] |
2-byte Signed Integer array |
|
/VT_I4[ ] |
4-byte Signed Integer array |
|
/VT_I8[ ] |
8-byte Signed Integer array |
|
/VT_UI1[ ] |
Unsigned Char array |
|
/VT_UI2[ ] |
2-byte Unsigned Integer array |
|
/VT_UI4[ ] |
4-byte Unsigned Integer array |
|
/VT_UI8[ ] |
8-byte Unsigned Integer array |
|
/VT_UINT[ ] |
Unsigned machine Integer array |
|
/VT_INT[ ] |
Signed machine Integer array |
|
/VT_R4[ ] |
4-byte Real array |
|
/VT_R8[ ] |
8-byte Real array |
|
/VT_DATE[ ] |
Time stamp array |
|
/VT_CY[ ] |
8-byte Currency array |
|
/VT_EMPTY |
Data Type suffix option not enabled; OPC server reports the default data type for the tagname. |
OPC Connectivity Examples
Assume a configuration with an OPC data source called "ModbusOverOPC" and a single group called "Group1"and an item reference "R1".
DDE/SuiteLink Client
To access an item in an OPC server via Gateway Communication Driver through a SuiteLink client, use the following syntax:
Establish connection:
Application = Gateway
Topic = OPCServer1_OPCGroup1
Reference item:
"R1"
DDE and SuiteLink clients add items to a Device Group associated with the OPC group. The topic the DDE/SuiteLink client needs to connect to Gateway Communication Driver is provided by this Device Group. The Device Group is created automatically when you create the group in the hierarchy. Its name is generated by concatenating the OPC data source name with the group name, separated by an underscore ("_"). In the example above, the name of the Device Group is generated as "ModbusOverOPC_Group1".
DDE and SuiteLink clients would access items as follows:
Gateway|ModbusOverOPC_Group1!Modbus.QT.R1
Using the VT syntax, you can specify the 4-byte Integer (/VT_I4) from the ModbusOverOPC data source for item "R1" as follows:
Gateway|ModbusOverOPC_Group1!Modbus.QT.R1 /VTI4
Note: Use the "Device Group Name" as on the faceplate of the OPC Group Node.
InTouch HMI
Using InTouch as a data access client functions same as the DDE/SuiteLink client. Access an item "R1" in an OPC data source, "ModbusOverOPC", via Gateway Communication Driver through InTouch, and specify a 4-byte signed Integer as follows:
Establish connection:
Application = Gateway
Topic = OPCServer1_OPCGroup1
Reference item:
"R1"
In InTouch, add tagnames in the Tagname Dictionary, configured for the defined Access Name, or for "OPC", the default Access Name. Typically, you will configure Access Names for read or read/write as follows:
ModbusOverOPC.R1
You can specify the 4-byte Integer (/VT_I4) from the ModbusOverOPC data source for item "R1" as follows:
ModbusOverOPC.R1 /VT_I4