Simulink Real Time Desktop Runs too Fast?
조회 수: 14 (최근 30일)
이전 댓글 표시
Hello all, my question is about Simulink Real Time Desktop for Matlab version 2022a. Strangely, when I specify the stop time for my simulation as 10 seconds, it only runs for 5 seconds in real time. If I change the stop time to something else, it is always exactly half the time I specify. My solver is a FixedStepDiscrete with a time step size of 1 second.
I am unsure why this is the case, but would like to change it so that if I specify 10 seconds of run time, it actually runs for 10 real seconds. Help is appreciated!
On the same topic of real-time simulations, is it possible to make the scope block auto-scale the time axis (grow it) as the simulation progresses, for the case where the stop time is set to 'inf'. I noticed there are options to 'scroll' or 'wrap' the time axis but both of these only show updates in a fixed window length.
Thanks for any suggestions.
댓글 수: 0
채택된 답변
Jan Houska
2022년 11월 1일
Hi Kyle,
are you running in Connected IO or Run In Kernel mode? If Connected IO, please make sure that you have at least one of the Simulink Desktop Real Time I/O blocks or the RT Sync block present in your model. If Run In Kernel, this should never happen and you should probably contact tech support.
Good Luck, Jan
댓글 수: 2
Jan Houska
2022년 11월 1일
Hi Kyle,
"I/O block" here means one of the Simulink Desktop Real Time I/O blocks. All these automatically synchronize to real time, but blocks from other toolboxes do not, so the RT Sync block is required for the synchronization if blocks from other toolboxes are used for I/O.
Jan
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Target Computer Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!