How to run serial communication in Real Time Simulink?
6 次查看(过去 30 天)
显示 更早的评论
I'm using a Teensy 3.2 to send data to Simulink through the serial port. I can't directly deploy the model to hardware, because it's not supported in the list. The problem is, though I'm able to get the data, my simulation runs slow, and takes 1 second between sampling steps from the Serial Receive Block. That is, every real time second, my simulation advances 0.1 seconds.
How can I make Simulink run in real time, so that the 0.1 seconds of sampling corresponds to the true value?
I alredy tried using the Real Time Synchronization block, but it just made things worse, taking around 4 real time seconds to advance 0.1 seconds of simulation time.
Just to clarify, I'm not running anything else on my model, only the serial communication, so it's not about anything from the solver.
Any ideas?
0 个评论
回答(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!