Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Buchanan on August 09, 2017, 10:29:10 PM

Title: lost steps on y after a z move.
Post by: Buchanan on August 09, 2017, 10:29:10 PM
I have a strange problem that is repeated over many different g codes.

If I am machining a profile after each z down move I loose about 0.03 mm in one direction only. It seems to be reasonably consistent and on the vertical face there is a series of small steps in one side of the cut. So when i machine 2 mm deep with 0.2 mm steps the part is about
0. 3 mm  off center in one direction only. Always the same direction. always the y axis. The g code does not show the error on the tool path screen.  I have checked all the mechanical s. every thing is silky smooth, ball slides and screw with a second pre loaded ball nut for zero backlash. Not a machine geometry condition.
the machine has been working beautifully for at least 4 years now, it is stepper driven with a geko 540  and nema 23's.  Any suggestions of where to look will be greatly appreciated.
Title: Re: lost steps on y after a z move.
Post by: engraversoflight on August 10, 2017, 07:09:44 AM
swap geckos from one axis to another and see if the problem follows.  if so it's the gecko.  also check for loose wires on BOB
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 13, 2017, 06:53:45 PM
 Thanks, I ran through all my connections(no loose screws found) and also set the pulse width in the motor setting page to 15 us. They were on zero. Made three good parts after that. Not sure which was the cure. Will post again if I find something conclusive.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 18, 2017, 12:25:38 AM
The problem has returned again. I used Cambam for  one job and Meshcam for the next and I have the same problem with the machine when using Meshcam. The tool path looks perfect but when  machining and the spindle goes to the retract position to machine the next section then I get a Y shift. Next is  to swap the axis in X and Y.  Any comments are appreciated.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 18, 2017, 01:08:50 AM
I have just swooped the X and Y axis and the problem has transferred  from y to x so it is on the computer side or geode side.  I will try the g code on my Dads mill with the same G code and see what happens.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 18, 2017, 02:01:36 AM
I have tried the same g code in another machine and it works fine. So it seems that the fault is transferred between axis  on the first machine, so not the steppers and not the Geko 540. Not the g code. I think i will reload Mach 3 next or try another computer.  Any more suggestions?
Title: Re: lost steps on y after a z move.
Post by: RICH on August 18, 2017, 07:55:54 AM
Buchanan,

It's good that your problem is repeatable as you can try things to find the culprit.

By swapping the axes and getting the same small additive error  it tells me that it is not the drive, gcode, or Mach.  ie; Mach controls the machine based on the gcode instructions created by the software which in turn goes to the drive.

