Simulink Real-Time File scope write speed
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Saurabh
2024년 10월 4일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Real-Time에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!