
6. The SPEL+ Language
6.13 Multi-tasking
For some applications, you may want to control other equipment besides the robot, such as
conveyors, pick and place units, etc. By using multi-tasking, you can control this other
equipment with their own tasks.
SPEL
+
supports up to 16 tasks running simultaneously. A task is a function that has been
started by the system or by the Xqt statement.
Use the Xqt
statement to start another task from within a function. You can optionally
specify a task number from 1 to 16 in the Xqt statement.
The table below shows the program instructions that are used for multitasking.
Statement Purpose
Xqt
Starts a function as a task.
Halt
Temporarily suspends execution of a task.
Resume
Resumes a task that has been halted.
Quit
Stops a task.
Signal
Sends a signal to one or more tasks that are waiting for the signal using
WaitSig.
SyncLock
Locks a resource for use by the current task and blocks other tasks fro
using the resource until SyncUnlock is executed.
WaitSig
Waits for a signal from another task.
Pause
Pause all tasks.
One example for starting another task is to run a conveyor system for the robot work cell.
Program: MAINTASK.PRG
Function Main
Xqt Conveyor ' Start the conveyor task
Do
...
...
Loop
Fend
Program: CONVTASK.PRG
Function Conveyor
Do
Select True
Case Sw(10) = On
Off convCtrl
Case Sw(11) = On
On convCtrl
Send
Loop
Fend
EPSON RC+ 5.0 (Ver.5.4) User's Guide Rev.4 161
Comentários a estes Manuais