Most dishwashers use a water inlet valve with a electronic solenoid to allow the dishwasher to fill up with water. The dishwasher will use either a Timer or Control board to tell the dishwasher when to fill up with water and for how long to fill up with water. Most dishwashers do not measure how much water is filling up into the dishwasher, instead they fill up with water for a certain amount of time. 60-120 seconds is a common amount of time for a dishwasher to fill up with water, but it will vary depending on the make and model of the dishwasher.
it might only fill up with 50% or 75% of the water it was supposed to
On the inlet side of the water valve there is a screen. The purpose of this screen is to keep
sediment out of the insides of the valve. If any small objects get into the valve it can cause it not to work or to leak and flood your house/floor. Over time the inlet screen on the valve will get hard water deposits and other debri stuck in the screen which clogs up water valve and causes it not to flow as well. So now when the dishwasher calls to fill up with water for XX seconds, it might only fill up with 50% or 75% of the water it was supposed to. Symptoms of a clogged water valve can be poor washing, surging sound from the pump, and soap not washing out of the dispenser.
When this happens I always recommend replacing the water valve. I have seen many people try to “clean” out the screens, and by doing this the valve developed a leak and cause thousands of dollars in damage to their house. Most water valves are pretty inexpensive ($15-$75), so I recommend to just replace the valve if you see that the screen is clogged up.
To check to see if your valve has a clogged screen, pull it off the dishwasher and look inside the inlet side of the valve.
Here is an example of a clogged screen on a water valve:
Here is a good clean screen on a water valve: