Hello Guest it is October 13, 2019, 07:25:20 PM

Author Topic: Strange axis skew - maybe a Mach machine profile bug?  (Read 7124 times)

0 Members and 1 Guest are viewing this topic.

Strange axis skew - maybe a Mach machine profile bug?
« on: July 29, 2012, 08:15:24 PM »
My X2 minimill has been running like a champ for a couple of years cutting 1000s of parts for my fly fishing reel kits. A few weeks ago, I decided to to do some upgrades and repack the ball nuts with oversize bearings to remove some backlash. I had enabled backlash comp last year (.002" on X and .003" on Y) to help a bit.

Long story short, after the upgrades and bearing repack I had a problem where the Y axis would slowly skew over the course of a run. I tried several programs that I had used 100s of times and they all failed to varying degrees. I checked all the mechanicals, backlash, make sure backlash comp had been disabled, etc. For several weeks I have been out of commission. I can not hear missed steps when running. I slowed my rapids down from my normal 125IPM to 75IPM and accel from 25 to 5. Still no change. I even ordered and installed a much bigger stepper on Y and the problem persisted.

Today, I went back to basics. I first wrote a little gcode program to exercise the mill. Here it is:

Code: [Select]
M98 P01 L50 (call subroutine 1)
G0X0Y0
G4P4
M98 P02 L50 (call subroutine 2)
G0X0Y0
G4P4
M98 P03 L50 (call subroutine 3)
G0X0Y0
G4P4
M98 P04 L50 (call subroutine 4)
G0X0Y0

M30

O01 (subroutine "01")
(simple short distance movement on Y)
G0Y0
G0Y.1
M99 (return)

O02 (subroutine "02)
(small rectangle on X & Y)
G0Y0
G0X.1
G0Y-.2
G0X0
M99 (return)

O03 (subroutine "03")
(diagonal movement on X & Y)
G0Y.1X.2
G0x0y0
M99 (return)

O04 (subroutine "04")
(small triangle on X &Y)
G0Y.1
G0X.2
G0X0Y0
M99 (return)

%

When I run this, only subroutine 4 introduces the skew along Y. The others do not. In 50 calls, the Y skews about 1/8" (eyeballed). I then switched my X & Y stepper cables to see what I might learn. Now the skew shifts to the X axis and in the same magnitude. If I run 100 cycles, the skew is about 1/4", 150, 3/8" etc - so its cumulative.

Thinking about the amount of skew: my Y "steps per" are roughly 10,000. So, to skew 1/8" would require 1250 (missed) steps, which would be 25 (missed) steps per call to the triangle path! I do not hear anything indicating missed steps. And, the diagonal and back-forth movements on Y do not result in this skew. I re-ran at 7.5 IPM and the same amount of skew occurs.

Then I realized that my previous .003" backlash comp on Y * 50 cycles = .150" - in the ball park of the eyeballed 1/8" skew. I double checked backlash comp and although the checkbox was unchecked to disable it, the X and Y values were present. So I zeroed them and restarted Mach (actually rebooted the PC too). The skew still occurs.

Then I remembered that I have a saved profile from last year before I enabled backlash comp. I loaded it and ran. No skew! It ran flawlessly. I even ran it 10000 cycles and saw no skew! I then restarted Mach and loaded my current profile and again the skew appeared. Restart with the old profile, no skew.

I suppose the easiest thing will be to rebuild a new profile from scratch but this is nagging at me! Anyone have any ideas or configuration parameters that I can check?

cheers,
Michael

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Strange axis skew - maybe a Mach machine profile bug?
« Reply #1 on: July 30, 2012, 04:04:33 AM »
Attach both xmls and I will see if I can find the issue.
Hood
Re: Strange axis skew - maybe a Mach machine profile bug?
« Reply #2 on: July 30, 2012, 08:06:16 AM »
Thanks Hood.

mh-540B  is the old file that works
mh-Millie is the current file that skews on Y

cheers,
Michael
Re: Strange axis skew - maybe a Mach machine profile bug?
« Reply #3 on: July 30, 2012, 08:51:25 AM »
I also ran through a diff of the 2 files. A couple of points.

I thought the mh-540B was pre-enabling backlash comp but apparently backlash was enabled in it.

mh-Millie has a lot of config for spindle and flood control that I had upgraded on my machine and in the process of debugging this issue, disabled in the profile but some of the config is still there.

cheers,
Michael

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Strange axis skew - maybe a Mach machine profile bug?
« Reply #4 on: July 30, 2012, 08:53:46 AM »
The backlash comp is enabled in the 540B profile so if you enable the backlash comp in the Millie one does it work?

Likely the culprit will be the pulse width however, you have 15 and 2 in the 540B profile but only 1 and 0 in the other.
Hood
Re: Strange axis skew - maybe a Mach machine profile bug?
« Reply #5 on: July 30, 2012, 08:57:42 AM »
Thanks Hood, I think we cross posted! I just noticed that the 540B has blc implemented too. I can try those experiments now.

I've been using the Millie profile for months with no problems. I don't believe I touched the pulse width but I did disable backlash comp as part of the upgrade.

If backlash comp were the issue, I would expect to see the skew in all 4 subroutines and especially #3 but I don't. I purposely made the moved distance the same in each for that reason.

But, let me enable blc and try it and also the pulse width.

cheers,
Michael
Re: Strange axis skew - maybe a Mach machine profile bug?
« Reply #6 on: July 30, 2012, 10:00:49 AM »
Hood, thanks again!

So, changing backlash comp (turning it on and off) in both the Milie and 540B profiles has no effect. HOWEVER, as you suspected, the pulse width DID have an effect. I set the Millie pw to 15 & 2 and the problem has gone away.

I know I did not touch that setting in the upgrades so I'm not sure how it got reset. But, that's it. It's always the little things right? And it only seemed to affect the Y axis, which is also a bit weird. But it is what it is.

Quick question, the PW field label says 0-5 but when I tried 5, it still skews (although not as badly). Is that just a mislable on the field?

cheers,
Michael

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Strange axis skew - maybe a Mach machine profile bug?
« Reply #7 on: July 30, 2012, 10:22:13 AM »
Good to hear its solved. The pulse width at one time, I believe, could only be set 1 to 5 but it was increased to 15 at one point and the labeling never changed. Previously if 5 was not enough for your drive you would have to enable Sherline mode which sets it to 40. However that mode is only possible at 25KHz kernel (1 second/ 25KHz = 40uS) so if you needed more than 5 and were also needing a higher kernel then you couldnt get it.

Now your issue, not sure why it had changed from the old to the new but could have just been you made a new profile at some point, possibly when you upgraded Mach versions it got set lower or possibly.... well who knows ;D
Why it only affects the Y and not the rest is likely just down to the Y axis drives electronics  being a bit slow on seeing the inputs so it needs the wider pulse could even be your breakout board on certain pins.
Doesnt really matter I suppose as long as its now working :)

Hood
Re: Strange axis skew - maybe a Mach machine profile bug?
« Reply #8 on: July 30, 2012, 10:28:16 AM »
Thanks for the explanation Hood. The motor control is a Gecko G540 all-in-one stepper driver BoB. Basically, plug and play.

cheers,
Michael

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Strange axis skew - maybe a Mach machine profile bug?
« Reply #9 on: July 30, 2012, 10:39:42 AM »
It seems that some of the G540's require a wider pulse than others, often the users just set it to Sherline mode and things work well.
Hood