The following parameters are set according to the controller type:
- MDRIVE_E - Encoder enable (EE=1)
- MDRIVE
- Encoder enable (EE=0)
Other comments:
- Drive enable (DE=1) is set always by spec
- Stall detection mode either stops the motor (SM=1) or lets it
continue (SM=0) when a stall is detected
- Stall factor flag (ST) is a read-only variable showing a stall
has been detected
For documentation see the
spec
5.03.01-2 update notes or the
MDrive23 manual.
macros for diagnosis and
maintenance
All macros are defined in
mdrive.mac
on the
nondist directory.
(old name:
mdrive_stat.mac)
Note: see
tricks & traps
below!
|
lists all motor parameters
|
|
lists all motor parameters |
- mdrive_set [motor] [serial port command in double quotes]
|
send ASCII command to motor
|
- mdrive_read [motor] [parameter name]
|
read motor specific motor
parameter
|
|
list motor and encoder position
|
|
assign a new name to motor
|
|
burn in motor name
|
|
list all mdrive commands
|
tricks & traps
In order to use the low level diagnosis macros from
mdrive.mac, it is important to
know how
spec
communicates with the motor:
- on start-up spec
does not initiate any settings and mdrive_show will show nonsense
- spec initiates all
motor parameters before it moves a motor; after the move, mdrive_stat shows the settings
from config
- after a config or reconfig command, motor
parameters will appear strange, as the mdrive was reset
- after a motor move, the correct spec settings are displayed by
mdrive_stat
- it is recommended to leave config
parameters as listed above, as they will yield a consistent
definition of parameters that works
- it may be tempting to witch from mdrive_e to mdrive, if there are lots of
encoder errors; however, I had trouble moving motors in mdrive mode
- low-level commands should only be used for
- changing a motor internal name with mdrive_name and mdrive_save, when needed
- diagnose reading and writing to the motor driver via serial port
- diagnose motor movement/encoder function by reading motor
position and encoder position with mdrive_pos
- this macroset was written, so that it would not be necessary to
resort to the WIN PC mdrive set-up program
macro
The
mdrive.mac macro can
be downloaded
here.