← All exercises

Watchdog Alarm

medium

Raises an alarm if a heartbeat rising edge is not detected within the timeout period.

What it teaches

Timer reset by an external pulse (the heartbeat). If the timer reaches preset before the next pulse, the watchdog fires. Teaches retriggerable-timer semantics and the canonical "missing-pulse alarm" pattern used in comms and equipment health monitoring.

Inputs and outputs

TagTypeDefaultDescription
In_HeartbeatBOOLHeartbeat signal to monitor
Cfg_TimeoutDINT1000Watchdog timeout in milliseconds
Sts_AlarmBOOL1 when the heartbeat is lost, 0 when active

Required behavior