# Speed slider thru Modbus and Dashboard

**URL:** <https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259>\
**Category:** Product Wishlist\
**Created:** [July 23, 2020, 6:16pm UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259 "2020-07-23T18:16:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon6991142](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@anon6991142](https://forum.universal-robots.com/u/anon6991142)\
**Post date:** [July 23, 2020, 6:16pm UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/1 "2020-07-23T18:16:45Z")

</div>

# Summary

Read/Write Acces to the speed slider thru Modbus server or/and Dashboard

# Why is it needed?

Would be easier to have acces to the speed slider thru these communications instead only RTDE, EthernetIP and Profinet that are the only option for this at the time.

---

<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:** [July 27, 2020, 8:58pm UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/2 "2020-07-27T20:58:22Z")

</div>

You can access the slider through a socket connection to port 30003. Here is an example of a script function we use to set the speed slider programmatically within a robot program. You could also send this from an external source, PLC or PC, if you open a client to the server similar to sending a command to the dashboard server.

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

---

<div class="post-metadata">

**Author:** ![mvrooij](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mvrooij/32/2151_2.png) [@mvrooij](https://forum.universal-robots.com/u/mvrooij)\
**Post date:** [August 2, 2020, 9:39pm UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/3 "2020-08-02T21:39:33Z")

</div>

What are the units of speed? m/s or a percentage, like 30 for 30% speed?

---

<div class="post-metadata">

**Author:** ![anon6991142](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@anon6991142](https://forum.universal-robots.com/u/anon6991142)\
**Post date:** [August 2, 2020, 11:05pm UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/4 "2020-08-02T23:05:23Z")

</div>

Yes is a percent. You read/write a real number between .01 and 1.00 with two decimal.

---

<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:** [August 3, 2020, 12:38am UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/5 "2020-08-03T00:38:20Z")

</div>

It’s a percentage represented as float between 0 and 1.

Thanks,

Matthew Bush  
Hirebotics  
M: ‭(615) 479-6151‬

---

<div class="post-metadata">

**Author:** ![duncan](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@duncan](https://forum.universal-robots.com/u/duncan)\
**Post date:** [March 10, 2021, 8:22pm UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/6 "2021-03-10T20:22:41Z")

</div>

Is there an equivalent script to get the speed?

I imagine it would be something like:

def checkSliderValued():  
socket\_open(“127.0.0.1”,30003)  
sliderValue=socket\_get\_var(“target\_speed\_fraction”)  
socket\_close()  
end

The things I’m not sure of are (a) socket\_get\_var only works on integers apparently? and (b) is “target\_speed\_fraction” the correct value to be looking at?

I have an application where I use a server to read it and send the value back to the robot through RTDE but I would like a way to read it if the server isn’t running for any reason.

Edit: Actually, while we’re here, how do you know what the “set speed” command does? Is there a document that outlines all the valid commands that can be sent over sockets?

---

<div class="post-metadata">

**Author:** ![mikiposa](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@mikiposa](https://forum.universal-robots.com/u/mikiposa)\
**Post date:** [November 28, 2022, 5:25pm UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/7 "2022-11-28T17:25:05Z")

</div>

Some news about get speed?

---

<div class="post-metadata">

**Author:** ![duncan](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@duncan](https://forum.universal-robots.com/u/duncan)\
**Post date:** [December 5, 2022, 8:22pm UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/8 "2022-12-05T20:22:36Z")

</div>

Hi mikiposa, we ended up having to set up a separate python server to read the value of target\_speed\_fraction over RTDE and then write it to a float register that we could then read from the robot program using:

`read_input_float_register(11)`

---

<div class="post-metadata">

**Author:** ![claudia](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@claudia](https://forum.universal-robots.com/u/claudia)\
**Post date:** [December 23, 2022, 9:32am UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/9 "2022-12-23T09:32:15Z")

</div>

This works great for me, thanks!  
But how do you know what string to send?  
I wasn’t able to find commands to send directly to real time port 30003 in any documentation

---

<div class="post-metadata">

**Author:** ![casp243k](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@casp243k](https://forum.universal-robots.com/u/casp243k)\
**Post date:** [April 8, 2024, 11:57am UTC](https://forum.universal-robots.com/t/speed-slider-thru-modbus-and-dashboard/8259/11 "2024-04-08T11:57:55Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/1/1b909381d04bdc7a1aace9e6e2df68eea6883fa8.png)

I use this code for my MODBUS speed adjustments, where the modbus signal comes in as 0-100 from a signal generator, dividing it by 100 gives the float value required for adjusting speed through the speed slider
