Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: flhr97 on March 09, 2009, 08:45:23 PM

Title: calibration question for the experts
Post by: flhr97 on March 09, 2009, 08:45:23 PM
First off I'd like to thank those on this board who have helped me to get my project moving forward.  This place is a very good resource to have. 

So I have my machine running for the most part, but I still have a problem with the axes not moving the correct distance.  I set them up originally the way the Mach instructional says, by figuring the pitch and encoder counts, but that was a bit off.  So I used the calibrate axis function and it seems to work, but when I cut a test pocket I'm always off way more than I would expect.  Cutting a 120mm by 10mm pocket measures out to 119.86mm by 9.88.  I would think that it could cut much more accurate than that.  I've tried it with and without the backlash comp.  Backlash is very minimal anyway, I measured .005" lash in them.  By the way, this is a minimal .5mm depth pocket in corian, so very little load on the machine. 

I have 5mm pitch ballscrews driven by direct coupled Omron R88M-U20030 servo motors with Omron R88D UP08HA drives.  I got this thing running with all the drives set to the default parameters.  With the default settings Mach motor setup works out to about 409 pulses per mm.  I would have thought this would be accurate enough but perhaps it isn't?  The drives have electronic gearing so I could change that if need be.  What would be a good avg amount of pulses per mm?

Thanks for any and all help.

Bob

Title: Re: calibration question for the experts
Post by: Hood on March 09, 2009, 09:17:02 PM
What line count encoders are on your motors?
Hood
Title: Re: calibration question for the experts
Post by: flhr97 on March 09, 2009, 10:14:53 PM
If I understand the terminology correctly they default to 2048 pulses per rev.
Title: Re: calibration question for the experts
Post by: Hood on March 09, 2009, 10:28:33 PM
ok so thats 2048 x 4 = 8192 steps per motor rev.
 1 motor rev moves 5mm so 8192 / 5 = 1638.4 steps per mm.
 You were saying that 409 was close so sounds like you may have some electronic gearing active in the drive? if you have 1:4 then that would work out at 1638.4 / 4 = 409.6 steps per mm.

Hood
Title: Re: calibration question for the experts
Post by: flhr97 on March 09, 2009, 11:01:54 PM
You are correct, I went back and doublechecked and the default is 8192 pulses per rev with a default 4 to 1 elec gear ratio getting down to the 409 pulses per mm.  I eliminated the gearing one time, but it killed the travel speeds in Mach.
Title: Re: calibration question for the experts
Post by: Hood on March 10, 2009, 03:28:21 AM
Well it should actually be 409.6 so change it to that and it will make all the difference :)
Hood
Title: Re: calibration question for the experts
Post by: jimpinder on March 10, 2009, 05:17:31 AM
Spot on Hood - divide by 409 and multiply by 409.6 and the length of the pocket comes out at 120.03mm
Title: Re: calibration question for the experts
Post by: flhr97 on March 10, 2009, 06:18:07 PM
Apologies for not being more specific in my first post.  I set up the pulses according to Mach's setup.  Which led me to put 409.6 pulse per mm in the parameter originally.  When I do this I end up with a pocket that is 149.40 by 9.10.  Using Mach's calibration setup gets me closer but still not where I think I should be. 

Is there something else I'm missing?  And what sort of accuracy should I be seeing with this arrangement?  I realize that the ballscrews are rather coarse, but I was hoping for much better than what I am getting.  This is why I was wondering if perhaps more pulses per mm would help with my accuracy.

thanks,

Bob
Title: Re: calibration question for the experts
Post by: Hood on March 10, 2009, 06:42:07 PM
Your ballscrews are the norm for an accurate machine. my Computurn Lathe, my  Bridgeport CNC Mill and my Beaver CNC Mill all have 5mm pitch ballscrews and almost all lathes and mills in Industry will use 5mm or 0.2inch pitch.
 There could be other factors for your undersize cuts,  backlash could cause it in  certain situations, the cutter may be undersize from what you are thinking it is, you may have flex in the spindle or the mounting of the z axis etc.
Instead of doing a pocket do an outside cut and see if its slightly oversize from what you were expecting.
You could increase the pulse per unit but its not ideal as if your machine is rigid and the ballscrews are accurate you should get very accurate results from the calculated number.
 It may also be worthwhile testing without any electronic gearing just to see what the outcome is, I doubt if the electronic gearing would be that inaccurate but its certainly worth looking at.
