Stateflow Embedded Coder default state

1 回表示 (過去 30 日間)
Mirko
Mirko 2020 年 5 月 18 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangeEmbedded Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by