Sharing global variable between multiple tasks
pacijent
✭✭
in RobotStudio
Hello to all, I would need some help regarding rapid programming. If we have two or more tasks how can we share some bool variable between them, where to declare them, since they are visible only in task in which they are created. Thanks in advance.
0
Comments
-
Hi Pacijent,I think if you declare it like:PERS BOOL yourName := FALSE;In your main task and like:PERS BOOL yourName;In all the other task, it should be the same value across all tasks.Hope it will workRegards, LarsLars Glud
Danrob A/S1 -
Thanks a lot Lars, that works .0
-
It does not seems to work with a clock.
0 -
Persistent declaration is not allowed in routine"error
0 -
You need to declare PERS out of the routine, as a global, in all the tasks you want to share with. That works fine.
Un saludo, kind regards,
Daniel Aguilar
Automation Engineering
0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 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