Async Rate Transition block
Simulink® Real-Time™ Library for Asynchronous Event
Use the Asynchronous Rate Transition block to double buffer data between the function call subsystem and the rest of the model, which executes rate-monotonically in real time.
Normally, the interrupt service routine writes to the first buffer. When the next model step executes, the first buffer is copied to the second buffer and its value is used for model calculations.
If a second interrupt occurs while the buffer is being copied, data is corrupted. The CPU copies part of the data from the first buffer. When the second interrupt occurs, it writes over the entire first buffer. When the CPU returns from the second interrupt, it continues the copy operation from the first buffer, which contains data written during the second interrupt.
To prevent data corruption, use Async Buffer Write and Read blocks.
Enter the base sample time or a multiple of the base sample
-1 means sample time is inherited).