val = oOpcData.Item(id).Value
oOpcData.Item(id).Value = val
|id||(Variant) Specifies the variable either by its name (String data type, case sensitive text, for example "a1") or by index (zero-based index).|
The Var object includes information about the variable (value, name, index, etc.).
The Item property (like Var object) is read only, it means that the object cannot be changed but for example it is possible to write into the Value of the Var object.
This method enables access only to variables (with corresponding data extension) that are created directly in this object (own variables). In fact also other variables from PmData objects are registered into this object - those that have corresponding data extension configured with path to this object. All data extensions registered in this object can be accessed by method GetVarExtensions.
Dim val, tim, qual
val = oOpcData.Item(0).Value
tim = oOpcData.Item(0).TimeStamp
qual = oOpcData.Item(0).Quality
Example see Data vector transfer