The following statements allow you to control execution of your sequences. One of the primary uses of these statements is to load and execute all the sequences that are required for a particular operation. This allows users to start up a complicated workcell by simply clicking a single button.
Examples of control sequences are provided in the module mowctl. These sequences are associated with the buttons on the Master Control Panel. The sequences in mowctl give you examples of how to create control sequences that can be edited so that the buttons perform your custom operations.
NOTE: You do not have to use these example sequences to use the Master Control Panel buttons.
Sequences with the same names can be created in your own modules. When a module is loaded, the buttons on the Master Control Panel will execute the corresponding sequence. For example, create a module named new, which contains the control sequence named proceed. Edit the record control sequence module in the mowini initialization database and change it to new. Clicking Proceed on the Master Control Panel will run the sequence named proceed from the module named new. 1
This statement loads a resource module and all its components.
LOAD MODULE module
The PAUSE_TASK statement performs the same operations as the Immediate, Operation, Action, Statement, and Cycle check boxes on the control panels.
PAUSE_TASK --task-- {AFTER --event--}
Double-click --task-- to select a task name. (These are the same names that appear in the scrolling window on the Task Control Panel.) For an immediate pause, leave the --event-- argument blank. To select other pauses, double-click --event--, and the remaining pause options are displayed. Pauses after Operation and Action depend on the particular statement that is executing.
This statement restarts a task that has been paused with a PAUSE_TASK. It is equivalent to clicking the Proceed and Retry buttons on the control panels.
RESUME_TASK --task-- {RESPONSE --response--}
Double-click --task-- to select a task name. (These are the same names that appear in the scrolling window on the Task Control Panel.) To select proceed/retry options, doubleclick --response--, and the options are displayed. If --response-- is left blank, the response is the same as the Proceed button.
The SELECT_TASK statement performs the same function as the Select button on the Task Control Panel. A sequence is assigned to a task for execution. If the task is not found, no error is reported.
SELECT_TASK --task-- {MODULE --module--} {SEQUENCE
--string--}
Double click --task-- to select a task name. (These are the same names that appear in the scrolling window on the Task Control Panel.) If --module-- is not specified, the module currently assigned to the task is used. If a module is specified, it must be loaded.
The START_TASK statement begins execution of a task. If the task is not found, no error is reported.
START_TASK --task--
The STOP_TASK statement stops the specified task.
STOP_TASK --task-- {AFTER --event--}
Double-click --task-- to select a task name. (These are the same names thst appear in the scrolling window on the Task Control Panel.) For an immediate stop, leave the --event--argument blank. To select other pauses, double-click --event-- and the remaining pause options are displayed.
As from the control panel, pauses after Operation and Action depend on the particular statement that is executing.
The UNLOAD statement removes a loaded module from memory. If you attempt to unload a module that is assigned to some task, a warning message is displayed and the module will not be unloaded.
UNLOAD MODULE --module--
The WAIT statement causes a sequence to pause for the specified time in hundredths of a second.
WAIT time
Click on the "time" argument and type the wait time in hundredths of a second (for example, a value of 500 equals 5 seconds). The time argument is a constant.
WAIT_VAR --variable--
WAIT_VAR is similar to WAIT. However, the time is specified in seconds instead of hundredths of a second. In this statement, the time argument may be an AIM variable or a constant. (Note that real constants may be specified.) Additionally, the WAIT_VAR statement initiates a V+ WAIT_EVENT.
You can also edit the definitions of the various buttons to specify which module you want to use for the control sequences (see the AIM Customizer's Reference Guide).