On Monday 25 May 2020 03:35:05 John Dammeyer wrote: > BTW, Check out > https://lsicsi.com/datasheets/LS7366R.pdf > This device is interfaced via SPI and has a 32 bit quadrature counter > module. If you go in the direction of Raspberry Pi with LinuxCNC a > device like this can provide the spindle information. So if someone > was thinking of building a CNC cape for a Pi a device like this would > be a good idea. There are also devices from the same manufacturer > that can change quadrature into up/down pulses streams to use regular > counters inside the Pi. > > John > > > -----Original Message----- > > From: R C [mailto:cjv...@gmail.com] > > Sent: May-24-20 6:01 PM > > To: linuxcnc-users-list > > Subject: Re: [Emc-users] Encoder HAL programming. > > > > On 5/24/20 6:29 PM, andy pugh wrote: > > > On Mon, 25 May 2020 at 00:17, R C <cjv...@gmail.com> wrote: > > >> I have been following this thread. I wrote some code that runs > > >> on an RPI that can read a quadrature encoder, I have a few of > > >> them, with different resolutions. > > > > > > Is this something different to the normal LinuxCNC software > > > encoder that reads GPIO? > > > Is there some dedicated encoder counter hardware on the Pi? > > > > Oh I am not running linux cnc on an rpi, I run it on a server > > "class" machine.�� I was just curious about how these encoders work, > > and why they didn't > > > > work that well with my linux-cnc setup using a db25 BOB with the 2 > > benchtops I have. > > > > > > So I decided to use an RPI (because it is easy to use GPIO pins to > > read signals) and write some code to read these� encoder signals. > > > > > > > > So I guess my answer is yes,� it is different from, what linux-cnc > > running on a pi does (I would be surprised if it was similar) > > > > > > I setup an RPI, hooked up a 2 line LCD display to it to display > > rpms, wrote some interrupt driven code that reads the encoder and > > displays it on the LCD. The idea is, I want > > > > to try and see if I can read the encoder and then send signals back > > to linux-cnc that it 'could handle". > > > > > > So I have a 60ppr encoder,� 60 has a lot of dividers.� 2, 3, 4, 5, > > 6, 10, and 12� So if I can "transfer" a pulse with a consistent > > delay exactly when the actual n-th pulse > > > > comes in, I could turn a 60ppr� encoder into a 30, 20, 15, 12, 10, 6 > > or 5 ppr encoder by just skipping pulses,� while raising some GPIO > > pins, that I connect to the BOB, when > > > > I read a different set of GPIO pins directly from the encoder. > > > > > > > > But as I said earlier,� I don't know a lot about the linux-cnc's > > internals, and HAL, but it is something I am playing with to see if > > it could work. > > > > > > Ron > > > > > > > > _______________________________________________ > > Emc-users mailing list > > Emc-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/emc-users > > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users
Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene> _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users