Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: SkyMoCo on June 16, 2013, 12:34:46 PM

Title: motor tuning - pulse setting relation to kernel speed
Post by: SkyMoCo on June 16, 2013, 12:34:46 PM
Like most of us, I'm perpetually tuning/tweaking my machine.   I had this issue that cropped up recently where, a G0 move of both X/Y at the same time would cause one of the motors to stall.   After trying all sorts of things from mechanical (there is no binding and rapid moves with just one axis were fine) to motor tuning I finally found that changing my step/direction pulse from 2 to 6 seems to have solved my issues.

I used to think that the pulse timing had to do more with my driver/motor combo, but since this only happened when X/Y moved at the same time, it was more on the Mach side.  Does having this set to 6 have any negative aspects?  I'm running the kernel speed at 25KHz, the system test runs fine at 60KHz, should I go to that rate and then can I drop the pulse timing?
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: Tweakie.CNC on June 16, 2013, 12:47:54 PM
I think this problem stems from blended axes speed when using constant velocity mode. Perhaps reducing your axes velocity settings would be the safer (more reliable) approach.

Just my opinion.

Tweakie.
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: SkyMoCo on June 16, 2013, 12:53:03 PM

That's what got me.  I reduced the velocity from 40 all the way down to 5 or 6 and still had this issue.   It only happened when I did a G0 of both X and Y at the same time over a longer distance.   Normal speed cuts of complicated shapes never had an issue.   It was only at the beginning or end of a program when I did fast moves into position.

I think this problem stems from blended axes speed when using constant velocity mode. Perhaps reducing your axes velocity settings would be the safer (more reliable) approach.

Just my opinion.

Tweakie.
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: HimyKabibble on June 16, 2013, 12:59:09 PM
The pulse width has nothing to do with velocity or acceleration - it's a matter of ensuring the minimum pulse width is enough for your motor drivers to reliably detect the pulse, and it can be, sometimes very significantly, affected by your BOB.  I've seen several, usually CNC4PC brand, BOBs that SERIOUSLY mangle the signal.  What you really need to do is get an oscillocscope and see what the step pulses look like AT the motor driver pins.  You'll likely find they look VERY different from what they look like at the BOB output pins.  In any case, at 25MHz kernel speed, a setting of 6 has absolutely no down-side whatsoever.

Regards,
Ray L.
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: SkyMoCo on June 16, 2013, 02:42:43 PM
I don't have a scope nor am I sure I could figure out how to hook it up correctly.  I did recently upgrade to a PDMX-126 BOB, a driver motherboard and a set of gecko 203V drivers.   Their support has been great, it's why I keep purchasing their products.    Without a scope, is setting the pulse width just a matter of trial and error?   I assume that shorter step pulses are better, and that I should go as short as possible without my motors stallling.

The pulse width has nothing to do with velocity or acceleration - it's a matter of ensuring the minimum pulse width is enough for your motor drivers to reliably detect the pulse, and it can be, sometimes very significantly, affected by your BOB.  I've seen several, usually CNC4PC brand, BOBs that SERIOUSLY mangle the signal.  What you really need to do is get an oscillocscope and see what the step pulses look like AT the motor driver pins.  You'll likely find they look VERY different from what they look like at the BOB output pins.  In any case, at 25MHz kernel speed, a setting of 6 has absolutely no down-side whatsoever.

Regards,
Ray L.
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: HimyKabibble on June 16, 2013, 03:05:28 PM
With Geckos, you do want to set the Step Pulse Polarity to Active Low.  That could be a large part of your problem.  Pulse width should not be an issue with Geckos and a PMDX BOB - the default setting should work fine, IF set to Active Low.

Regards,
Ray L.
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: SkyMoCo on June 16, 2013, 03:17:05 PM
Ugh, a  really good answer to my question and I have to go out of town for a couple days for work and will not get back to test this until late in the week.   That's not fair I want to go give this a shot right now as I am sure I do not have Step Pulse set to active low as you suggest.

