Supress code generation of certain sections in a model
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hi, I have a situation which can be explained by these 2 questions:-
1) I have some blocks(including SF charts) in my model. I want to simulate entire model but during code generation, I want that code should be generated only for certain blocks(not all blocks). Can I achieve this if I connect those blocks to "Environment Controller" block? or is there any other better method to achieve this?
2) I have a Stateflow chart containing some states and some transistions. I want to simulate entire chart but I want the autocode to be generated only for specific states and transitions and not for entire SF chart. Is there any identifier or any method which I can use within Stateflow to supress code from getting generated for certain sections?
In both the situations, I want the changes to be reflected in autocode generated by RTW. I do not want to hand modify generated code.
Would appreciate if you can suggest any approach to achieve both scenarios.
Answers (1)
Fangjun Jiang
on 4 Jul 2011
0 votes
For case 1, you can group those blocks into a Subsystem. You can generate code for just that Subsystem block, not for the whole model.
For case 2, I'm not sure. The fall-back is to device into two charts.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!