If a dishwasher does whackadoodle stuff like empties, then fills, then empties or fails to fill, fills too much, just stops and all manner of other weirdness then one thing you should check is the flowmeter on many modern dishwashers
Depending on the make and setup these come in various guises and can be built into the water metering tank, which is a big plastic chamber at one side the water goes into or, they can be remote from that. If you can't find the flowmeter in yours just ask in the forums for help.
Checking that tank though is a thing you should do with most dishwasher issues as, if that's blocked or restricted then you will have all sorts of issues. Clean it out if possible but if you can't and, some you just cannot clean, replacement is the only option.
How It Works
As usual, the dumbed down plain English explanation.
The water tank fills up with water and it's done a number of ways but suffice to say that the water needed for the next fill is often held in this tank.
The volume of water is measured by the flowmeter.
So what happens is the dishwasher calls for water and a valve opens, water rushes into it and the flowmeter is in that water flow, inside that a little spinner thing that has a tiny magnet on it, spins furiously and the magnet sends a small impulse that allows the electronic control to "count" the flow. Thereby the electronic controller knows how much water has entered the dishwasher.
Once the calculated desired water is loaded in, it shuts that valve and the dishwasher progresses.
Well the flowmeter can get gunked up and and you can't clean them so, you need to replace it. On some it's a separate parts on others it's built into the metering tanks so you need to swap out the whole tank in that instance.
A word of warning, these things are *VERY* specific to the make, model and often product codes or serial numbers and you *MUST* ensure that you get the right one or, it will not work! So please do check with us what you're ordering is correct before you do so.
If the flowmeter tells the electronics something it shouldn't then you can often see the electronic controller getting its proverbial knickers in a twist, it can't work out what to do or how to deal with the weird reading so it does all manners of crazy stuff. On others, it recognises the problem and throws up an error code which will vary depending on the machine.
With a blocked or restricted fill chamber you get the same sort of symptoms.
Often the reported fault will be that the dishwasher fails to fill, fills, stops then does nothing and so on or it just errors out. The problem there being that a heater issue will often look similar in terms of the reported fault so, an investigation is required along with fault finding, guessing is most certainly not advised.
What we see a lot of people doing at times is thinking it's the board that has an issue, only to spend cash on that to find it's not and the problem persists. Another reason we say, guessing is not advised and if you really don't know or don't want to spend the time diagnosing the problem then your best bet is probably to have a pro-repairer look at it.