FB_FTR_IIRSpec

FB_FTR_IIRSpec 1:

The function block implements an IIR filter (Infinite Impulse Response filter).

The filter coefficients of the transfer function are calculated internally on the basis of the filter specification transferred in the form of biquads. The filter specification is transferred with the structure ST_FTR_IIRSpec. Filters of type Butterworth, Chebyshev or Bessel can be specified. Low-pass, high-pass, band-pass and band-stop filters can be defined in each case.

See also:

Digital filters, Filter types and parameterization

Syntax

Declaration:

fbFilter : FB_FTR_IIRSpec(stConfig := ...)

Definition:

FUNCTION_BLOCK FB_FTR_IIRSpec
VAR_INPUT
    stConfig        : ST_FTR_IIRSpec;
END_VAR
VAR_OUTPUT
    bError          : BOOL;
    bConfigured     : BOOL;
    ipResultMessage : I_TCMessage;
END_VAR

FB_FTR_IIRSpec 2: Inputs

Name

Type

Description

stConfig

ST_FTR_IIRSpec

Structure for configuring the filter behavior

FB_FTR_IIRSpec 3: 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_IIRSpec 4: 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_IIRSpec 5: 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

See also:

Filter types and parameterization

FB_FTR_IIRSos