Multitasking
When using PERS variables shared across say two Tasks I assume they are read/write thread-safe ?
0
Comments
-
IF You mean that the values in all tasks are updated the same? Then yes.Lee Justice0
-
No meant when two asynchronous Tasks (or threads) simultaneously access a common variable there's usually a system error - have seen it on Staubli robots (a problem I had to fix for a client). This is done by using a mutex or semaphore (ABB has such the WaitTestAndSet instruction). Usually IO is thread-safe, the OS handles collisions - I assume (hope) PERS values are handled like IO0
-
In that case, if you do have separate tasks changing values, (which is probably best to try to avoid), the WaitTestAndSet is a good option. Or, like you mentioned IO, set a bit when one task is modifying a value, and all others must wait for that bit to go low again.Lee Justice0
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