Share Variables Between Tasks
Hi,
I would like to share some variables and it's values between different tasks.... I've already done before but, I'm actually doing the commissioning of an IRB2600 RW6.03.02 and it's not sharing the values.
I'm defining same variables in the 3 tasks.
And updating them in one of the Tasks.
And it's only taking the values in the Tasks that where I read the CheckDate procedure.
Am I missing something?
Thanks,
Daniel
I would like to share some variables and it's values between different tasks.... I've already done before but, I'm actually doing the commissioning of an IRB2600 RW6.03.02 and it's not sharing the values.
I'm defining same variables in the 3 tasks.
VAR string date;
VAR string time;
And updating them in one of the Tasks.
PROC CheckDate()
!Save date and time in a variable
date:=CDate();
time:=CTime();
ENDPROC
And it's only taking the values in the Tasks that where I read the CheckDate procedure.
Am I missing something?
Thanks,
Daniel
Un saludo, kind regards,
Daniel Aguilar
Automation Engineering
0
Comments
-
Hi,
if you want to share variables you have the follwing both possibilties:
1. You create a separate module with the both variables and load it shared via the system paramter "Controller --> Automatic loading of modules". If the module is loaded the variables will be available in all tasks.
2. You define in each task where you want to use the data as persistent. In one task you define a start value and in the other task you define the persistent without start value. In this case you have noch problem which data wil be used if you loading the modules into the tasks.
Example:
TASK 1:
PERS string date:="";PERS string time:="";
TASK 2:
PERS string date;PERS string time;/BR
TASK 1:
PERS string date;PERS string time;
Micky
1 -
Micky said:Hi,
if you want to share variables you have the follwing both possibilties:
1. You create a separate module with the both variables and load it shared via the system paramter "Controller --> Automatic loading of modules". If the module is loaded the variables will be available in all tasks.
2. You define in each task where you want to use the data as persistent. In one task you define a start value and in the other task you define the persistent without start value. In this case you have noch problem which data wil be used if you loading the modules into the tasks.
Example:
TASK 1:
PERS string date:="";PERS string time:="";
TASK 2:
PERS string date;PERS string time;/BR
TASK 1:
PERS string date;PERS string time;
MickyUn saludo, kind regards,
Daniel Aguilar
Automation Engineering
0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings