Fast communication between tasks
Hello,
I'm doing an application in which I have 2 tasks: the motion one and the secondary one. The secondary task is a semistatic one and it's used to continuously computing the current robot position (this is done to show on the PLC panel the position of the robot in "real time" but also to check when the robot is in a certain position). About the latter purpose, I have defined a shared PERS robtarget called "CurrentPos" in order to compute the position in task 2 using Crobt and to access this robtarget even in task 1 because sometimes I have to perform some movements only if I'm inside a certain range (for example only if coordinate CurrentPos.trans.y > 900 ). When the robot moves slowly there is no problem about this, it perfectly works; but problems arise when the robot moves fast. Indeed it seems like the value of CurrentPos in task 1 is updated with a considerable delay (with respect to the robot motion) which actually makes not reliable the checks on position in task 1. Is there a way to get a faster communication among tasks?
I'm doing an application in which I have 2 tasks: the motion one and the secondary one. The secondary task is a semistatic one and it's used to continuously computing the current robot position (this is done to show on the PLC panel the position of the robot in "real time" but also to check when the robot is in a certain position). About the latter purpose, I have defined a shared PERS robtarget called "CurrentPos" in order to compute the position in task 2 using Crobt and to access this robtarget even in task 1 because sometimes I have to perform some movements only if I'm inside a certain range (for example only if coordinate CurrentPos.trans.y > 900 ). When the robot moves slowly there is no problem about this, it perfectly works; but problems arise when the robot moves fast. Indeed it seems like the value of CurrentPos in task 1 is updated with a considerable delay (with respect to the robot motion) which actually makes not reliable the checks on position in task 1. Is there a way to get a faster communication among tasks?
0
Comments
-
I guess CRobT is not a fast function. Try CPos instead. Do you have any delay (for example WaitTime or TPWrite) in the semistatic task? If you have other tasks in parallel, then try to higher the priority of the task.
0 -
To try CPos could be an idea but I'm not sure it will be so much faster. Yes, I have a WaitTime 0.1 to avoid overload of the cpu.0
-
Is the delay bigger than 0.1? It's a long time for the cpu to wait. Should be better to lower it to 0.01
0 -
Try lower the waittime. Rather split it into several smaller waittimes and spread them out if you have cpu load issues. I did a test once, no waittime = 100 % cpu, and waittime 0.0001 =0% cpu.-----------------
David
Swedish freelance ABB robot programmer0 -
Thank you for your answers! At the end I've found out that it was an issue of the zone of the MoveJ that is before to read the CurrentPos value: even if the position to reach is at y=0 and the zone is z200, it reads the current position when y is > 900 (crazy to think but it's like that). So the solution is to put a smaller zone.0
-
As far as I know both robots and CNC controller do this, they "look ahead" and execute the code on the fly. That's why the rapid code doesn't need to be compiled before executed. Correct me if I'm wrong.-----------------
David
Swedish freelance ABB robot programmer0 -
@Newman
RAPID is an interpreted language, which uses a translator instead of a compiler. That way they are able to look ahead in the code.
1
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 60 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 797 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings