Simulink Coder: Prevent optimization of a signal
Simulink Coder tends to optimize out signals, and these output signals won’t be saved to MODEL_NAME_B
Just Make the signal a testpoint (right click -> Properties -> Testpoint):
When it’s a testpoint, even this completely unconnected signal will not be optimized out:
to MODEL_NAME_A
and connect the output signal to the input of the function block. This will prevent the signal from being optimized out.
Check out similar posts by category:
Matlab/Simulink
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow