Thanks Jeff; Servo-thread was the problem. I am still overwhelmed by all the options and capabilities of EMC2. My head hadn't connected the fact that even though the encoder was connected to the Motenc hardware it had to be scanned into EMC faster than the processing rate (servo-thread).
I have extra Motenc encoder inputs. The reason I was trying the software encoder, hal_motenc doesn't have a velocity pin, and every attempt to produce one had failed. (Possibly because of the servo-thread scan rate). Do you have a suggestion of a preferred way to get a velocity input for "motion.spindle-speed-in" from the Motenc encoder? Thanks again for your help. Don On Wed, Jul 14, 2010 at 8:00 AM, Jeff Epler <jep...@unpythonic.net> wrote: > Have you already used all the hardware encoder counters on your motenc? > If you're using one of the channels for an MPG, consider moving the MPG > to software counting and the spindle to hardware counting; it's much > easier to count pulses as slow as an MPG in software. > > You need to place the HAL function to read digital inputs on the > base-thread, not the servo-thread. Otherwise, the information being > processed by the encoder is only sampled every servo-thread--it doesn't > matter if the software encoder is updating every base-thread. > > You want the base thread to look like: > addf motenc.0.digital-in-read base-thread > addf encoder.update-counters base-thread > and the servo thread to look like it does now, except with > digital-in-read removed. > > Also, make sure you've selected an appropriate base-thread period based > on the expected maximum spindle speed you want to measure. Example: > BASE_PERIOD=25000, measured jitter=12000, input waveform 50%. > Under these conditions, the fastest signal that can be accurately > sampled is=2*(25000+12000)ns or about 13kHz. > > Jeff > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users