15.10.2012 Views

Watchbox - antrax.de

Watchbox - antrax.de

Watchbox - antrax.de

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

WatchBox<br />

• Watchdog in an external 230V switchbox<br />

• Seriell Interface (COM)<br />

• USB Interface<br />

Product Description<br />

12.03.2009<br />

- 1 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Inhaltsverzeichnis<br />

• Overview<br />

• Application of the WatchBox<br />

• Safety Recommendations<br />

• Scope of Delivery<br />

• Hardware<br />

• Software<br />

• System Requirement<br />

• Technical Features<br />

• General<br />

• Load Circle<br />

• Control Circle<br />

• Mo<strong>de</strong> of Operations<br />

• General<br />

• WatchBox<br />

• Highlights<br />

• Installation<br />

• Hardware<br />

• USB Installation<br />

• Software<br />

• Functions Reference<br />

• Modi<br />

• Trigger the WatchBox<br />

• Switching + Sequences<br />

• Miscellaneous<br />

• General Command Processing<br />

• Stati<br />

• Programming<br />

• General<br />

• Controlling the WatchBox<br />

• Recognition of Software Errors<br />

• Examples<br />

• Handling<br />

• LED<br />

• Button<br />

• COM interface, USB interface<br />

• Differences between Mo<strong>de</strong> 1 und Mo<strong>de</strong> 3<br />

• Differences between Mo<strong>de</strong> 1 und Mo<strong>de</strong> 4<br />

• WatchBox as Plain Text Printer<br />

• Expressions Used<br />

- 2 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Overview<br />

The WatchBox allows the direct or time-steered turning on and off switching of a<br />

230V electrical appliance above the serial interface of a PC. Timer-steered switch<br />

processes about the serial interface or the USB interface are possible with the service<br />

program free of charge available on the "<strong>antrax</strong>" homepage "ASS" (Antrax-Service-<br />

Software).<br />

Please, read this <strong>de</strong>scription or the help file (about the homepage) before the first<br />

introduction completely and carefully. It <strong>de</strong>scribes the <strong>de</strong>signated use and contains<br />

important tips for the installation / introduction of the WatchBox. For the results of<br />

not <strong>de</strong>signated use the manufacturer does not take over no liability. All guarantee<br />

claims are cancelled in this case.<br />

Application of the WatchBox<br />

The WatchBox is <strong>de</strong>veloped for the switching of<br />

• ohmschen loads like electric light bulbs or heating fans to max. 2000 W (230<br />

V / 8.7A) or<br />

• inductive loads like engines, transformers to max. 2000 VA (230 V / 8.7A)<br />

in dry, closed resi<strong>de</strong>ntial rooms and office rooms certainly. The rules of the connected<br />

electrical appliances and their security regulations are to be followed.<br />

- 3 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Safety Recommendations<br />

� Do not open the WatchBox. It contains no parts to be waited by you.<br />

� Pursue the WatchBox only in interiors and avoid the influence of humidity.<br />

� Pursue the WatchBox only in properly installed 230V AC outlets.<br />

� Clean the WatchBox with a dry cloth only after removing from the outlet and<br />

separation of the interface cable.<br />

� Load the WatchBox only up to given achievement bor<strong>de</strong>r. A strain can lead to the<br />

<strong>de</strong>struction of the WatchBox.<br />

� The WatchBox may not be pursued in the access sphere by children.<br />

� The WatchBox may not be connected to an already switched on computer.<br />

Connecting to a switched on computer can lead to the <strong>de</strong>struction of computer<br />

components.<br />

� Do not start running the WatchBox if one or several parts (case, cable, plug) are<br />

damaged or damages are to be supposed (e.g., on falling down).<br />

� Repair in the WatchBox may be carried out only by authorized professionals.<br />

� Connect only electrical appliances which have no limited durations (i.e. all<br />

connected electrical appliances must take in the case of mistake a long-term<br />

intercalation without arranging damages).<br />

Attention:<br />

� The load circle is switched about a 1-pole electric relay, i.e. also with a switched<br />

off <strong>de</strong>vice the WatchBox the mains voltage can lie with one of both outlet<br />

sockets!<br />

� According to working condition the WatchBox can switch on the connected load<br />

after a current failure.<br />

� Used COM or USB interface must remain for the WatchBox and may not be<br />

<strong>de</strong>man<strong>de</strong>d by other programs.<br />

� The WatchBox is able to switch a load very fast on and off. The duration of the<br />

switching cycles is to be adapted to the electrical appliance to be switched. Not all<br />

electrical appliances stood quick switch results.<br />

- 4 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Scope of Delivery<br />

Hardware<br />

