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 CenterFile Exchange에서 Embedded Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by