beckhoff TS4100 — 5.4.9 FB_CTRL_PID

PLC-API eState : E_CTRL_STATE; eErrorId : E_CTRL_ERRORCODES; bError : BOOL; END_VAR fOut : Output of the PID element. bARWactive : A TRUE at this output indicates that the PID element is being restricted. 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_PID_PARAMS; END_VAR stParams : Parameter structure of the PID element. This consists of the following elements: TYPE ST_CTRL_PID_PARAMS : STRUCT tCtrlCycleTime : TIME := T#0ms; (* controller cycle time [TIME] *) tTaskCycleTime : TIME := T#0ms; (* task cycle time [TIME] *) fKp :

FLOAT := 0; (* proportional gain *) tTn : TIME := T#0ms; (* Tn *) tTv : TIME := T#0ms; (* Tv *) tTd : TIME := T#0ms; (* Td *) fOutMaxLimit : FLOAT := 1E38; (* maximum output limit *) fOutMinLimit : FLOAT := -1E38; (* minimum output limit *) bPInTheFeedbackPath : BOOL; bDInTheFeedbackPath : BOOL; bARWOnIPartOnly : BOOL; 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. fKp : Controller amplification / controller coefficient tTn : Integral action time. The I-component is deactivated if this is parameterized as T#0s. tTv : Derivative action time. The D-component is deactivated if this is parameterized as T#0s. tTd : Damping time fOutMaxLimit : Upper limit at which integration is halted and to which the output is limited (ARW measure). Reaching this limit is indicated by a TRUE at the bARWActive output. fOutMinLimit : Lower limit at which integration is halted and to which the output is limited (ARW measure).

Reaching this limit is indicated by a TRUE at the bARWActive output. bPInTheFeedbackPath : Input value of the internal P element can be selected with this input (see functional diagram). Default setting: FALSE bDInTheFeedbackPath : Input value of the internal D element can be selected with this input (see functional diagram). Default setting: FALSE TS4100 60 Version: 1.1