FourToTwoPipes (FB)

FUNCTION_BLOCK FourToTwoPipes

Control support for four-to-two-pipe assembly.

Application example

A four-to-two-pipe assembly consists of two shut-off valves (for heat / cool pipe) plus a control valve. They are used in plants to connect two-pipe aggregates to four-pipe supply.

Functionality

FourToTwoPipes takes care to control the shut-off valves to ensure they are not open in parallel. There are optional service indications (from shut-off valves) and a close-time to achieve this. In the rare case shut-off valves provide service indications it’s advisabe to use them. Otherwise FourToTwoPipes needs to rely on a properly configured close-time definitely covering travel time of shut-off valves plus safety reserve.

By construction four-to-two-pipe assemblies are supposed work in operation modes heat / cool / closed. Setpoints of the heat / cool sequence (0..100%) are scaled to the setting range (r*Begin..r*End - default 0..100%). The valve operation mode eModeIn can eventually provided by a specifc temperatur controller algorithm - in this case eModeOut follows the eModeIn. In case eModeIn is UNUSED, eModeOut is computed comparing rHeatSetpt / rCoolSetpt > 0.

Some controller algorithms may apply control range constraints - eventually a lower limit > 0%. In this case the setpoints of the heat / cool sequences will become inconsistent to determine the valve operation mode from. If the controller algorithm doesnt provides a valve operation mode, but inconsistent heat / cool sequences FourToTwoPipes falls back to heat.

InOut:

Scope

Name

Type

Initial

Comment

Input

xEnable

BOOL

TRUE

Enable

rHeat

REAL

Heat control signal (0..100%).

rHeatBegin

REAL

0.0

Heat control range begin (0..100%).

rHeatEnd

REAL

100.0

Heat control range end (0..100%).

rCool

REAL

Cool control signal (0..100%).

rCoolBegin

REAL

0.0

Cool control range begin (0..100%).

rCoolEnd

REAL

100.0

Cool control range end (0..100%).

eModeIn

HeatCoolOperationMode

HeatCoolOperationMode.UNUSED

Controller operation mode.

tClose

TIME

TIME#1m0s0ms

Close time - minimum time both shut-off valves needs to be closed.

xSvciHeatClosed

BOOL

FALSE

Service indication - heat shut-off valve is closed

xSvciHeatClosed_Used

BOOL

FALSE

Service indication svciHeatClosed is used / connected.

xSvciCoolClosed

BOOL

FALSE

Service indication - cool shut-off valve is closed

xSvciCoolClosed_Used

BOOL

FALSE

Service indication svciCoolClosed is used / connected.

itfDateTimeProvider

Util.IDateTimeProvider

Globals.g_dtpDateTimeProvider

Source for the current date and time information in milliseconds since 1.1.1970 00:00:00.000

Output

xHeat

BOOL

Heat shut-off valve - TRUE if open

xCool

BOOL

Cool shut-off valve - TRUE if open

rControl

REAL

Control valve signal (0..100%).

eModeOut

HeatCoolOperationMode

HeatCoolOperationMode.INACTIVE

Operation mode.

xError

BOOL

Error indication - r*End = r*Begin or rSetpt out of range 0..100%.

eErrorID

Error

Error ID