Off the rails??
This usually implies to me that one of the + or - power supplies has exceeded its current limitation (exceeded the maximum current limitation of one of the rail voltages) and the power supply is loading - voltage beginning to decrease due to over current conditions... I don't think this is what you mean. You probably mean program corruption, or "lost it's brains" scenarios???
Search here for topics regarding: Error Recovery, controlled crash, re-initialization, Alarm recovery, RSLogix User Fault Routine.
You will find a cornucopia of information.