# PulseShift

## `PulseShift` (FB)

FUNCTION\_BLOCK PulseShift

### Kurzbeschreibung

> Flankengesteuerte, verzögerte Impulserzeugung mit einstellbarer Impulsdauer.

### Darstellung

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

### Schnittstellen

#### Eingänge

| Name     | Datentyp | Wertebereich | Initialwert | Funktion                       |
| -------- | -------- | ------------ | ----------- | ------------------------------ |
| *xIN*    | BOOL     |              |             | Binärer Eingang                |
| *tShift* | TIME     |              | T#1s        | Verzögerungszeit               |
| *tPT*    | TIME     |              | T#1s        | Zeitdauer des Ausgangsimpulses |

#### Ausgänge

| Name  | Datentyp | Wertebereich | Initialwert | Funktion                                                                        |
| ----- | -------- | ------------ | ----------- | ------------------------------------------------------------------------------- |
| *xQ*  | BOOL     |              |             | Impulsausgang                                                                   |
| *tET* | TIME     |              |             | Zeitdifferenz zwischen der Sollzeitdauer und der Zeitdauer des Impulses an *xQ* |

#### Sollwerte / Parameter

| Name      | Datentyp | Wertebereich | Initialwert | Funktion                               |
| --------- | -------- | ------------ | ----------- | -------------------------------------- |
| **xTest** | BOOL     |              | FALSE       | Testeingang zur Auslösung des Impulses |

### Funktionsbeschreibung

#### Allgemeines

Am Impulsausgang *xQ* wird nach einer positiven Flanke am binären Eingang *xIN* und einer sich anschließenden Verzögerungszeit *tShift* ein Impuls mit einer Zeitdauer *tPT* erzeugt.\
Alternativ kann die Impulserzeugung ohne Verzögerungszeit auch durch den Sollwert / Parameter **xTest** ausgelöst werden.

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

#### Zeitausgang *tET*

Bei aktivem Impulsausgang *xQ* wird die Zeitdifferenz zwischen der Sollzeitdauer *tPT* und der Zeitdauer des Impulses an *xQ* angezeigt.\
Bei inaktivem Impulsausgang *xQ* wird stets der Wert T#0s angezeigt.

### CODESYS

InOut:

| Scope       | Name     | Type   | Initial    |
| ----------- | -------- | ------ | ---------- |
| Input       | `xIN`    | `BOOL` |            |
| Input       | `tShift` | `TIME` | TIME#1s0ms |
| Input       | `tPT`    | `TIME` | TIME#1s0ms |
| Input Const | `xTest`  | `BOOL` | FALSE      |
| Output      | `xQ`     | `BOOL` |            |
| Output      | `tET`    | `TIME` |            |


---

# 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/hvac-library/functionblocks/time/pulseshift.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.
