Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 83 additions & 30 deletions configs/sim/axis/axis_9axis_scurve.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
# acceleration profiles that can reduce machine vibration and
# improve surface finish.
#
# IMPORTANT: S-curve planning is OPTIONAL and DISABLED by default.
# IMPORTANT: S-curve planning is OPTIONAL.
# Traditional trapezoidal acceleration is used when:
# - PLANNER_TYPE = 0, OR
# - MAX_LINEAR_JERK = 0 (or not specified)
# - MAX_LINEAR_JERK = 0
#
# NOTE: If MAX_LINEAR_JERK is not specified, it defaults to 1e9 (1 billion),
# which effectively disables jerk limiting while still using S-curve calculations.
# This produces motion similar to trapezoidal but not identical.
#
# ========================================================
[EMC]
Expand Down Expand Up @@ -64,6 +68,8 @@ PLANNER_TYPE = 1
# Units: machine-units/second^3 (e.g., mm/s^3 or inch/s^3)
#
# Setting this to 0 disables S-curve planning regardless of PLANNER_TYPE
# If not specified, defaults to 1e9 (effectively no jerk limiting)
# Maximum allowed value is 1e9 (values above are automatically clamped)
#
# Recommended starting values (adjust based on your machine):
# - Light/rigid machines: 1000-10000
Expand All @@ -75,16 +81,7 @@ PLANNER_TYPE = 1
#
# NOTE: This parameter can be changed at RUNTIME via HAL pin:
# ini.traj_max_jerk (allows tuning on-the-fly)
MAX_LINEAR_JERK = 1000.0

# DEFAULT_LINEAR_JERK: Default jerk for programmed feed moves
# Units: machine-units/second^3
# Should be <= MAX_LINEAR_JERK
# Default: 0.0
#
# NOTE: This parameter can be changed at RUNTIME via HAL pin:
# ini.traj_default_jerk
DEFAULT_LINEAR_JERK = 500.0
MAX_LINEAR_JERK = 10000.0

# --------------------------------------------------------
# Standard TRAJ parameters (still required with S-curve)
Expand Down Expand Up @@ -141,91 +138,147 @@ HOME_SEQUENCE = 0
#
# This should match or be higher than the trajectory jerk
# to avoid limiting coordinated motion.
MAX_JERK = 1000.0
MAX_JERK = 10000.0

#MIN_LIMIT = -200.0 #disabled to give more space for testing g-codes
#MAX_LIMIT = 200.0 #disabled to give more space for testing g-codes

# ========================================================
# HOMING CONFIGURATION FOR S-CURVE
# ========================================================
# WARNING: When using S-curve motion (PLANNER_TYPE=1), you MUST set
# HOME_SEARCH_VEL and HOME_LATCH_VEL significantly SLOWER than you
# would with trapezoidal motion planning.
#
# S-curve motion requires MORE DISTANCE to decelerate due to the
# jerk-limited acceleration profile. If homing velocities are too
# high, the axis may overshoot and hit hard limits or sensor limits.
#
# RECOMMENDED: Start with 50% or less of the velocities you would
# use with trapezoidal planning, then increase cautiously.
#
# Example homing configuration (adjust for your machine):
#HOME_SEARCH_VEL = 5.0 # Velocity for initial limit switch search
#HOME_LATCH_VEL = 1.0 # Velocity for precise homing (slower)
#HOME_OFFSET = 0.0 # Distance from switch to home position
#HOME_USE_INDEX = NO # Use encoder index pulse for homing
#HOME_IGNORE_LIMITS = NO # Ignore limit switches during homing move
# ========================================================

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
MAX_JERK = 1000.0
MAX_JERK = 10000.0
#MIN_LIMIT = -200.0 #disabled to give more space for testing g-codes
#MAX_LIMIT = 200.0 #disabled to give more space for testing g-codes
HOME_SEQUENCE = 0

# WARNING: S-curve homing requires SLOWER velocities than trapezoidal!
# See JOINT_0 for detailed homing configuration examples.
#HOME_SEARCH_VEL = 5.0
#HOME_LATCH_VEL = 1.0

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 800.0
MAX_JERK = 800.0
MAX_JERK = 10000.0
#MIN_LIMIT = -100.0 #disabled to give more space for testing g-codes
#MAX_LIMIT = 100.0 #disabled to give more space for testing g-codes
HOME_SEQUENCE = 0

# WARNING: S-curve homing requires SLOWER velocities than trapezoidal!
# See JOINT_0 for detailed homing configuration examples.
#HOME_SEARCH_VEL = 4.0
#HOME_LATCH_VEL = 0.8