Everything completely? The single <strong>de</strong>livery of a WatchBox contain:<br />

• the WatchBox (incl. connecting cable for the serial interface or USB interface of<br />

a PC)<br />

• a <strong>de</strong>scription / operating instructions<br />

Software<br />

• only with the WatchBox-USB: the necessary USB drivers on our homepage<br />

http://www.<strong>antrax</strong>.<strong>de</strong><br />

• free software for the control of the WatchBox (service program "ASS" (Antrax<br />

service software) you can find on our homepage http://www.<strong>antrax</strong>.<strong>de</strong><br />

System Requirements<br />

General<br />

• serial interface (9600-8-N-1)<br />

• USB interface (USB 1.1)<br />

Technical Features<br />

General<br />

• Protective class: IP20, only for dry rooms<br />

• Plug system: SCHUKO<br />

• the momentary switch state is signaled by a green LED<br />

• Load circle and control circle own a sure galvanic separation about optotriac and<br />

transformer<br />

• working temperature: -10 ... +60°C<br />

- 5 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Load circle<br />

• Power supply: 230 / 240 V~ 50 / 60 Hz<br />

• one pole relay<br />

• maximum switch achievement:<br />

• loads like electric light bulbs or heating fans up to 2000 W (230 V / 8.7A)<br />

• inductive loads like engines, transformers up to 2000 VA (230 V / 8.7A)<br />

Control circle<br />

• serial interface (9600, 8, N, 1) or above USB interface<br />

• max. cable length: 1,5 m<br />

- 6 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Mo<strong>de</strong> of Operations<br />

General<br />

With the help of a Watchdogs can be recognized whether a program on a computer<br />

runs correctly or whether it was interrupted by internal (e.g., by a program error)<br />

or external (e.g., by sturgeon impulses from the electricity supply) source of error<br />

or was disturbed. However, condition for it is that the program to be supervised<br />

contacts cyclically to his Watchdog (trigger). If this trigger is missing (because the<br />

program "crashes", e.g.), the Watchdog initiates a problem solution. Normally this<br />

is a hardware reset of the computer or a power on reset.<br />

WatchBox<br />

The WatchBox is connected over a serial interface or USB interface with the PC<br />

which should be equipped with the Watchdog functionality.<br />

ATTENTION: In both cases (connection above serial or USB interface) the<br />

WatchBox is controlled by a "COM interface" software! The used USB drivers<br />

generated a virtual COM port and the WatchBox can be simply controlled like a<br />

serial <strong>de</strong>vice.<br />

The computer software sends to the WatchBox<br />

• the parameter TR (within which duration must become triggered),<br />

• the parameter TA (how long the WatchBox should remain switched off in the<br />

case of a Watchdog event) and<br />

• the parameter TF (in which duration after a Watchdog event the trigger must<br />

start again)<br />

and send a trigger to the WatchBox afterwards regularly within the pre-set<br />

duration.<br />

The WatchBox is activated if the computer to be supervised within the given<br />

duration (TR) triggers no more. In such a case the WatchBox interrupts the<br />

electricity supply of the computer, waits the pre-set duration (TA) and switches on<br />

the computer again. The computer starts again and the Watchdog software is<br />

running once more (should be in the auto-start fol<strong>de</strong>r).<br />

- 7 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Alternatively for a computer restart after a Watchdog event an external <strong>de</strong>vice can<br />

switched directly (e.g., mo<strong>de</strong>m, lamps, printer, measuring equipment and so on).<br />

All WatchBox parameters are variable in wi<strong>de</strong> ranges.<br />

The WatchBox differs the following initial states:<br />

• Watchdog event restart - the WatchBox has released a restart and waits for<br />

the initialization by the software (which is, e.g., in the auto-start-fol<strong>de</strong>r)<br />

• restart - the computer has been switched on. The WatchBox has stored no<br />

error restart, because the computer has "logged" out (<strong>de</strong>activeted the<br />

WatchBox) before it switching off properly (about the command " {+} Deaktiv<br />

")<br />

The WatchBox can recognize even whether a trigger occurs in a (unintentional)<br />

endless loop: A status variable can be given to the trigger command! If this status<br />

variable does not change within two trigger commands following on each other, the<br />

second trigger command is ignored. In this case the last status variable can be read<br />

back from the computer and be done the base of the mistake search.<br />

In addition, the WatchBox also recognizes the problem „hardware or OS does not<br />

boot up “: After a Watchdog restart or a Power-ON the trigger must occur through<br />

the WatchBox in a before pre-set duration (TF). If this does not happen, the<br />

WatchBox initiated a further restart and so on.<br />

- 8 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Highlights<br />

• Connection about COM interface or USB interface, hence, the easiest<br />

installation and control:<br />

• easy plain text controlling by the software<br />

• with every terminal program like "hyperterminal", "TELIX" or similar<br />

(command transmission as with a mo<strong>de</strong>m about AT commands).<br />

• controlling can occur even as a text output on a "printer" (besi<strong>de</strong>s, the<br />

WatchBox is a plain text connected above a serial interface – printer)<br />

• The WatchBox works in<strong>de</strong>pen<strong>de</strong>ntly of operating systems.<br />

• The WatchBox has it's own microprocessor.<br />

• The WatchBox also recognizes endless loop trigger commands:<br />

• multiple, i<strong>de</strong>ntical triggers are ignored<br />

• the last trigger variable of the main program before a watchdog restart is<br />

stored in the WatchBox and can read back from the computer software<br />

• The WatchBox does recognize "not booting up computers" by time supervision<br />

after a Watchdog restart or power-on restart<br />

• Re-trigger- and switch times / durations are adjustable in wi<strong>de</strong> ranges (up to<br />

214748364 seconds = approx. 2485 days).<br />

• Application as a 230V switch box without watchdog functionality for external<br />

<strong>de</strong>vices possibly<br />

• time-steered switching on and off<br />

• Delayed turning on after Power-ON<br />

• WatchBox control software is available on http://www.<strong>antrax</strong>.<strong>de</strong>/<br />

- 9 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Installation<br />

Hardware<br />

• switch off the computer<br />

• connect the serial or USB cable between WatchBox and computer<br />

• put the 230V connector of the computer in the outlet of the WatchBox<br />

• put the WatchBox in a 230V wall outlet<br />

• switch on the computer<br />

• only with the WatchBox-USB: after the boat the PC recognizes the new USB<br />

hardware and would like to get the path to the suitable USB driver. You can find<br />

the USB drivers on our homepage (USB-Drivers.FTDI_<strong>antrax</strong> UniBox.zip, approx.<br />

360 KB). Please, unpack the file in a new directory (see below).<br />

• The state of the WatchBox can be manual altered by pressing the button<br />

(besi<strong>de</strong> the connecting lead) for at least 3 seconds.<br />

USB Installation<br />

If the WatchBox is connected by USB to the computer, now the hardware<br />

Installations assistant who installs the suitable drivers (USB as a virtual COM port)<br />

starts.<br />

The following example shows the driver's installation un<strong>de</strong>r Windows XP:<br />

After connecting the USB port the hardware installations assistant starts:<br />

- 10 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Choose the point: " No, this time not " and click on "next".<br />

The following window appears:<br />

Choose the point: " Install software of a list or certain source " and click on "next".<br />

- 11 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

The following window appears:<br />

Select the point "Searching" and type in the directory on the hard disk in which you<br />

have unzip the ZIP file with the driver's files.<br />

Click on "next".<br />

- 12 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

The following window appears:<br />

Choose "installation continue".<br />

The following window appears:<br />

Click on "next".<br />

- 13 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

The following window appears:<br />

Click here on "finish".<br />

Now the software for the control of the WatchBox about a virtual COM port is<br />

furnished. Whether the new COM port functions correctly, you can see in the system<br />

control in the <strong>de</strong>vice manager:<br />

- 14 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Now the WatchBox is ready for use.<br />

Software<br />

• Now the WatchBox with the service program "ASS" (= Antrax service software)<br />

or another software (how hyperterminal, Telix or any other terminal software)<br />

can put into operation.<br />

• The control by the main program to be supervised occurs about its outputs on<br />

the serial interface.<br />

The service program "ASS" (= Antrax service software) can be downloa<strong>de</strong>d free of<br />

charge from http://www.<strong>antrax</strong>.<strong>de</strong>.<br />

- 15 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Functions Reference<br />

Modi<br />

Syntax Description<br />

{+} Modus = 1 Device as a watchdog (switches it's 'own' connected computer). The<br />

active main function in this mo<strong>de</strong> is the controlled OFF/ON switching<br />

of the computer:<br />

- after Power ON (and WatchBox without function) → Outlet<br />

ON!<br />

- onapon = 1, triapon = 0<br />

{+} Modus = 2 Device as a SwitchBox (switches any other consumer). The active<br />

main function in this mo<strong>de</strong> is the ON switching of consumers:<br />

- all WatchBox function are <strong>de</strong>activated<br />

- after Power ON (and WatchBox without function) � Outlet<br />

OFF!<br />

- <strong>de</strong>fault setting<br />

- onapon = 0, triapon = 0<br />

{+} Modus = 3 Device as a watchdog in a failsave mo<strong>de</strong> (switches it's 'own'<br />

connected computer). The active main function in this mo<strong>de</strong> is the<br />

controlled OFF/ON switching of the computer:<br />

- after Power ON (and WatchBox without function) � Outlet<br />

ON!<br />

- the pre-set time Tf already runs from Power-ON and switches<br />

the WatchBox OFF/ON if not within the duration Tf becomes<br />

triggered<br />

- onapon = 1, triapon = 1<br />

{+} Modus = 4 Device as a watchdog in the "Neutral-Power-On" mo<strong>de</strong> (switches any<br />

other consumer). Like modus 1 with the difference that the<br />

WatchBox remains switched off after power on<br />

- onapon = 0, triapon = 0<br />

- 16 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Modi<br />

{+} onapon = 1 ONAfterPowerON<br />

Describes the behaviour of the WatchBox after a Power-ON.<br />

If with {+}Modus = n a mo<strong>de</strong> is pre-set, onapon puts automatically<br />

on the right value. Nevertheless, onapon can be changed afterwards<br />

(e.g. in such a way that the WatchBox works in the mo<strong>de</strong> 2<br />

[SwitchBox] and is switched on after a Power-ON [{+} onapon=1]).<br />

The following values are possible:<br />

0 Outlet remains OFF after Power-ON (e.g., in the mo<strong>de</strong> 2)<br />

1 Outlet is switched ON after Power-ON (e.g., in the mo<strong>de</strong> 1)<br />

2 Outlet is switched ON if before discontinuation of power supply<br />

the outlet was switched ON<br />

- Range: 0 … 2<br />

- Default setting: 0<br />

{+} triapon = 1 TRIgAfterPowerON<br />

Describes the behaviour of the WatchBox after a Power-ON.<br />

If with {+}Modus = n a mo<strong>de</strong> is pre-set, triapon puts automatically<br />

on the right value. Nevertheless, triapon can be changed afterwards.<br />

The following values are possible:<br />

0 after Power-ON and switch ON there is no need to be triggered<br />

(e. g. in mo<strong>de</strong> 1)<br />

1 WatchBox must be triggered after Power-ON and switch ON<br />

(e. g. in mo<strong>de</strong> 3)<br />

- Range: 0 … 1<br />

- Default setting: 0<br />

- 17 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Trigger the WatchBox<br />

Syntax Description<br />

{+} Tr = 20 Can be explained only in mo<strong>de</strong> 1, 3 or 4 (WatchBox).<br />

Pre-set of the re-trigger time in seconds<br />

- within this time must become regularly triggering, otherwise a<br />

Watchdog event is released<br />

- Range: 1 … 214748364<br />

- Default setting: 60 s<br />

{+} Ta = 10 Can be explained only in mo<strong>de</strong> 1, 3 or 4 (WatchBox).<br />

Pre-set of the power off time in seconds<br />

- with the entry of the Watchdog event the outlet is switched OFF<br />

for this time<br />

- Range: 1 … 214748364<br />

- Default setting: 10 s<br />

{+} Tf = 500 Can be explained only in mo<strong>de</strong> 1, 3 or 4 (WatchBox).<br />

Pre-set of the error time in seconds<br />

Time up to the next Watchdog event if after a Watchdog event initiated<br />

by the WatchBox or by a general Power-ON no [renewed] trigger<br />

occurs (e.g., ' Windows hangs while boat up')<br />

- Range: 0 … 214748364<br />

- Default setting: 900 s<br />

{+} Trig<br />

{+} Trig = 10<br />

With a value of 0 the boat error feature is switched off, then i.e. after a<br />

Watchdog event the outlet is switched permanently ON (see also ( {+}<br />

maxrst)<br />

Can be explained only in mo<strong>de</strong> 1, 3 or 4 (WatchBox).<br />

Trigger release<br />

- after the first trigger the WatchBox is armed (if not yet, the<br />

outlet switch ON) and it must become regularly trigger within<br />

the re-trigger time<br />

- the LED flashes (duty cycle 50:50, 0.5Hz)<br />

Can be explained only in mo<strong>de</strong> 1, 3 or 4 (WatchBox).<br />

Trigger release with the optional parameter "status":<br />

Feature like above, with the exception that a trigger only then <strong>de</strong>tected<br />

if the parameter value differs from the previous one. The last han<strong>de</strong>d<br />

parameter value after a Watchdog event stored in the non-volatile<br />

memory. This "last sent value" can be read back with the command<br />

"{+}get" and become a basic of a error searching. With the command<br />

"{+}<strong>de</strong>l status" the stored value and the last sent value can <strong>de</strong>leted.<br />

- 18 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Trigger the WatchBox<br />

{+} maxrst = 3 Can be explained only in mo<strong>de</strong> 1, 3 or 4 (WatchBox).<br />

Number of the restarts of the PC limit<br />

This command becomes only effective if the parameter "Tf" is greater<br />

than 0:<br />

It should be prevented that a PC is restarted after a Reset by missing<br />

trigger over and over again. The maximum number of new starts can<br />

be pre-set with {+} maxrst = n. The internal counter ACT-RST<br />

incremented with every renewed Reset. If the counter ACT-RST<br />

reaches the pre-set value of "maxrst", the outlet remains permanently<br />

switched OFF.<br />

- Range: 0 … 65535<br />

- If 0 → no limit<br />

- Default setting: 10<br />

- 19 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Switching + Sequences<br />

Syntax Description<br />

{+} Tv = 12 Can be explained in every mo<strong>de</strong><br />

Switch ON <strong>de</strong>lay after Power-ON (in seconds)<br />

This time after a Power-ON is upstream to all other processes and<br />

permits the <strong>de</strong>layed switching ON of the outlet (e.g., for the<br />

"synchronization" of several "quicker" <strong>de</strong>vices)<br />

{+} Off<br />

{+} Off = 100<br />

{+} On<br />

{+} On =<br />

100000<br />

{+} On = 20<br />

{+} Off = 40<br />

{+} Off = 20<br />

{+} On = 40<br />

- Range: 0 … 214748364<br />

- Default setting: 0<br />

Without parameter it is switched OFF immediately<br />

switched OFF after the given time in seconds<br />

- Range: 0 … 214748364<br />

- if a "{+} On = n" command sent direct afterwards, an On/Off<br />

sequence starts<br />

Without parameter it is switched ON immediately<br />

switched ON after the given time in seconds<br />

- Range: 0 … 214748364<br />

- if a "{+} Off = n" command sent direct afterwards, an Off/On<br />

sequence starts<br />

Start of a On/Off sequence<br />

The WatchBox outlet is switched ON after 20 seconds and is switched<br />

OFF after further 40 seconds again.<br />

Start of a Off/On sequence<br />

The WatchBox outlet is switched OFF after 20 seconds and is switched<br />

ON after further 40 seconds again.<br />

Conditions on the work with sequences:<br />

- the commands must be sent directly one after the other<br />

- the second command must be sent, before the time given in the<br />

first command has run off<br />

- a sequence is interrupted by every command which causes the<br />

switching of the outlet (directly or on time)<br />

- a sequence is interrupted by the commands "{+} Deaktiv" and<br />

"{+} Trig"<br />

ATTENTION: The pre-set times in the effect are ad<strong>de</strong>d!<br />

- 20 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Miscellaneous<br />

Syntax Description<br />

{+} Echo ON Set echo of the serial line ON<br />

- Default setting: ON<br />

{+} Echo OFF Set echo of the serial line OFF<br />

- Default setting: ON<br />

"Testseite"<br />

{+} Testseite<br />

if this string is recognized, the LED three times flashes<br />

(Help to the operator if the WatchBox is used as a COM printer)<br />

{+} Deaktiv Can be explained only in mo<strong>de</strong> 1, 3 or 4 (WatchBox).<br />

WatchBox <strong>de</strong>activated<br />

- must become no more triggered<br />

- all times are preserved<br />

- according to momentary state: LED statically on or off<br />

{+} Del<br />

EEPROM<br />

Can be explained only in mo<strong>de</strong> 1, 3 or 4 (WatchBox).<br />

Delete the non-volatile memory and pre-set all <strong>de</strong>fault settings.<br />

{+} Del Status Can be explained only in mo<strong>de</strong> 1, 3 or 4 (WatchBox).<br />

Deletes the stored status value and the status value which was send<br />

with the last "{+}Trig = n" command.<br />

Deletes the counter for the WatchDog events.<br />

- 21 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

General Command Processing<br />

Stati<br />

- WatchBox commands are initiated always with {+} or {1}.<br />

- Blanks are ignored.<br />

- WatchBox commands are NOT case sensitivity.<br />

- Every single command must be finished at least with CR (character 13).<br />

- All WatchBox times/durations are preserved as long as, until they are put explicitly<br />

anew.<br />

- All preferences are held in a non-volatile memory and also "survive" a Power-OFF of<br />

the WatchBox.<br />

- Importantly by manual inputs with a terminal program: Time-out during a manual<br />

command input are 5 seconds (therefore, please type in quickly ...).<br />

- With "{+}echo on" the command acknowledgement is CRLF + 'OK' +CRLF.<br />

- Not recognized commands will be answered with CRLF + '?' + CRLF.<br />

- Before sending a command the preceding command must have been recognized by<br />

the WatchBox (receipt or waiting period).<br />

With "{+}Modus = n" the parameters "onapon" and "triapon" are automatically pre-set.<br />

If afterwards with manually settings of "{+}onapon = n" and/or "{+}triapon = n" the<br />

resulting combination fits to none of the four mo<strong>de</strong>s (see mo<strong>de</strong>s, page 10), after a<br />

"{+}Get" command the actual mo<strong>de</strong> is "USERDEFINED".<br />

Syntax Description<br />

{+} Remain Query of the still remaining time up to the next switch process.<br />

Display: COUNT=214748364... 0 (line 4 of the status query)<br />

{+} Get Query of all parameter values and states.<br />

(Description of the Stati see below)<br />

{+} F Query the actual firmware version (= date of release).<br />

{+} H Query the hardware ID.<br />

- 22 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

"{+}get" parameter values:<br />

WatchBox Switchbox<br />

WATCHBOX=<br />

WATCHBOX_FS=<br />

WATCHBOX_NP=<br />

00...15 CRLF SWITCHBOX= 00...14 CRLF<br />

RELAIS= 0...1 CRLF RELAIS= 0...1 CRLF<br />

TIME= 0...21474836<br />

4<br />

CRLF TIME= 0...214748364 CRLF<br />

COUNT= 214748364...<br />

0<br />

CRLF COUNT= 214748364...0 CRLF<br />

TR= 1...21474836<br />

4<br />

CRLF ONAPON= 0...2 CRLF<br />

TA= 1...21474836<br />

4<br />

CRLF TV= 0...214748364 CRLF<br />

TF= 0...21474836<br />

4<br />

CRLF OK CRLF<br />

TV= 0...21474836<br />

4<br />

CRLF<br />

TRIG-STATE= 0...21474836<br />

4<br />

CRLF *)<br />

ERROR-STATE= 0...21474836<br />

4<br />

CRLF *)<br />

ONAPON= 0...2 CRLF<br />

TRIAPON= 0...1 CRLF<br />

RST-COUNTER= 0...65535 CRLF<br />

MAX-RST= 0...65535 CRLF **)<br />

ACT-RST= 0...65535 CRLF **)<br />

OK CRLF<br />

*) These lines are only given if a status value exists.<br />

**) These lines are only given if MAX-RST is greater then 0.<br />

- 23 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Values in <strong>de</strong>tail:<br />

Output Description<br />

WATCHBOX=00...05<br />

WATCHBOX_FS=00...05<br />

WATCHBOX_NP=00...05<br />

SWITCHBOX=00,01,03,04<br />

USERDEFINED=00...05<br />

00 = WB / SB is switched OFF<br />

01 = WB / SB is switched ON<br />

02 = WB is waiting of the next trigger<br />

03 = WB / SB is waiting of switching OFF<br />

04 = WB / SB is waiting of switching ON<br />

05 = WB Reboot time runs off<br />

+ 10 = sequence follows<br />

+ 14 = sequence started + waiting of switching ON<br />

RELAIS=0...1 0 = outlet of the WatchBox is OFF<br />

1 = outlet of the WatchBox is ON<br />

TIME=0...214748364 Counter (in seconds) for time after Power ON<br />

COUNT=214748364...0 Duration in seconds till start of the next process,<br />

e. g. after "{+} On=20"<br />

follows<br />

"{+} Get" � COUNT=20...0, <strong>de</strong>cremented, at 0 the<br />

outlet switched OFF<br />

TR=1...214748364 Preset retrigger time<br />

