Technical data
Sample Programs 35
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference 941
Sub Main()
On Error GoTo VisaComError
' Create the VISA COM I/O resource.
Set myMgr = New VisaComLib.ResourceManager
Set myScope = New VisaComLib.FormattedIO488
Set myScope.IO = _
myMgr.Open("TCPIP0::130.29.71.191::inst0::INSTR")
myScope.IO.Timeout = 15000 ' Set I/O communication timeout.
myScope.IO.Clear ' Clear the interface.
' Initialize - start from a known state.
Initialize
' Capture data.
Capture
' Analyze the captured waveform.
Analyze
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End
End Sub
'
' Initialize the oscilloscope to a known state.
' -------------------------------------------------------------------
Private Sub Initialize()
On Error GoTo VisaComError
' Clear status.
DoCommand "*CLS"
' Get and display the device's *IDN? string.
strQueryResult = DoQueryString("*IDN?")
Debug.Print "Identification string:"+strQueryResult
' Load the default setup.
DoCommand "*RST"
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End
End Sub
'