PDA

View Full Version : Mysterious Z axis errors



dachopper
30-03-2017, 05:55 PM
Hi everyone,

Started routing a piece of plywood using UCCNC, with a cut that is uniform and parallel from end to end, to find that my Z axis is loosing position as it moves along the piece.

The first time I was running constant velocity mode, with max acceptable error of 30 microns. I ran 95cm in length, the Z error was actually to push the Z axis into the piece further ( create a deeper cut ) , and over 95cm, I had a change in Z position of about 1 to 2mm deeper cut.

The second time, I changed the constant velocity mode max error to 50 microns, decreased the Z axis max acceleration by 60%, and max speed to 30% to discount the motor missing steps due to load at higher speed/accelerations. This time the Z errors appeared to occur much faster, and after about 20cm, the Z had plunged down an extra 4.5mm.

The G-code is correct, and I confirmed that without running the program, jumping from start to finish showed that the work was 4 to 5 mm deeper at one end vs the other.

My thinking is that it somehow has something to do with Constant velocity mode ( although this is not supposed to create compound errors, just errors between point a and point c ) - or my controller not hacking it, or not providing enough holding power sometimes ( G540 )

The wierd thing is, when I slowed down the z axis and accelerations, it got worse - which you would think would make better if it was a load related issue?

Still wainting the leadshines to arrive, so need to persist with the G540 for now


Any ideas?

Nick

Neale
30-03-2017, 06:02 PM
Was the cut supposed to be uniform in Z (i.e. no Z movement along the cut) or was there some Z movement?

Clive S
30-03-2017, 06:09 PM
Was the cut supposed to be uniform in Z (i.e. no Z movement along the cut) or was there some Z movement?
Are you sure that the cutter is not being pulled out of the collet?

dachopper
30-03-2017, 07:11 PM
So, the cutter is firmly in the collet. The part is uniform z from end to end, but across the part ( side to side ) there is z movement up in the middle, and down at each side. The CNN pass is parallel going across the part, move along by .5 mm, then across ... hundreds of times.

