필터 지우기
필터 지우기

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

조회 수: 8 (최근 30일)
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?

답변 (1개)

Shresth Sharma
Shresth Sharma 2020년 3월 20일
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:

카테고리

Help CenterFile Exchange에서 Configure and View Diagnostics에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by