RobotStudio event

Share variables between 3+ RAPID Tasks

Hello community,

I am working with an IRB 2400/16 and I am developing an applications which uses 3 tasks: T_PAR, T_EXTRUDER, T_ROB1.

T_PAR is a tasks which communicates via socket for getting a data message and save the message in 8 variables: 6 for the pose and 2 for speed and extrusion parameter.

T_EXTRUDER: takes the extrusion parameter from the reading in T_PAR and makes a communication socket with another device.

T_ROB1: Takes the pose data from T_PAR and executes the motion.

Question: the variables are saved in SYSTEM module and shared installing the module in the autoloading. But they are only shared between T_PAR and T_EXTRUDER. Is it normal?

Thank you in advance

Fede

Best Answers

  • lemster68
    lemster68 ✭✭✭
    Answer ✓
    The Data must be declared as PERS in all tasks which must share it.
    Lee Justice
  • Newman
    Newman
    Answer ✓
    Kappa95 said:
    But with PERS the data can be modified between all tasks? 
    Yes as long as you declare data as PERS and with same name you can read/write the data in all tasks.

    I usually only to declare the "initial value", the :=, in one of the task, e.g.
    T_ROB1: bTest:=TRUE;
    T_ROB2: bTest;
    T_ROB3: bTest;
    -----------------
    David
    Swedish freelance ABB robot programmer

Answers

  • But with PERS the data can be modified between all tasks? 
  • yes
    -----------------
    David
    Swedish freelance ABB robot programmer
  • lemster68 said:
    The Data must be declared as PERS in all tasks which must share it.
    This is not the case when the module is installed shared, all data in an installed shared module are shared between tasks. Even data declared as VAR.
    //Markus Näslund