On Sunday 15 July 2012 10:32:13 andy pugh did opine:

> On 15 July 2012 14:45, Gene Heskett <ghesk...@wdtv.com> wrote:
> > But the internal calculations for velocity etc are done at the servo
> > threads granularity of nominally 1 millisecond.  So there is no chance
> > of the figures being accurate when the count may be up to a
> > millisecond old.
> 
> The counts shouldn't be more than a thread-dither old (10uS or so).
> The calculation function reads the latest count from the base thread
> functions (possibly a base-thread old).
> 
But does it timestamp that data marking the last time it changed?  Thinking 
further about the quadrature thing, it would seem to be a Good Thing if it 
carried a 4 element time stamp in a rotating buffer so that the time stamps 
could be added as ints and right shifted 2 places in order to get the 
average velocity per count over a 4 count cycle.  Even that seems to me it 
would be one heck of a noise filter for any mechanical errors by averaging 
the 2% or so errors over a full slot.  The definition of slot being 
completely arbitrary as long as its 4 consecutive edges.

How that would work in the face of a direction reversal might make an 
interesting problem.  I do believe its solvable though. By keeping a 4 
element array of time stamps, with the address of the element in the array 
being derived by the A/B since the 2 bits of data would make the last 2 
bits of the address into the array, it could then be updated every base 
thread by writing that timestamp to the AB address of the array, no time 
consuming conditionals needed.  That way the average speed and instant 
direction could be determined in the FP servo thread using the granularity 
of the base thread.  The servo thread math could determine the direction by 
looking at the time stamps (find the newest one, then which side is the 
next newest one on is direction) since the order will change with the 
direction.

> The FPGA in the Pico card being discussed here ought to make an even
> better job at being up-to-date.

How hard is it to use this pico card with the d525mw boards?  They are 
shall we say, slot starved.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
"A mind is a terrible thing to have leaking out your ears."
                -- The League of Sadistic Telepaths

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to