-----Original Message-----
From: R C [mailto:[email protected]]
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 <[email protected]> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users