Pot or Encoder type for 7i77

More
16 Mar 2018 13:47 #107426 by andypugh

I tried adding additional encoder in the hal file but was not successful. How do I turn pin 00 and 01 into software encoder pins and connect to feed override?


What form did your lack of success take?

linuxcnc.org/docs/2.7/html/man/man9/encoder.9.html

You need at least the following lines in the HAL file
loadrt encoder count=1
addf encoder.0 servo-thread
net chanA hm2_5i25.0.7i77.0.0.input-00 => encoder.0.phase-A
net chanB hm2_5i25.0.7i77.0.0.input-01 => encoder.0.phase-B
net output encoder.0.counts => halui.feed−override.counts
setp halui.feed−override.count−enable 1

Please Log in or Create an account to join the conversation.

More
17 Mar 2018 03:08 #107455 by OT-CNC
Replied by OT-CNC on topic Pot or Encoder type for 7i77
Andy,

Thank you for the example. I got it to work. I was failing initially at the basics of loading the software encoder. I was not entirely following how the software encoder numbers differ from the hardware encoders and tried increasing the wrong count for the mesa encoders.
Can you look over the modifications I made and see if the servo thread is correct or if it should be base thread? It didn't load with addf encoder.0 servo-thread. Also, is there a way to get the override to be something other than 10% increments? I'd like to be closer to 1% so I can fine tune the feed rate better.



# connect jog wheel feed-override dial

loadrt encoder num_chan=2
#addf encoder.0 servo-thread
addf encoder.capture-position servo-thread
#addf encoder.update-counters base-thread
addf encoder.update-counters servo-thread
setp encoder.0.x4-mode 1

net fo-chanA hm2_5i25.0.7i77.0.0.input-00 => encoder.0.phase-A
net fo-chanB hm2_5i25.0.7i77.0.0.input-01 => encoder.0.phase-B

net output encoder.0.counts => halui.feed-override.counts
setp halui.feed-override.count-enable 1


######

# connect jog wheel max velocity-override dial does not exist???####

#setp encoder.1.x4-mode 1

#net mvo-chanA hm2_5i25.0.7i77.0.0.input-02 => encoder.1.phase-A
#net mvo-chanB hm2_5i25.0.7i77.0.0.input-03 => encoder.1.phase-B

#net mvo-output encoder.1.counts => halui.max-velocity-override.counts
#setp halui.max-velocity-override.count-enable 1

#######

# connect jog wheel rapid-override dial #

setp encoder.1.x4-mode 1

net ro-chanA hm2_5i25.0.7i77.0.0.input-02 => encoder.1.phase-A
net ro-chanB hm2_5i25.0.7i77.0.0.input-03 => encoder.1.phase-B

net ro-output encoder.1.counts => halui.rapid-override.counts
setp halui.rapid-override.count-enable 1


I was also trying to add a max velocity override which doesn't exist? Anyway, It's pretty cool to see the gui sliders adjust based on the jog pendant. Thanks for the help!

Please Log in or Create an account to join the conversation.

More
17 Mar 2018 11:35 - 17 Mar 2018 11:36 #107464 by andypugh

ACan you look over the modifications I made and see if the servo thread is correct or if it should be base thread?

You probably don't have a base-thread in a Mesa config. servo-thread is fine for a handwheel though.


It didn't load with addf encoder.0 servo-thread

I think that's my fault. I forgot that the encoder module doesn't export a function for each encoder, and it has two functions for all instances.so it is
addf encoder.update-counters  servo-thread
addf encoder.capture-position servo-thread

linuxcnc.org/docs/2.7/html/man/man9/encoder.9.html
Last edit: 17 Mar 2018 11:36 by andypugh.

Please Log in or Create an account to join the conversation.

More
18 Mar 2018 15:49 #107497 by OT-CNC
Replied by OT-CNC on topic Pot or Encoder type for 7i77
Thanks Andy for looking it over. Works great.

For anyone else following along learning, I figured out how to set the override scale. That was rather easy.
Just add:

setp halui.feed-override.scale 0.02

And change the number to whatever you like. If you leave that line out, it out it was at 10% per dial click.

Please Log in or Create an account to join the conversation.

More
17 Mar 2020 22:39 #160599 by Doug Crews
Hello OT

Its sounds like you are happy with using an encoder for feed rate override. Which one of the two you mentioned earlier in your post did you go with? I believe the difference is 16 pulses per rev or 36 pulses per rev. It seems they have no rotational stops. Do they have a tactile detent or are they smooth?

Please Log in or Create an account to join the conversation.

More
18 Mar 2020 00:33 #160605 by OT-CNC
Replied by OT-CNC on topic Pot or Encoder type for 7i77
I went with the Grayhill 25LB10-Q. It's an encoder type with 10 degree detent and no end stops. They have a nice feel. The knobs are sold separate and come in different styles and sizes.You can probably find cheaper ones that work just as well.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.075 seconds
Powered by Kunena Forum