FB_BA_Cont4Stp01
The function block determines the resulting switching stages of a multi-level unit, depending on the input signal.
Four switch-on thresholds and four hysteresis values can be parameterized.
Diagram 01
Control direction of parameter bActn = FALSE = Reverse = Heating
udiStp | udiNumOfStp | rSwiOn | rSwiOff | udiRemTiDlyOn_sec | udiRemTiDlyOff_sec | bQ01 | bQ02 | bQ03 | bQ04 |
---|---|---|---|---|---|---|---|---|---|
0 | 0 | rSwiOn01 | rSwiOn01 - rHys01 | udiDlyOn01_sec | 0 | FALSE | FALSE | FALSE | FALSE |
1 | >= 1 | rSwiOn02 | rSwiOn01 - rHys01 | udiDlyOn02_sec | udiDlyOff01_sec | TRUE | FALSE | FALSE | FALSE |
2 | >= 2 | rSwiOn03 | rSwiOn02 - rHys02 | udiDlyOn03_sec | udiDlyOff02_sec | TRUE | TRUE | FALSE | FALSE |
3 | >= 3 | rSwiOn04 | rSwiOn03 - rHys03 | udiDlyOn04_sec | udiDlyOff03_sec | TRUE | TRUE | TRUE | FALSE |
4 | >= 4 | rSwiOn04 | rSwiOn04 - rHys04 | 0 | udiDlyOff04_sec | TRUE | TRUE | TRUE | TRUE |
Diagram 02
Control direction parameter bActn = TRUE = Direct = Cooling
udiStp | udiNumOfStp | rSwiOn | rSwiOff | udiRemTiDlyOn_sec | udiRemTiDlyOff_sec | bQ01 | bQ02 | bQ03 | bQ04 |
---|---|---|---|---|---|---|---|---|---|
0 | 0 | rSwiOn01 | rSwiOn01 + rHys01 | udiDlyOn01_sec | 0 | FALSE | FALSE | FALSE | FALSE |
1 | >= 1 | rSwiOn02 | rSwiOn01 + rHys01 | udiDlyOn02_sec | udiDlyOff01_sec | TRUE | FALSE | FALSE | FALSE |
2 | >= 2 | rSwiOn03 | rSwiOn02 + rHys02 | udiDlyOn03_sec | udiDlyOff02_sec | TRUE | TRUE | FALSE | FALSE |
3 | >= 3 | rSwiOn04 | rSwiOn03 + rHys03 | udiDlyOn04_sec | udiDlyOff03_sec | TRUE | TRUE | TRUE | FALSE |
4 | 4 | rSwiOn04 | rSwiOn04 + rHys04 | 0 | udiDlyOff04_sec | TRUE | TRUE | TRUE | TRUE |
Diagram 03
Timing of the switch-on and switch-off delays
At time t1, rIn jumps from rSwiOn01 to rSwiOn04
At time t2, rIn jumps from rSwiOn04to rSwiOn01 - rHys01
VAR_INPUT
bEn : BOOL;
rIn : REAL;
rSwiOn01 : REAL
rHys01 : REAL;
udiDlyOn01_sec : UDINT;
udiDlyOff01_sec : UDINT;
rSwiOn02 : REAL;
rHys02 : REAL;
udiDlyOn02_sec : UDINT;
udiDlyOff02_sec : UDINT;
rSwiOn03 : REAL;
rHys03 : REAL;
udiDlyOn03_sec : UDINT;
udiDlyOff03_sec : UDINT;
rSwiOn04 : REAL;
rHys04 : REAL;
udiDlyOn04_sec : UDINT;
udiDlyOff04_sec : UDINT;
udiNumOfStp : UDINT;
bActn : BOOL;
bEn: General enable of the function block. If bEn is FALSE, all outputs are set to 0.
rIn: Input value, from which the switching state is derived.
rSwiOn01: Switch-on point stage 01
rHys01: Absolute value hysteresis stage 01
udiDlyOn01_sec: Switch-on delay stage 01
udiDlyOff01_sec: Switch-off delay stage 01
rSwiOn02: Switch-on point stage 02
rHys02: Absolute value hysteresis stage 02
udiDlyOn02_sec: Switch-on delay stage 02
udiDlyOff02_sec: Switch-off delay stage 02
rSwiOn03: Switch-on point stage 03
rHys03: Absolute value hysteresis stage 03
udiDlyOn03_sec: Switch-on delay stage 03
udiDlyOff03_sec: Switch-off delay stage 03
rSwiOn04: Switch-on point stage 04
rHys04: Absolute value hysteresis stage 04
udiDlyOn04_sec: Switch-on delay stage 04
udiDlyOff04_sec: Switch-off delay stage 04
udiNumOfStp: Number of stages that are required.
The input is limited to a range from 0 to 4
bActn: Input variable used to determine the control direction of the step switch.
TRUE = direct = cooling; FALSE = reverse = heating
VAR_OUTPUT
bQ01 : BOOL;
bQ02 : BOOL;
bQ03 : BOOL;
bQ04 : BOOL;
udiStp : UDINT;
rSwiOn : REAL;
rSwiOff : REAL;
udiRemTiDlyOn_sec : UDINT;
udiRemTiDlyOff_sec : UDINT;
bQ01: Display of status step 01
TRUE = ON; FALSE = OFF
udiStp >= 1
bQ02: Display of status step 02
TRUE = ON; FALSE = OFF
udiStp >= 2
bQ03: Display of status step 03
TRUE = ON; FALSE = OFF
udiStp >= 3
bQ04: Display of status step 04
TRUE = ON; FALSE = OFF
udiStp >= 4
udiStp: Shows the current step of the step switch
rSwiOn: Shows the next switch-on point
rSwiOff: Shows the next switch-off point
udiRemTiDlyOn_sec: If the switch-on point for switching to the next level is met, the progress of the switch-on delay time is displayed here.
udiRemTiDlyOff_sec: If the switch-off point for switching down to the next level is met, the progress of the switch-off delay time is displayed here.
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.7 | Tc3_BA from v1.1.6.0 |