Hot!Data Monitor and Control Interface (DMCI) Plug In -- New in MPLAB IDE 7.40

Page: 123 > Showing page 1 of 3
Author
JasonK
Moderator
  • Total Posts : 3375
  • Reward points : 0
  • Joined: 2003/11/14 09:49:40
  • Location: Microchip Technology in Arizona, USA
  • Status: offline
2006/05/22 15:07:24 (permalink)
0

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

Jason Kajita
 Follow me on Twitter
http://support.microchip.com for urgent questions
#1

42 Replies Related Threads

    JasonK
    Moderator
    • Total Posts : 3375
    • Reward points : 0
    • Joined: 2003/11/14 09:49:40
    • Location: Microchip Technology in Arizona, USA
    • Status: offline
    Possible Applications of DMCI? 2006/05/22 15:16:58 (permalink)
    0
    The DMCI developer used his tool with Application Note AN908  (AC Induction Motor-Control Tuning). He used MPLAB ICD 2 as his debugger.





    I’m sure our valued user base will come up with very creative ways to use this tool. If you put it to an interesting use, please let us know here.

    #2
    Olin Lathrop
    Super Member
    • Total Posts : 7463
    • Reward points : 0
    • Joined: 2004/02/26 17:59:01
    • Location: Littleton Massachusetts
    • Status: offline
    RE: Data Monitor and Control Interface (DMCI) Plug In -- New in MPLAB IDE 7.40 2006/05/22 16:43:17 (permalink)
    0
    The Data Monitor and Control Interface (DMCI) allows you to control and display application variables.

    Wow, that looks cool!  I'm hoping I have a problem that could benefit from this soon so I get to play with it.
     
    Can the sliders be used to set simulated voltages on analog pins?  Right now simulating A/D input is a major pain.  Does this make it easily possible now?
    #3
    kalpak
    Super Member
    • Total Posts : 3265
    • Reward points : 0
    • Joined: 2004/03/12 23:01:40
    • Location: India
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/22 16:51:23 (permalink)
    0
    Now I can justify buying another monitor to make this a dual monitor system.
    #4
    arturv
    Starting Member
    • Total Posts : 37
    • Reward points : 0
    • Joined: 2004/03/04 18:35:31
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/22 17:52:11 (permalink)
    0
    very cool...

    To me there are just one problem. I have a laptop with a 15" screen, and Max resolution of 1024x768. So the DMCI screen does not fit, and even if i adjust the window, so i can only see slider1 and 2, i can´t acess slider3 because there are no horizontal or vertical scrool bars.
    I am with Kalpak, going to try to convinve my boss, to buy a new Laptopwink or a second monitorgrin.
    #5
    Guest
    Super Member
    • Total Posts : 80499
    • Reward points : 0
    • Joined: 2003/01/01 00:00:00
    • Location: 0
    • Status: online
    RE: Possible Applications of DMCI? 2006/05/22 19:28:32 (permalink)
    0
    I agree with arturv. My screen is a healthy 1600x1200, and the DMCI windows take almost all my screen space. I wonder how people with 1024x768 can use it and still have the watch windows or program memory visible. It would help a lot if they were resizable.
     
    One problem I had in using the DMCI is that I frequently use 24bits variables, and it does not have a 24bit type.
     
    But the Dynamic data view graphs are just amazing. I would like to tie ADRESH:ADRESL to a graph, since this would be nice for debugging time-domain filters in low-end applications, where you don't have a input array and use a recursive filter. Graphing the raw ADRES and the filter output is a nice resource. As it is today, you have to assign the ADRES values to a global var.
     
    But all in all this seems to be a great addition to the simulation arsenal.
    #6
    jtemples
    Super Member
    • Total Posts : 10278
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/22 19:48:17 (permalink)
    0
    I couldn't see any mechanism to attach A/D channels to the sliders, which is what I really want to do. Then I tried attaching a slider to a variable that's set by reading the A/D. That didn't seem to do anything useful, as presumably the A/D value overwrote the value set by the slider. Is it necessary to create special simulator version of your application that doesn't read A/D, but instead expects its A/D values to be set by the simulator?
    #7
    JasonK
    Moderator
    • Total Posts : 3375
    • Reward points : 0
    • Joined: 2003/11/14 09:49:40
    • Location: Microchip Technology in Arizona, USA
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/23 09:23:37 (permalink)
    0
    Hi Olin and jtemples,

    I'll ask the simulator and DMCI developers about hooking the ADC up to the DMCI more directly.  I don't know if its possible without significant changes to the simulator.  Maybe they'll come up with something else to make ADC simulation easier.

    We should point out, however, that the DMCI tool is not specific to the simulator.  It uses a mechanism similar to the watch window so it works across all of our debugging tools.


    Jason Kajita
     Follow me on Twitter
    http://support.microchip.com for urgent questions
    #8
    JasonK
    Moderator
    • Total Posts : 3375
    • Reward points : 0
    • Joined: 2003/11/14 09:49:40
    • Location: Microchip Technology in Arizona, USA
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/23 09:38:29 (permalink)
    0
    arturv and j_doin,

    So the DMCI screen does not fit, and even if i adjust the window,
    Yeah, you really need a higher screen resolution to use the DMCI effectively.  I'll forward your feedback to the developer.

    One problem I had in using the DMCI is that I frequently use 24bits variables, and it does not have a 24bit type.
    I'll enter an enhancement request.

    But all in all this seems to be a great addition to the simulation arsenal.
    Keep in mind that this tool isn't just for simulation.  It also works with the ICD2 and ICE 2000/4000.

    Thanks for the feedback.

    Jason Kajita
     Follow me on Twitter
    http://support.microchip.com for urgent questions
    #9
    jbroadwell
    Super Member
    • Total Posts : 1444
    • Reward points : 0
    • Joined: 2005/11/02 13:58:11
    • Location: Indianapolis, Indiana
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/23 09:48:27 (permalink)
    0
    ORIGINAL: JasonK
    It also works with the ICD2 and ICE 2000/4000.

     
    With the ICD2 (which I own) I can't see changes in real time, right?  You have to stop execution to read variable values?
     
    I assume you can see real-time changes using one of the ICE's?

    http://www.serialwombat.com
    When someone asks you "Can't you just...", watch out.
    #10
    JasonK
    Moderator
    • Total Posts : 3375
    • Reward points : 0
    • Joined: 2003/11/14 09:49:40
    • Location: Microchip Technology in Arizona, USA
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/23 10:06:16 (permalink)
    0
    The graphs aren't updated in real time (yet), but that is one of several enhancements that we have planned for future versions.

    Jason Kajita
     Follow me on Twitter
    http://support.microchip.com for urgent questions
    #11
    JasonK
    Moderator
    • Total Posts : 3375
    • Reward points : 0
    • Joined: 2003/11/14 09:49:40
    • Location: Microchip Technology in Arizona, USA
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/23 10:13:09 (permalink)
    0
    Yeah, you really need a higher screen resolution to use the DMCI effectively.  I'll forward your feedback to the developer.

    The developer said that he is shrinking the dialog for the next release.  He says that it will just barely fit at 1024x768 now.

    Jason Kajita
     Follow me on Twitter
    http://support.microchip.com for urgent questions
    #12
    Guest
    Super Member
    • Total Posts : 80499
    • Reward points : 0
    • Joined: 2003/01/01 00:00:00
    • Location: 0
    • Status: online
    RE: Possible Applications of DMCI? 2006/05/23 10:15:58 (permalink)
    0
    ORIGINAL: JasonK

    The graphs aren't updated in real time (yet), but that is one of several enhancements that we have planned for future versions.

    THAT would be a extremely interesting reason for using the ICD2 on-chip debugger. If the debug executive could send to MPLAB realtime updates for just a few variables (or even for 4 variables) it could run as a background interrupt in the code, and verify system performance in real time. The graphs are very adequate to see convergence of control variables, analyse spectra and arrays with no user interface, verify problems in motor control applications, and analyze the ADC inputs 'from inside the chip' in real time. That would allow for graphical correlation of analog inputs and other data, to debug board noise issues, for example.
     
    If ICD2 realtime update for the DMCI is ever implemented, the ICD2 will be raised to another level, rivalling with ICE in many applications.
     
     
    #13
    p.erasmus
    Super Member
    • Total Posts : 1799
    • Reward points : 0
    • Joined: 2004/11/25 03:18:34
    • Location: Saratov Russia
    • Status: offline
    RE: Data Monitor and Control Interface (DMCI) Plug In -- New in MPLAB IDE 7.40 2006/05/23 14:05:23 (permalink)
    0
    Hi jason
    This is again an example of MCs commitment
    It is great .
    However for our normal people with out engineering back ground would it not be possible
    to make an tutorial using the C18 as many people like my selve are just not at the standard using the C30 and 16 bit controllers yet.to use your C30 example.!!!
    I think this is a request from more people as just my self
    Thanks Peter
    #14
    JasonK
    Moderator
    • Total Posts : 3375
    • Reward points : 0
    • Joined: 2003/11/14 09:49:40
    • Location: Microchip Technology in Arizona, USA
    • Status: offline
    RE: Data Monitor and Control Interface (DMCI) Plug In -- New in MPLAB IDE 7.40 2006/05/23 17:28:28 (permalink)
    0
    Hi Peter,

    Attached is a C18 version of the same project.  The steps described in my original post are pretty much the same.

    Update (25 January 2008):
    Re-upload C18 example project. The workspace requires MPLAB IDE 8.01 or later.

    post edited by JasonK - 2008/01/25 14:58:54

    Jason Kajita
     Follow me on Twitter
    http://support.microchip.com for urgent questions
    #15
    Guest
    Super Member
    • Total Posts : 80499
    • Reward points : 0
    • Joined: 2003/01/01 00:00:00
    • Location: 0
    • Status: online
    RE: Data Monitor and Control Interface (DMCI) Plug In -- New in MPLAB IDE 7.40 2006/05/23 17:35:45 (permalink)
    0
    Jason, I have tried to use DMCI to verify some signals that are not in array form, but are just time domain signals that are sampled in one 16bit variable only. As it is now, the DMCI is only useful for visualization of arrays. It would be extremely interesting to be able to plot single-point data over time. Do you think it would be possible to ask this from the dev guys?
     
     
    #16
    jtemples
    Super Member
    • Total Posts : 10278
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/23 18:24:43 (permalink)
    0
    ORIGINAL: JasonK

    We should point out, however, that the DMCI tool is not specific to the simulator. It uses a mechanism similar to the watch window so it works across all of our debugging tools.

    So the sliders/toggles are essentially a watch window with a GUI?
    #17
    p.erasmus
    Super Member
    • Total Posts : 1799
    • Reward points : 0
    • Joined: 2004/11/25 03:18:34
    • Location: Saratov Russia
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/24 00:43:19 (permalink)
    0
    Hi Jason,
    Thank you for the C18 version,
    Best regards
    Peter
    #18
    Guest
    Super Member
    • Total Posts : 80499
    • Reward points : 0
    • Joined: 2003/01/01 00:00:00
    • Location: 0
    • Status: online
    RE: Possible Applications of DMCI? 2006/05/24 01:03:19 (permalink)
    0
    Hello,

    I installed MPLAB v7.40 but I can´t find the DMCI Plugin. Under Tools I can only see:
    1 MPLAB MACROS
    2 RTOS Viewer
    3 Visual Initializer

    If I start the provided dmci_c18 demo I get error message Unable to create the display plugin { }

    Whats wrong?
    #19
    whsiung
    Super Member
    • Total Posts : 1461
    • Reward points : 0
    • Joined: 2003/11/07 12:44:35
    • Location: Malaysia
    • Status: offline
    RE: Possible Applications of DMCI? 2006/05/24 03:42:47 (permalink)
    0
    Hi,
     
    You must be performing a custom installation where you have the DMCI option unchecked!  I read Jason message before I did the download and installation... I have specifically looked for the DMCI option and found that it's was unchecked!  Perhaps this is what happened to you.
     
     
    Best regards,
     
    WH Tan
    #20
    Page: 123 > Showing page 1 of 3
    Jump to:
    © 2017 APG vNext Commercial Version 4.5