FB_Deadband (Function Block)

Suppresses small input signals within a configurable band.

When the input falls within [Minimum, Maximum], the output is either zeroed or held at its last value depending on Mode. Outside the band the input passes through unchanged.

Note

The block is FINAL and must be instantiated, not extended. Use FB_init to set fMinimum, fMaximum, and eMode at declaration time.

Extends: FB_SisoComponent

Properties

IsActive

Type: BOOL

Gets whether the input is within the deadband’s bounds.

TRUE when the output is being held or zeroed.

Maximum

Type: LREAL

Gets or sets the upper bound of the deadband.

Internally clamped to be greater than or equal to Minimum. Set this before Minimum to ensure the guard applies correctly.

Minimum

Type: LREAL

Gets or sets the lower bound of the deadband.

Internally clamped to be less than or equal to Maximum. Set Maximum before this property to ensure the guard applies correctly.

Mode

Type: E_DeadbandMode

Gets or sets the output behaviour when the input is within the band.

Zero sets the output to zero. Hold retains the last output value.

Changes take effect on th next Run() call.

Methods

FB_init

Inputs

Name

Type

Description

bInitRetains

BOOL

if TRUE, the retain variables are initialized (warm start / cold start)

bInCopyCode

BOOL

if TRUE, the instance afterwards gets moved into the copy code (online change)

fMaximum

LREAL

Upper bound of the deadband.

fMinimum

LREAL

Lower bound of the deadband.

eMode

E_DeadbandMode

Output behaviour when the input is within the band.

Reset

Resets the output to a value consistent with the current mode.

In Zero mode the output is set to zero. In Hold mode the output is set to the current input.

Run

Applies the deadband to the current input.