What I've described by way of the behaviour of the Mach4 software implementation of backlash compensation, shows a bug, not what you can get with a software solution. It's clearly not implemented correctly, at least when it's single stepping.
I don't know from where this came, but you are NOT correct about this. I feel I must address this because this is how bad information starts circulating.
[rant]
There is NOTHING in Mach 4 that implements backlash compensation. What you described as a "bug" is precisely WHY we don't do backlash compensation. Because it is a kludge! (Hint: it is implemented in the motion controller, not Mach 4) It is not a perfect solution and it never can be. What you are wanting can NEVER be accomplished with "backlash compensation" with only
one encoder on the motor/drive/screw.
There are only two ways to help overcome the problem. One is to apply a load thats always on one direction so there's no load reversal on the leadscrew. This is used on some Contact Lens turning lathes. It's not appropriate for large machines though. The other is to directly measure the table position with some kind of Linear Encoder.
So why are you calling it a bug when it is clearly a compromise? It isn't a bug. It is a feature that doesn't work they way you want/wish. Right? I mean, to be honest, you plainly point out the two ways to solve this problem. And I completely agree. This so called backlash compensation isn't one of the two ways to solve this.
[/rant]
The rest of this post/thread is is for other people that might be reading who may not understand where the motion/PID loop is closed.
1. Mach never closes the PID loop. It can't, as Windows is not a real-time application.
2. No controller that outputs step and direction is going to close the PID/motion loop. Not even a Galil in stepper mode closes the PID loop.
3. The PID motion loop can be closed on the motion controller (which is always a real-time device). A Galil or DSPMC controlling analog servos is an example of this.
4. This PID loop can be closed on the servo drive. (newest way) Striplar's servo drives are an example of this.
So #4 above, step/dir, digital control, position mode, or what ever any servo manufacturer calls it today really makes things nice by closing the PID loop in the servo drive. If the ESS or equivalent controller tells the servo to go 5 steps, the PID loop in the servo drive makes sure that the motor hits its' numbers. So why would ESS ever want to close the PID loop? How could a controller like ESS close a PID loop with a digital input servo drive that also has a PID loop? There can be only one PID. (Kind of sounds like the Highlander movie, right?) So implementing dynamic position correction based on feedback from (again) a single encoder will never happen with a servo drive that ALSO has to have a PID loop to implement a step/dir control interface.
Some common methods of backlash/motion system flex compensation:A. Galil has a feature called step and correct. And several other motion controllers that work with Mach have talked about implementing it. This is where the motion plan says go from point A to point B but the stage never makes it to B because of the inherent flex in the motion system. So once the motion controller gets to point B on the motor encoder, it then looks to the load encoder to see if it made it. And if not, the motion controller issues more steps to to the servo drive to try and get it there. So at the end of the move:
1. step once
2. did we make it? If no, go to 1,
Sounds good, right? But this step and correct takes TIME at the END of the move to implement. It works really well for single axis/stage applications. However, what if the movement is in combination with another axis/stage to interpolate a hole? Now we are back to the problems of so called "backlash compensation" with a single encoder on the load. Only worse because nothing happens until the end the move. Sure enough, your interpolated hole will be oval. But the table would have stopped at that correct place. Big whoop. Did we solve the problem? I don't think so.
B. Then there is the so called backlash compensation that we all know and hate, which is actually a derivative of the machine in one direction only paradigm. Only with a twist. It relies on a lash in/lash out computation based on direction. So you have to establish a direction first. Usually, this is done by homing the axis. When you back off the switch, the lash is taken out in the direction opposite the switch. So from that point on, the lash is taken out or put back in based on the direction of travel. But guess what? Taking the lash in or out doesn't happen instantly. It takes time. Which is why I consider it a huge compromise. Not to mention the fact that it doesn't/can't take into account differing load situations with may increase or decrease the "lash" (really motion system flex) depending on the table position/condition. What you get is striplar's complaint about single stepping in tenths of a thousands not "feeling"/marching/incrementing correctly. A static preset "compensation" amount is NEVER going to be perfect because the motion system is NEVER perfect. If it were, we would not be having this conversation. This static compensation method is good (relatively) for machines with flex/backlash in the range of .004" - .006". But we could never work in "tenths" on such a machine.
C. Then we can take this static compensation one step further by "mapping" the flex of the motion system based on the measured lash at any give position. This certainly gets better results, but it is tedious (at best) to fully and precisely "map" a table or screw. Most people simply do not have access to the equipment to do it correctly. Again, this is a static compensation method, albeit more granular, that can't account for changing load or table conditions.
So we should really only consider a dynamic solution to fully eliminate the 11 micron (or 4 tenths) flex of a machine like striplar's.
I can certainly understand wanting software that costs $200.00 to fix a hardware problem that can potentially cost $5K or more to fix. Who wouldn't? We joke about that all of the time. Our saying is "Fixing hardware in software since 2011".

So for the many that read this, it is important to understand the difference between a dream and reality. But that isn't always easy todo because there always seems to be lot of grey area between the two.
Steve