RobotStudio event

PC to IRC5 communication, howto

Options
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

Comments

  • carlosmtz2000
    Options
    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
    Carlos Martinez
    ABB
  • Thomas J
    Options
    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;
    Thomas H. Johnston
    PACs Application Engineer
  • Laro88
    Options
    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.
  • Thomas J
    Options
    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...
    Thomas H. Johnston
    PACs Application Engineer