PLC-API eErrorIdOuterLoop : Returns the error number [ } 16] of the PI element (outer control loop) when the bError output is set. bErrorOuterLoop : Is set to TRUE as soon as an error occurs in the PI element (outer control loop). VAR_IN_OUT VAR_IN_OUT stParams : ST_CTRL_PI_PID_PARAMS; END_VAR stParams : Parameter structure of the PI-PID element. This consists of the following elements: TYPE ST_CTRL_PI_PID_PARAMS : STRUCT tCtrlCycleTime : TIME := T#0ms; (* controller cycle time [TIME] *) tTaskCycleTime : TIME := T#0ms; (* task cycle time [TIME] *) fKp_OuterLoop : FLOAT := 0; (* proportional gain *) tTn_OuterLoop : TIME := T#0s; (* Tn *) fMaxLimit_OuterLoop :
FLOAT := 1E38; fMinLimit_OuterLoop : FLOAT := -1E38; fKp_InnerLoop : FLOAT := 0; (* proportional gain *) tTn_InnerLoop : TIME := T#0ms; (* Tn *) tTv_InnerLoop : TIME := T#0ms; (* Tv *) tTd_InnerLoop : TIME := T#0ms; (* Td *) fMaxLimit_InnerLoop : FLOAT := 1E38; fMinLimit_InnerLoop : FLOAT := -1E38; 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_OuterLoop : Controller amplification / controller coefficient of the PI element (outer control loop). tTn_OuterLoop : Integral action time of the PI element (outer control loop). The I-component is deactivated if this is parameterized as T#0s. fMaxLimit_OuterLoop : Upper limit at which integration of the PID element is halted and to which the output is limited (ARW measure). Reaching this limit is indicated by a TRUE at the bARWactiveOuterLoop output. fMinLimit_OuterLoop :
Lower limit at which integration of the PID element is halted and to which the output is limited (ARW measure). Reaching this limit is indicated by a TRUE at the bARWactiveOuterLoop output. fKp_InnerLoop : Controller amplification / controller coefficient of the PID element (inner control loop). tTn_InnerLoop : Integral action time of the PID element (inner control loop). The I-component is deactivated if this is parameterized as T#0s. tTv_InnerLoop : Derivative action time of the PID element (inner control loop). The D-component is deactivated if this is parameterized as T#0s. tTd_InnerLoop : Damping time of the PID element (inner control loop). fMaxLimit_InnerLoop :
Upper limit at which integration of the PID element is halted and to which the output is limited (ARW measure). Reaching this limit is indicated by a TRUE at the bARWactiveInnerLoop output. fMinLimit_InnerLoop : Lower limit at which integration of the PID element is halted and to which the output is limited (ARW measure). Reaching this limit is indicated by a TRUE at the bARWactiveInnerLoop output. TS4100 56 Version: 1.1