Are Simulink Diagnostics applicable when generating code and running a model on target hardware?
조회 수: 4 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2025년 7월 17일
편집: MathWorks Support Team
2025년 8월 18일
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?
채택된 답변
MathWorks Support Team
2025년 8월 18일
편집: MathWorks Support Team
2025년 8월 18일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Test Model Components에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!