Oops, yeah I didn't finish #2. Danger of responding late at night. If the Z axis ends up more positive, meaning higher up, that means that it is missing steps in the downward (negative) direction. This is not the usual case for Z axis errors as the "up" direction is usually harder since up requires working against gravity. Going down you have gravity helping.
Yes, you can change the step pulse width. Go to our plug-in configuration dialog and click on the "Motor Config" tab. You can select 5, 10 or 20 microsecond pulse widths. According to the G540 documentation, 5us pulse width *should* be fine. But it couldn't hurt to try 10 or even 20 (if your max velocity will allow that - the plug-in will warn you if not).
If the DRO shows the correct position according to the GCode, that means that the PMDX-410 is generating the proper step pattern. Hmmm... or else the PMDX-410 it is somehow missing an equal number of positive and negative going steps. But that wouldn't give you the physical position error you are seeing.
You say you tried swapping motors, cables, etc. Did you try using a different G540 motor output? For example run the Z axis from what the G540 labels as the "Y" axis (and changing the axis mapping in Mach4 accordingly).
I am puzzled that removing the PMDX-410 from the control cabinet changed (but didn't fix) the problem. I'll have to think about that a bit.
Possible causes of the physical position error include:
- under powered motor (driving with too low a current setting), though again this usually manifests itself
with the Z axis ending up lower than expected.
- motor voltage too low and/or step rate too high and the motor can't physically respond fast enough.
I would expect this kind of problem to affect both directions of travel, unless the down motion is always
faster (in the GCode) than the up motion. And you said you tried lowering the max velocity, which
should work around this issue *if* you lowered it enough (and how much is "enough" I can't say
other than try 1/2 and 1/4 of your original velocities).
- Time between changes in the direction signal relative to step pulses (called setup and hold times).
The G540 manual calls for 200 microseconds [EDIT: that should be NANO seconds] for setup and hold,
which the SmartBOB devices should easily meet. Unless you have an incredibly high acceleration
and feed rate. But again, I would expect
that is this were the issue that it would manifest itself with a more random position error.
Of these possible causes, the last (setup/hold times) would be a SmartBOB issue, if that is an issue. Try changing the step pulse width and swapping motor connections on the G540 (if you haven't already) and see if that changes anything.