Why is there a time difference between the "clock" block and the "elapsed time" block converted to nanoseconds by using the "time stamp delta" block?
이전 댓글 표시
I am using real-time Simulink along with a data collection system. The system records some data (e.g. motion capture data, ground reaction force, etc.), and it sends a HIGH signal to the real-time machine while it is recording the data. I would like to sync this data with my Simulink data, so I would like to confirm if the time in Simulink is consistent.
I want to know for the 1:1000 data recorded from Simulink (running at 1kHz), does it precisely correspond to "0.001:0.001:1" seconds in real time?
In order to check if 1 second in the simulation corresponds to 1 second in real time, I included a "clock" block and an "elapsed time" block in the same model. I am converting the elapsed time to nanoseconds by using the "time stamp delta" block and the time instance when the simulation starts. I created a script that calculates the difference between these two times and plots it. I am expecting this difference to be zero. It starts as 0, but then it increases linearly. Why is the difference between the "elapsed time" block and the "clock" block linearly increasing?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 C2000 Microcontroller Blockset에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!