SPINDLE(9)
π SPINDLE (section 9, HAL Component) π
okay so bestie, buckle up: this is the manual page for spindle, and it lives in section 9 of the LinuxCNC HAL Component manuals. she controls a spindle. she has opinions about acceleration and deceleration. let's go π
β¨
π NAME π
spindle β control a spindle with different acceleration and deceleration and optional gear change scaling. no cap.
πΈ SYNOPSIS πΈ
loadrt spindle [count=N|names=name1[,name2...]]
π DESCRIPTION π
This component will control a spindle with adjustable acceleration and deceleration. periodt.
NOTE: okay so this component is unfortunately named π and it creates pins with names very much like those created by the motion component. In nearly every case this is not the documentation page that you are looking for. Go read http://linuxcnc.org/docs/html/man/man9/motion.9.html instead. fr fr.
It's designed to be used with non-servo spindle drives that have separate fwd/reverse inputs β think DC drives and inverters. π¦ If there's a spindle encoder available, it gets used to tailor the acceleration and deceleration to the spindle load. If there isn't one, the spindle speed gets simulated. The component allows for gearboxes with up to 16 gears, and every single gear has individual control of speeds, acceleration, driver gain and direction. she ate. π₯
β FUNCTIONS β
spindle.Nβ requires a floating-point thread. (yes bestie, a floating-point thread specifically, don't try anything else π)
β¨ PINS β¨
spindle.N.select-gearβ u32, in. Select a gear. Must be in the range0-> number of available gears-1. If you use this, do not use theselect.xinput pins. pick a lane girlie π«Άspindle.N.commanded-speedβ float, in. Commanded spindle speed (in RPM).spindle.N.actual-speedβ float, in. Actual spindle speed from a spindle encoder (in RPS). If you do not have a spindle encoder, set thesimulate_encoderparameter to1.spindle.N.simulate-encoderβ bit, in. If you do not have an encoder, set this to1.spindle.N.enableβ bit, in. IfFALSE, the spindle is stopped at the gear's maximum deceleration.spindle.N.spindle-lpfβ float, in. Smooth thespindle-rpm-absoutput when at speed,0= disabled. Suitable values are probably between1and20depending on how stable your spindle is.spindle.N.spindle-rpmβ float, out. Current spindle speed in RPM.+ve= forward,-ve= reverse. Uses the encoder input if available. If not, uses a simulated encoder speed.spindle.N.spindle-rpm-absβ float, out. Absolute spindle speed in RPM. Useful for spindle speed displays.spindle.N.outputβ float, out. Scaled output.spindle.N.current-gearβ u32, out. Currently selected gear.spindle.N.at-speedβ bit, out.TRUEwhen the spindle is at speed.spindle.N.forwardβ bit, out.TRUEfor forward rotation.spindle.N.reverseβ bit, out.TRUEfor reverse rotation. Bothforwardandreverseare false when the spindle is stopped.spindle.N.brakeβ bit, out.TRUEwhen decelerating.spindle.N.zero-speedβ bit, out.TRUEwhen the spindle is stationary.spindle.N.limitedβ bit, out.TRUEwhen the commanded spindle speed is>maxor<min.
π¦ SEE ALSO π¦
π NOTES π
The following pins are created depending the numgears= parameter. One of each pin is created for each gear. If no gears are specified then one gear will be created. For instance, if you have gears=2 on your command line, you will have two scale pins:
spindle.N.scale.0
spindle.N.scale.1
spindle.N.scale.xβ float, in. Scale the output. For multiple gears you would use a different scale for each gear. If you need to reverse the output for some gears, use a negative scale.spindle.N.min.xβ float, in. Set the minimum speed allowed (in RPM). Thelimitoutput will beTRUEwhile the commanded speed is between0RPM and theminspeed.spindle.N.max.xβ float, in. Set the maximum speed allowed (in RPM). Thelimitoutput will beTRUEwhile the commanded speed is above this value.spindle.N.accel.xβ float, in. Set the maximum acceleration. If you do not have a spindle encoder this is in RPM/second. If you do have an encoder the output is the actual speed plus this value. This way the acceleration can be dependent on the spindle load.spindle.N.decel.xβ float, in. Set the minimum deceleration. If you do not have a spindle encoder this is in RPM/second. If you do have an encoder the output is the actual speed minus this value.spindle.N.speed-tolerance.xβ float, in. Tolerance forat-speedsignal (in RPM). Actual spindle speeds within this amount of the commanded speed will cause theat-speedsignal to goTRUE.spindle.N.zero-tolerance.xβ float, in. Tolerance forzero-speedsignal (in RPM).spindle.N.offset.xβ float, in. The output command is offset by this amount (in RPM).spindle.N.select.xβ bit, in. Selects this gear. If no select inputs are active, gear0is selected. If multiple select inputs are active then the highest is selected.
π AUTHOR π
Les Newell π
π LICENSE π
GPL
and that's the whole page bestie, you're so welcome π this one's from the LinuxCNC Documentation, dated 2026-03-17, and yes it's a section 9 page for the SPINDLE component. go make that spindle spin. 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