Specifications

340 Chapter 18
PSA Programming Examples
Using Visual Basic® .NET with the IVI-Com Driver
PSA Programming Examples
Dim manufacturer As String
Dim model As String
Dim firmware As String
manufacturer = inherent.Identity.InstrumentManufacturer
model = inherent.Identity.InstrumentModel
firmware = inherent.Identity.InstrumentFirmwareRevision
Output instrument information to the console
Console.WriteLine("Manufacturer: " + manufacturer)
Console.WriteLine("Model: " + model)
Console.WriteLine("Firmware: " + firmware)
Reset the instrument
inherent.Utility.Reset()
INSTRUMENT SPECIFIC
Using the IAgilentSa interface is not necessary or beneficial
at the moment, but in the future if other instruments implement
the IAgilentSa interface, the code that is written to work with
that interface can be reused without changes, as opposed to code
that is written against the class object directly
Dim sa As IAgilentSa = instr
Obtain trace data from the instrument
Dim traceData As Array
sa.Application.Select("Basic")
sa.Application.Basic.Waveform.Configure()
sa.Application.Basic.Spectrum.Traces.Initiate()
traceData = sa.Application.Basic.Waveform.Traces.Item("RawIQ").Read(10000)
Output the trace data to the console
Console.WriteLine("Press ENTER to display trace data.")
Console.ReadLine()
Dim traceValue As Double
For Each traceValue In traceData
Console.WriteLine(traceValue)