%Bpr function


Old name %BprB
Function The function implements a two-position controller. Result is a value of Boolean type.
Declaration
BOOL %Bpr(
  REAL in RV,
 REAL in IV,
 REAL in DeadBand,
 REAL in Hysteresis,
 BOOL in OO/CO
  ) 
Parameters
RV Required value.
IV Input value.
DeadBand Dead band.
Hysteresis Hysteresis.
OO Opening output.
CO Closing output.
Note Regulation is executed according to the left part of the figure (OO/CO = @OO) or according to the right part of the figure (OO/CO = @CO).

Parameters:

  • DeadBand = AC (>0) - real value
  • Hysteresis = BC (>0) - real value

Input variables:

  • IV (input value) - real value
  • RV (required value) - real value (constant or continuous signal)

Output variables:

  • OO (opening output) - value of Boolean type
  • CO (closing output) - value of Boolean type

Function:

  • State1: IV <= RV - AD, then OO=1 and CO=0
  • State2: RV - AD < IV < RV - AB, then OO is not changing and CO=0
  • State3: RV - AB <= IV <= RV + AB, then OO=CO=0
  • State4: RV + AB < IV < RV + AD, then OO=0 and CO is not changing
  • State5: RV + AD <= IV, then OO=0 and CO=1

Implemented functions
Function arguments - types