Signal Storage Reuse
Optimize memory by reusing memory storage locations
Model Configuration Pane: PLC Code Generation / Optimization
Description
The Signal storage reuse parameter reuses signal memory.
Settings
Default: on
- On
Reuses memory buffers allocated to store block input and output signals, reducing the memory requirement of your real-time program.
- Off
Allocates a separate memory buffer for each block's outputs. This allocation makes block outputs global and unique, which in many cases significantly increases RAM and ROM usage.
Tips
This option applies only to signals with storage class
Auto
.Signal storage reuse can occur among only signals that have the same data type.
Clearing this option can substantially increase the amount of memory required to simulate large models.
Clear this option if you want to:
Debug a C-MEX S-function.
Use a Floating Scope or a Display block with the Floating display option selected to inspect signals in a model that you are debugging.
If you select Signal storage reuse and attempt to use a Floating Scope or floating Display block to display a signal whose buffer has been reused, an error dialog box opens.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On |
Safety precaution | No impact |
Programmatic Use
Parameter:PLC_PLCEnableVarReuse |
Type: string |
Value: 'on' | 'off' |
Default: 'on' |
Version History
Introduced in R2012b