> 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/setpoint/curve_20xy_real_real.md).

# Curve\_20XY\_Real\_Real

## `Curve_20XY_Real_Real` (FB)

FUNCTION\_BLOCK Curve\_20XY\_Real\_Real

### Kurzbeschreibung

> Eingabe von 20 Wertepaaren (Stützstellen mit jeweils einem X- und Y-Wert)\
> Randbedingungen:
>
> 1. Die X-Werte müssen fortlaufend entweder streng ansteigend oder streng abfallend sein
> 2. Jeder X-Wert darf nur einmal vorhanden sein
> 3. Zwei benachbarte Stützstellen werden jeweils durch eine Gerade verbunden\
>    \
>    Typische Anwendung: Berechnung der Leistung einer Wärmepumpe in Abhängigkeit von der Aussentemperatur

### Darstellung

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

### Schnittstellen

#### Eingänge

| Name                   | Datentyp | Wertebereich | Initialwert | Funktion                             |
| ---------------------- | -------- | ------------ | ----------- | ------------------------------------ |
| <p><br>rInputValue</p> | REAL     |              | 0           | Aktueller Wert der Eingangsvariablen |

#### Ausgänge

| Name                     | Datentyp                        | Wertebereich | Initialwert                               | Funktion                                     |
| ------------------------ | ------------------------------- | ------------ | ----------------------------------------- | -------------------------------------------- |
| <p><br>rOutputValue</p>  | REAL                            |              | 0.0                                       | Aktueller Wert der Ausgangsvariablen         |
| <p><br>eOrderXValues</p> | eCurve\_20XY\_Real\_Real\_Order |              | eCurve\_20XY\_Real\_Real\_Order.Invalid   | Ordnung der X-Werte (ansteigend / abfallend) |
| <p><br>eError</p>        | eCurve\_20XY\_Real\_Real\_Error |              | eCurve\_20XY\_Real\_Real\_Error.No\_Error | Fehlerursache                                |
| <p><br>xError</p>        | BOOL                            |              | FALSE                                     | Fehlerzustand (TRUE = Fehler)                |

#### Sollwerte / Parameter

