# MPulse

## `MPulse` (FB)

FUNCTION\_BLOCK MPulse

### Short description

> Edge-triggered pulse generation with adjustable minimum duration.

### Representation

<figure><img src="/files/6b1bfbe832754a52356e31b1ef3d004f3e92ad4d" alt=""><figcaption></figcaption></figure>

### Interfaces

#### Inputs

| Name  | Data type | Value range | Initial value | Function                             |
| ----- | --------- | ----------- | ------------- | ------------------------------------ |
| *xIN* | BOOL      |             |               | Binary input                         |
| *tPT* | TIME      |             | T#10s         | Minimum duration of the output pulse |

#### Outputs

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

### Function description

#### General

At the pulse output *xQ* after a rising edge at the binary input *xIN* a pulse with a minimum duration *tPT* is generated.

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

#### Time output *tET*

When the pulse output is active *xQ* the time difference between the minimum 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  | `tPT` | `TIME` | TIME#10s0ms |
| 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/mpulse.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.
