Javier Ros wrote:
>
>
>
> I'm curious about the concept.
> Could you please elaborate a bit or refer to some bibliography?.
Peter's reply is a good start.  Let me add a bit.  My universal PWM 
controller has also had this
feature added (haven't got it put into my other products, yet.)  There 
is a free-running binary 16-bit
counter that is clocked at 1 MHz.  Assuming a 1 ms servo period, that 
counter will roll over about
every 65 servo cycles.  Whenever a quadrature transition occurs, the 
value of the counter is sampled.
When the encoder count is latched in preparation for readout, the time 
stamp is also latched, as well
as the current count of the free-running counter.  These are all read 
out with the encoder data.

So, then the difference in time between the most recent quadrature 
transition and when the position was
sampled is known.  Also the time of the previous transition is known by 
the driver.  So, the time between
very slow encoder counts can be computed quite accurately, down to where 
one encoder count is
coming in every 65 ms. (about 15 counts/second.)

See the code in .../src/hal/components/encoder.c for the simplest 
example, an all-software encoder
driver.  See the code in .../src/hal/drivers/hal_ppmc.c  in function 
read_encoders( )  if you want to
see how it is done with external hardware counters.

Jon

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to