I haven't delved into using encoders with stepping motors too much. From my research, you need to have a controller that can provide the closed loop control, rather than software handling that process. I have also found from my research that using encoders on stepping motors is generally used to stop the machine in the case that the motor failed to achieve the commanded position for some reason and gives the user the chance to correct and continue with the job.
If you want proper closed loop control, it may be best to go with servos and servo controller that provide the closed loop control within the real of those two components.
Click the link to add information to this solution:
CAN I USE A STEPPING MOTOR WITH AN ENCODER?