> 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/monitoring/position3p.md).

# Position3P

## `Position3P` (FB)

FUNCTION\_BLOCK Position3P

### Short description

> Calculation of the current position of a 3-point actuator\
> In addition, a reference position (limit switch) of the actuator can be detected.\
> Typical application: position determination on a 3-point valve actuator

### Representation

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

### Interfaces

#### Inputs

| Name        | Data type | Value range | Initial value | Function                                                          |
| ----------- | --------- | ----------- | ------------- | ----------------------------------------------------------------- |
| *xOutOpen*  | BOOL      |             |               | Input - Enable - Open                                             |
| *xOutClose* | BOOL      |             |               | Input - Enable - Closing                                          |
| *xRefPos*   | BOOL      |             |               | Digital input for detecting the reference position (limit switch) |

#### Outputs

| Name   | Data type | Value range                    | Initial value | Function                             |
| ------ | --------- | ------------------------------ | ------------- | ------------------------------------ |
| *rPos* | REAL      | **rMinLimit** to **rMaxLimit** |               | Display of the current position in % |

#### Setpoints / Parameters

| Name             | Data type | Value range | Initial value | Function                           |
| ---------------- | --------- | ----------- | ------------- | ---------------------------------- |
| **iRefPosition** | INT       | 0 - 100     | 0%            | Reference position of the actuator |
| **rMinLimit**    | REAL      |             | 0.0           | Limit value - Minimum position     |
| **rMaxLimit**    | REAL      |             | 100.0         | Limit value - Maximum position     |
| **tDuration**    | TIME      |             | T#120s        | Actuator runtime                   |

### Functional description

#### General

This function block is used to calculate the current position of a 3-point actuator that does not have position feedback.\
The calculation is based on the duration of the signals at the inputs Input - Enable - Open *xOutOpen* and Input - Enable - Closing *xOutClose*.\
Every rising edge at the digital input *xRefPos* (i.e. the actuator is currently in its reference position) causes a redefinition of the analog output signal *rPos* to the setpoint / parameter **iRefPosition**.

#### Reference position

The digital input *xRefPos* allows readjustment of the position display *rPos* to a predefined value **iRefPosition** (0% = rest position - 100% = maximum position).\
Every rising edge at the digital input triggers a readjustment.

#### Position display *rPos*

It is used to display the current position of the 3-point actuator in the range **rMinLimit** to **rMaxLimit** and is calculated internally.\
Signals at the input *xOutOpen* increase the value of the position display, signals at the input *xOutClose* reduce the value of the position display.

{% hint style="info" %}
**Restrictions / Notes**

The 3-point actuator must move linearly, i.e. perform the same position changes in equal time intervals.\
A position change via a possibly existing manual override - hardware is not recorded.\
To avoid deviations between the calculated and actual position, it is recommended to regularly trigger readjustment of the position display.
{% endhint %}

### CODESYS

InOut:

| Scope       | Name           | Type   | Initial      |
| ----------- | -------------- | ------ | ------------ |
| Input       | `xOutOpen`     | `BOOL` |              |
| Input       | `xOutClose`    | `BOOL` |              |
| Input       | `xRefPos`      | `BOOL` |              |
| Input Const | `iRefPosition` | `INT`  | 0            |
| Input Const | `rMinLimit`    | `REAL` | 0.0          |
| Input Const | `rMaxLimit`    | `REAL` | 100.0        |
| Input Const | `tDuration`    | `TIME` | TIME#2m0s0ms |
| Output      | `rPos`         | `REAL` |              |


---

# 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/monitoring/position3p.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.
