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.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 338 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 832 RAPID Programming
- 14 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings