help, with code generation for TI C2000

Hi Please,when i generate to code to TI C2000, What type of configuration does simulink need for the generate algorithm code, with all chart conditions?
I'am using Chart for control algorithm, and I need send the code generation for TI C2000, through code generatios of simulink window.
I can a generate code, but I look that generated code is missing several conditions and operations.

 Respuesta aceptada

Jonas
Jonas el 13 de Jul. de 2020

0 votos

Hi Carlos
If the issue is just that some states and/or transitions you have programmed in Stateflow do not appear in the generated code, then I just think the Embedded Code generator optimized those states out of the code since they are never reached or used. This aspect of the code generator is called 'block reduction'.
If you have a transition with the condition [false] for example, the transition is never made and the code generator may chose to not generated code of it.
Some background info:
With kind regards,
Jonas

4 comentarios

Carlos Noriega
Carlos Noriega el 14 de Jul. de 2020
Hi Jonas,
I try to send this contol algorithm into TI C2000 (TMS320F28379D LAUNCHPAD)
This is my control algorihtm.
Inputs/outputs (V,P/D)Variables (dP,dV,Vp,Pp), Initial Value (Vp=20,Pp=0,D=0.8)
when in simulink I generate the code c, these compilation errors appear for this variables
This assignment writes a 'uint16' value into a 'double' type. Code generation does not support changing types through assignment. Check preceding assignments or input type specifications for type mismatches. State 'Save_Data'"Pp" "Vp"
You know which configuration I needed for generated C code of my algorithm.
Jonas
Jonas el 14 de Jul. de 2020
Editada: Jonas el 14 de Jul. de 2020
The variable P is a uint16 while Pp is a double, you are doing Pp = P which is not correct Data Type wise.
This has nothing to do with the Configuration Parameters.
Carlos Noriega
Carlos Noriega el 24 de Jul. de 2020
Hi Jonas, I was wondering if you might be able to give me some advice.
Jonas
Jonas el 4 de Ag. de 2020
Explicitly set the data type of the variables of your stateflow chart using the Model Explorer.

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 11 de Jul. de 2020

Comentada:

el 4 de Ag. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by