Power fail detection and recovery, Numerical error handling – Micromod MOD: 1800P - MOD 30ML Identity Module (Version 2) System, I/O and Communications Functions User Manual
Page 25
Logic Functions - Book 1
DATABASE DESCRIPTION
2-13
If an instrument with a memory module shuts down (watchdogs for example) and cannot run
again, the shut down information in the memory module can still be read. To do this, write
protect the memory module, put the module on another instrument, and read the shutdown
information using the STATUS display. Failure to write protect the memory module will cause
the data to be written over by the instrument when it is powered up.
2.5.4
Power Fail Detection and Recovery
A power fail (low voltage or brownout) condition is detected by the hardware and will generate
a non-maskable interrupt to the processor. The processor will complete any crucial operations
that it may have been in the middle of when the power fail occurred.
In particular, a write in progress to the instrument database and to the backup memory
module (if present) will be completed, in order to insure the integrity of the database when
power is restored and the instrument comes back up and running. If a database write was in
progress, the instrument will return to complete the write after responding to the interrupt, and
then wait in an idle loop until a power on reset occurs or full power is restored.
If a brownout lasts for less than 50 milliseconds, the instrument will continue functioning
without any effect on the processing state. If a power failure is longer than 50 milliseconds,
the instrument will perform a complete power up sequence.
2.5.5
Numerical Error Handling
In general, numerical errors (division by 0, floating point overflow or underflow, etc) will result
in a diagnostic in the function block in which they occur.
In floating point calculations, division by 0 or floating point overflow will generate a maximum
positive or negative value (floating point infinity less one as defined by the IEEE 754-1985
standard). If infinity is a partial result of any equation, the final result will also be infinity (in the
expression block, a saturation may take place as in the equation A+1/2B where B goes to
infinity). Thus, the resulting output value of a block in which a floating-point error was
generated can be compared against limits and rejected as out of range.
Floating point underflow (for example, a very small number added to a large number, the
result being no change to the large number) can be detected by checking the equation values
prior to the calculation.