• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » C2000™ Microcontrollers » C2000 32-bit Microcontrollers Forum » Beginner: TMS320F28335, Tips for creating a GUI for real-time display of data on a graph?
Share
C2000™ Microcontrollers
  • Forums
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
C2000 Resources
  • Product Folder
  • C2000 Training Portal
  • C2000 Technical Training Catalog
  • C2000 Datasheets, App Notes, User Guides
  • C2000 Hardware Design Kits
  • controlSUITE for C2000 Software Library


  • InstaSPIN Resources
  • What is InstaSPIN?
  • Videos and Support


  • InstaSPIN-FOC and InstaSPIN-MOTION Resources
  • What is InstaSPIN-FOC?
  • What is InstaSPIN-MOTION?
  • Product Folder: F28069F, F28068F, F28062F, F28068M, F28069M
  • User’s Guide
  • Technical User’s Manual
  • Tools
  • Forums

    Beginner: TMS320F28335, Tips for creating a GUI for real-time display of data on a graph?

    This question is not answered
    Benjamin Dunkelberger
    Posted by Benjamin Dunkelberger
    on Mar 30 2012 08:19 AM
    Prodigy40 points

    Hi everyone.

    I am currently working on a project using the TMS320F28335, and considering my extreme lack of experience with Ti products and with programming/designing any type of Graphical User Interface (GUI), I thought I would turn to the experts for some tips or to at least point me in the right direction.

    I am hoping to display two variables on a real-time graph, and I was wondering if anyone had any tips for which communication link to use and/or what type of software I should look into. 

    I have been searching for a little bit now, and I thought Matlab and Labview might work great, however it seems as though you need to buy a license for these applications, which costs quite a bit of money and is not very practical for my purposes.  I also know that there is a graphing feature for Code Composer Studio 4, but it doesn't seem like it preforms any real-time updates even though we might have to resort to using this if all else fails.  (I also have seen that there is a COM interface that could potentially work, but I don't know much about how to go about this).

    If anyone has suggestions on a simple GUI that would be custom or would be something that would work for my situation, I would be very thankful if you could point me in the right direction.

    Thank you

    CCS 4 TMS320F28335 TMS320F28335 controlCARD CCS v4 CCSv4 28335 Code Composer 4 C Programming Language microcontrollers
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Brett Larimore
      Posted by Brett Larimore
      on Mar 30 2012 16:37 PM
      Mastermind18490 points

      Benjamin,

      The way I would probably do it is to use the graphing feature in CCS.  You will have to buffer your data into a form that you'd want to display though.  For example, every second you could use a CPU Timer to log one data point into an array.  Once the buffer is full you'd then start refilling the buffer.  You could have the update rate be 1 second or whatever you want.  Graphing is found at Tools->Graph once you've loaded code and are in the Debug Perspective. 

      (the way TI C2000 often uses graphs is to fill one element in the buffer within each system interrupt (which runs very fast) after some value of voltage level is reached in the data that is perhaps to-be-buffered.  In this way we get a graph that is triggered like an oscilloscope)

      Another option could be to use Crosshairs Embedded's Interface Designer.  I think it would be able to do what you want.  It isn't free, but it isn't too expensive.


      Thank you,
      Brett

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Benjamin Dunkelberger
      Posted by Benjamin Dunkelberger
      on Apr 04 2012 16:27 PM
      Prodigy40 points

      Brett,

      Thank you very much for the response.  I was able to use the graphing feature in CCS by buffering the data and I am successfully able to view it using the continuous refresh feature, which is very helpful.

      The only problem I am running into now is that I would love to create an X-Y graph which has two buffers being displayed on one figure.  It does not seam as though Code Composer Studio has this capability, and their single time and dual time graphs are always with respect to time.

      Since that does not seem possible, I was wondering if there was a way for me to export data.

      I know that the data --> export to .csv (from the right-click menu on the graph) is not supported in CCSv4, and I have not had success using the printf function in order to print and copy my data into another software application so that I can view a static graph of the data (an x-y graph to be exact).

      If you or anyone has any ideas on how I could export my data (I currently have two variables with a buffer size of 128 per each variable), it would be greatly appreciated.

      Thank you,

      Ben

      F28335 F28335 Experimenter's Kit TMS320F28335 CCSv4 28335 Code Composer 4
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ronaldo Pace
      Posted by Ronaldo Pace
      on Apr 05 2012 03:37 AM
      Intellectual875 points

      On your original question you mentioned which comm to use:

      - To answer that I guess most people will agree that comms doesn't get any simpler then UART (FTDI do some nice 3V3 cables ready to connect to your chip http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm).

      Regarding the visualization of your data:

      - If you don't mind not using real-time data, it's a very easy job (on my point of view) create a .NET application to open the serial (UART) connection, read the data and save into a .csv file. After you collect everything Excel is your best tool for generating any kind of graph you want. If you really need the real-time stuff than it's a bit more complex to program, but certainly achievable, to include this graph functionality on the .NET application.

      And for as licensing costs: you can grab yourself Visual Studio Express (free version) from Microsoft website.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Brett Larimore
      Posted by Brett Larimore
      on Apr 05 2012 09:36 AM
      Mastermind18490 points

      Benjamin,

      While not perfect, take a look at the post below.  Basically export the memory.
      http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/t/98293.aspx#343592

      Excel should then be able to take care of graphing the data.

      Hopefully, this could work for you.


      Thank you,
      Brett

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Benjamin Dunkelberger
      Posted by Benjamin Dunkelberger
      on Apr 05 2012 14:45 PM
      Prodigy40 points

      Brett,

      Thank you once again for your quick response.

      I was able to download the data successfully, and I should be able to use this functionality in my project.

      This may work well for one or two of the buffer variables I am hoping to view however it will be tough to view some of the other variables since they are being continuously updated and the buffer variables are only able to store a limited amount of memory.  I don't know if you have any other suggestions to solve this problem?

      I might try to use the .net approach (by opening the UART) suggested above however I might not have the time to get into .Net programming even though I only really need to capture the data.

      Thanks again,

      Ben

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Benjamin Dunkelberger
      Posted by Benjamin Dunkelberger
      on Apr 05 2012 15:28 PM
      Prodigy40 points

      Ronaldo,

      Thank you for your response.

      Do you happen to have any suggestions or documentation for how to connect the UART cable to our TMS320F28335 Microcontroller?

      In addition, do have any suggestions on tutorials for the simple read and save functions using .NET programming in Visual Studio?

      Thanks again for all your help,

      Ben

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ronaldo Pace
      Posted by Ronaldo Pace
      on Apr 05 2012 16:44 PM
      Intellectual875 points

      hi Benjamin,

      I'm at home and don't have my development environment, and also I'm half drunk, so I'll tell you what I rememebr by heart:

      the cable is as simple as it gets, find where the TMS320F28335 can mux the UART ports, use the UARTStdio library from TI (check the examples on how to use), and start transmit the data you need with UARTprintf(), you can already send it ready for CSV by sending every value comma-separated and with a carriage return at the end.

      The 3V3 version of FTDI cables are ready to go, chose the connector or solder of your preference and put Tx->Rx; Rx->Tx and the GND from the cable to the GND of your MCU.

      Stick the cable on your PC and will install the drivers opening a virtual USB com port, check on Device Manager which port it was assigned to.

      On VSExpress you drag a ComPort (I guess it's a telephone icon) from the left-hand side toolbar to your form1. Select it, on the right-hand side you'll have the properties bar, put there the COM port number, and the comm properties the same way you setup on UARTStdio (for example, 19200kbps, 8bits, 1 stop bit, no parity). Double click the icon and you will be programming inside the "OnDataReceived" event... that simple! You'll have to write String buff = ComPort1.read() or something similar to get that data. Google on VB.NET write file, and you'll find it the code to write that data to a CSV.

      Drag a button to the form, double click the button, you'll be programming inside the "button click" event, put there code to initialise the com port (something like ComPort1.Open() ). Put another button to use a ComPort1.Close() so you can stop the logging, make a copy of the file and carry on logging. So you can open the copy on excel.

      That's the quick and dirty version of it, if you never used VB.net before it might take an hour or so, but that's all.
      If you need a nice finished product, that you'll need to dive a bit more inside it. 

      happy coding!!!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Raju Pandey
      Posted by Raju Pandey
      on Jun 05 2012 10:22 AM
      Intellectual1275 points

      If you haven't invested too much in this yet, you could wait for a product called GUI Composer. This is a TI product that we are going to beta with in July time frame. This will allow you to graph multiple variables in a single graph widget. It will re-use a lot of the foundational layers that is used by CCS, so it will work via real time JTAG.

      Raj

      GUI Composer
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use