Using Macro

Other topics about Overview

Macro using COM

When you want to control the E5063A internally, you can use COM objects alone or in conjunction with SCPI commands and the Parse object. The latter method is a little slower than the former method because the Parse object is used to parse the messages of SCPI commands.

Example: Using COM object

Dim ena
set ena = CreateObject("E5070.Application")
ena.scpi.display.split = "D12_34"
ena.scpi.display.window(2).activate

Example: In conjunction with SCPI commands and the Parse object

Dim ena
set ena = CreateObject("E5070.Application")
ena.parse "DISP:SPLIT D12_34"
ena.parse "DISP:WIND2:ACT"

 

You can use this with VB Script. If you install the Excel (Excel VBA) or other programmable software in the E5063A, It also can control the E5063A.

Some sample programs are listed in Sample Programs.

Executing Macro from Softkey/Hardkey

Macros are executable programs that you write, load into the analyzer, and then run from the analyzer. Macros (.vbs and .exe) can be executed by clicking its file on the file explore. However, you can execute it from Softkey or Hardkey. You can have up to 25 macros set up to run on the analyzer.

Registering your macro

  1. Press Macro Setup > Macro Setup ... .

  2. Click Edit to start the Edit Macro Setup dialog.

  3. In the Macro Title box, type a descriptive title for your macro.

  4. Click Browse.

  5. Find and select your executable file. Change Files of Type if necessary.

  6. Click OK on the Edit Macro Setup dialog.

  7. Click OK on the Macro Setup dialog.

Executing Macro by Soft key

  1. Press Macro Menu, then registered macro is listed in the softkey.

  2. Click the desired softkey to run the macro.

Executing Macro by Hard key

Using User Menu Function

The E5063A lets you perform procedures assigned to specific softkeys (Macro Setup > User Menu > Button 1 to Button 10), without using user forms, when that softkey is pressed. This function is called the user menu function.

To execute a procedure assigned to a softkey, you need to generate an event of pressing the softkey.

Refer to VB Script: Using User Menu.