PCSDK Sending rapid to the robot with C#
tmxkn1
✭
Hi,
I'm a beginner in developing robot software. I'm trying to use C# to send some coordinates to the robot and tell the robot to move to these coordinates.
I have looked into the PCSDK references and also some posts in this forum discussing the same topic. I believe in order to achieve what I'm trying to do, I have to write all the coordinates and motion commands in a Rapid file, and use the Rapid class to execute the Rapid code, am I right?
Is there an available example? I will learn quicker from examples .
Any help is appreciated.
Regards,
Anthony
John Wiberg2012-10-22 09:40:00
0
Comments
-
Its easier to just update the RAPID data directly.First get it like soRapidData myRD= task.GetRapidData("module", "name");
then RapidData has a read and a write method.So you declare a Move in a RAPID routine which uses a specific RobTarget with a name, then you get+edit the data and tell the controller to run the routine.If I have time I will see if I didn't have an example of that somewhere...John
Developer Center0 -
[QUOTE=John Wiberg]
Its easier to just update the RAPID data directly.First get it like soRapidData myRD= task.GetRapidData("module", "name");
then RapidData has a read and a write method.So you declare a Move in a RAPID routine which uses a specific RobTarget with a name, then you get+edit the data and tell the controller to run the routine.If I have time I will see if I didn't have an example of that somewhere...Hi JohnThank you, I see what I can do now.My task involves defining lots of robot targets. It can be easier to update the RAPID data in the way you taught me with a for loop.Anthony0 -
Hi Anthony,Just remember, the motion handler in the controller is always at least one RAPID line ahead. This to calculate the next motion in line.So if you are doing a loop use a minimum of three Move instructions with three targets, preferably more. With some logic which you will be writing to next etc. And a queue, you definately need a queue if you have "lots of robtargets". Ohterwise you'll be doing the common mistake of overwriting the robtargets before they are finished executing.
John Wiberg2012-10-22 10:19:28John
Developer Center0 -
Hi John,Maybe I have misunderstood your words, but did you mean sending a series of robot targets to the controller when the robot is executing the previous ones? That is by pressing a button, the C# program will be executed and create a queue; shortly after the program calculates the first several coordinates, it sends them to the queue and the robot is started; while the robot is moving to these coordinates, the next several coordinates are calculated and added to the queue, on and on.If this is true and if there are thousands of robot targets, will the process use up the PC's memory?Thanks,Anthony0
-
Pretty much yes.Then you write the string to the RAPID data object from the queue.John
Developer Center0 -
[QUOTE=John Wiberg]Pretty much yes.Then you write the string to the RAPID data object from the queue.That's brilliant! Thanks for your help0
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)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings