Robot Commands through URCap

Hi everybody!

I’ve made a URCap inside program node, that has 5 buttons in its view.
1.Get actual TCP position - which I managed to retrieve from the real time reader (with the help of Mr. Jacob Bom Madsen and his URCap-getRobotData (GitHub - BomMadsen/URCap-getRobotData: URCap that reads a message from the Universal Robots (UR) Realtime Client on TCP port 30003.)), and send it to the server I’ve written in C++ .
4. Send a command (string) through the same port as section 1 - working just fine.
5. Stop a program from running - get it to work through inner IP (127.0.0.1) in port 29999, as shown here - URCap to Dashboard server commands - #3 by vl4dutz_1 .

As for sections 2 + 3…I want to change each joint mode from normal to freedrive and back.
from the script I’m doing it in that way: freedrive_mode(freeAxes=[0,0,0,0,0,0]) or freedrive_mode(freeAxes=[1,1,1,1,1,1]).

  • any suggestion on how to make it happen?

  • If the answer for the above question is using the primary interface (and if its not it would still be great anyhow), could someone please provide some example on how to preform such command using the primary interface within URCap written in java? I’m trying to get it to work, but I’m doing it wrong, probably very wrong.

Thanks,
Elad.

I’ve used these classes several times in the past. They allow you to execute UR Script from Java.

1 Like

Hi @elad

In addition Jacob’s example we have another one here that also uses the Dashboard server: GitHub - UniversalRobots/MyToolbarJog: Example of using the toolbar to incrementally jog the robot in Cartesian space by sending urscript over the primary client interface

Thank you very much for replying.
I will check it out!

Elad.

Thank you for replying!

I will check your example too.

Elad.