Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1117

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

)
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
myScope = New
_
VisaComInstrument("USB0::0x0957::0x17A6::US50210029::0::INSTR"
myScope.SetTimeoutSeconds(10)
' Initialize - start from a known state.
Initialize()
' Capture data.
Capture()
' Analyze the captured waveform.
Analyze()
Catch err As System.ApplicationException
Console.WriteLine("*** VISA Error Message : " + err.Message)
Catch err As System.SystemException
Console.WriteLine("*** System Error Message : " + err.Message)
Catch err As System.Exception
System.Diagnostics.Debug.Fail("Unexpected Error")
Console.WriteLine("*** Unexpected Error : " + err.Message)
Finally
myScope.Close()
End Try
End Sub
' Initialize the oscilloscope to a known state.
' --------------------------------------------------------------
Private Shared Sub Initialize()
Dim strResults As String
' Get and display the device's *IDN? string.
strResults = myScope.DoQueryString("*IDN?")
Console.WriteLine("*IDN? result is: {0}", strResults)
' Clear status and load the default setup.
myScope.DoCommand("*CLS")
myScope.DoCommand("*RST")
End Sub
' Capture the waveform.
' --------------------------------------------------------------
Private Shared Sub Capture()
' Use auto-scale to automatically configure oscilloscope.
myScope.DoCommand(":AUToscale")
' Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
myScope.DoCommand(":TRIGger:MODE EDGE")
Console.WriteLine("Trigger mode: {0}", _
myScope.DoQueryString(":TRIGger:MODE?"))
' Set EDGE trigger parameters.
myScope.DoCommand(":TRIGger:EDGE:SOURCe CHANnel1")
Programming Examples
1117
39

Advertisement

Table of Contents
loading

Table of Contents