| Name                           | Datentyp | Wertebereich | Initialwert | Funktion                                       |
| ------------------------------ | -------- | ------------ | ----------- | ---------------------------------------------- |
| <p><br>rOutputValue\_Subst</p> | REAL     |              | -1000       | Ersatzwert der Ausgangsvariablen im Fehlerfall |
| <p><br>rOutputValue\_Min</p>   | REAL     |              | 0           | Absoluter minimaler Wert der Ausgangsvariablen |
| <p><br>rOutputValue\_Max</p>   | REAL     |              | 100         | Absoluter maximaler Wert der Ausgangsvariablen |
| <p><br>rSP1\_X</p>             | REAL     |              | 1           | Stützstelle 1 - X-Wert                         |
| <p><br>rSP1\_Y</p>             | REAL     |              | 2           | Stützstelle 1 - Y-Wert                         |
| <p><br>rSP2\_X</p>             | REAL     |              | 2           | Stützstelle 2 - X-Wert                         |
| <p><br>rSP2\_Y</p>             | REAL     |              | 4           | Stützstelle 2 - Y-Wert                         |
| <p><br>rSP3\_X</p>             | REAL     |              | 3           | Stützstelle 3 - X-Wert                         |
| <p><br>rSP3\_Y</p>             | REAL     |              | 6           | Stützstelle 3 - Y-Wert                         |
| <p><br>rSP4\_X</p>             | REAL     |              | 4           | Stützstelle 4 - X-Wert                         |
| <p><br>rSP4\_Y</p>             | REAL     |              | 8           | Stützstelle 4 - Y-Wert                         |
| <p><br>rSP5\_X</p>             | REAL     |              | 5           | Stützstelle 5 - X-Wert                         |
| <p><br>rSP5\_Y</p>             | REAL     |              | 10          | Stützstelle 5 - Y-Wert                         |
| <p><br>rSP6\_X</p>             | REAL     |              | 6           | Stützstelle 6 - X-Wert                         |
| <p><br>rSP6\_Y</p>             | REAL     |              | 12          | Stützstelle 6 - Y-Wert                         |
| <p><br>rSP7\_X</p>             | REAL     |              | 7           | Stützstelle 7 - X-Wert                         |
| <p><br>rSP7\_Y</p>             | REAL     |              | 14          | Stützstelle 7 - Y-Wert                         |
| <p><br>rSP8\_X</p>             | REAL     |              | 8           | Stützstelle 8 - X-Wert                         |
| <p><br>rSP8\_Y</p>             | REAL     |              | 16          | Stützstelle 8 - Y-Wert                         |
| <p><br>rSP9\_X</p>             | REAL     |              | 9           | Stützstelle 9 - X-Wert                         |
| <p><br>rSP9\_Y</p>             | REAL     |              | 18          | Stützstelle 9 - Y-Wert                         |
| <p><br>rSP10\_X</p>            | REAL     |              | 10          | Stützstelle 10 - X-Wert                        |
| <p><br>rSP10\_Y</p>            | REAL     |              | 20          | Stützstelle 10 - Y-Wert                        |
| <p><br>rSP11\_X</p>            | REAL     |              | 11          | Stützstelle 11 - X-Wert                        |
| <p><br>rSP11\_Y</p>            | REAL     |              | 22          | Stützstelle 11 - Y-Wert                        |
| <p><br>rSP12\_X</p>            | REAL     |              | 12          | Stützstelle 12 - X-Wert                        |
| <p><br>rSP12\_Y</p>            | REAL     |              | 24          | Stützstelle 12 - Y-Wert                        |
| <p><br>rSP13\_X</p>            | REAL     |              | 13          | Stützstelle 13 - X-Wert                        |
| <p><br>rSP13\_Y</p>            | REAL     |              | 26          | Stützstelle 13 - Y-Wert                        |
| <p><br>rSP14\_X</p>            | REAL     |              | 14          | Stützstelle 14 - X-Wert                        |
| <p><br>rSP14\_Y</p>            | REAL     |              | 28          | Stützstelle 14 - Y-Wert                        |
| <p><br>rSP15\_X</p>            | REAL     |              | 15          | Stützstelle 15 - X-Wert                        |
| <p><br>rSP15\_Y</p>            | REAL     |              | 30          | Stützstelle 15 - Y-Wert                        |
| <p><br>rSP16\_X</p>            | REAL     |              | 16          | Stützstelle 16 - X-Wert                        |
| <p><br>rSP16\_Y</p>            | REAL     |              | 32          | Stützstelle 16 - Y-Wert                        |
| <p><br>rSP17\_X</p>            | REAL     |              | 17          | Stützstelle 17 - X-Wert                        |
| <p><br>rSP17\_Y</p>            | REAL     |              | 34          | Stützstelle 17 - Y-Wert                        |
| <p><br>rSP18\_X</p>            | REAL     |              | 18          | Stützstelle 18 - X-Wert                        |
| <p><br>rSP18\_Y</p>            | REAL     |              | 36          | Stützstelle 18 - Y-Wert                        |
| <p><br>rSP19\_X</p>            | REAL     |              | 19          | Stützstelle 19 - X-Wert                        |
| <p><br>rSP19\_Y</p>            | REAL     |              | 38          | Stützstelle 19 - Y-Wert                        |
| <p><br>rSP20\_X</p>            | REAL     |              | 20          | Stützstelle 20 - X-Wert                        |
| <p><br>rSP20\_Y</p>            | REAL     |              | 40          | Stützstelle 20 - Y-Wert                        |

### Funktionsbeschreibung

\
Die Ausgangsvariable **rOutputValue** wird zyklisch anhand der Eingangsvariablen **rInputValue** und der mittels der 20 Stützstellen definierten Kennlinie berechnet, sofern kein Fehler vorliegt (xError = FALSE).

Sie wird durch die einstellbaren absoluten Minimal- (rOutputValue\_Min) und Maximalwerte (rOutputValue\_Max) begrenzt.\
Im Fehlerfall (xError = TRUE) wird an der Ausgangsvariablen ‘rOutputValue’ der fixe Ersatzwert **rOutputValue\_Subst** ausgegeben.\
\
Die X-Werte der 20 Stützstellen müssen folgenden Randbedingungen genügen:\
\
1\) Die X-Werte müssen fortlaufend entweder streng ansteigend oder streng abfallend sein\
2\) Jeder X-Wert darf nur einmal vorhanden sein\
3\) Zwei benachbarte Stützstellen werden jeweils durch eine Gerade verbunden\
\
Die Aktualisierung der Kennlinie erfolgt einmalig direkt nach der Initialisierung bzw. einmalig nach jeder Änderung der Stützstellen.\
\
Im Fehlerfall (gleiche X-Werte, X-Werte nicht streng ansteigend / abfallend) wird eine entsprechend Fehlerursache am Ausgang **eError** dargestellt.\
Gleichzeitig wird an der Ausgangsvariablen ‘rOutputValue’ der fixe Ersatzwert **rOutputValue\_Subst** ausgegeben.\
Der Ausgang **xError** ist aktiv (= TRUE), falls am Ausgang **eError** ein Fehler signalisiert wird.

