A dishwasher heater is designed to help maintain water temperature during the wash and rinse cycle and dry the dishes at the end of the cycle. A dishwasher heater is controlled by the electronic control, timer, and thermostat. Dishwasher heaters that are located in the bottom of the tub, especially plastic tub dishwashers are only effective if the water coming into the dishwasher is hot enough to begin with. The dishwasher manufacturer cannot make the heater so powerful that it will melt the tub located just a few inches below it. That's why the water temperature coming into the dishwasher is critical if you want clean and dry dishes at the end of the cycle.
If your water temperature is below 130° as it enters the dishwasher, odds are your dishes will be dirty and wet at the end of the cycle.
The amount of time that a dishwasher heater is on depends on the manufacturer, model and the cycle selection. In other words the timer or electronic control will determine when electricity is supplied to the heater.
The thermostat located underneath the dishwasher usually attached to the tub, senses the temperature of the tub and will cycle the heater off when the temperature of the tub reaches the manufacturers' designated temperature.