Calling a procedure from a background task possible?
Hi,
I'm doing a project were the goal is to calibrate a robot using three laser measurement tools.
The lasers are connected to my laptop where is pass the measurements through a socket to the robot. I have two tasks, one responsible for the movement and one acts as a server (background task), I wish to be able to call a procedure "measure_A" from the background task in the movement task, is this possible? Or do I have to use a peraistant variables to pass the measurements to the main module? That solution seems a bit wasteful since then im updating three variables constantly without using them.
Also, any tips on how I can rotate the workobject the robot is holding by a certain amount of degrees? Is there any commands for this?
Im coding the robot to use the lasers to calculate if the workobject has slipped or moved after it has been lifted so when it puts it down, it will always place the object as it was intended.
Thank you
I'm doing a project were the goal is to calibrate a robot using three laser measurement tools.
The lasers are connected to my laptop where is pass the measurements through a socket to the robot. I have two tasks, one responsible for the movement and one acts as a server (background task), I wish to be able to call a procedure "measure_A" from the background task in the movement task, is this possible? Or do I have to use a peraistant variables to pass the measurements to the main module? That solution seems a bit wasteful since then im updating three variables constantly without using them.
Also, any tips on how I can rotate the workobject the robot is holding by a certain amount of degrees? Is there any commands for this?
Im coding the robot to use the lasers to calculate if the workobject has slipped or moved after it has been lifted so when it puts it down, it will always place the object as it was intended.
Thank you
0
Comments
-
You could use persistent data between the tasks, or maybe setup a virtual signal that your background task turns on, and then the foreground task will trigger a trap routine. If you want to rotate the workobject, I suggest that you write the values into the oframe.Lee Justice0
-
Thank you for the quick answer!
I'm not familiar with the TRAP functions of RS, but after reading your comment i thought of perhaps creating a persistent boolean in the foreground task that becomes true and in turn updates the persistent measurement value (like a if statement or so) from the background task. This might work although it seems to be a very rough solution.
Is the oframe the object frame?
Right now i have designed the path of the robot to get to the object, lift the object and then i have a target point where i want to start the calibration. From that point the robot moves the object into the lasers and calculates if it holds the object leveled and if not it should rotate the object with alpha degrees. Then it should go back to the target point and continue its path and eventually put the object down.
If i was to rotate the oframe with alpha degrees, would it cause the object to move in any direction so that when i put it down it might not be aligned the way it supposed to be? Hope you understand what i mean, its hard to explain since im kind of new to RS.0 -
Yes, the oframe is the object frame, it is superimposed on the uframe. If you rotate the oframe, it should go the amount that you specify, not randomly.Lee Justice0
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
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings