There is a limit on how fast this can be done because the encoders do not
measure instantaneous speed.   There are two ways to read an encoder
1) You read the encoder to get a position and then wait a short amount of
time, read it again to kw how far it moved over that short time.
 Typically the wait time is about what is used for the servo period,  or,
2) You get an encoder "tick" and note the exact time then later you get a
second "tick" note the time.  Then you can subtract the times and know how
long it took to move one encoder line.

The first method is best for fast-moving encoders, the second for
slower-moving encoders.   But in both cases the more lines per revolution
you have on the encoder the faster this process can be.   Modern encoder
reading hardware can easily measure line crossing at over a million per
second but then you need a very high-resolution clock that running with a
nanosecond-level period so that you can accurately measure the
microsecond-level encoder pulses.

Also in all cases, a longer (slower) sampling period gives better accuracy.

What you need to do is tell everyone here you actual real-world
requirements, from that someone can work out what encoder, sample period,
and clock resolution is required.

Once you know what you need setting up hardware to do it is easy.




On Mon, Dec 7, 2020 at 6:50 AM Todd Zuercher <[email protected]> wrote:

> Is it possible to set up a firmware for a Mesa FPGA that could read the
> encoder velocity from an encoder input and output that velocity as an
> analog command directly to an analog output (hopefully at faster than the
> servo thread rate) in order to bypass having to do that connection in Hal?
> Can the analog outputs of any of Mesa's daughter cards be updated faster
> than the Servo-thread rate?
>
> Todd Zuercher
> P. Graham Dunn Inc.<http://www.pgrahamdunn.com/index.php>
> 630 Henry Street
> Dalton, Ohio 44618
> Phone:  (330)828-2105ext. 2031
>
>
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 

Chris Albertson
Redondo Beach, California

_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to