### Block: AutoSwitch

Inports
In1 | Input #1
Switch | Input #2: Threshold signal
In3 | Input #3

Outports
Out | Either value of input #1 or input #3 dependent on value of input #2

Mask Parameters
Thresh_up | Threshold level for rising switch signal
Thresh_down | Threshold level for falling switch signal

##### Description:

Switch between In1 and In3 dependent on Switch signal:

Switch signal rising: Switch >= Threshold up –> Out = In1

Switch signal falling: Switch < Threshold down –> Out = In3

The hysteresis behaviour of the block is illustrated in the figure below.

##### Implementations:

FiP16 | 16 Bit Fixed Point Implementation
FiP32 | 32 Bit Fixed Point Implementation
Float32 | 32 Bit Floating Point Implementation
Float64 | 64 Bit Floating Point Implementation

#### Implementation: FiP16

16 Bit Fixed Point Implementation

Inports Data Type
In1 | int16
Switch | int16
In3 | int16

Outports Data Type
Out | int16

#### Implementation: FiP32

32 Bit Fixed Point Implementation

Inports Data Type
In1 | int32
Switch | int32
In3 | int32

Outports Data Type
Out | int32

#### Implementation: Float32

32 Bit Floating Point Implementation

Inports Data Type
In1 | float32
Switch | float32
In3 | float32

Outports Data Type
Out | float32

#### Implementation: Float64

64 Bit Floating Point Implementation

Inports Data Type
In1 | float64
Switch | float64
In3 | float64

Outports Data Type
Out | float64