Hello Guest it is October 21, 2021, 08:18:27 PM

Author Topic: Step & Dir Pulse  (Read 17259 times)

0 Members and 1 Guest are viewing this topic.

Offline Britt

*
  •  10 10
    • View Profile
Re: Step & Dir Pulse
« Reply #10 on: August 27, 2009, 10:37:27 AM »
On the other hand... (just generally speaking) why run a component at the limit of it's supported performance (even taking into account the manufacturer de-rating the spec) when you don't have to? If I did my math right at 7 microseconds, and a 50% duty cycle, the max step rate is about 71khz... so a 10000 step per inch setup could rapid at a max of about 428 ipm... at 6 microseconds it goes up to 83khz and 500ipm... and the other potential issue is how tightly controlled is that pulse width being output (i.e, might jitter affect it)?


:)

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Step & Dir Pulse
« Reply #11 on: August 27, 2009, 10:39:08 AM »
As said previously you can put what you like in, just saying what I would use :)

Hood

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Step & Dir Pulse
« Reply #12 on: August 28, 2009, 07:02:58 AM »
Don't know if I can help with this but I'll try.

These input boxes aren't particularly well labelled or documented but they are covered albeit briefly in Art's video "Installation and Basic Configuration". In it he states that these values are ADDITIONS to Mach's standard step and direction PULSE WIDTHS.

He defines Mach's standard behaviour as being "approximately" 1 to 2 uSec for both. I assume (but may be wrong) that it's Mach's signal jitter that prevents him from being more accurate.

The Step pulse box:

Using a gecko 202 (other excellent drives are available) as an example, the manual says (for the step signal):

"The minimum logic “0” time is 0.5 uSec .... Microstepping occurs on the falling edge of the step input"

So the "approximate" 1 to 2 uSec that Mach delivers is MORE than adaquate, so with this particular drive there is zero point in extending it. You can of course extend it to anything you like - it will make no difference whatsoever except if you go reaaaaaaaaally long (and why would you?) and particularly at a high Kernel rate you will ultimately affect your potential max step rate!

There has been mention of the Max pulse width. The reason there is no MAXIMUM for pulse width is because the minimum is all that matters for correct switching of the electronics. i.e. with the example gecko drive the step signal falls and as long as it's kept low for the minimum 0.5 uSec the electronics will "do their thing".

Onto the The Dir "Pulse" box:

I quoted Art above as saying that this value (like the step pulse) is an ADDITION to the Dir PULSE WIDTH. This in my view can not be taken at face value and needs a bit more thought. The Dir signal (at least for the gecko and for every other drive I have ever seen and/or used) is treated more as a STATE than a PULSE. i.e the Dir signal does not LATCH the drive on a falling or rising edge, rather, it's STATE either high or low is "read" by the drive WHEN it receives a step pulse. The issue of course becomes particularly interesting when the Dir signal CHANGES and this along with Art's description are the clues to what I think this value ACTUALLY means. Here's another quote from the gecko 202 drive manual:

"Direction Setup: 1uS min (20uS min hold time after Step edge)"

Now of course this tells us that the minimum PULSE WIDTH of the dir signal is 20 uSec but I don't think this is what this box value refers to. I think it's the setup time of a CHANGING dir signal of at least 1 uSec BEFORE the falling edge of the next step signal. Therfore Mach's default of the "approximate 1 to 2 uSec" is again absolutely fine (for a gecko at least). The reason I think this is because Art states that this value should be changed if you have the problem of missing a step on a direction CHANGE (yes that old chestnut).

FWIW the direction hold time would only be of issue if your application wanted to change direction more than 50000 times a sec! Hmmmm - cutting microscopic saw teeth perhaps!

So as summary: Check your drive's tech spec and set accordingly by ADDING to the default 1 to 2 uSec if required, or if you prefer, leave both values at 0 unless you have problems.

Cheers

Ian

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Step & Dir Pulse
« Reply #13 on: August 28, 2009, 07:10:10 AM »
the 1 to 2 uS is due to the latency of the PCI Bus, according to Art, when I asked him a few months ago so anything you set in motor tuning is in addition to that as you have said :)
Hood
« Last Edit: August 28, 2009, 07:13:49 AM by Hood »

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Step & Dir Pulse
« Reply #14 on: August 28, 2009, 07:23:42 AM »
Hi Hood - I was really more trying to make the point that Art states 1 to 2 meaning it can't be stated more accurately rather than why. but it doesn't really matter. The point really is that no-one prior to my post had mentioned that the values were ADDITIONS - I thought that was an important point to mention (edit back ;D).

Ian
« Last Edit: August 28, 2009, 07:27:14 AM by stirling »

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Step & Dir Pulse
« Reply #15 on: August 28, 2009, 07:35:34 AM »
Yes it is a valuable point, was just clearing up that Art had mentioned it was due to the latency of the PCI. And sorry about the edit, I have a nasty habit of hitting enter before I have finished what I was meaning to say, might be due to my keyboard sitting about 2feet in the air on a heap of milling cutters. CAT40 chucks and other assorted crap ;D

Hood

Offline kolias

*
  •  1,011 1,011
    • View Profile
Re: Step & Dir Pulse
« Reply #16 on: August 28, 2009, 08:43:34 AM »
Very interesting subject
Nicolas
Nicolas

Offline Britt

*
  •  10 10
    • View Profile
Re: Step & Dir Pulse
« Reply #17 on: August 28, 2009, 08:59:03 PM »
And to make things more complicated ;) depending on how the timing is implemented, if a SMI comes in at just the wrong moment, it can totally throw off the pulse timing -- definitely being able to cause a late pulse end; and possibly being able to cause a late pulse start (effectively shortening the pulse width) though I'd have to see the source code for mach's ISR to be able to tell for sure.