How do I use the block's input signal in a callback for Check Static Range block?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Event Functions dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!