Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1050

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

38
Sample Programs
End Namespace
1050
Dim bFirstError As Boolean = True
Do
' While not "0,No error".
m_IoObject.WriteString(":SYSTem:ERRor? STRing", True)
strInstrumentError = m_IoObject.ReadString()
If Not strInstrumentError.ToString().StartsWith("0,") Then
If bFirstError Then
Console.WriteLine("ERROR(s) for command '{0}': ", _
strCommand)
bFirstError = False
End If
Console.Write(strInstrumentError)
End If
Loop While Not strInstrumentError.ToString().StartsWith("0,")
End Sub
Private Sub OpenIo()
m_ResourceManager = New ResourceManagerClass()
m_IoObject = New FormattedIO488Class()
' Open the default VISA COM IO object.
Try
m_IoObject.IO = _
DirectCast(m_ResourceManager.Open(m_strVisaAddress, _
AccessMode.NO_LOCK, 0, ""), IMessage)
Catch e As Exception
Console.WriteLine("An error occurred: {0}", e.Message)
End Try
End Sub
Public Sub SetTimeoutSeconds(ByVal nSeconds As Integer)
m_IoObject.IO.Timeout = nSeconds * 1000
End Sub
Public Sub Close()
Try
m_IoObject.IO.Close()
Catch
End Try
Try
Marshal.ReleaseComObject(m_IoObject)
Catch
End Try
Try
Marshal.ReleaseComObject(m_ResourceManager)
Catch
End Try
End Sub
End Class
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents