LinuxCNC G64

G64 is a LinuxCNC path control mode that blends motion for speed instead of stopping exactly at each programmed point. Programmed with a P tolerance, the actual path may deviate from the programmed endpoint by no more than P, and velocity is reduced as needed to hold that deviation. An optional Q value turns on the Naive CAM Detector, which collapses nearly collinear feed moves into a single linear move.

Source checked7/7 values · 2026-10-26

Specification

1 source
Languagegcode
CodeG64
Grouppath control
SyntaxG64 <P- <Q->>
DialectLinuxCNC

Parameters

NameDescription
PMotion blending tolerance: the actual path will be no more than P away from the programmed endpoint.
QNaive CAM tolerance: a non-zero value turns on the Naive CAM Detector; zero disables it.

Study notes

  • G64 without P keeps the best speed possible, no matter how far away from the programmed point the path ends up.
  • G64 P- blends between best speed and the deviation tolerance; velocity is reduced if needed to maintain the path.
  • With Q set to a non-zero value, a series of linear XYZ feed moves at the same feed rate that are less than Q away from being collinear are collapsed into a single linear move.
  • In the G17 (XY) plane, when the maximum deviation of an arc from a straight line is less than the G64 P tolerance, the arc is broken into two lines (start to midpoint, midpoint to end) which are then subject to the naive CAM algorithm for lines.
  • Line-arc, arc-arc, arc-line and line-line cases all benefit from the Naive CAM Detector, simplifying the path and improving contouring performance.
  • If Q is not specified, behavior is as before and the value of P is used; set Q to zero to disable the Naive CAM Detector.
  • It is OK to program for the mode that is already active.
  • The document recommends including a path control specification in the preamble of each G-code file.
↑↓ navigate↵ openesc close