Main Content

Rate Transition block code

Description

Specify the format for Rate Transition block code and data. Inline the code with the model code or create separate functions that the model code calls with state data in a dedicated structure.

Category: Code Generation > Code Placement

Settings

Default: Inline

Inline

Inline Rate Transition block code with model code. Declare Rate Transition block state data in global block state structure.

Function

Separate Rate Transition block code and data from the model code and data. The generated code contains separate get and set functions that the model_step functions call and a dedicated structure for state data. The generated code also contains separate start and initialize functions that the model_initialize function calls.

Dependencies

  • This parameter requires an Embedded Coder® license.

  • Appears only for ERT-based targets.

Command-Line Information

Parameter: RateTransitionBlockCode
Value: 'Inline' | 'Function' |
Default: 'Inline'

Recommended Settings

ApplicationSetting
DebuggingFunction
TraceabilityFunction
EfficiencyInline
Safety precautionNo impact

Note

  • The code generator does not separate code and data for Rate Transition blocks that have variable-size signals or are inside a For Each Subsystem block.

  • In the Rate Transition block parameters dialog box,​ you must select the Ensure data integrity during data transfer parameter. If you do not select this parameter,​ the model produces an error during code generation.

  • In Configuration Parameters dialog box,​ the Multitask rate transition parameter must be set to error. If this parameter is not set to error,​ Embedded Coder disables the Rate Transition block code parameter and the code generator inlines Rate Transition block code.

Related Topics