# Offset

## `Offset` (FB)

FUNCTION\_BLOCK Offset

### Short description

> Addition of a correction value to a numeric input value\
> Typical application: calibration of a temperature sensor

### Representation

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

### Interfaces

#### Inputs

| Name       | Data type | Value range | Initial value | Function    |
| ---------- | --------- | ----------- | ------------- | ----------- |
| *rValueIN* | REAL      |             |               | Input value |

#### Outputs

| Name        | Data type | Value range | Initial value | Function     |
| ----------- | --------- | ----------- | ------------- | ------------ |
| *rValueOUT* | REAL      |             |               | Output value |

#### Setpoints / Parameters

| Name        | Data type | Value range | Initial value | Function         |
| ----------- | --------- | ----------- | ------------- | ---------------- |
| **rOffset** | REAL      |             |               | Correction value |

### Function description

#### Analog value output *rOut*

The output value *rValueOUT* is formed by adding the input value *rValueIN* with the correction value **rOffset** formed

### CODESYS

InOut:

| Scope       | Name        | Type   |
| ----------- | ----------- | ------ |
| Input       | `rValueIN`  | `REAL` |
| Output      | `rValueOUT` | `REAL` |
| Input Const | `rOffset`   | `REAL` |
