Switch Block
Selects between two input signals based on a selector (threshold=0)
Open Switch in BlockWerk →Description
The Switch block selects between two input signals based on a selector signal. If the selector is non-negative (≥ 0), it outputs the first input; otherwise, it outputs the second input. Essential for conditional signal routing and mode selection.
Mathematical Model
output = { in1, if selector ≥ 0
{ in2, if selector < 0
Parameters
(No parameters)
Examples
Signal Selection (1 second)
Two signals (constant 5 and ramp 0→5) selected by a step function. At t=0.5s, selector switches from negative to positive, changing output signal.
Conditional Mode Switch
Selector from comparator output (0 or 1) routes between manual (constant) and automatic (ramp) control.
Remarks
- No Parameters: Simple threshold logic (selector ≥ 0)
- Combinatorial: Zero delay, instantaneous switching
- Zero Crossing: Switches exactly at selector = 0
- Routing: Essential for mode selection in complex systems
- Glitch-Free: No oscillation at boundary
See Also
- Comparator: Generates binary selector signal
- Step: Input signal for selector
- Gain: Scale selector signal
- Subtraction: Compute error for switching logic