I have a Simulink model that has multiple instances of the same model reference. In the generated code, I would like to log certain signals for debugging purposes. These signals are internal to the model references. Is it possible to assign individual Simulink.Signal objects to these internal signals and assign their storage class as "Exported Global"? Or are there other ways to do this?
I would ideally like a global variable which can be define exact signal names such that the code can be shared. I would like not to create outports to carry these signals to the top level as this is cumbersome for large models and multiple signals. I am aware of the option to set "DefaultParameterBehavior" to "Tunable" and set "OptimizeBlockIOStorage" to "off". However I would not like to do that, as not all signals with names are to be logged in the generated code.
Best Answer