TectGroup (FB)
FUNCTION_BLOCK TectGroup EXTENDS ABBLCONC3
Function block TectGroup realizes the following functions:
Group fault monitoring.
Group control: enable process, reset process, enable AutoTune.
Coordinated output of the zones in the group
Note
Function block TectGroup calls the function block TectTempControl for each zone internally. Thus a separate call of function block TectTempControl for each zone is not necessary. Function block TectGroup also calls separately function Block TectPwm8 for heating and cooling.
Note
Make sure the “GroupSize” Input = No of Instances (Zones) Configured for TectPwm8, TectTempControl or TectTempZoneDataType. For example: If GroupSize = 6 then the variable connected to TectTempControl and others mention above needs to be declared as an ARRAY[1..6].
- 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
EnFaultMonitorBOOLFALSE
2: It enables the Fault monitoring function when True. A False at the input disables group fault monitoring.Group monitoring of faults is predefined through input GroupFaultMask.
GroupFaultMaskBYTE2#1111
- 3: It enables masking of the Group Fault for the bits which are with value 1. The first four bits stand for four different error sources:
Bit0: TC_Fault1
Bit1: TC_Fault2
Bit2: HighHighTempFault
Bit3: LowLowTempFault
This means, all of the four faults are monitored as group fault. Before enabling the group of zones of the function block TectGroup, define the faults to be masked.
PidIntervalTIMETIME#2s0ms
4: Interval time for PID and Autotune Process. Range:>1ms, Default value: 2s.For PID process: The interval time, at which the PID updates the duty cycle of output based PwmPeriod.
PwmPeriodTIMETIME#2s0ms
5: Pulse Width Modulation (PWM) output Period. PwmPeriod should be always less than or equal to PidInterval.Range:>T#1ms, Default value: T#2s.
RawFactorINT0
- 6: Sensor provides the ActTempRaw, this value doesn’t match to the temperature in Celsius. Hence RawFactor is necessary to scale the temperature into Celsius scale.
Example: If ActTempRaw is 200 which indicates 20 degree, then the RawFactor will be 200/20 = 10. The RawFactor should not be zero
FahrenheitBOOLFALSE
7: A True at the input Fahrenheit of the Block displays the temperature in Fahrenheit, a False displays the temperature in Celsius.
CoOutputBOOLFALSE
- 8: The input CoOutput enables coordinated output for PWM8 output of a group. It avoids switching on all zones simultaneously, thus avoiding a 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 resolution of digital outputs duration). The coordination is realized with function block TectPwm8 called internally.
Input FirstPwm8Heat and FirstPwm8Cool define the data area of the FirstTectPwm8 input for heating and cooling. Each function block TectPwm8 supports maximum 8 zones. For more than 8 zones, two arrays of function block TectPwm8 must be defined for heating and cooling accordingly.
If CoOutput is not used (False), Then one dummy variable still needs to be defined for both inputs FirstPwm8Heat and FirstPwm8Cool
MinCyclesHeatINT1
- 9: Minimum length of ON and OFF time of PWM signal in number of CPU task cycles for heating.Default value = 1, Range: > 0.
Example: Minimum length = 100ms; CPU task cycle = 50ms, then the number of cycles for heating is = 100ms/50ms = 2.
MinCyclesCoolINT2
- 10: Minimum length of ON and OFF time of PWM signal in number of CPU task cycles for cooling. .Default value = 2, Range: > 0.
Example: Minimum length = 100ms; CPU task cycle = 50ms, then the number of cycles for heating is = 100 ms/50 ms = 2.
PwmPeriodCyclesINT20
- 11: Duration of PWM signal period in number of CPU task cycles.Default value = 20, Range: > MinCyclesHeat and MinCyclesCool.
PwmPeriod = 1s, CPU task cycle = 50ms, then the number of task cycles is = 1s / 50ms = 20.
GroupSizeBYTE1
12: Size of the group or total number of zones in the particular group. Default value: 1, Range: 1 to 255.
GroupNameSTRING(20)13: The name of the group. It will be saved in TectTempZoneDataType structure.
Inout
FirstPwm8Heat14: First instance of function block TectPwm8 for heating in the declaration. Each instance supports maximum 8 zones. The function block TectPwm8 is called internally. If more instances are needed for one group, they must be defined in an array. If the coordinated output is not used, a dummy instance is still needed. Please see also description of input CoOutput.
FirstPwm8Cool15: First instance of function block TectPwm8 for cooling in the declaration. Each instance supports maximum 8 zones. The function block TectPwm8 is called internally. If more instances are needed for one group, they must be defined in an array. If the coordinated output is not used, a dummy instance is still needed. Please see also description of CoOutput,TectPwm8.
FirstTempControl16: First instance of function block TectTempControl in the declaration. Each zone in the group needs one instance. The function block TectTempControl is called internally. Thus a separate call of function block TectTempControl for each zone is not necessary TectTempControl.
FirstZoneData17: Monitoring of the first zone data structure of the zone group - TectTempZoneDataType.
GroupData18: This inout structure of the group will have variables related to the complete group TectGroupDataType
Output
ErrorID3: Error code in case of error in the function block execution
GroupFaultBOOLFALSE
4: A true at the output activates GroupFault. This will be true only when input EnFaultMonitor is enabled. It leads to disable the outputs of the whole group.
GroupStatus5: All status related to the group will be updated to each zone by the enumeration TectControlStateMachineEnum, TectControlStateMachineEnum
GroupIndexBYTE0
6: This is the variable which differentiate each group by unique number.
Methods:
E_ResetAction
D_AbortAction
C_CleaningAction
B_CyclicAction
A_StartAction
Structure: