Standard procedure is to disconnect the negative battery cable when replacing the generator to avoid shorting the output wire to ground with a metal tool. Disconnecting the battery removes the 12-volt memory to the computers. That erases the diagnostic fault codes, then that valuable information is lost. It's important to read and record the codes before doing this type of service so you know what they referred to.
More than likely the Engine Computer will detect the problem again and set the fault code again. Some of the tests it runs only occur at certain times or under certain conditions. Intermittent problems may take some time to act up. When intermittent problems are relatively minor, the Check Engine light will turn off while you're driving if the problem goes away. If the problem is more severe, the light will "latch" on during that drive cycle and stay on even if the problem stops acting up. The light will be off the next time you start the engine until the problem occurs again. If it's still more severe, the light will latch on all the time, including after restarting the engine, even if the problem goes away. The most severe are when the Check Engine light is flashing. That means stop the engine as soon as safely possible to avoid overheating and damaging the expensive catalytic converter. Too much unburned gas is going into the exhaust system where it will burn in the converter.
These articles can explain it better than I can:
Let me know if that helps or if I can explain something better.
Thursday, March 30th, 2023 AT 5:59 PM