696 Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
12 Programming Examples
Call ivprintf(id, command + " ")
' Write definite-length block bytes.
Call ifwrite(id, byteArray(), lngBlockSize, vbNull, retCount)
' retCount is now actual number of bytes written.
CheckForInstrumentErrors command
DoCommandIEEEBlock = retCount
Exit Function
ErrorHandler:
MsgBox "*** Error :"+Error, vbExclamation
End
End Function
Private Function DoQueryString(query As String) As String
Dim actual As Long
On Error GoTo ErrorHandler
Dim ret_val As Integer
Dim strResult As String * 200
Call ivprintf(id, query + vbLf)
Call ivscanf(id, "%200t", strResult)
CheckForInstrumentErrors query
DoQueryString = strResult
Exit Function
ErrorHandler:
MsgBox "*** Error :"+Error, vbExclamation
End
End Function
Private Function DoQueryNumber(query As String) As Double
On Error GoTo ErrorHandler
Dim dblResult As Double
Call ivprintf(id, query + vbLf)
Call ivscanf(id, "%lf" + vbLf, dblResult)
CheckForInstrumentErrors query
DoQueryNumber = dblResult
Exit Function
ErrorHandler:
MsgBox "*** Error :"+Error, vbExclamation
End