frigidare diswasher

my frigidare dishwasher starts and about 30 minutes into the wash it cuts out and I get the PF code (power failure) I replaced the service switch on the wall also replaced heating element ( thought it might be cracked) but its still doing the same thing any Ideas ?? thanks for the help.