Main Content

Trace to model using

Specify format of comments

Model Configuration Pane: Code Generation / Comments

Description

Specify format of comments for Simulink® blocks, Stateflow® elements, and MATLAB® function blocks.

Dependencies

Settings

Block path (default) | Simulink identifier
Block path

The generated comment includes the entire block path from the root as the traceability link. For example:

/* Outport: '<Root>/Out1' */CustomCodeComments_Y.Out1 = 1;

Simulink identifier

The generated comment includes the Simulink identifier number for the corresponding block or object. For example:

/* Outport: 'Out1' (':33') */
CustomCodeComments_Y.Out1 = 1;

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution

No recommendation

Programmatic Use

Parameter: BlockCommentType
Type: character vector
Value: 'BlockPathComment' (UI Setting Block path) | 'BlockSIDComment' (UI Setting Simulink identifier)
Default: 'BlockPathComment'

Version History

Introduced in R2018a