On 05/17/2018 11:13 AM, andy pugh wrote:
On 17 May 2018 at 17:05, Jon Elson <el...@pico-systems.com> wrote:
So, a component needs to set the encoder-index to true, and then watch for
it to go false. When it sees the encoder-index go false, if does the
subtraction and stores the difference in a net. It then turns the
index-enable back to true.
I think that needs three states.
The software encoder has "latch" inputs and outputs, possibly for this
purpose (they exist but the docs say nothing:
http://linuxcnc.org/docs/2.7/html/man/man9/encoder.9.html
Well, specifically, he is using the Pico Systems PWM
controller. We don't provide the entire functionality of
the software encoder. But, we do provide all the
functionality that has historically been used.
So, the latch is triggered at the start of the servo thread,
and can't be triggered by the external event.
This makes sure all encoder counters are sampled
simultaneously, and the 24-bit value held until the PPMC
driver can read all bytes of all axes out. And, we can't
interfere with this behavior or it would affect the servo loop.
So, the way to "latch" the position by external signal is to
use the encoder-index feature to zero an extra encoder
counter on the external signal, and then see how many counts
accumulated by the next servo period.
Jon
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users