Explaining mux_generic
16 Sep 2014 06:38 #51216
by Duc
Thank you for the tip. Will make the world of difference later on. Code all works now. Time to convert over the other 5 bit rotary switches.
Stupid question?
Why does the sliders not update till I actually move the rotary switches when the program first starts.
Boot up
Feedrate override reads 100% but switch is on 80%
Rotate knob
Feedrate override reads correct.
Corrected the command to loadrt mux_generic config=ss32
Replied by Duc on topic Explaining mux_generic
Pin 'mux-gen.00.sel-bit000' does not exist.
I often find it helpful to load a component at a halrun prompt, just to try out the options and see what the pins are called.
andypugh@dn2800:~/git/linuxcnc-dev$ halrun halcmd: loadrt mux_generic config=bs5 halcmd: show pin Component Pins: Owner Type Dir Value Name 4 u32 IN 0x00000000 mux-gen.00.debounce-us 4 bit IN FALSE mux-gen.00.in-bit-00 4 bit IN FALSE mux-gen.00.in-bit-01 4 bit IN FALSE mux-gen.00.in-bit-02 4 bit IN FALSE mux-gen.00.in-bit-03 4 bit IN FALSE mux-gen.00.in-bit-04 4 s32 OUT 0 mux-gen.00.out-s32 4 bit IN FALSE mux-gen.00.sel-bit-00 4 bit IN FALSE mux-gen.00.sel-bit-01 4 u32 IN 0x00000000 mux-gen.00.sel-int 4 bit IN FALSE mux-gen.00.suppress-no-input
Thank you for the tip. Will make the world of difference later on. Code all works now. Time to convert over the other 5 bit rotary switches.
Stupid question?
Why does the sliders not update till I actually move the rotary switches when the program first starts.
Boot up
Feedrate override reads 100% but switch is on 80%
Rotate knob
Feedrate override reads correct.
Corrected the command to loadrt mux_generic config=ss32
loadrt mux_generic config="ss32"
addf mux-gen.00 servo-thread
# --- Feedrate overide - FO-INCR-A ---
net fo-incr-a <= hm2_5i25.0.7i84.0.1.input-08
# --- FO-INCR-B ---
net fo-incr-b <= hm2_5i25.0.7i84.0.1.input-07
# --- FO-INCR-C ---
net fo-incr-c <= hm2_5i25.0.7i84.0.1.input-06
# --- FO-INCR-D ---
net fo-incr-d <= hm2_5i25.0.7i84.0.1.input-05
# --- FO-INCR-E ---
net fo-incr-e <= hm2_5i25.0.7i84.0.1.input-04
# connect feed overide increments - switches
setp halui.feed-override.count-enable true
setp halui.feed-override.direct-value true
setp halui.feed-override.scale .01
net feedoverride-incr => halui.feed-override.counts
net fo-incr-a => mux-gen.00.sel-bit-00
net fo-incr-b => mux-gen.00.sel-bit-01
net fo-incr-c => mux-gen.00.sel-bit-02
net fo-incr-d => mux-gen.00.sel-bit-03
net fo-incr-e => mux-gen.00.sel-bit-04
net feedoverride-incr <= mux-gen.00.out-s32
setp mux-gen.00.debounce-us 200000
setp mux-gen.00.suppress-no-input False
setp mux-gen.00.in-s32-00 0
setp mux-gen.00.in-s32-01 10
setp mux-gen.00.in-s32-02 20
setp mux-gen.00.in-s32-03 30
setp mux-gen.00.in-s32-04 40
setp mux-gen.00.in-s32-05 50
setp mux-gen.00.in-s32-06 60
setp mux-gen.00.in-s32-07 70
setp mux-gen.00.in-s32-08 80
setp mux-gen.00.in-s32-09 90
setp mux-gen.00.in-s32-10 100
setp mux-gen.00.in-s32-11 110
setp mux-gen.00.in-s32-12 120
setp mux-gen.00.in-s32-13 130
setp mux-gen.00.in-s32-14 140
setp mux-gen.00.in-s32-15 150
setp mux-gen.00.in-s32-16 160
setp mux-gen.00.in-s32-17 170
setp mux-gen.00.in-s32-18 180
setp mux-gen.00.in-s32-19 190
setp mux-gen.00.in-s32-20 200
Please Log in or Create an account to join the conversation.
16 Sep 2014 06:52 #51217
by andypugh
It's actually a very good question.
I _think_ that it is because the system is meant to be able to arbitrate between multiple inputs (GUI or halui) and so allows changes to the GUI to over-ride the switch and vice-versa.
This actually works more tidily with incremental encoders as the physical controls.
I thought that halui.direct-value was meant to over-ride that. Apparently not.
Can I suggest a feature request/bug report?
Replied by andypugh on topic Explaining mux_generic
Stupid question?
Why does the sliders not update till I actually move the rotary switches when the program first starts.
It's actually a very good question.
I _think_ that it is because the system is meant to be able to arbitrate between multiple inputs (GUI or halui) and so allows changes to the GUI to over-ride the switch and vice-versa.
This actually works more tidily with incremental encoders as the physical controls.
I thought that halui.direct-value was meant to over-ride that. Apparently not.
Can I suggest a feature request/bug report?
The following user(s) said Thank You: Duc
Please Log in or Create an account to join the conversation.
16 Sep 2014 08:11 - 16 Sep 2014 08:15 #51219
by Duc
Bug report submitted. Also not the easiest page to find without a search.
Replied by Duc on topic Explaining mux_generic
Stupid question?
Why does the sliders not update till I actually move the rotary switches when the program first starts.
It's actually a very good question.
I _think_ that it is because the system is meant to be able to arbitrate between multiple inputs (GUI or halui) and so allows changes to the GUI to over-ride the switch and vice-versa.
This actually works more tidily with incremental encoders as the physical controls.
I thought that halui.direct-value was meant to over-ride that. Apparently not.
Can I suggest a feature request/bug report?
Bug report submitted. Also not the easiest page to find without a search.
Last edit: 16 Sep 2014 08:15 by Duc.
Please Log in or Create an account to join the conversation.
16 Sep 2014 08:26 #51220
by andypugh
Another fair point. It is directly linked from the "community" link at www.linuxcnc.org but I can't say that is the most obvious place to look.
Replied by andypugh on topic Explaining mux_generic
[Bug report submitted. Also not the easiest page to find without a search.
Another fair point. It is directly linked from the "community" link at www.linuxcnc.org but I can't say that is the most obvious place to look.
Please Log in or Create an account to join the conversation.
16 Sep 2014 09:46 #51225
by cmorley
Well that's a pretty good reason
how about 'bsf5'
for a 5 bit input with s32 and float output?
Chris M
Or I could just suffer
Replied by cmorley on topic Explaining mux_generic
Is there a disadvantage to having both pins available?
The boolean, int and signed-int variants of mux_generic can run in the base thread, but the float versions can't.
Well that's a pretty good reason
how about 'bsf5'
for a 5 bit input with s32 and float output?
Chris M
Or I could just suffer
Please Log in or Create an account to join the conversation.
16 Sep 2014 16:10 #51233
by andypugh
Replied by andypugh on topic Explaining mux_generic
I just noticed something...
"bs5" is a really strange mux. It takes a pattern of bits or an integer and outputs either 1 or 0 into a signed32.
Is that really what was required?
"bs5" is a really strange mux. It takes a pattern of bits or an integer and outputs either 1 or 0 into a signed32.
Is that really what was required?
Please Log in or Create an account to join the conversation.
17 Sep 2014 19:04 #51265
by Duc
For mine I had to use ss32 which still took 5 bit input and signed integers for the mux and a signed output.
I don't have access to my mill till Friday but can the input be change to something besides bit. I didn't see the input change away from bit when using "ss32"
Replied by Duc on topic Explaining mux_generic
I just noticed something...
"bs5" is a really strange mux. It takes a pattern of bits or an integer and outputs either 1 or 0 into a signed32.
Is that really what was required?
For mine I had to use ss32 which still took 5 bit input and signed integers for the mux and a signed output.
I don't have access to my mill till Friday but can the input be change to something besides bit. I didn't see the input change away from bit when using "ss32"
Please Log in or Create an account to join the conversation.
17 Sep 2014 19:08 #51266
by andypugh
The _selection_ is always either based on bits or an S32 you can use either, or even both.
The letters control the data type of the multiple input values, and the single output value.
Replied by andypugh on topic Explaining mux_generic
I didn't see the input change away from bit when using "ss32"
The _selection_ is always either based on bits or an S32 you can use either, or even both.
The letters control the data type of the multiple input values, and the single output value.
Please Log in or Create an account to join the conversation.
Time to create page: 0.091 seconds