Mini Maestro 24-channel stop command

hi,

if i move a servo with a “KeyDown”-button from min. position to max. position, the servo moved to the max. position while i dont press the “keydown”-button!

My advisement is

  1. i send a “stop here”-command on “KeyUp” (if it exist)

  2. i make a loop that checks whether the button is Down or not an move the servo step by step.
    I must send many commands to the maestro… i think min. 6 command in a second á 24 servos.
    6 * 24 = 144 commands in 1 second, can the maestro process that?(this time i send commands via usb from vb.net)

or other ideas???

There is a KeyUp event in .NET so you should use that. The Maestro should be able to handle 144 USB Set Target commands per second, but if it has too much lag then you could use the virtual COM port and send the command that sets multiple servo targets.

The next time you ask for programming help you should make it more clear what language and development environment you are using (VB .NET and Visual Studio) so we can tell what you’re talking about (mentioning it in parentheses at the end is not adequate).

–David

i meen exist “stop-here”-command???

how do you do that?

ok i’ve got it

i set target to 0 and the servo stops

thx 4 help

an other problem…

if i stop the servo and set a target again, the servo move with fullspeed no matter which speed is set

how can i fix this?

Your problem is happening because you are setting the target to 0, and I have a workaround for you, but I’d like more information first. Why are you stopping the servo by setting the target to 0? When you set the target to 0, the Maestro stops sending pulses, which means that your servo will stop trying to maintain any particular position, and it is susceptible to being moved by hand. Why not just leave the target alone and let the servo maintain its position?

–David

as i said i want a “key down”-function which set the target an move the servo as long i press the button, if i release the button the servo have to stop, if i pressed again the servo have to move to the target

which serial-command can do this?

Your description is kind of confusing to me, starting with this phrase: “move the servo as long i press the button”. That phrase is confusing because typically (unless the servo is under heavy load, or you have enabled speed/acceleration limits on the Maestro) when you set the target, the servo will move to the target in less than a second and stop moving. So it was hard for me to imagine what you meant, but I think I figured it out:

You have a servo which starts at position A. While a button on your keyboard is pressed, you want the servo to be slowly moving towards position B. When your button is not pressed, you want the servo to stay still. You don’t ever want your servo to move quickly.

Is that what you are trying to do?

–David

an example:

one step of a robot is 5 seconds long

the robot walks long as i holt the button pressed. if i release the button the robot have to stand in this position it is

from start position 0 with speed 20 to target position 254

i send a command that the target set to 254
if i release the button(at position 140) the leg still go to position 254!
i want that the leg “stop” at position 140
and if i press the button again the leg have to go from position 140 to 254 with speed 20

as I said my english is mostly translate from google :smiley:

Okay. What you want is to set the servo’s target equal to its current position. This will make the Maestro keep sending pulses, but the pulse width will stop changing.

One way to do this is with serial commands: use the Get Position command to get the position of the servo, then use the Set Target command to set the target equal to the position value you just read.

An easier way is to store a script on the Maestro that does all the work for you. Here is a script with a single subroutine that stops all of the servos:

# Stops all servos from moving by setting target = position.
sub stop_all_servos_here
  0 begin dup 24 less_than while
  dup dup get_position swap servo
  1 plus
  repeat
  drop
  quit

You should save that script on to your Maestro, then call it from your PC application using the Restart Script at Subroutine serial command. Assuming that this is the first subroutine in your script, that serial command would be 0xA7, 0x00.

–David

ok… i love you… thanks a lot

it works “richtig geil” would we say in germany

the line “stop_servo_here” is importent for anything??? i’ve Commented that (#stop_servo_here)

Oops! That line of code was a mistake. I will now fix my last post. I’m glad it’s working for you! --David