Interval between RS232 commands

14 years 3 months ago #29524895 by rfrancis
I read in the RS232 tech note that, since the controller applies new motor commands (internally) at intervals of 16 ms, it\'s a good idea to insert a delay of 20 ms after each command to avoid multiple commands per cycle.

OK.

Is the same true for queries? In particular, if I want to get the value of the digital input (F), can I only do tis at intervals of 20 ms (or 16 ms), or does it respond faster? What happens if I do not respect the delay and poll this digital input at, say, 200 Hz (5 ms per cycle)? Or faster?

cheers,
Richard

Please Log in or Create an account to join the conversation.

13 years 1 month ago #29525171 by bccreed
Richard,

I am interested in finding out the same thing. Mine is in the context of querying my encoders. I want to find the upper limit. I am going to follow what you said and wait 0.02s after every query....

Hope we get an answer...

-Ben

Please Log in or Create an account to join the conversation.

9 years 11 months ago #29528189 by neoplan
Sorry for the digging but I am also interested on the answer.

We are using SDC1130, a serial-to-usb converter and we have written a python interface to communicate with the controllers because the provided for Linux did not seem to work.

We are sending queries and commands to the controller at various intervals and sometimes we get garbage data as response which seem to occur because of the interval times.

Please Log in or Create an account to join the conversation.

9 years 11 months ago #29528204 by Griffin Baker
Replied by Griffin Baker on topic Re:Interval between RS232 commands
What is the length of time in the intervals you are sending, and what is being given?

If you query the data and receive garbage back, what is the reported back values or data received?

Please Log in or Create an account to join the conversation.

9 years 11 months ago #29528205 by neoplan
There is a query to get information every 1 second and the velocity command that is applied 5-10 times per second.

When those two synchronize, the requests are send very close to each other and the responses are mixed. So actually it is not garbage data rather that mixed data.

Please Log in or Create an account to join the conversation.

9 years 11 months ago #29528206 by roboteq
Replied by roboteq on topic Re:Interval between RS232 commands
The controller will respond to a query within 1ms of receiving it. We have never observed garbage coming out.

Note that one way to make things a little simpler on the computer side is to use the query history feature. Check descripton of the manual.

It allows the controller to send periodically a set of parameters. So all you need to do then is to capture the controller output and parse the strings. This is how Roborun updates the LEDs and charts in the Run screen.

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.063 seconds