Switch output between two constants.
Library
Nonlinear
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.
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. The Switch on point value must be greater than or equal to the Switch off point.
Data Type Support
A Relay block accepts and outputs real signals of type double.
Parameters and Dialog Box

- Switch on point
- The on threshold for the relay. The default is
eps.
- Switch off point
- The off threshold for the relay. The default is
eps.
- Output when on
- The output when the relay is on. The default is
1.
- Output when off
- The output when the relay is off. The default is
0.
Characteristics
Direct Feedthrough
|
Yes
|
Sample Time
|
Inherited from driving block
|
Scalar Expansion
|
Yes
|
Vectorized
|
Yes
|
Zero Crossing
|
Yes, to detect switch on and switch off points
|
[ Previous | Help Desk | Next ]