Problem with Maestro 6-channel servo controller script

Hi,
I am using the Micro Maestro 6- channel servo controller to control two servos. I want to change the speed of the first servo across different frames. The first servo should go to position A at a slower speed and then back at full speed. I have checked the documentation and read some forum posts and have managed to write a script which works. The problem arises when I want the first servo to go to position A and back at full speed (no speed restrictions). The script does not work when i set the speed to 0, but works for other speeds (5,10,15 etc.) The script runs when i “step through” it but not when I hit “Run Script”. Any help would be appreciated. I have posted the code below.

# new setup C bend w/ fb variable stage 1 speed

begin
 10 2 0 3 speed speed # does not work if speed of servo 2 is set to 0 at the beginning 
    5240 8000  frame_0_2..4 # Frame 0
moving_wait 
  0 2 0 3 speed speed #waits till servo 2 stops moving and changes speed of servo 2 from 10 back to 0
  800 6208 3968 frame_2_3 # Frame 1
  200 8000 frame_3 # Frame 2
repeat

 sub frame_0_2..4
  3 servo
  2 servo   
  return

sub moving_wait
begin
get_moving_state
while
# wait until it is no longer moving
repeat
return


sub frame_2_3
  3 servo
  2 servo
  Delay
  return

sub frame_3
  3 servo
  delay
  quit

Hello.

Because of the way the get_moving_state command works and the way the speed limiting is handled on the Maestro, when there is no speed limit set (speed is set to 0), get_moving_state will always return 0 (even if the servo is still moving). A more detailed description of how the Maestro handles speed limiting and the get_moving_state command can be found in this thread. Even more information on the get_moving_state command can be found in the Maestro user’s guide under the “Serial Servo Commands” section.

- Amanda