User`s guide

7 Models with Multiple Sample Rates
7-14
The sample time of the Zero Order Hold block must be set to 2 sec (i.e., the
sample time of the slower block).
The Zero Order Hold block executes at the sample rate of the slower block, but
with the priority of the faster block.
This ensures that the Zero Order Hold block executes before the 1 sec block (its
priority is higher) and that its output value is held constant while the 2 sec
block executes (it executes at the slower sample rate).
Slower to Faster Transitions in Simulink
In a model where a slower block drives a faster block, Simulink again computes
the output of the driving block first. During sample intervals where only the
faster block executes, the simulation progresses more rapidly.
The following diagram illustrates the execution sequence:
Faster
Slower
Block
T=1sec
T=2sec
Zero-Order
Hold
Block
T=2sec
T=1s
T=0.5
ZOH
1Sec
Task
T=0.5
T=1s
T=1s T=1s
ZOH
t0
t1
T=1s
Time
T=2s
ZOH
t2 t3
1Sec
Task
T=2s
T=1s
T=1s T=1s
ZOH
2Sec
Task
t0
t2