On Fri, 31 Jan 2020 at 17:38, Jon Elson <[email protected]> wrote:
> Hmmm, some interesting things to note. His input scale is > 85333.33 counts/inch. > 85333 * 50331 looks like it is very close to a 32-bit > rollover (4294895223). > The PPMC devices use a 24-bit hardware counter, and then > rollover and extension to > a 32-bit integer is handled in the ppmc driver. Is he using a 64-bit kernel? The size of integers might have changed. (I thought the drivers actually expanded to 64 bit internally? HAL stepgen and the Mesa drivers do. I can just about imagine a high-speed spindle encoder wrapping at 32 bits) Anyway, I would point the finger of suspicion here: https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/drivers/hal_ppmc.c#L1080 It uses a Union which contains 4 bytes and a "signed long" but "long" is only "at least 32 bits". Some web searching seems to suggest that "long" is 4 bytes in a 32 bit OS and 8 bytes in a 64-bit OS. If your customer is using a 64-bit OS then he has found a bug, and one we may need to squash in many places. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
