GBS Serial Watchdog User manual

Serial Watchdog
Documentation and User Manual
Version 1.1

Serial Watchdog
2
Exclusion of liability
The GBS-Elektronik GmbH is not liable for errors and damages caused
by wrong use and improper installation of the Serial Watchdog module.
Furthermore the GBS-Elektronik GmbH is not liable for indirect or
subsequent damages due to wrong installation and malfunction of the
Serial Watchdog.
The information in this manual has been carefully reviewed and is
believed to be accurate and reliable. However, the GBS-Elektronik
GmbH does not assume any liabilities for inaccuracies in this manual.
This manual is subject to change without notice.
Address:
GBS Elektronik GmbH
Bautzner Landstraße 22
01454 Großerkmannsdorf / Germany
Tel.: +0049 (0)3 51 - 21 70 07 0
Fax: +0049 (0)3 51 - 21 70 07 21
Internet: http://www.gbs-elektronik.de/
Email: kontak[email protected]

3
Table of Contents
0 INTRODUCTION .................................................................................. 2
1 INSTALLATION ................................................................................... 2
1.1 B
UILDING A
230V AC
WATCHDOG MONITORED SYSTEM WITH
UPS ..... 2
1.2 B
UILDING A
24V DC
WATCHDOG MONITORED SYSTEM WITH
UPS....... 2
1.3 U
SING THE RESET SWITCH OF THE COMPUTER
................................... 2
2 PRINCIPLE OF OPERATION .............................................................. 2
2.1 G
ENERAL SYSTEM BEHAVIOUR
.......................................................... 2
2.2 S
YSTEM BEHAVIOUR AFTER A POWER FAILURE
................................... 2
3 OPTIONAL FEATURES....................................................................... 2
4 TECHNICAL DATA.............................................................................. 2
4.1 H
ARDWARE
S
PECIFICATION
.............................................................. 2
4.2 S
OFTWARE
S
PECIFICATION
............................................................... 2
4.3 C
OMMAND
S
ET
S
UMMARY
................................................................ 2
4.4 H
ISTORY
.......................................................................................... 2
5 EC COMFORMITY DECLARATION.................................................... 2
last modified: March 04, 2004
by Jens Keubler

Serial Watchdog
4
0 Introduction
This document describes the installation and the principle of operation
of a watchdog monitored computer system consisting of the GBS-
Elektronik Serial Watchdog, an industrial PC and an optional UPS. Such
an arrangement is required for autonomously working unattended
measurement systems. The UPS buffers a short main power loss and is
able to clearly shut down the computer if the main power does not
return. During normal operation the Serial Watchdog monitors the
computer via the RS232 interface. If the computer hangs because of a
software crash or a hardware trouble, the watchdog does not receive
the ping signal any longer and tries to restart the computer: First by
initiating a Windows Software restart and, if this doesn’t work, by
breaking its power supply for a short time. A small program runs
permanently on the computer in the background and sends periodically
the ping signal over the serial port as long as everything works perfectly.
The system state is always indicated by several LED's at the watchdog's
front and by an external lamp.
The great advantage of the Serial Watchdog is its hardware
independence. It is suitable for almost all computers which are equipped
with a serial RS232 interface. Other watchdog monitored computer
systems require a special computer hard- and software. These systems
are often expensive and inflexible.
1 Installation
The Serial Watchdog is usable in different situations. It works with 230V
AC computers and with 24V DC systems, too. The two most important
installation variants are described in this chapter. The watchdog design
allows a maximum of flexibility. Dependent on the situation it is possible
to modify one of the standard systems.
Mechanical installation of the watchdog unit is easily possible by
mounting it on a DIN-Rail. If no DIN-Rail is available or there is not
enough space in the facility, the watchdog has to be fastened in any
other way dependent on the situation. The open side of the
communication cable must be connected to the watchdog as described
on the SUB-D9 connector (RxD with RxD...) and the SUB-D9 connector
has to be connected to the computer which should be monitored.

