- Configure Model and Generate Code: https://www.mathworks.com/help/rtw/ug/configuring-the-model-and-generating-code.html
- System Target File for Code Generation: https://in.mathworks.com/help/rtw/ref/systemtargetfile.html?searchHighlight=rsim.tlc&s_tid=srchtitle_support_results_7_rsim.tlc
Stateflow with variable solver step time
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
We would like to use stateflow in our next product. We would like to know if it's possible to generate C code that can be run on a variable time frame ?
We are not 100% sure that the step function will be called at the periodic rate (like fixed step require).
for example, if a delay is put into the chart, the generated code is assuming that the step function is called at a certain rate (invrement only a vraible and compare the delay value). I think we need to have a step function that need to take a delta time or a way of computing the last call time and the new call time and compute de delta.
Hope I'm clear !!
Regards,
Jonathan
0 comentarios
Respuestas (2)
Binaya
el 26 de Sept. de 2023
Hi Jonathan,
I understand that you want to generate C code for your model using the variable-step solver. For Simulink and Embedded coder, the “grt.tlc”and “ert.tlc”target file needs a fixed step solver with discrete time step as the solver configuration. This is done to avoid complex codes and highercomputation power needed for implementing the C code with variable step solver in the hardware.
If you want to use variable step solver for generating the C code, please use ”rsim.tlc”as the system target file in code generation configuration parameters. For details please explore the below documentation:
I hope this helps.
Regards
Binaya
0 comentarios
Ver también
Categorías
Más información sobre Complex Logic 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!