Task Variables
It is possible to use the same variables in more than one task, by that i mean creat the variable in one task and the the value on other one??
Thanks
0
Comments
-
Hi Ricardo,You need to define that variable as Persistent in both tasks.e.gPERS num nVar:=1;BR.Erdem Karaçeper0
-
I have tried to avoid this because I was unsure how it would work.if task 1 has it defined as =1 and task 2 has it defined as =2.What will it equal, will it have different values for each task or take whatever value it was assigned last?0
-
Thanks it works fine!0
-
I just want to say that this is a quiet interesting post that you have mentioned here. keep it up.
0 -
mattdavis,
As I could notice here, the variable keeps the las assigned value, it does not matter if it was done in Task1 or Task2. But there is something you must keep on mind: you can only initialize a shared persistent in one task. It means the declaration PERS num nVar:=1; should appear only in Task1 or in Task2, never in both.
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings