Specify whether to generate the
Category: Code Generation > Interface
for a model. This function contains the output and update function code
for the blocks in the model and is called by
rt_OneStep to execute processing for one clock
period of the model at interrupt level.
Does not combine output and update function code into a single
function, and instead generates the code in separate
Errors or unexpected behavior can occur if a Model block is part of a cycle, the Model block is a direct feedthrough block, and an algebraic loop results. For more information about direct feed through, see Algebraic Loop Concepts.
Simulink® Coder™ ignores this parameter for a referenced model if any of the following conditions apply to that model:
Has a continuous sample time
Is logging states (using the States or Final states parameters in the Configuration Parameters > Data Import/Export pane
Setting Code interface packaging to
class forces on and disables this option.
This option and Classic call interface are mutually incompatible and cannot both be selected through the GUI. Selecting Classic call interface forces off and disables this option and clearing Classic call interface enables (but does not select) this option.
When you use this option, you must clear the option Minimize algebraic loop occurrences on the Model Referencing pane.
If you customize
to read model outputs after each base-rate model step, selecting both
parameters Support: continuous time and
Single output/update function can cause output
values read from
ert_main for a continuous output port to
differ from the corresponding output values in the logged data for the
model. This is because, while logged data is a snapshot of output at major
time steps, output read from
ert_main after the base-rate
model step potentially reflects intervening minor time steps. The following
table lists workarounds that eliminate the discrepancy.
|Work Around||Customized ert_main.c||Customized ert_main.cpp|
|Separate the generated output and update functions (clear
the Single output/update function
parameter), and insert code in ||X|
|Select the Single output/update
function parameter and insert code in the
|Place a Zero-Order Hold block before the continuous output port.||X||X|
|Type: character vector|