LIMIT_AXIS(9)
π NAME π
limit_axis β dynamic range based axis limits β¨ (yes bestie, your axis gets limits, but make them move with the vibe)
πΈ SYNOPSIS πΈ
loadrt limit_axis [count=N|names=name1[,name2...]]
[personality=P1,P2,...]
π¦ DESCRIPTION π¦
Okay so this is limit_axis.c β it clamps an axis to certain limits at varying inputs. Like, the limits aren't fixed, they change depending on what some feedback pin says. Think of it as a bouncer who changes the rules depending on how tall you are. No cap.
Example time, because the example ate: say you've got a spindle with C rotation, and you're trying to avoid hitting a gantry when the height is above Z-10:
- Use the Z axis as feedback
- Use 2 ranges:
(0,-10)and(-10, -40) - When Z is above 10, C rotation is limited to range 0
- When Z is below 10, C rotation is limited to range 1
Slay. That's the whole concept.
Usage:
loadrt limit_axis count=3 personality=2,3,2
or
loadrt limit_axis names=limit_x,limit_y,limit_z personality=2,3,2
The personality argument defines how many ranges are supported by each instance. It's literally the range count per instance, periodt.
Heads up bestie: no spaces can be used in thenames=andpersonality=parameters. Not even one. Zero. π€
β οΈ Caveats β οΈ
- Searches ranges from 0 to 9 and will take the first range that matches
- Ranges are inclusive:
min_range <= feedback <= max_range - Max can not be less than minimum for any group
- Sticky indicates, to not check other ranges if the feedback is still in the current range
- Enable allows for a range to be turned on/off β for cases such as avoiding a tool changer, but allowing sometimes
π₯ FUNCTIONS π₯
limit-axis.Nβ requires a floating-point thread π
π PINS π
limit-axis.N.error-no-range(bit out) β error pin indicating that no range matches the fb πlimit-axis.N.min-output(float out) β minimum limit outputlimit-axis.N.max-output(float out) β maximum limit outputlimit-axis.N.fb(float in) β feedback pin; the value of this pin determines which range is active π―limit-axis.N.current-range(u32 out) β indicates which range is currently activelimit-axis.N.min-limit-MM(float in,MM=00..personality) β the array of minimum limits to select fromlimit-axis.N.max-limit-MM(float in,MM=00..personality) β the array of max limits (the OG page spells it "macimum", iconic typo, we keep it in spirit π)limit-axis.N.min-range-MM(float in,MM=00..personality) β defines the range of values with which the fb is compared to set the rangelimit-axis.N.max-range-MM(float in,MM=00..personality) β defines the range of values with which the fb is compared to set the rangelimit-axis.N.enable-MM(bit in,MM=00..personality) β used to enable and disable a specific range ποΈlimit-axis.N.sticky-MM(bit in,MM=00..personality) β used to make specific range 'sticky' or not π―limit-axis.N.error-range-MM(bit out,MM=00..personality, default:1) β error bit indicating that the fb pin falls outside all rangeslimit-axis.N.error-limit-MM(bit out,MM=00..personality, default:1) β error bit indicating that the max limit is not larger than the min limit
π AUTHOR π
Chad Woitas π (we stan)
π LICENSE π
GPL β free as in freedom, bestie
Anyway that's the whole page from the LinuxCNC Documentation, dated 2026-03-17 β the LIMIT_AXIS(9) section of the HAL Component manual, section 9 and all. Go limit some axes responsibly fr fr π«Άβ¨π
π¦ 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