Controlling Stepper motor with 24V signals

I've changed the driver to a brand new one. I tested the new driver with a raspberry and works properly.

I'm using a Power supply of 24V 5A

Further investigating I found this written by the manufacturer:

Controlling a stepper motor with our DIO or DO modules would be difficult as the max. bus cycle frequency (and therefore half of this value also as signal frequency
of software controlled square waves) is about 500 Hz and the output voltage is 24 V. We suggest to use intelligent drives controlled by CAN or other field busses.

I think I'm better off trying to use a different controller. Thank you everyone who suggested things to try. I appreciate it a lot.