4-119
Multitask function
4MELFA-BASIC IV
<About parameters related to task slots>
The parameters SLT1 to SLT32 contain information about the name of the program to be executed, operation
mode, start condition, and priority for each of the 32 task slots (set to 8 slots at the factory default setting).
Please refer to
Page 343, "5 Functions set with parameters"
for details.
*Designation format
Parameter name = 1. program name, 2. operation format, 3. starting conditions, 4. order of priority
*Various setting values and meanings
*Setting example
An example of the parameter settings for designating the following items in slot 2 is shown below.
Designation details) Program name : 5
Operation format : Continuous operation
Starting conditions : Always
Order of priority : 10
SLT2=5, REP, ALWAYS, 10
Item of parameter
Default value
Setting value
Explanation
1. Program name
SLT1: Program
selected on the
operation panel.
SLT2 to 32: Name
of the program to
be specified with a
parameter.
Possible to set a registered
program
Use the parameter to specify the execution of predeter-
mined programs in multitask operation. If the programs to
be executed vary depending on conditions, it is possible to
specify the program using the XLoad and XRun instructions
in another program. The programs selected on the opera-
tion panel are set if SLT1 is specified.
2. Operation format
REP
REP : Continuous operation If REP is specified, the program is executed again from the
top after the program ends when the final line of the pro-
gram is reached, or by execution of the End instruction.
CYC : One cycle operation
If CYC is specified, the program ends after being executed
for one cycle and the selected status is canceled. Change
the SLOTON setting of the parameter if it is desired to keep
the program in the selected status. Please refer to the sec-
tion for SLOTON in
Page 343, "5 Functions set with param-
for details.
3. Starting conditions
START
START : Execution of a pro-
gram using the START but-
ton on the operation panel
or the I/O START signal
Select START when it is desired to start normally.
Note1)
Note1) The start operation conducted from the operation panel or by sending the dedicated input signal
START will start the execution of programs of all the task slots whose start conditions are set to
"START" at the same time.
To start the program independently, start in slot units with the dedicated input signal (S1 START to
S32START). In this case, the line No. is preassigned to the same dedicated input/output parameter.
Refer to
Page 416, "6.3 Dedicated input/output"
in this manual for details on the assignment of the
dedicated input/output.
ALWAYS : Execution of a
program when the control-
ler's power is turned on
Use ALWAYS when it is desired to execute the program in
constant execution mode. Note, however, that it is not pos-
sible to execute movement instructions such as Mov during
constant execution of a program. Programs in constant exe-
cution mode can be stopped via the XStp instruction. They
cannot be stopped via the operation panel and external
input signals, or emergency stop.
Error : Execution of a pro-
gram when the controller is
in error status
Specify Error when it is desired to execute a program in
case an error occurs. It is not possible to execute instruc-
tions for moving the robot, such as the Mov instruction. The
operation mode (REP/CYC) is one-cycle operation (CYC)
regardless of the setting value.
4. Order of priority
(number of lines exe-
cuted in priority)
1
1 to 31: Number of lines
executed at one time at mul-
titask operation
If this number is increased, the number of lines executed at
one time for the task slot is increased. For example, if 10 is
specified for SLT1, 5 for SLT2, and 1 for SLT3, then after 10
lines of the program specified in SLT1 have been executed,
five lines of the program specified in SLT2 are executed,
and then one line of the program specified in SLT3 is exe-
cuted. Afterward this cycle will be repeated.