MATLAB: Can I use the Merge block for differing input sample times in Simulink 6.2 (R14SP2)

mergemultitaskingratesamplesimulinksingletaskingtimetransition

Prior to Simulink 6.2 (R14SP2), I could use the Merge block with different input sample times, but I noticed that the same model generates the following error when using Simulink 6.2 (R14SP2):
The signal from 'simple_mod2/TmpRTBAtMergeInport1' output port 1 is required to be persistent, hence this signal cannot be connected to a Merge.

Best Answer

Documentation on using the Merge block for differing input sample times is missing from the Simulink 6.2 (R14SP2) manual.
Here is some additional information on using the Merge block for differing input sample times:
Simulink 6.2 (R14SP2) introduced some changes in the behavior of "Automatic Insert Rate Transitions" for the "Single Tasking" case.
It is not safe to use the Merge block in a Multitasking case due to the fact that Data Integrity/Consistency cannot be guaranteed. It is, however, safe to use in Single Tasking mode.
If you select the "Automatically handle data transfers between tasks", Simulink detects rate transitions inserts Rate Transition blocks automatically for models that execute in single-tasking or multitasking mode. Prior to Simulink 6.2(R14SP2), automatic block insertion for single-tasking execution mode was not supported.
For Simulink 6.2 (R14SP2), using the Merge block with different input sample times can be achieved by disabling "Automatic insertion of Rate Transition blocks".
To disable "Automatic insertion of Rate Transition blocks", follow the steps below:
1. Open "Configuration Parameters" from "Simulation" Toolbar of the model.
2. Select "Solver" on the left side.
3. Make sure "Automatically handle data transfers between tasks" is unchecked.
4. Select Fixed-step for "Type" of Solver options.
5. Select "Single Tasking" for "Tasking mode for periodic sample times.
Future versions will not require the disabling of this option when using the Merge block with differing input sample times and in Single Tasking mode.