Main Content

Control Format and Placement of Rate Transition Block Code and Data (Embedded Coder)

If you have an Embedded Coder® license and your model is configured to use a data code interface, you can control the format and placement of code generated for Rate Transition blocks by changing the setting of model configuration parameter Rate Transition block code (Embedded Coder).

By default, the code generator inlines Rate Transition block code with other model code and declares the block data in the global block state structure. Alternatively, for Rate Transition blocks, you can configure the code generator to place the block state data in a dedicated structure and produce these functions that model entry-point functions call.

  • get and set functions that model_step entry-point functions call

  • start and initialize functions that the model_initialize entry-point function calls

To change the format and placement of the code:

  • Make sure that Rate Transition blocks do not take a variable-size signal as input and are not inside a For Each Subsystem block.

  • Select the Rate Transition block parameter Ensure data integrity during data transfer.

  • Set model diagnostic parameter Multitask data transfer to error.

  • Set the model configuration parameter Rate Transition block code to Function.

See Also

Topics