Valve3P (FB)

FUNCTION_BLOCK Valve3P

Short Description

Control of a 3-point valve drive and calculation of the valve position
In addition, the 3-point drive is protected by a blocking protection function.
Typical application: Control of a 3-point valve drive in a heating circuit

Portrayal

../_images/Valve3P_FB.png

Interfaces

Inputs

Name

Datatype

Range

Init-Value

Function

xInOpen BOOL    

Requirement - Valve opening

xInClose BOOL    

Requirement - Valve closure

eAOOOpen HVACTYPES.eManBin HVACTYPES.eManBin.Auto, HVACTYPES.eManBin.ManOff, HVACTYPES.eManBin.ManOn  

Operating mode of manual override - hardware for the valve opening

eAOOClose HVACTYPES.eManBin HVACTYPES.eManBin.Auto, HVACTYPES.eManBin.ManOff, HVACTYPES.eManBin.ManOn  

Operating mode of manual override - hardware for the valve closing

Outputs

Name

Datatype

Range

Init-Value

Function

xHBOpen BOOL    

Release - Valve opening after manual override

xHBClose BOOL    

Release - valve closing after manual override

xABOpen BOOL    

Release - Valve opening before manual override

xABClose BOOL    

Release - valve closing before manual override

dtAbsLastOn DATE_AND_TIME    

Startdate / -Timepoint of the last blocking protection process

rPos REAL 0.0 ... 100.0  

Current valve position

Setpoints / Parameters

Name

Datatype

Range

Init-Value

Function

tDuration TIME   120s

Operating time of the drive

udiAbsTime UDINT 0 bis 3600s 200s

Time duration of the blocking protection process

todAbsStartTime TOD   TOD#09:00:00 Uhr

Time point of the blocking protection process

eAbsDay eDoW   eDow.Montag

Weekday of blocking protection process

eManModeOpen eMANBIN eMANBIN.Auto, eMANBIN.Off, eMANBIN.On eMANBIN.Auto

Operating mode of manual override - Valve opening

eManModeClose eMANBIN eMANBIN.Auto, eMANBIN.Off, eMANBIN.On eMANBIN.Auto

Operating mode of manual override - Valve closure

Functional description

General

This function component is used to control the position of a 3-point valve drive through the xHBOpen or xHBClose outputs enable - valve opening after manual override.
The current valve position is permanently calculated and is available at the rPos output.
Essentially, the following function blocks are used:

Abs3P

ManBin

Position3P

Blocking protection process

This process is realised by the monitoring of signals 1 and 2 for activity and, if required, by triggering blocking protection.
The test period covers in each case168 hours (= 1 week).
Signals 1 and 2 are active if they are continuously active in the test period during the minimum operating time of 30.0 secs (only signal 1 or only signal 2 or both).
The blocking protection process is thus prevented, the test time restarting.

Signal 1: ( xInOpen AND eAOOOpen = HVACTYPES.eManBin.Auto ) OR ( eAOOOpen = HVACTYPES.eManBin.ManOn )

Signal 2: ( xInClose AND eAOOClose = HVACTYPES.eManBin.Auto ) OR ( eAOOClose = HVACTYPES.eManBin.ManOn )

If no activity was detected during the test period, the blocking protection process is triggered on the eAbsDay weekday at the todAbsStartTime time.
At the same time, the test period restarts.

The active blocking protection process is divided into two consecutive periods of time (Section 1 and Section 2)
In section 1, the combination xABOpen enable - output = TRUE, xABClose enable - output = FALSE is output during the udiAbsTime time period.
In section 2, the combination xABOpen enable - output = FALSE, xABClose enable - output = TRUE is output during the udiAbsTime time period.

The initial triggering of the blocking protection process can be delayed depending on the relevant settings (eAbsDay weekday and todAbsStartTime)
.

Example

Testing period completed on Tuesday morning, start of the blocking protection process not until next Monday.

At the dtAbsLastOn output, the start date and the start time of the last blocking protection process are available.

Prerequisite for the use of the Abs3P functional component

For correct function, the use of the function block TimeRead with xEn = TRUE is mandatory.

xABOpen enable - valve opening before manual override

The xABOpen enable - valve opening before manual override is influenced by the *xInOpen*input request - valve opening and the blocking protection module.
xInOpen

Blocking protection process

xABOpen

Notes

FALSE FALSE FALSE

Request not active, no blocking protection process

