Stateflow Embedded Coder default state

1 visualización (últimos 30 días)
Mirko
Mirko el 18 de Mayo de 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

Respuestas (0)

Categorías

Más información sobre Embedded Coder en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by