dishwasher will not complete its cycle

the dishwasher will start and shut itself off a couple minutes later, pretty much after it fills up with water. could this be the motor locking up or would it have something to do with the control panel?