Controlling CNC Machines - Now with Smoother Motion
This fork adds optional S-curve (jerk-limited) motion planning to LinuxCNC, providing smoother acceleration profiles that can reduce vibration and improve surface finish.
S-curve planning is DISABLED by default. To enable it, add these lines to your INI file:
[TRAJ]
PLANNER_TYPE = 1 # 0 = Traditional (default), 1 = S-curve
MAX_LINEAR_JERK = 1000.0 # Adjust based on your machine
DEFAULT_LINEAR_JERK = 500.0 # Default jerk for moves
[JOINT_0]
MAX_JERK = 1000.0 # Set for each joint
[AXIS_X]
MAX_JERK = 1000.0 # Set for each axisWithout these settings, this version runs EXACTLY like standard LinuxCNC!
- Quick Reference: See SCURVE_QUICKREF.txt for complete guide
- Example Configuration: See configs/sim/axis/axis_mm_scurve.ini
- HAL Examples: See configs/scurve_runtime_hal_examples.hal
- ✅ Optional - Disabled by default, backward compatible
- ✅ Runtime Switching - Toggle between trapezoidal and S-curve via HAL pins
- ✅ Configurable - Set jerk limits per trajectory/axis/joint
- ✅ Smoother Motion - Reduces vibration and mechanical stress
- ✅ Better Surface Finish - Especially beneficial for finishing passes
- Light/rigid machines: 1,000 - 10,000 units/s³
- Medium machines: 100 - 1,000 units/s³
- Heavy/flexible machines: 100 - 500 units/s³
Units depend on your LINEAR_UNITS setting (mm or inch)
Switch planners on-the-fly using HAL pins:
setp ini.traj_planner_type 1 # Enable S-curve
setp ini.traj_max_jerk 2000.0 # Adjust jerk dynamically
Website
Install
Build
Documentation
It can drive milling machines, lathes, 3D printers, laser
cutters, plasma cutters, robot arms, hexapods, and more.
LinuxCNC was initiated 25 years ago and evolved into a very
international project with contributions from all over the globe.
With release 2.9 of LinuxCNC we also transitioned the
documentation to the use of the public crowd translation
services Weblate and invite all our users to contribute.
The translations we expect to help attract practitioners
to the project and also helps educating enthusiasts of
all age groups on automated machining.
The authors of this software accept
absolutely no liability for any
harm or loss resulting from its use.
It is EXTREMELY unwise to rely
on software alone for safety.
Any machinery capable of harming persons must have
provisions for completely removing power from all
motors, etc., before persons enter any danger area.
All machinery must be designed to comply with local
and national safety codes, and the authors of this
software cannot and do not, take any responsibility
for such compliance.
This S-curve implementation is:
- ✅ Functionally complete
⚠️ Experimental - Community testing needed- 🔒 Safe by default (disabled unless explicitly configured)
Please test and report your experience!
Report issues or feedback:
- GitHub Issues: Create an issue
- LinuxCNC Forum: Post your results and jerk values that worked
- Share your machine specs and optimal settings to help others