The intial axis error is 0.03 mm ( which is 0.0012" ).
You say not a mechanical / geometry problem,but, not sure that is true.

So here are some suggestions:
1. Create a gcode file that simply duplicates the snippet of code for the sequence that seems to be problematic. You can then run that small code numerous times to re-confirm the problem while taking physical measurements and can also add in dwells to see what the dro says while doing it.

BUT, before you do 1.

2. What's the Y axis resolution?

3. Check / test to know what  the backlash of the axis is. Don't say zero, very unlikely, it may be small but it is there. Also the backlash may vary depending on the screw ie; can be different at different screw sections and when when going in different directions. Also, depending on acceleration it can change due to loading on the screw which also influences the trust bearing preload / movement.
Each part of the axis contributes to the system inaccuracy. Know what they are.

Let me add that getting axis accurate repeatable down to ( 0.03 mm / which is 0.0012" )  is somewhat easy but below that value really need to be meticulous and have good system compponents.

There is more that you can do, but, first know what you have.

FWIW,
Stay focused working on the problem  in a logial way of testing, one step at time and not doing all kinds of things.

RICH
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 18, 2017, 09:26:56 PM
Thanks for your reply Rich.

I have checked the mechanics, I have ball screws with two nuts. One is fixed and the other is pre loaded against it.  This in the same on X Y and Z. Definitely not machine geometry as the difference in depth of cut is only 2 mm on any of the troublesome jobs.

Next I am going to swap X and Y on my pins and ports and see if the error swaps axis again.  That will prove it into the gecko drive area. I have checked the g code on another machine and it is good. I had a discussion with my sons yesterday afternoon and we came to your conclusion that the next is to write a custom G code . I will keep you posted. Thanks.

Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 21, 2017, 02:38:35 AM
Hello Rich.

These are my latest facts.

 I tried to find a G code to recreate the problem in a predictable way.

 I generated a G code on Cambam for a pocket 12 mm deep  in 0.4 mm Z increments and a return to clearance height between each level.

 This gave me a beautiful pocket, but found if I machined the same pocket in the same place I had a small Y shift so I generated another G code in Cambam :  a series of  10 identical diameter pockets but each one 1 mm shallower all machined in the same place.

  This produced a pocket with a series of 1 mm  steps in the y+ side of the pocket. Each about 0.01 mm  or a total of 0.1 mm increase in the diameter of the pocket from bottom to top in the y plane but not in the x plane.

 I swapped my  X and Y stepper motors around and the problem occurred on the X axis instead of the Y axis.   OK,  so it is not the Steppers or Mechanical.

Next I swapped X and Y axis on Ports and Pins. The problem remains on the X axis. 

I then corrected the X and Y steppers on their plugs and the problem returned to the Y axis even though the ports and pins were reversed.

 I tried the same G code in my old Dads little hobby mill and it worked perfectly.

 My conclusion is that there is a problem between the serial port plug and the stepper plug on the driver I  am using for thew Y axis.

Now I am using a Geko 540 so I cant change individual drivers but I have a 4th axis spare so I will now run the same test with the ports and pins set to bypass that one axis in the  Geko 540.

 I will also carefully check all my connections from the Y axis to the  Geko 540.

 I find it hard to understand why this only occurs on a new pocket, or,  when engraving a 3D shape the problem only occurs when a level or section is complete.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 21, 2017, 02:40:51 AM
One other comment is, the tool path always looks correct on Cambam,Meshcam or the Mach 3 screen.
Title: Re: lost steps on y after a z move.
Post by: Tweakie.CNC on August 21, 2017, 03:30:23 AM
Hi Buchanan,

Could you attach your .xml file.

This is in your Mach3 folder titled <your profile>.xml (typically Mach3Mill.xml). Copy and rename the file to Buchanan.xml and use the 'Additional Options' to attach to your post.

This file will let us check your Mach3 settings, and hopefully spot a problem.

Tweakie.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 21, 2017, 03:53:43 AM
I have now plugged the Y axis into the 4th axis and produced a perfect pocket.

The only problem is that I use the 4th axis for the knee on the mill or a dividing head.  I use the knee for large height adjustment so it is not moved when running a program but the dividing head will be a problem.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 21, 2017, 05:54:55 AM
Hello Tweakie.

Here  is the Buchanan.xml; file attached.  I had to attend to a few things so it took a while.

  Rich.

 I checked my backlash, it is somewhat less than 0.01 mm . I have pre loaded thrust washers on my screw ends 20 diameter screws  and a double  ball nut. One fixed and the other spring loaded against the first. I built this mill specially for fine engraving.

i will post a picture of the engraving I am having trouble with, as soon  as i have a good one.

Regards
Buchanan
Title: Re: lost steps on y after a z move.
Post by: Tweakie.CNC on August 21, 2017, 07:20:00 AM
Hi Buchanan,

Just a couple of things you may like to try…

1) In Input Signals you have Port1 Pin10 allocated twice (Input #1 and EStop). You may have good reason for this but it needs checking.

2) In Motor Tuning try increasing Step Pulse to at least 2 uS and save changes.

3) In General Configuration increase Look Ahead from 20 to 200 and un-check Use WatchDogs.

Tweakie.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 21, 2017, 07:41:35 AM
Thanks Tweakie.

I will check those out.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 21, 2017, 09:11:34 AM
Here are two photos , one of the problem and one  when my mill is behaving itself. I have not made your changes yet Tweakie.  I will do them now and see what happens.
Thanks everybody for your input.

