FB_BA_SwiHys2P

FB_BA_SwiHys2P 1:

The function block FB_BA_SwiHys2P is a two-point switch with adjustable hysteresis and hysteresis offset.

A general function block enable can be implemented at input bEn. If the function block is locked, the output bQ is FALSE. The setpoint for the two-point switch is connected at input fSp. The control direction of the function block depends on the input variable bActn.

The active switching points result from the setpoint, the hysteresis and the hysteresis offset. They are output at fSwiHi and fSwiLow.

If bActn TRUE, the result is direct/synchronous control direction (cooling mode).

FB_BA_SwiHys2P 2:

If bActn is FALSE, the result is indirect/reversed control direction (heating mode).

FB_BA_SwiHys2P 3:

FB_BA_SwiHys2P 4: Inputs

VAR_INPUT
  bEn           : BOOL;
  rIn           : REAL;
  rSp           : REAL;
  rHys          : REAL;
  rHysOffs      : REAL;
  udiDlyOn_sec  : UDINT;
  udiDlyOff_sec : UDINT;
  bActn         : BOOL;
END_VAR

Name

Type

Description

bEn

BOOL

General enable of the function block.

fIn

REAL

Input value

fSp

REAL

Setpoint input

fHys

REAL

Hysteresis

fHysOffs

REAL

Hysteresis offset

nDlyOn

UDINT

Start-up delay [s]

nDlyOff

UDINT

Switch-off delay [s]

bActn

BOOL

Control direction

FB_BA_SwiHys2P 5: Outputs

VAR_OUTPUT
  bQ                 : BOOL;
  fSwiHi             : REAL;
  fSwiLow            : REAL;
  nRemTiDlyOn        : UDINT;
  nRemTiDlyOff       : UDINT;
END_VAR

Name

Type

Description

bQ

BOOL

Output

fSwiHi

REAL

Upper switching point

fSwiLow

REAL

Lower switching point

nRemTiDlyOn

UDINT

Remaining time of the start-up delay [s].

nRemTiDlyOff

UDINT

Remaining time of the switch-off delay [s].

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.22

Tc3_BA2 from v5.2.5.0