I need to latch encoder counts at the edge of the index pulse. The hm2_7i92 encoder hal component has a "latch enable", "count-latched", and "latch-polarity" pins, which sound very promising. There is zero documentation on these as far as I can find. Looking at the source code, I am still confused, and wonder if I'm seeing a bug:
do_flag( &hm2->encoder.control_reg[i], index_enable, HM2_ENCODER_LATCH_ON_INDEX ); do_flag( &hm2->encoder.control_reg[i], !index_enable && latch_enable, HM2_ENCODER_LATCH_ON_PROBE ); do_flag( &hm2->encoder.control_reg[i], index_enable || latch_enable, HM2_ENCODER_INDEX_JUSTONCE ); What I think I want is the INDEX_JUSTONCE mode, but the "index_enable || latch_enable" doesn't make sense to me. That would suggest that either index_enable or latch_enable pins would set this mode, Anybody (Jeff maybe?) care to clarify the functionality of this latching capability? It would be nice if the hostmot2 man page and web docs could be updated with these pins, which have been around for quite a while. Thanks, -- Ralph ------------------------------------------------------------------------------ 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