Filter löschen
Filter löschen

How does the time step work when using Simulink external mode?

7 Ansichten (letzte 30 Tage)
I am creating a Simulink model which I will run using external mode. I would like to know how the time step on external mode works.
Does Simulink send a signal to the target on every time step?
How small can the time step be?
What happens if I set the time step too small?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 17 Apr. 2024
Bearbeitet: MathWorks Support Team am 17 Apr. 2024
When you run a model in external mode, the code for the model is generated and deployed to the target. On the target, the output calls are configured to send data back to Simulink which is why you can see the output in the Simulink canvas/scopes. The target manages its own time step and does not receive any information from Simulink other than packaged messages if a variable has been changed or if a command is given on the Simulink side.
The minimum time step mostly depends on the hardware being used. If you set the time step too small, there may not be enough time for the data output in which case either the data will get cut off or the simulation will lag (depending on overrun settings).
There are a few useful links in the MATLAB Documentation which may be able to provide more detail than my explanation above:
1) Here is a description of external mode that describes how time steps are calculated:
2) This page discusses the various communication protocols associated with external mode
3) Page on multitasking which might help speed up external mode execution:

Weitere Antworten (0)


Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange


Noch keine Tags eingegeben.




Community Treasure Hunt

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

Start Hunting!

Translated by