# SetPointSlide

## `SetPointSlide` (FB)

FUNCTION\_BLOCK SetPointSlide

### Short description

> Generation of a setpoint temperature depending on the outside temperature\
> Principle: Linear shift\
> Typical application: Adjustment of a room setpoint temperature in summer operation (energy saving)

### Representation

<figure><img src="/files/9a6739aef5e9da1e00765de6a678ca1fbf9dd37f" alt=""><figcaption></figcaption></figure>

### Interfaces

#### Inputs

| Name       | Data type | Value range | Initial value | Function                    |
| ---------- | --------- | ----------- | ------------- | --------------------------- |
| *rOutTemp* | REAL      |             | 0             | Current outside temperature |

#### Outputs

| Name          | Data type | Value range | Initial value | Function                                              |
| ------------- | --------- | ----------- | ------------- | ----------------------------------------------------- |
| *rSetPoint*   | REAL      |             |               | Current setpoint temperature                          |
| *bOverThrust* | BOOL      |             |               | Indicator - shift (FALSE = not active, TRUE = active) |

#### Setpoints / parameters

| Name          | Data type | Value range               | Initial value | Function                                                                                       |
| ------------- | --------- | ------------------------- | ------------- | ---------------------------------------------------------------------------------------------- |
| **rDeadZone** | REAL      |                           | 2             | Dead zone between on- and off-point for the output *bOverThrust* at the beginning of the shift |
| **rMaxW**     | REAL      |                           | 25.0          | Maximum absolute setpoint temperature                                                          |
| **rW2**       | REAL      |                           | 25.0          | Setpoint temperature at outside-temperature point 2                                            |
| **rTo2**      | REAL      |                           | 40.0          | Outside temperature at outside-temperature point 2                                             |
| **rW1**       | REAL      |                           | 20.0          | Setpoint temperature at outside-temperature point 1                                            |
| **rTo1**      | REAL      |                           | 30.0          | Outside temperature at outside-temperature point 1                                             |
| **rManValue** | REAL      |                           | 0.0           | Manual override: manual value                                                                  |
| **eManModeN** | eMANNUM   | eMANNUM.Auto, eMANNUM.Man |               | Manual override: operating mode                                                                |

### Function description

#### General

This function block is used to generate a setpoint temperature *rSetPoint* depending on the current outside temperature *rOutTemp*.\
The mapping is created by a linear function defined by two points (outside-temperature point 2: **rTo2** and **rW2**, outside-temperature point 1: **rTo1** and **rW1**)\
The setpoint temperature is limited upwards by the absolute maximum value *rSetPoint* is limited upwards by the absolute maximum value **rMaxW** is limited downwards by the setpoint temperature at outside-temperature point 1 *rSetPoint* is limited downwards by the setpoint temperature at outside-temperature point 1 **rW1** is limited downwards by the setpoint temperature at outside-temperature point 1 *rSetPoint* can be fixed to the constant value by the operating mode **eManModeN** (**eManModeN** = eMANNUM.Man) to the fixed value **rManValue** is fixed.\
On every switch of the operating mode to manual operation (**eManModeN** = eMANNUM.Man) the manual value **rManValue** is replaced by the current setpoint temperature *rSetPoint* .\
If the outside temperature at outside-temperature point 1 approaches **rTo1** the outside temperature at outside-temperature point 2 **rTo2** to less than 0.5°C, the outside-temperature point 1 **rTo1** is automatically corrected to a difference of 0.5°C (to avoid too steep characteristic curves).\
The outside-temperature point 1 **rTo1** is therefore always numerically smaller than outside-temperature point 2 **rTo2**.\
\
A temperature difference of 6°C between the outside temperature and the setpoint temperature is most commonly used.

<figure><img src="/files/2607ee0493612a57dd5692ce135184c88819551c" alt=""><figcaption></figcaption></figure>

#### Indicator - shift *bOverThrust*

| Condition                               | *bOverThrust* | Notes                        |
| --------------------------------------- | ------------- | ---------------------------- |
| *rOutTemp* > **rTo1**                   | TRUE          | Setpoint shift is active     |
| *rOutTemp* < (**rTo1** - **rDeadZone**) | FALSE         | Setpoint shift is not active |

### CODESYS

InOut:

| Scope       | Name          | Type    | Initial      |
| ----------- | ------------- | ------- | ------------ |
| Input       | `rOutTemp`    | `REAL`  | 0            |
| Input Const | `rDeadZone`   | `REAL`  | 2            |
| Input Const | `rMaxW`       | `REAL`  | 25           |
| Input Const | `rW2`         | `REAL`  | 25           |
| Input Const | `rTo2`        | `REAL`  | 40           |
| Input Const | `rW1`         | `REAL`  | 20           |
| Input Const | `rTo1`        | `REAL`  | 30           |
| Input Const | `rManValue`   | `REAL`  | 0            |
| Input Const | `eManModeN`   | eManNum | eManNum.Auto |
| Output      | `rSetpoint`   | `REAL`  |              |
| Output      | `bOverthrust` | `BOOL`  |              |


---

# Agent Instructions: 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:

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-library/functionblocks/setpoint/setpointslide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