5
If an external State-of-Health lamp is required, connect the middle
contact of the corresponding relay (connections at the watchdog's left
bottom) with the watchdog's 24V power supply terminal. Dependent on
the state which should be indicated, it is necessary to connect the
opened or closed relay contact with the lamp. Alternatively it is possible
to switch another device via the relay, e.g. an acoustic alarm. If it needs
a different operating voltage than 24V DC, supply the middle contact of
the relay with the corresponding voltage. Make sure that it does not
exceed the maximum ratings of the relay (see Technical Specifications).
Normally the Serial Watchdog is used together with a UPS to buffer
power failures. This UPS is not required for proper operation of the
watchdog. A UPS is not necessary in facilities where a high main power
reliability is guaranteed.
1.1 Building a 230V AC watchdog monitored system with UPS
Safety Instructions
Read and follow all of this instructions careful. You work with
dangerous voltages. There is the risk of an electrical shock.
Before installation make sure that all parts are disconnected
from the main supply and powerless! Take special care with
the UPS. Note that the UPS output can supply power even if its
input is disconnected from the power grid!
In each case the watchdog's earth ground connection has to be
wired with the system's protective ground (earth)! Furthermore
the computer and the UPS require a professional grounding
according to corresponding standards. Only qualified personell
is authorized to install such a system.
Figure 1.1 shows the wiring diagram for a 230V AC computer system
with UPS and Serial Watchdog. An additional AC/DC voltage converter
is necessary to supply the watchdog with 24V DC. Read and follow the
instructions given in the user manual / installation guide of the converter
module.

Serial Watchdog
6
Figure 1.1 230V AC system with Serial Watchdog

7
Disclaimer
Before you supply the whole system with power, carefully
check all connections for correctness! The GBS-Elektronik
GmbH is not liable for errors and damages caused by wrong
use and improper installation of the Serial Watchdog module.
Furthermore the GBS-Elektronik GmbH is not liable for indirect
or subsequent damages due to wrong installation and
malfunction of the Serial Watchdog.
1.2 Building a 24V DC watchdog monitored system with UPS
Figure 1.2 shows a typical 24V DC watchdog monitored computer
system with UPS. In this application a 230V AC output UPS is combined
with an additional 230V AC / 24V DC converter. Instead of this
combination a single 24V DC output UPS can be used. In most cases it
is very useful to directly connect the watchog's power supply with the
power relay's middle contacts.
1.3 Using the reset switch of the computer
Another way is to use the computer's reset switch to initialize a reboot.
This is only possible with computers which are equipped with a usable
reset switch. In this case the power relay of the watchdog is not used to
cut the power supply of the computer, but it closes the reset switch for a
short time. Note that this works perfectly with a lot of computers, but
there are also models (particularly newer ones) which are sometimes
immune against a reset. In some special cases (evil hang-up) this
computers do not respond to the reset signal.

Serial Watchdog
8
Figure 1.2 24V DC system with Serial Watchdog

9
2 Principle of Operation
This chapter describes how the Serial Watchdog works. It does not
describe the usage and installation of the watchdog program which is
necessary to operate the watchdog. For questions concerning this
program, please refer to the corresponding user manual / online help.
2.1 General system behaviour
After setting up all parameters in the watchdog program, monitoring is
activated by pressing the START-button. This sends the START-
command to the Serial Watchdog which monitors the computer now.
The COMMUNICATION-LED turns on and the STATE-OF-HEALTH-
LED starts red flashing. Now the watchdog program sends the PING-
command with parameter 0x01 every 30 seconds until the program’s
timer reaches the preset watchdog time. Every time a file is created
within the monitored directory this timer will be cleared and the PING-
command with parameter 0x00 is sent to the watchdog. This changes
the STATE-OF-HEALTH-LED from red flashing to continously green. If
the timer reaches the preset watchdog time without having detected a
file-writing event, the watchdog program stops sending the PING-
command and tries to shut down and restart Windows. For safety
reasons a fixed 30s overtime period is always added to the preset value.
So, for instance, if desired measurement time is 60s, it is recommended
to set the watchdog time to the same value, i.e. 60s. Thus, the effective
time-out will be 60+30=90s.
Exactly 30 seconds after the last PING-command was received by the
watchdog, it changes the STATE-OF-HELTH-LED to continously red
and generates a periodical acoustic signal if audible alarm is enabled. If
no PING-command is received within the next 5 minutes, the watchdog
will open the power relay for 40 seconds which acts as a hard reset for
the computer. Next the watchdog runs its initialization procedure like
descibed in the chapter „System behaviour after a power failure“. If the
operating system isn’t in trouble, the computer will finish the reboot
within 5 minutes. After a successful reboot the watchdog program will be
restarted automatically. It sends immediately the PING-command (with
parameter 0x01) to the Serial Watchog to prevent a hard reset in this
moment. Now the next monitoring cycle starts like described above.

Serial Watchdog
10
The number of soft-restarts (initiated by the watchdog program) can be
limited by the parameter „Number of Restarts“. Values between 1 and
255 are valid, zero disables the limit. If the counter reaches the limit, it
stops restarting the computer and sends now PING-commands with the
parameter 0x02 every 30 seconds. The watchdog module sets the
STATE-OF-HEALTH-LED to red and starts a timer which generates a 5
second long acoustic signal every hour if audible alarm is enabled.
Every valid file-writing action or the STOP-command will finish this
behaviour and clears the counter. During this time the watchdog module
monitors the computer. If it stops sending PING-commands (with
parameter 0x02) the watchdog module initiates a hard-restart (opens
the power relay).

11
2.2 System behaviour after a power failure
If the UPS output supplies the system with power, the computer boots
and starts its operating system. Meanwhile the Serial Watchdog runs its
initialisation procedure and waits for commands which are sent via the
serial port. At this time the POWER-LED is on, the COMMUNICATION-
LED is off and the STATE-OF-HEALTH-LED shines red. If the 1H-
jumper (located at the watchdog's electronic board, see figure 2) is not
closed and no command is received, the watchdog stays in this state as
long as power is available. If the 1H-jumper is closed and no command
is received within 1 hour after initialisation, the watchdog will open the
power relay after 1 hour of waiting. This option is very useful in cases
where the operating system hangs during its startup. After 1 hour the
watchdog tries to start the computer a second time by breaking the
computer's power supply for a short time. This procedure repeats for
further 2 times if the computer hangs permanently. If this option is
enabled, the operator should take care during computer maintenance
works. The computer will crash exactly one hour after booting if the
operator forgets to send the STOP-command to the watchdog!
Figure 2 Location of the 1H-Jumper

Serial Watchdog
12
After the computer has finished its startup procedure, the watchdog
program sends the START-command to the watchdog. Now the
watchdog is reactivated. It sets the COMMUNICATION-LED and the
STATE-OF-HEALTH-LED flushes red. The watchdog waits 30 seconds
for a PING-command. If it receives a ping, it clears all timers and starts
waiting again, independent of the parameter. If the ping does not appear
within 30 seconds, the watchdog generates a periodical acoustic signal,
if audible alarm is enabled, which indicates that the power relay will be
opened in 5 minutes and sets the STATE-OF-HEALTH-LED to red. This
process can be stopped by sending the STOP-command.
If the watchdog receives a ping during this phase, it sets the STATE-
OF-HEALTH-LED and the acoustic signal according to table 1 and
clears all timers. Now it waits exactly 30 seconds for the next ping (see
above).
If no ping is received within 5 minutes after the STATE-OF-HEALTH-
LED has changed to red, the watchdog generates a continuous acoustic
signal (if enabled) and opens the power relay for exactly 40s. During this
time it does not accept any commands. After these 40 seconds the
watchdog runs its initialization procedure as described above.
The STOP-command works everytime unless the power relay is open. It
clears the COMMUNICATION-LED, sets the STATE-OF-HEALTH-LED
to red and disables all timers including the 1H-timer. Only the next
START-command will activate the watchdog again.
Table 1: Watchdog behaviour on different commands
Command Parameter STATE-OF-HEALTH-LED acoustic signal
(1
START xxh red flushing off
STOP xxh red off
PING 00h green off
PING 01h red flushing off
PING 02h red 5 sec. every hour
(1
if enabled

13
3 Optional Features
The standard version of the Serial Watchdog includes all features
described above. Only these ones are currently available. The hardware
itself is prepared to very easily add some features in the future by
merely changing the firmware of the watchdog.
In the watchdog standard version all time presets are fixed (e.g. the
power-off time). The customer is not able to change them. On the
watchdog's electronic board three PCB code switches are placed. They
are without function. These code switches can be used to make some
time presets changeable by the customer.
Furthermore the Serial Watchdog contains a real time clock and an
EEPROM. With this combination it would be possible to record some
special events like missing pings with time stamps. This would be very
useful in cases of a total system crash (e.g. the harddisk crashes due to
a power failure, no logfile available). With the stored information of the
watchdog the operator would be able to analyze the crash situation.

Serial Watchdog
14
4 Technical Data
4.1 Hardware Specification
Power Supply
Operating voltage range: 20V...28V DC (24V Version)
10V...15V DC (12V Version)
Power consumption: 50mA @ 24V max.
110mA @ 12V max.
State-Of-Health Relay characteristics: 48V; 6A
Power Relay characteristics: 250V AC; 5A
Time Presets
Ping Time: 30s
Wait-Time: 5min
Power-Off Time: 40s
1H Time: 60min
Operating Temperature Range: 0°C ... 50°C
Dimensions:
Width: 45mm
Depth: 109.5mm
Height: 75mm
Weight: 210g
Protection Class: IP42

15
4.2 Software Specification
Preset Watchdog Time: 30...36000s; changeable in
steps of 30s
Possible Communication Ports: COM1...COM8
Monitored Event: writing files into a specified
(monitored) directory
Monitored Directory: free selectable, can be
everyone from a local harddisk;
all sub-directories are also
monitored (optional)
Logfile: monitored_dir\watchdog.log
filename and location are fix
Action if monitored event does
not appear during the
Preset Watchdog Time: forced Windows Shutdown

Serial Watchdog
16
4.3 Command Set Summary
Communication is always initialized by the host computer, the watchdog
itself does not start requests. Each time the computer sends a
command to the watchdog, it will send an answer back. Commands and
answers always consist of 4 bytes. The first byte represents the
checksum of the following 3 bytes and the second byte is interpreted as
command itself. The last two bytes are ignored or interpreted as
parameter / data. If the watchdog is able to interprete the command, it
sends the last 3 bytes of the command with a new calculated checksum
as answer back to the host. If the watchdog receives an unknown or
faulty command, it sends a 4 byte long error code back. The first byte of
this code repesents the checksum and the second byte is always FFh.
The third byte represents an error identifier and the fourth byte contains
a more detailed error code.
Command Set
Command / Answer Byte1 Byte2 Byte3 Byte4
START CC
*3
00h xxh xxh
CC
*3
00h xxh xxh
STOP CC
*3
01h xxh xxh
CC
*3
01h xxh xxh
PING CC
*3
02h PNG
*6
xxh
CC
*3
02h PNG
*6
xxh
VERSION CC
*3
03h xxh xxh
CC
*3
03h HW
*1
FW
*2
GET_OPTIONS CC
*3
04h xxh xxh
CC
*3
04h 00h OPT
*5
SET_OPTIONS CC
*3
05h xxh OPT
*5
CC
*3
05h xxh OPT
*5
*1
Hardware-Version
*2
Firmware-Version
*3
checksum; CC = (Byte2 + Byte3 + Byte4 + 2Ah) MOD FFh
*5
OPT = Option Register; 00h = audiable alarm enabled
08h = audiable alarm disabled
*6
PNG = PING-qualifier; 00h = everything works perfectly
01h = the watchdog program works perfectly but
the state of the main application is
unknown
02h = watchdog program has stopped soft-
restarts but continues to observe the main
application

17
Errorcodes
Error Byte1 Byte2 Byte3 Byte4
HARDWARE ERROR CC
*3
FFh 00h RCSTA
*4
UNKNOWN COMMAND CC
*3
FFh 01h 00h
CHECKSUM ERROR CC
*3
FFh 06h CALCC
*5
EEDATA ERROR CC
*3
FFh 07h 00h
*4
RCSTA corresponds to PIC-Register
*5
checksum from firmware calculated
4.4 History
Hardware
HW Description
0x10 initial Version
Firmware
FW Description
0x10 initial Version
0x11 -Number of restarts changeable
-Audiable Alarm changeable
-
STOH LED is now red flashing after a start command
instead of continously green shining
-second kind of PING implemented (option 0x01)

Serial Watchdog
18
5 EC Comformity declaration
Herewith we declare that the design of the device described below is in
accordance with the mentioned EC regulations. This declaration looses
its validity by unauthorized changes.
Description: serial controlled watchdog for
unattended computer systems
Type: Serial Watchdog, Standard Version
Year of manufacture: 2001
Applicable EC rules: 73/23/EWG (Niederspannungsrichtlinie)
changed by: 93/68/EWG
89/336/EWG (Elektromagnetische
Verträglichkeit)
changed by: 91/263/EWG; 92/31/EWG;93/68/EWG
Applied harmonized Norms: EN 50081-1
EN 50082-1
EN 61010 / VDE 0411
The design was tested according to the given norms and standards.
Rossendorf, January 2001
For further information please contact
Jens Keubler, GBS Elektronik GmbH
Bautzner Landstraße 22
01454 Großerkmannsdorf / Germany
Tel.: +0049 (0)3 51 - 21 70 07 26
Fax: +0049 (0)3 51 - 21 70 07 21
Email: keubler@gbs-elektronik.de
Table of contents
Popular Industrial PC manuals by other brands

Aplex
Aplex ACS-2702 user manual

Siemens
Siemens SIMATIC IPC627E operating instructions

Smitec
Smitec POSYC 3303 Instructions for installation, use and maintenance manual

Aplex
Aplex AEx-2410 user manual

FabiaTech
FabiaTech FX5409 Series Users Quick Reference

Siemens
Siemens SIMATIC PC 847B operating instructions

Moxa Technologies
Moxa Technologies UC-7122 Hardware user manual

VIA Technologies
VIA Technologies AMOS-820 SKU user manual

AXIOMTEK
AXIOMTEK eBOX560-512-FL Quick installation guide

Aerotech
Aerotech A3200 iPC Series Hardware manual

Quanmax
Quanmax KPC-1561 user guide

Advantech
Advantech IPPC-6172A Series user manual