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?

조회 수: 7 (최근 30일)
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.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by