This model shows the code generated for a single-rate discrete-time model configured for a bare-board target (one with no operating system).
Open the example model
The model uses one sample time. Inport block 1 and Inport block 2 both specify a 1-second sample time, which is enforced by the Periodic sample time constraint option on the Solver configuration page. To view the solver page, double-click the corresponding yellow button in the model. To display the sample times in the model, double-click the corresponding yellow button in the model.
This model is configured to display sample-time colors upon diagram update. Red represents the fastest discrete sample time in the model, green represents the second fastest, and yellow represents mixed sample times. Click the yellow button in the model to update the diagram and show sample-time colors.