# StartDelay

## `StartDelay` (FB)

FUNCTION\_BLOCK StartDelay

### Short description

> Generation of signals after each CPU restart.\
> Usage: Delayed enabling of actions after the CPU restart.

### Representation

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

### Interfaces

#### Outputs

| Name   | Data type | Value range | Initial value | Function       |
| ------ | --------- | ----------- | ------------- | -------------- |
| *xQ1*  | BOOL      |             |               | Output 1       |
| *xQ1p* | BOOL      |             |               | Pulse output 1 |
| *xQ2*  | BOOL      |             |               | Output 2       |
| *xQ2p* | BOOL      |             |               | Pulse output 2 |

#### Setpoints / parameters

| Name           | Data type | Value range | Initial value | Function                        |
| -------------- | --------- | ----------- | ------------- | ------------------------------- |
| **TimeQ2Puls** | TIME      |             | T#1s          | Pulse duration - Pulse output 2 |
| **TimeQ2**     | TIME      |             | T#20s         | Time delay - Output 2           |
| **TimeQ1Puls** | TIME      |             | T#1s          | Pulse duration - Pulse output 1 |
| **TimeQ1**     | TIME      |             | T#5s          | Time delay - Output 1           |
| **xTest**      | BOOL      |             | FALSE         | Simulation of the CPU restart   |

### Function description

#### General

This function block is used to generate signals after each CPU restart.\
The CPU restart can be triggered via the simulation input **xTest** (= TRUE) independently of an actual CPU restart.\
\
The output *xQ1* changes after each CPU restart with a time delay **TimeQ1** from the FALSE state permanently into the TRUE state.\
At pulse output 1 *xQ1p* a single pulse with the pulse length **TimeQ1Puls** is generated.\
\
The output *xQ2* changes after each CPU restart with a time delay **TimeQ2** from the FALSE state permanently into the TRUE state.\
At pulse output 2 *xQ2p* a single pulse with the pulse length **TimeQ2Puls** is generated.

<figure><img src="/files/8a0c573d5035ca315da7a1c067c8dc08585a0d11" alt=""><figcaption></figcaption></figure>

### CODESYS

InOut:

| Scope       | Name         | Type   | Initial     |
| ----------- | ------------ | ------ | ----------- |
| Input Const | `TimeQ2Puls` | `TIME` | TIME#1s0ms  |
| Input Const | `TimeQ2`     | `TIME` | TIME#20s0ms |
| Input Const | `TimeQ1Puls` | `TIME` | TIME#1s0ms  |
| Input Const | `TimeQ1`     | `TIME` | TIME#5s0ms  |
| Input Const | `xTest`      | `BOOL` | FALSE       |
| Output      | `xQ1`        | `BOOL` |             |
| Output      | `xQ1p`       | `BOOL` |             |
| Output      | `xQ2`        | `BOOL` |             |
| Output      | `xQ2p`       | `BOOL` |             |


---

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