Skip to content

Switch

GUI-only selector switch (single-pole, multi-throw). Routes its common terminal (COM) to one of up to five outputs (OUT1..OUT5), or to nothing when Off. Selecting an output connects COM to it as an ideal wire, so the two sides share a node; Off leaves COM and every output as separate electrical islands. The simulator never models the switch itself, so there is no on/off resistance and no arc (use a Breaker for a controllable R_on / R_off). Set the number of outputs (1-5) and the default position in its properties; click the switch on the canvas to step Off -> Output 1 -> ... -> Off (only while no simulation is running).

Category: Switches

Ports

NameDirectionValue typeNotes
COMelectricaldouble
OUT1electricaldouble
OUT2electricaldoubleVisible when num_outputs >= 2
OUT3electricaldoubleVisible when num_outputs >= 3
OUT4electricaldoubleVisible when num_outputs >= 4
OUT5electricaldoubleVisible when num_outputs >= 5

Parameters

NameLabelTypeDefaultUnitsDescription
num_outputsOutputsenum (1 / 2 / 3 / 4 / 5)1How many output terminals the switch has (1-5). The common terminal (COM) can be connected to any one of them. With 1 output the switch is a plain on/off (Off / Output 1) switch; with more it becomes a selector that routes COM to the chosen output.
statePositionenum (Off / Output 1 / Output 2 / Output 3 / Output 4 / Output 5)1Which output the common terminal is connected to. Off disconnects COM from every output (each side is its own electrical island). Only positions up to the configured output count are selectable. Click the switch on the canvas to step through the positions (only before a run).

Used in samples