FB_BA_Vlv3pt

FB_BA_Vlv3pt 1:

The template is used to control a three-point valve. It mainly consists of the base class FB_BA_ActuatorMO, the template Anlg3Pnt for the analog conversion of the input signal fValPgm into a three-point signal and the anti-blocking protection function Ablk.

The three-point valve is switched on externally by the priorities of the command structure stCmd of the base class FB_BA_ActuatorMO or internally by the anti-blocking protection function Ablk.

FB_BA_Vlv3pt 2:

The initialization of the template takes place within the method FB_Init.

Block diagram

FB_BA_Vlv3pt 3:

Syntax

FUNCTION_BLOCK FB_BA_Vlv3pt EXTENDS FB_BA_ActuatorMO
VAR_INPUT
  fValPgm         : REAL;
  bAblkLock       : BOOL;
END_VAR
VAR_OUTPUT
  bOpen           : BOOL;
  bClose          : BOOL;
END_VAR
VAR_INPUT CONSTANT
  Anlg3Pnt        : FB_BA_Analog3Pnt;
  Ablk            : FB_BA_AntiBlocking;
END_VAR
VAR
  PrioSwi3pt      : FB_BA_PrioSwi_UDI04;
  PrioSwiOpen     : FB_BA_MMUX_B04;
  PrioSwiClose    : FB_BA_MMUX_B04;
END_VAR

FB_BA_Vlv3pt 4: Inputs

Name

Type

Description

fValPgm

REAL

Continuous input signal for analog conversion to a three-point signal. This can come from a PID controller and have a value from 0...100 %.

bAblkLock

BOOL

A TRUE at this input variable interrupts the anti-blocking protection function Ablk. It should be prevented that pumps and valves get an anti-blocking protection pulse at the same time.

FB_BA_Vlv3pt 5: Outputs

Name

Type

Description

bOpen

BOOL

Variable for the control Open of the 3-point valve. This variable must be linked to a bus terminal.

bClose

BOOL

Variable for the control Close of the 3-point valve. This variable must be linked to a bus terminal.

FB_BA_Vlv3pt 6: Inputs CONSTANT

Name

Type

Description

Anlg3Pnt

FB_BA_Analog3Pnt

The template Anlg3Pnt converts the analog input signal fValPgm into a three-point signal.

Ablk

FB_BA_AntiBlocking

Anti-blocking protection.

Variables

Name

Type

Description

PrioSwi3pt

FB_BA_PrioSwi_UDI04

The priority switch PrioSwi3pt determines the current switching value for the priority "Program" of the command structure stCmd on the basis of the analog 3-point converter Anlg3Pnt and the anti-blocking protection function Ablk.

PrioSwiOpen

FB_BA_MMUX_B04

The multiplexer PrioSwiOpen receives the numeric switch value nCmd from the base class FB_BA_ActuatorMO and converts the switch value into the 3-point signal bOpen.

PrioSwiClose

FB_BA_MMUX_B04

The multiplexer PrioSwiClose receives the numeric switch value nCmd from the base class FB_BA_ActuatorMO and converts the switch value into the 3-point signal bClose.

Requirements

Development environment

Necessary function

TwinCAT from v3.1.4024.35

TF8040 | TwinCAT Building Automation from V5.0.0.0