Macros are executable programs that you write, load into the analyzer, and then run from the analyzer. You can have up to 25 macros set up to run on the analyzer.
How to Setup Macros |
Using Hardkey/SoftTab/Softkey |
|
In the Macro Setup dialog box:
|
Macro setup allows you to create up to 25 macros that can be launched from the VNA application. An external keyboard is required to enter the Macro Title and the Run string parameters. To add a Macro, use a mouse or the front-panel 'down arrow' (NOT the 'Down' key) to select a blank line. Then click Edit. Macro Title Shows the titles that appear in the softkeys and menu when you press the Macro key. These titles are associated with the executable files and should be descriptive so you can easily identify them. Macro Executable Lists the complete path to the executable file. To follow the example of launching the Keysight VNA Series Home Page, the path to the executable could be "C:/Program Files/Internet Explorer/iexplore.exe. Macro Runstring Parameters Lists the parameters that get passed to the program that is referenced in the executable file. Again following the example of launching the VNA Series Home Page, you could assign the runstring parameters "http://www.Keysight.com/find/pna". Edit Invokes the Macro Edit dialog box. Delete Deletes the selected macro. Up Allows you to reorder the macros, moving the selected macro up one line. This order determines how they appear in the VNA Menu and in the softkeys and when you press the Macro front-panel key. Down Moves the selection down one line in the list of macros. |
Macro Title Add a title that appears in the softkeys and menu. Macro Executable Set the complete path to the macro executable file. Click Browse to navigate to the macro executable file and establish the complete path to the file. Macro run string parameters Optionally add parameters that are passed to the program referenced in the executable file. |
How to Run Macros |
Using Hardkey/SoftTab/Softkey |
|
The following is an example Visual Basic Scripting (vbs) program that you can copy, install, and run on your VNA.
Note: Print these instructions if viewing in the analyzer. This topic will be covered by the Macro Setup dialog box.
Copy the following code into a Notepad file.
Save the file on the analyzer hard drive in the C:/Documents folder. Name the file FilterTest.vbs
Close Notepad
'Start copying here
'This program creates a S21 measurement
'It is written in VBscript using SCPI commands
Dim app
Dim scpi
'Create / Get the VNA application
Set app = CreateObject ("AgilentPNA835x.Application")
Set scpi = app.ScpiStringParser
'Preset the Analyzer.FPREset presets the setting and deletes all traces and windows
scpi.Execute ("SYST:FPReset")
'Create and turn on window 1
scpi.Execute ("DISPlay:WINDow1:STATE ON")
'Define a measurement name, parameter
scpi.Execute ("CALCulate:PARameter:DEFine:EXT 'MyMeas', 's21'")
'Associate ("FEED") the measurement name ('MyMeas') to WINDow (1), and give the new TRACE a number (1).
scpi.Execute ("DISPlay:WINDow1:TRACe1:FEED 'MyMeas'")
'End copying here