# PulseR

## `PulseR` (FB)

FUNCTION\_BLOCK PulseR

### Short description

> Edge-triggered pulse generation with adjustable duration and reset capability.

### Representation

<figure><img src="/files/5723ef81426fc647472070be9af8c920a22ec0b3" 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* generates (conditions: *xReset* = FALSE and no falling edge at the input *xIN*).\
\
Every rising edge (FALSE > TRUE) at the reset input *xReset* resets the pulse output *xQ* immediately resets to FALSE.\
Every falling edge (TRUE > FALSE) at the binary input *xIN* resets the pulse output *xQ* immediately (= FALSE).\
\
The edge detection (FALSE > TRUE) on the inputs *xIN* or **xTest** has higher priority compared to the edge detection at the inputs *xReset* (FALSE > TRUE) respectively *xIN* (TRUE > FALSE).\
This results in, despite simultaneous edge detection, a pulse with a duration *tPT* is generated at the output *xQ* being generated.\
\
The setpoint/parameter **xTest** is cyclically deactivated (= FALSE).

<figure><img src="/files/90baffa0a365e163c321973555aac98357330080" alt=""><figcaption></figcaption></figure>

#### time output *tET*

When the pulse output is active *xQ* (= TRUE) the current duration of the pulse is shown at *xQ* (0.0 - *tPT*).\
When the pulse output is inactive *xQ* (= FALSE) the value T#0s is always displayed.

### 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/pulser.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.
