Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 775

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
fResultsArray = _
m_IoObject.ReadList(IEEEASCIIType.ASCIIType_R8, ",;")
' Check for instrument errors.
CheckForInstrumentErrors(strQuery)
' Return result numbers.
Return fResultsArray
End Function
Public _
Function DoQueryIEEEBlock(ByVal strQuery As String) As Byte()
' Send the query.
m_IoObject.WriteString(strQuery, True)
' Get the results array.
Dim ResultsArray As Byte()
ResultsArray = _
m_IoObject.ReadIEEEBlock(IEEEBinaryType.BinaryType_UI1, _
False, True)
' Check for instrument errors.
CheckForInstrumentErrors(strQuery)
' Return results array.
Return ResultsArray
End Function
Public _
Sub DoCommandIEEEBlock(ByVal strCommand As String, _
ByVal DataArray As Byte())
' Send the command.
m_IoObject.WriteIEEEBlock(strCommand, DataArray, True)
' Check for instrument errors.
CheckForInstrumentErrors(strCommand)
End Sub
Private Sub CheckForInstrumentErrors(ByVal strCommand As String)
Dim strInstrumentError As String
Dim bFirstError As Boolean = True
' Repeat until all errors are displayed.
Do
' Send the ":SYSTem:ERRor?" query, and get the result string.
m_IoObject.WriteString(":SYSTem:ERRor?", True)
strInstrumentError = m_IoObject.ReadString()
' If there is an error, print it.
If strInstrumentError.ToString() <> "+0,""No error""" _
& Chr(10) & "" Then
If bFirstError Then
' Print the command that caused the error.
Console.WriteLine("ERROR(s) for command '{0}': ", _
strCommand)
bFirstError = False
End If
Programming Examples
775
12

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents