PDA

View Full Version : Help with settings!



Tenson
28-09-2012, 10:37 PM
I plugged up my machine for the first time tonight. I'm running:

4Nm Stepper Motor (http://www.cnc4you.co.uk/index.php?route=product/product&path=83_85&product_id=70)
CW8060 6A Driver (http://www.cnc4you.co.uk/index.php?route=product/product&path=82&product_id=29)
HG07 Breakout Board (http://www.cnc4you.co.uk/index.php?route=product/product&path=81&product_id=160)

All connected to my PC running Mach3.

I've just tested it with the Z-Axis motor and it does seem to work, however the motor is way too slow! It is also slower than the units/mm readout. So I assume I need to adjust settings somewhere. I tried 1/8 and 1/10 microstepping, both give a similar result. If I run the auto-tuning routine it gave me 6666.66 steps per unit (mm). However it then limited me on the maximum speed to around 400.

Has anybody else got the same kit and can you tell me some good default settings?

Thanks!

Jonathan
28-09-2012, 11:59 PM
6666.66*400/60=44.4kHz which implies you've set the kernel frequency (goto Config->Ports and pins->Port Setup and Axis Selection) to 45kHz. Exceptionally few parallel ports will manage that, so start with 25kHz.

There is no need to use the auto-tuning since you know all the parameters - pitch of screw, microstepping setting and pulley raito, if any? Just work it out using the method Sean has suggested:

Step/mm = 200*10/5=400 using 200 step/rev motor, 1/10 microstepping and 5mm pitch screw. At 25kHz kernel frequency you will be limited to 25000/400*60=3750mm/min which is passable but a bit slow, so you could change to 1/4 microstepping as that gives 200*4/5=160 step/mm and 25000/160*60=9375mm/min.

Tenson
29-09-2012, 12:40 AM
Oh also remember on the CW8060 drivers that ON setting via the micro switch is actually OFF and ON= 0

Sean.

Lol, how can I remember what I never knew? :witless:

Actually I had suspected that might be the case given just how many pulses it needed to move the motor. Thanks for confirming it. I'll have another go tomorrow.

If my parallel port will do 45KHz is this preferable to 25KHz? It did seem to work.

irving2008
29-09-2012, 10:41 AM
Lol, how can I remember what I never knew? :witless:

Actually I had suspected that might be the case given just how many pulses it needed to move the motor. Thanks for confirming it. I'll have another go tomorrow.

If my parallel port will do 45KHz is this preferable to 25KHz? It did seem to work.

Rule #1.. unless you need it, always go with the lowest usable option... 45kHz might well work, but it'll be more susceptible to noise, Windows glitches and other extraneous things... 25kHz will definitely be more robust. Missing 1 step pulse at 200steps/mm means losing .005mm - not that much but they all add up eventually... better to go with .00625mm resolution (in wood!?) and be safe...

JAZZCNC
29-09-2012, 01:50 PM
Rule #1.. unless you need it, always go with the lowest usable option... 45kHz might well work, but it'll be more susceptible to noise, Windows glitches and other extraneous things... 25kHz will definitely be more robust.

Irving your correct about Rule 1# but here's a much better explanation to why from the main man ART Fennerty. It's an exert from a yahoo reply but it's worth the read.

"
Here's the deal with kernal speed.

Lets say you select 25Khz, and then tune your motors. While tuning, you find
you have the velocity slider up all the way, but would like to go faster than
you can tune.. you then must select the next higher kernal speed, and retune all
motors. If while tuning, you find you cannot go fast enough, repeat till the
kernal speed is such that you CAN select the speed you need.

The reason is this..

In 25Khz mode, the computer interrupts every 40us.. in 35Khz, every 28.5us ,
in 65Khz, every 15us , and for 100khz, every 10us.

Now, the time-in-int is the amount of time spent servicing that interrupt. One
of the secrets of the printer port driver, one Ive never discussed , is that
all drivers in windows are told to do their thing fast, and get out. My driver
breaks that rule..heck it breaks most rules. :) . SO it takes the time it needs
to
do 1 step pulse, read input, set outputs, unset the step pulse, jog if
necessary, etc.. and then exits to wait for the next interrupt. The time-in-int
is the time it takes to do all that.

So lets say your in 25khz, every 40us an interrupt will come along, and your
machin has a time-in-int of 15, that means your cpu has 40-15=25us to do its
normal windows activity. Your computer is now 37% a pulse driver, and 63% a
windows OS..

Time-in-int doesnt vary from kernal speed to kernal speed, only computer to
computer. Lets say yours is 11us. ( a bit high ), if your in 65Khz mode, your
now interrupting every 15us.. , so Windows now has 3us every 15 to do its thing,
its now a cpu that is 20%windows, and 80% pulse engine.

The windows component runs Mach3, so you now have 20%Mach3 ( plus windows
fucntions) , and 80% pulse engine. As the pulse engine % goes higher, the chance
of lockup goes higher.

So higher kernal speeds give you higher criticality, which can be defined as
your sensitivity to random bad events affecting the computer. The lower the
kernal speed, the higher your immunity. As youve noticed, your 45Khz machine
doesnt lock up as much as your 65Khz machine. That follows the logic Im
explaining. (Im almost willing to bet your machine at 25Khz will never lock up ,
or would be very very rare, (Im assuming this from your statement about the two
machines correlated to hundreds of very similar conversations over the years
with lockup victims. Fully 80% of them didnt realize the connection, and tuning
lower in kernal speed stopped the problem.

Now sometimes you NEED higher kernal speeds, ( high step count machines
typically), but fully 90% of people who have set high kernal speeds
dont really need them, they do so simply as a result of the very human instinct
to have the highest possible speed selected. ( "Yeah boys, my engine has triple
hedenstock carbs with dual-hemi semi-octagonal rebuf cyclinder hose accessory
packs!".. :)

You may wonder..why the heck dont I tell people this more forcefully, since
it will stop most lockups. Fact is, higher kernal speeds DO have a smoother
motion just as a result of granularity, and Ive found the vast majority CAN use
higher speeds with no problem. ( I am limited here to 65K ), I use 25K though
for reliability. With over 25 thousand machines out there, the number of
overall lockups is extremely small, and thats including the tendancy people have
to select the higher speeds,so as a result, I try to keep my nose out of their
selections, unless they have trouble.

The final question you should be thinking about now is.. "Why didnt you ask
me this when I complained about lockups.. :) ), the answer is that the
subject comes up so infrequenctly now that even I forgot to ask this basic
question about the kernal speed. I used to post it periodically on this group,
but stopped quite a while back. In retirement I guess Im getting forgetful is
my only excuse. Hopefully, youll find 25K never locks up.. Im suspecting this
is true in your case. I hope so.

For those that want maximum reliability, I suggest this, use as low a kernal
frequency as you can live with. On many machines maximum cutting speed is easily
achievable in 25Khz, the only sacrifice in using 25Khz is perhaps a slower rapid
speed. Rapids are nice, but not as nice as perfect stability, so I tend to give
up some rapids to put their power into stability. Look at kernal speed as a
trade-off, you can go real fast, or real stable.. (This is only if you have a
lockup problem, many can have both and use higher kernal speeds. )

My own suspicion, again based on time and numbers, is that many people would
have lockups, but most leave the kernal at the install speed of 25Khz.. I rarely
hear form them. I hear most from 65Khz, and Ive heard quite a bit from 100Khz..
this is because those that can run 100khz are a rare breed, very fast clean
machines with extremely stable operating system installs. For 65Khz, you better
have a nice fast computer. 45Khz isnt bad, lockups on those indicate a computer
suffering some periodic problem that slows the time-in-int too much..

None of this incidentally explains a random move. The driver is pretty much
incapable of it, it canot move unless commanded, and it takes quite a sequence
normally to command it. Youd have a better chance of winning a lottery than
getting uncommanded motion.....unexpected..yes. :), that happens to all of us..
usually at our unknown request, but uncommanded...near impossible in the drivers
context.

Let us know how 25Khz works.. do you have to sacrifice much speed ( or any )
to use it? And what IS your time-in-int number?

My average time-in-int is 5-7us by the way, which is pretty normal for a 2Ghz
machines, by dual core is only 3-4us, meaning it will take much higher
kernal speeds without reaching any high level of criticality. My 1.2Ghz was
around 15us.. ( pretty bad, but ran fine..)

Sorry for the ramble, I guess it was time for one anyway, for some reason there
are some that actually like my rambles. lol

Thanks,
Art
"Gearotic Motion Gear design Software" (http://www.gearotic.com)

Tenson
29-09-2012, 02:30 PM
Today I put all the dip switches back-to-front and it goes nice and fast :)

Another question though - how do I grease a ballnut?! I got mine from LinearMotion on eBay and I don't think they have any grease as it is. I know I need to put some in that nipple, but since grease is not a liquid, how can I get it in there? Do I need some form of syringe? EDIT: Ahh okay I should have searched for ballnut rather than ballscrew lubrication. I see Jonathan and Jazz use oil. Do you think 75W80 gear-box oil is okay?

Also, my motors get very hot. Does the 'half current SW4' dip switch relate to the automatic reduction of current if the system doesn't do anything for a while? Should I just ignore them getting hot, or what?

Thank you!

irving2008
29-09-2012, 03:54 PM
Define 'hot'.... sizzling if you put a drop of spit on them or just hot to touch? motors can run at 60 - 80degC if worked hard. Worth enabling the 'reduce current in standby' mode if you can. If they still seem to be too hot maybe you've got the current setting too high... confusing RMS and Peak values maybe?

irving2008
29-09-2012, 04:00 PM
Irving your correct about Rule 1# but here's a much better explanation to why from the main man ART Fennerty. It's an exert from a yahoo reply but it's worth the read.

"
Here's the deal with kernal speed

.. lots of words...


Thanks,
Art
"Gearotic Motion Gear design Software" (http://www.gearotic.com)


Yeah, I recall reading that some time back... its a longer, more detailed, but not necessarily better answer... :) saying the same thing... don't stress stuff unless you really need to...

JAZZCNC
29-09-2012, 04:50 PM
its a longer, more detailed, but not necessarily better answer... :) saying the same thing... don't stress stuff unless you really need to...

Not to be pedantic here Irving but YES it is a far better "Explanation" and more accurate Answer because It shows has nothing to do with noise, windows glitch's etc like you suggested. It explains exactly what or why the kernal speed is important and explains the in's n out's of using it higher than 25K rather than just flat don't use it.!

irving2008
29-09-2012, 05:29 PM
Not to be pedantic here Irving but YES it is a far better "Explanation" and more accurate Answer because It shows has nothing to do with noise, windows glitch's etc like you suggested. It explains exactly what or why the kernal speed is important and explains the in's n out's of using it higher than 25K rather than just flat don't use it.!

When you've written a few hi-speed communications device drivers for windows you'll find that Windows (or to be more correct the underlying ancient-ish kernel) is often going off to service interrupts that are random and unexpected and have no purpose or indeed have no damn right to exist at all... call that noise/window's glitches/etc. but its a source of lockups that often have no easy explanation. As Art says, there's little time to play inside the interrupt and he breaks the rules to get things to work... trouble is, you can't be sure his driver is the only one breaking the rules... graphics drivers are pretty bad too sometimes, as are network drivers... and yes, i know ideally you don't want the machine on a network, but you can't do much about graphics drivers. So, I agree, his answer IS more detailed but its only down to certain level of accuracy as was mine... and for most people its moot anyway as they can't do much about it, and I stand by mine... if you don't need to do it, don't, and you gain reliability, and if you do, get a faster box... which is pretty much what Art says... :)

