Programming Examples
12
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
835
' do not need to be executed for the proper operation of
' this example.
The commands in the extras function are
' shown for reference purposes only.
' Extra();
// Uncomment to execute the extra function.
Capture()
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()
' --------------------------------------------------------------
' This function initializes both the interface and the
' oscilloscope to a known state.
Private Shared Sub Initialize()
Dim strResults As String
' RESET - This command puts the oscilloscope into a known
' state.
This statement is very important for programs to
' work as expected.
Most of the following initialization
' commands are initialized by *RST.
It is not necessary to
' reinitialize them unless the default setting is not suitable
' for your application.
' Reset to the defaults.
myScope.DoCommand("*RST")
' Clear the status data structures.
myScope.DoCommand("*CLS")
' IDN - Ask for the device's *IDN string.
strResults = myScope.DoQueryString("*IDN?")
' Display results.
Console.Write("Result is: {0}", strResults)
' AUTOSCALE - This command evaluates all the input signals
' and sets the correct conditions to display all of the
' active signals.
myScope.DoCommand(":AUToscale")
' CHANNEL_PROBE - Sets the probe attenuation factor for the
' selected channel.
The probe attenuation factor may be from
' 0.1 to 1000.
myScope.DoCommand(":CHANnel1:PROBe 10")
' CHANNEL_RANGE - Sets the full scale vertical range in volts.
Summary of Contents for InfiniiVision 7000A Series
Page 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Page 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Page 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Page 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Page 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Page 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...