How to run serial communication in Real Time Simulink?

조회 수: 4 (최근 30일)
Gabriel Hernandez
Gabriel Hernandez 2020년 11월 1일
편집: Gabriel Hernandez 2020년 11월 1일
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개)

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by