Programming Guide

Digital Oscilloscopes Series
162
status = viFindNext(findList, instrResourceString)
End If
status = viOpen(defaultRM, instrResourceString, VI_NULL,
VI_NULL, instrsesn)
If (status < VI_SUCCESS) Then
Debug.Print "Cannot open a session to the device ", i + 1
GoTo NextFind
End If
' At this point we now have a session open to the USB TMC
instrument.
' We will now use the viWrite function to send the device the
string "*IDN?",
' asking for the device's identification.
status = viWrite(instrsesn, "*IDN?", 5, retCount)
If (status < VI_SUCCESS) Then
Debug.Print "Error writing to the device."
status = viClose(instrsesn)
GoTo NextFind
End If
' Now we will attempt to read back a response from the device
to