Hello Guest it is March 28, 2024, 02:04:33 PM

Author Topic: Mach4 positioning error  (Read 6499 times)

0 Members and 1 Guest are viewing this topic.

Mach4 positioning error
« on: December 12, 2019, 12:40:09 PM »
Hi all,

there is a problem which made me take apart the new built machine, there is a positioning error in every axis, here is the machine details;

Windows 10 32bit, Mach4, ESS, PMDX 126 as controller,

X Axis:

1300mm stroke, 25mm diameter with 25mm pitch Taiwan made single nut ballscrew directly attached to a servo motor with coupling(this motor replaced with 16Nm step motor to rule out the motor/driver combo error, it gave same results with servo system),
Ballscrew aligned with the guideways within 0.01mm from one end to another both vertically and horizontally,
there is a measured 10-15micron backlash.

Y Axis:

1000mm stroke, 25mm diameter, 5mm pitch Taiwan made double nut ballscrew directly attached to a closed loop step motor with coupling,
Ballscrew aligned with the guideways within 0.01mm from one end to another both vertically and horizontally,
there is a measured 4-5micron backlash.

Z Axis:

1000mm stroke, 25mm diameter, 5mm pitch Taiwan made double nut ballscrew directly attached to a servo motor with coupling,
Ballscrew aligned with the guideways within 0.01mm from one end to another both vertically and horizontally,
there is a measured 4-5micron backlash.

All the guideway(30mm schneeberger) beds scraped and aligned/paralleled within 15microns in both vertical and horizontal plane.

This is a very rigid machine which weighs 4tons, it is precisely leveled, motors has no problem while driving, no noise, no heat, there is no other error in the setup other than this positioning error.

At first i thought maybe servos doing it but Y axis has a closed loop step motor and a double nut ballscrew aligned within 10microns, which makes the exact same error with X and Zth axis.

I am confused with it, tomorrow i am going to reinstall Mach4 and ESS plugin from scratch and make the test with the standard screen which comes with Mach4 but other than that nothing comes to my mind.

It also does not cut the circles true, in 30mm diameter it makes +60micron error.

below images are the measurements in one way(to rule out the backlash), first command is 1mm forward, next is 2mm forward etc.. it always comes short, there is no errors in ballscrews or motors and their tuning, thats for sure, i am focusing on Mach4 and ESS right now, anyone has any idea about the possible cause of this positioning error? or anyone faced with a similar problem?

Regards,

Hakan



Re: Mach4 positioning error
« Reply #1 on: December 12, 2019, 01:23:07 PM »
Hi,
this post should be on the Mach4 General Discussion Board, I imagine tweakie will shift it.

If the error is consistent and identical in all axes then the steps per unit are wrong.

I'm guessing that the pitch of the screws is 1 inch (25.4mm) not 25mm.

You may have seen posts where users believed they had 0.2 inch pitch screws (5.08mm) when in fact they
had very common metric screw of 5mm pitch. Depending on the supplier they may not know or care about a detail
like that, they have given enough information for a sale...and that's all they care about.

Can you use Mach and the current steps per unit value to have the stepper rotate exactly one revolution? If you can do so
measure the distance traveled......and that is the actual pitch which may be at variance to what you believe.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 positioning error
« Reply #2 on: December 12, 2019, 01:44:21 PM »
Hi,
another possible cause is the 'zero error window' being set to wide.

All servos, and to my knowledge, closed loop steppers have a programmable parameter called (by some manufacturers)
the 'zero error window'. What it means is that if the commanded position and the actual position, as measured by the encoder,
is within a (programmable) number of encoder pulses the drive will not try to close the error loop any closer.

It is common practice when the drive is shipped to set the zero error window and the following error window very wide so that
first time users experimenting with their new servo/drive are not plagued with following errors. In CNC practice those windows
need to shrink dramatically to have any chance of accurately following a toolpath.

If the zero window error is set to 100 encoder counts, say,  that could explain why your move apparently never completes
and therefore be inaccurate.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 positioning error
« Reply #3 on: December 12, 2019, 02:23:14 PM »
Once again hi Craig,

How are u?

I am sure about the pitches, these are metric and i ordered them directly from the manufacturer not from the distributor, so we can rule that out, also i attached an open loop 14Nm stepper motor to the X axis to check if the servo motor/driver is faulty, i thought there may be a tuning problem but it repeated the same exact error. I think this also rules out the zero error window, any other suggestions?

I noticed this odd thing while doing the measurements; i repeated the measurements in every axis multiple times, for example i commanded the axis to move to 1, then 2, then 3 until it reaches 10mm and repeat this set of commands 10 times in every axis. In one of the axis i think it was Zth, axis moved within 1 micron to the commanded positions in first set, but then in 9 sets it repeated this error. I am not noticing any noise issue in general in limit switches etc. but is it possible that this error maybe because of the noise within the control cabinet especially which may effect the ESS and pmdx? i am not sure if noise can lead this kind of consistent errors, u may know it better.

