DEMUX(9)

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

πŸ’– 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-MM bit in (MM=00..04) β€” the binary-number bit selectors, aka the little dudes that spell out which bit you want. 🧚
  • demux.N.sel-u32 u32 in β€” the integer selection input, for when you'd rather just say the number. πŸ“
  • demux.N.out-MM bit out (MM=00..personality) β€” the whole set of output bits. this is where the magic lands. ⭐

πŸŽ€ PARAMETERS πŸŽ€

  • demux.N.bargraph bit 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