The task of this project is to construct a Dancer and allow it to spin two full revolutions from one extreme twist to the other. All these interesting "dance" steps can be easily programmed by using absolute and relative moves.
The following scripts file is a sample program for the DANCER which is included in the RCS-6 Manual, 7/95 page 67.
invert all off # since servos 1-4 have same orientation
forget all # as usual, put this at top so Alt-F8 can rebuild macros.
macro slow; maxspd all 30; accdec all 8; end; # handy speed settings
macro fast; maxspd all 75; accdec all 20; end;
macro zpos; move 1,2,3,4,5 to 0; end; # handy centering command
# spin all the way one direction, then all the way the other
macro spin; move 1,2,3,4 to minpos; move 1,2,3,4 to maxpos; end;
# test out the spins, slow then fast
slow; zpos;
spine 2;
fast; spin 2;
zpos;
# define some more macros that move in small lurches.
macro jog_pos; jump 1,2,3,4 by 50; pause 1; end;
macro jog_neg; jump 1,2,3,4 by -50; pause 1; end;
# jog back and forth
jog_pos 20;
jog_neg 35;
jog_pos 25;
jog_neg 10;
# define a macro that nods the head side to side, then do it.
macro nod; move 5 to 0; move 5 to -500; move 5 to 500; move 5 to 0; end;
nod
# macros that "lean" left and right
macro lean_left; move 1,2 to maxpos, 3,4 to minpos; end;
macro lean_right; move 1,2 to minpos, 3,4 to maxpos; end;
macro side_to_side; lean_left; nod; lean_right; nod; end;
fast; zpos; side_to_side 2; zpos; nod;