4.2. MDtool
MDtool
is a console application for configuring and performing basic diagnostics on MD80 drives via CANdle.
The application is available as a standalone executable and as a .deb package. The program is designed as a
complementary tool for APIs, reducing the overhead when setting up the drives for the first time or
reconfiguring them. It uses the CANdle C++ library on its backend.
Installation
The easiest way to install the MDtool is to select the appropriate *.deb package from the MDtool GitHub repo
'Releases' page. To install a er the download simply call:
sudo apt install ./mdtool_xx-x_xx.deb
Be sure to call
./mdtool bus <SPI/UART/USB>
to configure MDtool for a desired communication bus before
first use.
mdtool bus command <bus>
MDtool is able to work with CANdle and CANdle HAT. This is why before the first use it has to be configured
for a particular communication bus. Use the bus command to set it to USB, SPI or UART, based on which
device you own. The default bus setting is USB.
mdtool ping command <baud>
MDtool is able to discover the drives that are connected to the CAN bus. You can ping the drives at a specific
speed (1M/2M/5M/8M) or just use the ʻallʼ keyword for pinging all speeds in one go.
Note: CANdle does not support working with drives configured with different CAN speeds on the same
CAN bus – please make sure when “mdtool ping all” command is executed, all discovered drives lie in
a single speed category
.
mdtool config zero command <ID>
This command sets the current motor position to zero - from the moment this command is called all
encoder measurements are referenced from the current position.
Note: this setting has to be saved to be preserved a er power down! Please see the config save <ID>
command.
mdtool config can command <current ID> <new ID> <baud> <watchdog period>
This command is used to change MD80ʼs parameters such as CAN ID, CAN speed, and CAN watchdog. For
more information on CAN watchdog please refer to section
Note: this setting has to be saved to be preserved a er power down! Please see the config save <ID>
command.
mdtool config current command <ID> <current>
This command is used to set the maximum phase current that is allowed to flow through the motor when
high torques are commanded. By default, the maximum current is set to a rather low value that will not lead
to motor or driver burnout. However, this also limits the motor's maximum torque capabilities. Using the
config current command one can increase the maximum current. The absolute maximum value is 40 A.
Note: the guarantee does not include burnout actions due to too high current settings. For max
continuous driver current please refer to
and
sections.
www.mabrobotics.pl