Main Content

Generate enum Cast Function

Generate typecast function to convert enumeration type

Since R2020a

Model Configuration Pane: PLC Code Generation / Identifiers

Description

The Generate enum cast function generates the enum type conversion code. The target PLC IDE must support enum data types.

Settings

off (default) | on
On

Simulink® PLC Coder™ autogenerates the enum type conversion code.

Off

Manually create a MATLAB function to convert the enum type value to an integer or to convert an integer to an enum type value.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

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

Version History

Introduced in R2020a