Simulink Real-Time File scope write speed
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am just wondering, how would I calculate the maximum speed with which I can save data with the File scope block?
Or what is the highest frequency at which I can run my model and still save X ammount of data?
Saving 40 doubles at frequency of 2kHz causes some missing data (there are no samples saved). At higher frequencies this is even worse.
0 Kommentare
Antworten (1)
Saurabh
am 4 Okt. 2024
I am not sure how to calculate the maximum speed at which one can save data with the "File Scope" Block. But you can refer to the following article to know why there is missing data while logging.
So, If the buffer is too small and the model rate is too fast, the background task (which writes the memory buffer to disk) is not yet finished by the time the buffer fills up again. The Autorestart option may lead to a loss of data in such cases.
By increasing the Number of Samples, you can increase the size of the buffer, which means the buffer fills up less frequently. By increasing WriteSize, the background thread can write more data to the disk, hence it helps keep up with the data collection.
You can also switch off "Autorestart" to avoid this issue.
I hope this helps.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Real-Time finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!