- Posts: 197
- Thank you received: 0
No eBay APP ID and/or Cert ID defined in Kunena configuration
Rotary Encoder
8 years 10 months ago #102769
by Tchefter
No eBay APP ID and/or Cert ID defined in Kunena configurationRotary Encoder was created by Tchefter
No eBay APP ID and/or Cert ID defined in Kunena configurationHi @all,
it's WinterTime
im trying to build something from my CNC for my CNC 
My Question: Is it possible to use this cheap Rotary Encoder
with LinuxCNC with a extra ParPort Card, to move my X or Y or Z Axis in diffrent Speeds like 1 / 10 / 100 seperatly?
Thanks for replys,
Fritz
it's WinterTime
My Question: Is it possible to use this cheap Rotary Encoder
with LinuxCNC with a extra ParPort Card, to move my X or Y or Z Axis in diffrent Speeds like 1 / 10 / 100 seperatly?
Thanks for replys,
Fritz
Please Log in to join the conversation.
8 years 10 months ago #102772
by PCW
No eBay APP ID and/or Cert ID defined in Kunena configurationReplied by PCW on topic Rotary Encoder
If you mean use this for a jog control, yes you can.
They are quadrature encoders and can be read by the encoder module in LinuxCNC
Since they also have a built in push button, you could perhaps use a single one for X,Y,Z
and use the pushbutton for axis select.
Note that like all mechanical encoders these have noisy output signals and may require
filtering the quadrature signals through a RC network or using the "debounce" component
in your hal file to clean up the signals.
They are quadrature encoders and can be read by the encoder module in LinuxCNC
Since they also have a built in push button, you could perhaps use a single one for X,Y,Z
and use the pushbutton for axis select.
Note that like all mechanical encoders these have noisy output signals and may require
filtering the quadrature signals through a RC network or using the "debounce" component
in your hal file to clean up the signals.
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
8 years 10 months ago #102773
by Todd Zuercher
No eBay APP ID and/or Cert ID defined in Kunena configurationReplied by Todd Zuercher on topic Rotary Encoder
Probably (if the output of it is an A-B quadrature signal, it should be pretty simple)
Please Log in to join the conversation.
8 years 10 months ago #102775
by Tchefter
No eBay APP ID and/or Cert ID defined in Kunena configurationReplied by Tchefter on topic Rotary Encoder
Thanks PCW, thanks Todd, nice to read your Posts.
Do you have an example?
Do you have an example?
Please Log in to join the conversation.
8 years 10 months ago #102777
by PCW
No eBay APP ID and/or Cert ID defined in Kunena configurationReplied by PCW on topic Rotary Encoder
For the very low level parts the hal wiring would be something like:
loadrt encoder
loadrt debounce cfg=3
addf debounce.0 base-thread
addf encoder encoder.capture-position servo-thread
addf encoder.update-counters base-thread
net rawquada parport.0.pin-10-in debounce.0.0.in
net rawquadb parport.0.pin-11-in debounce.0.1.in
net rawjogbutton parport.0.pin-12-in debounce.0.2.in
net cleanquada debounce.0.0.out encoder.0.phase-A
net cleanquadb debounce.0.1.out encoder.0.phase-B
net jogbutton debounce.0.2.out
loadrt encoder
loadrt debounce cfg=3
addf debounce.0 base-thread
addf encoder encoder.capture-position servo-thread
addf encoder.update-counters base-thread
net rawquada parport.0.pin-10-in debounce.0.0.in
net rawquadb parport.0.pin-11-in debounce.0.1.in
net rawjogbutton parport.0.pin-12-in debounce.0.2.in
net cleanquada debounce.0.0.out encoder.0.phase-A
net cleanquadb debounce.0.1.out encoder.0.phase-B
net jogbutton debounce.0.2.out
Please Log in to join the conversation.
8 years 10 months ago #102786
by Tchefter
No eBay APP ID and/or Cert ID defined in Kunena configurationReplied by Tchefter on topic Rotary Encoder
@PCW i don't know how to handle this 
I tried out this example from andypugh forum.linuxcnc.org/24-hal-components/637...for-my-mill-how#6377
it works but only with one Phase, don't understand why.
it also works only in one direction, The Button works also not.
When i test it with an Arduino it works all fine...
I have TB6560 4-Axis red Board where the Pins 10-13 are available, so i tought this must work... hmmmm...

I tried out this example from andypugh forum.linuxcnc.org/24-hal-components/637...for-my-mill-how#6377
it works but only with one Phase, don't understand why.
it also works only in one direction, The Button works also not.
When i test it with an Arduino it works all fine...
I have TB6560 4-Axis red Board where the Pins 10-13 are available, so i tought this must work... hmmmm...
Please Log in to join the conversation.
8 years 10 months ago #102790
by Tchefter
No eBay APP ID and/or Cert ID defined in Kunena configurationReplied by Tchefter on topic Rotary Encoder
Some fixes done.
I found, under a lot other things, thsi Panasonic Encoder
www.digikey.com/product-detail/en/panaso...16B/P12423-ND/637160
Following steps are working:
Push Button to select the Axis to move and Movement in + Direction but not - Direction
I found, under a lot other things, thsi Panasonic Encoder
www.digikey.com/product-detail/en/panaso...16B/P12423-ND/637160
Following steps are working:
Push Button to select the Axis to move and Movement in + Direction but not - Direction
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
8 years 10 months ago #102792
by Todd Zuercher
No eBay APP ID and/or Cert ID defined in Kunena configurationReplied by Todd Zuercher on topic Rotary Encoder
If you setp encoder.N.counter-mode 1, would explain your problems, set that to 0 (or leave that line out entirely as 0 is the default setting).
Here is what the man page for the software encoder says:
linuxcnc.org/docs/html/man/man9/encoder.9.html
encoder.N.counter-mode bit i/o Enables counter mode. When true, the counter counts each rising edge of the phase-A input, ignoring the value on phase-B. This is useful for counting the output of a single channel (non-quadrature) sensor. When false (the default), it counts in quadrature mode.
Here is what the man page for the software encoder says:
linuxcnc.org/docs/html/man/man9/encoder.9.html
encoder.N.counter-mode bit i/o Enables counter mode. When true, the counter counts each rising edge of the phase-A input, ignoring the value on phase-B. This is useful for counting the output of a single channel (non-quadrature) sensor. When false (the default), it counts in quadrature mode.
Please Log in to join the conversation.
8 years 10 months ago #102794
by Tchefter
No eBay APP ID and/or Cert ID defined in Kunena configurationReplied by Tchefter on topic Rotary Encoder
coool
now it works fine, thanks Todd.
Please Log in to join the conversation.
8 years 10 months ago #102847
by Tchefter
No eBay APP ID and/or Cert ID defined in Kunena configurationReplied by Tchefter on topic Rotary Encoder
Now i have my second parallel card on the run *lucky
. Is it possible to run an encoder on the first card, say with me on the controller, and run the second encoder on the second card? I would like to work with the first encoder as the stand is now and with the second encoder enter the step size, for example: 1/10/100
How do I combine the two encoders? I tried to read in the docs, but as a beginner I'm not really right there. are there any examples for this?
Regards Fritz
How do I combine the two encoders? I tried to read in the docs, but as a beginner I'm not really right there. are there any examples for this?
Regards Fritz
Please Log in to join the conversation.
Time to create page: 0.119 seconds
