PLC Coder: Comments

Comments Overview

Control the comments that the Simulink® PLC Coder™ software automatically creates and inserts into the generated code.

See Also

Generate Structured Text from the Model Window

Include Comments

Specify which comments are in generated files. This option is available on the PLC Code Generation > Comments pane in the Configuration Parameters dialog box.

Settings

Default: on

On

Places comments in the generated files based on the selections in the Auto generated comments pane.

If you create links to requirements documents from your model using the Simulink Requirements™ software, the links also appear in generated code comments.

Off

Omits comments from the generated files.

Command-Line Information

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

See Also

Generate Structured Text from the Model Window

Include Block Description

Specify which block description comments are in generated files. This option is available on the PLC Code Generation > Comments pane in the Configuration Parameters dialog box.

Settings

Default: on

On

Places comments in the generated files based on the contents of the block properties General tab.

Off

Omits block descriptions from the generated files.

Command-Line Information

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

See Also

Simulink Block / Stateflow Object Comments

Specify whether to insert Simulink block and Stateflow® object comments. This option is available on the PLC Code Generation > Comments pane in the Configuration Parameters dialog box.

Settings

Default: on

On

Inserts automatically generated comments that describe block code and objects. The comments precede that code in the generated file.

Off

Suppresses comments.

Command-Line Information

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

See Also

Generate Structured Text from the Model Window

Show Eliminated Blocks

Specify whether to insert eliminated block comments. This option is available on the PLC Code Generation > Comments pane in the Configuration Parameters dialog box.

Settings

Default: off

On

Inserts statements in the generated code from blocks eliminated as the result of optimizations (such as parameter inlining).

Off

Suppresses statements.

Command-Line Information

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

See Also

Generate Structured Text from the Model Window