If you have separate drivers you can even swap a driver to check if that's the problem.
Another step is to check the DIR signal which should change if you change direction.
Or a end stop which is faulty might screw up the system.
Give good explanation about the hardware that you use ( including fotos ) and how it's connected.
With that a better help can be given.
Regards, Toin.