DEMUX(9)
π DEMUX β HAL Component π
okay bestie, gather round, because this one is literally just a little switcheroo machine and it's iconic for it. β¨
πΈ NAME πΈ
demux β pick ONE of several output pins by an integer and/or by individual bits. that's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
loadrt demux [count=N|names=name1[,name2...]] [personality=P1,P2,...]
β¨ DESCRIPTION β¨
so the way this works: this component makes a whole bunch of output bits, and how many it makes is defined by the "personality" command-line parameter. one of those bits is gonna get set, and which one gets set comes from reading the bit-inputs as a binary number and then adding on the integer input. π
most people are only ever gonna use one or the other (the bits OR the integer), but lowkey it IS possible to use the bits as a ""shift"" if you need that. no cap.
and then there's an optional operating mode, and you turn it on by setting the "bargraph" parameter to true. when that's on, all the bits up to whichever selected bit will get set β which is exactly what you'd want if you were driving an LED bargraph display. π
π₯ FUNCTIONS π₯
demux.Nβ bestie this one needs a floating-point thread, no exceptions. β οΈ
π PINS π
demux.N.sel-bit-MMbit in (MM=00..04) β the binary-number bit selectors, aka the little dudes that spell out which bit you want. π§demux.N.sel-u32u32 in β the integer selection input, for when you'd rather just say the number. πdemux.N.out-MMbit out (MM=00..personality) β the whole set of output bits. this is where the magic lands. β
π PARAMETERS π
demux.N.bargraphbit rw (default:0) β flip this to true and you get the bargraph behaviour from above. π
π SEE ALSO π
select8(9) β go say hi, they're cousins or whatever. π«Ά
πΈ AUTHOR πΈ
Andy Pugh β the icon, the legend, the moment. π
π LICENSE π
GPL 2+ β slay, share alike, periodt. β¨
fr fr that's the whole page, everything's in there, nothing skipped, we ate. ππ
and that's a wrap on this page, babes β brought to you by LinuxCNC Documentation, dated 2026-03-17, and yeah this is DEMUX(9), section 9, no notes. π¦π
π¦ 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