G64/M59 Guide
Background
This document is meant to provide an outline of trajectory planner improvements made to Pathpilot 2.11 (and further) and describes the implementation of additional functionality of G64 path blending and M59 smoothing.
G64 settings are able to be applied to any machines using Pathpilot. M59 settings are accepted but currently only applied to the 1500MX.
G64
G64 is a code that has existed in Pathpilot since it’s inception from LinuxCNC that specifies path blending mode should be used and that deviation from the programmed path is allowed. There were two parameters of G64 that have existed previously; P and Q. Different from LinuxCNC, specifying “G64” without any parameters applies a value of .005” to P and 0 to Q.
G64 parameters must be specified in inch units even if G21 is applied in the program
P - specifies a tolerance from the program end/start point that the machine is allowed to deviate by. In the image below P controls the allowable distance of the dashed line from the P2 point, illustrated by the dashed line. A typical value for the P parameter would be .005”.
Q - specifies a tolerance for multiple line segment end points to be collapsed into a single line segment. In the image below, the original program path consisted of line segments from P1 to P2, P2 to P3, and P3 to P4. If the distance of P2 to the line segment between P1 and P3 is smaller than Q, the line segments of P1 to P2 and P2 to P3 will be deleted and the line segment between P1 and P3 will be used instead, illustrated by the dashed line. A typical value for the Q parameter would be .0005”. Greatly diminishing returns are seen from values over .001”.
A new G64 parameter has been created as of version 2.11 of Pathpilot denoted by the character R.
R - specifies a tolerance from the programmed path, other than the program end points. In the image below, R controls the allowable distance of the dashed line from the P7-P8 line segment with the allowed deviation illustrated by the dashed line. A typical value for the R parameter would be .0005”.
It is important to note that effects from G64 are highly dependent on programmed speed and machine acceleration. G64 parameters are permissive, if the programmed path can be honored at the programmed feed rate the machine will do so and will not apply any path deviation. If the programmed path cannot be honored at the programmed feed rate the machine will apply the minimum amount of path blending necessary to maintain the programmed feed rate, even if a large path blending allowance is specified.
M59
M59 is a separate M code created to specify smoothing settings. M59 settings will still apply in exact stop mode (G61).
M59 has several parameters that can be specified, several of which are used in conjunction with the P value set by G64.
Parameter | Description | Range | Purpose |
---|---|---|---|
D | Smoothing time | 0-99 | Size of smoothing window in ms. A larger smoothing window reduces the effects of acceleration change at the cost of feed rate and path accuracy. |
E | Acceleration scale | 0-1 | Acceleration limit scale factor. Higher acceleration increases average feed but can reduce surface finish when D is small. |
H | Smoothing tolerance | 0-.04” 0-1mm | Path deviation allowance due to smoothing when D > 0. Larger values allow higher feed rates but lower path accuracy. Limited effects will be seen from setting H higher than .001” in most circumstances. |
Smoothing Profiles and Application
Pathpilot includes several preset profiles for use in different applications, applied by the use of an L argument with M59 (eg, “M59 L3”). The profiles set parameters for both G64 and M59. It is possible for the profile to be temporarily modified by additionally specifying one or more of the G64/M59 parameters, for example specifying “M59 L3 D25 E1” will apply the L3 profile but will set the D parameter to 25 and set the E parameter to 1 instead of the current profile defaults of 15/0.9.
The smoothing profiles can be seen as a new tab of the Offsets page as of 2.11.0.
The 4th Axis Profile Finishing smoothing profile should be used for all simultaneous 4th axis toolpaths