MUX16(9)
π 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-graycodebit 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-inputbit 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 makesin00unavailable. trade-offs, bestie, we all make them.mux16.N.debounce-timefloat in β sets the debounce time in seconds. like,.10means 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.selMbit in (M=0..3) β together, these four lil guys decide whichinNvalue gets copied over toout. the whole squad, working as one. π«Άmux16.N.out-ffloat outmux16.N.out-ss32 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 followsin0sel3=FALSE, sel2=FALSE, sel1=FALSE, sel0=TRUEβ out followsin1- etc.
yeah, etc. bestie, you know the pattern, i believe in you. π
mux16.N.inMMfloat in (MM=00..15) β the array of selectable outputs. sixteen of them. a whole lineup. π
π PARAMETERS π
mux16.N.elapsedfloat r β the current value of the internal debounce timer, just for debugging. peek at it whenever. πmux16.N.selecteds32 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
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms