Fold temporary variable using function block instance output variable
Optimize output variables by using expression folding
Since R2022b
Model Configuration Pane: PLC Code Generation / Optimization
Description
The Fold temporary variable using Function Block instance output variable parameter optimizes the code for the output variables of function blocks generated from reusable Simulink® subsystems, Stateflow® charts, or MATLAB® Function blocks by removing temporary variable assignments that are not required.
Settings
Default: off
- On
Generates optimized code for output variables of function blocks by folding temporary variables into a single expression.
- Off
The generated code for function block instance output variables uses temporary variable assignments.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On |
Safety precaution | No impact |
Programmatic Use
Parameter:PLC_FoldFBCallOutputVar |
Type: string |
Value: 'on' | 'off' |
Default: 'off' |
Limitations
This option is not supported for the Rockwell Automation® Studio 5000 and OMRON Sysmac® Studio target IDEs.
Version History
Introduced in R2022b