PLC-API The programmer must create the following arrays in the PLC if this function block is to be used: ar_fNumeratorArray : ARRAY[0..nOrderOfTheTransferfunction] OF FLOAT; ar_DenominatorArray : ARRAY[0..nOrderOfTheTransferfunction] OF FLOAT; ar_stTransferfunction1Data : ARRAY[0..nOrderOfTheTransferfunction] OF ST_CTRL_TRANSFERFUNCTION_1_DATA; The coefficients b 0 to b n are stored in the array ar_fNumeratorArray. This must be organized as follows: ar_fNumeratorArray[ 0 ] := b0; ar_fNumeratorArray[ 1 ] := b1; ... ar_fNumeratorArray[ n-1 ] := bn-1; ar_fNumeratorArray[ n ] := bn; The coefficients a 0 to a n are stored in the array ar_DenominatorArray. This must be organized as follows:
ar_DenominatorArray [ 0 ] := a0; ar_DenominatorArray [ 1 ] := a1; ... ar_DenominatorArray [ n-1 ] := an-1; ar_DenomiantorArray [ n ] := an; The internal data required by the function block is stored in the array ar_stTransferfunction1Data. 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 to the transfer function. 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; bError :
BOOL; eErrorId : E_CTRL_ERRORCODES; END_VAR fOut : Output from the transfer function. eState : State of the function block. eErrorId : Supplies the error number [ } 16] when the bError output is set. TS4100 33 Version: 1.1