Ignore certain blocks for production code generation
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!