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

10 Ansichten (letzte 30 Tage)
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?

Antworten (1)

Shresth Sharma
Shresth Sharma am 20 Mär. 2020
Hi,
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:
warning('query')
For going through the warning and back tracing it there is a command available:
warning('on','backtrace')
There are also various other commands available for working with warnings and for understanding more about warnings you can go through the following documentation:

Kategorien

Mehr zu Configure and View Diagnostics finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by