@DrumClock, why yes you can. I've just gone through this myself. Only, for which board are you using? I've done it with a MEGA2560 and SMART RAMPS (very similar to RAMPS 1.4).
Here is a config for it for reference .. [
github.com]
BTW: It took me a while to figure out that you must connect the DIAG pin to one of the Z-MAX/MIN pins.
Also check out Gcode command M43 .. you want watch the pin to confirm what is what.