Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question regarding RoboDK API and UR10
#1
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
#2
Hi Edan,

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

You can trigger the connection using Connect (optionally passing the IP):
https://robodk.com/doc/en/PythonAPI/robo...em.Connect

Albert
#3
(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.

You can trigger the connection using Connect (optionally passing the IP):
https://robodk.com/doc/en/PythonAPI/robo...em.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
#4
Hi Edan,

Yes, you can read digital inputs through the API by using getDI:
https://robodk.com/doc/en/PythonAPI/robo...Item.getDI

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

Yes, you can read digital inputs through the API by using getDI:
https://robodk.com/doc/en/PythonAPI/robo...Item.getDI

Albert

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

Thank you,
Edan.
#6
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/blo...pi.h#L2238
 
Albert
  




Users browsing this thread:
2 Guest(s)