Sending coordinates from the C# code to the robot
cosmin
✭
Hello!
I am a beginner in using RobotStudio, RobotWare
and PC SDK. What I am trying to do is to send from a C# program some
coordinates to which the robot arm of an IRB 1600 to move to. I have already
done the part of network discovery and selecting the robot controller in Visual
Studio 2008 using C#. Then when I press a button I want that that some
coordinates to be sent to the robot ad the robot to move there. I am using
RobotStudio 5.14.
Firstly, is this possible?
And secondly, if the answer is yes, how could I
do it? Do I have to write some code for the robot too or the RAPID code can be
included in the Visual Studio 2008 application and when I execute the .exe
program resulting from it the robot will move?
Thank you for your help!
0
Comments
-
Hi cosmin,Welcome to the forum.1) Yes2) You need RAPID code on the controller. In that RAPID code you can have RobTargets, which you then find & edit using PC SDK. I would propose an edited flag (bool) that tells the robot that the targets have been updated as well. So that you can have handshakes back and forth between PC SDK and RAPID.Now you could create a RAPID module and have the controller load it but that is more difficult.PC SDK manual - Chapters[Using the PC SDK - Rapid domain -Working with RAPID data ]
[Using the PC SDK - Rapid domain - RAPID symbol search]Unrelated: why use 2008? Visual Studio 2010 express is free to use.John
Developer Center0 -
Thank you for your input!
So I should create a RAPID program and upload it to the controller with some dummy targets which I will then update from my C# program? Can you please tell me where I could find some examples of RAPID code (maybe some code where some targets are defined) and how I could upload RAPID code to the controller? What editor can I use to edit the RAPID code?
Sorry to ask such basic questions but I have read almost the entire PC SDK Application Manual and I couldn't find these answers.
Thank you in advance!
Unrelated:
The reason I am using Visual Studio 2008 is that in the documentation it is mentioned only Visual Studio 2005 and Visual Studio 2008 and I didn't wanted to have any compatibility issues. Also I have a license for Visual Studio 2008.0 -
Hi, you can also use Socket programming. Robot is the Client and your c# program is the server Or Viceversa. You can write a rapid program which listens for the data from server. Let me know if this is what you required or something else.
Regards
Ravi
0 -
Hi, sorry to highjack this thread but I'm also interested in sending coordinates to the robot via a c# addin.i want to control an irb 140 with a 3rd party controller. i was looking to just set some joint values with the coordinates i geht from the controller. then i would just do a loop which gets the coordinates and feeds it to the joints.is this possible or do i have to write something in rapid too? the goal is just any movement from the robot (only in robotstudio, i only need it on the screen for my thesis) induced by the controlleri was looking to try it with this kind of code: http://developercenter.robotstudio.com/Index.aspx?QS=CVi3NaKsuMAL11RthW/53voAAGspoWyNzZmP9RDZPa9FXNKbk2455ZfWqDdnJ8e/VmIR1avyuXwa3xJ+nPnn5it9TTv9lGlZn74Hk45Sefaxon32rkbvPjl4BJXPzhLu2Ojrex61htBkgUtU6U1+Rp+o2MDqG+aDYyBR29l1dEd2Tp36cS+c73cTOsjOVg84hEaV1Ed94pB15acNmr4F6DVDutk9jLdKH05AbJ9tsn0=
benane2012-07-22 18:49:250 -
Hi Guys,
I did the RAPID/C# communication by searching for the variables, updating them, then writing back. The only problem is that the running rapid program has to finish the MoveL command the program pointer is at before it can respond to the change.
Is there a method to make it more dynamic?
Regards
Mo
0
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