Simulink Reference    
Relay

Switch output between two constants

Library

Simulink Discontinuities and Fixed-Point Blockset Nonlinear

Description

The Relay block allows its 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.

When the Show additional parameters check box is selected, some of the parameters that become visible are common to many blocks. For a detailed description of these parameters, refer to Block Parameters in the Fixed-Point Blockset documentation.

Data Type Support

This block supports any data type, including fixed-point, except int64 and uint64.

Parameters and Dialog Box

Switch on point
The "on" threshold for the relay.
Switch off point
The "off" threshold for the relay.
Output when on
The output when the relay is on.
Output when off
The output when the relay is off.
Show additional parameters
If selected, additional parameters specific to implementation of the block become visible as shown.

Output data type mode
Specify the output data type and scaling to be the same as the inputs, or inherit the data type and scaling by backpropagation. Lastly, if you choose Specify via dialog, the Output data type, Output scaling value, and Parameter Scaling parameters become visible.
Output data type
Specify any data type, including fixed-point data types. This parameter is only visible if Specify via dialog is selected for the Output data type mode parameter.
Output scaling value
Set the output scaling using radix point-only or [Slope Bias] scaling. This parameter is only visible if Specify via dialog is selected for the Output data type mode parameter, and is only enabled if Use specified scaling is selected for the Parameter Scaling parameter.
Parameter Scaling
Enable zero crossing detection
Select to enable zero crossing detection to detect switch-on and switch-off points. For more information, see Zero Crossing Detection in the Using Simulink documentation.

Conversions and Operations

The Switch on point and Switch off point parameters are converted to the input data type offline using round-to-nearest and saturation.

Characteristics

Dimensionalized
Yes
Direct Feedthrough
Yes
Sample Time
Inherited from driving block
Scalar Expansion
Yes


  Relational Operator Repeating Sequence