FB_TempCtrlMainBody_TcPfw_TC3()

This function block must be called cyclically in the application. It organizes internally the complete temperature control.
Syntax
VAR_INPUT
    iParamLoadCheck:I_ParamLoadCheck;
    ConfigEnable           : BOOL;
    tCycle                 : LREAL;
    Looptest_Enable        : BOOL;
    Callback_Enable        : BOOL;
    Simu_Enable            : BOOL:=FALSE;
    Simu_DisCharge         : BOOL:=FALSE;
    Scope_TempCtrlVariables: FB_Scope_TempCtrlVariables;
END_VAR Inputs
 Inputs
| Name | Type | Description | 
|---|---|---|
| iParamLoadCheck | I_ParamLoadCheck | Optional interface for (external) storage of temperature zones. | 
| ConfigEnable | BOOL | If TRUE, the configuration is valid | 
| tCycle | LREAL | Cycle time | 
| Looptest_Enable | BOOL | A current measurement is performed. | 
| Callback_Enable | BOOL | Checks once (by calling FB_TempCtrlCallback_TcPfw()) the type of the linked terminal and parameterizes it according to the specified sensor type. | 
| Simu_Enable | BOOL | Used for internal simulation purposes. | 
| Simu_DisCharge | BOOL | Used for internal simulation purposes. | 
| Scope_TempCtrlVariables | FB_Scope_TempCtrlVariables | Display of the individual temperature zones and their internal variables. | 
Behavior of the function block:
With each call the function block checks the global variable bPfw_UseTempControl. If this variable is TRUE and ConfigEnable indicates a valid configuration, the function block becomes active:
- In the first cycle the function block calls an internal function block of type FB_internal_tmpCtrlInitlinks_TcPfw() to initialize the structures used by the temperature control.
- If Looptest_Enable is set, a current measurement is performed.
- If Callback_Enable is set, a function block of type FB_TempCtrlCallback_TcPfw() is called. This function block checks the type of the linked terminal once and parameterizes it according to the specified sensor type.
- The following activities are performed for each zone of the control:
- If in aaaPfwTempMparamFromHmi the Signal Update is set, the entered values are limited to the permissible value ranges if required and taken over into the control. Update is deleted.
- If in aaaPfwTempPparamFromHmi the Signal Update is set, the entered values are limited to the permissible value ranges if required and taken over into the control. Update is deleted.
- If InUse is set to TRUE in aaaPfwTempToHmi, the following steps are performed:
- - A FB_CTRL_TempController() function block from the TcTempCtrl.LIB library is called.
- - In out_PfwTempCtrlOutput YPWMPos, YPWMNeg, YDigPos, YDigNeg and Yanalog are updated.
- - Various signals (aaaTempFault_Reset, Autotune in aaaPfwTempMparamFromHmi etc.) control the resetting of fault conditions or activate autotuning.
- - If a problem is reported by the controller function block or from the I/O interface, the corresponding events are activated.
- - Various data in aaaPfwTempToHmi are updated.
- If the actual temperature of at least one zone is below fAbsoluteLow in aaaPfwTempMparamFromHmi, aaaTempAlarm_AbsoluteLow is signaled.
- If the actual temperature of at least one zone is above fAbsoluteHigh in aaaPfwTempPparamFromHmi, aaaTempAlarm_AbsoluteHigh is signaled.
|  | At the end of the cycle aaaTempFault_Reset is automatically deleted. | 
|  | If Callback_Enable is not set, no function block of type FB_TempCtrlCallback_TcPfw() is called. In this case, the application must ensure that the I/O electronics match the sensor type. |