FB_FTR_IIRCoeff

FB_FTR_IIRCoeff 1:

The function block implements an IIR filter (Infinite Impulse Response filter). The general transfer function is:

FB_FTR_IIRCoeff 2:

The coefficients ak and bk are freely definable in the configuration structure. The numerator degree and denominator degree may be different. The denominator can be set to a0 = 1 and a= 0 (for all k > 0), so that a FIR filter is configured. The filter specification is transferred with the structure ST_FTR_IIRCoeff.

See also: Digital filters

Syntax

Declaration:

fbFilter : FB_FTR_IIRCoeff(stConfig := ...)

Definition:

FUNCTION_BLOCK FB_FTR_IIRCoeff
VAR_INPUT
    stConfig        : ST_FTR_IIRCoeff;
END_VAR
VAR_OUTPUT
    bError          : BOOL;
    bConfigured     : BOOL;
    ipResultMessage : I_TCMessage;
END_VAR

FB_FTR_IIRCoeff 3: Inputs

Name

Type

Description

stConfig

ST_FTR_IIRCoeff

Structure for configuring the filter behavior

FB_FTR_IIRCoeff 4: Outputs

Name

Type

Description

bError

BOOL

TRUE, if an error occurs.

bConfigured

BOOL

TRUE if the configuration was successful.

ipResultMessage

I_TCMessage

Interface that provides properties and methods for message handling

FB_FTR_IIRCoeff 5: Methods

Name

Definition location

Description

Configure()

Local

Loads a new (or initial) configuration structure.

Call()

Local

Calculates the output signal for a given input signal and filter configuration.

Reset()

Local

Resets internal states.

FB_FTR_IIRCoeff 6: Properties

Name

Type

Access

Definition location

Initial value

Description

bTraceLevelDefault

BOOL

Get, Set

Local

TRUE

TRUE if eTraceLevel = Critical

eTraceLevel

TcEventSeverity

Get, Set

Local

Critical

Severity of an event

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4022.25

PC or CX (x64, x86)

Tc3_Filter