Poti for overrides

More
23 Aug 2020 13:45 - 23 Aug 2020 13:48 #179100 by Daniel_D_Punkt
Hi guys,

i have a test setup for a pendant with a MESA 7i73 and connected a potentiometer to halui.rapid-override.counts. The slider in the axis GUI also moves from 0...100%. Now I leave the potentiometer at 50% and restart LinuxCNC. After the restart the user interface shows 100% although the potentiometer is still set to 50%. Only after I turn the potentiometer a little bit and the value changes, it is also shown in the user interface (it jumps immediately to 50%). Is that supposed to be like this? Is there a way that Linuxcnc reads the value of the potis at startup and sets the slider accordingly.

I can imagine to put the 3.3V for the potentiometer on an output of the 7i73 which I switch to 3V3 when loading the HAL to get this effect. But this should only be a workarround and I hope that someone of you can tell me what I did wrong.

setp halui.rapid-override.direct-value true
setp halui.rapid-override.count-enable true
setp hm2_7i76e.0.7i73.0.2.analogin0-scalemax 100
setp halui.rapid-override.scale 0.01

net analog0        <= hm2_7i76e.0.7i73.0.2.analogin0
net analog0        => conv_float_s32.rapid.in
net rapid-override <= conv_float_s32.rapid.out
net rapid-override => halui.rapid-override.counts

I am working with version 2.8.0-pre1-6125.

Thanks
Daniel
Attachments:
Last edit: 23 Aug 2020 13:48 by Daniel_D_Punkt.

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

More
24 Aug 2020 07:56 #179204 by roland
Replied by roland on topic Poti for overrides
Hi Daniel,

the behaviour of the potentiometers is really annoying.
i have solved this with mux-generic.

When the machine is switched off, the potentiometer value is set to 100%.
If the machine is switched on, the real potentiometer value is used.
######################################################
## Feed-Override
## mit Poti
######################################################
loadrt mux_generic config=fs2
addf mux-gen.00 servo-thread
addf hyst.feedpot servo-thread
setp hyst.feedpot.gain 0.05
setp hyst.feedpot.deadband 0.7
setp hyst.feedpot.step 0.05
setp hm2_7i92.0.7i84.0.2.analogin0-scalemax 240
setp halui.feed-override.direct-value true
setp halui.feed-override.count-enable true
setp halui.feed-override.scale 0.01
setp mux-gen.00.in-float-00 100
net  feedpot-raw    hyst.feedpot.in
net  feedpot-hyst   hyst.feedpot.out mux-gen.00.in-float-01
net  machine-is-on mux-gen.00.sel-bit-00
net  feedpot-mux mux-gen.00.out-s32  halui.feed-override.counts



--
Roland
The following user(s) said Thank You: Daniel_D_Punkt

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

More
24 Aug 2020 09:05 #179207 by Daniel_D_Punkt
Replied by Daniel_D_Punkt on topic Poti for overrides
Hi Roland,

Thanks for the answer. This possibility has not yet occurred to me and I will try your solution. By the way, we have the same taste in housing :-)
Attachments:

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

More
24 Aug 2020 09:42 #179211 by roland
Replied by roland on topic Poti for overrides
My Panel :)
Attachments:
The following user(s) said Thank You: keyboard, Himarc3D

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

More
25 Aug 2020 12:49 #179375 by Daniel_D_Punkt
Replied by Daniel_D_Punkt on topic Poti for overrides
After I did some tests i have now come to the conclusion that i will use encoder instead of potis for feed-override, rapid-oberride and spindle-override. Since the 7i73 has only 4 encoder inputs and i still have the jogwheel, the jog-speed remains at one pot. This value can be written directly.

# >>> POTI Jog-Speed>>>
setp hm2_7i76e.0.7i73.0.2.analogin0-scalemax 3600
net analog_jog <= hm2_7i76e.0.7i73.0.2.analogin0
net analog_jog => halui.axis.jog-speed
# <<< POTI <<<

# >>> Encoder Feed-Override >>>
setp halui.feed-override.direct-value false
setp halui.feed-override.count-enable true
setp halui.feed-override.scale 0.1
net enc-feed   <= hm2_7i76e.0.7i73.0.2.enc1.count
net enc-feed   => halui.feed-override.counts
# <<< Encoder Feed-Override <<<

# >>> Encoder Rapid-Override >>>
setp halui.rapid-override.direct-value false
setp halui.rapid-override.count-enable true
setp halui.rapid-override.scale 0.1
net enc-rapid   <= hm2_7i76e.0.7i73.0.2.enc2.count
net enc-rapid   => halui.rapid-override.counts
# <<< Encoder Rapid-Override <<<

# >>> Encoder Spindle-Override >>>
setp halui.spindle.0.override.direct-value false
setp halui.spindle.0.override.count-enable true
setp halui.spindle.0.override.scale 0.1
net enc-spindle   <= hm2_7i76e.0.7i73.0.2.enc3.count
net enc-spindle   => halui.spindle.0.override.counts
# <<< Encoder Spindle-Override <<<

:)

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

More
04 Sep 2020 02:44 #180616 by keyboard
Replied by keyboard on topic Poti for overrides
Hi Roland
I'm trying to use a POT as well for Feed override. After much searching found your reply. I have a 10k pot wired to a MESA 7i76e and can see the analog input. just having difficulty getting the slider to change on the GUI screen like yours. Could you share your HAL file, do you use a post GUI file as well ?
Thanks.

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

More
04 Sep 2020 07:09 #180627 by roland
Replied by roland on topic Poti for overrides
Hi keyboard,
with my example above i wanted to show how to use mux-gen to avoid the 100% problem of the potentiometer.
The shown lines are just a part of my hal and therefore of course not complete.

with these entries the potentiometer can be mounted. It should work this way or something similar. The pin names have to be adapted to the used 7i76e.
######################################################
## Feed-Override
## mit Poti
######################################################
loadrt mux_generic config=fs2
addf   mux-gen.00 servo-thread

setp hm2_7i92.0.7i84.0.2.analogin0-scalemax 240
setp halui.feed-override.direct-value true
setp halui.feed-override.count-enable true
setp halui.feed-override.scale 0.01
setp mux-gen.00.in-float-00 100
    
net feedpot-raw    mux-gen.00.in-float-01  hm2_7i92.0.7i84.0.2.analogin0
net machine-is-on  mux-gen.00.sel-bit-00
net feedpot-mux    mux-gen.00.out-s32      halui.feed-override.counts

If you really want to see the complete hal and ini files, let me know.

--
Roland
The following user(s) said Thank You: keyboard

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

More
06 Sep 2020 03:49 #180891 by keyboard
Replied by keyboard on topic Poti for overrides
Hi Roland,
Awesome!! Thanks. Works perfectly.

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

More
13 Nov 2020 17:40 #189229 by prcdslnc13
Replied by prcdslnc13 on topic Poti for overrides
Could you post your hal and ini files? Im having a hard time getting the hyst component to load. I really would just like to see how everything is configured to get a pot to actually work.

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

More
13 Nov 2020 18:02 #189233 by roland
Replied by roland on topic Poti for overrides
Is the question addressed to me?

Did you compile the hyst component?

--
Roland

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

Time to create page: 0.095 seconds
Powered by Kunena Forum