Why does this have to be done in real time? Why can’t you compile this and just run it?
Thirty years ago I worked for a company who sold CNC woodworking machines. They carried a big, full cnc line, and a small, Italian made machine that mostly drilled holes. To give you an idea of what I mean, Ikea uses many of this exact machine to make their adjustable shelving units. That machine uses a compiled code processor. It doesn’t do much machining, because compiled code isn’t up to the task, really. And there are several really good reasons why- at least for metalworking machines.
One of them is this. Watch this video all the way through.
Note the cutting times? yeah. Those are hours. 5 hour rough cut. 11 hour first pass. 15 hour second pass. 15 hour roughing level two. and so on and so forth.
Now, this is a true 5 axis machine in the video, which is still, in reality, a very simple mechainsm, and from a CNC programmer’s standpoint, still relatively simple. You just have to make sure your tool isn’t going to heel, that you have clearance for everything, that your tool is set with sub-micron precision, that the forging is bolted down and dialed in with sub micronic precision, and that the power to the machine isn’t going to go out for, oh, four or five days. The tooling, though, that’s another issue.
See, in order to make this all work, the finished pass (and in some cases, the roughing tools) have to be the same tool- on some critical components, changing a tool in the middle of a cut immediately scraps the part. So if you have to make a part that has a single tool that lasts for a 15 hour finishing pass, how do you keep it from wearing? You don’t. If it wears, how does that not change the profile of the part as it cuts? Offsets.
The most critical ability of a machine tool is it’s ability to do offsets. See, most of the time, a CNC part is programmed to it’s actual profile, and you have to tell the machine what the diameter of the tool is, and the machine offsets the path of the tool by it’s radius and cuts exactly the part you expect. On a five axis machine, this includes the diameter of the tool at it’s nose, the diameter of the ball, and the taper of the tool if it has one (Most do, to some degree)
At it’s most simple, the machine will stop the machining process every so often and use built in measuring tools to measure the tool and offset that amount. Tooling these days has predictable wear patterns in certain materials, and the machine can offset on the fly as the tool wears. Remember the ball we kicked? yes, it does happen that the geometry of the machine is changed in real time as conditions change. Oh, and let’s talk about changing conditions a moment. As a machine moves, the friction of the ways, ballscrew, gears, brakes, all causes temperature rise. Some machines- especially five axis machines- cannot be even operated without a specific warmup time. And when you are cutting, on something critical, even a three axis machine will have temperature monitoring equipment embedded into the castings at various locations through the machine, and that processor that’s keeping track of the circular path in real time will adjust the path, in real time, based on the tool wear and the increasing or decreasing temperature conditions in the machine. And we are STILL only talking about two axis, though the complexity involved in going to three axis or even five (Common in machine tools) is not really dramatically different. BTW, the turbine rotor in the video above is a classic example of how a curve can be interpolated in 5 axis at once.