Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: nucular on September 29, 2010, 11:49:41 AM

Title: Mach problem or hardware problem?
Post by: nucular on September 29, 2010, 11:49:41 AM
I am converting a BF20 to CNC and am having a problem that I cannot figure out.  The problem is that when I tune the motors in Mach 3, I can run any axis individually at 200 IPM and 50 to 100 accel with no problems whatsoever.  If I then just use the arrow keys to jog one axis, then start a 2nd axis going - the first axis (the one already in motion) will start stalling and will continue stalling until I release the button for it.  I can get multiple axes to work simultaneously but only by moving the accel down to 100 or less which seems like a huge jump down.  My hardware is all from Keling, who I asked about the issue, and he tells me it is not a problem with the drivers or steppers and that it must be something with Mach3.  Here is the setup I am running :


C11 Breakout board
KL-7220 Unregulated power supply (72 volts, 20 amps)
KL34H280-45-8A (Nema 34 640 Oz stepper - 3.2 rated amps and an inductance of 8.8)
KL23H2100-30-4BM (2) (Nema 23 495 Oz stepper - 3 rated amps and an inductance of 7.0)
KL-8060 (3) (24 to 80 V Driver)

I am direct driving the BF20 and I have the drivers all set
to 1/8 micro stepping.  The Nema 34 is set to 3.14 amps
and the Nema 23s are set to 2.57 amps.  They are all
set to half-current at idle as well.

I just set the PC up for this application - it has 2 gigs of ram, an AMD 3.0 Ghz CPU, and a GA-M68M-S2P AMD motherboard.  The O/S is XP and the only software I have installed is Mach3.  I would think this could be a power supply (low amperage) problem but with that power supply, I don't see how.  I also don't think it is binding in the ballscrews since each axis seems to run so well on its own.


Any ideas or suggestions you guys may have would be greatly appreciated.

-Kevin
Title: Re: Mach problem or hardware problem?
Post by: Hood on September 29, 2010, 12:17:12 PM
Can you check the voltage of the power supply when jogging more than one axis and see if its steady and how much of a difference between jogging just one.
Hood
Title: Re: Mach problem or hardware problem?
Post by: nucular on September 29, 2010, 12:24:45 PM
I will check that tonight.  Also, I don't know if it makes a difference but the power supply is split into two 10 amp feeds.  I am running one to the Z and the other to both X and Y.

Title: Re: Mach problem or hardware problem?
Post by: Hood on September 29, 2010, 01:51:33 PM
A good test would be to jog X and Z or Y and Z seeing as they are not sharing supplies.
Hood
Title: Re: Mach problem or hardware problem?
Post by: nucular on September 29, 2010, 02:01:29 PM
That is actually how I first noticed the problem.  I was moving the Z and tried to start moving the X which caused the Z to stop.
Title: Re: Mach problem or hardware problem?
Post by: Hood on September 29, 2010, 02:05:48 PM
Ok sorry I thought it was just X and Y.
Can you command a move rather than just jogging and see what its like, it would really have to be an equal distance move to test properly. Something like G0X2Y2.
Also if you attach your xml I will have a look through it to see if there any problems there.
Hood
Title: Re: Mach problem or hardware problem?
Post by: nucular on September 29, 2010, 09:53:43 PM
I recreated the condition of forcing the stall and noticed no appreciable change in voltage on the PS.  I did a G0X2Y2Z2 several times and it was successful every time.

I also ran the drivertest.exe program twice.  The first time I saw:

