next up previous contents
Next: Safety Up: Operation Previous: Watch Dog Timer   Contents


Reset log

Because the watch dog timer resides in hardware and performs a cold boot when it reaches terminal count, there is no good way of knowing if the ZY was restarted because of an interruption of power, a manual reset or a watch dog reset. However, if a watch dog reset is suspected, the file REMOTE.LOG should be examined. This file contains a log of all restarts, as well as a record of which command or subroutine was executing at the time of the restart. The ZY manages this by storing a trace of which command it is executing, and optionally what step within this command (to aid in troubleshooting the command) in the scratch registers of the Embedded PC's Serial 1 and Serial 2 16550 UARTs. When the ZY is reset, the last command executed, and the step within this command, is present in the UART scratch registers. If the reset was caused by anything but a power loss, these registers are preserved, and the ZY can read them and update REMOTE.LOG when it restarts. An sample portion of REMOTE.LOG follows:
  Program started Tue Aug 19 14:15:26 1997
    after a reset while in function TRG, step 4
  Program started Thu Sep 25 18:36:32 1997
    after a reset while in function RST, step 0
  Program started Fri Sep 26 23:55:41 1997
    after a reset while in function unknown function, step 173
  Program started Wed Nov 05 20:50:58 1997
    after a reset while in function unknown function, step 255
  Program started Thu Nov 06 14:12:54 1997
    after a reset while in function unknown function, step 237
  Program started Tue Nov 11 16:11:47 1997
    after a reset while in function AXIS, step 31
  Program started Thu Jan 22 13:12:48 1998
    after a reset while in function message loop, step 255
  Program started Thu Jan 22 13:20:17 1998
    after a reset while in function ALPHA, step 0
  Program started Wed Jan 28 09:36:20 1998
    after a reset while in function unknown function, step 132
  Program started Wed Jan 28 12:48:38 1998
    after a reset while in function unknown function, step 173
  Program started Wed Feb 18 01:32:30 1998
    after a reset while in function unknown function, step 4
The entries to this file should be carefully interpreted, as they can lie. For example, if the restart was caused by a power loss and the command recording scratch register comes up with a random number loaded in it that coincides with the number of a known command, then the ZY will record that command as the last command executed before the restart, even though that command may never have been called. (In the case that the number does not match a know command, the log entry reads ``unknown function.'') However, if it can be verified that no power loss occurred and no manual reset took place at the indicated time, then the entry can be considered valid and may point to a problem in the code of the indicated command.
next up previous contents
Next: Safety Up: Operation Previous: Watch Dog Timer   Contents
Ramon E. Creager 2002-03-11