PLC-API tTaskCycleTime : TIME := T#0ms; (* task cycle time [TIME] *) fKp : FLOAT := 0; (* proportional gain *) tT1 : TIME := T#0ms; (* T1 *) 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 / transfer coefficient tT1 :
Time constant T1 Requirements 5.5.13 FB_CTRL_PTt The function block provides an PTt transfer element in the functional diagram. Transfer function: This function block contains internally an array of 500 elements with which the input values can be delayed. Using tCtrlCycleTime yields a maximum delay of 500 * tCtrlCycleTime. If this maximum delay is insufficient, the sampling time is extended internally to make it possible to reach the requested dead time. It should, however, be remembered that this process involves increasing the time between the discretisation steps. If a new sampling time has been calculated, this is indicated by a TRUE on the bSampleRateChanged output.
VAR_INPUT VAR_INPUT fIn : FLOAT; fManSyncValue : FLOAT; bSync : BOOL; eMode : E_CTRL_MODE; END_VAR fIn : Input variable of the PTt element. fManSyncValue : Input value to which the PTt element can be set, or that is issued at the output in manual mode. TS4100 100 Version: 1.1 Development Environment Target System PLC libraries to include TwinCAT v2.8 PC (i386) TcControllerToolbox.lib TwinCAT v2.9 from Build 947 BC [} 10] TcControllerToolbox.lb6 TwinCAT v2.9 from Build 956 BX [} 10] TcControllerToolbox.lbx