Define it 'turning off'. Do all the display lights go off? Does the output setting reduce to yellow?
If the system is shutting down output, it likely thinks the salt is low; get it checked, and carefully inspect your cell.
If the display is going off, you probably have circuit board problems of some kind.
From experience, if you have a circuit board problem, it is typically simpler and cheaper-in-the-long-run to replace your SWG. The Zodiac, like most SWGs, has two circuit boards, either one can cause your problem. You can spend $350 on one, only to discover it is the other, and the first is not refundable once installed. You could get it tested by a technician to be sure, but you're again into more money. Or, depending on the problem, wait and see if it still does the job. I had the control board on one die (we had four Zodiac LM2's in operation) - can't change output, no lights, etc - but it still worked just fine for two years, generating away at just the right level.

And when another unit died (board AND cell), we replaced it with an Aqua-Rite and stole the circuit board to fix the first.