Table of contents |

Tool Setup Screen - 3rd Order Trajectory Planner

KMotionCNC includes an optional 3rd Order (Jerk Limited) Trajectory Planner. It is selected with a single checkbox on the Tool Setup - Trajectory Planner Screen, and the standard planner remains the default. The same G Code and the same screens are used either way, so it is easy to try and easy to switch back.

Compared to the standard planner the 3rd Order Planner offers:

Enabling the 3rd Order Planner

3rd Order Planner enabled

Check 3rd Order Planner in the Trajectory Planner group. The screen then adapts:

For comparison, here is the same screen with the standard planner selected (the default):

Standard Planner

Setting the Jerk Limits

Jerk limits how quickly the acceleration is allowed to change. A lower Jerk gives gentler, quieter motion; a higher Jerk gives crisper motion and allows corners to be taken faster within a given tolerance. A good starting point is a Jerk value of about 10 times the Acceleration value for each axis (for example Accel 30 in/sec2 and Jerk 300 in/sec3).

Note that the smoothing time window is shared by all the axes and is set by the softest axis (the largest Accel/Jerk ratio). One axis with a very low Jerk setting will slow cornering for the whole machine, so keep the Velocity/Acceleration/Jerk ratios comparable across the axes for best results.

Corners and Tolerance (G64 / G61 / G61.1)

With the 3rd Order Planner corners are handled automatically from the Corner Tolerance setting: the path is allowed to round off each corner by up to the tolerance so motion can continue smoothly through it. Corners too sharp to blend at a useful speed (such as full reversals) automatically take a clean stop and go instead. See Corner Rounding for the related Corner Tolerance and Facet Angle settings.

The tolerance can also be commanded from the G Code Program itself, without stopping the motion:

Cubic Knots

Normally motion is delivered to the controller as many short straight segments. With Cubic Knots selected the motion is instead delivered as smooth curves (cubics) which the controller evaluates exactly on every servo sample - velocity is perfectly continuous and curves have no faceting at all. This gives the smoothest possible execution of the planned motion.

Note: Cubic Knots requires the updated KFLOP or Kogna Firmware included with this release. If older Firmware is installed the Controller does not recognize the new commands: an "error, invalid command" message appears on the Console Screen and the program aborts with "GCode Aborted" - update the Firmware (KMotion.exe Config/Flash Screen - New Version).

Actuator Space Limits

3rd Order Planner with Actuator Space Limits

On machines that use a Kinematics model (rotary head 5 Axis machines, trunnions, robots) the motion of the motors can be very different from the motion of the tool. A modest tool speed can demand a very high motor speed when working near a pivot. Normally axis limits are specified in CAD (tool) space, which cannot see this - so a program that looks fine can silently ask a motor for more speed or acceleration than it has.

Check Actuator Space Limits to specify the limits on the motors themselves. The Axis Parameters group becomes Actuator Limits with one row per actuator slot 0-7 (the outputs of the Kinematics model, in the same order as the channels defined by DefineCS):

The programmed Feed Rate still means the speed of the tool along the CAD path - the planner simply makes sure no motor is ever asked to exceed its own limits while achieving it. Jogging also benefits: on machines with Kinematics, jogs are planned as coordinated motion so the tool tracks the commanded direction exactly at any speed and decelerates on-path when the jog is released.

Actuator Space Limits works with the standard planner as well (Velocity and Acceleration limits, no Jerk column):

Standard Planner with Actuator Space Limits

Log

The Log option records every planned motion segment to the file c:\Temp\TPSegLog.csv while a program (or a coordinated Jog) runs, with either planner. The MotionLogPlotter utility (MotionLogPlotter.exe in the KMotion\Release folder; source in PC VCS Examples\MotionLogPlotter) plots the log - the path in XY, plus Position, Velocity, Acceleration, and Jerk versus time with zoom - which is useful for verifying machine settings and diagnosing motion issues. With the 3rd Order Planner selected, Log also writes a text timeline of each run (waypoints, throttling, downloads) to c:\Temp\TP3_Timeline.log. The c:\Temp folder is created if it does not exist. Leave Log unchecked for normal use.

Notes