Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: endgrainguy on May 21, 2008, 05:45:06 PM

Title: general problems with mach3
Post by: endgrainguy on May 21, 2008, 05:45:06 PM
I"m having massive problems with my new shop built CNC. I'm getting inconsistant results from day to day, hour to hour. I "discoverered" yesterday that my x axis screw, (a THK 20 MM d. 20 MM lead, four start, bought used in apparently good shape) was apparently mapped incorrectly, as determined by measuring a 24" run called for in MIDI screen. I had assumed it was in fact a 20 mm lead, as labeled. It appeared to be off by alot --about 2.7 percent. I did the math, adjusted the steps in motor tuning, tested it a dozen times with good results, and figured I had solved some mysterious issues i was having. Ran my first set of parts, with lousy results. Tool paths seemed inconsistant -a second program for a finish pass calced from same drawing didn't match up, and I was left pretty confused. All individual tool paths were fine, producing the desired size pocket. The problem was in initial referencing. I rereferenced beween programs, which may have been a mistake, but I should be able to do that, right? Today I checked the x axis again, and results were again way off -this time in the other direction, and I got it back to going the distance asked for by undoing most , but not all ,of the change I made yesterday. So now it seems I've had three different values work, and I"m sure this will stop working as well.
Another issue is that the reff X axis behaviour changes radically with speed settings of the axis. At higher speeds (200 IPM) it doesn't do its return trip -just clicks off and stops, at what would be an obviously very different position than if it were traveling slower. This I"ve found to be related to trying a higher debounce setting, which I did because my limit switches were tripping at moments of high resistance to the cutter.
Could I have a corrupted version of MAch (it came on a refurbished PC sold by an Ebay CNC stuff vender). Could the PC itself be the problem? I'm so frustrated and confused, and I have no experience with this stuff beyond the misery I've put myself through these past couple months trying to build a functional machine.
If anyone who is expert in these issues lives near Greenfield , Massacusetts, (I"m actually a few minutes away from there, in Colrain, I"d be happy to pay for a consultation to try to figure out my problems. I'm a full time woodworker, and all other work has ceased as I"m consumed with getting this beast producing for me. Thanks!
Title: Re: general problems with mach3
Post by: Whacko on May 21, 2008, 05:52:13 PM
If Mach3 don't crash, I doubt that it's the PC. There is many reasons why you could have these problems. Can you be more specific on the hardware you use, such as motor specs, drivers, which breakout board etc.?

Whacko
Title: Re: general problems with mach3
Post by: endgrainguy on May 21, 2008, 07:50:51 PM
I'm using Keling drivers and steppers and BOB (C-10), the 640 OZ/inch motors and KL-6050 driver on x and y, with the KL-8078 on Z. Mach has never crashed on me, although the software limits have seemed to go funky requiring a restart to clear once.
I guess it seems more likely to be electronic than mechanical. If it were mechanical, then somehow the effective lead of the screw was changing every so often, but was very stable until changed again, or at least stable for awhile. That doesn't seem possible.I'm running the axis way slower than its capable of, jogging it at around 100 IPM, when it runs smoothly at up to arround 300, at least -- (with a 31" travel there's not much use for high speeds). I am stepping at 1/25th microstep, because it's such a coarse lead (20 mm). Now noise, which I have no real understanding of, seems more likely. It's as if the pulse rate is slowly, or periodically changing by some definite percentage of the expected rate, around 2 or 3 percent. I did use sheilded cable for limit and home switches and for steppers though, and the x axis stepper doesn't run in a cable carrier at all. Any suggestions on how to diagnose "noise' issues? If it were lost steps, again, I don't see how I could get consistant results at times. Lost steps is more random, right? My profile tool paths meet up nicely, and I can send out a dozen sets of GOX0, GOX21, commands, and it gives perfect results on both ends. And then hours later, they're way off. I'll check my other axises. The Y has a funky used ball screw I'm replacing anyway, but Z is very nice fine pitch ball screw.
     


 

Edit Tags Tags 
None 

Title: Re: general problems with mach3
Post by: Chaoticone on May 21, 2008, 08:10:20 PM
It sounds to me like it may be as occasional mechanical slip or you have your accels set too high in motor tuning. Is your problem scaleable or is just an ocassional jump? Can you post a picture of the results you are getting?

Well hello Whacko!

Brett
Title: Re: general problems with mach3
Post by: endgrainguy on May 21, 2008, 11:19:28 PM
My problem is best described by the inconsistant results I"m getting issuing jog commands. If I can't tell my x axis to travel a certain amount and get that amount, I"m nowhere. I'll be getting consistant results, and then check it awhile later (perhaps after simply restarting the PC) and the  results will be different. So I"m having trouble figuring out what's incorrect screw mapping, and what's missed steps. Can someone tell me  an ironclad test for this? My x axis seems well-aligned with smooth screw action. I"m microstepping 1/25th to make up for coarse screw, --  20mm lead. I think I really need someone knowledagable to take a look, because I"m running out of ideas.
Title: Re: general problems with mach3
Post by: sshneider on May 22, 2008, 01:29:23 AM
Based on the information you are providing (which is limited and NOT very specific) this is a hard problem to solve.  You need to tell us EXACTLY what you mean by inconsistent results (i.e. I type G01 X5 Y10 in the MDI linbe and the machine moves to X4.95 and Y10.10)

Just off the cuff, it sounds like you have some other software process runing in the background that is interfering with MACH- Quicktime is NOTORIOUS for doing this.  Have you run the driver test utility- have you run the optimoze utility?  How did you calibrate the steps per unit on your machine?  Did you use the utility on settings page?

If you want some help- help us, help you

Sid
Title: Re: general problems with mach3
Post by: endgrainguy on May 22, 2008, 01:38:33 PM
Thanks Sid. I initially calibrated the screw by using the math method outlined in Mach setup, basing it on it being in THK catalog as 20 mm lead screw. I did same process for Z axis, a 2 mm lead, and it works fine. The x being "close" I didn't notice any problem until I ran a parts program. Then it seems like if I finish the parts program, leaving the part in place, and simply ran it again, it didn't line up perfectly. Close, but maybe 1/64 off, more at the end of the program than beginning. That presents a   big problem for running a second program with a finish pass.Using Vcarve Pro for CAM.
 So I rechecked, by zeroing the X axis, issuing G0X0, G0X24 commands, measuring and marking the results. That's when I saw I was way off, getting something like 23.32" of travel rather than 24. I did this several times with results identical to my steel ruler and 49 year old vision. So I did a math conversion based on the units I used for motor config, and reran it, doing this several times with smaller and smaller adjustments until I had what seemed like perfect repeatable 24" travel. But a day later, without having ran any more parts, it was different. Now if it were simply a problem of the wrong number of units for motor config, the axis would go precisely to a  specific spot for the G0x24 command, and precisely back to 0 for the G0X0 after, repeatably with perfect precision, if I wasn't losing steps, right? But what I"m seeing is it goes as close as I can measure to 24" of travel each time, but if I run it a dozen times (g0x0, G0X24) the points it goes to start to drift  a tiny bit, and then a larger bit,  in one direction, both points being off in the same direction, still very close to 24" apart. This means missed steps, right? I've checked the axis by decoupling the motor and it seems very smooth to me. Decoupled, you can actually push the whole router-Z -axis-assembly along the X axis rather easily, and if feels good. My machine is fixed gantry, moving Y axis  table.
 Since I used a different driver for the Z axis, maybe I should try attaching the z axis  that and see if I get similar problem. Or simply try different microstep settings. I"m running it at 1/25th.  I put it higher than I would have for my resolution needs (woodworking) because it (X axis) was very grumbly at lower microstep settings at lower speeds. Is this a clue to my problem?
Title: Re: general problems with mach3
Post by: zarzul on May 22, 2008, 02:44:12 PM
Best way to check for missing steps is to reduce your accelleration and top speed settings in the Axis Configurations.  Then run your tests again and see if you are getting the same results.

Or subsitute the G0x0 & G0X24 for a G1 command at lower speeds than max.

Try this and let us know.   

Also,  do you always come up short of distance or do you go long.   If long, it is probably noise, short, probably missing steps.
Title: Re: general problems with mach3
Post by: jimpinder on May 22, 2008, 03:27:24 PM
It seems to me that you are making far too much of this.

1. You started off by saying that you bought your copy of Mach 3 on E Bay.

Start at the beginning.With your P.C. . Format the C Drive and run in your back up copy of Windows. Do not load anything else onto your machine, except your software to connect to the internet. This should get rid of any **** that found it's way onto your machine.

Download onto the machine the latest (Tried and Tested version) of Mach 3. This does everything that a disc version does - but is limited to 500 lines - (but at the moment your are not even managing one.) Do not download any of the developement versions.
I am not sure what speed you are wanting to run at, but the latest version of can be set to several speeds. Try a kernel speed of 45,000. Once you are up and running, you can try your disc version.

I assume you have configured your ports and pins with the pin numbers for fastening up your machine.

The next thing is you motor speeds - Particularly the "number of steps per unit". There is no guess work in this, it cannot be wrong, it doesn't alter from time to time.
The drives you are using will use micro steps - you say you are using 25 microsteps. I have not heard one as high as this and it is probably unnescessary. Microsteps are not used to determine accuracy, because they are inaccurate in themselves.
The motors you use will be 1.8 degree (probably) - that is 200 steps per revolution
If your motors are direct drive to the leadscrew, then this is 1. If there is any gearing down then specify the gearing - mine are 3
You are saying that you have a 20mm leadscrew. I cannot know wether you are working in mm or ins. The factor for this could be - divide by 20 if you are in MM, and then multiply if working in inches.

If you are working in MM then your equation is 25 x 200 x 1 - divide by 20 i.e. = 250  - or for inches - (x25.4) = 6350. Now - either I have missed something - and I am hopelessly low on your steps per unit - or
Your accuracy is **** becasue your steps per unit is too low. Mine for instance is 60,000 per inch - not 6000. The problem appears to be the lead screw whcih you seem to be saying moves the table 20mm per turn. Mine moves the table 1/10th of an inch, about 8 times more slowly.

You can only, by definition get an accuracy  of 1/6th thou, and that is using 25 microsteps. If you look at mine it is 1/60th. Micro steps are not inherently as accurate as full steps. I can get an accuracy of  less than 0.2 thou guaranteed - even ignoring the micro steps (on a Gecko it is 10)

The motors on your machine will turn much more rapidly, so, to offset the high ratio of the leadscrew, you should introduce a gear down facility of about 5 to 10. You motors will then need to make more steps per unit, giving you better accuracy.

I will say again - there is no alteration of your number of steps per unit necessary once you have calculated it.Set it in your configuration - set accleration to 0.5 - i.e. slow so as not to miss steps. Set your speed at say 10 inches - not too fast.

I am afraid my 63 years old pair of eyes have to use glasses and a digital vernier caliper - and I would urge you to buy one. Mine cost £10 - 20$ and is accurate to 1/2 thou.

You should then be able to set up your machine, zero all axis, then check each one by moving one inch with an MDI command and checking with a vernier caliper. You should not be more than a thou out. Make sure you always move the carriage in the same direction, i,e, move right, zero DRO's move right again 1 unit, check with vernier. If you are more than a thou out, something is wrong, but if your maths is right, it should not be the steps per inch.

It could be backlash, missng steps, etc etc - but that is another story.





Title: Re: general problems with mach3
Post by: sshneider on May 22, 2008, 03:34:08 PM
Thanks Sid. I initially calibrated the screw by using the math method outlined in Mach setup, basing it on it being in THK catalog as 20 mm lead screw. I did same process for Z axis, a 2 mm lead, and it works fine.

Math is good, Mach is better...  I would suggest getting a set of calipers and go to the settings page in Mach.  There is a button that says 'Set steps per unit'.  Find a piece of wood and put a sharp & pointed bit in your router.  Bring the spindle over the wood and jog the Z axis down until you make a tiny point in the wood, then raise your spindle so the bit is not touching the wood.  Use the "Set steps" utilty (note- you need to click in the "How far box to enter a value).  After the spindle moves, bring your spindle down and make another mark in the wood- use your calipers to measure the distance so you can input back to Mach.  Try doing this a few times using small and large values to see if things are set correctly (you might want to make notes of your current steps per unit setting BEFORE you do this so you can revert/compare.

 
Quote
... and simply ran it again, it didn't line up perfectly. Close, but maybe 1/64 off, more at the end of the program than beginning. .

BUT- did it start out at the exact same place and drift during the cut?  If you stop and re start the program does it begin from the same place?


 
Quote
...  So I rechecked, by zeroing the X axis, issuing G0X0, G0X24 commands, measuring and marking the results. That's when I saw I was way off, getting something like 23.32" of travel rather than 24.

Not totally clear on this?  Way off when you came back to Zero?  Did it come back to the correct Zero position and then only give you 23.32 when you asked for 24.00?

 
Quote
... until I had what seemed like perfect repeatable 24" travel. But a day later, without having ran any more parts, it was different.

In what way? Do you mean that went to a G0 X0 Y0 Z0 ok and then when you asked for a G0 X24 it went to X23.32?


 
Quote
...Now if it were simply a problem of the wrong number of units for motor config, the axis would go precisely to a  specific spot for the G0x24 command, and precisely back to 0 for the G0X0 after, repeatably with perfect precision, if I wasn't losing steps, right?

In theory, Yes.

 
Quote
But what I"m seeing is it goes as close as I can measure to 24" of travel each time, but if I run it a dozen times (g0x0, G0X24) the points it goes to start to drift  a tiny bit, and then a larger bit,  in one direction, both points being off in the same direction, still very close to 24" apart. This means missed steps, right? 

Or like Brett already said, something is slipping somewhere.  I know you mentioned lead screws but how are these coupled to your motors?  Direct drive or are you using pulleys & belts to turn your screw?  If so, maybe a loose pulley or belt?

 
Quote
...Since I used a different driver for the Z axis, maybe I should try attaching the z axis  that and see if I get similar problem. Or simply try different microstep settings. I"m running it at 1/25th.  I put it higher than I would have for my resolution needs (woodworking) because it (X axis) was very grumbly at lower microstep settings at lower speeds. Is this a clue to my problem? 

Unless this is a case of missing steps, which can be determined by the way Zarzul explained, It doesn't really seem like this is a computer/Mach problem since it is not repeatable in a consistent way.  It really seems more mechanical than software- otherwise it would seem that the computer by way of issuing the exact same commands over and over would render the same result (error or otherwise).

We haven't seen your G-code, I suppose there could be something funky (like a scaling command) in there that would cause this type of thing but, again, it would be repeatable.

Sid

Quote
Title: Re: general problems with mach3
Post by: endgrainguy on May 22, 2008, 11:37:45 PM
Thanks for all the suggestions. I think I have determined that my problem is mechanical, probably related to ball screw. The screw is driven by a direct Oldham style coupling. It's aligned well, and feels smooth by hand, but grumbles when stepper driven. I  did some manual screw mapping, with power off, turning the motor by hand, referencing to a mark in the motor shaft and "dial".   My lead is very close to its stated 20mm. Turning it 30 revolutions by hand and measuring the resulting 23.6 odd inches of travel with a steel rule gave me a number a few thousandths of an inch shy of 20 mm. So the step number I've been using to get very close to the travel I'm asking for is apparently inflated to compensate for the missing steps, which you all probably knew all along. I'm still learning here. I am amazed at the machines ability to miss steps in such a nearly consistant manner.
I then switched drivers on x and the perfectly performing z, which have different drivers. Same results though, making me think perhaps x stepper was the problem. I switched steppers, and same results. So I"m left to conclude that despite the smooth feel to me, the ball screw is causing missing steps.I should say that in motor tuning the axis sounds horrible, especially at very slow speeds. The smoothest travel came from using high microstep values, 1/25 or 1/32, but it's still usually a bit grumbly, and in consistant in its smoothness, which I guess is a clue. It's weird, because it feels smooth when turned by hand. 
I"m going to disassemble and clean the ball nut, and I might have some issues with its bearings...a long story.
As for accuracy of high lead screw, this machine is to be used for woodworking, so accuracy to within a couple thousandths would be fine.  The screw is a high quality THK four start, 20 mm diameter, 20 mm lead.Do I need to use a pulley and belt arrangement, gearing things down to achieve that?
Title: Re: general problems with mach3
Post by: Chip on May 23, 2008, 03:21:32 AM
Hi, Endgrainguy

Check your setting in Config, Motor Tuning, Step and Dir Pulses, If there at 0 set them to 5 and see if this Helps.

Some control boards need a little more time to see Mach's pulses.

Also if you used Ports and Pins, Motor Outputs, Active Lows/Highs to change Directions of your axises, It should be done in Home & Limits page, "Reversed" box.

Some control boards don't like that ether. If your cont. boards are all the same thy should be all the same, Active Low or High for Step and Direction.

Chip
 
Title: Re: general problems with mach3
Post by: endgrainguy on May 23, 2008, 07:33:12 AM
Thanks, I'll try that when I get scew back together. I do have those set at 0 and noticed yestrday that might not be correct. A little paragraph in Mach set up I had overlooked. Tried a couple other settings to no avail, but not 5,5.
Title: Re: general problems with mach3
Post by: jimpinder on May 23, 2008, 07:48:55 AM
Once you have found the reason - the rest should be fairly simple.

I have great respect for Art and the Mach software, but I cannot agree with allowing Mach 3 to determine you number of pulses per inch. The only trouble is - if the answer is wrong, how do you know. I appreciate Art was probably trying to simplify things, and he has done in so many other respects.

Steps per inch is not difficult to calculate - so calculate it. The either use Mach 3 system, or a set of digital calipers to confirm what you knew all along.

Endgrainguy - well done - but wait til you get going with backlash, offsets etc etc. It's great fun.

Was my calcu;ation of your steps per inch correct - or am I far too low - your accuracy will suffer if it is too low. There is also the problem, that if you miss any steps - each step is a greater distance, so your error is worse.
Title: Re: general problems with mach3
Post by: Fiero Addiction on May 23, 2008, 12:13:34 PM
Keling recommends using Sherline 1/2 pulse mode, which according to Art will give you a 40us step/direction pulse regardless of the other pulse width settings.

http://www.kelinginc.net/Mach3Tutorial.doc
Title: Re: general problems with mach3
Post by: sshneider on May 23, 2008, 12:33:12 PM

I have great respect for Art and the Mach software, but I cannot agree with allowing Mach 3 to determine you number of pulses per inch. The only trouble is - if the answer is wrong, how do you know. I appreciate Art was probably trying to simplify things, and he has done in so many other respects.

Jim- are you referring to the 'Set steps per unit' button on the settings page?  If so, I don't really understand why you don't think this is a good method?  Have you ever checked out that process?  It's such an easy way to determine your steps per unit which I have found to be accurate.  I have always used this method and never had any problems.  Is there some kind of flaw that I'm not aware of?

Sid
Title: Re: general problems with mach3
Post by: Chip on May 23, 2008, 02:01:31 PM
Hi, Endgrainguy

In Ports & Pins, Are you using the Sherline 1/2 Pulse mode.

Thanks, Fiero Addiction, For the document: That, Keling recommends using Sherline 1/2 pulse mode, This gives your control boards even more time to see Mach's

Pulses and bypasses the settings in Motor Tuning, "Dir/Step Pulse" settings.

Thanks, Chip
Title: Re: general problems with mach3
Post by: jimpinder on May 24, 2008, 03:53:11 AM
Sid -

No - what I am saying is - it is a bit like shop sales people on an electronic till. If they make a mistake they have no idea and charge you just the same. I always have a rough idea how much the items I have bought are.

By all means use Arts software - but I think you should have an idea of the answer before you start, just to make sure that if you make a mistake inputting the information (say by a factor of 10) or your fingure hits the wrong key and it comes up with a different result to the one you were expecting, you know to have a second look.

I suppose the same can be said of me- I should calculate - then use Arts Software to confirm it - just in case I have made a mistake.

Endgrainguy -

Yes if you are using this for woodwork - and are only looking for a couple of thou in accuracy, then you should be alright once you have got over this hiccup. You must excuse me, I work in steel where 1/2 thou is the difference between fitting and not fitting. Yes - if you understand the point I was making, gearing down the drive between motor and leadscrew will give you that much more accuracy - and your motors should be capable of (to a point) speeding up to compensate. It is a question of compromise for the job in hand.

Jim
Title: Re: general problems with mach3
Post by: endgrainguy on May 24, 2008, 02:01:35 PM
Well it wasn't the ball screw. And towards the end of the four hour procedure of taking the x and z axis sufficiently apart to disect the ball nut, sort the balls, and reinstall them, methodically sorting and spacing the 15 of 212 that are smaller, and then putting it all back together, I realized there was a much easier test. I should have simply decoupled the motor from the screw, and used a tick mark in the outboard motor shaft to see if it was still losing steps even without the motor connected to axis. This would have revealed to me ,as it did,that the problem was not the ball screw, or anything in the axis, but electronics or settings. So, wasted time, but knowledge gained.
And  the answer is : Motor Tuning, Step and Dir Pulses, If they're at 0 set them to 5. Thanks  Chip! It also smoothed things out a bit to enable "Sherline 1/2 pulse mode" in ports and pins.
I still have annoying resonance issues at mid speed, I guess the notorious "midband resonance." I'm using Keling drivers and steppers and BOB, the 640 OZ/inch motors and KL-6050 driver on x and y, with the KL-8078 on Z.
 It's not really a problem on Z, where it midband, expresses itself dramatically. With its 2 mm lead, it runs very smoothly from 1-38 IPM or so, and then stalls completely up to about 50, then smooth at higher speeds,  but I"d not want to go faster than 50 anyway on Z, and a reliable 35 IPM is actually fine speed, even for the joint cutting work with router horizontal I'll be doing.
On X, with its 20 mm lead, I get best results microstepping to 1/16 th, and then it runs smoothly up to about 60 inches minute, and smoothly again at about 90, and can go to 300 IPM fine, even at 1/16th mictrostep.
Y, with a .5 lead two start "no name" screw with a little roughness in the screw in a couple spots is good to about 18 IPM, and then bad to about 35 IPM, really atrocious in the middle of that range. Then it runs better, smoothing out beautifully at about 50, and can go to at least 120 IPM, far faster than I'd expect to use it. A little  more experimenting with settings, trying switching the drivers on Y and Z, to se if that helps quiet the Y at its resonant speeds. This is amzing stuff-- not exactly intuitive, is it?
Title: Re: general problems with mach3
Post by: Chip on May 24, 2008, 05:39:58 PM
Hi, Endgrainguy

What's your power supply Volts and Amp's, Stepper Volts and Amp's rating and current setting on Driver boxes.

Check that your Dir & Step "Low Actives" are All Checked, Axis reversing/direction changes should be done in Home & Limits page, "Reversed"  box.

Your Keling boards may not operate properly if not set this way. http://www.kelinginc.net/Mach3Tutorial.doc

Chip