MEI Hardware Information MEI Software Engineering & Application Services Technology Information at MEI International Contact Information

Debugging

The most time-consuming part of software development is debugging. When software modules are plugged together and used with real motors and feedback devices, debugging can become quite complex. Additionally, when the motion software is integrated with software that controls other machine function such as vision, I/O and user interfaces, debugging can have the potential of becoming a major bottleneck that prevents a project from moving forward.


In order to fix software bugs in your motion as quickly and easily as possible; accessible, self-reporting software with access to widely used, full-feature debugging tools are a must. Because of its basic design and architecture, the Motion Programming Interface (MPI) produces code that is simple and more straightforward to debug. All the popular compilers you depend on when you program in C – and the sophisticated debugging tools included with them – are easily integrated into the MPI development environment. The MPI allows you to build your motion code the same way you build your machine: by creating individual software objects that reflect the subsystems of the machine.

VM3
VM3 (View Memory) is a MPI Windows-based utility that provides a window to the operation of the XMP hardware. It is especially useful to rule out a hardware problem when application code is not functioning as designed. VM3 allows you to view and alter data stored in memory on the XMP controller, including data contained in both internal and external DSP memory. You must use caution when manipulating the VM3, since changes to the memory take effect immediately, including data affecting motion components such as motors and encoders.

VM3 displays the Sample Timer that is always incrementing when the controller is operating; making it easy to establish that there is a communication path to the card without moving any parts. XMP memory registers can be easily checked to ensure the proper data is in the proper locations. Because of the simple method nature that it uses to view memory, it is very reliable making it ideal for verifying memory values on the controller.

In addition to being a useful debugging tool, if you should run into problems with setting up your controller, the VM3 is an excellent tool for our trained applications engineers to use to diagnose and solve your problems right over the phone.

Motion Console
Motion Console is a powerful windows-based utility that is used to setup, tune, and configure XMP motion controllers as well as debug. The advantage of debugging with Motion Console is that the user does not need to know how to program in order to figure out what is occurring on the controller. Motion Console displays a very large amount of data about the controller, including axis status, motor status, and controller status.

Motion Scope
Motion Scope is a Windows-based tool that provides an oscilloscope-like graphing tool to chart position, velocity, error, command, voltage or any other variable contained in the XMP memory. The graphing capabilities of motion scope allow you to see when something is malfunctioning, such as if the command position jumps in real time. The predefined functions that Motion Scope graphs are Command Position, Actual Position, Position Error, Command Velocity, Actual Velocity, and DAC output from the amplifier signal. In addition to the standard traces, Motion Scope has the capability to graph any memory location within the controller. You can simultaneously view multiple graphs and display data in continuous, sampled, and triggered modes. Motion Scope also lets you interpret your data using 3rd party analysis tools. The user can save data as a text file, then open the file in Excel, MatLab, or any other analysis program that can import text files. You can manipulate the data within Excel, such as putting a filter on it and take out the noise, then save it to take a closer look later.

Debug Library
The Debug Library configuration provides exhaustive argument checking, diminishing the likelihood of errors during the run-time process. When a run-time error does occur, MPI Debug Library features help you to isolate the problem and clarify what is malfunctioning. The Debug Library has built in parameter checking that will return error codes if invalid parameters are passed. It has ‘Asserts’ built into it to verify correct internal operation as well as parameter and object validation. When an Assert occurs, an error message with the name of the file and the line number of the offending function call is displayed and the application exits. This is a useful error tracking feature at every stage of the motion control process, including development and production. MEI’s debug library allows you to build your own debug release of your software so you may run your program one line at a time.