X TRUE

Section 1: TRUE Section 2: FALSE

Blocking protection process active

TRUE FALSE TRUE

Request active, no blocking protection process

Legend: X = any

*xABClose*enable - valve closure before manual override

The xABClose enable - valve closure before manual override is influenced by the xInClose input request - valve closing and the blocking protection module
xInClose

Blocking protection process

xABClose

Notes

FALSE FALSE FALSE

Request not active, no blocking protection process

X TRUE

Section 1: FALSE Section 2: TRUE

Blocking protection process active

TRUE FALSE TRUE

Request active, no blocking protection process

Legend: X = any

xHBOpen enable - valve opening after manual override

The xHBOpen*enable - valve opening after manual override corresponds to the *xABOpen enable - valve opening before manual override
additionally extended to a manual override module.
xABOpen eManModeOpen xHBOpen

Notes

FALSE eMANBIN.Auto FALSE

Manual override module in automatic mode

TRUE eMANBIN.Auto TRUE

Manual override module in automatic mode

X eMANBIN.On TRUE

Manual override module in manual mode On

X eMANBIN.Off FALSE

Manual override module in manual mode Off

Legend: X = any

xHBClose enable - valve closing after manual override

The xHBClose enable - valve closure after manual override corresponds to the xABClose enable - valve closure before manual override
additionally extended to a manual override module.
xABClose eManModeOpen xHBClose

Notes

FALSE eMANBIN.Auto FALSE

Manual override module in automatic mode

TRUE eMANBIN.Auto TRUE

Manual override module in automatic mode

X eMANBIN.On TRUE

Manual override module in manual mode On

X eMANBIN.Off FALSE

Manual override module in manual mode Off

Legend: X = any

Forced control of manual overrides of the outputs

If the eManModeOpen operating mode of manual override - valve opening is in the eMANBIN.On state (= manual override open active),
then the eManModeClose operating mode of the manual override - valve closing is forcibly offset into the eMANBIN.Off state
(= manual override close not active).

If the eManModeClose operating mode of manual override - valve closing in the eMANBIN.On state (= manual override close active),
then the eMANBIN.On operating mode of manual override - valve opening eManModeOpen is forcibly offset into the eMANBIN.Off state
(= manual override open not active).

rPos current valve position

It is used to display the current position of the 3-point drive in the range 0 - 100% and is calculated from the duration of the signals at the outputs
xHBOpen enable - valve opening after manual override and xHBClose enable - valve closing after manual override is calculated in combination with
the tDuration duration of the drive.

The position display is independent of the signal generation, that is, if the position indicator reaches a final position (0% or 100%), then
nevertheless, signals continue to be generated at the xABOpen and xABClose or xHBOpen and xHBClose outputs.
The position indicator does not take into account the possible position changes caused by the manual override - hardware.

Visualization




Information

Element

Authors

Date

Version

Note

Function

Adam Bartod 11.2017 1.0 Ursprungsversion

Programming

Adam Bartod 11.2017 1.0 Ursprungsversion
Test Jochen Reu / 11.2017 1.0 Ursprungsversion

Documentation

Jochen Reu 11.2017 1.0 Ursprungsversion

Codesys

InOut:
Scope Name Type Initial Comment
Input xInOpen BOOL  

Requirement - Valve opening

xInClose BOOL  

Requirement - Valve closure

eAOOOpen eManBin  

Operating mode of manual override - hardware for the valve opening

eAOOClose eManBin  

Operating mode of manual override - hardware for the valve closing

Output xHBOpen BOOL  

Release - Valve opening after manual override

xHBClose BOOL  

Release - valve closing after manual override

xABOpen BOOL  

Release - Valve opening before manual override

xABClose BOOL  

Release - valve closing before manual override

dtAbsLastOn DT  

Startdate / -Timepoint of the last blocking protection process

rPos REAL  

Current valve position

Input tDuration TIME TIME#2m0s0ms

Operating time of the drive

udiAbsTime UDINT 200

Time duration of the blocking protection process

todAbsStartTime TOD TIME_OF_DAY#9:0

Time point of the blocking protection process

eAbsDay eDoW eDow.Monday

Weekday of blocking protection process

eManModeOpen eMANBIN eMANBIN.Auto

Operating mode of manual override - Valve opening

eManModeClose eMANBIN eMANBIN.Auto

Operating mode of manual override - Valve closure