Robot Processing

1. Operation:

a.  Motor A: servomotor A rotates clockwise with 30 degree, it turns on the switch; then the motor A run counter clockwise.  The tank will be rotated opposite the motor.
b.  Motor B: servomotor B rotates clockwise with 30 degree, it turns on the switch; then the motor B run counter clockwise.  The tank will be moved from right to left, and otherwise.
c.  Motor C: servomotor C rotates clockwise with 30 degree, it turns on the switch; then the motor C run counter clockwise.  The crank base going up to lift the tank, otherwise.

2.  Software:

Here's an annotated sample screen from the program in Teach mode.

The following program to control the motors is written on the Robix RCS-6 software.

# Determine the original, maximum, and minimum positions of the three servos:
p0pos 1,3,5 0
maxpos 1,3,5 1400; minpos 1,3,5 -1400

# Initialize the position of all servos:
initpos 1,3,5 0

# Set maximum speed, acceleration, and deceleration
accdec 1,3,5 100
maxspd 1,3,5 1000

# Define actions of the robot
macro rotation
move 1 to 910  # turn on motor A to rotate counter clockwise
pause 100 # keep the motor running for 10 seconds to rotate the tank 20 degrees?
move 1 to 0 # to turn off the motor A
end

macro move_up
move 5 to 910  # turn on motor C to raise up the tank
pause 100 # keep the motor C running for 10 seconds to lift the tank up
move 5 to 0 # turn off the motor C
end

macro move_down
move 5 to -910  # turn on motor C to move the tank down
pause 100
move 5 to 0
end

macro move_to_right
move 3 to 910  # turn on motor B to move the tank to the right
pause 1200  # keep motor B running for 2 minutes to move the tank 10 inches to left
move 3 to 0
end

macro move_to_left
move 3 to -1050 # turn on  motor B to move the tank to the left
pause 1200  # keep motor B running for 2 minutes to move the tank 10 inches to right
move 3 to 0
end

# Process of the robot
move_up 1 # turn on the motor C to lift the crank base up
pause 10 # pause for 1 second to start next step
move_to_left 1 # turn on the motor B to move the tank 10 inches to the left
pause 10
move_down 1 # turn on the motor C to move the crank base down
pause 10
rotation 1 # turn on the motor A to rotate the tank clockwise with 20 degree
pause 10
move_up 1 # turn on the motor C to move the crank base up
pause 10
move_to_right 1 # turn on the motor B to move the tank 6 inches to the right
 






Last updated on Tuesday, November 27, 101.
Today's date:Tue Dec 04 13:05:55 GMT-0800 (PST) 2001