Ok, finally got everything working now. Works well, although a bit jerky since there's no acceleration control from this. Here's the files for anyone in the future who might need to set this up. I used part of the hal code from here:
forum.linuxcnc.org/47-hal-examples/48626...e-lcnc-2-9-mpg-hal-s
I put the mpg code in the custom.hal file instead of trying to fit it into the main hal.
Attachment not found
Attachment not found
Attachment not found
And here's the pinout that I used:
The DB25 connection is just a male and female DB25 connectors being used as an intermediate connection between the MPG and the P1 connection. It makes it easier to change wiring and to disconnect if needed.
Attachment not found