Hi,

First, I assume the 1024 PPR indicates that the resolution of the
encoder is 1024 cycles per revolution as defined in
http://www.motion-control-info.com/encoder_glossary.html
Hence 1024 full AB cycles per revolution.

When using a 1024 PPR encoder, there will be 1024 A and 1024 B pulses
per revolution.
Since the A/B signals are directly read by the PC (via the parallel
port), we have to make sure that every of the 4 phases of each pulse is
sampled at least once by the PC in the time of one pulse.  When pulses
change faster than the PC samples, the PC will not see the changes, or
loose track of the phase relation between the signals, and miss pulses.

To compensate for possible fluctuations and inaccuracy of the phase and
symmetry of the A/B pulses, we have to sample more often, e.g. 8 times
per pulse-cycle (my guess).

When running at 3500 rpm, there are (3500/60) * 1024 = 59733 pulses per
second.
When we want to sample 8 times per such pulse, we have to sample at
least at  59733 * 8 =  477867
or about 480 000 times per second.
That is once every 2.1 microseconds.

Since your BASE_PERIOD = 62500 nanoseconds (62.5 microseconds) the
sampling is about 30 times too low to be safe.

When you keep the BASE_PERIOD = 62500 unchanged, and if you want to
sample 8 times per pulse, the maximum number of pulses per revolution is:

 1 / ((3500/60) * 8 * BASE_PERIOD) =

 1 / ((3500/60) * 8 * (BASE_PERIOD / 1000000000))  = 34

Hence, i think that your encoder should have no more than 34 PPR when
keeping the rest unchanged and when using the safety factor of 8
pulse-reads per pulse (which still gives not too much safety).

So, i am surprised that you can go up to about 600rpm without loosing
pulses.

Can anyone check this, please?

Luc



Steve Blackmore wrote:
> Hi Guys, what's a realistic number of PPR for a lathe spindle encoder
> via a parallel port in EMC. Spindle is capable of 3500 rpm. 
> 
> My home made encoder had 90, but I've altered the drive system and
> fitted a 1024 PPR encoder with index. Output is via differential line
> drivers. 
> 
> I've changed the scale factor but it starts loosing pulses at 600 rpm or
> so?? 
> 
> Here's what's in my ini file
> 
> [EMCMOT]
> EMCMOT = motmod
> COMM_TIMEOUT = 1.0
> COMM_WAIT = 0.010
> BASE_PERIOD = 62500
> SERVO_PERIOD = 1000000
> 
> Hal file reads
> 
> setp encoder.0.position-scale 360.000000
> net spindle-position encoder.0.position => motion.spindle-revs
> net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
> net spindle-index-enable encoder.0.index-enable <=>
> motion.spindle-index-enable
> net spindle-phase-a encoder.0.phase-A
> net spindle-phase-b encoder.0.phase-B
> net spindle-index encoder.0.phase-Z
> 
> Steve Blackmore


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to