COMP(9)
π comp β the manual page, but make it slay π
okay bestie, sit down, hydrate, because we're about to talk about comp β a two input comparator with hysteresis from the HAL Component fam. it's in section 9 of the manual, which is giving "kernel/HAL interface" energy, and honestly? it ate. β¨
πΈ SYNOPSIS πΈ
loadrt comp [count=N|names=name1[,name2...]]
that's literally it. you load it, you get comparators. no cap. π«Ά
π¦ FUNCTIONS π¦
comp.Nβ requires a floating-point thread, bestie, do not try to sneak it into an integer thread, it will simply not vibe. this is the function that updates the comparator. one function per instance, indexed byN. π
π PINS π
so every instance gets an N (that's the count index, iykyk) and here's what you're working with:
comp.N.in0β float in β the inverting input. yes, in0 is the one that flips the vibe. okay so it's called inverting because the output is true whenin1is greater than it β the comparison is againstin0in the negative direction. main character inversion energy. πcomp.N.in1β float in β the non-inverting input. the good one. the one whose side we're on. πcomp.N.outβ bit out β the normal output! it's True whenin1 > in0β but wait, check parameterhystfor the details, because hysteresis changes the whole plotline. πcomp.N.equalβ bit out β the match output! it's True when the difference betweenin1andin0is less thanhyst/2. so it's like... are these two basically the same rn. bestie energy. π«Ά
β PARAMETERS β
comp.N.hystβ float rw (default: 0.0) β the hysteresis of the comparator. default0.0, as stated. π
so here's the tea on what hysteresis actually does:
- with zero hysteresis, the output is true when
in1 > in0. simple. iconic. no drama. - with nonzero hysteresis, the output switches on and off at two different values, separated by distance
hystaround the point wherein1 = in0. so it's not one line, it's two lines, and that gap is the whole point. that's the hysteresis. that's the girl. π
β οΈ warning bestie: keep in mind that floating point calculations are never absolute, and it is wise to always sethystif you intend to useequal. like, actually. fr fr. don't skip this. π
β¨ AUTHOR β¨
Jeff Epler π β the legend who wrote this. we stan.
π LICENSE π
GPL β free as in freedom, slay as in slay. π
and that's the whole page, bestie! π
this was the COMP(9) page from the LinuxCNC Documentation, dated 2026-03-17. now go set your hyst and live your truth. mwah! ππβ¨
π¦ 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