Main Content

PLC Block Properties

Block implementation parameters enable you to control details of the code generated for specific block implementations. Property names are specified as character vectors. The data type of a property value is specific to the property. This section describes the syntax of each block implementation parameter and how the parameter affects generated code.

UseExternalDefinition

Use the UseExternalDefinition PLC block parameter to exclude a subsystem in a model from the generated code.

SettingDescription
Off (default)Do not exclude the subsystem block definition from the generated code.
FunctionSuppress the definition of the model components in the generated code. The block definition is generated as a function. When you import the generated code into the PLC IDE, you must provide definitions for the excluded modules.
FunctionBlockSuppress the definition of model components in the generated code. The block definition is generated as a function block. When you import the generated code into the PLC IDE, you must provide definitions for the excluded modules.

Limitations

The block property is supported only for:

  • Subsystem blocks

  • MATLAB Function blocks

  • Stateflow® charts

If you set this property to Function or FunctionBlock, the block must not use cell arrays or virtual bus signals as inputs or outputs.

See Also