Simulink Real-Time (SLRT) and external mode: slow update

조회 수: 6 (최근 30일)
Gijs van Oort
Gijs van Oort 2016년 2월 18일
답변: Dennie 2016년 2월 22일
In Matlab 2015b, when I run a model on the SLRT and connect to it via Simulink External Mode, updating the values in the displays takes quite long. If I have 10 displays, it takes a second or 2, if I have 100 displays, it takes as long as 20 seconds. Is there a way to reduce this?
Gijs

채택된 답변

Dennie
Dennie 2016년 2월 22일
Hello Gijs,
Basically, there is not much that you can do about this in simulink. The more data that has to be transferred in external mode (=more scopes) results in slower update rates. If it is possible at all, i would recommend using target scopes. This shows the information directly on a display connected to the target PC.
If there is no display available on your target device, you can choose to log your signals or to send the data via UDP to a UDP listener model that you can create in a secondary simulink model or another program (e.g., labview) if you want to use the data interactivly.
Logging signals in real-time is different than normal (to workspace blocks don't work), you can instead connect an out block (those from submodels) to your signal on the highest simulink model level. This will add your data to the tg.OutputLog structure field. You can set the amount of data collected in the simulation options under code generation tab.
Hope this helps,
Dennie

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by