> For the complete documentation index, see [llms.txt](https://support.powerio.com/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.powerio.com/hub/codesys-hvac/en/hvac-library/functionblocks/components/valveanalog.md).

# ValveAnalog

## `ValveAnalog` (FB)

FUNCTION\_BLOCK ValveAnalog

### Short description

> Control of a continuous valve actuator with anti-seizing protection function and continuous position feedback\
> \
> Typical application: control valve in a heating circuit

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-b3578072f93136d15778bbb7f94ef995d0cd3462%2FValveAnalog_FB.png?alt=media" alt=""><figcaption></figcaption></figure>

### Interfaces

#### Inputs

| Name       | Data type         | Value range                                   | Initial value          | Function                                             |
| ---------- | ----------------- | --------------------------------------------- | ---------------------- | ---------------------------------------------------- |
| *rY*       | REAL              |                                               |                        | Setpoint signal from control                         |
| *xForce*   | BOOL              |                                               | FALSE                  | Forced override after manual override                |
| *xAlarmIn* | BOOL              |                                               | FALSE                  | Actuator fault message                               |
| *rU*       | REAL              |                                               | 0.0                    | Position feedback from the control valve             |
| *eAO*      | HVACTYPES.eManNum | HVACTYPES.eManNum.Auto, HVACTYPES.eManNum.Man | HVACTYPES.eManNum.Auto | Feedback - automatic mode                            |
| *rPoti*    | REAL              |                                               |                        | Feedback - setpoint signal from hardware manual mode |

#### Outputs

| Name          | Data type       | Value range | Initial value | Function                                        |
| ------------- | --------------- | ----------- | ------------- | ----------------------------------------------- |
| *rHA*         | REAL            |             |               | Setpoint signal after manual override           |
| *rAA*         | REAL            |             |               | Setpoint signal before manual override          |
| *xAlarmPos*   | BOOL            |             |               | Fault message from position monitoring          |
| *dtAbsLastOn* | DATE\_AND\_TIME |             |               | Date / time of the last anti-blocking operation |
| *xAlarm*      | BOOL            |             |               | Collective fault message                        |
| *xAuto*       | BOOL            |             |               | Collective automatic operation message          |

#### Setpoints / Parameters

| Name               | Data type | Value range                                 | Initial value | Function                                                   |
| ------------------ | --------- | ------------------------------------------- | ------------- | ---------------------------------------------------------- |
| **udiControlTime** | UDINT     | 0 … 600s                                    | 180s          | Duration of position monitoring                            |
| **rControlDiff**   | REAL      |                                             | 7.0%          | Monitoring of valve position: Maximum position deviation   |
| **xControl**       | BOOL      |                                             | TRUE          | Enable position monitoring                                 |
| **xForceOption**   | BOOL      |                                             | TRUE          | State of the output *rHA* under forced override            |
| **rAbsMaxLimit**   | REAL      |                                             | 100.0         | Upper limit for the setpoint signal before manual override |
| **rAbsMinLimit**   | REAL      |                                             | 0.0           | Lower limit for the setpoint signal before manual override |
| **udiAbsTime**     | UDINT     | 10s … 600s                                  | 180s          | Duration of anti-seize operation in seconds                |
| **tAbsStartTime**  | TOD       | 00:00:00 - 23:59:59                         | 08:00:00      | Time of the anti-blocking operation                        |
| **eAbsDay**        | eDoW      | eDow\.Inactive, eDoW\.Monday … eDoW\.Sunday | eDoW\.Monday  | Day of the week of the anti-blocking operation             |
| **rManValue**      | REAL      |                                             | 0.0           | Manual override: Manual value                              |
| **eManModeN**      | eMANNUM   | eMANNUM.Auto, eMANNUM.Man                   |               | Manual override: Operating mode                            |

### Functional description

#### Setpoint signal before manual override *rAA*

The setpoint signal before manual override *rAA* is influenced by the anti-seizing protection module.\
The anti-seizing protection module is parameterized by the setpoints / parameters *udiAbsTime*, **tAbsStartTime** and **eAbsDay** parameterized, the position feedback from the control valve is used as input signal *rU* used.\
The minimum change in valve position required to disable the anti-seizing protection function is fixed at 10.0%.\
The setpoint signal before manual override *rAA* is limited by the two absolute limit values **rAbsMinLimit** and **rAbsmaxLimit** limited.\
The position feedback from the control valve *rU* may be replaced by the setpoint signal from control *rY* if no position feedback is available.

#### Setpoint signal after manual override *rHA*

The setpoint signal after manual override *rHA* is influenced by the output of the anti-seizing protection module, the setpoint signal from control *rY*, the manual override and the forced control.

| **eManModeN** | Anti-blocking protection process | *xForce* | **xForceOption** | *rHA*                                         | Notes                                                       |
| ------------- | -------------------------------- | -------- | ---------------- | --------------------------------------------- | ----------------------------------------------------------- |
| eMANNUM.Auto  | FALSE                            | FALSE    | X                | *rY*                                          | Automatic mode with passive anti-seizing protection process |
| eMANNUM.Auto  | TRUE                             | FALSE    | X                | Output of the anti-seizing protection process | Automatic mode with active anti-seizing protection process  |
| eMANNUM.Man   | X                                | FALSE    | X                | **rManValue**                                 | Manual override                                             |
| X             | X                                | TRUE     | FALSE            | 0.0                                           | Forced override 0.0%                                        |
| X             | X                                | TRUE     | TRUE             | 100.0                                         | Forced override 100.0%                                      |

Legend: X = any

#### Position monitoring

Position monitoring can be enabled (**xControl** = TRUE) or disabled (**xControl** = FALSE).\
When position monitoring is enabled, the magnitude of the difference between the actuating signal after manual override *rHA* and the position feedback from the control valve *rU* is determined and compared with the limit value **rControlDiff** compared.\
If this difference continuously exceeds the limit value during a reporting delay **udiControlTime** the limit value, an alarm signal is generated if, at the same time, the feedback - automatic mode *eAO* signals automatic mode (*eAO* = HVACTYPES.eManNum.Auto).\
This alarm signal is transferred to the output *xAlarmPos* transferred (*xAlarmPos* = TRUE).\
The alarm signal is deactivated again (*xAlarmPos* = FALSE) as soon as the difference falls below the limit value again for the first time.

#### Position feedback from the control valve *rU*

The position feedback from the control valve *rU* may be replaced by the setpoint signal from control *rY* if no position feedback is available.

#### Anti-blocking protection module

The anti-seizing protection module is implemented by the numerical anti-seizing protection module with adjustable duration (FB: AbsA).\
The duration *udiAbsTime*, the time **todAbsStartTime** and the weekday **eAbsDay** can be adjusted.\
The minimum run time for blocking the anti-seizing operation is 30 s.\
The timestamp (date / time) of the last anti-seizing operation *dtAbsLastOn* is available.

#### Collective fault *xAlarm*

The collective fault *xAlarm* is activated (= TRUE) if *xAlarmPos* or the input *xAlarmIn* is active.\
In all other cases the collective fault is *xAlarm* is not activated (= FALSE).

#### Collective automatic operation message *xAuto*

The collective automatic operation message *xAuto* is activated (= TRUE) if the input *eAO* contains the value HVACTYPES.eManNum.Auto and the setpoint / parameter **eManModeN** contains the value eMANNUM.Auto.\
In all other cases, the collective message automatic mode *xAuto* is not activated (= FALSE).

#### Forced override *xForce*

The forced override acts directly on the output *rHA*. With the parameter **xForceOption** it is determined which state the output *rHA* assumes when TRUE is at the input *xForce* takes.\
\
With **xForceOption** = FALSE\
If the input *xForce* is TRUE, then the output *rHA* is set to 0.\
\
For **xForceOption** = TRUE\
If the input *xForce* is TRUE, then the output *rHA* set to 100.

### CODESYS

InOut:

| Scope       | Name              | Type    | Initial           |
| ----------- | ----------------- | ------- | ----------------- |
| Input       | `rY`              | `REAL`  |                   |
| Input       | `xForce`          | `BOOL`  | FALSE             |
| Input       | `xAlarmIn`        | `BOOL`  | FALSE             |
| Input       | `rU`              | `REAL`  | 0                 |
| Input       | `eAO`             | eManNum | eManNum.Auto      |
| Input       | `rPoti`           | `REAL`  |                   |
| Output      | `rHA`             | `REAL`  |                   |
| Output      | `rAA`             | `REAL`  |                   |
| Output      | `xAlarmPos`       | `BOOL`  |                   |
| Output      | `dtAbsLastOn`     | `DT`    |                   |
| Output      | `xAlarm`          | `BOOL`  |                   |
| Output      | `xAuto`           | `BOOL`  |                   |
| Input Const | `udiControlTime`  | `UDINT` | 200               |
| Input Const | `rControlDiff`    | `REAL`  | 7                 |
| Input Const | `xControl`        | `BOOL`  | TRUE              |
| Input Const | `xForceOption`    | `BOOL`  | TRUE              |
| Input Const | `rAbsMaxLimit`    | `REAL`  | 100               |
| Input Const | `rAbsMinLimit`    | `REAL`  | 0                 |
| Input Const | `udiAbsTime`      | `UDINT` | 180               |
| Input Const | `todAbsStartTime` | `TOD`   | TIME\_OF\_DAY#8:0 |
| Input Const | `eAbsDay`         | eDoW    | eDow\.Monday      |
| Input Const | `rManValue`       | `REAL`  | 0                 |
| Input Const | `eManModeN`       | eMANNUM | eMANNUM.Auto      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-library/functionblocks/components/valveanalog.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