(http://i457.photobucket.com/albums/qq295/mrcodewiz/metalworking/G0704/drivertest1.jpg)

the second time I got:

(http://i457.photobucket.com/albums/qq295/mrcodewiz/metalworking/G0704/drivertest2.jpg)

I have attached the XML - I hope some of this can help you figure it out.

thanks again,Kevin
Title: Re: Mach problem or hardware problem?
Post by: Hood on September 30, 2010, 03:12:20 AM
That is not a very good driver test, even although it says excellent, I would say its not and its certainly not one I would be happy with if it was my machine. The second test either shows either that your system is unstable or you had Mach running when you did the test.
Looked at your xml and it is fine from first glance so I think your driver test results are likely the issue. You could try the optimisation steps detailed at the bottom of the downloads page to see if they help.
Hood

Title: Re: Mach problem or hardware problem?
Post by: nucular on September 30, 2010, 08:23:24 AM
I will start going through that document tonight to see if it helps.  It is definitely either PC related or configuration related.  I took a (much) older dell PC off of my other CNC mill and hooked it up the G0704 (and re-set the steps per) and it works great at the same velocity.  Not only were there no stalls but the motors sounded as though they were running much smoother.

This is what drivertest looks like on the older PC from my other machine.  It does look a lot better.

(http://i457.photobucket.com/albums/qq295/mrcodewiz/metalworking/G0704/dell_drivertest1.jpg)
Title: Re: Mach problem or hardware problem?
Post by: Hood on September 30, 2010, 08:58:13 AM
Yes, much nicer, glad the problem is found  :)
Hood
Title: Re: Mach problem or hardware problem?
Post by: nucular on September 30, 2010, 07:58:05 PM
Well, I went through the optimization document and even cranked my cpu speed down.  I though I was good when I ran the drivertest.exe because it smoothed it out but still no joy.  I don't know what to do next - try a parallel card, get a whole new mb/cpu (intel maybe)?  I just dont know.


(http://i457.photobucket.com/albums/qq295/mrcodewiz/metalworking/G0704/AMD_Drivertest.jpg)
Title: Re: Mach problem or hardware problem?
Post by: Hood on October 01, 2010, 03:14:32 AM
So it definitel is fine with the older computer you tried? Can you load the xml from that computer onto this one and run it just to make sure its not a config issue of some sort. If it still has a problem then its safe to say its the computer or something on it that is causing problems.
What kernel are you running? Have you tried running the driver test at that kernel if it is faster than 25KHz?

Hood
Title: Re: Mach problem or hardware problem?
Post by: nucular on October 01, 2010, 07:53:57 AM
I ran the driver test at 45k and it looked fine as well although there are occasional blips.  I tried the XML file from the working machine and it didn't make a difference.   The new machine has a pretty cheap motherboard but it was the only one with a parallel port on it.  It also has integrated video.  I considered buying a video card and PCI parallel card but I don't want to just keep throwing money at it.  I may just bring it in the house and try to find an old machine for the mill.
Title: Re: Mach problem or hardware problem?
Post by: Hood on October 01, 2010, 08:33:37 AM
More likely to be the port than the graphics as I would expect the driver test to show it if it was the graphics.
If yo look on the diagnostics page does it show the frequency fairly steady and also is it very close to the set kernel?
Hood
Title: Re: Mach problem or hardware problem?
Post by: nucular on October 01, 2010, 12:19:24 PM
Here is what it looked like at 45k.  Mostly smooth but there are blips.    When I hook the new machine up to my other mill, of course I have the same stalling issues with multiple axes but it will even stall with a single axis.  And the times I could get the axis to move and not stall, the stepper doesn't sound smooth at all - the sound sort of fluctuates up and down.  Also every second or two it will make a loud BUMP sound.

(http://i457.photobucket.com/albums/qq295/mrcodewiz/metalworking/G0704/45kdrivertest.jpg)
Title: Re: Mach problem or hardware problem?
Post by: Hood on October 01, 2010, 01:17:16 PM
Ah ok then it could well be a graphic issue as often it appears as spikes and the bump sound probably corresponds to the spike.
Hood
Title: Re: Mach problem or hardware problem?
Post by: nucular on October 02, 2010, 11:02:23 AM
Man, I have been pulling my hair out over this.  I went out and bought a video card, parallel card, and new motherboard and figured I would start with the cheapest and work my way up.  I first tried the video card - it didn't fix it.  I then tried the parallel card and that didn't fix it.  Lastly, I installed the motherboard and completely reinstalled Windows.  While Drivertest was pretty happy about all of this (practically a completely flat line), it still didn't fix it.  I even had an old computer that was similar to the one on my working machine so I dug it out and tried to use it and even it would not work.

OK, so I took the config file from the new PC and plopped it onto my working machine (backed up its config first) and guess what - I get the same behavior on the working machine with that config file.  Previously, I just went in and modified the ports and pins when I connected it to the new mill.  I took the original config from the working machine, put it on my new machine, changed the ports and pins and it works!

So now I have boiled the issue down to a difference in the configs and I really want to know what it is.  Had I not had a working machine, I would have probably just cranked this one down super slow and figured thats how it should be working.

I downloaded the XML reader and went through it but the new (non-working) XML is twice the size of the working one.  I also don't know what every setting means.  I have attached both XMLs if anyone would be so kind as to help me identify it.


Editd to add - I did notice that Sherline mode was on in the working but that isn't the cause.  I tried that setting on the non-working file as well.
Title: Re: Mach problem or hardware problem?
Post by: Hood on October 02, 2010, 11:32:19 AM
First thing I see is you have the not working one at 100KHz kernel and the working at 45KHz, so try the non working at 45KHz.
Hood
Title: Re: Mach problem or hardware problem?
Post by: nucular on October 02, 2010, 02:00:00 PM
crud - i didn't set it back to the baseline after I was horsing with it.  I will create a new profile and test it.  the only things i originally changed were the motor tuning settings, the motor outputs and the input for the estop.
Title: Re: Mach problem or hardware problem?
Post by: Hood on October 02, 2010, 02:07:45 PM
Remember to make sure you dont have sherline mode enabled as that may hamper things as it sets a 40uS pulse width so 25KHz is the max you can get.
Another thing to do is put the pulse width and Dir Prechange on the motor tuning up a bit and see if that helps. I notice in the working one you have 2 for width and 0 for prechange so maybe try at that.
Hood
Title: Re: Mach problem or hardware problem?
Post by: nucular on October 08, 2010, 09:31:39 AM
Well, I thought I had this thing licked after copying over the other config but it appears to be resurfacing now.  One thing I noticed is that it doesn't normally stall when I have one axis moving and then just start another one moving.  It really tends to stall when I have one axis moving (e.g. Z), start another (e.g. X), then change the direction on the X.  I wonder if it has to do with the higher speeds that this mill runs and if it is not decelerating (the X) fast enough before going the opposite direction?
Title: Re: Mach problem or hardware problem?
Post by: nucular on October 09, 2010, 02:18:53 PM
Just to add to this - it seems the reason it resurfaced once I thought it was gone was because I enabled backlash compensation.  I have between .0005 and .002 backlash between the 3 axes.  I have tried it with accel of between 10% and 100% and only turning it off makes the stalling go away.
Title: Re: Mach problem or hardware problem?
Post by: Hood on October 09, 2010, 07:31:51 PM
Do a search for backlash comp and the user name Rich and you should come up with info on setting it up. Afraid I have never used backlash comp so dont know what the settings are that work.
Hood
Title: Re: Mach problem or hardware problem?
Post by: Hood on October 09, 2010, 07:32:55 PM
Heres one I found with a quick search.
http://www.machsupport.com/forum/index.php/topic,14077.msg92924.html#msg92924

Hood
Title: Re: Mach problem or hardware problem?
Post by: RICH on October 09, 2010, 09:10:49 PM
Why not just cut your velocity down and get rid of the problem. Speed is not impressive if the result is a machine you can't have faith in.
Play around with the backlash settings. Start with "slow" settings so you can see how each setting affects how the backlash is implemented.
Makes no sense to me to see a machine rapid at 200 IPM only to cut at 20 IPM or even slower. Ya beat the poop out of the machine to save a few minutes of time .........sorry ....I just don't get the reasoning when at a hobbiest level of machining.

RICH
Title: Re: Mach problem or hardware problem?
Post by: nucular on October 10, 2010, 09:56:16 AM
I could live at a slower velocity.  The nice thing about the higher rapids IMO is at the end of a job when I move the head and table to clear the part so I can remove it - especially if I am making multiple ones. 


The thing that bugs me is that it just seems like the machine functions fine one axis at a time, so why shouldn't it function fine with 2 axes? 
Title: Re: Mach problem or hardware problem?
Post by: arturod on October 10, 2010, 10:59:40 AM
Rich,

Could it be that the breakout board is underpowered.  A C11 is an optoisolated board, it requires two power supplies.  The main power supply must be rated at least at 1.5Amps.  The other side of the circuit can be powered with the provided USB cable.

Arturo Duncan
http://cnc4pc.com
Title: Re: Mach problem or hardware problem?
Post by: RICH on October 10, 2010, 05:56:50 PM
Arturo,
Could be, but i would bypass the BOB if the drives are optoisolated and see if there is a different axis behavior.

nucular,
Do you get the same affect when using the X & Y axis?


Acceleration setting is different than velocity. First you find the max velocity at a low acceleration and then increase the acceleration to find the max acceleration  relative to the max velocity and you don't use either at the max. You reduce them. You want reliable motion over a variety of conditions.
Actualy what you want is power, so the velocity setting may be much lower as that puts the max velocity / speed  setting at the highest torgue relative to motor speed / rpm. All somewhat of a trade off i may add.

RICH

Title: Re: Mach problem or hardware problem?
Post by: nucular on October 11, 2010, 10:46:19 AM
I get the same effect when I try any combination of 2 axes.  X/Y, X/Z, Y/Z, etc.

Also, I am running the 115V in to a 5VDC/2A power supply and am running that to both sides of the board.  Should I be running a separate power supply to the other side instead of using the same for both?
Title: Re: Mach problem or hardware problem?
Post by: RICH on October 11, 2010, 06:04:10 PM
nucular,
I can't duplicate on the lathe what you are experiencing. Didn't try the mill. I run my lathe and mill at max 100 IPM and the acceleration is set at
10 to 15% of the velcocity. By the time i press the reverse key ( 1/2 second maybe ) for the axis the axis has stopped. At an accel of 30% things get
unreliable ( the motors will skip). You really can't directly compare two different machnes but it gives you an a very rough idea / flavor of someone elses. A few seconds are not worth much if it creates aggrevation....... ;)
FWIW,
RICH
Title: Re: Mach problem or hardware problem?
Post by: Hood on October 11, 2010, 06:30:24 PM
You say it only happens when backlash comp is enabled, so what backlash settings do you have?
Hood