So:
As Sigray has mentioned, why do we need processing power? Well, a couple reasons.
First, let’s look at the numbers we returned in yesterday’s exercise.
This is the raw data, carried out to the last available decimal place, and this is the plot of those line segments.
Looks pretty curvy, doesn’t it? It’s not. It’s nine line segments. And that is at the resolution of the actual calculations. Most machine tools don’t have the ability to deal with anything past three digits, so you get these values instead. (As always, click to embiggenate)
Those values plot the red line. At this resolution it almost appears to be one line.
But it isn’t. Truncating the numbers to three digits past the decimal introduces an error. And that error is a nightmare to someone who needs a critical dimension on a part.
As we can see from the images below, the very first section shows the difference between the path of the black (accurate) line, and the red (Rounded off) line. Yes, it is fractions of a thousandth of an inch, but it matters. Also, the next photo shows the same relationship just three arc segments in, and the red and black lines have changed positions. The part cut in this manner would fail any stringent quality control test. it would be like asking for a golf ball and getting an egg.
In order to not automatically generate these errors, even machines that only have S3 or S4 digits (The number of digits past the decimal) use a different system for display and cutting, called “Floating point”. This allows the machine to cut far more accurately than the actual resolution of the machine, but it costs processing power. And that’s not all.
Let’s go back to the etch a sketch for a moment. If you could very carefully turn both knobs at exactly the same speed, the line you drew would be 45 degrees. If you turned one handle 3 times for every time you turned the other handle four, you would have an angle of about 36.87 degrees. And that is another thing the control has to do. It doesn’t just have to figure out where it has to go, it has to use the servos to get it there. The ratio of the distance travelled in X to the distance travelled in Y, the servos have to move in that ratio, regardless of speed, and they have to also constantly monitor the location so they know when to stop.
12 comments Og | Uncategorized
Back when I was a programmer-larva I made the mistake of defining a new field used in calculations as floating point instead of fixed, as all the other fields were. The run time for the program went from minutes to hours, because once you introduce a floating-point ALL calculations involving that field need to be done in floating point, which means all the other fields first need to be converted to floating point. It was a valuable lesson.
When I was in grad school I had a classmate who worked for one of the big aerospace companies, forget which. When asked why fighter jets needed such powerful computers he replied “Because when a pilot is travelling twice the speed of sound he’d like his calculations done FAST.”
Interestingly, not long ago I saw a comparison of mid-80’s supercomputers with current consumer electronics, measured in MFLOPS (million floating point operations per second). Back in the day the Cray supercomputer was the hot thing, fastest computer in the world, etc. About the same processing power as an iPhone 4.
I keep reading “processing power.” Aren’t any of your machines programmed with lookup tables instead of computing sines and what-not on the fly?
Single sines are a cakewalk. The sine is the least of the problems. Say you’re walking along the long edge of a soccer field, and there is a ball on the short edge, say ten feet from the corner, and you’re 100 feet away. So to walk toward it, you move to the side 1 foot for every ten feet you move forward. Now someone kicks the ball. Do you stop and look up each new position the ball occupies? You can’t. The calculation has to be done in real time. There is no other way. And we’re still only talking about two axis.
First, let me say that I know some stuff but I don’t necessarily know your stuff. I’m just trying to grasp what you’re laying out.
Kicking the ball introduces a certain randomness that I hadn’t considered to be part of the exercise.
Please go on.
The entire exercise is to show the complexity of the system. Yes, you could have a look up table for a simple move. No, no machine makes simple moves. This is in two axis alone. Imagine what happens when you get to 36.
Like this??
https://www.youtube.com/watch?v=Mg06Mvj78PU
Lol. Yeah, seen a lot of that.
that you tube makes much happier about the chances of my robotic overlords doing away with my job.
Hee hee.
When you said, “This is in two axis alone. Imagine what happens when you get to 36.” what was that supposed to say? I’ve never heard of 36 axes. I think 6 was the most I ever heard of.
And not to sound too dense, but I still don’t see what the big deal is. The days that MarkD was referring to where floating point expanded minutes of run time to hours are long gone. Today, you can buy a computer that does hundreds of billions of FLOPs for less than $200. The Jetson TK1 development board looks sorta like a Raspberry Pi, but is a massively parallel computer. The Amazon description refers to its NVIDIA Kepler chip as having “192 CUDA Cores”. A CUDA core is a graphics processor which is a floating point processor like your old math coprocessors. That’s right, 192 floating point processors, capable of 326 GigaFLOPS (Billion Floating Point Operations Per second). For under $200. And that’s essentially obsolete. There are replacements that claim to get you to a TeraFLOP. (Trillion FLOPs)
These approximations you’re talking about don’t seem to need to be calculated on the fly. This is what I meant by compiling code once for a part number instead of G-Code, which would give the speed improvements of C over BASIC. The parts don’t change geometry every time you put one on the machine. I don’t see an equivalent of somebody “kicking the ball”, which I see as changing the part.
Then there’s the fact that you’re calculating positions to 15 decimal places yet your hardware isn’t capable of that much accuracy and you just truncate numbers. Your cutter is deflecting and fluttering on a scale of millionths of an inch.
I’m a control loop designer. For much of my career, I designed analog feedback loops that self-corrected hundreds of thousands or millions of times per second. For that kind of speed, the delay getting through digital pipelines was significant and we’d use analog electronics for the lower delays.
On the other hand, I await education because I’m also old enough to know, “nothing is impossible for he who doesn’t have to do it”.
Indeed. How often do those high processing power handheld computers hiccup? Now let me tell you how often you see an industrial cnc computer bluescreen: never. All that cheap processing power youre talking about? Flaky. Industrially hardened processing power is expensive. You may be able to get a super powerful handheld computer for the price of a fine suit, but a cnc-just the control-costs as much as a good car. Yes i know you can make one in your garage, but not if you plan on running production. You have to have mechanical stability, mechanical accuracy, electronic stability,high reliability, and bulletproof capability to even begin making the first part. And big multi axis cnc has all that.
Some Fanuc controls used to be capable of 36 coordinated axis, that was in the 90’s, i dont know what theyre up to now. Most i ever saw was 30.
There are controls that will compile code for a part number and run it. In the industry we call these things “broken”. When you have a couple of million lines of g code, how much memory do you need to hold that compiled program? Oh, and memory is cheap, right? Not for cnc. Until fairly recently, 300k (yes, k) cost about $6000.