User Manual

MCP Series
Brushed DC Motor Controllers
MCP Series User Manual
5
3.1 MCL Language ........................................................................................... 105
3.1.1 Variables ...........................................................................................105
3.1.2 Variable Types ....................................................................................105
3.1.3 Variable Locations ...............................................................................105
3.1.4 Dening Variables ...............................................................................105
3.1.5 Variable Names ..................................................................................106
3.1.6 Aliases ..............................................................................................106
3.1.7 Variable Modiers ...............................................................................106
3.1.8 Variable Modier Types ........................................................................107
3.1.9 Variable Arrays ...................................................................................107
3.1.10 Out of Range ....................................................................................107
3.1.11 Constants ........................................................................................108
3.1.12 Constant Tables ................................................................................108
3.1.14 System Registers ..............................................................................109
VERSION ...................................................................................................111
SYSSTATUS ................................................................................................111
SYSCLK ....................................................................................................111
SYSUSTICK ................................................................................................111
SYSTICK ....................................................................................................111
SYSTEMP2 .................................................................................................112
DOUTACTION(8) .........................................................................................113
DOUT(8) ....................................................................................................113
PRIORITYLEVEL ..........................................................................................114
PRIORITYACTIVE ........................................................................................114
MOTORFLAGS (2) ........................................................................................114
MOTORPWM (2) ..........................................................................................115
MOTORCURRENT (2) ...................................................................................115
MOTORTARGETPWM (2) ...............................................................................115
MOTORVELKP (2) ........................................................................................115
MOTORVELKI (2) ........................................................................................115
MOTORVELKD (2) .......................................................................................115
MOTORVELQPPS (2) ....................................................................................116
MOTORTARGETSPEED (2) .............................................................................116
MOTORDISTANCE (2) ..................................................................................116
MOTORPOSKP (2) .......................................................................................116
MOTORPOSKI (2) ........................................................................................116
MOTORPOSKIMAX (2) ..................................................................................116
MOTORPOSKD (2) .......................................................................................117
MOTORPOSMAX (2) .....................................................................................117
MOTORPOSMIN (2) .....................................................................................117
MOTORPOSDEADZONE (2) ...........................................................................117
MOTORTARGETPOS (2) ................................................................................117
MOTORACCEL (2) ........................................................................................117
MOTORDECCEL (2) ......................................................................................118
MOTORSPEED (2) .......................................................................................118
MOTORDEFAULTACCEL (2) ............................................................................118
MOTORMAXCURRENT (2) .............................................................................118
MOTORMINCURRENT (2) ..............................................................................118
MOTORL (2) ...............................................................................................119
MOTORR (2) ...............................................................................................119
MOTORENCPOS (2) .....................................................................................119
MOTORENCSPEED (2) ..................................................................................119
MOTORENCSPEEDS (2) ................................................................................119
MOTORENCSTATUS (2) ................................................................................120