Real-Time Workshop Embedded Coder | ![]() ![]() |
Overview of Operation
The following pseudocode shows the execution of a Real-Time Workshop Embedded Coder main program.
main() { Initialization (including installation of rt_OneStep as an interrupt service routine for a real-time clock) Initialize and start timer hardware Enable interupts While(not Error) and (time < final time) Background task EndWhile Disable interrupts (Disable rt_OneStep from executing) Complete any background tasks Shutdown }
The pseudocode is a design for a harness program to drive your model. The ert_main.c
program only partially implements this design. You must modify it according to your specifications.
Guidelines for Modifying the Main Program
This section describes the minimal modifications you should make in your production version of ert_main.c
to implement your harness program.
Note
rtM is not in a valid state until model _initialize has been called. Servicing of timer interrupts should not begin until model _initialize has been called.
|
![]() | Stand-Alone Program Execution | rt_OneStep | ![]() |