> 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/en/hvac-library/functionblocks/time/pulseshift.md).

# PulseShift

## `PulseShift` (FB)

FUNCTION\_BLOCK PulseShift

### Short description

> Edge-controlled, delayed pulse generation with adjustable pulse duration.

### Representation

<figure><img src="/files/2426fd6611420de0d5068de4260028385ca44e43" alt=""><figcaption></figcaption></figure>

### Interfaces

#### Inputs

| Name     | Data type | Value range | Initial value | Function                     |
| -------- | --------- | ----------- | ------------- | ---------------------------- |
| *xIN*    | BOOL      |             |               | Binary input                 |
| *tShift* | TIME      |             | T#1s          | Delay time                   |
| *tPT*    | TIME      |             | T#1s          | Duration of the output pulse |

#### Outputs

| Name  | Data type | Value range | Initial value | Function                                                                          |
| ----- | --------- | ----------- | ------------- | --------------------------------------------------------------------------------- |
| *xQ*  | BOOL      |             |               | Pulse output                                                                      |
| *tET* | TIME      |             |               | Time difference between the target duration and the duration of the pulse at *xQ* |

#### Setpoints / parameters

| Name      | Data type | Value range | Initial value | Function                        |
| --------- | --------- | ----------- | ------------- | ------------------------------- |
| **xTest** | BOOL      |             | FALSE         | Test input to trigger the pulse |

### Function description

#### General

At the pulse output *xQ* is generated after a positive edge at the binary input *xIN* and a subsequent delay time *tShift* a pulse with a duration *tPT* is generated.\
Alternatively, pulse generation without delay time can also be triggered by the setpoint / parameter **xTest** is triggered.

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

#### time output *tET*

When the pulse output is active *xQ* The time difference between the target duration *tPT* and the duration of the pulse at *xQ* is displayed.\
When the pulse output is inactive, *xQ* the value T#0s is always displayed.

### 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
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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-library/functionblocks/time/pulseshift.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
