beckhoff TS4100 — 5.5.3 FB_CTRL_DIGITAL_FILTER

PLC-API The coefficients for the following transfer structure are stored in the parameter arrays: The programmer must create the following arrays in the PLC if this function block is to be used: ar_CoefficientsArray_a : ARRAY[1..nFilterOrder+1] OF FLOAT; ar_CoefficientsArray_b : ARRAY[1..nFilterOrder+1] OF FLOAT; ar_stDigitalFilterData : ARRAY[1..nFilterOrder ] OF ST_CTRL_DIGITAL_FILTER_DATA; The coefficients b 1 to b n are stored in the array ar_CoefficientsArray_b. This must be organized as follows: ar_CoefficientsArray_b[ 1 ] := b1; ar_CoefficientsArray_b[ 2 ] := b2; ...

ar_CoefficientsArray_b[ n-1 ] := bn-1; ar_CoefficientsArray_b[ n ] := bn; The coefficients a 1 to a n are stored in the array ar_CoefficientsArray_a. This must be organized as follows: ar_CoefficientsArray_a[ 1 ] := xxx; (* wird nicht ausgewertet *) ar_CoefficientsArray_a[ 2 ] := a2; ... ar_CoefficientsArray_a[ n-1 ] := an-1; ar_CoefficientsArray_a[ n ] := an; The internal data required by the function block is stored in the ar_stDigitalFilterData array. This data must never be modified from within the PLC program. This procedure is also illustrated in the sample program listed below. VAR_INPUT VAR_INPUT fIn : FLOAT; fManValue : FLOAT; eMode : E_CTRL_MODE; END_VAR fIn :

Input of the digital filter. fManValue : Input whose value is present at the output in manual mode. eMode : Input that specifies the block's operating mode. VAR_OUTPUT VAR_OUTPUT fOut : FLOAT; eState : E_CTRL_STATE; TS4100 80 Version: 1.1