Shop OBEX P1 Docs P2 Docs Learn Events
Setting Multiple Servos simultaneously with the PSC? — Parallax Forums

Setting Multiple Servos simultaneously with the PSC?

hackman127hackman127 Posts: 34
edited 2007-01-05 22:08 in General Discussion
Is there a way to set the position of multiple servos simultaneously with the PSC through a serial connection? I'd like to synchronize the start of multiple servos at one time.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Luke

The perversity of nature is nowhere better demonstrated by the fact that, when
exposed to the same atmosphere, bread becomes hard while crackers become soft.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-05 17:32
    Luke,

    Each servo message must be sent in sequence but if you send them sequentially the delay is so small it should appear synchronous. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • hackman127hackman127 Posts: 34
    edited 2007-01-05 17:41
    Chris,

    So I can send the PSC a '!SC' + cmd + '\r' more than once without reading the result between each command with no ill effects?

    I'm actually using a class that I have written for the PSC in Python, so a lot of the examples that I had to go by in the documentation lead me to believe that I had to read the result after every \r

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Luke

    The perversity of nature is nowhere better demonstrated by the fact that, when
    exposed to the same atmosphere, bread becomes hard while crackers become soft.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-05 18:24
    Luke,

    There is no reply sent after a position command so there is nothing to read. At the lower baud rate you should be able to send the data at the full speed. It may be possible at the higher baud rate to send too many commands too quickly from a PC, but I have not tried this. If you have 6 channels you want to affect just send the 6 commands right in sequence and you should be set. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • hackman127hackman127 Posts: 34
    edited 2007-01-05 20:34
    Chris,

    The problem sems to have been with running at 38.4k. I set it to run at 2400, ad things are functioning normally.Tank you for the help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Luke

    The perversity of nature is nowhere better demonstrated by the fact that, when
    exposed to the same atmosphere, bread becomes hard while crackers become soft.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-05 21:11
    Luke,

    You can run it at 38.4K but you may need to pace things a bit going out. At 38.4K on a BASIC Stamp you wouldn’t normally receive the characters at quite the rate the PC can generate them. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • hackman127hackman127 Posts: 34
    edited 2007-01-05 22:08
    2400 should give me the speed that I need, so to avoid any further complications, I think I'll just stick there. Thank yo uagain for your help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Luke

    The perversity of nature is nowhere better demonstrated by the fact that, when
    exposed to the same atmosphere, bread becomes hard while crackers become soft.
Sign In or Register to comment.