Are Simulink Diagnostics applicable when generating code and running a model on target hardware?

4 Ansichten (letzte 30 Tage)
I have a Simulink model, and I use the Simulink Real-time (SLRT) workflow for code generation. For development purposes, I apply High-Integrity System Modeling settings. For example, I have set the model configuration parameter "Detect Overflow" to error. I understand that in normal Simulink model simulation, this will halt the simulation when integer overflow is detected.
If the model is deployed on target hardware, will these settings still follow the same behavior as model simulation in Simulink? For example, if the "Detect Overflow" is set to error, will the execution of real-time application halt in case of integer overflow detection? 

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 18 Aug. 2025
Bearbeitet: MathWorks Support Team am 18 Aug. 2025
Diagnostic settings such as Detect overflow, Detect underflow, and others are intended to perform checks during various stages of model development, such as edit-time, diagram updates, simulation within Simulink, or possibly during code generation. When a model is configured for Simulink Real-Time (SLRT), the diagnostics will still be executed during these phases.
However, it's important to note that these diagnostics do not apply during the execution of the real-time application on the target hardware. For example, if an overflow occurs while the model is running on the SLRT target, the diagnostic setting (e.g., Detect overflow set to "error") will not interrupt or stop the execution of the real-time application.
This is because SLRT works by generating code (using Simulink Coder), and then compiling & running that code on a target machine. Simulink Coder doesn't do any extra range checking, so SLRT inherits that behavior.

Weitere Antworten (0)

Kategorien

Mehr zu Test Model Components finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by