The control board is trying to shut the unit down. when you hold pre-heat button down you are by-passing control board and supplying voltage
directly to fuel pump and run solenoid at fuel inj. pump., thus engine continues to run. but holding preheat switch in for too long will overheat and damage glow plugs. As other posters have suggested, you may have bad oil pressure switch, hi water temp switch (although this switch will usually run for few minutes if bad). There is also a overspeed adjustment on control board that can need adjustment. And , finally, if generator is not producing a.c. power, the control board will shut unit down. Possible causes for this are bad field brushes, voltage regulator, or (hopefully not) rotor or stator shorted or open.
And, is generator drive belt driving the generator rotor? This unit has a ribbed belt that drives the generator. There are so many causes for the symptom you have....you need to get a factory service manual, or find a competent service facility. THis generator , as well as all the RV/Mobile generators have been "orphaned" by the manufacturer, but parts are mostly still available.