Engee documentation

Relay

Switching the output between two constants.

relay

Description

The output for the Relay unit switches between two setpoints. When the relay is on, it remains on until the input signal falls below the Switch off point parameter value. When the relay is off, it remains off until the input exceeds the Switch off point parameter value. The unit accepts one input and generates one output.

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

Ports

Input

Port_1 - input signal
scalar

Input signal that switches the relay on or off.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Output

Port_1 - output signal
scalar

The output signal is switched between two values defined by the parameters Output when on and Output when off.

Data types: Float64.

Parameters

Main

Switch on point - input value that switches on the relay
0.0 (by default) | scalar

When the input crosses this threshold, the relay is switched on. The Switch on point value must be greater than or equal to the Switch off point value. 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 parameter is converted to an offline input data type using round to nearest and saturation methods.

Usage in program code

Block parameter

OnSwitchValue

Values

scalar

By default

0.0

Switch off point - the output value that switches the relay off
0.0 (By default) | scalar

When the input crosses this threshold, the relay is switched on. The value of Switch off point must be less than or equal to the value of Switch on point.

The Switch on point parameter is converted to an offline input data type using nearest rounding and saturation methods.

Usage in program code

Block parameter

OffSwitchValue

Values

scalar

By default

0.0

Output when on - output value when relay is on
1.0 (By default) | scalar

Output value when the relay is switched on.

Usage in program code

Block parameter

OnOutputValue

Values

scalar

By default

1.0

Output when off - output value when relay is off
0.0 (By default) | scalar

Output value when the relay is off.

Usage in program code

Block Parameter

OffOutputValue

Values

scalar

By default

0.0

Additional options

C code generation: Yes