The exact form of the generated code cannot be set in all situations using this method. Real-Time Workshop Embedded Coder puts signals into the block I/O whenever their values need to be persistent across time step, regardless of other settings. For example, the output of a triggered subsystem is an "implicit state" that needs to be persistent to honor the semantics of Simulink. The signal cannot be made local in cases like this; the only way to make them local is to change the semantics of the Simulink block diagram.
Refer to the Signal Object Configuration documentation at the following page:
(or)
>> web([docroot '/ecoder/gs/configuring-model-and-generating-code.html'])
In MATLAB 8.0 (R2012b), from MALTAB command line:
Signals described in the above documentation page, are in the category: [Auto] / [Signal storage resuse ON] / Cannot reuse signal. Note that the generated format appears identical to that generated when 'Signal storage reuse' is off.
Best Answer