Issue
- What does the "| n" mean when viewing the properties of an OPC variable in Vista workstation?
- Problems have been encountered with OPC variables
- Error messages such as "The object is no longer available in the servers address space",
- Also, canonical data type or OPC data types.
Environment
Vista 5.1.X
TAC Vista OPC client
Cause
The "|n" is a reference to the data type or canonical data type as it's called in the OPC standard. In the world of OPC, the client application can be created in on one of many diverse programming languages. To resolve potential issues all OPC data types are assigned a specific Canonical Data Type. When a client application adds an OPC Item to an OPC Group it can use the default data type for the item or it can request the item with a specific canonical data type. If the OPC tool is used then the canonical is added automatically by checking with the server. It's only if variables are added manually that this information is required.
Resolution
The method used for addressing OPC variables is Folder.Variable_Name|Data_Type
The table below details the data types:
Data Type |
Canonical Type |
Size |
Data Range |
Boolean |
11 |
1 Bit |
True or False |
Byte |
17 |
1 Byte |
0-255 |
Byte Array∗ |
8209 |
1 Byte times Array Size |
0-255 |
Short |
2 |
2 bytes |
-32768 – 32767 |
Short Array∗ |
8194 |
2 bytes times Array Size |
-32768 – 32767 |
BCD |
18+ |
2 bytes |
0 - 9999 |
BCD Array∗ |
8210 |
2 bytes times Array Size |
0 - 9999 |
Word |
18 |
2 bytes |
0 – 65535 |
Word Array∗ |
8210 |
2 bytes times Array Size |
0 – 65535 |
Long |
3 |
4 bytes |
-2,147,483,648 to 2,147,483,647 |
Long Array∗ |
8195 |
4 bytes times Array Size |
-2,147,483,648 to 2,147,483,647 |
LBCD |
19+ |
4 bytes |
0 - 99999999 |
LBCD Array∗ |
8211 |
4 bytes times Array Size |
0 - 99999999 |
Dword |
19 |
4 bytes |
0 – 4,294,967,295 |
Dword Array∗ |
8211 |
4 bytes times Array Size |
0 – 4,294,967,295 |
Float |
4 |
4 bytes |
-(3.40 E38 – 1.40 E-45) to (1.40 E-45 – 3.40 E38) |
Float Array∗ |
8196 |
4 bytes times Array Size |
-(3.40 E38 – 1.40 E-45) to (1.40 E-45 – 3.40 E38) |
Double |
5 |
8 bytes |
-(1.798 E308 – 4.941 E-324) to 4.941 E-324 – 1.798 E308) |
Double Array∗ |
8197 |
8 bytes times Array Size |
-(1.798 E308 – 4.941 E-324) to 4.941 E-324 – 1.798 E308) |
Char |
16 |
1 Byte |
All Characters supported in the standard ASCII table |
String |
8 |
1 – n Bytes |
All Characters supported in the standard ASCII table |