Ignore certain blocks for production code generation
Show older comments
Hi all
I have a controller model that I develop and reference in three different harnesses:
- simulation
- rapid prototyping
- production code generation.
I have certain blocks and signals that are used in the first two harnesses, but may not appear in the final production code generation. For example: I have made a library block of a PI controller which has an additional 'log' output port containing a bus with all kinds of signals from inside the PI controller block. In simulation I use this bus for Scope blocks, in the rapid prototyping environment I use this bus for other displaying methods. For production code generation however, this signal bus is not needed and I want to avoid code generation for this. This bus is passed through an outport.

I have found the block 'Environment Controller' which could be used to reduce blocks only used in simulation, but I still need them in rapid prototyping. I have also found this MATLAB Question but it is only a solution for MATLAB code, not Simulink.
Are there ways to reduce blocks for production code generation, which are not reduced by the automatic block reduction?
Can I differentiate based on the TLC I chose?
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!