Writing to a file at the same time by two tasks.
AMEENA
✭
in RobotStudio
I have a multitasking system with a foreground task main and a background task back. Both the tasks opens the same file and write 5 statements in each task by using Write or Append file instruction. The problem is when we execute the tasks by using normal flexpendent write operation TPWrite, first the statementAlso s in foreground task printed first in the flex pendent console and then the statements in background tasks get printed in the flex pendent console. But when we write or append the same instructions on to a file, the file looks like it prints the statements in foreground and background task in no order. What we can do to get an output as in the flexpendent to our file. Is there any way to print the output in the order of priority of tasks to a common file? Also when we use Waittime in foreground task before executing the Write Or append statements, then also that waiting is not reflected in the output file. Means before waiting ,the instructions already executes first.
0
Comments
-
I have a multitasking system with a foreground task main and a background task back. Both the tasks opens the same file and write 5 statements in each task by using Write or Append file instruction. The problem is when we execute the tasks by using normal flexpendent write operation TPWrite, first the statementAlso s in foreground task printed first in the flex pendent console and then the statements in background tasks get printed in the flex pendent console. But when we write or append the same instructions on to a file, the file looks like it prints the statements in foreground and background task in no order. What we can do to get an output as in the flexpendent to our file. Is there any way to print the output in the order of priority of tasks to a common file? Also when we use Waittime in foreground task before executing the Write Or append statements, then also that waiting is not reflected in the output file. Means before waiting ,the instructions already executes first0
-
It sounds to me like you could make good use of the instruction WaitTestAndSet or the function TestAndSet, they do pretty much the same thing.Lee Justice0
-
OK Thank you.
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