Data Monitor and Control Interface (DMCI) Plug In -- New in MPLAB IDE 7.40
How can I dynamically control values of application variables within MPLAB IDE? Also, can I graphically view application-generated data?
The Data Monitor and Control Interface plug-in might be what you need. If you selected to install the DMCI component when you installed MPLAB IDE 7.40
or later, you can find it under the Tools menu. What is it?
The Data Monitor and Control Interface (DMCI) allows you to control and display application variables. The DMCI provides dynamic user configuration of 9 slider controls, 9 boolean (on/off) controls and 4 graphs. The interface provides project-aware navigation of program symbols (variables) which can be dynamically assigned to any combination of slider or Boolean controls. The controls allow you to interactively control values of program variables within MPLAB IDE. Where is it?
Select “Data Monitor and Control Interface” from the Tools menu in MPLAB IDE. How do I use it? Can you show me an example?
For a very simple example of using DMCI, I created a small program using MPLAB C30 with the dsPIC33FJ256GP710
in the MPLAB SIM simulator. If you don’t have MPLAB C30, you can download a free student version at <http://www.microchip.com/c30
>. MPLAB SIM is packaged with MPLAB IDE.
I attached my project files to this message as a zip file. See the bottom of this post. Note: While this example uses the MPLAB C30 C Compiler and the MPLAB SIM simulator, you can use other language (e.g. MPASM, C18) and debugging (e.g. ICD2, ICE 2000) tools.
This simple example assigns (Amp * sinl (Freq * t)) to an array, which we will later graph. Create the project as shown in the screenshot and build it. After building the project, open the DMCI plug-in and configure a slider for the ‘Amp’ global variable and another slider for the ‘Freq’ global variable. You can configure the sliders by checking the slider’s enable checkbox and then right clicking on the slider.
For the first slider, click on the ‘Amp’ symbol in the Dynamic Global Symbols list and enter reasonable upper and lower limits, [0,1000].
Once you have the first slider configured for ‘Amp’, configure the second slider for ‘Freq. You should then have a slider configured as ‘Amp’ and another slider configured as ‘Freq’.
Now we have the dynamic data-control sliders configured for this example. Next we can configure the dynamic data-view sources. Now how do I configure the dynamic data-view sources?
Click on the Dynamic Data View tab. This tab allows you to configure four (4) graphical views of your data.
Enable Graph 1 by checking the Graph 1 checkbox. Right click within the graph and select “Configure Data Source” in the context menu.
In the Dynamic Control Properties dialog, configure Graph 1 to use the ‘mybuffer’ Dynamic global symbol. You can also change the labels on each axis and the graph’s title, but I’ll leave it with the default text for now.
Now we have the DMCI plug-in configured for our little example project. We should run to the function that we want to test. Set a breakpoint on the call to the Example() function and run to it
. Also set a breakpoint after the call to the function.
We should move the sliders to values that will give us a nice graph.
We’re ready to run. Press the Start button on the DMCI window. This causes the tool to inject the slider values into the appropriate locations and start the debugger (in this case, the simulator). Remember: We need to be past any C startup code or other variable-initialization code for the DMCI to work correctly. Otherwise, the executed code will overwrite the DMCI-injected values.
When execution halts at the breakpoint, after returning from Example(), we can now flip over to see the graph in the Dynamic Data View tab.
Graph 1 should show the ‘mybuffer’ array.
Because the function under test is in an infinite loop, you can modify the ‘Amp’ and ‘Freq’ and press the Start button again. For more information on each of the options and capabilities of the DMCI plug-in, see the online help within MPLAB IDE.
The attachment has the project/workspace that I used. Let me know if you have problems with it.
post edited by JasonK - 2006/05/23 09:26:43