TA=1...214748364 Preset power off time<br />

TF=0...214748364 Preset error time<br />

TRIG-STATE=0...214748364 The last via "{+} Trig = n" passed parameter value<br />

ERROR-STATE=0...214748364 The last via "{+} Trig = n" passed parameter value<br />

before the Watchdog event.<br />

Note:<br />

TRIG-STATE and ERROR-STATE are only given if a status value exists.<br />

- 24 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Programming<br />

General<br />

Basically two different kinds of control of the WatchBox are possible. The certainly<br />

best and most sure method of the control is realized by the main program to be<br />

supervised itself, i.e. however also that the source co<strong>de</strong> of the main program is<br />

available and can be modified (Chapter 1). If the source co<strong>de</strong> of the main program<br />

is not available, however, the WatchBox must be served with a background<br />

program (2-nd method). Unfortunately, this is only the second-best method of the<br />

control, because there could be program errors which cannot be recognized with<br />

this procedure in principle. A problem with which, by the way, all Watchdogs have<br />

to fight.<br />

The most frequent software error (software in endless loop with Watchdog-<br />

Triggerung) can be recognized by the WatchBox, however, certainly ...!<br />

Controlling the WatchBox<br />

Settings and triggers of the WatchBox can be carried out only over the serial<br />

interface or the USB interface.<br />

In the easiest case of controlling it is enough, to trigger the WatchBox periodical<br />

after the presetting of the <strong>de</strong>sired Watchdog mo<strong>de</strong>. The WatchBox uses the<br />

<strong>de</strong>fault settings. An initialization of the WatchBox is not necessary.<br />

The WatchBox parameters can be varied in a wi<strong>de</strong> range, so that the computer<br />

remains, e.g., also a longer time switched OFF (power OFF time TA) or with very<br />

long re-trigger durations (TR) can be pursued. All parameters can be changed any<br />

time.<br />

The WatchBox can be also used as a plain 'switch box' without Watchdog<br />

functionality. In this case external <strong>de</strong>vices (like mo<strong>de</strong>ms, printers, lamps or<br />

measuring instruments) can be switched ON or OFF with the commands "{+}ON"<br />

and "{+}OFF" directly by the computer.<br />

In addition, the WatchBox also recognizes the problem "computer (or Windows)<br />

does not boot up“: After an error restart (initiated by the WatchBox) a trigger<br />

must occur through the WatchBox in a before pre-set error time (TF). If this does<br />

not happen, the WatchBox solves a further error restart and so on …<br />

- 25 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Recognition of Software Errors<br />

With customary Watchdogs a trigger is already realized by the writing process (or<br />

function call) itself, i.e. it cannot be recognized whether between two successive<br />

triggers in the main program generally something has changed. This leads to the<br />

fact that an endless loop in the main program cannot be recognized if in this loop<br />

performs a watchdog trigger.<br />

The WatchBox works in another way and also evaluates also the (optional) trigger<br />

status variable! With two triggers following on each other with the same contents<br />

the second trigger is ignored by the activated WatchBox. The program error<br />

<strong>de</strong>scribed on top can be also recognized only by this behaviour certainly.<br />

Examples<br />

Example 1<br />

In this example the WatchBox should switch OFF the connected computer after<br />

the correct shut down and switch ON 24 hours later again.<br />

Settings:<br />

1. A waiting duration of 60 seconds for controlled shut down of the PC is set.<br />

2. A Power OFF time of 86400 seconds (= 24 hours) is set<br />

3. Then the program can be finished (software shut down and switch OFF the PC)<br />

...<br />

...<br />

Send('{+} off = 60');<br />

Send('{+} on = 86400');<br />

...<br />

...<br />

...<br />

...<br />

software finished and PC shut down ...<br />

- 26 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Example 2<br />

In this (Delphi-) example the WatchBox-trigger (with endless loops recognition)<br />

occurs through the main program. It is supposed, on this occasion, that the<br />

procedure "Send" sends the given string to the serial interface.<br />

Settings:<br />

o re-trigger time 30 seconds<br />

o power OFF time 20 seconds<br />

o error time 180 seconds<br />

o following by regular periodical trigger<br />

var nStatus : integer;<br />

cStatus : string;<br />

Send('{+} tr = 30');<br />

Send('{+} ta = 20');<br />

Send('{+} tf = 180');<br />

Send('{+} Modus = 1');<br />

nStatus := 0;<br />

// main loop<br />

repeat<br />

nStatus := nStatus + 1; // status variable increment<br />

cString := IntToStr(nStatus); // status variable to string<br />

Send('{+} trig = ' + cString); // WatchBox trigger<br />

...<br />

...<br />

...<br />

until ...<br />

- 27 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Handling<br />

LED<br />

permanent OFF WatchBox not in Watchdog mo<strong>de</strong>, outlet OFF<br />

permanent ON WatchBox not in Watchdog mo<strong>de</strong>, outlet ON<br />

blinking (duty cycle 50:50, 0.5Hz) WatchBox in Watchdog mo<strong>de</strong><br />

(Tr runs off, waiting of the trigger)<br />

blinking (duty cycle 50:50, 5Hz) WatchBox in Watchdog mo<strong>de</strong><br />

(Ta runs off, waiting of switch ON after a<br />

Watchdog event)<br />

flashes (duty cycle 10:90, 0.5Hz) WatchBox in Watchdog mo<strong>de</strong><br />

(Tf runs off, waiting of new trigger after power<br />

ON)<br />

blinking 3 times a test page was recognized (during installation<br />

the WatchBox as plain text COM printer)<br />

flashes two times (cycle 1 sec.) WatchBox not in Watchdog mo<strong>de</strong>, outlet is<br />

switched ON at the expiration<br />

"inverted" Flashes two times (cycle<br />

1 sec.)<br />

Button<br />

WatchBox not in Watchdog mo<strong>de</strong>, outlet is<br />

switched OFF at the expiration<br />

With the pressure of the button (for more than 3 seconds) all watchdog features are<br />

always <strong>de</strong>activated and the state of the outlet can be toggled. After this operation<br />

the WatchBox always works in a static mo<strong>de</strong>. The LED indicates the topical state of<br />

the outlet.<br />

COM interface, USB interface<br />

• Connection via COM- or USB-interface (= virtual COM), 9600-N-8-1<br />

• No Hard- or software-handshake (3-wire-connection, RxD-TxD-GND)<br />

- 28 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Differences between mo<strong>de</strong> 1 (WatchBox) and mo<strong>de</strong> 3 (WatchBox_FS)<br />

- In mo<strong>de</strong> 1 the WatchBox starts after Power-ON (outlet) without waiting of<br />

trigger, i.e. the connected PC is switched on permanently. Then it lies in the<br />

responsibility of the PC to control the WatchBox.<br />

- In mo<strong>de</strong> 3 the WatchBox starts after Power-ON (outlet) and waits immediately<br />

for a trigger. If the connected PC within the time Tf does not trigger, the<br />

WatchBox carries out a Watchdog reset and is afterwards in the Reset loop, i.e.<br />

resets are carried out so long, until the PC triggers.<br />

Differences between mo<strong>de</strong> 1 (WatchBox) and mo<strong>de</strong> 4 (WatchBox_NP)<br />

- In mo<strong>de</strong> 1 the WatchBox starts after Power-ON (outlet) without waiting of<br />

trigger, i.e. the connected PC is switched on permanently. Then it lies in the<br />

responsibility of the PC to control the WatchBox.<br />

- In mo<strong>de</strong> 4 the WatchBox behaves like in the mo<strong>de</strong> 1 with the difference that<br />

the outlet remains switched OFF after Power-ON.<br />

WatchBox as Plain Text Printer<br />

If the WatchBox becomes appealed as a plain text printer, multiple commands<br />

cannot be "printed" directly one after the other (not within a print job). The<br />

software must be waited by every command for the acknowledge by the WatchBox<br />

(the WatchBox does not "know" that it is controlled as a plain text printer).<br />

- 29 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

Expressions Used<br />

COM Abbreviation for the serial interface<br />

Restart The computer start after Power-ON. Inclu<strong>de</strong>s also<br />

the cold-start<br />

Error-Restart Computer restart, triggered by the WatchBox<br />

Cold Start Computer restart after a hardware reset via the<br />

reset button<br />

Hardware-Reset A hardware reset is usually triggered via the so<br />

called reset button on the front panel of the<br />

computer. Unlike the software reset (e.g. via Ctrl-<br />

Alt-Del), the hardware reset in addition to the<br />

Power OFF/Power ON is the only truly safe method<br />

of computer-cold start<br />

Re-trigger-Time The Re-trigger time is the time that lies between<br />

the last trigger and the error-restart<br />

Switch OFF Time The switch OFF time is the time that the<br />

WatchBox outlet remains shut off after an error<br />

restart<br />

Error Time The error time is the time within which after an<br />

error restart triggering must be started. If this does<br />

not happen a new error restart is triggered.<br />

Triggering The WatchBox expects within the re-trigger time a<br />

cyclic triggering. The status variables of two<br />

consecutive triggering must (when used) not have<br />

the same value (these triggering are ignored).<br />

Main program or monitored<br />

program<br />

Describes the program on the PC, that executes the<br />

triggering of the WatchBox<br />

- 30 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628


<strong>antrax</strong> Datentechnik GmbH<br />

info@<strong>antrax</strong>.<strong>de</strong> - www.<strong>antrax</strong>.<strong>de</strong><br />

WatchBox-Service<br />

Programm<br />

WatchBox-<br />

Button<br />

WatchBox-LED<br />

WatchBox-Outlet<br />

The WatchBox can of course also be used when<br />

the source co<strong>de</strong> of the main program is not<br />

available and thus can not be modified for usage of<br />

a WatchBox. For general setting and control<br />

(=triggering) please use the WatchBox Service<br />

Program.<br />

Describes the only button of the WatchBox<br />

Describes the only LED on the WatchBox<br />

Describes the 230V outlet located on the<br />

WatchBox. Here you will plug the computer or<br />

any other external <strong>de</strong>vice.<br />

- 31 -<br />

Hasenbrink 4, 32052 Herford, Germany Tel. +49 (0) 5221 929660 Fax +49 (0) 5221 9296628

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!