RobotStudio event

Multi Tasking

Hi,
    I want to write a multi tasking program. For this purpose I created two tasks. T_ROB1 and T_ROB2. T_ROB2 doesnt contains any movement instructions. T_ROB1 has a progam which needs data from a program in T_ROB2. How can I pass this data between these two programs?





Comments

  • You can use a variable declared as PERS for the shared data. It must be declared in both tasks, but will be stored in shared memory.
    Henrik Berlin
    ABB
  • The problem with PERS is the value cannot be changed. I would like to get the position of the robot from T_ROB2 and send it to T_ROB1. T_ROB2 receives the robot position using TCP/IP communication from the camera.
  • I think you can change the value of a PERS variable. It is the same as a normal variable except that it remembers the last value that it was assigned, even if the program is stopped and started again.
  • Thanks for the help. With some modifications of my program it works with persistant variables.