How do I Trace a Warning in the Simulink Diagnostic Viewer to the Block that Generated It?

6 views (last 30 days)
I'm running my simulation and I get the following warning in the Diagnostic Viewer:
Altitude is out of range. Valid altitudes are between 0 and 20000 m.
Component:Simulink | Category:Model warning
I'm pretty sure, but not positive, that the warning is coming from the ISA Atmosphere Model block in the Aerospace Blockset. But I put a scope in the input to the block and it's always between the stated limits, so I'm not sure. I tried the Simuink debugger, but couldn't figure out a way to set a breakpoint on warning.
Nothing in the Diagnostic Viewer suggests where exactly the warning is coming from (i.e., no hyperlink to the offending block as it would show for an error).
I'm not even sure how to set up a block to generate a warning message. Anyway, is there a way for me to figure out where this warning is coming from?

Answers (1)

Shresth Sharma
Shresth Sharma on 20 Mar 2020
It is my understanding that you are using Aerospace toolbox and you are getting a warning while executing the block. In MATLAB there are certain predefined commands, to know the reason behind the warning or to query about warning, you can use:
For going through the warning and back tracing it there is a command available:
There are also various other commands available for working with warnings and for understanding more about warnings you can go through the following documentation:


Find more on Configure and View Diagnostics in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!