I am building my own CNC machine. I previously had a Makerbase MKS DLC32 controller but that controller didn't work with my StepperOnline DM860T drivers so i bought a Mach3 board (the red one).

I have 2 motors for the Y-axis, so like in the previous board i connected both signals to the stepper drivers from the YP and YD connector. When i did that the Mach3 software froze multiple times and starting a program wouldn't work.
I googled and i saw i need to use the A-axis and use it as a slave to the Y-axis.

When i did that i noticed the software freezes all the time too. As soon as i disconnect one motor from the Y-axis, the program works again.

Than i unmounted both motors en tried them on the bench. To my surprise they worked perfectly. I could move the axis by keyboard and when i run a program, i saw both motors do the exact same thing.
After that i reïnstalled both motors and BAM, the program crashes again.

I measured all the wires but they seem to be correctly installed (also it works on the bench).
What could this strange problem be?

Thanks for the help and i'm sorry for my bad english