Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: sunmix on June 10, 2010, 10:14:41 PM

Title: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: sunmix on June 10, 2010, 10:14:41 PM
I was about to convert a traditional mill into a Mach3 CNC based Drill, very identical to Mach3's User Manual Cover picture. Although I've been successfully operating a plasma cutter with Mach3, plasma cutter does not require 4 decimal accuracy. So I did a simple test, after each G-Code positioning occurs there will be a M990 macro that saves the current X and current Y axis value.

On the G-code side, ive written:

X4.0000 Y4.0000
M990
X104.0000
M990
X204.0000
M990
X304.0000
M990

With the saved values, they all end up as:
X3.9878 Y3.9879
X103.9878 Y3.9878
X203.9878 Y3.9878
X303.9878 Y3.9878

With positioning error of 0.0122 (4-3.9878), how can I achieve the correct positioning accuracy? Are there any special techniques for configuring Mach3 to achieve 4.0000?

Thank you in advance for guidance.
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: ger21 on June 10, 2010, 10:19:40 PM
What does your M990 look like? I'm guessing it's saving coordinates while Mach is still moving. Also. what is your steps/unit in motor tuning?
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: sunmix on June 10, 2010, 10:28:38 PM
The M990 looks like this:

Dim XPos,YPos,ZPos

Call Sleep(100)

XPos = getOEMDRO(800)
YPos = getOEMDRO(801)

SetUserDRO(1740,XPos)
SetUserDRO(1741,YPos)

End

I'm running it in inches, and I'm running the program in single block mode. So it saves during idle.
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: sunmix on June 10, 2010, 10:30:39 PM
Quick update: Changing the units to mm does not improve. =(
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: Hood on June 11, 2010, 04:42:40 AM
As Ger said, what are your steps per unit?
Hood
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: sunmix on June 11, 2010, 08:51:38 AM
Thank you for the indirect guidance, Ger & Hood! I was using the default Mach3 steps per unit to perform the test. Thank you!
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: M250cnc on June 11, 2010, 09:07:24 AM
I was using the default Mach3 steps per unit to perform the test. Thank you!

They mean the settings on the motor tuning page/tab
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: stirling on June 11, 2010, 09:22:52 AM
Hmmmm - I don't think this looks like a non-denominator steps/per issue because the distance travelled in all but the first move is bang on at 100.0000. Looks more like an offset is set whilst looking at machine coords. Probably completely wrong but if steps/per WERE non-denominational (or whatever the word is) then wouldn't we expect the *error* to wander around a bit?
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: ger21 on June 11, 2010, 11:44:10 AM
I was thinking you need a While IsMoving..Wend in there, possibly??
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: stirling on June 11, 2010, 02:08:48 PM
and I'm running the program in single block mode. So it saves during idle.
So why even have a *recording* macro? - just look at the DROs.
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: Jeff_Birt on June 12, 2010, 09:36:31 AM
First, if your converting an old knee mill you will NOT get 0.0001" accuracy. Even if you add brand new fancy ball screws and such you'll see more error from cutter deflection, cutter wear, material changing size as it heats/cools, etc, etc.

Second, Mach will always send out enough pulses to go where you tell it to within the resolution of your steps/unit. If you only have 2,000 steps/unit then you will see some non-cumulative rounding issues at certain numbers (as everything is broken down into 1/2000" increments). Again, lets stop and consider what that 0.0001 means in the real world...unless you have a very hi precision machine, operating in a temperature controlled environment, that you have done screw mapping on, let warm up to two hours before cutting parts,etc, etc; you just won't see it.
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: stirling on June 12, 2010, 11:13:24 AM
Absolutely agree with everything you say Jeff regards *real world* accuracy. BUT why is Mach giving the results it is? His steps/per *must be* integral denominators of his units otherwise his 2nd, 3rd, etc moves would not be EXACTLY 100.0000 units apart in Mach.

Ian
Title: Re: Struggling to achieve 4 Decimal Positioning Accuracy for Mach3
Post by: Jeff_Birt on June 12, 2010, 11:45:32 AM
It is probably just the way he is grabbing the position. No need for fancy macros here, as other have suggested just command a move in the MDI and then look at the DRO...