# Client interfaces instructions

**URL:** <https://forum.universal-robots.com/t/client-interfaces-instructions/213>\
**Category:** Robot Communication\
**Created:** [September 2, 2016, 2:12pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213 "2016-09-02T14:12:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon35414674](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@anon35414674](https://forum.universal-robots.com/u/anon35414674)\
**Post date:** [September 2, 2016, 2:12pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213/1 "2016-09-02T14:12:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anon87661449](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@anon87661449](https://forum.universal-robots.com/u/anon87661449)\
**Post date:** [September 2, 2016, 8:45pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213/2 "2016-09-02T20:45:41Z")

</div>

Have a look at the [dashboard server](http://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/dashboard-server-port-29999-15690/) about the robot power and this kind of a [trick](http://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/setting-the-speed-slider-from-a-program-15293/) (using the [client interface](http://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/remote-control-via-tcpip-16496/)) 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.

---

<div class="post-metadata">

**Author:** ![mbush](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mbush/32/76_2.png) [@mbush](https://forum.universal-robots.com/u/mbush)\
**Post date:** [September 4, 2016, 12:30pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213/3 "2016-09-04T12:30:31Z")

</div>

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 @anon87661449 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

---

<div class="post-metadata">

**Author:** ![anon35414674](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@anon35414674](https://forum.universal-robots.com/u/anon35414674)\
**Post date:** [September 6, 2016, 8:52pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213/4 "2016-09-06T20:52:14Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mbush](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mbush/32/76_2.png) [@mbush](https://forum.universal-robots.com/u/mbush)\
**Post date:** [September 6, 2016, 9:05pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213/5 "2016-09-06T21:05:48Z")

</div>

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

Matthew Bush  
Hirebotics ‬

---

<div class="post-metadata">

**Author:** ![anon35414674](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@anon35414674](https://forum.universal-robots.com/u/anon35414674)\
**Post date:** [September 6, 2016, 9:35pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213/6 "2016-09-06T21:35:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mbush](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mbush/32/76_2.png) [@mbush](https://forum.universal-robots.com/u/mbush)\
**Post date:** [September 6, 2016, 11:05pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213/7 "2016-09-06T23:05:18Z")

</div>

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](http://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/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.

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [September 7, 2016, 3:44pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213/8 "2016-09-07T15:44:29Z")

</div>

@anon35414674

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](http://forum.universal-robots.com/t/communication-interfaces/29), and all documentation is available at the Support Site.

---

<div class="post-metadata">

**Author:** ![anon71061951](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@anon71061951](https://forum.universal-robots.com/u/anon71061951)\
**Post date:** [February 4, 2018, 8:24pm UTC](https://forum.universal-robots.com/t/client-interfaces-instructions/213/9 "2018-02-04T20:24:39Z")

</div>

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.
