How do I use the block's input signal in a callback for Check Static Range block?
조회 수: 2 (최근 30일)
이전 댓글 표시
I am currently checking the reasonableness of the value of a signal in my Simulink model using the Check Static Range block. It works just fine (warning and optionally stops the simulation), but it is unclear whether the cause for the assertion failure is that the input is out of range on the high side, out of range on the low side, or NaN. I see there is a space to add a callback when the assertion fails, but I am not sure how to get it to display the value that is coming into the Check Static Range block. What I want to do is along these lines:
disp(['Check Static Range Input = ' num2str(get_param(gcb,'InputValue'))])
However, 'InputValue' is not a real block property that gives the current value on the wire going into the block; it's just what I wish existed... Also, I think the callback put in the Check Static Range block's mask actually gets dumped into the Assertion block that's under the mask rather than the Check Static Range block which complicates things even further (what would gcb evaluate to, how do I get the value on the wire of the right block, etc.).
Any ideas?
댓글 수: 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!