| Real-Time Workshop® Embedded Coder™ | ![]() |
| On this page… |
|---|
Generating Code for Continuous Time Blocks |
The ERT target supports code generation for continuous time blocks. If the Support continuous time option is selected, you can use any such blocks in your models, without restriction.
Note that use of certain blocks is not recommended for production code generation for embedded systems. The Simulink Block Data Type Support table summarizes characteristics of blocks in the Simulink and Simulink® Fixed Point™ block libraries, including whether or not they are recommended for use in production code generation. To view this table, execute the following command at the MATLAB command line:
showblockdatatypetable
Then, refer to the "Code Generation Support" column of the table.
The ERT target supports continuous solvers. In the Solver options dialog, you can select any available solver in the Solver menu. (Note that the solver Type must be fixed-step for use with the ERT target.)
Note Custom targets must be modified to support continuous time. The required modifications are described in the Developing Embedded Targets document. |
The ERT target supports the stop time for a model. When generating host-based executables, the stop time value is honored when any one of the following is true:
GRT compatible call interface is selected on the Interface pane
External mode is selected in the Data exchange subpane of the Interface pane
MAT-file logging is selected on the Interface pane
Otherwise, the executable runs indefinitely.
Note The ERT target provides both generated and static examples of ert_main.c. ert_main.c controls the overall model code execution by calling the model step and initialization functions, and optionally checking the ErrorStatus/StopRequested flags to terminate execution. For a custom target, if you provide your own custom static main.c, you should consider including support for checking these flags. |
![]() | Accessing the ERT Target Options | Mapping Application Requirements to Configuration Options | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |