Explainer
Why an InTouch viewer needs a heartbeat to alarm on a stopped server
Short answer
A PC that is switched off cannot send its own alarm, so the viewer on server 1 must detect the loss from outside server 2: watch a value that changes while server 2 runs and alarm when no valid change arrives within a timeout longer than the normal update interval. The watchdog lives on server 1 or in a PLC that stays up; its timeout comes from the heartbeat interval plus the update and communication delays.

On this page
- Why can't server 2 send its own alarm when it stops?
- What does the viewer show today when server 2 stops?
- Which server 2 function must the alarm monitor?
- What makes a good heartbeat signal?
- Where should the watchdog logic run?
- How long should the heartbeat timeout be?
- Why does the watchdog fail but no alarm appears on screen?
- What is the decision for your two-server case?
- Questions asked
When server 2 is switched off, the InTouch viewer on server 1 shows no alarm unless something outside server 2 evaluates the loss. A stopped computer cannot publish its own shutdown message, so the viewer (or a PLC that stays up) must watch a heartbeat that changes while server 2 runs, and raise an alarm when no valid change arrives within a timeout longer than the normal update interval.
Why can't server 2 send its own alarm when it stops? #
Because the shutdown removes both the monitored application and its ability to publish anything, so detection must happen on a computer or controller that keeps running. Unexpected power loss, a crashed runtime or a pulled cable all end with server 2 silent, and silence produces no event on the viewer by itself. Windows event forwarding only helps while the computer and the collection path still function; the case you asked about is exactly the one where they do not. The classic answer on the controller side is a "mot de vie", a liveness word, and the same principle applies here: the receiver judges absence of change, not a message about the failure. The status must therefore be evaluated on server 1 or in a PLC that remains available, and its loss labelled as what it proves: the heartbeat or the communication path stopped, not a diagnosed cause.
What does the viewer show today when server 2 stops? #
A frozen number on screen is the most misleading result, because the viewer keeps displaying its last received value after the source disappears. Before designing the alarm, run a controlled interruption, at a moment when losing the connection cannot disturb operation, and compare what the viewer shows with server 2 available and with it off. Four outcomes are possible:
| What the viewer shows | What it means | Next check |
|---|---|---|
| A value stays visible but stops changing | The last received value, not fresh data | Its quality and a changing heartbeat |
| Several tags from one source go invalid | A shared data path or source service is gone | The connection and the source service |
| Only one screen object fails | That object's binding or tag is wrong | The object's tag reference |
| Everything stays healthy | Server 2 is not in the active data path | Find a separate status source for server 2 |
Which server 2 function must the alarm monitor? #
The alarm should monitor the function on server 2 whose loss actually matters, traced from the screen object back to its producer. Trace one indication backward: the object's tag reference, the tag's data source and remote destination, the driver or communication-service diagnostics, and finally the runtime process on server 2 that produces or transfers the value. If server 2 is only a development station, shutting it down may not affect a single process tag on the viewer; you then need an explicit health signal from it rather than expecting unrelated PLC values to fail. If it hosts a runtime data service, its connection status can report the lost communication path, which the troubleshooting documentation covers: the NetDDE Helper service must be running when distributed alarming or history is used, and a stopped service shows up there before anything reaches the viewer. Prefer an application heartbeat produced by the required runtime on server 2, since a connection status only proves the connection is down and a network ping only proves the host answers or not.
What makes a good heartbeat signal? #
A heartbeat is a value that changes repeatedly while the monitored function runs, and the receiver checks for change rather than treating a permanently true bit as proof of health. A counter and an alternating bit both work; the counter is easier to inspect because successive readings show progression, while an alternating bit can read the same state twice when the receiver samples at an unlucky interval. Choose the producer according to what the loss must indicate:
| Signal | Produced by | Its loss indicates |
|---|---|---|
| Application heartbeat | The runtime application on server 2 | The application or its delivery path stopped |
| Host-monitoring status | A monitoring function outside server 2 | The reachability or health check failed |
| PLC heartbeat | The PLC | The controller path stopped updating, not that server 2 is down |
| Connection status | The viewer's communication subsystem | The connection is unavailable; the remote app may still run |
Where should the watchdog logic run? #
Run it on server 1 when the indication is for that viewer alone, or in the PLC when controller logic or several stations also need the status, provided the PLC actually receives a heartbeat that originates on or passes through server 2. A PLC counter merely passed through server 2 tests that transfer path and does detect its shutdown; a PLC heartbeat the viewer reads directly bypasses server 2 and cannot. The watchdog logic itself is short:
- Read the heartbeat's current value and its quality.
- When a valid value differs from the previous valid value, save it and restart the freshness timer.
- When quality goes invalid, mark the status unavailable; do not treat the retained value as fresh.
- When no valid change arrives before the timeout, activate the loss-of-heartbeat condition.
- On recovery, require changing valid updates before returning to healthy.
- During startup, show an initializing state until changing valid data arrives; the first readable value alone proves nothing.
How long should the heartbeat timeout be? #
The timeout must exceed the worst normal gap between changes, so compute it from the generation interval and the delays stacked on top of it. As a worked example with illustrative values: server 2 increments its counter every 5 s, the viewer's scan updates the tag every 1 s, and the communication path adds up to 2 s, so the worst normal gap is 5 s + 1 s + 2 s = 8 s, and a timeout of 15 s, roughly twice that, alarms within about 15 s to 20 s of a shutdown while never alarming in normal operation. That is the same arithmetic the plant SCADA documentation names through its [Alarm]HeartbeatTimeout parameter, which defines how long a server waits before closing a link that has received no heartbeat poll. If your site needs faster detection, shorten the generation interval first; halving it to 2.5 s moves the worst gap to 2.5 s + 1 s + 2 s = 5.5 s and supports a timeout of about 10 s. When a site builds new edge or gateway boxes to host this kind of watchdog, an industrial mini PC fits the cabinet role.
Why does the watchdog fail but no alarm appears on screen? #
When the watchdog reports failure and the operator still sees nothing, the fault is downstream of the health condition, in the alarm configuration or the screen binding, not in the heartbeat transport. Check five settings in order: the heartbeat's source reference resolves to the intended server 2 signal and not an unrelated local or PLC value; the watchdog keeps executing while server 2 is unavailable; the alarm condition has the right polarity so it alarms on loss of health rather than on normal operation; the alarm display's selection and filters include that alarm source; and recovery and acknowledgement behave distinctly, so restored communication does not masquerade as an operator acknowledgement. Read the computed health condition independently of the alarm display to split the two halves of the chain. If you also run distributed alarming between the two machines, the duplicate-alarm behaviour on TSE described in Stop duplicate InTouch alarms in Historian on TSE is a different problem: it concerns alarms that arrive twice, not alarms that never arrive.
What is the decision for your two-server case? #
Server 1 is the viewer and server 2 the machine that gets switched off, so commit to this design: an application heartbeat counter produced by the runtime on server 2, read by server 1, a watchdog on server 1 with the timeout computed as above, and an alarm labelled as loss of server 2 heartbeat that shows an initializing state at startup and clears only on changing valid values. Add a PLC watchdog only if controller logic must also react, and then route the heartbeat through server 2 so the PLC tests the right path. If you want server 1's own health covered too, the InTouch stops logging after WindowMaker edit article covers a different failure, a broken logging path, but the same rule applies: prove freshness by change, never by a value that merely sits on screen.
Questions asked
Can I use a PLC heartbeat to detect that server 2 is off?
Only if server 2 sits in the heartbeat's path. A counter generated in the PLC and written to the viewer through server 2 proves that transfer path; a PLC value the viewer reads directly bypasses server 2 and stays fresh when it is off.
Should the alarm use an alternating bit instead of a counter?
An alternating bit works, but a counter is easier to inspect because successive readings show progression. With a bit, a receiver that samples at an unlucky interval can see the same state twice and must not treat that alone as a loss; the timeout, not a single repeated reading, decides.
Why does a ping or reachability check not replace the heartbeat?
A reachable PC can still have a stopped runtime application, and a failed network path can make a healthy server appear unreachable. Use reachability as a supplement, and label the alarm as loss of heartbeat or communication unless other diagnostics name the cause.
What quality should the watchdog require before timing out?
Only valid values restart the freshness timer. When quality goes invalid, mark the status unavailable instead of accepting the last value as fresh, and on recovery require changing valid updates before returning to healthy.


