Relay - Switch output between two constants

Library

Discontinuities

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.

Data Type Support

The Relay block accepts real or complex signals of any data type supported by Simulink® software. The Relay block supports fixed-point data types.

For a discussion on the data types supported by Simulink software, see Data Types Supported by Simulink® in the Simulink documentation.

Parameters and Dialog Box

The Main pane of the Relay block dialog appears as follows:

Switch on point

The "n" threshold for the relay. The Switch on point parameter is converted to the input data type offline using round-to-nearest and saturation.

Switch off point

The "off" threshold for the relay. The Switch off point parameter is converted to the input data type offline using round-to-nearest and saturation.

Output when on

The output when the relay is on.

Output when off

The output when the relay is off.

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 .

Sample time (-1 for inherited)

Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See Specifying Sample Time in the online documentation for more information.

The Signal Attributes pane of the Relay block dialog appears as follows:

Output minimum

Specify the minimum value that the block should output. The default value, [], is equivalent to -Inf. Simulink software uses this value to perform:

Output maximum

Specify the maximum value that the block should output. The default value, [], is equivalent to Inf. Simulink software uses this value to perform:

Output data type

Specify the output data type. You can set it to:

Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Output data type parameter.

See Specifying Block Output Data Types for more information.

Characteristics

Direct Feedthrough

Yes

Sample Time

Specified in the Sample time parameter

Scalar Expansion

Yes

Dimensionalized

Yes

Zero Crossing

Yes, if enabled.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS