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!