All exercises

Incrementing Watchdog

medium

Raises an alarm when an incrementing heartbeat value stops changing for the configured timeout.

What it teaches

Monitor a heartbeat counter instead of a pulsing bit. Save the last value, reset the watchdog whenever a different value arrives, and alarm when the value stays unchanged for the timeout. Any change proves fresh data, so skipped counts and signed rollover remain valid.

Inputs and outputs

TagTypeDefaultDescription
In_HeartbeatCountDINTHeartbeat value incremented by the monitored controller
Cfg_TimeoutDINT1000Maximum time without a new heartbeat value, in milliseconds
Sts_AlarmBOOL1 when the heartbeat value has stopped changing

Required behavior