> 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). Agents can also search and read this documentation through its [MCP server](https://support.powerio.com/hub/~gitbook/mcp).

# 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="https://879424349-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>

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