# PC to IRC5 communication, howto

**URL:** <https://tech-community.robotics.abb.com/t/pc-to-irc5-communication-howto/3181>\
**Category:** RobotStudio\
**Created:** [November 10, 2009, 11:00am UTC](https://tech-community.robotics.abb.com/t/pc-to-irc5-communication-howto/3181 "2009-11-10T11:00:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laro88](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/laro88/32/2653_2.png) [@Laro88](https://tech-community.robotics.abb.com/u/Laro88)\
**Post date:** [November 10, 2009, 11:00am UTC](https://tech-community.robotics.abb.com/t/pc-to-irc5-communication-howto/3181/1 "2009-11-10T11:00:03Z")

</div>

I need to send special control variables during a sequence of move instructions.

Is there a recommended way to do so…

I need to send a couple of bools and numbers to a couple of tasks in the controller.

The messaging domain does not seem to support variable identification that enables simple splitting of variables such as the string “bool#startbit#true” into functionality such as  
startbit:=true;

Does anyone have a suggestion to do this.

If in C# it would be trivial to write a class doing so ( event setting target properties using reflection ) and then instantiate the class in each Task.

Does the IRC5 controller support shared functionality between tasks in any way, something like “class in thread C# style”

Regards

---

<div class="post-metadata">

**Author:** ![carlosmtz2000](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@carlosmtz2000](https://tech-community.robotics.abb.com/u/carlosmtz2000)\
**Post date:** [November 10, 2009, 4:29pm UTC](https://tech-community.robotics.abb.com/t/pc-to-irc5-communication-howto/3181/2 "2009-11-10T16:29:15Z")

</div>

Hello,

If you want share values between RAPID tasks, you only need to define the data as persistent in each task. As example:

Task: T\_ROB1 → PERS num myShareData := 1;  
Task: T\_BACK\_1 → PERS num myShareData := 1;

The system will link these data and share their values between the tasks

BR

---

<div class="post-metadata">

**Author:** ![Thomas\_J](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@Thomas\_J](https://tech-community.robotics.abb.com/u/Thomas_J)\
**Post date:** [November 10, 2009, 4:48pm UTC](https://tech-community.robotics.abb.com/t/pc-to-irc5-communication-howto/3181/3 "2009-11-10T16:48:04Z")

</div>

To avoid task default data delceration confusion, only set a value in one task, without value in the other.

Task: T\_ROB1 → PERS num myShareData := 1;  
Task: T\_BACK\_1 → PERS num myShareData;

---

<div class="post-metadata">

**Author:** ![Laro88](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/laro88/32/2653_2.png) [@Laro88](https://tech-community.robotics.abb.com/u/Laro88)\
**Post date:** [November 10, 2009, 6:58pm UTC](https://tech-community.robotics.abb.com/t/pc-to-irc5-communication-howto/3181/4 "2009-11-10T18:58:26Z")

</div>

Thank you to you both, the initial race condition is quite noteworthy.

How about Virtual IO, any takes on that? Why (not) / How to / Pitfalls ?

Regards & with appreciation.

---

<div class="post-metadata">

**Author:** ![Thomas\_J](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@Thomas\_J](https://tech-community.robotics.abb.com/u/Thomas_J)\
**Post date:** [November 10, 2009, 7:22pm UTC](https://tech-community.robotics.abb.com/t/pc-to-irc5-communication-howto/3181/5 "2009-11-10T19:22:39Z")

</div>

Virtual IO between tasks is no problem, since the IO is Global and can be seen by all tasks.

Define the required unit/signals on Virtual bus - I prefer to use Digital Outputs, since they can be set/reset programatically. If yyou want to use Digital Inputs, they would have to be cross connected from an output anyway (just more work).

Prefer PERS declared RAPID data between tasks, this way you do not consume IO unnecesarily…