but lets not argue :)

JAZZCNC
29-09-2012, 06:19 PM
but lets not argue :)

Has usual I'm seeing it different rather than arguing.? I'm seeing it mainly from the Less knowledgeable users side ence why IMO it's a better explanation. . . . But yes lets have a hug.:couple_inlove:

Tenson
29-09-2012, 07:59 PM
25KHz is working fine now I have the dip switches sorted. Also the motors are less hot since I enabled half current SW4.

However there is ANOTHER issue! All axis move nicely except the side-to-side one (Mach 3 calls this X). Strangely it goes in one direction (to the right in the video) fine and in the other it makes a horrible rubbing noise. It's the ballscrew, but I don't get exactly what the issue is. Can anyone help?

It is running with a rotating ball-nut arrangement, so the ballscrew is tensioned between the gantry sides. I've played with alignment of the ballscrew and even thought it seems to be straight and central with the ballnut it always makes that sound. The only way I can get it not to make the noise is if I press the left end downwards (as it moves towards it), but as the gantry moves to that side it automatically pulls it back up again to be aligned with the ballnut, so it it only works one time, I can't fix it like that. Interestingly the problem reduces massively if I fix the ballscrew at the right end only, or hold it softly by hand, but I worry this might not be very accurate. Actually the ballscrew is not straight, but when tensioned and aligned it is, not that this makes it work well.