Hood
Title: Re: calibration question for the experts
Post by: flhr97 on March 10, 2009, 08:24:02 PM
I did some tests and one thing I noticed is that I told you wrong earlier.  With the default params and 409.6 pulses I was getting a pocket of 149.40 by 9.90 instead of 9.10 as I said before.   

 I did an outside cut as you suggested with the same default parameters and the measurements were nearly identical with the pocketing dimensions.  Then I removed the elec gearing and changed Mach to 1638.4 pulses per and the measurements that way were 149.2 by 9.6.

I'm as confused as a baby in a strip bar. 

Thanks,

Bob
 
Title: Re: calibration question for the experts
Post by: Hood on March 11, 2009, 03:48:41 AM
Check that the Step and Dir signals have the active state set correctly for your drives,
Have you checked for backlash?
Hood
Title: Re: calibration question for the experts
Post by: flhr97 on March 11, 2009, 11:20:23 PM
Spent quite a bit more time with it tonight and I'm not exactly sure what to make of things.  I had been trying to check everything out with my digital calipers.  I tossed those and hooked up the magnetic slide scale I have, it's reads to .001 mm.  I fixed it to the x axis itself and bolted a stop to the linear rail. 

I set the steps to 409.6 and started checking things.  I noticed that the X axis was off about the .4 mm I was seeing, but found out that it only happens when it's moving in the plus direction.  When I move it in the minus direction it was fairly accurate but any move positive would be around .4mm off.  Checking the backlash showed no serious backlash, certainly not .4 mm.  I hope I"m not just being obtuse and missing something easy.  I decided to try dumping .4 mm in the backlash compensator just to see what would happen and it's much better, probably around .02 - .05 mm.  What would you consider good?

Thanks,

Bob
Title: Re: calibration question for the experts
Post by: Hood on March 12, 2009, 03:14:39 AM
What I would consider good is if you command G0X100  when the axis was at zero then it would move exactly 100mm. It will of course depend on the rest of your hardware such as how accurate the ballscrews are , if the machine is worn etc.
Did you check to see you have the Step and Dir signals active state set to suit your drives?
Hood
Title: Re: calibration question for the experts
Post by: flhr97 on March 12, 2009, 08:13:31 AM
Yes, I checked those and they are fine.  One thing I failed to mention about the x axis being off .4mm is that it was always off.  Even after consecutive positive moves they would all be off the about the same amount.  Moving 0 to 25 then 25 to 50, and so on.  So it's not backlash but I have no idea what could cause that. 
Title: Re: calibration question for the experts
Post by: Hood on March 12, 2009, 09:05:41 AM
so its just 0.04 off even if you move 0 to 100? if so then your steps per unit have to be correct, it must be the direction change that is causing the problem. Try the active states the opposite way from what you have, you will have top reverse the axis from the homing and limits so it still travels the correct direction..
Hood
Title: Re: calibration question for the experts
Post by: flhr97 on March 12, 2009, 10:09:40 AM
I'll try again to change them this evening.  Best I remember though the states I have them set to in Mach were the only way I could get them to move.  I did try changing the pulse widths but setting them to 1 or 5 seem to make no difference at all. 
Title: Re: calibration question for the experts
Post by: flhr97 on March 12, 2009, 04:27:49 PM
This is almost getting funny now.  I changed the step and direction from low active to high active and the problem just changed directions with it.  Now I get the .4mm offset when I go in the minus direction. 
Title: Re: calibration question for the experts
Post by: Hood on March 12, 2009, 05:06:10 PM
Are you using a Breakout Board?
If so is it optically isolated?
Hood
Title: Re: calibration question for the experts
Post by: flhr97 on March 12, 2009, 05:16:13 PM
I'm using the pmdx-122 board.
Title: Re: calibration question for the experts
Post by: Hood on March 12, 2009, 05:23:32 PM
Should be fine with that, is there any way you can easily take the Step/Dir signals straight from parallel port and miss out the BOB?
Hood
Title: Re: calibration question for the experts
Post by: flhr97 on March 12, 2009, 07:37:57 PM
Well I found the problem, although I'm not sure why it was acting exactly like it did.  I got to thinking that I was still running with the default parameters in the drives and I started looking through them to see if I could change anything that would help.  The first one I changed fixed the problem, it was the position loop gain.  The range was 0-200 and the default was 40.  I kept moving it up and things kept getting better.  I maxed it out and didn't see anything detrimental to leaving it there and it got me within .002 mm everytime. 

Weird that it showed up almost exclusively in one direction only, but there's no denying that it has fixed the problem.

Thanks to everyone for your help.

Regards,

Bob
Title: Re: calibration question for the experts
Post by: Hood on March 12, 2009, 07:44:05 PM
Thats great news :)
Hood