Anasoft Autowork User's Guide

6. Debugging a Macro  Contents  8. Using Quick Bar


7. Running a Macro


7.1 Before you can run a macro

7.2 Several ways to run a macro

7.3 Controlling macro running with Debug Bar

7.4 Running control - start, pause, continue and stop

7.5 Changing your mind to debug the macro

 

7.1 Before you can run a macro

You can run the currently opened macro by clicking the  button. Any way, you should know something before you actually run a macro:

 

1) You cannot run a macro when you are already running or debugging another macro, even when you have paused (rather than stopped) running or debugging that macro.

2) You cannot run a macro while you are recording a macro.

3) A macro must be a valid macro (it should be able to pass the validation check) before you can run it.

4) The macro must have at least one valid instruction to be run, or the running procedure cannot be initialized.

5) You must know the password of the macro if it's an encrypted macro. (If you can open the macro before running, then you can run it without inputting password again).

 

7.2 Several ways to run a macro

1) When a macro has been opened into Autowork, you can run it in several methods:

     a) Click the run macro button in the control bar or in the VME UI if you are editing the macro. 

     b) Click the menu command to run it: main menu -> Debug / Run a Macro -> Run.

     c) Use the Run/Pause/Continue Running hot key to run it. The default value is Ctrl+Shift+P (P means Play). You can change this value at Hot Key page in the Options dialog box if you want.

2) You can run a macro directly in the Windows Explorer - right click the macro file in Windows Explorer, select the command "Run" in the context menu to run it. If this macro file is an encrypted file, you will be prompted for its password before it can run.

3) You can run a macro by Anasoft Schedule. In this way, you can set the password directly in Scheduler's task page, so there is no need for you to be prompted for password at the time Scheduler drives Autowork to run this macro.

 

7.3 Controlling macro running with Debug Bar

You will see the following debug bar when you run or debug a macro. You can see the status of the running macro - text for current instruction, count of all instructions, current instruction ID, the duration of the whole macro and time passed until now.

 

 

Pic UG-7-1 Debug Bar in normal size. A user can click the button in the circle in the first line to collapse the bar into a mini bar (as in Pic UG-7-2), or click the button in the right down corner to extent to the extended bar (as in Pic UG-7-3). Clicking either button the second time will restore the bar to the original status.

 

 

Pic UG-7-2 Debug Bar in the status of "Mini Bar"

 

 

Pic UG-7-3 Debug bar in extended mode. At this mode, you can view the list of all instructions in the macro. The two buttons at right-bottom of the dialog can be used to change the height of the debug bar in extended mode.

 

 

Pic UG-7-4 Control buttons in the debug bar. The first 3 buttons are "Run Macro" (if you have paused running/debugging), "Pause Running" and "Terminate the Running / Debugging Session of Current Macro" respectively. The right 4 buttons are "Debug Current Macro", "Step Into", "Step Over" and "Step Out".

 

7.4 Running control - start, pause, continue and stop

Start

You can start running a macro in a way as described in 7.2 Several ways to run a macro. Or you can start debugging a macro as described in Debugging a Macro.

 

Pause / Continue:

You can press hot key Ctrl+Shift+P (P means play) to pause running or debugging a macro. You can press the same key to continue. This key is also the same key for you to start running a macro.

 

Stop

You can completely stop running a macro before it ends itself by pressing the hot key Ctrl+Shift+S (S means stop).

 

 

Pic UG-7-5 If you have paused running a macro by pressing the hot key Ctrl+Shift+P, you can see a "Paused" button in the debug bar. You can click this button to continue running or debugging.

 

7.5 Changing your mind to debug the macro

There is no clear boundary between running a macro or debugging a macro for Autowork, After you have paused running a macro, you can continue running it, or continue debugging it by clicking the Run or Debug button. When you have paused from debugging a macro, you can also change to run it by clicking the Run button in the debug bar.