This VBScript program sets up four basic s-parameter measurements in four windows, all in a single channel. Handles are created to the measurement, channel, and window objects so that subsequent settings can be made for each.
Note: This is only an example. This is not necessarily the most efficient way to make basic S-parameter measurements.
This VBScript (*.vbs) program can be run as a macro in the PNA. To do this, copy the following code into a text editor file such as Notepad and save it on the PNA hard drive as Basic.vbs. Learn how to setup and run the macro.
See PNA Object Model
See Other COM Example Programs
Set pna = CreateObject("AgilentPNA835x.Application")
' Get a handle to the preset channel 1, S11 meas, and window(1)
' Creates a new S21 measurement in New window(2)
' Creates a new S12 measurement in New window(3)
' Creates a new S22 measurement in New window(4)
'set Stop Frequency for channel
'set Display formats
meas1.format=1 'Lin Mag
meas2.format=2 'Log Mag
'Show title in all windows
Modified example for same channel