User Manual

MCP Series
Brushed DC Motor Controllers
MCP Series User Manual
170
MOVE
Syntax
move motor,speed,accel,deccel,position,buffer
Motor - is a variable, constant or expression that species which motor to access.
Speed - is a variable, constant or expression that sets the speed to run the motor at.
Accel - is a variable, constant or expression that sets the acceleration to use when
the motor start its movement.
Deccel - is a variable, constant or expression that sets the decceleration to use when
the motor stops its movement.
Position - is a variable, constant or expression that sets the position for the motor
to move to.
Buffer - is a variable, constant or expression that determines if the command will be buffered(0)
or execute immediately(1) overriding any currently running command on the motor.
Description
The MOVE command is used to control a motor using an encoder with a Position PID control
algorithm. The user must have tuned the Position PID settings for the motor before using the
MOVE command. With a properly tuned Position PID accurate absolute movments can be made
by the motor. Note that multiple Move commands can be chained together by buffering the
commands. As each command nishes the next will start executing.
;example assumes velocity/position PID settings are correct for the specied motor
main
move 0,1000,0,0,1000,0
pause 2000 ;move should take 1 second then stops for 1 second
move 0,1000,0,0,-1000,0
pause 2000 ;move should take 1 second then stops for 1 second
goto main