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

Enable

BOOL

FALSE

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

Busy

BOOL

FALSE

Operation is running (while output Error is FALSE)

AbbLConC3

Error

BOOL

FALSE

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

DutyCycle

ARRAY [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.

DutyMax

INT

100

2: Maximum value for a DutyCycle. Range : 10 to 100.

MinCycles

INT

1

3: Minimum length of ON and OFF time of PWM signal in number of CPU task cycles. Range: > 1.

PwmPeriodCycles

INT

20

4: Duration of PWM signal period in number of CPU task cycles. Range: > MinCycles

Output

ErrorID

ERROR_ID

3: Error code in case of error in the function block execution

Pulse

ARRAY [1..8] OF BOOL

4: PWM signals for 8 zones

Methods:

E_ResetAction

D_AbortAction

C_CleaningAction

B_CyclicAction

A_StartAction

Structure: