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.
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.
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.