Mantracourt Electronics Limited
DCell & DSC MantraCAN User Manual
48
Chapter 7 Self-Diagnostics
Diagnostics Flags
The main diagnostics facilities are by means of the flags. See chapter 3 Flags for a full description of the flags and
their meaning.
The flags are normally used something like this.
FLAG
is read at regular intervals by the host (like the main output value, but generally at longer intervals)
If some warnings are active, i.e.
FLAG
is non-zero, then the host tries to cancel the warnings found by writing
FLAG
= 0
The host then notes whether the error then either remains (i.e. couldn’t be cancelled), or if it disappears, or if it
re-occurs within a short time, and will take action accordingly.
The warning flags are latched indicators of transient error events: By resetting the register, the host both signals
that it has seen the warning, and readies the system to detect any re-occurrence (i.e. it resets the latch).
What the host should actually do with warnings depends on the type and the application: Sometimes a complete log
is kept, sometimes no checking at all is needed.
Often, some warnings can be ignored unless they recur within a short time.
Warning flags survive power-down, i.e. they are backed up in non-volatile (EEPROM) storage.
Though useful, this means that repeatedly cancelling errors which then shortly recur can wear out the device non-
volatile storage – see
WARNING: Finite Non-Volatile Memory Life
in
chapter 3.
STAT
provides a current status of the device. These flags are not latched and not saved on power fail.
Diagnostics LED
A new feature for Version 3 is the addition of an LED to indicate the current status of the device. If all is healthy the
LED should flash ON for a period of 100mS , The rate at which the LED flashes is 0.5 second.
If an error conditions occurs which is based on any of the following error flags being set then the operation
of the LED will invert. IE the LED will flash off for 100mS at the rate set in the table above.
These flags Being, TEMPUR, TEMPOR, ECOMUR, ECOMOR, CRAWUR, CRAWOR, SYSUR, SYSOR & LCINTEG.