The next time it shuts down, go outside and pull the generator cover off. There is a light on the switch. It will blink out a code if the generator detected a fault.
From the Onan service manual:
"FAULT CODES
The genset controller provides extensive diagnostics by causing the status indicator light on the Control Switch to blink in coded fashion. Following a fault shutdown, the indicator light will repeatedly blink 2, 3 or 4 blinks at a time.
Two blinks indicates a low oil pressure fault.
Three blinks indicates a service fault. Press Stop once to cause the two-digit, second-level fault code to blink. (Pressing Stop again will stop the blinking.)
The two-digit code consists of 1, 2, 3, 4 or 5 blinks, a brief pause, and then 1 to 9 blinks. The first set of blinks represents the tens digit and the second set of blinks the units digit of the fault code number.
For example, Fault Code No. 36 appears as:
blink-blink-blink pause blink-blink-blink-blink-blink-blink long pause repeat
Four blinks indicates that cranking exceeded 30 seconds without the engine starting.
Note: Fault Code Nos. 3 and 4 are first level faults. Avoid interpreting them as second-level
Fault Code Nos. 33 and 44, which have purposely not been assigned as fault codes.
Fault Code 36 means "I shut down but I have no idea why!". That means none of the monitored conditions, such as low oil pressure, caused the shutdown. It can be just fuel starvation.
Restoring Fault Code Blinking The fault code stops blinking after five minutes (15 minutes, Series HGJAA & HGJAD). Press Stop three times within five seconds to restore blinking. Note that the last fault logged will blink even after the condition that caused the shutdown has been corrected."
Hmmm, that last sentence says a fault code may still be blinking, doesn't it?
https://thecampingadvisor.com/onan-g...r-fault-codes/
Onan Generator Fault Code List
Code 2 - Low Oil Pressure
Code 3 - Service Check
Code 4 - Over Crank
Code 12 - Over Voltage
Code 13 - Under Voltage
Code 14 - Over Frequency
Code 15 - Under Frequency
Code 19 - Governor Actuator Overload
Code 23 - Low Oil Pressure Cutoff Switch
Code 27 - Voltage Sense Error
Code 29 - High Battery Voltage
Code 31 Overspeed
Code 32 - Low Cranking Speed
Code 35 - Control Card Failure
Code 36 - Engine Stopped
Code 37 - Invalid Generator Set Configuration
Code 38 - Over Current (Field Overload)
Code 41 - Generator Rotor
Code 42 Processor
Code 43 - Processor Fault Code.
Code 45 - Speed Sense
Code 47 Ignition
Code 48 - Generator Field Sense
Code 51 Processor
Code 52 - Fuel Injector
Code 54 - MAT Sender
Code 56 - MAP Sender
Code 57 - Over Prime
Code 58 - Exhaust Gas Temperature Shutdown
Code 81 - Exhaust Gas Temperature Sensor Open
Code 82 - Exhaust Gas Temperature Shorted