Engee documentation

Relay

Switching the output between two constants.

blockType: Relay

Path in the library:

/Basic/Discontinuities/Relay

Description

Output for the block Relay switches between two preset values. When the relay is switched on, it remains switched on until the input signal drops below the value of the Switch-off point parameter. When the relay is turned off, it remains off until the input exceeds the parameter value. Switch off point. The block accepts one input and generates one output.

When the initial input is between the parameter values Switch off point and Switch on point, the initial output is the value when the relay is off.

Ports

Input

# IN_1 — Input signal
scalar

Details

An input signal that turns the relay on or off.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

Yes

Output

# OUT_1 — Output signal
scalar

Details

The output signal switches between two values determined by the parameters Output when on and Output when off.

Data types

Float64

Complex numbers support

Yes

Parameters

Main

# Switch on point — the input value that turns on the relay
Scalar / array of real numbers

Details

When the input crosses this threshold, the relay turns on. Parameter value Switch on point must be greater than or equal to the value Switch off point. Specifying the parameter value Switch on point more than a value Switch off point simulates hysteresis, while specifying equal values simulates a switch with a threshold at this value.

Parameter Switch on point It is converted to the input data type offline using the rounding to nearest and saturation methods usage.

Default value

0.0

Program usage name

OnSwitchValue

Tunable

Yes

Evaluatable

Yes

# Switch off point — the output value that turns off the relay
Scalar / array of real numbers

Details

When the input crosses this threshold, the relay turns on. Parameter value Switch off point must be less than or equal to the value Switch on point.

Parameter Switch on point It is converted to the input data type offline using the rounding to nearest and saturation methods usage.

Default value

0.0

Program usage name

OffSwitchValue

Tunable

Yes

Evaluatable

Yes

# Output when on — output value when the relay is switched on
Scalar / array of real numbers

Details

The output value when the relay is on.

Default value

1.0

Program usage name

OnOutputValue

Tunable

Yes

Evaluatable

Yes

# Output when off — output value when the relay is switched off
Scalar / array of real numbers

Details

The output value when the relay is off.

Default value

0.0

Program usage name

OffOutputValue

Tunable

Yes

Evaluatable

Yes

Additional options

C code generation: Yes