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
- 10.4K All Categories
- 5.3K RobotStudio
- 351 UpFeed
- 15 Tutorials
- 9 RobotApps
- 282 PowerPacs
- 404 RobotStudio S4
- 1.8K Developer Tools
- 239 ScreenMaker
- 2.6K Robot Controller
- 251 IRC5
- 36 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 702 RAPID Programming
- 14 Wizard Easy Programming
- 107 Collaborative Robots
- 3 Job listings