Main Content

Reuse MATLAB Function Block Variables

Reuse MATLAB Function Block variables in generated code

Model Configuration Pane: PLC Code Generation / Optimization

Description

The Reuse MATLAB Function block variables parameter enables reuse of MATLAB function block variables in the generated code.

Settings

off (default) | on
On

Generates code that reuses MATLAB Function block variables where appropriate.

Off

Reverts to its default behavior and does not reuse variables in the generated code.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn
Safety precautionNo impact

Programmatic Use

Parameter:PLC_ReuseMLFcnVariable
Type: string
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2017b