09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Basic</strong> <strong>Characteristics</strong> <strong>RAPID</strong> Multitasking<br />

11 Multitasking<br />

The events in a robot cell are often in parallel, so why are the programs not in parallel?<br />

Multitasking <strong>RAPID</strong> is a way to execute programs in (pseudo) parallel with the normal<br />

execution. The execution is started at power on and will continue for ever, unless<br />

an error occurs in that program. One parallel program can be placed in the background<br />

or foreground of another program. It can also be on the same level as another program.<br />

To use this function the robot must be configured with one extra TASK for each background<br />

program.<br />

Up to 10 different tasks can be run in pseudo parallel. Each task consists of a set of<br />

modules, in the same way as the normal program. All the modules are local in each<br />

task.<br />

Variables and constants are local in each task, but persistents are not. A persistent with<br />

the same name and type is reachable in all tasks. If two persistents have the same name,<br />

but their type or size differ, a runtime error will occur.<br />

A task has its own trap handling and the event routines are triggered only on its own<br />

task system states (e.g. Start/Stop/Restart...).<br />

There are a few restrictions on the use of Multitasking <strong>RAPID</strong>.<br />

- Do not mix up parallel programs with a PLC. The response time is the same as<br />

the interrupt response time for one task. This is true, of course, when the task is<br />

not in the background of another busy program<br />

- There is only one physical Teach Pendent, so be careful that a TPWrite request<br />

is not mixed in the Operator Window for all tasks.<br />

- When running a Wait instruction in manual mode, a simulation box will come<br />

up after 3 seconds. This will only occur in the main task.<br />

- Move instructions can only be executed in the main task (the task bind to program<br />

instance 0, see User’s guide - System parameters).<br />

- The execution of a task will halt during the time that some other tasks are<br />

accessing the file system, that is if the operator chooses to save or open a program,<br />

or if the program in a task uses the load/erase/read/write instructions.<br />

- The Teach Pendent cannot access other tasks than the main task. So, the development<br />

of <strong>RAPID</strong> programs for other tasks can only be done if the code is<br />

loaded into the main task, or off-line.<br />

For all settings, see User’s Guide - System parameters.<br />

11.1 Synchronising the tasks<br />

In many applications a parallel task only supervises some cell unit, quite independently<br />

of the other tasks being executed. In such cases, no synchronisation mechanism is necessary.<br />

But there are other applications which need to know what the main task is<br />

<strong>RAPID</strong> Reference Manual 5-39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!