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

6 次查看(过去 30 天)
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