Client interfaces instructions

I’m making an application that will connect by socket to the robot.
I wonder if there is any instruction that returns whether the robot arm is power on, and other instruction to modify the speed arm.

Have a look at the dashboard server about the robot power and this kind of a trick (using the client interface) about the speed slider (if this is what you’re looking for).
If you want to control the robot remotely, you should be (at least) familiar with these.

1 Like

Here is a little script that we have that we call in most of our programs, especially during development that allows us to very precisely set the speed slider using the example that @hch gave

def runSlow(speed):
  socket_open("127.0.0.1",30002)
  socket_send_string("set speed")
  socket_send_string(speed)
  socket_send_byte(10)
  socket_close()
end

We will also call this at the beginning of critical speed sections to make sure that the robot is moving at the actual speed that it is designed to run at for instance a tapping operation where it is critical that the robot is moving at the correct speed for the tap that it is running in. So we will call runSlow(1) at the top of that section so that the operator or programmer has not inadvertently moved the slider and causes a crash or broken tap due to the robot not matching the speed of the tool

1 Like

Thank you, that worked very well!.. one more thing, I want to control the robot remotely. Do you have any example to check the digital input and output status and change that values?

Do you mean read/set the status of the IO remotely?

Matthew Bush
Hirebotics ‬

Yes, I mean read/set the status of the IO remotely.

The best way to do that is using the RTDE server that is available starting in version 3.3. With that you are able to set up a structure of data that you want to be kept up to date on such as inputs, outputs, safety states, program states, etc.

UR has a python library available that you can use to create a client. I’ve created a library in nodejs as well as we are developing an application for our remote diagnostics.

It’s a bit cumbersome to set up the first time but once you do it once it’ll make sense. There’s documentation on the UR support site at Real-Time Data Exchange (RTDE) Guide - 22229

If there’s anything I can do to help let me know. If you want to see the nodejs library let me know. We aren’t quite ready to release to the public because not all the functionality is finished and tested.

@javiergv

You can read the I/O’s remotely using a lot of different options, depending on your timing needs and complexity.

A few options:

  1. Modbus Server
  2. Primary client interface
  3. Secondary client interface
  4. Realtime client
  5. RTDE as @mbush suggested
  6. Profinet
  7. Ethernet IP

They are briefly explained here, and all documentation is available at the Support Site.

I have a question about the commands sent to the robot.
Nowhere can I find a description of the commands I can send to the robot using socket communication (eg primary or secondary client 30001,30002)
I mean mainly where you got the “set speed” command in the example below?
And how do I know that I have to send the value of this speed later and finally send an information on how many bytes have been sent

socket_open (“127.0.0.1”, 30002)
socket_send_string (“set speed”)
socket_send_string (speed)
socket_send_byte (10)
socket_close ()

in the file Client_Interface_V3.5.xlsx available on the UR webside in “Remote Control Via TCP / IP - 16496” I found nothing like this.

Thank you in advance for your help.

2 Likes