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.

LAUNCHXL-F28379D: Sending real time input from PC to F28379D board

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

I'm fairly new to Simulink programming so bear with me.

My project is to measure some parameters with the ADC of the board and send them over serial (SCI_A) to a Simulink file I'm running on my PC and then graph the data.

So far I've succeeded in doing just that by uploading a program to the board that send the data (using the SCI transmit block) and another program that's only run on my PC, that reads the data using SCI receive (and of course a com port select block and a Scope block to plot the data)

Now I want to save the data that I get into a Matlab file, but since I plan to save days or weeks of data (multiple times per second), the file would get huge and I wouldn't want it to get corrupted. So my first question is ...is there a way to SAVE the data (I've tried using a To File block) is chunks...say 1000samples, then open a new file and start saving the new incoming data to that so I'll end up with loads of separate data files?

My second question is...Uploading a program to my board takes loads of time and I have to do it each time I want to change a parameter. Is there a way I could receive the data I want to, but also use the same program running on my PC to send data back to the board and change it's parameters?

To clarity...let's for example say I want to measure an adc input with the board, multiply the data by a number X and send that to my PC where I could plot the data and save it into multiple files when one file supersedes let's say 1000 samples. If I choose so I would also like to send the number X from my PC to the board, so that the multiplication factor changes.

I hope I've clearly stated my problem and I thank you for your answers in advance.

P.S: Again, I'm new at this so please be specific when answering, I would very much appreciate "explain this to your granny" answers.

  • Hi,

    First, In order to save the date into multiple files, you will have to modify your PC application. I am not sure why this wouldn't be achievable.

    Second, to configure the device with a parameter, certainly you can send some data to the device from the PC instead of having to create a new executable every time. You just need to modify the PC and device applications to communicate properly and do what you want them to do. The PC would send the new parameter, and the device would receive it and update some global variable which is the parameters value.

    Regards,
    sal
  • Here is my receiving setup (the program running on my PC) so far. I'm receiving a bunch of ADC data, sending it through the mux block to demux it (for some reason this works with a mux, not a demux) and then sending it to the scope block and the to file block.

    I would now also like to send some parameters back, but I'm honestly not sure how. Exact instructions would be amazing.

  • Hi,

    You can see the serial_flash_programmer Utility in C2000Ware. This is a C++ VIsual Studio project which sends and received data to the device.

    Also, as long as you can open the COM port, it should be easy enough to write code to send data to it. Especially since you are able to read from it.

    Hope this helps,
    sal
  • What about saving data to multiple files when one reaches a max file size?
  • Hi,

    This should not be a problem either. I am not sure what programming language you are using, but if you search the internet for some solutions, I bet many will pop up. You will have to open a file and then print to that file. It shouldn't be more involved than that.

    sal