I guess it is some problem with the moment force in that direction but how I'm supposed to cure it, I've no idea; just the that end hang freely so it can bob up and down?

Video 1 - Ballscrew tensioned tightly and straight.
DSCF8166.mp4 video by tenson_uk - Photobucket (http://s608.photobucket.com/albums/tt169/tenson_uk/?action=view&current=DSCF8166.mp4)

Video 2 - Ballscrew held at one end only by hand.
http://s608.photobucket.com/albums/tt169/tenson_uk/?action=view&current=DSCF8168.mp4

motoxy
29-09-2012, 09:39 PM
Tenson I have just gone through this same senario for three weeks. I replaced the ballnut because it did not have enough bearings in it, Read my build log for why. Turns out that after chatting with dean it was all down to resonance and tuning the steps correctly. Try changing your steps to a lower figure, eg from 1/8 to 1/4. It may be a mechanical problem but this is worth checking. I went from 1/8 to 1/4 and it got worse. Then went to 1/5 and the machine is sweet!!

bruce

JAZZCNC
29-09-2012, 10:38 PM
How much tension is it under when tight.?
How are you aligning the screw with nut.?
Have you checked there's no play or slop in the rotating ballnut.?

When leaving the one end lose does it work ok without holding it and if so does the screws lose end move up or down when Z axis travels along it length.?

I see in the video with you holding the end that the screw is a sloppy fit where pass's thru the gantry sides. Is this correct or have you removed a bush or anything.?

Really would think that if you nipped the screw up at each end just enough so the screw can slide slightly then move the Z axis to each end a few times it will align it's self then tighten the ends.

Tenson
29-09-2012, 11:36 PM
Hi Motoxy,

So the problem was a bad ballnut, or a resonance with the steps or both? Would you link the relevant part in your build log, please?


Hi Jazz, what you describe in your last sentence is exactly what I did to align it. The holes are over-sized because I couldn't align the ballnut mount perfectly during construction. After doing the alignment procedure you describe that it makes the horrible sound even though it all looks true. However bare in mind it always does it in one direction only. It certianly seems like the moment force in that direction (nut pulling the z gantry rather than pushing) causes the resonance.

Yes with only one end fixed the other end bobs around as the Z gantry moves.

JAZZCNC
30-09-2012, 12:06 AM
Ok first bruces(motoxy) problem was micro stepping and resonance not ballnut or alignment.

Your problem seems and sounds more like alignment. I think your just going to have to keep tweaking each side untill you get the alignment correct.
Not keen on the over size holes has the screw isn't locked and can move around.?

Sorry can't help any more than that.!!

Tenson
30-09-2012, 02:13 AM
Hi Jazz,

The screw is of course fixed when tensioned up. I'll play some more tomorrow, maybe adjust the ballnut mount rather than the ballscrew and try different microstepping. I do wish I didn't bother with a rotating ballnut on the X axis and just had them on the main gantry. On the positive side, the main gantry despite being about 50Kg will do over 10,000 mm/min :)