Buchanan
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 21, 2017, 09:19:15 AM
The sun is for hand for a clock that I am building. You can see more at :http://www.my-time-machines.net/astro_index.htm
Buchanan
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 21, 2017, 09:25:03 PM
Tweakie.

I cannot comment on the reason for point No 1.  I have deleted the #1 input.

I increased both the step and direction signals  to 2uS and changed look ahead to 200.

Then I set all my axis back to normal and ran the sun program. It is much better but not perfect yet. 

Should I up the step and direction pulses again to , say, 4 uS ?

I will try it  now and see.

Buchanan
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 21, 2017, 10:14:31 PM
Tweakie.

I set the step and direction pulse to 4 uS and ran the program again.

The result: A perfect part.   

A question:  How long can I make this pulse. When does it become too long and what will happen then. Or in other words, how does one  arrive at the best setting?

What ever the answer, I have a cure. 

Many thanks everybody.

Buchanan
Title: Re: lost steps on y after a z move.
Post by: Tweakie.CNC on August 22, 2017, 01:40:16 AM
Hi Buchanan,

If 4uS works OK then stick with that (Gecko recommend a minimum of 2uS and I think general opinion suggests a maximum of 5uS).

Tweakie.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 22, 2017, 01:45:18 AM
Hello Tweakie .

Many thanks.

 I have just realized again what a fantastic system you have here.  I have also realized how much I rely on this little machine.

Regards
Buchanan
Title: Re: lost steps on y after a z move.
Post by: Tweakie.CNC on August 22, 2017, 03:05:12 AM
Hi Buchanan,

Good fortune building those wonderful time-pieces.

(Friend of mine spent 15 Years building a small, ride-on, steam engine - he spent so much time in the workshop his wife almost forgot she was married).

Tweakie.
Title: Re: lost steps on y after a z move.
Post by: joeaverage on August 22, 2017, 03:15:08 AM
Hi,
still better in the workshop than at the pub!

Craig
Title: Re: lost steps on y after a z move.
Post by: Tweakie.CNC on August 22, 2017, 04:23:11 AM
 ;D

Tweakie.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 22, 2017, 10:31:05 PM
Another dumb question . 

I come to start my computer this morning and I thought to check my motor tuning.  What do you know , but my pulse width has reset to 0 uS.  Well, perhaps I did not save the settings , so I do this.  Then I thought: I will test this out. So I restart my computer and  and check my pulse width again and it has reset to 0 uS. Now i must be getting old, grumpy and suspicious. I check out all the changes Tweakie recommended and they have all changed back to the old settings. I am now just as old but more grumpy and suspicious.

So I reset all the changes back to Tweakia's  and I  start to restart my computer. This takes a little long to do, so, rather than restart , I shut down Mach 3 and reopen it. Now  all the changes remain correct.  So I then restart my computer, now everything  remains correct.

I am now old , grumpy suspicious and baffled!

Is there a proper procedure to make sure all settings are saved.

One thought occurs to me: last night I left the workshop in a hurry. I just flipped all the switches off on  the power board, didn't shut Mach 3 down or the computer.



Title: Re: lost steps on y after a z move.
Post by: Tweakie.CNC on August 23, 2017, 12:57:19 AM
Hi Buchanan,

Not a dumb question at all.

Quote
One thought occurs to me: last night I left the workshop in a hurry. I just flipped all the switches off on  the power board, didn't shut Mach 3 down or the computer.

It is as you suspected - Mach3 saves it's settings to the .xml file on shutdown. If the shutdown is not completed correctly Mach3 will load a previous .xml file (settings) on  next start-up.

Tweakie.
Title: Re: lost steps on y after a z move.
Post by: Buchanan on August 23, 2017, 06:49:17 PM
Thanks Tweakie.

I am relieved and happy.

Here is the finished article.

Made two other parts yesterday and they were good.

Thanks again everybody.
Title: Re: lost steps on y after a z move.
Post by: Tweakie.CNC on August 24, 2017, 01:31:43 AM
Excellent work my friend.

Tweakie.