Friday, 1 October 2021

It's freezing here (new kernel for Linux Mint) - and G61/G64 path smoothing in LinuxCNC

Cold, fatty?
True, it's cold now but I'm more bothered by the fact that the LinuxCNC PC is still freezing up sporadically. F***ing annoying in fact, as I've tried all sorts to cure it now, including a new SSD, new PSU, new Linux Mint install, new LinuxCNC install etc. And the bastard thing still it locks up.

Latest suggestion is to try a newer kernel. Linux runs a "kernel" (nothing specific to LinuxCNC), which seems to be the core of the OS. Take your pick:


Then there's an "RT patch" so that you can schedule operations in  real time.


I won't pretend I know much about it (yet) or even that I've learned much about it (yet) but it seems that the default for the current version of Mint is 5.4. There are various versions available currently, all the way up to 5.15 for the adventurous. 5.10 seems to be the last "longterm" version although 5.13 and 5.14 are also described as "stable", whatever that means, given that 5.4 is presumably described thuswise too.

Upgrading(?) to 5.10:

Well that went OK as far as I can tell and we are now around 30h in without a freeze - yet. Let's keep everything crossed and hope this one finally sticks.....

Trajectory planner??

A little miffed to discover that the actual path followed by the tool in LinuxCNC doesn't seem to be quite what was anticipated when I generated the toolpath in Fusion 360. What's going on here, then?

Here's what I'd imagined would be happening, as seen from within Fusion 360:

And here's what I'm seeing within gmoccapy:

The sharp corners on the edges of my pawn test piece are not entirely, well....sharp. The controller (LinuxCNC) is clearly being clever here. Presumably it's aware of its own shortcomings, viz the need to slow down ahead of changes in direction. Clearly this must be controllable in the config. IIRC, there are such controls within both Fusion (milling) and Centroid CNC12, so almost certainly there will be similar content in LinuxCNC.

G61 / G64:

Time to dig into the smoothing functions perhaps? Indeed, it's not difficult to find the answers. Here's the crux of it documented within the G code documentation - the G61 and G64 commands and their associated parameters.

Indeed, if you require the tool to faithfully follow the profile with minimal deviation, you need to allow the feedrate to reduce to zero or thereabouts in sharp corners. So here's the effect of specifying G64 P0.01 ie requiring the following error to be no more than 10um:

Sure enough, as the tool enters the corners, the feed rate slows right down. Also pleasing to see that the spindle speed slows down as the radius increases - I've specified constant surface speed (CSS) up to a maximum of 2000rpm and that is attained once the diameter exceeds around 20mm.

That's better! Perhaps time to cut some metal again?

No comments:

Post a Comment

TIG welder up and running - after some fault diagnostics and repair

Finally got some time to connect up the flow meter and argon hose. Plugged in the torch and ground cables and the torch hose etc. Powered it...