Multimode Variable-Size Signal
This example shows how to use different operation modes to correspond to different signal sizes.
Open and compile the model named
This model represents a system that has three operation modes. For each mode, the signal has a different size.
The subsystem named
Process receives the variable-size signal, where the size of the signal depends on the operation mode of the system. The Stateflow® chart named
Mode Control Logic detects the data signal length changes and responds by issuing mode switching events. For each mode change, the
Mode Control Logic chart generates a function-call signal to reset the blocks contained in the
For a fixed-size signal implementation, open and compile the model named
In this model, each different mode requires a dedicated processing block, resulting in block duplication.