Anasoft Autowork User's Guide

5.4 Editing the Instructions of a Macro  Contents  5.4.2 Editing Keyboard and Text Instructions


5.4.1 Editing Macro Instructions in the VME


back to 5.4 Editing the Instructions of a Macro

 

VME (Visual Macro Editor) is both the general integrated macro editor and the place to edit macro instructions. The general management commands of VME have been discussed in 5.1 VME - The Integrated Visual Macro Editor. In this page, we will discuss how to edit instructions of a macro in the VME.

 

In the following picture (Pic UG-5.4-1), you can see the part of VME on top of the horizontal line across VME is the place to edit macro instructions.

 

 

Pic UG-5.4-1-1 VME (Visual Macro Editor) is the place to edit your instructions. In the picture, you can see there are altogether 542 lines of instructions in the macro. Line 1, 3, 5, 7 were selected (you can press Ctrl and click lines one after another to make multiple selections). The first line is a Repeat Start instruction. All instructions between this Repeat Start and next Repeat End will be some distance indented to show they are within a control loop. Line 6, 7 have break points on them. Line 10, 11 have been set as commented instructions.

 

Add/Modify/Delete

Cut/Copy/Paste

Move Up/Move Down/Go Up/Go Down

Unlimited Undo/Redo

Comments

Break Points and Debugging Related Commands

 

Add/Modify/Delete

When you click the new button (the first button), or when you double click an item in the instruction list, or click the modify button (the second button) to edit it, the Visual Instruction Editor dialog box will open for you to edit the instruction. You can select from the category list in the left-top of the VIE dialog, then the sub UI for this category will appear for you to edit it visually.

 

 

Pic UG-5.4-1-2 You can edit an instruction in VIE (Visual Instruction Editor). There are several categories of instructions as shown in the drop down list. When you select a category, you will see the UI for instructions under this category. If VIE found an error in what you filled, it will show the error in the status box on the up-right corner of VIE. 

 

Though you can only add or edit one instruction at a time, you can delete multiple instructions at a time by selecting multiple instructions and click the delete button.

 

Cut/Copy/Paste

It's convenient to use the cut, copy and paste command. You can apply these commands on one instruction, or apply on a group of instructions at a time.

 

Move Up/Move Down/Go Up/Go Down

These 8 commands are "Move Fast Up" / "Move Up" / "Move Down" / "Move Fast Down" / "Go Fast Up" / "Go Up" / "Go Down" / "Go Fast Down". Move commands will move instructions one position or a screen up or down in the instruction list. You can move one instruction, or move a group of instructions together. Go commands will move your highlight in the list. They will not actually influence the structure of the macro instruction list.

 

Unlimited Undo/Redo

Undo and Redo are great functions provided by VME. You can undo/redo your changes on the instruction list for unlimited times.

 

Comments

Some times you may hold some instructions from running, rather then just delete them from the macro. Comment commands serves for this purpose. You can add comments to any one or a group of instructions or uncomment them at any time if you want. Commented instructions will be treated as notes only. They will not be involved in validation check, running or debugging.

 

The first button can be used to add comments. The second can be used to remove comments. You can select multiple instructions to add or remove commends in one click.

 

Break Points and Debugging Related Commands

 

 

The two buttons at right bottom can be used to add or remove break points. The five buttons on top are "Stop Debugging", "Debug", "Step Into", "Step Over" and "Step Out". In current edition, "Step Into", "Step Over" and "Step Out" work the same way as "Debug". They may be different in future editions.

 

Current version of Autowork provides simple debugging mechanism. You can add break point to an instruction. When you debug a macro, rather than run it, the macro will stop at an instruction if a break point was attached to it.