### Darstellung einer Beispiel-Kennlinie

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

### CODESYS

InOut:

| Scope       | Name                 | Type                            | Initial                                   |
| ----------- | -------------------- | ------------------------------- | ----------------------------------------- |
| Input       | `rInputValue`        | `REAL`                          | 0                                         |
| Output      | `rOutputValue`       | `REAL`                          | 0                                         |
| Output      | `eOrderXValues`      | eCurve\_20XY\_Real\_Real\_Order | eCurve\_20XY\_Real\_Real\_Order.Invalid   |
| Output      | `eError`             | eCurve\_20XY\_Real\_Real\_Error | eCurve\_20XY\_Real\_Real\_Error.No\_Error |
| Output      | `xError`             | `BOOL`                          | FALSE                                     |
| Input Const | `rSP20_Y`            | `REAL`                          | 40                                        |
| Input Const | `rSP20_X`            | `REAL`                          | 20.0                                      |
| Input Const | `rSP19_Y`            | `REAL`                          | 38.0                                      |
| Input Const | `rSP19_X`            | `REAL`                          | 19.0                                      |
| Input Const | `rSP18_Y`            | `REAL`                          | 36.0                                      |
| Input Const | `rSP18_X`            | `REAL`                          | 18.0                                      |
| Input Const | `rSP17_Y`            | `REAL`                          | 34.0                                      |
| Input Const | `rSP17_X`            | `REAL`                          | 17.0                                      |
| Input Const | `rSP16_Y`            | `REAL`                          | 32.0                                      |
| Input Const | `rSP16_X`            | `REAL`                          | 16.0                                      |
| Input Const | `rSP15_Y`            | `REAL`                          | 30.0                                      |
| Input Const | `rSP15_X`            | `REAL`                          | 15.0                                      |
| Input Const | `rSP14_Y`            | `REAL`                          | 28.0                                      |
| Input Const | `rSP14_X`            | `REAL`                          | 14.0                                      |
| Input Const | `rSP13_Y`            | `REAL`                          | 26.0                                      |
| Input Const | `rSP13_X`            | `REAL`                          | 13.0                                      |
| Input Const | `rSP12_Y`            | `REAL`                          | 24.0                                      |
| Input Const | `rSP12_X`            | `REAL`                          | 12.0                                      |
| Input Const | `rSP11_Y`            | `REAL`                          | 22.0                                      |
| Input Const | `rSP11_X`            | `REAL`                          | 11.0                                      |
| Input Const | `rSP10_Y`            | `REAL`                          | 20.0                                      |
| Input Const | `rSP10_X`            | `REAL`                          | 10.0                                      |
| Input Const | `rSP9_Y`             | `REAL`                          | 18.0                                      |
| Input Const | `rSP9_X`             | `REAL`                          | 9.0                                       |
| Input Const | `rSP8_Y`             | `REAL`                          | 16.0                                      |
| Input Const | `rSP8_X`             | `REAL`                          | 8.0                                       |
| Input Const | `rSP7_Y`             | `REAL`                          | 14.0                                      |
| Input Const | `rSP7_X`             | `REAL`                          | 7.0                                       |
| Input Const | `rSP6_Y`             | `REAL`                          | 12.0                                      |
| Input Const | `rSP6_X`             | `REAL`                          | 6.0                                       |
| Input Const | `rSP5_Y`             | `REAL`                          | 10.0                                      |
| Input Const | `rSP5_X`             | `REAL`                          | 5.0                                       |
| Input Const | `rSP4_Y`             | `REAL`                          | 8.0                                       |
| Input Const | `rSP4_X`             | `REAL`                          | 4.0                                       |
| Input Const | `rSP3_Y`             | `REAL`                          | 6.0                                       |
| Input Const | `rSP3_X`             | `REAL`                          | 3.0                                       |
| Input Const | `rSP2_Y`             | `REAL`                          | 4.0                                       |
| Input Const | `rSP2_X`             | `REAL`                          | 2.0                                       |
| Input Const | `rSP1_Y`             | `REAL`                          | 2.0                                       |
| Input Const | `rSP1_X`             | `REAL`                          | 1.0                                       |
| Input Const | `rOutputValue_Max`   | `REAL`                          | 100.0                                     |
| Input Const | `rOutputValue_Min`   | `REAL`                          | 0.0                                       |
| Input Const | `rOutputValue_Subst` | `REAL`                          | -1000.0                                   |


---

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