User manual

Table Of Contents
Host Interface
51
DeviceStatus callback method) through the
DevicesList.Item search method using the string version
of CallbackData.DeviceIndex as the search key.
The following Visual Basic 6.0 code shows how to
obtain reference to the cFM2Device object and start the
data check timer when a data transmission is notified:
‘Declaration:
Dim ThisDevice As IFM2Device
‘Executable code:
‘Get the current device from the collection
Set ThisDevice = m_DevicesList.Item(CallbackData.DeviceIndex)
‘Handle the data
Select Case CallbackData.CallbackEvent
Case "Fault"
‘Fault event is enumerated in ThisDevice.LastFault
Case "ProbeRemoved"
‘Probe was removed
Case "ProbeAdded"
‘Probe was added, probe type is ThisDevice.ProbeType
Case "PowerOn"
‘Meter power is on, all properties are current and accurate
Case "PowerOff"
‘Meter power is off, only the ThisDevice.PowerState is
‘current and accurate
Case "MeasurementData"
‘Measurement data event, data is ThisDevice.LastData
Case "PacketIsOverrange"
‘Measurement data event, data is over-ranged
Case "OverTemperature"
‘Probe is in an over-temperature state
Case "MeasurementDataLost"
‘Data transmission gap due to buffer overflow