# XPulseR

## `XPulseR` (FB)

FUNCTION\_BLOCK XPulseR

### Short description

> Generation of a single pulse with adjustable duration and reset capability.

### Representation

<figure><img src="/files/832b8857f9787ccc4a26552997fcaf0f6de11070" alt=""><figcaption></figcaption></figure>

### Interfaces

#### Inputs

| Name     | Data type | Value range | Initial value | Function                          |
| -------- | --------- | ----------- | ------------- | --------------------------------- |
| *xIN*    | BOOL      |             |               | Binary input (FALSE > TRUE)       |
| *tPT*    | TIME      |             | T#1s          | Duration of the output pulse in s |
| *xReset* | BOOL      |             |               | Binary reset input (FALSE > TRUE) |

#### Outputs

| Name  | Data type | Value range | Initial value | Function                                   |
| ----- | --------- | ----------- | ------------- | ------------------------------------------ |
| *xQ*  | BOOL      |             |               | Pulse output (FALSE = Off, TRUE = On)      |
| *tET* | TIME      | 0 … *tPT*   |               | Current duration of the pulse at *xQ* in s |

#### Setpoints / parameters

| Name      | Data type | Value range | Initial value | Function                         |
| --------- | --------- | ----------- | ------------- | -------------------------------- |
| **xTest** | BOOL      |             | FALSE         | Binary test input (FALSE > TRUE) |

### Function description

#### General

At the pulse output *xQ* is after each rising edge (FALSE > TRUE) at the binary input *xIN* and/or at the setpoint / parameter **xTest** a pulse with a duration *tPT* generated (precondition: *xReset* = FALSE).\
\
Each rising edge (FALSE > TRUE) at the reset input *xReset* resets the pulse output *xQ* immediately (= FALSE).\
\
The edge detection (FALSE > TRUE) on the inputs *xIN* or **xTest** has a higher priority compared to the edge detection on the input *xReset* (FALSE > TRUE).\
This results in the fact that despite simultaneous edge detection a pulse with a duration *tPT* is generated at the output *xQ* .\
The setpoint / parameter **xTest** is cyclically deactivated (= FALSE).

<figure><img src="/files/84aeadf8446fd1fb64c9b0af0859d210f01678c4" alt=""><figcaption></figcaption></figure>

### CODESYS

InOut:

| Scope       | Name     | Type   | Initial    |
| ----------- | -------- | ------ | ---------- |
| Input       | `xIN`    | `BOOL` |            |
| Input       | `tPT`    | `TIME` | TIME#1s0ms |
| Input       | `xReset` | `BOOL` |            |
| 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/en/hvac-library/functionblocks/time/xpulser.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.
