User Manual

MCP Series
Brushed DC Motor Controllers
MCP Series User Manual
179
SPEED
Syntax
speed motor,speed,accel
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/decceleration to
use when the motor speeds up or slows down to the specied speed.
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 SPEED command is used to control a motor using an encoder with a Velocity PID control
algorithm. The user must have tuned the Velocity PID settings for the motor before using the
SPEED command. With a properly tuned Velocity PID accurate speed control can be acheived
by the motor. Note that multiple SPEED commands can be chained together by buffering the
commands. As each command nishes the next will start executing.
;example assumes velocity PID settings are correct set.
main
speed 0,12000,12000
pause 1000
speed 0,0,12000
pause 1000
speed 0,-12000,12000
pause 1000
speed 0,0,12000
pause 1000
goto main