Small Engine Troubleshooting Problems? Ask a Mechanic Now.
Code 13 is not an uncommanded shut down, it is Under Voltage.
The first thing ou need to do is to shut off the circuit breakers of the genset, connect a voltmeter to the breakers, start the genset and measure the voltage getting to the circuit breakers.
How much voltage do you get?