Main Content

Inline Named Constants

Improve code readability by inlining named constants in generated code

Model Configuration Pane: PLC Code Generation / Optimization

Description

The Inline named constants parameter controls the inlining of global named constants. By default, the generated code contains named ssMethodType constants for internal states or other Simulink® semantics. If you select this option, the software replaces the named constants with its integer value.

Settings

off (default) | on
On

Inlines named constants.

Off

Reverts to its default behavior and uses named constants in the generated code.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn
Safety precautionNo impact

Programmatic Use

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

Version History

Introduced in R2017b