Assigning Flags to signals in stateflow

3 vues (au cours des 30 derniers jours)
Ryan0101
Ryan0101 le 28 Mar 2012
Hello,
I have three signals (from a signal builder) that I'm passing into a stateflow model. Inside the sf model I compare the signals and if one is different then I want it to have a flag attached to it. That way the next steps won't use the failed signal.
I thought attaching a 'P' or 'F' to the beginning of the signal would work, but the sf model takes those signals at an exact time instance and cannot see the past values (at least I think so).
Any help would be appreciated. I can also explain further if need be. Thanks!

Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 29 Mar 2012
Perhaps you could convert each of your signals to a structure with two fields - one that contains the value at that time-step and another that holds a boolean flag that denotes its validity. See Working with Structures and Bus Signals in Stateflow Charts for more information on how you can use structure signals inside Stateflow charts.
  1 commentaire
Ryan0101
Ryan0101 le 29 Mar 2012
I'll try it out, Thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Complex Logic 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!

Translated by