Planning for “Abnormal Exits”

One of the more obvious causes of abnormal exits is the proverbial power failure.  With a power failure, the programming logic has no vote in how the system handles itself.  When a power failure happens, the system behavior is dependent on the failsafe strategy of the mechanical designer.  The failsafe strategy is not usually as critical in machine control as it is in process control. When recovering from a power failure it’s important to know whether you had a graceful shutdown which can be accomplished by setting flags within the program to keep track of whether or not you were running and what you were doing.  Then based on what you were doing when the power failure occurred, you need to determine how to recover (if possible) from that interrupted condition. For example, you might have been scaling up an expensive batch of raw ingredients and were only part way through the batch.  If you have kept track of what you were doing and if in a sequence what step you were in and if batching what your previous actual weights were for the respective …