Using Simulink | ![]() ![]() |
Switch output between two constants.
Library
Description
The Relay block allows the output to switch between two specified values. When the relay is on, it remains on until the input drops below the value of the Switch off point parameter. When the relay is off, it remains off until the input exceeds the value of the Switch on point parameter. The block accepts one input and generates one output.
The Switch on point value must be greater than or equal to the Switch off point. Specifying a Switch on point value greater than the Switch off point value models hysteresis, whereas specifying equal values models a switch with a threshold at that value.
Data Type Support
A Relay block accepts and outputs real signals of type double
.
Parameters and Dialog Box
eps
.eps
.1
.0
.Characteristics
Direct Feedthrough |
Yes |
Sample Time |
Inherited from driving block |
Scalar Expansion |
Yes |
Dimensionalized |
Yes |
Zero Crossing |
Yes, to detect switch on and switch off points |
![]() | Relational Operator | Repeating Sequence | ![]() |