Skip to main content

Temperature Control

This library is used to control thermally inert systems. Four different data sets can be used for cooling and heating. The modules also generate PWM signals that can be used to control the heating elements.

TB_TCtrl_PIDT1

TB_TCtrl_PIDT1

The TB_TCtrl_PIDT1 function module is a PIDT1 controller that is primarily geared toward temperature regulation of thermally-sluggish systems. The controller can be used as a PIDT1 controller or a P, PI, PD or PDT1 controller. Combinations of controller types are also possible, e.g. for command PD and disturbance PIDT1, which means it can be used for almost any conceivable control distances.

The controller can be used as a PIDT1 controller or a PI, PD or PDT1 controller. When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the controller is active and calculates the output sizes. When x_Enable = FALSE, all output sizes are set to 0.

The controller works with four data records for command (cooling and heating) and disturbance (cooling and heating). Different parameters are required for heating and cooling since oftentimes only active heating is carried out, and not active cooling. The switching between command and disturbance is determined with u_Thresh_RD. If the same parameters are to be used for both command and disturbance, the parameters are to be connected regardless.

Setting rules according to Chien, Hrones and Reswick for determining the parameters can be found in the "setting rules" in this help information. Naturally, other methods can also be used for parameter finding.

Operation of the actuator can occur with the PWM generator TB_TCtrl_PWM, for example.

Empfohlene Task: Event/Cyclic; the important thing is a fixed call interval!

Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higher

Eingänge

Marking:Data type:Description:
x_EnableBOOLTRUE: Enabling of the module. Control is active.
FALSE: Module is deactivated; the outputs are set to 0.
i_WINTThe input i_W represents the command value. The unit/size must be the same as the unit of the actual value i_X.
i_XINTThe i_X input represents the actual value. The unit/size must be the same as the unit of the command value i_W.
i_PreControlINTThe setting value can be pre-controlled with the i_PreControl input. The input is added directly to the setting value i_Y, but is also prevented from undershooting or exceeding the limits. The unit must therefore correspond to the unit of the setting value i_Y.
u_Kp_Pro_R_HUINTProportional coefficient for command and heating in percent.
u_tn_0s1_R_HUINTReset time for command and heating in 0.1 s.
0: I portion deactivated.
u_tv_0s1_R_HUINTHold-back time for command and heating in 0.1 s.
0: D portion deactivated.
u_T1_0s1_R_HUINTTime constant of the DT1 actuator for command and heating in 0.1 s.
u_Kp_Pro_D_HUINTProportional coefficient for disturbance and heating in percent.
u_tn_0s1_D_HUINTReset time for disturbance and heating in 0.1 s.
0: I portion deactivated.
u_tv_0s1_D_HUINTReset time for disturbance and heating in 0.1 s.
0: I portion deactivated.
u_T1_0s1_D_HUINTHold-back time for disturbance and heating in 0.1 s.
u_Kp_Pro_R_CUINTProportional coefficient for command and cooling in percent.
u_tn_0s1_R_CUINTReset time for command and cooling in 0.1 s.
0: I portion deactivated.
u_tv_0s1_R_CUINTHold-back time for command and cooling in 0.1 s.
0: D portion deactivated.
u_T1_0s1_R_CUINTTime constant of the DT1 actuator for command and cooling in 0.1 s.
u_Kp_Pro_D_CUINTProportional coefficient for disturbance and cooling in percent.
u_tn_0s1_D_CUINTReset time for disturbance and cooling in 0.1 s.
0: I portion deactivated.
u_tv_0s1_D_CUINTHold-back time for disturbance and cooling in 0.1 s.
0: D portion deactivated.
u_T1_0s1_D_CUINTTime constant of the DT1 actuator for disturbance and cooling in 0.1 s.
u_Ts_0s1UINTCall interval of the function module in 0.1 s.
u_Thresh_RDUINTSwitching of the parameters between command and disturbance. If ABS(i_W - i_X) <= u_Thresh_RD, switching from command to disturbance occurs. Switching from disturbance back to command does not occur until a command value jump occurs.
i_RampUpINTPositive change of the command value per call. A positive command value jump can be ramped here.
i_RampDownINTNegative change of the command value per call. A negative command value jump can be ramped here.
i_ULimitINTUpper limit of the setting value.
i_LLimitINTLower limit of the setting value.
u_X_RefUINTValue of actual value i_X that represents 100%.
u_Y_RefUINTValue of setting value i_Y that represents 100%.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module active; control active.
FALSE: Module not active; outputs set to 0.
x_ErrorBOOLTRUE: function block detected an error
FALSE: function block has no error
i_YINTSetting value of the controller.
i_XWINTControl differential i_W – i_X
i_PINTP portion of the controller setting value.
i_IINTI portion of the controller setting value.
i_DINTD portion of the controller setting value.
i_ErrorINTi_Error <> 0: fb detected an error, for further information see the description of the errors
s_ErrTxtSTRINGoutput of the error in a written form.

Ein-/Ausgänge

none
Representation in FBD

TB_TCtrl_PIDT1

TB_TCtrl_PIDT1

The TB_TCtrl_PIDT1 function module is a PIDT1 controller that is primarily geared toward temperature regulation of thermally-sluggish systems. The controller can be used as a PIDT1 controller or a P, PI, PD or PDT1 controller. Combinations of controller types are also possible, e.g. for command PD and disturbance PIDT1, which means it can be used for almost any conceivable control distances.

The controller can be used as a PIDT1 controller or a PI, PD or PDT1 controller. When x_Enable = TRUE, the module is activated. Successful activation is signaled with TRUE at the x_Active output. From this point, the controller is active and calculates the output sizes. When x_Enable = FALSE, all output sizes are set to 0.

The controller works with four data records for command (cooling and heating) and disturbance (cooling and heating). Different parameters are required for heating and cooling since oftentimes only active heating is carried out, and not active cooling. The switching between command and disturbance is determined with u_Thresh_RD. If the same parameters are to be used for both command and disturbance, the parameters are to be connected regardless.

Setting rules according to Chien, Hrones and Reswick for determining the parameters can be found in the "setting rules" in this help information. Naturally, other methods can also be used for parameter finding.

Operation of the actuator can occur with the PWM generator TB_TCtrl_PWM, for example.

Empfohlene Task: Event/Cyclic; the important thing is a fixed call interval!

Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higher

Eingänge

Marking:Data type:Description:
x_EnableBOOLTRUE: Enabling of the module. Control is active.
FALSE: Module is deactivated; the outputs are set to 0.
i_WINTThe input i_W represents the command value. The unit/size must be the same as the unit of the actual value i_X.
i_XINTThe i_X input represents the actual value. The unit/size must be the same as the unit of the command value i_W.
i_PreControlINTThe setting value can be pre-controlled with the i_PreControl input. The input is added directly to the setting value i_Y, but is also prevented from undershooting or exceeding the limits. The unit must therefore correspond to the unit of the setting value i_Y.
u_Kp_Pro_R_HUINTProportional coefficient for command and heating in percent.
u_tn_0s1_R_HUINTReset time for command and heating in 0.1 s.
0: I portion deactivated.
u_tv_0s1_R_HUINTHold-back time for command and heating in 0.1 s.
0: D portion deactivated.
u_T1_0s1_R_HUINTTime constant of the DT1 actuator for command and heating in 0.1 s.
u_Kp_Pro_D_HUINTProportional coefficient for disturbance and heating in percent.
u_tn_0s1_D_HUINTReset time for disturbance and heating in 0.1 s.
0: I portion deactivated.
u_tv_0s1_D_HUINTReset time for disturbance and heating in 0.1 s.
0: I portion deactivated.
u_T1_0s1_D_HUINTHold-back time for disturbance and heating in 0.1 s.
u_Kp_Pro_R_CUINTProportional coefficient for command and cooling in percent.
u_tn_0s1_R_CUINTReset time for command and cooling in 0.1 s.
0: I portion deactivated.
u_tv_0s1_R_CUINTHold-back time for command and cooling in 0.1 s.
0: D portion deactivated.
u_T1_0s1_R_CUINTTime constant of the DT1 actuator for command and cooling in 0.1 s.
u_Kp_Pro_D_CUINTProportional coefficient for disturbance and cooling in percent.
u_tn_0s1_D_CUINTReset time for disturbance and cooling in 0.1 s.
0: I portion deactivated.
u_tv_0s1_D_CUINTHold-back time for disturbance and cooling in 0.1 s.
0: D portion deactivated.
u_T1_0s1_D_CUINTTime constant of the DT1 actuator for disturbance and cooling in 0.1 s.
u_Ts_0s1UINTCall interval of the function module in 0.1 s.
u_Thresh_RDUINTSwitching of the parameters between command and disturbance. If ABS(i_W - i_X) <= u_Thresh_RD, switching from command to disturbance occurs. Switching from disturbance back to command does not occur until a command value jump occurs.
i_RampUpINTPositive change of the command value per call. A positive command value jump can be ramped here.
i_RampDownINTNegative change of the command value per call. A negative command value jump can be ramped here.
i_ULimitINTUpper limit of the setting value.
i_LLimitINTLower limit of the setting value.
u_X_RefUINTValue of actual value i_X that represents 100%.
u_Y_RefUINTValue of setting value i_Y that represents 100%.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module active; control active.
FALSE: Module not active; outputs set to 0.
x_ErrorBOOLTRUE: function block detected an error
FALSE: function block has no error
i_YINTSetting value of the controller.
i_XWINTControl differential i_W – i_X
i_PINTP portion of the controller setting value.
i_IINTI portion of the controller setting value.
i_DINTD portion of the controller setting value.
i_ErrorINTi_Error <> 0: fb detected an error, for further information see the description of the errors
s_ErrTxtSTRINGoutput of the error in a written form.

Ein-/Ausgänge

none
Representation in FBD

TB_TCtrl_PWM

TB_TCtrl_PWM

The TB_TCtrl_PWM function module uses the four integer values of an array to generate the corresponding PWM signals or on/off signals for the operation of a relay for supplying the heating elements with power, for example. The TB_TCtrl_PWM function module can be used together with the TB_TCtrl_PIDT1 function module. Only the setting values i_Y in the a_PWM_Data array need to be entered once per controller call.

The function module generates the digital input/output signals from the array with four integer values to operate a relay, for example. The integer value must correspond to the call interval of the temperature controller in ms with a desired signal duration of 100%. Example:

The call interval of the temperature controller corresponds to 3 s, i.e. 3,000 ms.
100% of the controller output means that the digital output signal is active for 3,000 ms.
50% of the controller output means that the digital output signal is active for 1,500 ms.
The integer value of the array must therefore be between 0 and 3,000.

Empfohlene Task: Event

Verwendete Bibliotheken: TECH_TYPES_xxbd06 or higher

Eingänge

Marking:Data type:Description:
x_EnableBOOLTRUE: Enabling of the module. Control is active.
FALSE: Module is deactivated; the outputs are set to FALSE.
i_T_CycleINTCall interval of the TB_TCtrl_PWM function module in ms.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module active; control active.
FALSE: Module not active; outputs set to 0.
x_ErrorBOOLTRUE: function block detected an error
FALSE: function block has no error
x_TC1_PWMBOOLPWM signal of the first array value.
x_TC2_PWMBOOLPWM signal of the second array value.
x_TC3_PWMBOOLPWM signal of the third array value.
x_TC4_PWMBOOLPWM signal of the fourth array value
i_ErrorINTi_Error <> 0: fb detected an error, for further information see the description of the errors
s_ErrTxtSTRINGoutput of the error in a written form.

Ein-/Ausgänge

Marking:Data type:Description:
a_PWM_DataTB_PWMArray with four integer values; the values correspond to the signal duration in ms. The signal duration values must be written once per controller call in the temperature controller task.
Representation in FBD

TB_TCtrl_PWM

TB_TCtrl_PWM

The TB_TCtrl_PWM function module uses the four integer values of an array to generate the corresponding PWM signals or on/off signals for the operation of a relay for supplying the heating elements with power, for example. The TB_TCtrl_PWM function module can be used together with the TB_TCtrl_PIDT1 function module. Only the setting values i_Y in the a_PWM_Data array need to be entered once per controller call.

The function module generates the digital input/output signals from the array with four integer values to operate a relay, for example. The integer value must correspond to the call interval of the temperature controller in ms with a desired signal duration of 100%. Example:

The call interval of the temperature controller corresponds to 3 s, i.e. 3,000 ms.
100% of the controller output means that the digital output signal is active for 3,000 ms.
50% of the controller output means that the digital output signal is active for 1,500 ms.
The integer value of the array must therefore be between 0 and 3,000.

Empfohlene Task: Event

Verwendete Bibliotheken: TECH_TYPES_xxbd06 or higher

Eingänge

Marking:Data type:Description:
x_EnableBOOLTRUE: Enabling of the module. Control is active.
FALSE: Module is deactivated; the outputs are set to FALSE.
i_T_CycleINTCall interval of the TB_TCtrl_PWM function module in ms.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module active; control active.
FALSE: Module not active; outputs set to 0.
x_ErrorBOOLTRUE: function block detected an error
FALSE: function block has no error
x_TC1_PWMBOOLPWM signal of the first array value.
x_TC2_PWMBOOLPWM signal of the second array value.
x_TC3_PWMBOOLPWM signal of the third array value.
x_TC4_PWMBOOLPWM signal of the fourth array value
i_ErrorINTi_Error <> 0: fb detected an error, for further information see the description of the errors
s_ErrTxtSTRINGoutput of the error in a written form.

Ein-/Ausgänge

Marking:Data type:Description:
a_PWM_DataTB_PWMArray with four integer values; the values correspond to the signal duration in ms. The signal duration values must be written once per controller call in the temperature controller task.
Representation in FBD