[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 180.0
MAX_ACCELERATION = 600.0
MAX_JERK = 600.0
MAX_JERK = 10000.0
#MIN_LIMIT = -360.0
#MAX_LIMIT = 360.0
HOME_SEQUENCE = 0

# WARNING: S-curve homing requires SLOWER velocities than trapezoidal!
#HOME_SEARCH_VEL = 3.0
#HOME_LATCH_VEL = 0.6

[JOINT_4]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 180.0
MAX_ACCELERATION = 600.0
MAX_JERK = 600.0
MAX_JERK = 10000.0
#MIN_LIMIT = -360.0
#MAX_LIMIT = 360.0
HOME_SEQUENCE = 0

# WARNING: S-curve homing requires SLOWER velocities than trapezoidal!
#HOME_SEARCH_VEL = 3.0
#HOME_LATCH_VEL = 0.6

[JOINT_5]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 180.0
MAX_ACCELERATION = 600.0
MAX_JERK = 600.0
MAX_JERK = 10000.0
#MIN_LIMIT = -360.0
#MAX_LIMIT = 360.0
HOME_SEQUENCE = 0

# WARNING: S-curve homing requires SLOWER velocities than trapezoidal!
#HOME_SEARCH_VEL = 3.0
#HOME_LATCH_VEL = 0.6

[JOINT_6]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
MAX_JERK = 1000.0
MAX_JERK = 10000.0
#MIN_LIMIT = -200.0
#MAX_LIMIT = 200.0
HOME_SEQUENCE = 0

# WARNING: S-curve homing requires SLOWER velocities than trapezoidal!
#HOME_SEARCH_VEL = 5.0
#HOME_LATCH_VEL = 1.0

[JOINT_7]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
MAX_JERK = 1000.0
MAX_JERK = 10000.0
#MIN_LIMIT = -200.0
#MAX_LIMIT = 200.0
HOME_SEQUENCE = 0

# WARNING: S-curve homing requires SLOWER velocities than trapezoidal!
#HOME_SEARCH_VEL = 5.0
#HOME_LATCH_VEL = 1.0

[JOINT_8]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 800.0
MAX_JERK = 800.0
MAX_JERK = 10000.0
#MIN_LIMIT = -100.0
#MAX_LIMIT = 100.0
HOME_SEQUENCE = 0

# WARNING: S-curve homing requires SLOWER velocities than trapezoidal!
#HOME_SEARCH_VEL = 4.0
#HOME_LATCH_VEL = 0.8

# ========================================================
# AXIS CONFIGURATION
# ========================================================
Expand All @@ -239,63 +292,63 @@ MAX_ACCELERATION = 1000.0
# MAX_JERK: Maximum jerk for coordinated motion on this axis
# Units: machine-units/second^3
# Default: 0.0 (disabled)
MAX_JERK = 1000.0
MAX_JERK = 10000.0

[AXIS_Y]
#MIN_LIMIT = -200.0 #disabled to give more space for testing g-codes
#MAX_LIMIT = 200.0 #disabled to give more space for testing g-codes
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
MAX_JERK = 1000.0
MAX_JERK = 10000.0

[AXIS_Z]
#MIN_LIMIT = -100.0 #disabled to give more space for testing g-codes
#MAX_LIMIT = 100.0 #disabled to give more space for testing g-codes
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 800.0
MAX_JERK = 800.0
MAX_JERK = 10000.0

[AXIS_A]
#MIN_LIMIT = -360.0
#MAX_LIMIT = 360.0
MAX_VELOCITY = 180.0
MAX_ACCELERATION = 600.0
MAX_JERK = 600.0
MAX_JERK = 10000.0

[AXIS_B]
#MIN_LIMIT = -360.0
#MAX_LIMIT = 360.0
MAX_VELOCITY = 180.0
MAX_ACCELERATION = 600.0
MAX_JERK = 600.0
MAX_JERK = 10000.0

[AXIS_C]
#MIN_LIMIT = -360.0
#MAX_LIMIT = 360.0
MAX_VELOCITY = 180.0
MAX_ACCELERATION = 600.0
MAX_JERK = 600.0
MAX_JERK = 10000.0

[AXIS_U]
#MIN_LIMIT = -200.0
#MAX_LIMIT = 200.0
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
MAX_JERK = 1000.0
MAX_JERK = 10000.0

[AXIS_V]
#MIN_LIMIT = -200.0
#MAX_LIMIT = 200.0
MAX_VELOCITY = 300.0
MAX_ACCELERATION = 1000.0
MAX_JERK = 1000.0
MAX_JERK = 10000.0

[AXIS_W]
#MIN_LIMIT = -100.0
#MAX_LIMIT = 100.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 800.0
MAX_JERK = 800.0
MAX_JERK = 10000.0

# ========================================================
# TUNING GUIDELINES
Expand Down
Loading
Loading