Logic

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

y = \begin{cases} u_1, & u_{\text{sel}} \ge 0 \\ u_2, & u_{\text{sel}} < 0 \end{cases}

Parameters

threshold

Type: number (Default: 0)

Threshold parameter description placeholder.

criteria

Type: select (Default: "u2 >= threshold")

Criteria parameter description placeholder.

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

See Also