rellenberg wrote: ARC_BLEND_OPTIMIZATION_DEPTH = 50 (Lookahead depth in number of segments)
To expand on this a bit, you can choose this value somewhat arbitrarily. Here's a formula to estimate how much "depth" you need for a particular config:
#
n = v_max / (2.0 * a_max * t_c)
# where:
# n = optimization depth
# v_max = max axis velocity (UU / sec)
# a_max = max axis acceleration (UU / sec)
# t_c = servo period (seconds)
So, a machine with a maximum axis velocity of 10 IPS, a max acceleration of 100 IPS^2, and a servo period of 0.001 sec would need:
10 / (2.0 * 100 * 0.001) = 50 segments to always reach maximum velocity along the fastest axis.
In practice, this number isn't that important to tune, since the lookahead rarely needs the full depth unless you have lots of very short segments. If during testing, you notice strange slowdowns and can't figure out where they come from, first try increasing this depth using the formula above.
If you still see strange slowdowns, it may be because you have short segments in the program. If this is the case, try adding a small tolerance for Naive CAM detection. A good rule of thumb is this:
# min_length ~= v_req * t_c
# where:
# v_req = desired velocity in UU / sec
# t_c = servo period (seconds)
If you want to travel along a path at 1 IPS = 60 IPM, and your servo period is 0.001 sec, then any segments shorter than
min_length will slow the path down. If you set Naive CAM tolerance to around this min length, overly short segments will be combined together to eliminate this bottleneck. Of course, setting the tolerance too high means big path deviations, so you have to play with it a bit to find a good value. I'd start at 1/2 of the min_length, then work up as needed.
rellenberg wrote: ARC_BLEND_RAMP_FREQ = 20
Another trade-off between smoothness and speed is controlled by this cutoff frequency. The benefits in terms of smoothness are explained in the prev. post, but it wasn't clear what this costs you in terms of performance. You can characterize the worst-case loss of performance by comparing the velocity that a trapezoidal profile reaches vs. the ramp:
# v_ripple = a_max / (4.0 * f)
# where:
# v_ripple = average velocity "loss" due to ramping
# a_max = max axis acceleration
# f = cutoff frequency from INI
For the aforementioned machine, the ripple for a 20Hz cutoff frequency is 100 / (4 * 20) = 1.25 IPS. This seems high, but keep in mind that it is only a worst-case estimate. In reality , the trapezoidal motion profile is limited by other factors, such as normal acceleration or requested velocity, and so the actual performance loss should be much smaller. Increasing the cutoff frequency can squeeze out more performance, but make the motion rougher due to acceleration discontinuities. A value in the range 20Hz to 200Hz should be reasonable to start.
Finally, no amount of tweaking will speed up a toolpath with lots of small, tight corners, since you're limited by cornering acceleration. Still, if you see a slowdown that you think shouldn't be there, post the example here. There's always the chance that there's a bottleneck that we missed.