Jonathan
30-09-2012, 12:05 PM
It seems unlikely to be the problem, but I would check that the ballnut is concentric to the screw. When the ballnut rotates does the ballscrew move up and down a bit? If so you should tweak it until it doesn't.
Good to hear the X-axis is working well, you've got 10m/min on a RM1610 ballscrew - can you remind me what length the screw is please, 1.5m?


I do wish I didn't bother with a rotating ballnut on the X axis and just had them on the main gantry.

So do I...

Tenson
30-09-2012, 01:41 PM
Hi Jonathan,

Did you also use a rotating ballnut on the sideways axis? The main reason I regret it is the extra height of the gantry making it less strong.

The long axis is 1610 with and 1.5m. I don't know if it is fully reliable at 10m/min but jogging it doesn't stall.

Jonathan
30-09-2012, 02:14 PM
Did you also use a rotating ballnut on the sideways axis?

No, there wasn't any reason for me to do so on such a short axis. It just adds complexity.


The long axis is 1610 with and 1.5m. I don't know if it is fully reliable at 10m/min but jogging it doesn't stall.

That's similar to mine, so about what we expected. What have you set the acceleration to as in the video it looks a little low?

Tenson
30-09-2012, 03:01 PM
No, there wasn't any reason for me to do so on such a short axis. It just adds complexity.



