E40 is a door lock fault.It could be as simple as replacing the door lock but it could be that the lock has burnt something out on the main pcb when it went faulty.you have to remove the old door lock and check it for the all so common brown heat burn mark on it.then you need to buy and fit a new lock and pray that it works otherwise you will need to replace main pcb which to be honest you might as well buy a new machine
CK, December 2012