Is it possible to eliminate the BlockIO contents when generating code?

3 Ansichten (letzte 30 Tage)
I am using MATLAB 2018b SIMULINK to generate c codes. Ater generating the c code in .h file I get two structures one is of dwork and one is blockIo.
My question is how can i delete the conents of BlockIO as I dont need them.
for example:
struct tag_RTM_hello {
BlockIO_hello *blockIO; => my interset is in this
D_Work_hello *dwork;
};

Akzeptierte Antwort

Monika Jaskolka
Monika Jaskolka am 10 Jun. 2021
You probably have to change your model configurations so that code generation makes these changes:
  4 Kommentare
Monika Jaskolka
Monika Jaskolka am 11 Jun. 2021
If you do not what to generate any signal/state variables, then you cannot use any blocks that require signal/state variables. For example, a Unit Delay block requires a variable in the code because it needs to store its previous value. If you don't store this value, then you fundamentally cannot implement the block in code. The HTML code generation report provides links from these variables to the model. You can trace the variables back to the model, and try to delete any block that causes a signal/state variable, but I suspect that that would mean you have an empty (or close to empty) model.
Asang singh
Asang singh am 14 Jun. 2021
Hello Monika,
I got your point, and in order to avoid the generation of DWORK I have stopped using delay blocks. And for this I know that delay block is causing the generation of DWORK.
But as far as BLOCKIO's variables are concerned I am not sure what setting of only some variables are causing them to treated in this structure. If I get to know the setting of those variables then may be I can tweak them to not get generated.
Thanks.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Model Editing finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by