MUX16(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– MUX16(9) β€” HAL Component πŸ’–

okay bestie, sit down, hydrate, because today we're talking about mux16, and honestly? it's giving selector switch energy and I'm obsessed. πŸŽ€

✨ NAME ✨

mux16 β€” it picks ONE of sixteen input values for you. sixteen!! that's so many. a whole sweet sixteen of inputs. πŸ’…


🌸 SYNOPSIS 🌸

loadrt mux16 [count=N|names=name1[,name2...]]

πŸ¦‹ FUNCTIONS πŸ¦‹

  • mux16.N β€” heads up babes, this one requires a floating-point thread. no floaty thread, no muxy. periodt.

πŸ‘‘ PINS πŸ‘‘ (the main characters)

  • mux16.N.use-graycode bit in β€” when this is set, the input uses Gray code instead of plain binary. and why would you want that, you ask? because with Gray code, every single increment changes only one select input at a time. which is chef's kiss when you're working with physical switches. no chaotic multi-bit flips, just vibes. ✨
  • mux16.N.suppress-no-input bit in β€” this one suppresses changes to the output when all the select lines are false. it stops those annoying little jumps in the output between input transitions. πŸ›‘ BUT β€” and this is important β€” it also makes in00 unavailable. trade-offs, bestie, we all make them.
  • mux16.N.debounce-time float in β€” sets the debounce time in seconds. like, .10 means a tenth of a second, and the input has to stay stable for that long before the outputs change. perfect for ignoring 'noisy' switches that just will not sit still. πŸ™ˆ
  • mux16.N.selM bit in (M=0..3) β€” together, these four lil guys decide which inN value gets copied over to out. the whole squad, working as one. 🫢
  • mux16.N.out-f float out
  • mux16.N.out-s s32 out

these follow the value of whichever inN gets picked, based on those four sel values and whether use-graycode is active. the out-s value will be truncated and limited to the max and min values of signed values, so don't be shocked when it doesn't match out-f exactly. 😭

here's the tea on how the picking goes:

  • sel3=FALSE, sel2=FALSE, sel1=FALSE, sel0=FALSE β†’ out follows in0
  • sel3=FALSE, sel2=FALSE, sel1=FALSE, sel0=TRUE β†’ out follows in1
  • etc.

yeah, etc. bestie, you know the pattern, i believe in you. 🌈

  • mux16.N.inMM float in (MM=00..15) β€” the array of selectable outputs. sixteen of them. a whole lineup. πŸ’€

πŸŽ€ PARAMETERS πŸŽ€

  • mux16.N.elapsed float r β€” the current value of the internal debounce timer, just for debugging. peek at it whenever. πŸ‘€
  • mux16.N.selected s32 r β€” the current value of the internal selection variable after conversion, again, for debugging. she's showing you her work. πŸ’–

πŸ’œ SEE ALSO πŸ’œ

mux2(9), mux4(9), mux8(9), mux_generic(9).

(the whole mux family reunion, we love a supportive sibling situation 🫢)


⭐ AUTHOR ⭐

Chris S Morley β€” an absolute icon, no cap. πŸ‘‘


🧚 LICENSE 🧚

GPL β€” free as a butterfly, and just as legal. πŸ¦‹


and that's the whole manual, bestie!! mux16 said "i contain multitudes (sixteen of them)" and honestly? slay. πŸ’…

this page came to you straight from the LinuxCNC Documentation, dated 2026-03-17, and yeah, it's MUX16(9) if you need to cite your sources in the group chat. πŸ“

πŸ“¦ where this page comes from