The DM542T driver supports a pulse/dir interface and not the phase sequencing generated by stepper.h
See this simple demonstration code from Robin2 about how to run a pulse/dir motor driver without the use of a library.
The mystery to me is why the code using stepper.h worked with the DM542T on a Uno.