Regards,

Hakan

Re: Mach4 positioning error
« Reply #4 on: December 12, 2019, 02:31:38 PM »
Hi,

Quote
I am sure about the pitches, these are metric and i ordered them directly from the manufacturer not from the distributor, so we can rule that out

Can you rule that out....have you actually measured it? It does seem unlikely given the source of supply but you are relying on someone elses say-so.

Quote
I think this also rules out the zero error window, any other suggestions?

How does this rule out the zero error window?. I would expect a fairly consistent error if indeed it is something like a zero error window fault.
I have no other suggestions, you have dismissed the two I have without investigation, would other suggestions meet a better fate?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 positioning error
« Reply #5 on: December 12, 2019, 02:47:01 PM »
 :)

Dont get angry at me, of course i am going to measure the pitches tomorrow as u suggested but i am %90 sure thats not the case, this was what i meant.

It rules out the zero error window because of this logic; as u know thats a preprogrammed  encoder count which feeds back it to the driver, by that way driver knows the commanded position reached, so to do that, there should be a encoder attached to the motor shaft. But in open loop stepper motor(16Nm one which i attached to the X axis instead of the servo) there is no encoder, its open loop and repeated the same error as the servo.

Is my logic wrong?

Regards,

Hakan
« Last Edit: December 12, 2019, 03:02:05 PM by hyildiz »
Re: Mach4 positioning error
« Reply #6 on: December 12, 2019, 03:16:14 PM »
Hi,

Quote
Dont get angry with me,

I didn't but you have not fully investigated either suggestion.

I understand that you are certain of the pitch and I would too under the same circumstances but then you are on the forum asking. That suggests
that you have tried all the things you can think of and still have no answer. Can you rule out a pitch error ABSOLUTELY?

If a servo has a zero error window set too high, say 100 encoder counts, it will approach its commanded position until it gets to within 100 counts and stop.
That is the meaning of the zero error window. If you MDI successive 1mm movement commands its possible that a wide zero error window, having a linear
equivalent of 4-5um, would occur at each movement with the inaccuracy accumulating at each move. If however you commanded one movement of 5mm
then with the same zero error window I would expect the same basic 5um inaccuracy in 5mm verses 25um inaccuracy had you commanded five successive
movements.

Quote
Is my logic wrong?

I can't fault your logic but the problem persists......

Your suggestion about noise is not impossible, just improbable. Is it likely that noise, by definition random electrical noise, would cause such a consistent
inaccuracy?. I doubt it, but neither do I have a simple test to prove or disprove that.

What I am suggesting is that you use such tests as you can devise to prove/disprove certain things. As items are eliminated off the list those remaining potential
causes must contain the answer.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 positioning error
« Reply #7 on: December 12, 2019, 03:28:08 PM »
Hi again,

I understand what u are saying, its ok i am going to measure it, last couple of days i was thinking the error was mechanical so i took apart many things and saw that i was wrong and put them back together within a specific precision so it melted half of my brain down :)

While browsing the documents all over again, i found out that servo drive shows the commanded pulse and actual pulse in its display by using that i can make the shaft rotate one exact turn and measure the exact pitch.

And one other thing, i remember reading in the Mach4 user manual a warning for the user which strongly suggests not to tweak the count per unit value(because it is a calculated value), but if your suggestion is true that value should be tweaked according to the actual measurements, it may not be defined as tweaking because actually its still the same calculation what we are doing is measuring the pitch and putting it back to formula but it still sound like tweaking.

When u read that statement in the user manual u just dont touch that value  ;)

Regards,

Hakan
Re: Mach4 positioning error
« Reply #8 on: December 12, 2019, 04:52:31 PM »
This may, or may not apply. If all else checks out .......
I did have a similar event. What I found was that the AB servo drives I am using recommended differential inputs for the step & direction inputs. I had them single ended and saw similar to what you are seeing. I installed differential line drivers and all has been perfect since.
I don't see where you mention your drives so this might be something to check.
Just a guess.
 :)
Re: Mach4 positioning error
« Reply #9 on: December 12, 2019, 05:58:53 PM »
Hi Overloaded,

and thanks for the advice, i checked the manual of the servo drive it also suggests what your drive manual suggests i think, see the attached image.

The differential line driver u connected was something like this? and how did u connect it to pulse and direction signals? how is the wiring? i never used one, if all other fixing attempts fail i am definitely gonna try it, thanks.

https://www.amazon.com/Cnc4Pc-C72-Differential-Line-Driver/dp/B06Y3M2ZB2