Precautions For Creating Multitask Program - Mitsubishi Electric CR750-Q Instruction Manual

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

4MELFA-BASIC V

4.3.4 Precautions for creating multitask program

(1) Relationship between number of tasks and processing time
During multitask operation, it appears as if several robot programs are being processed concurrently. How-
ever, in reality, only one line is executed at any one time, and the processing switches from program to pro-
gram (it is possible to change the number of lines being executed at a time. See the section for the "SLTn"
parameter in
Page 438, "5 Functions set with
increases, the overall program execution time becomes longer. Therefore, when using multitask operation,
the number of tasks should be kept to a minimum. However, programs of other tasks executing movement
instructions (the Mov and Mvs instructions) are processed at any time.
(2) Specification of the maximum number of programs executed concurrently
The number of programs to be run in parallel is set with parameter TASKMAX. (The default value is 8.) To
run more than 8 programs in parallel, change this parameter.
(3) How to pass data between programs via external variables
Data is passed between programs being executed in multitask operation via program external variables
such as M_00 and P_00 (refer to
ables (refer to
Page 145, "4.4.24 User-defined external
An example is shown below. In this example, the on/off status of input signal 8 is judged by the program
specified in task slot 2. Then this program notifies the program specified in task slot 1 that the signal is
turned on by means of the external variable M_00.
<Slot 1>
1 M_00=0
2 *L
3 If M_00=0 Then *L
4 M_00=0
5 Mov P1
6 Mov P2
:
10 GoTo *L
<Slot 2>
(Program of signals and variables)
1 If M_In(8) <> 1 Then *A1
2 M_00=1
3 *A1
4 Mov P1
:
(4) Confirmation of operating status of programs via robot status variables
The status of the program running with multitask can be referred to from any slot using the robot status vari-
ables (M_Run, M_Wai, M_Err).
Example) M1 = M_Run (2) The operation status of slot 2 is obtained.
Refer to
Page 155, "4.6 Robot status variables"
(5) The program that operates the robot is basically executed in slot 1.
The program that describes the robot arm's movement, such as with the Mov commands, is basically set
and executed in slot 1. To run the program in a slot other than slot 1, the robot arm acquisition and release
command (GetM, RelM) must be used. Refer to
in this manual for details on the commands.
4-128 Multitask function
parameters"). This means that if the number of tasks
Page 144, "4.4.22 External
variables").
; Substitute 0 in M_00
; Wait for M_00 value to change from 0.
; Substitute 0 in M_00
; Proceed with the target work.
; Repeat from step 2.
; Branch to line 30 if input signal 8 is not ON.
; Substitute 1 in M_00
; Proceed with the target work.
for details on the robot status variables.
Page 168, "4.13 Detailed explanation of command words"
variables") and the user-defined external vari-

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents