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
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to