VWorks Software User Guide : Using macros to create protocols : About protocol macros and the macro library
About protocol macros and the macro library
This topic describes the VWorks macros and the macro library that you can create to help simplify and expedite the protocol writing process. You must be an administrator or technician to create macros and protocols.
Macros defined 
A VWorks macro is a collection of protocol tasks and associated task parameters grouped together in an abbreviated form. You can insert the macro easily at other places within the same protocol or throughout other protocols where the same task sequence is required.
A macro eliminates the need to recreate a repeated task sequence within the same protocols or subsequent protocols that you write. Therefore, protocol writing can be easier, faster, and less error-prone.
Suppose you want to create a protocol that has multiple wash routines, where each wash routine consists of a sequence of Tips On, Aspirate, Dispense, and Tips Off tasks. You could do the following using a macro:
1 Create the wash routine task sequence.
2 Highlight the task sequence and add it as a macro to the macro library.
3 Set custom variables at the macro level, such as the volume or number of times to wash, so that the parameters could be scripted before running the protocol.
For instance, the variables could be exposed on a protocol form that the operator is permitted to change at run time.
4 Insert the macro at the other points in the protocol where the wash routine is required.
For the subsequent protocols that you create, which require the wash routine, you can insert the macro from the macro library. For each instance of the macro, you should verify that the parameter values are set correctly, such as Location, plate and Location, location.
Later, if you want to modify the macro, the change can be replicated to all the other instances of the macro in an open protocol.
Types of macros 
You can create the following types of macros in the VWorks software:
 
Macro
Description
Startup or cleanup macro
Available for use in the Startup Protocol area and the Cleanup Protocol area.
Main process macro
Available for use in the Main Protocol area only within the main process.
Subprocess macro
Available for use in the Main Protocol area only within a subprocess.
Macros have the following requirements:
All tasks in the macro must be contiguous in the protocol.
A macro can contain subprocess or process tasks, but not both.
A macro cannot contain another macro.
Macro library 
The macro definitions are stored in a macro library (.mlb file). Although different versions of a given macro may be in use in the protocols, the software uses only one macro library for a given VWorks session.
To specify the macro library file path, see Viewing and setting file directory paths.
To save a copy of a macro library, see Managing macro libraries.
The software stores the macro libraries in the VWorks Project folder, for example,
/VWorks Projects/VWorks/Miscellaneous/Macro Library/MacroLibrary.mlb
About available macros 
The Available Macros area in the VWorks window displays the contents of the specified macro library.
Figure Available Macros area displaying the contents of the macro library
 
The Available Macros area lists the macros alphabetically.
If no protocol is open, the macro list includes all types of macros.
If a protocol is open, a subset of the macro library appears in the list depending on which area of the protocol tab is active and which devices are used in the protocol. For example, in the following figure only the subprocess macros for the Bravo Platform appear.
Figure Available Macros area displaying only the subprocess macros
 
Related information
 
For information about...
See...
Creating macros
Editing macros and macro version control
Using a macro in a protocol
Exporting and importing the macro library
Exporting and importing protocols
Creating a basic protocol
Working with JavaScript