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. > > It's dependent on your BASE_PERIOD. You can theoretically count one quadrature phase per period, but it's better to have two periods per count - gives better noise margin (noise in this case being encoder phase issues and latency variations).
>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?? > > Hmmm - you must have a 256 cycle encoder, which gives you 1024 counts per rev. At 10 RPS, that's 10240 counts per second, which is a reasonable number for a 16 kHz base thread. At 3500 RPM you need close to 60000 counts per second. I'd guess that your PCs latency is 17k or so (calculated as (1/10240-62500ns)/2). You should check the latency, and see how fast you can run the base thread. You can only count reliably if the counts come in slower than BASE_PERIOD+2*latency. If the latency is actually 17k, you probably can't run the base period faster than 35000-40000 ns, which will only increase the top speed to about 1000 RPM, give or take. I don't know of any computer that can do 60k counts/sec reliably on the parport. The best thing to do is probably to get a Mesa card, either PCI or parallel port connected. You'll get smoother step generation too. >Hal file reads > >setp encoder.0.position-scale 360.000000 > > This should now be 4096, unless you have a 256 cycle encoder which is 1024 phases per rev (in which case it should be 1024). - Steve ------------------------------------------------------------------------------ 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