4MELFA-BASIC IV
Multitask function
4-118
4.2.2 Executing a multitask
Table 4-2:The multitask can be executed with the following three methods.
4.2.3 Operation state of each slot
The operation state of each slot changes as shown in
according to the operations and commands.
Each state can be confirmed with the robot status variable or external output signal.
Fig.4-2:Operation state of each slot
Types of execution
Explanation
1
Execution from a program
This method starts parallel operation of the programs from a random
position in the program using a MELFA-BASIC IV command. The pro-
grams to be run in parallel can be designated, and a program running in
parallel can be stopped.
This method is effective when selecting the programs to be run in paral-
lel according to the program flow.
The related commands include the XLoad, XRun, XStp and XRst com-
mands. Refer to
Page 152, "4.11 Detailed explanation of command
in this manual for details.
2
Execution from controller
operation panel or external
input/output signa
In this execution type, depending on the setting of the information of the
"SLT*" parameter, the start operation starts concurrent execution or con-
stant concurrent execution, or starts concurrent execution at error occur-
rence. It is necessary to set the "SLT*" parameter in advance.
This method does not rely on the program flow, and is effective for carry-
ing out simultaneous execution with a preset format, or for sequential
execution.
3
Executing automatically
when the power is turned
on
It is possible to start constant execution immediately after turning the
controller's power on. If ALWAYS is specified for the start condition of
the SLT* parameter, the program is executed in constant execution
mode immediately after the controller's power is turned on.
This eliminates the trouble of starting the programs in task slots used for
monitoring input/output signals from the PLC side.
In addition, it is possible to execute a program from within another pro-
gram that controls movement continuously. In this case, set the value of
the "ALWENA" parameter to 7 in order to execute X** instructions such
as XRun and XLoad, the Servo instruction, and the Reset instruction.
Program
selection state
(PSA)
Waiting
(WAI)
Start
XRUN
Program reset
XRST
XRUN
Cycle stop
Stop
XSTP
Running
(RUN)
Start