User`s guide

7 Models with Multiple Sample Rates
7-16
This timing diagram illustrates two problems:
1 Execution of the slower block is split over more than one faster block
interval. In this case the faster task executes a second time before the slower
task has completed execution. This means the inputs to the slower task can
change, causing unpredictable results.
2 The faster block executes before the slower block (which is backwards from
the way Simulink operates). In this case, the 1 sec block executes first; but
the inputs to the faster task have not been computed. This can cause
unpredictable results.
To eliminate these problems, you must insert a Unit Delay block between the
slower and faster blocks. The sample rate for a Unit Delay block must be set to
that of the block that is driving it (i.e., the slower block):
This pictures shows the timing sequence that results with the added Unit
Delay block:
Slower
Faster
Block
T=2sec
T=1sec
Unit Delay
Block
T=2sec