Neale
30-03-2017, 07:21 PM
If there is a lot of Z movement, and you are sure that the mechanical side of things is spot on, have you seen this thread (http://www.mycncuk.com/threads/10815-Losing-steps-on-Z-axis)?

dachopper
31-03-2017, 05:49 AM
Thanks for pointing out that thread Neale -

I found something funny happening to the Y axis in my UCCNC software, where my slaved axis was re-copying settings from another axis, including the wrong step and Dir information when I changed a specific value on one of the pages ( I'm not talking about the value of boxing slave, it's something else like if I make a change to the acceleration value, then the slave dumps all info and re-imports all info including the wrong pin and direction assignment ) . I still haven't figured out which value it is because I don't change the settings enough, but the randomly see my Y axis trying to go opposite directions as a result sometimes of me changing a few parameters.

When I went back in to fix the issue ( not knowing why it had changed, or how ) in the confusion of trying to get my Y axis motors to spin in the right direction ( together ) - I Clicked on active low, so I had some dir / pin steps on active low, and some on active High for my X and for my Z axis.

Guess where the errors were in my cut - in my z axis was the biggest, but X also had a left / right 1-2mm error by the end. So hopefully in a couple hours I can restart the beast up, and get my first workpiece cut out !

dachopper
31-03-2017, 06:22 AM
May have an issue

G540 manual
the pulse polarity for the step and direction signals are ACTIVE HIGH.


UCCNC manual
Dir port & pin: Which is the physical output pin on the UC100 device for the step signal. The
15/76
signal can be configured active low or active high selecting or unselecting a checkbox next to the
field. Changing the active polarity of the signal reverses the axis running direction.

Can this be the cause? How do I reverse the polarity while keeping the active high set?

A_Camera
31-03-2017, 07:59 AM
May have an issue

G540 manual
the pulse polarity for the step and direction signals are ACTIVE HIGH.


UCCNC manual
Dir port & pin: Which is the physical output pin on the UC100 device for the step signal. The
15/76
signal can be configured active low or active high selecting or unselecting a checkbox next to the
field. Changing the active polarity of the signal reverses the axis running direction.

Can this be the cause? How do I reverse the polarity while keeping the active high set?

I don't understand the question. In UCCNC you can select active high or active low for each outputs. Set active high for both the step and the direction pins in UCCNC ( i.e. uncheck the box )and you should be fine. Once set up right UCCNC will send step pulses as active high pulses. DIR pin does not actually matter since what is happening depends on how your motors are installed, so if the axis would rotate in the wrong direction if all the DIR pins are set to active high you just change that to active low. This is actually happening with my Y axis because the motor is placed where it is placed, so my X and Z are set to active high and the the Y to active low. UCCNC takes care of that.

dachopper
31-03-2017, 06:09 PM
The G540, is designed to run Active high , not Active low. So if I follow UCCNC instructions and set Direction to Active low, it means while the Direction may have reversed, the G540 is telling the Z axis to stop / go on the wrong side of the pulse from UCCNC software - as someone else said, it could create missed steps at the end of a direction change, and lots of them = lots of errors.

I ended up re-soldering the motor plugs, so that I can select active High, and still have motors going in correct direction. I believe - this + lowering my Kernal frequency from 200Hz to 50Hz, has fixed my problem, but cannot test until tomorrow.

On another note, I have been using Fusion 360 for the Cam work, and have a question about tolerance and how to get the fastest movement withing tolerance settings.

Fusion 360 has a pass tolerance, which basically makes the tool stay within tolerance distance of the finished product at all times when cutting. Then they have a smoothing feature which acts like constant velocity mode, and looks ahead to reduce the number of points, as long as it stays withing the smoothing tolerance, of the original tolerance. On my workpiece, this reduced the G-code length by about 40-50%.

Then - when I open the Post Processor to get the code out, it has it's own Built In Tolerance stated. No idea where it comes from or what it does. Is this the third layer of error? Ie it will now plot paths within say 0.01, of the paths I just calculated in fusion 360, and add to my other pass tolerances? Eg (Post processor)0.01 + (pass tolerance )0.01 + (smoothing tolerance) 0.01 = max error of 0.03 from the actual part surface?

Then I open UCCNC and it has velocity mode, so if I set that to a tolerance of 0.03, then now I could have 0.06 total error from the surface, or up to 0.12 error between two parallel passes if one has a low error ( into the part ) and the other a high error above the surface?

Am I better off turning smoothing off in Fusion360, - and using the UCCNC velocity mode to do the smoothing so only 3 layers of error instead of 4?

Nick

A_Camera
31-03-2017, 07:17 PM
The G540, is designed to run Active high , not Active low. So if I follow UCCNC instructions and set Direction to Active low, it means while the Direction may have reversed, the G540 is telling the Z axis to stop / go on the wrong side of the pulse from UCCNC software - as someone else said, it could create missed steps at the end of a direction change, and lots of them = lots of errors.
UCCNC can be set to active low or active high pulses, you just have to set it to what is needed by the driver. Missing steps can be a result of wrong settings. If the direction is reversed you can just swap the level of the Dir pin, or swap one of the motor coil wires.


I ended up re-soldering the motor plugs, so that I can select active High, and still have motors going in correct direction. I believe - this + lowering my Kernal frequency from 200Hz to 50Hz, has fixed my problem, but cannot test until tomorrow.

That's one reason for not having soldered plugs...

We have discussed kernel frequency in another thread, I don't think it is an issue, unless the G540 can't handle 200kHz. Anyway, if you can lower it to 50kHz or not, that depends on your speeds. 50kHz is not enough for me, I need minimum 53.3kHz to get the 8000mm/min speed with 10x microstepping. But of course, if you don't need more than 50kHz there is no reason to have anything higher. No benefit at all.


On another note, I have been using Fusion 360 for the Cam work, and have a question about tolerance and how to get the fastest movement withing tolerance settings.

Fusion 360 has a pass tolerance, which basically makes the tool stay within tolerance distance of the finished product at all times when cutting. Then they have a smoothing feature which acts like constant velocity mode, and looks ahead to reduce the number of points, as long as it stays withing the smoothing tolerance, of the original tolerance. On my workpiece, this reduced the G-code length by about 40-50%.

Then - when I open the Post Processor to get the code out, it has it's own Built In Tolerance stated. No idea where it comes from or what it does. Is this the third layer of error? Ie it will now plot paths within say 0.01, of the paths I just calculated in fusion 360, and add to my other pass tolerances? Eg (Post processor)0.01 + (pass tolerance )0.01 + (smoothing tolerance) 0.01 = max error of 0.03 from the actual part surface?

Then I open UCCNC and it has velocity mode, so if I set that to a tolerance of 0.03, then now I could have 0.06 total error from the surface, or up to 0.12 error between two parallel passes if one has a low error ( into the part ) and the other a high error above the surface?

Am I better off turning smoothing off in Fusion360, - and using the UCCNC velocity mode to do the smoothing so only 3 layers of error instead of 4?

Nick

Sorry, I have no idea about Fusion360...

Neale
31-03-2017, 10:24 PM
The G540, is designed to run Active high , not Active low. So if I follow UCCNC instructions and set Direction to Active low, it means while the Direction may have reversed, the G540 is telling the Z axis to stop / go on the wrong side of the pulse from UCCNC software - as someone else said, it could create missed steps at the end of a direction change, and lots of them = lots of errors.

To clarify, in case anyone else is reading this, step signals and dir signals are two very different things. Generally, step signals must be active high because that is what drivers generally need as they trigger on the rising edge of each step pulse. Dir signals are not pulses. The dir signal will be high all the time that the axis is going in one direction, and low for the other direction. What the motion controller does not know, when you first set up the machine, is whether high or low will make the motor turn, say, clockwise. That depends on how the motor is wired. First thing you do when you start configuring is see if the axis goes the right way and if not, change dir active high to active low. Perfectly normal, perfectly usual. There is no "right" setting for dir active low/high - it depends on the machine. Swap motor wires, swap active high to low - same thing done different ways.

As for this pulse frequency discussion - I don't follow the argument.

CAM tolerance - haven't pushed my machine to the point where this matters so have not looked into it at all, although I am doing more F360 CAM these days.

dachopper
01-04-2017, 06:11 AM
Regarding the CAM tolerance, it's less about the machine, and more about the fact that you design a part of dimension X, and then after cutting end up with dimension y