Simulink Real Time Desktop Runs too Fast?
17 次查看(过去 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!