Anyways, will  report back as soon as I test it.
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: RICH on June 17, 2013, 10:40:49 PM
If the Kernal Speed of 25kz satisfies your velocity requirements for a given value of steps per unit going to
a higher kernel speed will not be of any advantage.

RICH
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: SkyMoCo on June 22, 2013, 02:11:45 AM

Setting Step Pulse to Low did seem to help some.   My motors don't stall anymore but they lose steps.   It only seems to do so under load though, I can cut in air for 30 minutes and it's dead on, but running a part where there is some load and it can suddenly be off by 1/4 inch.   Everything turns freely and I am using ball screws throughout.    Could it be my motors are underpowered, 425oz on the Y, 269oz on the X.  This only seem to start happening recently when I am cutting heavier material.
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: stirling on June 22, 2013, 03:51:50 AM
With Geckos, you do want to set the Step Pulse Polarity to Active Low.  That could be a large part of your problem.  

As a general rule this is true - however from the data sheet the 203V appears to be an exception and steps on the positive going edge of the signal - so unless it's a typo - active high in Mach.

Also if I've read the data sheet correctly the default step pulse width should be increased in Mach by 2 to 3us.

Could it be my motors are underpowered, 425oz on the Y, 269oz on the X.
These are just the spec HOLDING torques of your motors (i.e. when they're NOT moving) and even then IF and only IF they are powered as per their spec.

What power your motors have when they're moving and at what speed depends on the specs of the motors and how you're driving them. To check that they're being driven optimally you'd need to give us (at least) the current rating of your motors, the current setting of your drivers, the current capabilities of your power supply, the inductance of your motors and the voltage of your power supply and ideally the gearing ratio. Your motor torque curves would be a bonus.
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: SkyMoCo on June 26, 2013, 01:45:22 PM
Sorry for the delay, I had some issues getting back on the forum.

My router has been running just perfectly for such a long time with the current settings I thought that even though everything moved freely, it wouldn't hurt to take it all apart and clean it.   Well, along the way I discovered that one of  the set screws that locks my X axis to the shaft was loose.    It was the one that tightens against the flats.   So, under load the pulley would slip, but under normal operation the other set screw held it tight enough that there was no slack.

Still it wouldn't hurt to have you look over my config and see if there is anything you see out of wack.

Mach 3.043.063
XBox Plugin
MSM Professional 2.0

Dell Optiplex 755 (Two Cores, 2Gb ram)
     Onboard video
     Onboard Parallel Port
     
PMDX-126 MultiMode Breakout Board

PMDX-133 Gecko Motherboard

Gecko 203V Drivers (current limited to 5amps, 117.5K resistor)

Kepco 350W power supply (48V, 7.5Amps)

Z-Axis 20000 steps per inch, 160 Velocity, 30 Acceleration
       Standard .1 pitch lead screw, direct drive
       Xylotec 2.8A, 269oz 
X-Axis 15875 steps per inch, 120 Velocity, 40 Acceleration
       Metric 10 Pitch, 2/3 belt drive,
       Xylotec 2.8A, 269oz   
Y-Axis 7620 steps per inch, 180 Velocity, 40 Acceleration
       Metric 20 Pitch, 2/3 belt drive
       425az, 4.2v, 3A Stepper from HobbyCNC

Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: TheSniper on December 27, 2013, 09:03:49 PM
@SkyMoCo...
Curious what ever happened? you never posted what your solution was.
I am having similar issues and am hoping perhaps your solution could be mine too.
TIA.
Sam
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: geh7552 on December 28, 2013, 10:15:20 AM
Gecko 540 and 210's should be set to active high and 3us or 4 us pulse width. So in Mach do not check the "active low" boxes for motor setup. I was running mine at 2us (Gecko recommended setting) and intermittently had missing step problems. It cleared up at 3us...  :)
Title: Re: motor tuning - pulse setting relation to kernel speed
Post by: TheSniper on December 28, 2013, 12:03:38 PM
Hmm funny thing SkyMo claimed to have Gecko 203V's...
they require Active High and 2us. So are you saying your response was the solution?