Synchronisation between botboard and SSC-32

Hi,

I’m sending commands from by botboard to the SSC. What is the best way to make sure that the command is executed before I send the next one?

What I do right now is:

  1. Send a command like “#0 P1500 T500”
  2. Let the main loop wait “pause 500”
  3. Send next command

Because the main loop also takes some time to do other stuff the 2 times can’t be exactly the same. The position will never be reached if I make the pause time to small. And the servo stops and starts if I make it to long! Can you see somewhere what the cycle time of the program is?

I don’t need a really tight synchronisation; I just want my servo’s to reach to the correct position without stopping.

How do you solve this kind of things?

Thanks!

Xan

You can query the movement status.

Q

It will return a + if the move is still in process, or a . when the move is complete. :wink:

Check out “Kurte’s code” recently posted for the “WaitForSSC” routine. He’s waiting for the ‘+’ to be gone ( get a ‘.’).

Alan KM6VV

I also do the same thing in my Python code. :slight_smile:

8-Dale

Here is a thread that may help you.

lynxmotion.net/viewtopic.php?p=36637#36637

Sry for my late reply. I was out of town for a couple of days…

Thanks for all the replies, i’m gonne try this as soon as possible but on this moment i only have got one way communication between the botboard and the SSC. And sinds my SSC is inside my bot, i need to take it apart to add the wire. So i’m gonne try this in about a few weeks :wink:

Xan