So it was just a cheeky quip? How nice of you, even though I paid you for the parts.

The acceleration is low at the moment since the machine isn't working fully yet.

Jonathan
30-09-2012, 04:13 PM
So it was just a cheeky quip? How nice of you, even though I paid you for the parts.

I guess so, but I apologise if you considered the response cheeky as that was not my intention. If I recall correctly I advised not to use one on the shorter axis, but you had other reasons to use it which seemed fair enough and it shouldn't make the machine perform worse, so I made it.


The acceleration is low at the moment since the machine isn't working fully yet.

I see.. looking forward to seeing it cutting soon.

Tenson
30-09-2012, 04:47 PM
Then, why do you wish I didn't use a rotating ballnut on the shorter axis? Has my choice caused you bother in some way?

My recollection is that you said it was overkill. It's not your job to tell me if I'm making a bad choice but I also don't expect 'I told you so' comments when I'm struggling to get it all working.

I think I know what the issue is anyway. On the ballnut mount I didn't have those massive retaining nuts on the shaft tightened up very much. That means when it pulls on the shaft the pulley inside the mount rubs. Does that make sense? However if I tighten the nuts on the end of the shaft to keep it in place, the shaft then rubs on the body of the mount since the two bearings are not perfectly parallel. I think I need to put a tiny spacer in there.

For those who don't know what I'm talking about, here is a picture of the mount.
http://i608.photobucket.com/albums/tt169/tenson_uk/RM1610rotatingballnutcompactS.jpg

Jonathan
30-09-2012, 05:17 PM
My philosophy is different there so we'll just have to agree to differ and leave it at that.


I think I know what the issue is anyway. On the ballnut mount I didn't have those massive retaining nuts on the shaft tightened up very much. That means when it pulls on the shaft the pulley inside the mount rubs. Does that make sense? However if I tighten the nuts on the end of the shaft to keep it in place, the shaft then rubs on the body of the mount since the two bearings are not perfectly parallel. I think I need to put a tiny spacer in there.


I was going to suggest checking that the angular contact bearings are both the right way round, since if one was the wrong way that could cause rubbing and hence a noise in one direction. However what you suggest here sounds much more likely. I recall only leaving a very small shoulder (0.1mm ish) on the shaft so that the portion of the shaft close to the bearing acts as a second seal/shield. If this shoulder is too small then the shaft could rub on the mount if the bearing outer ring is not flush or protruding from the surface of the mount? The mount should only be run with the locknuts correctly tightened, so tight enough to eliminate backlash but not so tight as to damage the bearings. As the shaft is rubbing with it tightened properly I need to either skim about 0.2mm off the place on the shaft to stop it rubbing, or make a spacer as you suggest.

Since I'm currently in Nottingham in the week I could only modify the shaft next weekend, but if you want me to make an accurate washer (25mm ID, 35mm OD and 0.5mm thick should do it) then I can do that now and post it to you on Monday?

Tenson
30-09-2012, 05:30 PM
Hi Jonathan,

I just reassembled it with a thin plastic washer in there I cut from some packing. It seems to work nicely now, so thanks very much for the offer to make a washer, but I don't think I need it. I'm still to put it back on the machine and see if that noise has been sorted though! Off I go!

Tenson
30-09-2012, 06:45 PM
Excellent, it is now working :) I only get about 4500mm/min from that axis though, is that normal given the driver is running on 42V and 4A?

Next I need to get the spindle going. Can anyone recommend an suitable in-line pump? I plan to use a bit of aluminium extrusion as a radiator.

JAZZCNC
30-09-2012, 11:26 PM
Then, why do you wish I didn't use a rotating ballnut on the shorter axis? Has my choice caused you bother in some way?

My recollection is that you said it was overkill. It's not your job to tell me if I'm making a bad choice but I also don't expect 'I told you so' comments when I'm struggling to get it all working.

Credit to Jonathan here because if you talked to me like that after I'd been good enough to make you a rotating nut assembly of my design for what I imagine is fraction of the cost of the rotating nuts real value you'd be getting told where to jump mate.!! . . . . Advice and help is given freely from peoples good nature and whether your struggling with frustration or not thats a bad attitude to repay such help.:thumbdown: