On Sun, Oct 28, 2007 at 11:53:46AM +0100, Geert De Pecker wrote: > Is the problem with software encoding related to the speed of the pulses > coming in? If so, would a low res encoder (homemade) of eg 20 ppr be a > solution?
The only problem with software counting is that it's not very fast. But, the spindle on many lathes is not very fast either, and if you choose your encoder correctly, it really is fine. If you have an encoder with a few hundred pulses per revolution, you can run the spindle at a fairly good speed and still get reliable counting. I have run a lathe like this with no problems. It limits the maximum speed at which you can cut threads, that's all. I don't think 20 ppr is enough to accurately represent the position of the spindle. You probably want at least 200. More is better. You should work backward from the speed you want to thread, considering the speed of your base period, to the number of edges you can read. Leave a little safety margin. With 300 edges you can thread at 1000 rpm on just about any computer (25 usec base period). Do the math with YOUR numbers and be sure you understand before buying an encoder. It is true that with hardware encoder counters you do not have to worry about this. But software counting should not be discounted as quickly as some discount it. It is a good/cheap solution for low resolution counting at lower speeds, like for spindles, jogwheel/MPG, etc. > Does it have to be a quadrature encoder (see in the HAL doc that both A > and B are used) or is there a solution with 2 signals: one index Z and > eg only 'A'? Yes if you don't want to use rigid tapping, this is OK. > I would assume that when 'B' is not used and > encoder.N.x4-mode is false, it would also work? Not exactly, you have to use the counter module (emc2.1) or counter mode in the encoder module (emc2.2). It has nothing to do with x4-mode which is primarily useful for jogwheel/MPG. emc2.1: http://www.linuxcnc.org/docs/html/man/man9/counter.9.html emc2.2: http://www.linuxcnc.org/docs/devel/html/man/man9/encoder.9.html Chris ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users