It may be possible to do this with Mach3 but there is a free option that works well with curbside grade computers. The software was written for DRO and it has features people expect from a DRO.
DRO SOFTWARE
Although I haven't got around to mounting encoders to the mill, I have tested the system and it works well. Ignore any mention of following errors in the link below, stepper motors can spin an encoder at speeds no human is going to duplicate without gear assistance
http://www.cnczone.com/forums/730289-post16.html
The encoders came from here
Digi-Key - 102-1307-ND (Manufacturer - AMT102-V KIT)
Anyone who says "It only goes together one way" has no imagination.