Bugger me my machine went and did this yesterday.!! . . . I've just transfered all my control box into a new larger box. . . . I knew straight away what it was and to be honest I'm embaressed that I didn't think about it in your case.

It's one of the Dir pin wires thats either come out at drive or connection/wire come lose in motor. To be honest I didn't expect it to behave how it did.? I expected it would only move in one direction but it infact it was moving in one direction then changed direction randomly.!!