Main Content

Maximum number of fields allowed in a UDT

Modify the maximum number of elements in a user-defined tag

Since R2023a

Model Configuration Pane: PLC Code Generation

Description

The Maximum number of fields allowed in a UDT parameter allows you to specify the maximum number of elements in a user-defined tag (UDT). When you enable the Allow nesting of UDTs if fields are more than allowed threshold parameter and the number of UDT elements exceeds the value set in Maximum number of fields allowed in a UDT, Simulink® PLC Coder™ nests the UDTs in the generated code.

Dependencies

To enable this parameter,

  1. Set Target IDE to Rockwell Studio 5000: Routine or Rockwell RSLogix 5000: Routine.

  2. Select the Allow nesting of UDTs if fields are more than allowed threshold parameter.

Settings

500 (default) | positive scalar

Specify the maximum number of UDT elements after which Simulink PLC Coder begins to nest UDTs in the generated code.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution500

Programmatic Use

Parameter: PLC_MaxFieldsInUDT
Type:unsigned integer
Value: any valid value
Default: 500

Version History

Introduced in R2023a