The F51 code indicates a RPS sensor failure.
The RPS sensor is a sensor that monitors the motor movement. The F51 indicates the control is not seeing any motor movement. The problem can be with the sensor or it may be with the control. This can be a difficult problem to pin down even for a technician.
The image below will show how it is accessed but I's suggest a technician check and repair this problem.
Remember to unplug the washer first.
With more detail about the problem I may be able to assist you further.
If you do not feel confident repairing this problem yourself, then you can have it repaired at your home by a Sears technician. Here is a link for the website:
Sears Home Services