Using Preprocessor directives, how could I generate an autocode using embedded coder in simulink? What are the feasible otions to change the autocode from these preprocessor directives during runtime?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Need to implement a simulink model in such a way that, the autocode generated would be containing all the switch logics that would be mentioned in the model.
Then , I need to select only that part of autocode to be executed, based on the selection of my preprocessor directives in the respective header files.
I tried to acheive solution for this requirement using variant subsystem; where i find both the switching logics in the autocode generated.
But, using thi smethod, the code that is to be used is not speciied at runtime.
The switching variable is not able to be changed once the model is build, which makes me to build the model everytime and generate autocode every time i build the model.
Rather, if I have any option to only use the particular part of code in autocode, without building the model everytime, then, i will be able to make changes runtime based on the switching parameter.
2 comentarios
Shanmukha
el 14 de Feb. de 2020
Hi Sasikanth,
I think it would probably help if you use if-else subystem of even switch case. Below links might be helpful for your use-case
Regards,
Shanmukha
Respuestas (0)
Ver también
Categorías
Más información sobre Deployment, Integration, and Supported Hardware 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!