User Manual

MCP Series
Brushed DC Motor Controllers
MCP Series User Manual
120
MOTORENCSTATUS (2)
Variable array holds the current encoder status for both motor channels. This value is equal to
the signal channel assigned as encoder input for the specic motor.
main
puts 0,[“Motor1 status:”,hex MOTORENCSTATUS,13]
pause 100
goto main
MOTORENCPIN (2)
Variable array holds the signal number used for encoder input. This allows any signal
pin(P0,P1,PID1A,PID1B etc) to be used as an encoder input. Pulse, PWM, analog or quadrature
inputs can be used as encoder input.
main
puts 0,[“Motor1 encoder pin:”,dec MOTORENCPIN(0),13]
pause 100
goto main
MOTORBUFFER (2)
Variable array holds the motor buffer state for both motor channels. The high bit of the byte
indicates the motor buffer is empty and no buffered command is executing. The low 7 bits
indicate the used buffer size(0 to 127).
main
puts 0,[“Motor1 buffer status:”,hex2 MOTORBUFFER(0)\2,13]
pause 100
goto main
STREAMTYPE (4)
Variable array holds the stream type for each stream. Stream types currently supported are
0(user stream) or 1(packetserial stream).
;initialize USB stream type
STREAMTYPE(0) = 0
main
goto main
STREAMRATE (4)
Variable array holds the transmission speed for each stream. This value is in bits per
second(bps).
;initialize RS232 stream rate
STREAMRATE(3) = 115200
main
goto main