
Using the MintMT ActiveX Control 4-3
The following examples are in Microsoft Visual Basic:
MintController.doUpdateFirmware “C:\MintMT\Firmware\nmPCI.CHX”
will update the firmware on the controller with the file nmPCI.CHX from the path C:\MintMT\Firmware.
The update firmware function will use the handle created using the set…Link function and pass the
firmware to the controller via the appropriate communication channel.
4.4 MintMT programs
The MintMT ActiveX control can be used to download and run compiled MintMT programs to controllers.
During development MintMT programs are stored in a ASCII text format as a .MNT file. To run this on the
controller it must be compiled into an executable format using WorkBench v5. Within WorkBench v5,
rather than running the program select the Tools - Program - Compile to File menu option. This will
produce a Mint executable file (.MEX).
The MintMT executable file can be downloaded to the controller using the function
doMintFileDownload. This function accepts a string that is the path of the file including the file name
and extension.
For example, where MintController is the name of the MintMT ActiveX control in the project.
The following examples are in Microsoft Visual Basic:
MintController.doMintFileDownload “C:\MintMT\Programs\myMintProgram.MEX”
Will download the file myMintProgram.MEX from the path C:\MintMT\Programs
If the firmware on the controller and the Mint executable file are incompatible an error message will be
displayed. The version of MintMT running on the controller must be compatible with the version of the
compiler used to compile the MintMT executable.
Version details of the .MEX file can be obtained before it is downloaded to the controller using the version
locator utility on the Baldor Motion Toolkit CD.
Once the program has been downloaded to the controller it can be run using the function doMintRun.
Calling this function will run the MintMT program immediately. Execution of the current program can be
halted by calling the function doMintBreak.
4.5 Mint Motion Library function calls
Motion applications can be written on the host PC by calling Mint Motion Library functions via the MintMT
ActiveX control. The MintMT ActiveX control uses the immediate command mode (ICM) interface to
communicate with controllers. The ICM interface is a packet based communication protocol that allows PC
based applications to call MML functions on the controller. The MintMT ActiveX control will create, send,
receive and decode ICM packets to allow complete machine control via a PC based application.
Comentarios a estos manuales