Specify whether to generate code for blocks that use continuous time.
Category: Code Generation > Interface
Default: off
Generates code for blocks that use continuous time.
Does not generate code for blocks that use continuous time. If you do not select this option and the model includes blocks that use continuous time, an error occurs during code generation.
This parameter only appears for ERT-based targets.
This parameter requires an Embedded Coder® license to generate code.
This parameter must be on for models that include blocks that require absolute or elapsed time values.
This parameter is cleared if you select parameter Remove error status field in real-time model data structure.
If both the following conditions exist, output values read from
ert_main
for a continuous output port can differ from the
corresponding output values in logged data for a model:
You customize ert_main.c
or .cpp
to read
model outputs after each base-rate model step.
You select parameters Support: continuous time and Single output/update function.
The difference occurs because, while logged data captures output at major time
steps, output read from ert_main
after the base-rate model step can
capture output at 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 parameter
Single output/update function ), and insert code in
ert_main to read model output values reflecting only the
major time steps. For example, in ert_main , between the
call and the
call, read the
model External outputs global data structure (defined in
). | X | |
Select parameter Single output/update function. Insert
code in the generated or
.cpp file that returns model output values reflecting only
major time steps. For example, in the model step function, between the output
code and the update code, save the value of the model External
outputs global data structure (defined in
). Then, restore the
value after the update code completes. | X | X |
Place a Zero-Order Hold block before the continuous output port. | X | X |
Parameter:
SupportContinuousTime |
Type: character vector |
Value:
'on' | 'off' |
Default:
'off' |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | Off (execution, ROM), No impact (RAM) |
Safety precaution | No recommendation |