AsyncReadComplete event

Description
This event is called when an AsyncRead is completed.
Syntax
AsyncReadComplete
(TransactionID As Long, NumItems As Long, ClientHandles() As Long, ItemValues() As Variant, Qualities() As Long, TimeStamps() As Date, Errors() As Long)
TransactionID
— The client specified transaction ID.
NumItems
— Number of items returned.
ClientHandles
— Array of client handles for the items.
ItemValues
— Array of values.
Qualities
— Array of Qualities for each item's value.
TimeStamps
— Array of UTC TimeStamps for each item's value. If the device cannot provide a timestamp, the server will provide one.
Errors
— Array of Long's indicating the success of the individual item reads. This indicates whether the read succeeded in obtaining a defined value, quality and timestamp. NOTE any FAILED error code indicates that the corresponding Value, Quality and Time stamp are UNDEFINED.
Example
Dim i As Long
For i = 1 To NumItems
If Errors(i) = 0 Then
'/* Update display
txtData(ClientHandles(i)) = ItemValues(i)
txtQuality(ClientHandles(i)) = Qualities(i)
txtTimeStamp(ClientHandles(i)) = TimeStamp(i)
Else
txtStatus = MyOPCServer.GetErrorString(Errors(i))
End If
Next 'i
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal