Controlling a series of operations in washing machines