Create a read-write pair of blocks that ensure correct data transfer


Creates a read-write pair of blocks intended to guarantee correct data transfers between a synchronously (periodic) and an asynchronously executing subsystem or between two asynchronously executing subsystems. Both the read S-function and write S-function should set this option.

An asynchronously executed function-call subsystem is a function-call subsystem driven by an S-function with the SS_OPTION_ASYNCHRONOUS specified.

The Simulink® engine defines two classes of asynchronous rate transitions.

  • Read-write pairs. In this class, two blocks, using a technique such as double buffering, ensure data integrity in a multitasking environment. When creating the read-write pair of blocks, the S-functions for these blocks should set the SS_OPTION_ASYNC_RATE_TRANSITION option. Furthermore, the MaskType property of the read block, must include the string read and the MaskType property of write block must include the string write.

  • A single protected or unprotected block. To create a single Protected Rate Transition block, create a subsystem that contains the following

    and set the Tag value of the Outport block to AsyncRateTransition. The S-function then provides the code for the protected transition. Note, this S-function does not set the SS_OPTION_ASYNC_RATE_TRANSITION option.

Introduced in R2007b

Was this topic helpful?