Jeff Epler wrote:
> John,
> 
> When using stepconf, the BASE_PERIOD is chosen for you.  If the required
> step rate is low, stepconf chooses a high BASE_PERIOD, capped at
> 100000ns.  In the case of Alan Condit's machine, the maximum required
> step rate is 3500Hz which is one step per 285us or so.
> 
> Do you see any reason why this large BASE_PERIOD would be a problem?
> 

Yes, jitter.

Base period doesn't just determine the maximum step rate.  It also 
determines the granularity of step rates.  With a period of 100uS, the 
available step rates between 1250 and 3500 Hz are:

3,333 (3 periods)
2,500 (4 periods)
2,000
1,667
1,429 (7 periods)
1,250 (8 periods)


If the period was 29uS, the available step rates would be much closer 
together:

3,448 (10 periods)
3,135 (11 periods)
2,873 (12 periods)
2,652
2,463
2,298
2,155
2,028
1,916
1,815
1,724
1,642
1,567
1,499
1,437
1,379
1,326 (26 periods)
1,277 (27 periods)


When the machine needs to move at a rate between the ones listed, 
stepgen alternates between the two nearest ones.  The closer together 
they are, the less radical the jumps, and thus the less jitter.  In my 
opinion if you are running software stepping, you should run your base 
thread as fast as possible, regardless of your maximum step rate.

For drives that require long step pulses, doublestep is NOT a good 
thing.  In that scenario, it wastes an enormous amount of CPU time 
busywaiting that would be better spent running a faster thread.  The 
real need for doublestep is when the step length is a few microseconds 
or less, since it is impractical to run a thread fast enough to generate 
such short pulses.

This is a personal opinion only, but IMO standard stepping should be the 
default.  The main advantage of doublestep is that it provides a higher 
maximum step rate in many (but not all).  Alan doesn't need that higher 
rate.  (And even if he did, with his long step pulses, he would actually 
get a higher rate using regular stepping and a faster base period.)

I recommend 
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?TweakingSoftwareStepGeneration
as the reference for calculating base periods and such.  I admit it 
would be helpful if that page and the associated spreadsheet were 
updated to account for doublestep.

Regards,

John Kasunich



-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to