EnableSwitch

EnableSwitch mask

EnableSwitch mask

The EnableSwitch is a switch that either connects the output to input or sets the output to a configurable disabled value.

The standard Simulink Switch toggles between two inputs:

However, a typical use case is to either open the switch (with an output equal to zero) or close the switch (with an output equal to input). The EnableSwitch block implements this functionality by setting the output to Disabled value when open, and to the input value when closed. The block is implemented as shown below:

EnableSwitch implementation

EnableSwitch implementation

Parameters and Dialog Box

EnableSwitch dialog

EnableSwitch dialog

Disabled value

The value of the output when the switch is open. The data type of this parameter is automatically converted to the data type of the input/output port.

Data Type Support

Input ports
The Enable input can be of any data type that Simulink supports, except for enumerated types. The input cannot be complex.
The Input port can be of any data type that Simulink supports, except for enumerated types.