RoboDK Forum
Question regarding RoboDK API and UR10- Printable Version

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API)
+--- Thread: Question regarding RoboDK API and UR10 (/Thread-Question-regarding-RoboDK-API-and-UR10)



Question regarding RoboDK API and UR10-GoldenDude-11-06-2019

Hello!
I'm currently working on a project using RoboDK API & RoboDK (sim) with a UR10 in it.
I'm coding using C++ and my company's libraries. Everything works just fine when it come to connecting to the sim and moving the robot using the API exclusively.

Now, our plan is to purchase a real UR10 robot and run our program on it. Will it work the same way?
will I be able to use RoboDK API the same way I'm using it to run commands on the simulator & the real robot (changing IP & ports)?

Example:
ROBOT->MoveJ(Mat* mat) ====> Moves the robot in the simulator with no problems. Will it move the real robot as well without any changes other than IP & port?

If not, how will would suggest I approach this?



Thank you!

Edan


RE: Question regarding RoboDK API and UR10-Albert-11-06-2019

Hi Edan,

Yes, you can move the real UR robot directly from your C++ code like you move the simulated robot.

你可以使用Connect (opti触发连接onally passing the IP):
//www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.Connect

Albert


RE: Question regarding RoboDK API and UR10-GoldenDude-11-11-2019

(11-06-2019, 11:37 AM)Albert Wrote:Hi Edan,

Yes, you can move the real UR robot directly from your C++ code like you move the simulated robot.

你可以使用Connect (opti触发连接onally passing the IP):
//www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.Connect

Albert

Thank you Albert!

I have another question regarding Read/Write IOs.
I know you can set Digital Output (1/0) on the robot with SetDO(). Is there a way to READ these values using C++?
Further more, I've probably missed the functions in the API, but what are the ways to Read&Write variables (ints, strings, etc...) using C++?

Edan


RE: Question regarding RoboDK API and UR10-Albert-11-11-2019

Hi Edan,

Yes, you can read digital inputs through the API by using getDI:
//www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.getDI

Albert


RE: Question regarding RoboDK API and UR10-GoldenDude-11-13-2019

(11-11-2019, 06:57 PM)Albert Wrote:Hi Edan,

Yes, you can read digital inputs through the API by using getDI:
//www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.getDI

Albert

I can't seem to find this function in theC++API or in the source/header file.
Do I need to add the function myself?

Thank you,
Edan.


RE: Question regarding RoboDK API and UR10-Albert-11-13-2019

Hi Edan,

The option to read digital inputs has been recently added so you may have to take our latest RoboDK API files (robodk_api.h and robodk_api.cpp) from the RoboDK API repository on GitHub:
https://github.com/RoboDK/RoboDK-API/blob/master/C%2B%2B/Example/robodk_api.h#L2238

Albert