.

Software Tools

mdl2mw Utility (mdl2mw.exe)

The command line application, md2mw.exe is used to download a Simulink model to a ZMP controller. The command syntax is:

  mdl2mw <mdl filename>

Executing mdl2mw will load all of the MechaWare blocks into controller memory for execution by the controller firmware. The blocks will be initialized (zeroing the static data) and then the models will be enabled in the firmware.

The mdl2mw utility creates a map of the blocks loaded and stores that map in a file with the same name as the Simulink .mdl file but with a .map extension. This file is useful when accessing the blocks using the C++ API. The following is an example of a .map file:

 
Block Name         Model       Block
NOISE 1            0           0
FF 1               0           1
GAIN 1             0           2
PID 1              0           3
SUM 2              0           4
DIFFERENTIATOR 1   0           5
SP_BIQUAD 2        0           6
SUM 3              0           7

The Block Names on the left duplicate the “Name” field of the blocks in the Simulink model. The Model and Block numbers indicate the indices used by the API to access the blocks.

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering