TB_TCtrl_PWM

Representation in FBD

General Information

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.

Recommended task: Event
Libraries used: TECH_TYPES_xxbd06 or higher

InOut Parameter

Marking: Data type: Description:
a_PWM_Data TB_PWM Array 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.

Input Parameter

Marking: Data type: Description:
x_Enable BOOL TRUE: Enabling of the module. Control is active.
FALSE: Module is deactivated; the outputs are set to FALSE.
i_T_Cycle INT Call interval of the TB_TCtrl_PWM function module in ms.

Output Parameter

Marking: Data type: Description:
x_Active BOOL TRUE: Module active; control active.
FALSE: Module not active; outputs set to 0.
x_Error BOOL TRUE: function block detected an error
FALSE: function block has no error
x_TC1_PWM BOOL PWM signal of the first array value.
x_TC2_PWM BOOL PWM signal of the second array value.
x_TC3_PWM BOOL PWM signal of the third array value.
x_TC4_PWM BOOL PWM signal of the fourth array value
i_Error INT i_Error <> 0: fb detected an error, for further information see the description of the errors
s_ErrTxt STRING output of the error in a written form.
i_Error Description:
-999 No technology license. Use PLC with technology license.