# Seting up  multitasking in RPID programs

**URL:** <https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537>\
**Category:** Robot Controller\
**Created:** [April 24, 2010, 1:56pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537 "2010-04-24T13:56:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ittoop](https://avatars.discourse-cdn.com/v4/letter/i/eada6e/32.png) [@ittoop](https://tech-community.robotics.abb.com/u/ittoop)\
**Post date:** [April 24, 2010, 1:56pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/1 "2010-04-24T13:56:06Z")

</div>

```auto
Dear sir,

I would like to the procedure to setup multitasking RAPID routines in
my IRC5 robot. For my application I require three RAPID tasks to run in parallel.
One task will take care of user inputs. second task will monitor some
interlocks. third one will monitor and display pressure of some chamber on
the flex-pendent.

Thanks and regards
Ittoop

```

---

<div class="post-metadata">

**Author:** ![robot\_at\_apex](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@robot\_at\_apex](https://tech-community.robotics.abb.com/u/robot_at_apex)\
**Post date:** [April 26, 2010, 2:32am UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/2 "2010-04-26T02:32:11Z")

</div>

Hi Ittoop,

to add a task …  
You go to Configuartion-controller -task  
right click to popup option and select add new task. Tasks have three modes. Normal, static and semi -static.  
Robot task can only be normal (stops on e-stop)  
Static and semistatic (the program runs in the backgorund). In semi-static mode on power up the PP starts at top.  
Best to put mechanical units on Normal Task. HIT: you should put debug all tasks in normal before you change them to the perament modes. Robot studio does not let you edit code in static and semistatic mode.

---

<div class="post-metadata">

**Author:** ![ittoop](https://avatars.discourse-cdn.com/v4/letter/i/eada6e/32.png) [@ittoop](https://tech-community.robotics.abb.com/u/ittoop)\
**Post date:** [April 26, 2010, 1:38pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/3 "2010-04-26T13:38:24Z")

</div>

Hi robot\_at\_apex,  
Thanks for your nice replay. I will try as you have explained. And let you know.  
Regards  
Ittoop

---

<div class="post-metadata">

**Author:** ![Yanick](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@Yanick](https://tech-community.robotics.abb.com/u/Yanick)\
**Post date:** [August 9, 2011, 8:06pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/4 "2011-08-09T20:06:13Z")

</div>

Hi,

i search how a semi-static can check if the normal task rob\_1 is in manuel, fault or running  
can you help for this feature or function in rapid…

thank

---

<div class="post-metadata">

**Author:** ![j\_proulx](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@j\_proulx](https://tech-community.robotics.abb.com/u/j_proulx)\
**Post date:** [August 15, 2011, 11:17pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/5 "2011-08-15T23:17:40Z")

</div>

Hello,

You can create a virtual I/O board and map System Outputs to the board. You can then monitor the system outputs in you semi-static task using the DOutput function.

BR

---

<div class="post-metadata">

**Author:** ![Yanick](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@Yanick](https://tech-community.robotics.abb.com/u/Yanick)\
**Post date:** [August 15, 2011, 11:28pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/6 "2011-08-15T23:28:05Z")

</div>

ok, i already use that,

but is wierd, no function to inspect state of other task,

mapping io real or virtual and use process of controler for this type information, is waste power, no?

thank’s

---

<div class="post-metadata">

**Author:** ![bilbooster](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@bilbooster](https://tech-community.robotics.abb.com/u/bilbooster)\
**Post date:** [October 4, 2011, 8:28pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/7 "2011-10-04T20:28:35Z")

</div>

Hy!

I try to add new task, but this button is inactive. Can anybody help me?

Thx

---

<div class="post-metadata">

**Author:** ![Yanick](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@Yanick](https://tech-community.robotics.abb.com/u/Yanick)\
**Post date:** [October 4, 2011, 8:34pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/8 "2011-10-04T20:34:45Z")

</div>

do you have buying the option?

---

<div class="post-metadata">

**Author:** ![bilbooster](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@bilbooster](https://tech-community.robotics.abb.com/u/bilbooster)\
**Post date:** [October 5, 2011, 3:32pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/9 "2011-10-05T15:32:31Z")

</div>

No! I have a free 30days trial version. Maybe, that is the problem?

---

<div class="post-metadata">

**Author:** ![graemepaulin](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@graemepaulin](https://tech-community.robotics.abb.com/u/graemepaulin)\
**Post date:** [October 5, 2011, 9:45pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/10 "2011-10-05T21:45:47Z")

</div>

Hi,

I think what Yanick was asking was have you taken the Multitasking option when setting up your virtual controller?

Regards  
Graeme

---

<div class="post-metadata">

**Author:** ![alexandrewillame](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/alexandrewillame/32/4387_2.png) [@alexandrewillame](https://tech-community.robotics.abb.com/u/alexandrewillame)\
**Post date:** [June 16, 2014, 7:29pm UTC](https://tech-community.robotics.abb.com/t/seting-up-multitasking-in-rpid-programs/3537/11 "2014-06-16T19:29:24Z")

</div>

Here is what worked for me. First of all, you need a controller with the Multitasking option enabled. To do this

- Create a new RobotStudio station with Robot Controller → Choose your robot

- (Controller menu) → right-click on the current station’s controller → Shutdown

- (Controller menu) → System Builder-\> select the controller → Modify…Next-\>Next-\>Next-\>Next-\> Add the following options

623-MultitaskingValidate and restart the controller

Now you have a controller configured correctly. To add a new task

- (Controller menu) → configuration editor → controller → Task → New Task…  
Task name: name your task  
Task in foreground: select the first task  
TrustLevel: NoSafety

It is important to have the type set to SEMISTATIC since this is what allows the task to run in the background. Now you can run multitasking. If you happen to have to modify the background task, it will be impossible to do this directly on the real controller since the task will run indefinitely on the background, even in case of emergency stop. To modify the task

- Change the type of the secondary task to NORMAL
- Do a restart (warmstart)
- Modify the code
- Put the task back to SEMISTATIC
- Restart the controller

Regards,
