This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/F28M36H33B2: Gui Composer v2 - Log Graph data

Part Number: F28M36H33B2

Tool/software: Code Composer Studio

I am trying to create a Gui composer app that can view and graph data from my target and also log the viewed or streamed data by saving it to a CSV file. Basically the same as the example in this link: However, this example was for Gui composer v1 and I am not able to import it into Gui composer 2. So I am trying to recreate it in v2. But my knowledge of java scrips is limited and I am not sure where to add the code to make it work. How should I adapt this example to be able to work as a Gui composer v2 app? Is there another v2 based example that does data logging and saving that I can rather use? This is not my main work priority, so I don't want to spend weeks in figuring out how java scrips work and how to create such an app from scratch. I would prefer to have an example that I can adapt to my needs. 

  • I don't believe we have a GCv2 out-of-box example that does data logging/saving. However, viewing and graphing your target data should be fairly straightforward to do using the line graph or other graph widgets. I found a couple of forum threads here and here that could be helpful references.

    Let us know if you have this part going and I'll pull in an expert to comment on the data logging.

  • Albert,

    Since I haven’t heard back from you, I’m assuming you were able to either move past this or it is no longer an issue . If you require further support, please post a reply with an update below or create a new thread. Thanks!

  • Hi AartiG

    Sorry for not replying for a while, I was held up with other things. I still want to get this working. I am able to view data on a line graph or scalar graph, that is fairly simple. But what I want to accomplish is saving the data to my PC to analyze later. I also would like to select the variable that I want to view/log from a drop down menu, is that possible? It seems like I can only have a fixed variable linked to the graph widget and if I want to view another, I have to re-link the widget and re-run Gui. This should be fairly common features of an application interface for diagnostic purposes.     

  • Hi Albert,
    I have put together an example of how to do this with an XDS connection. You would need to import this example by click on Import icon and then expanding project folder view. Then double click on newfile_0.js to see the implementation. I added some documentation to code in relevant places.

    dev.ti.com/.../

    Martin
  • Thanks Martin! This example is exactly what I was looking for, I appreciate the effort.

    I added it to my Gui and it works. Just one question, I would like to save the data as .csv format. I suspect that the format has something to do with the TextEncoder class's encode method? Where can I get more info on that class to modify it for csv format? 

  • Hi Albert, 

    I think you would just need to pass in the string that you want to be created to .encode function. e.g. if you wanted to have all values separated with a comma rather than newline, then I would replace '\n' on line 113 with ',' in newfile_0.js

    martin