If it shuts of immediately it is the Control Board. A common problem. Heat does cause it to fail. I have changed many of them. The machine might have low hours as I have changed them on fairly new machines as well as ones with many hours.
300-5047 is the part number up until about 2 years ago. Easy to change but a very expensive part.
You can buy a Cummins-Onan part or now an aftermarket is available...
http://www.partsfortechs.com/asapcar...yword=300-5047