Short answer - do one of the following
- Insert a Rate Transition (Simulink -> Signal Attributes) block anytime you have a signal which is updated at one rate being fed into another block that is updating at a different rate.
- Set the solver to SingleTasking. Go to Simulink -> Configuration Parameters -> Solver and then set the Tasking Mode for periodic sample times to Singletasking.
Some background...
Simulink has this idea of the world where if you are using a Fixed-step solver, it thinks you might end up generating code from the model so it can run in real-time on some processor. It wants to be nice to you and help you ensure that the simulation results you get match up with the results you see in the real-time execution of the code.
In real-time execution, different rates might have different priorities, and high priority rates might be able to preempt low priority rates. Simulink calls this "multitasking". As soon as you allow this, you allow potential data integrity issues. Often, the workaround to these issues involve buffering or delaying data.
The Rate Transition block aims to help you add protections against those issues. If you use a solver set to multitasking, it forces you to add the effects of those protections in simulation, so you can see the effects prior to ever generating code.
So, your options, as stated above
- Add the protections (using the Rate Transition block)
- Tell Simulink that you aren't interested in potential multitasking execution considerations, and set the solver to Singletasking
Hope this helps!