Machine had been solid for quite some time. I'm now getting what appears to be a drifting Z height as the job progresses. I'm using a dial indicator to show what's happening. After it does its rapid, you can see it go to -0.01117 accurately. Then, as the job progress to a couple of different Z heights, every time it returns to -0.01117, it's inaccurate on the dial indicator. (first issue observable at 0:22 in the video)
Here's the video of what's happening:
If I stop the job and issue an MDI to Z0.0, it returns accurately to 0 on the dial indicator. If I use the MDI to control the Z height manually and make it step to that -0.01117, then step to other increments and return, it works fine. I've also done a simple square routing, stepping the Z height down without issue. The Z motor is also calibrated accurately.
That makes me believe it's something to do with the project file (though I've been using it successfully without changes) or the controller itself. (Leadshine mx4660)
Well, you're obviously loosing steps. I triple check all wiring to the Z axis, then triple check all of your couplers and set screws. 90% of the time lost steps is a mechanical issue unless you changed software settings or hardware that required software setting changes just before the issue started..
So I readjusted the velocity on the Z motor (from 15 to 30) which got rid of the weird sound. I thought that actually fixed the problem, but I think what's happening is that it appears that Mach is getting into incremental vs absolute mode. My last test, it continued to plunge deeper and deeper into the piece when it should have been returning to the same height. If I run all the Z height adjustments manually through MDI, if works fine.
I trimmed down the project file to make a repeatable process. I determined that at line 341 is where the Z axis becomes off. It will move up and down through several moves to come back to zero before that point, but it's at that line, consistently every time that it begins to be off. I've run it 5 times and each time at that line, it would return to -0.003 instead of 0.0. So I tried slowing down the federate on the Z axis from 20 to 10 (ipm) and the issue went away in my test file.
How is it that feedrate is causing the axis to lose it's position at exactly the same point every time?
OK, I think I have it figured out. All of my stepper motors are the same. Both X and Y were configured to a velocity of 90, acceleration of 4. My Z axis was configured to a velocity of 30, acceleration 4. I got thinking about the initial F code to set the federate of the Z axis (20), but noticed that the F code that immediately followed (60) remained unchanged when the subsequent Z axis changes were run. That got me wondering about the effect on the ESS. (maybe overdriving the velocity max?)
By changing the Z axis motor velocity and acceleration to match the X and Y motors, all steps remained accurate throughout the job. I'm not sure if that's a bug in Mach, ESS, or the Leadshine controller.