Route among multiple inputs using Variants
Simulink / Signal Routing
The Variant Source block has one or more input ports and one output port. You can define Variant choices as blocks that are connected to the input port so that, at most, one choice is active.
Each input port is associated with a Variant control. The Variant control that
evaluates to true
, determines which input port is active.
When the Analyze all choices during update diagram and generate preprocessor conditionals option in the block dialog box is cleared, then during simulation Simulink® connects the active choice directly to the output port of the Variant Source block and ignores the inactive choices.
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Manual Variant Sink | Manual Variant Source | Model | Simulink.Variant
| Variant Sink | Variant Subsystem