Marcos in terminal program

I just bought the SSC-32 controller and a servo. I need to operate it such that I hit a button and the servo rotates to three seperate positions for a defined period of time each. Just something super simple I need for work. I was thinking of using the terminal program and just writing a macro for it but I dont understand how the marcos work. I’ll plug in a series of commands but the servo only reads the last command. Is there a way I can make the servo do a series of commands?

Some time back I posted the below. You may be able to do what you want just using a simple batch file.

lynxmotion.net/phpbb/viewtopic.php?t=1793

Hi
i know you can do it with a micro like the atom and botboard,but the way macro,s work is u can move up to 32 servos at a time but each macro is for 1 position somebody here might could write u some code in VisualBasic
or C++ or something,just hang on sombody with the know how will chime in should,nt be hard ive just never had to do it,…

Could you purhaps type in the series of commands you are typing into the terminal?

Like this…

#0 P1500 #1 P1500 #2 P1500 [enter]
#0 P2000 #1 P1000 #2 P2000 T2000 [enter]
#0 P1000 #1 P2000 #2 P1000 T2000 [enter]

I’m not sure what you mean about “the servo only reads the last command.”

By the way, if you are not a programmer, or don’t want to write a custom program, the Sequencer program is really what you want to be using. It has the ability to learn sequences, and play them from another application from the socket server.

In response to Robot dude, I could do that but I need it to be done accurately. What I need is one servo to start at position x, then after s seconds move to position y, then after s seconds move to position z, then after s seconds move back to position x, where I can then hit a button to start the process all over again.

Based in his last reply I agree, this could be done with a batch file. Is there any way to do delays in batch files. It’s been a long time since I’ve done anything like that. :blush:

Edit: a quick google search tells me the SLEEP N command will pause for N seconds before processing the next command.

#0 P1500 > com1
sleep 5
#0 P1000 T1000 > com1
sleep 5
#0 P2000 T1000 > com1
sleep 5
#0 P1500 T1000 > com1
pause

“pause”

Nope! pause just prints “press any key to continue” and waits forever. :wink:

Heh, yep, yer right… wrong script language. :unamused:
hmm… well maybe zoomkat has something on hand.

The below batch file code would put a 5 second delay between the servo moves using a ping delay. I don’t have an ssc-32 to try it on, but I’ve used a similar setup with other servo controllers. In device manager you would need to verify the com port is set at the desired baud rate and the correct com port is used.

@echo off
echo moving servo #0
echo #0 P1500 > com1 
echo 5 second delay
ping -n 6 127.0.0.1 >nul 
echo #0 P1000 T1000 > com1 
echo 5 second delay
ping -n 6 127.0.0.1 >nul 
echo #0 P2000 T1000 > com1
echo 5 second delay 
ping -n 6 127.0.0.1 >nul 
echo #0 P1500 T1000 > com1 
echo done
echo Did it work?
pause