LINCURVE(9)

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

✨ 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-00 breakpoint, y-val-00 is 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.in float in β€” the input value πŸ’œ
  • lincurve.N.out float out β€” the output value ✨
  • lincurve.N.out-io float io β€” the output value, compatible with PID gains πŸ‘‘

🌈 PARAMETERS 🌈

  • lincurve.N.x-val-MM float rw (MM=00..personality) β€” axis breakpoints πŸ“
  • lincurve.N.y-val-MM float 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