PLC API Outputs VAR_OUTPUT fOut : FLOAT; eState : E_CTRL_STATE; eErrorId : E_CTRL_ERRORCODES; bError : BOOL; END_VAR Inputs/ outputs VAR_IN_OUT tCtrlCycleTime : TIME := T#0ms; tTaskCycleTime : TIME := T#0ms; nSamplesToFilter : UINT; pWorkArray_ADR : POINTER TO FLOAT := 0; nWorkArray_SIZEOF : UINT := 0; END_VAR 4.2.1.4.4 FB_CTRL_DIGITAL_FILTER TF4100 89 Version: 2.2.4 Name Type Description fIn FLOAT Input value of the median filter fManSyncValue FLOAT Input value to which the median filter can be set or which is output in manual mode. eMode E CTRL MODE _ _ With a rising edge at this input the median filter is set to the value "fManSyncValue".
bSync FLOAT Input that specifies the operation mode of the function block. bHold BOOL TRUE at this input holds the internal state and thus also the output. Name Type Description fOut FLOAT Output of the median filter eState E CTRL STATE _ _ Status of the function block eErrorId E CTRL ERROR _ _ CODES Supplies the error number when the output bError is set. bError BOOL Becomes TRUE, as soon as an error occurs. Name Type Description tCtrlCycleTime TIME Cycle time with which the control loop is processed. This must be greater than or equal to the TaskCycleTime.
The function block uses this input value to calculate internally whether the state and the output values have to be updated in the current cycle. tTaskCycleTime TIME Cycle time with which the function block is called. If the function block is called in every cycle this corresponds to the task cycle time of the calling task. nSamplesTo Filter UINT Number of values "n" used to form the median value. pWorkArray _ ADR POINTER TO FLOAT The address of the array where the input values are temporarily stored. nWorkArray _ SIZEOF UINT Size of the WorkArrays