LINCURVE(9)
β¨ NAME β¨
lincurve β it's a one-dimensional lookup table, bestie π
and honestly? it ate.
π SYNOPSIS π
loadrt lincurve [count=N|names=name1[,name2...]] [personality=P1,P2,...]
π DESCRIPTION π
Okay so picture this: this component takes any floating-point input and maps it to a floating-point output. That's it, that's the whole vibe. Typical glow-up uses include:
- linearisation of thermocouples π‘οΈ
- defining PID gains that vary with external factors π
- substituting for any mathematical function where absolute accuracy is not required
Think of it as a 2-dimensional graph, right? Points hanging out in (x,y) space, all joined up by straight lines β¨ The input value gets plopped onto the x axis, you follow it on up until it touches the line, and boom β the output of the component is set to the corresponding y-value. No cap, that's literally it.
The (x,y) points are defined by the x-val-NN and y-val-NN parameters, and you gotta set those in the HAL file using setp commands. Fr fr.
The maximum number of (x,y) points supported is 16. Sixteen bestie, that's the ceiling π«Ά
Now for the edge cases, and listen up because this matters:
- For input values less than the
x-val-00breakpoint,y-val-00is returned. - For x greater than the largest
x-val-NN, the yval corresponding to x-max is returned β ie, no extrapolation is performed. She does not extrapolate. She refuses. π
Sample usage, so you can copy-paste like the icon you are:
loadrt lincurve count=3 personality=4,4,4
That's a set of three 4-element graphs, in case you were wondering πΈ
β FUNCTIONS β
lincurve.Nβ (requires a floating-point thread, don't forget it or she simply will not run π)
π¦ PINS π¦
lincurve.N.infloat in β the input value πlincurve.N.outfloat out β the output value β¨lincurve.N.out-iofloat io β the output value, compatible with PID gains π
π PARAMETERS π
lincurve.N.x-val-MMfloat rw (MM=00..personality) β axis breakpoints πlincurve.N.y-val-MMfloat rw (MM=00..personality) β output values to be interpolated π«
π AUTHOR π
Andy Pugh
π LICENSE π
GPL
Okay bestie, that's the whole page β go forth and interpolate responsibly, mwah π
Shoutout to the LinuxCNC Documentation girlies, dated 2026-03-17, repping the HAL Component manual (LINCURVE(9)). Slay, periodt. π β¨
π¦ 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