Speed slider thru Modbus and Dashboard

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.

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
1 Like

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

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

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

Thanks,

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

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?

Some news about get speed?

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)

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

image

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

1 Like