Stateflow Embedded Coder default state

1 vue (au cours des 30 derniers jours)
Mirko
Mirko le 18 Mai 2020
Hello, is there any way to configure the default state in generating embedded coder code from a stateflow project?
case CTRL_Sistema_ETM_Type_ETM_ATTIVO
:
switch (Uport_CTRL_Sistema_ETM.Stato_CTRL_Alimentazione) {
case CTRL_Alimentazione_Type_Sistema_Attivo:
Yport_CTRL_Sistema_ETM.Stato_CTRL_Sistema_ETM =
CTRL_Sistema_ETM_Type_ETM_ATTIVO;
break;
case CTRL_Alimentazione_Type_MCC_NON_Alimentati:
Yport_CTRL_Sistema_ETM.step = 0U;
Yport_CTRL_Sistema_ETM.Stato_CTRL_Sistema_ETM =
CTRL_Sistema_ETM_Type_ETM_NON_ATTIVO;
break;
case CTRL_Alimentazione_Type_SError:
Yport_CTRL_Sistema_ETM.Stato_CTRL_Sistema_ETM =
CTRL_Sistema_ETM_Type_S1Error;
break;
}
break;
case CTRL_Sistema_ETM_Type_S1Error:
Yport_CTRL_Sistema_ETM.Stato_CTRL_Sistema_ETM =
CTRL_Sistema_ETM_Type_ETM_NON_ATTIVO;
break;
default:
switch (Uport_CTRL_Sistema_ETM.Stato_CTRL_Alimentazione) {
case CTRL_Alimentazione_Type_Sistema_Attivo:
Yport_CTRL_Sistema_ETM.Stato_CTRL_Sistema_ETM =
CTRL_Sistema_ETM_Type_ETM_ATTIVO_RIPETITORE;
break;
case CTRL_Alimentazione_Type_MCC_NON_Alimentati:
Yport_CTRL_Sistema_ETM.step = 0U;
Yport_CTRL_Sistema_ETM.Stato_CTRL_Sistema_ETM =
CTRL_Sistema_ETM_Type_ETM_NON_ATTIVO;
break;
case CTRL_Alimentazione_Type_SError:
Yport_CTRL_Sistema_ETM.Stato_CTRL_Sistema_ETM =
CTRL_Sistema_ETM_Type_S1Error;
break;
}
break;
}
}
I entered the stateflow model and part of the generated code.
I wish the default state was S1Error. Is there any way to configure this state as default?
Thanks for your help

Réponses (0)

Catégories

En savoir plus sur Embedded Coder dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by