When driving my car with the A/C on all of a sudden the A/C starts blowing hot air, all the dash board guages stop working and the door locks stop working. The car is still running. If I stop and put it in park I can no longer get out of park. I disengaged the battery for 30 seconds and it all works again. My service engine light goes out as I reset it. This has happened to me twice. Also the fans stop working in the engine

Sounds like a case of a ground wire coming loose somewhere.It would help to have a wiring diagramme and find out what all these circuits have in common.Barring that,some good old flashlight work under the hood and fuzeblock may be in order.P.S.:Unhooking the battery too many times on a modern car is a good way to cause additional damage,so be discretionary.May the electrons smile upon you.

Next time this happens, try wiggling the ignition key and gently moving the switch forward and backward (not enough to turn off or try to start the vehicle) It may be you have a failing switch that is cutting power to all but the engine components. (The ignition switch actually has several switches that complete several different circuits)