beckhoff TS4100 — 5.6.2 FB_CTRL_NORMALIZE

PLC-API VAR_INPUT VAR_INPUT fIn : FLOAT; fManValue : FLOAT; bExtrapolate : BOOL; eMode : E_CTRL_MODE; END_VAR fIn : Input value. bManValue : Input variable whose value is output in manual mode. bExtrapolate : If this input is FALSE, then the value of the last interpolation point is output if the limits of the table are exceeded. If, however, it is TRUE, then extrapolation is performed on the basis of the last two interpolation points. eMode : Input that specifies the block's operating mode [ } 16] . VAR_OUTPUT VAR_OUTPUT fOut : FLOAT; bInIsGreaterThanMaxElement : BOOL; bInIsLessThanMinElement : BOOL; eState : E_CTRL_STATE; eErrorId : E_CTRL_ERRORCODES; bError : BOOL; END_VAR fOut :

Table value from linear interpolation. bInIsGreaterThanMaxElement : A TRUE at this output indicates that the magnitude of the input is greater than the largest interpolation point. bInIsLessThanMinElement : A TRUE at this output indicates that the magnitude of the input is smaller than the smallest interpolation point. eState : State of the function block. eErrorId : Supplies the error number [ } 16] when the bError output is set. bError : Becomes TRUE, as soon as an error occurs. VAR_IN_OUT VAR_IN_OUT stParams : ST_CTRL_NORMALIZE_PARAMS; END_VAR stParams : Parameter structure of the function block. This consists of the following elements: TYPE ST_CTRL_NORMALIZE_PARAMS:

STRUCT tCtrlCycleTime : TIME := T#0ms; (* controller cycle time [TIME] *) tTaskCycleTime : TIME := T#0ms; (* task cycle time [TIME] *) pDataTable_ADR : POINTER TO FLOAT := 0; nDataTable_SIZEOF : UINT := 0; nDataTable_NumberOfRows : UINT := 0; END_STRUCT END_TYPE tCtrlCycleTime : 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 : 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. pDataTable_ADR : Address of the n x 2 array on which linear interpolation is to be carried out TS4100 111 Version: 1.1