TectPwm8 (FB)
FUNCTION_BLOCK TectPwm8 EXTENDS ABBLCONC3
Function Block TectPwm8 can be used to coordinate up to eight PWM signals in time behavior, so that they are not be switched on at the same time to avoid undesired voltage drop in the power supply system. At the same time, it compensates the Error between digital outputs and duty cycle due to CPU task cycle (as a resolution of digital outputs duration).
Note: For Heating and cooling separate instances of the block have to be used
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. Execution will continue forever until a falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.
AbbLConC3
Output
BusyBOOLFALSE
Operation is running (while output Error is FALSE)
AbbLConC3
ErrorBOOLFALSE
Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.
AbbLConC3
Input
DutyCycleARRAY [1..8] OF INT
1: PWM duty cycle of maximum eight zones. If there are more than 8 zones in one group, more function blocks can be used. Range: 0 to 100.
DutyMaxINT100
2: Maximum value for a DutyCycle. Range : 10 to 100.
MinCyclesINT1
3: Minimum length of ON and OFF time of PWM signal in number of CPU task cycles. Range: > 1.
PwmPeriodCyclesINT20
4: Duration of PWM signal period in number of CPU task cycles. Range: > MinCycles
Output
ErrorID3: Error code in case of error in the function block execution
PulseARRAY [1..8] OF BOOL
4: PWM signals for 8 zones
Methods:
E_ResetAction
D_AbortAction
C_CleaningAction
B_CyclicAction
A_StartAction
Structure: