Maestro 6

how do you open servo one with servo two still running, by time or any way , new at this and try to do this for 2 days now , THANNKS TERRY

Hello, Terry.

Can you please be much more explicit about what you are trying to do and what you have tried so far? It is not possible to help you in a meaningful way with the information you have currently provided. You can find some helpful suggestions on how to make a good opening post here:

- Ben

[code]0000: – # Sequence 0
0000: 040203002D – 3 0 acceleration
0005: 04021E002C – 30 0 speed
000A: –
000A: – begin
000A: 0304681005002A – 4200 5 servo #arm AT 6:00 #LIKE TO SLOW DOWN ARM BETWEEN 4700 AND 4200
0011: 01D00708 – 2000 delay
0015: –
0015: –
0015: 0304501401002A – 5200 1 servo
001C: 01D00708 – 2000 delay #close gripper AT 6:00
0020: –
0020: 0304701705002A – 6000 5 servo #MOVE TO 11;00
0027: 01881308 – 5000 delay
002B: –
002B: 0304C91701002A – 6089 1 servo # open GRIPPER AT 8:00
0032: –
0032: –
0032: 060A00 – repeat
0035: –
0035: – sub moving_wait # TRYING TO SLOW DOWN ARM BETWEEN 5500 AND 6000
0035: – begin
0035: 2F – get_moving_state
0036: 073C00 – while
0039: –
0039: 063500 – repeat
003C: 05 – return
003D: –
003D: –
003D: –
003D: –

Subroutines:
Hex Decimal Address Name
00 000 0035 MOVING_WAIT[/code]

thanks ben ,maestro 6 with usb for windows 7, i have a arm that is 23 inch long and it hangs at 12:00 goes to 6:00 ,servo 5 is the arm , i just want the arm to move between 6 and 11 ,starting at 6;00 and at the end of the arm is a gripper , 6;00, with a servo 1 , i would like for this to close after the arm is at 6:00 and than , open the gripper around 8:00 , with the arm still moving to 11:00, ( servo 5 ) also like to slow down the arm ( servo 5 ) just befor it get to its stops.( 11:00 and 6:00) thanks for the help terry

[code]# sequence 0
3 0 acceleration
30 0 speed

begin
4200 5 servo #arm AT 6:00 #LIKE TO SLOW DOWN ARM BETWEEN 4700 AND 4200
2000 delay

5200 1 servo
2000 delay #close gripper AT 6:00

6000 5 servo #MOVE TO 11;00

5000 delay

6089 1 servo # open GRIPPER AT 8:00

repeat

sub moving_wait # TRYING TO SLOW DOWN ARM BETWEEN 5500 AND 6000
begin
get_moving_state
while

here is the script also ,thanks for the help, terry[/code]

It sounds like you are new to scripting with the Maestro, so I would suggest starting with getting the motion of one servo how you want it, then moving on to the other. One way you can slow down the servo once it reaches a specific position is to use the “moving_wait” subroutine (from our “Making smooth sequences with GET_MOVING_STATE” example script) to know when the servo reaches a specific point and change the speed and acceleration limits for the rest of the movement (which is what it looks like you were starting to do). The script below is a quick example of how you can use this method. When running this script, your servo should slow down as it approaches the final position, then return to the original position (waiting 5 seconds between movements):

3 5 acceleration #set acceleration limit for servo on channel 5
30 5 speed #set speed limit for servo on channel 5

begin 

4200 5 servo #set servo 5 to initial position

moving_wait  #wait for it to reach that position
5000 delay #stay there for 5 seconds
5500 5 servo #move servo to the spot you want it to start slowing down

moving_wait #wait for it to reach that position
0 5 acceleration #set acceleration and speed to a slower setting
5 5 speed #you can adjust these settings to values appropriate for your application
6000 5 servo #move servo to final position

moving_wait #wait for it to reach that position
5000 delay #stay there for 5 second
3 5 acceleration #set the speed back to the original settings
30 5 speed

repeat


sub moving_wait  #this subroutine will delay until the servo reaches its target position
  begin
    get_moving_state  #please note that this command only works if there is a speed or acceleration limit
  while
    # wait until it is no longer moving
  repeat
  return

Please note that this example only slows the servo down when going in one direction, but not the other. You might try to expand on this example to get the same behavior when going back to the original position. By the way, I noticed that your script sets the acceleration and speeds limits on channel 0, but your servos look like they are connected to channel 5 and 1.

-Brandon