Sample time properties
Discrete sample time periods, offsets, and priorities
Model Configuration Pane: Solver
Specify priority for each sample time in the model.
To enable this parameter, set the Periodic sample time constraint parameter to
Specify the sample time properties as an n-by-
where n is equal to the number of discrete sample times in the model.
Each row of the matrix has this form:
[period, offset, priority]
period— Sample time period
offset— Sample time offset relative to other blocks with the same period
priority— Execution priority of the real-time task associated with the sample time
Specify the sample time properties in order from highest priority to lowest priority. During simulation, higher priority tasks run first and can interrupt lower priority tasks as needed. Faster rates must have higher priorities. Continuous sample time always has the highest priority.
For example, specifying the value as
[[0.1, 0, 10]; [0.2, 0, 11]; [0.3, 0,
Declares that the model should specify three sample times
Sets the fundamental sample time period to 0.1 second
Assigns priorities of 10, 11, and 12 to the sample times
Assumes that higher priority values indicate lower priorities
The table summarizes recommended values for this parameter based on considerations related to code generation.
|Safety precaution||Period, offset, and priority of each sample time in the model|
Introduced in R2007a