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

# Position3P

## `Position3P` (FB)

FUNCTION\_BLOCK Position3P

### Kurzbeschreibung

> Berechnung der aktuellen Position eines 3-Punkt-Antrieb\
> Zusätzlich kann eine Referenzposition (Endschalter) des Antriebs erfasst werden.\
> Typische Anwendung: Positionsbestimmung an einem 3-Punkt-Ventilantrieb

### Darstellung

<figure><img src="/files/iSrw9LVe2QcMTStUX09L" alt=""><figcaption></figcaption></figure>

### Schnittstellen

#### Eingänge

| Name        | Datentyp | Wertebereich | Initialwert | Funktion                                                        |
| ----------- | -------- | ------------ | ----------- | --------------------------------------------------------------- |
| *xOutOpen*  | BOOL     |              |             | Eingang - Freigabe - Öffnung                                    |
| *xOutClose* | BOOL     |              |             | Eingang - Freigabe - Schliessung                                |
| *xRefPos*   | BOOL     |              |             | Digitaleingang zur Erfassung der Referenzposition (Endschalter) |

#### Ausgänge

| Name   | Datentyp | Wertebereich                    | Initialwert | Funktion                            |
| ------ | -------- | ------------------------------- | ----------- | ----------------------------------- |
| *rPos* | REAL     | **rMinLimit** bis **rMaxLimit** |             | Anzeige der aktuellen Position in % |

#### Sollwerte / Parameter

| Name             | Datentyp | Wertebereich | Initialwert | Funktion                      |
| ---------------- | -------- | ------------ | ----------- | ----------------------------- |
| **iRefPosition** | INT      | 0 - 100      | 0%          | Referenzposition des Antriebs |
| **rMinLimit**    | REAL     |              | 0.0         | Grenzwert - Minimale Position |
| **rMaxLimit**    | REAL     |              | 100.0       | Grenzwert - Maximale Position |
| **tDuration**    | TIME     |              | T#120s      | Laufzeit des Antriebs         |

### Funktionsbeschreibung

#### Allgemeines

Dieser Funktionsbaustein dient zur Berechnung der aktuellen Position eines 3-Punkt-Antriebs, der keine Positionsrückmeldung besitzt.\
Die Berechnung erfolgt aufgrund der Zeitdauer der Signale an den Eingängen Eingang - Freigabe - Öffnung *xOutOpen* und Eingang - Freigabe - Schliessung *xOutClose*.\
Jede ansteigende Flanke am Digitaleingang *xRefPos* (d.h. der Antrieb befindet sich aktuell in seiner Referenzposition) bewirkt eine Neufestlegung des analogen Ausgangssignales *rPos* auf den Sollwert / Parameter **iRefPosition**.

#### Referenzposition

Der Digitaleingang *xRefPos* erlaubt eine Neujustierung der Positionsanzeige *rPos* auf einen vordefinierten Wert **iRefPosition** (0% = Ruhelage - 100% = Maximalposition).\
Jede ansteigende Flanke am Digitaleingang löst eine Neujustierung aus.

#### Positionsanzeige *rPos*

Sie dient zur Anzeige der aktuellen Position des 3-Punkt-Antriebes im Bereich **rMinLimit** bis **rMaxLimit** und wird intern berechnet.\
Signale am Eingang *xOutOpen* erhöhen den Wert der Positionsanzeige, Signale am Eingang *xOutClose* reduzieren den Wert der Positionsanzeige.

{% hint style="info" %}
**Einschränkungen / Hinweise**

Der 3-Punkt-Antrieb muß sich linear bewegen, d.h. in gleichen Zeitabschnittten die gleichen Positionsänderungen ausführen.\
Eine Positionsänderung über eine eventuell vorhandene Handübersteuerung - Hardware wird nicht registriert.\
Zur Vermeidung von Abweichungen zwischen der errechneten und der tatsächlichen Position wird die regelmäßige Auslösung der Neujustierung der Positionsanzeige empfohlen.
{% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/hvac-library/functionblocks/monitoring/position3p.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
