Ssc32 doesn't do what i expect

i have programmed the next code in my basic atom 28.

main
start:
serout p12,i38400,"#0 P1100 T10000",13]

serout p12,i38400,"#0 P1900 T10000",13]

goto start
end

what i expect is that the servo with is connected to pin 0, move in 10 seconds from possition 1100 to position 1900 and back.

But this is not the case, the servo moves very quick and doesn’t reaches the possitions 100 and 1900.

any ideas why??

Hello there,

This is an easy one.

You need to pause in between the serout commands. Like this…

main start: serout p12,i38400,"#0 P1100 T10000",13] pause 10000 serout p12,i38400,"#0 P1900 T10000",13] pause 10000 goto start end

See… easy. :smiley: Thanks, Jim

ok, that is easy. thanks for the answer.

maybe lynxmotion needs to change the documentation, because this is the example on the lynxmotion web site, see lynxmotion.com/images/html/proj53a.htm

Ah, thanks for bringing that to my attention. The examples are now correct!

So does that mean I have to wait until the previous command be done if I want to issue another command? and if it is, I have to command every servo of a robot arm within a group move or I can only move one servo by one servo?

If you send a move, or group move command to the SSC-32 you must wait till the servos that are moving arrive at the destination before you send a new position command for those servos. :open_mouth: But you can certainly send another move command to the SSC-32 for other servos. If you send a new position command for the servos that are moving, they will immediately start to go to the new destination.

You can also start a move, and poll the SSC-32 to see if the move is complete. This can help you make use of the time for other operations.

When a command is sent the SSC-32 immediately processes the command and is then immediately ready to accept a new command.

Hope this helps…

That’s help me a lot, Thanks