> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/example-projects/alive-signal.md).

# Creating an Alive Signal

An alive signal, also called a heartbeat, repeatedly changes between `TRUE` and `FALSE` while a scenario is running. An external PLC or device can monitor those changes to confirm that the scenario is still alive.

## 1. Create the pulse

1. Add a [PWM (Pulse Width Modulation)](/function-blocks/blocks-reference/input-output/data-inputs/pwm-pulse-width-modulation.md) block.
2. Set **Time mode** to **Seconds**.
3. Set **Interval** to the complete cycle and **Up Duration** to the time the output remains `TRUE`.

For example, an interval of `0.3` seconds and an up duration of `0.1` seconds produces `TRUE` for 0.1 seconds and `FALSE` for 0.2 seconds, repeatedly.

## 2. Send the signal to the external device

Connect the PWM block's **Boolean** output to the **Data** or **Value** input of the communication writer used by the device. Connect the writer to its communication client or connection as usual.

* If the writer has an **Enable** input, connect a [Logic Input](/function-blocks/blocks-reference/input-output/data-inputs/logic-input.md) set to `TRUE`.
* For a TCP writer such as **TCPIPWrite**, set **Send Policy** to **Always** so both signal states are sent. The example below uses this configuration.
* For [Siemens S7 Write](/function-blocks/blocks-reference/input-output/communication/siemens-s7-write.md), connect **Siemens S7 Connect** to **S7 Client**, set **DB Data Type** to `Boolean`, and configure the required DB number, byte address, and bit position.
* For [Modbus Write](/function-blocks/blocks-reference/input-output/communication/modbus-write.md), connect **Modbus Connect** to **Modbus Client**, choose **Coil**, and set the target address.

<figure><img src="/files/dQXN56hcTmNJxuDgI9ML" alt="PWM Boolean output connected to the Data input of TCPIPWrite, with a TRUE Logic Input connected to Enable."><figcaption><p>Example heartbeat sent through TCPIPWrite</p></figcaption></figure>

## 3. Configure the receiver

The external device should monitor for a change of state, rather than the current value alone. With the example above, a timeout of about one second allows for normal scheduling and network jitter while still detecting a stopped scenario quickly.

* Use a dedicated PLC bit or tag; do not share it with process-control logic.
* Choose a slower pulse if the device, PLC scan time, or network cannot reliably observe short transitions.
* If the writer provides **Data on Stop**, set it to `FALSE` when the receiver needs a known final state.

The external device raises its timeout alarm when it no longer receives state changes. The signal stops when the scenario stops evaluating the PWM and communication blocks.

## 4. Test the signal

Before connecting to production equipment, use [Scope](/function-blocks/blocks-reference/input-output/outputs-exports/scope.md) to confirm the expected `TRUE`/`FALSE` cycle. Then verify at the receiver that it sees both states and raises an alarm after the configured timeout.
