Recording a Macro

The 89600 VSA provides a Record Macro feature that can be used to capture a sequence of steps as you interact with the 89600 VSA's user interface. This feature is available from the Macros dialog.

To record a macro, perform the following steps:

  1. Click Utilities > Macros

  2. Select a programming language

  3. Click Record

  4. Perform a sequence of steps using the VSA

  5. Click End Record when you are finished changing VSA parameters

  6. Specify a name for your macro

You can also view the corresponding lines of code as you change VSA parameters when you enable code output in the Output window.

If you are using a measurement type that has the option to "Manually apply settings" (e.g., 5G NR), make sure it is disabled so that the macro recording utility can capture your interactions with the measurement in real time.

Replaying a macro that creates hardware configurations may not behave as you expect and may corrupt your existing Analyzer Configurations.

The following lines of code are typical of what you may see when you record a macro of creating an Analyzer Configuration:

app.Hardware.Configurations.Create("Analyzer1");

app.Hardware.Configurations["Analyzer1"].Groups.Create(new InstrumentId(InstrumentType.Adc, "SIM::Infiniium"));

app.Hardware.Configurations["Analyzer1"].Groups.ApplyChanges();

When you execute these lines a second time, there is already an Analyzer Configuration with the same name, so the Create() method will create a new Analyzer Configuration but append "(1)" to the name. However, the second two lines of code modify to the original Analyzer Configuration.

So, instead of creating a duplicate Analyzer Configuration with (1) appended to the name; the VSA will instead add another Simulated Infiniium to the original Analyzer Configuration and also create a new blank configuration.

See Also

Macros Dialog Tab

Running a Macro

Creating a Macro