User Manual

MCP Series
Brushed DC Motor Controllers
MCP Series User Manual
109
3.1.14 System Registers
System registers are special variables dened by MCL to access functions of the MCP control
unit. System registers can, in most cases be used just like a user dened variable. However
some System Registers are read only(see table below) and Variable Modiers can not be used
with system registers.
3.1.15 System Registers Table
Variable Names Variable Size Array Size Type Description
VERSION WORD 1 R Firmware Version
SYSSTATUS WORD 1 R Error and Warning Status
SYSCLK LONG 1 R System Clock Counter
SYSUSTICK LONG 1 R System Microsecond Tick
SYSTICK LONG 1 R System Millisecond Tick
SYSTEMP WORD 1 R System Temperature 1
SYSTEMP2 WORD 1 R System Temperature 2(on select units)
SYSMBAT WORD 1 R System Main Battery Voltage
SYSLBAT WORD 1 R System Logic Battery voltage
SYSMINMBAY WORD 1 R/W Minimum Main Battery Voltage
SYSMAXMBAT WORD 1 R/W Maximum Main Battery Voltage
SYSMINLBAT WORD 1 R/W Minimum Logic Battery Voltage
SYSMAXLBAT WORD 1 R/W Maximum Logic Battery Voltage
DOUTACTION BYTE 8 R/W Action to trigger an Output Pin
DOUT BIT 8 R/W Output Pin State
PRIORITYLEVEL BYTE 1 R Control Priority Level Number
PRIORITYACTIVE BYTE 1 R Control Priority Level Mask
MOTORFLAGS WORD 2 R Motor Control State Flags
MOTORPWM SWORD 2 R Motor PWM Setting
MOTORCURRENT SWORD 2 R Motor Current Reading
MOTORTARGETPWM SWORD 2 R Motor Target PWM Setting
MOTORVELKP LONG 2 R/W Motor Velocity KP Value
MOTORVELKI LONG 2 R/W Motor Velocity KI Value
MOTORVELKD LONG 2 R/W Motor Velocity KD Value
MOTORVELQPPS LONG 2 R/W Motor Velocity QPPS Value
MOTORTARGETSPEED SLONG 2 R Motor Target Speed
MOTORDISTANCE LONG 2 R Motor Distance
MOTORPOSKP LONG 2 R/W Motor Position KP Value
MOTORPOSKI LONG 2 R/W Motor Position KI Value
MOTORPOSKIMAX LONG 2 R/W Motor Position KIMAX Value
MOTORPOSKD LONG 2 R/W Motor Position KD Value
MOTORPOSMAX SLONG 2 R/W Motor Maximum Position
MOTORPOSMIN SLONG 2 R/W Motor Minimum Position
MOTORPOSDEADZONE LONG 2 R/W Motor Position Deadzone
MOTORTARGETPOS SLONG 2 R Motor Target Position
MOTORACCEL LONG 2 R Motor Acceleration
MOTORDECCEL LONG 2 R Motor Decceleration