Are Simulink Diagnostics applicable when generating code and running a model on target hardware?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 17 Juil 2025
Modifié(e) : MathWorks Support Team
le 18 Août 2025
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?
Réponse acceptée
MathWorks Support Team
le 18 Août 2025
Modifié(e) : MathWorks Support Team
le 18 Août 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.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Test Model Components dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!