Code generation for TI C2000 - issues for chart operations

1 view (last 30 days)
Hi MATLAB community
I'm new in Texas Instruments Launchpad (TMS320F28379D) and I'm doing a project where I'm using Simulink Chart (or stateflow) for control algorithm.
When I click Generate Code buttom in Silulink, I can't see any operations and conditions in the code generated. So, Is it normal?
Note:Inputs/outputs (V,P/D)Variables (dP,dV,Vp,Pp), Initial Value (Vp=20,Pp=0,D=0.8)
Conditions of dP or dV don't show in this code, or any operation defined in a state, like a dP = P -Pp. or dV=...
For example: in this code don't show math operations about dV,dP, and dV condition,
do {
/* During: mppt P&O */
switch (newPO2_DW.is_c3_newPO2) {
case newPO2_IN_Calculate_diffP:
/* During 'Calculate_diffP': '<S1>:57' */
if (newPO2_DW.dP <= 0U) {
/* Transition: '<S1>:65' */
newPO2_DW.is_c3_newPO2 = newPO2_IN_Calculate_diffv1;
/* Entry 'Calculate_diffv1': '<S1>:109' */
} else {
/* Transition: '<S1>:64' */
newPO2_DW.is_c3_newPO2 = newPO2_IN_Calculate_diffv;
/* Entry 'Calculate_diffv': '<S1>:108' */
}
break;
case newPO2_IN_Calculate_diffv:
/* During 'Calculate_diffv': '<S1>:108' */
/* Transition: '<S1>:9' */
newPO2_DW.is_c3_newPO2 = newPO2_IN_Decrement_D2;
/* Entry 'Decrement_D2': '<S1>:6' */
newPO2_B.D -= 0.003;
break;
case newPO2_IN_Calculate_diffv1:
/* During 'Calculate_diffv1': '<S1>:109' */
/* Transition: '<S1>:63' */
newPO2_DW.is_c3_newPO2 = newPO2_IN_Increment_D;
/* Entry 'Increment_D': '<S1>:7' */
newPO2_B.D += 0.003;
break;
case newPO2_IN_D_max:
/* During 'D_max': '<S1>:35' */
/* Transition: '<S1>:29' */
/* Transition: '<S1>:30' */
newPO2_DW.is_c3_newPO2 = newPO2_IN_show;
/* Entry 'show': '<S1>:78' */
break;
case newPO2_IN_D_min:
/* During 'D_min': '<S1>:27' */
/* Transition: '<S1>:32' */
/* Transition: '<S1>:30' */
newPO2_DW.is_c3_newPO2 = newPO2_IN_show;
/* Entry 'show': '<S1>:78' */
break;
case newPO2_IN_Decrement_D2:
/* During 'Decrement_D2': '<S1>:6' */
/* Transition: '<S1>:13' */
newPO2_DW.is_c3_newPO2 = newPO2_IN_Save_Data;
/* Entry 'Save_Data': '<S1>:34' */
break;
case newPO2_IN_Increment_D:
/* During 'Increment_D': '<S1>:7' */
/* Transition: '<S1>:14' */
newPO2_DW.is_c3_newPO2 = newPO2_IN_Save_Data;
/* Entry 'Save_Data': '<S1>:34' */
break;
I appreciate the attention given and any information is of great help.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!