Main Content
Enable local block outputs
Declare block signals locally or globally
Model Configuration Pane: Code Generation / Optimization
Description
The Enable local block outputs parameter specifies whether block signals are declared locally or globally.
Dependencies
This parameter is enabled by Signal storage reuse.
Settings
on
(default) | off
- On
Block signals are declared locally in functions.
- Off
Block signals are declared globally.
Tips
If it is not possible to declare an output as a local variable, the generated code declares the output as a global variable.
If you are constrained by limited stack space, you can turn Enable local block outputs off and still benefit from memory reuse.
Recommended Settings
Application | Setting |
---|---|
Debugging | Off |
Traceability | Off |
Efficiency | On |
Safety precaution | No impact |
Programmatic Use
Parameter: LocalBlockOutputs |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
Version History
Introduced before R2006a