Kirk Wallace wrote:
> On Wed, 2009-09-30 at 21:07 -0500, Jon Elson wrote:
> 
>> But, at least, you have the encoder counters running at the base-thread 
>> rate.  I was afraid you might have
>> been running the counter at the servo thread rate, which would really 
>> slow the sampling rate.  (Note the
>> above quoted numbers are NOT a recommended setting, just to show the 
>> part of the file in question.
>>
>>
>> Jon
> 
> One of my replies suggested using the servo rate for the spindle.
> Without giving it a great amount of thought, my thinking was it might
> help average out any jitter by increasing the number of counts per
> sample. Since the spindle cannot change speed very quickly, I thought
> the servo update rate would be adequate. The problem with my shooting
> from the hip is that I could miss or shoot at the wrong target. I hope I
> can find some time to actually try a low count spindle to see what
> reality might be.
> 

The software encoder counter has TWO functions.

update-counters should always be run as fast as possible - that means 
the base thread.  update-counters is the function that actually looks
at the encoder inputs and counts the edges.  The faster you run it, the 
more accurate the velocity and interpolated position values will be.  At 
a minimum, you must run it about twice your encoder's count rate, to 
avoid missing pulses.  But you should run it much faster if you can.

The other function is capture-position.  capture-position reads the
accumulated raw count, and uses that information to update position, 
position-interpolated, velocity, and other related outputs.  It should 
run only as often as the outputs are needed - this means the servo thread.

The extreme jitter that Jon Elson keeps mentioning will NOT happen if 
you use position-interpolated.  capture-position doesn't just use the 
number of edges seen since the last time it ran - it also looks at when 
those edges occurred, in order to calculate a more accurate value for 
velocity and position-interpolated.  Those values are even reasonably 
smooth and accurate when you are only getting one count every 10th or 
100th time that capture-position runs.

Steve should set up halscope as others have instructed.  Capture 
position, velocity, and position-interpolated.  Trigger on a falling 
edge of index-enable, so that the scope will take data at the beginning 
of a threading pass.  Sample at the servo rate.  You should be able to 
get 4000 samples, which is 4 seconds at the usual servo rate of 1mS.

Then post some screen shots - first zoomed out so we can see the entire 
4 seconds.  Then zoom in so we can see about two revolutions of the 
spindle.  If you are running at 200 RPM, that would be about 2/3 of a 
second.

Those images will probably provide enough info that we can suggest a 
nezt step.

Regards,

John Kasunich

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to