Rolling-mill Oops
2023-3-29 03:0:0 Author: www.tbray.org(查看原文) 阅读量:23 收藏

The world being what it is, feels like a little humor is in order. Here’s a story from my misspent youth, when I was a co-op student at a steel mill and had a Very Bad Day.

This story was originally published as a Tweet thread in response to the following:

Tweet from @ElleArmageddo

That thread will probably go down with the Twitter ship and I’d like to save it, so here goes.

During the summer of 1980, my last before graduation, I had a co-op job at Dofasco, a steel mill in Hamilton, Ontario. It wasn’t great, the tasks were mostly make-work, although I kind of liked learning RSX-11M Plus running on PDP-11s. Sure, it was primitive by modern standards (I already knew V6 Unix) but it got the job — controlling the sampling apparatus in a basic-oxygen blast furnace — done.

So, there was this Rolling Mill that turned big thick non-uniform slabs of steel into smooth precise strips rolled onto a central core; this is the form in which steel is usually bought by people who make cars or refrigerators or whatever. The factory had lots of rolling mills but this one was special for some reason, was by itself in a big space away from the others. It was huge, the size of a couple of small trucks.

The problem was, it had started overheating and they didn’t know why. The specifications said the maximum amperage was 400A RMS, where “RMS” stands for Root Mean Square. The idea is you sample the current every so often and square the measurements and average the squares and take the square root of that. I believe I learned in college why this is a good idea.

Um, 400A is a whole lot of juice. Misapplied, it could turn a substantial chunk of the factory to smoking ashes.

The mill had an amperage data trap, to which they plugged in a HP “data recorder” with reel-to-reel tape that sampled every little while, and left it there for a whole 8-hour shift. Then they needed to compute the RMS.

Fortunately · They had a PDP-11/10, about the smallest 16-bit computer that DEC ever made, with something like 32K of memory. It was in a 6-foot-rack but only occupied two or three slots. It had a device you could plug the data recorder into and read the values off the tape out of an absolute memory address. And it had a FORTRAN compiler. It was running RT-11.

Who knew FORTRAN? Me, the snot-nosed hippie co-op student! So I wrote a program that read the data points, accumulated the sum of squares, and computed the RMS. I seem to recall it had some sort of screen editor and the experience wasn’t terrible. (I kind of wish I remember how you dereference an absolute memory address in FORTRAN, but I digress.) The readings were pretty variable, between 200 and 500, which the machine specs said was expected.

Anyhow, I ran the program, which took hours, since the data recorder only had one speed, in or out. The output showed that the RMS amperage started worryingly high but declined after a bit to well below 400A, presumably after the machine had warmed up. My supervisor looked at the arithmetic and it was right. The report went to the mill’s General Foreman, a God-like creature. So they told the machine operator not to worry.

Unfortunately · I had stored the sum of squares in a FORTRAN “REAL” variable, which in FORTRAN (at least that version) meant 32-bit floating point. Which has only 24 bits of precision.

Can you see the problem? 4002 is 160,000 and you don’t have to add up that many of those before it gets big enough that new values vanish into the rounding error and make no changes to the sum. And thus the average declines. So the RMS I reported was way low.

Fortunately · The mill operator was a grizzled old steel guy who could tell when several million bucks worth of molten-metal squisher was about to self-incinerate.

He slammed it off on instinct with a steel slab halfway through. It only cost a few shifts of downtime to remediate, which is to say many times my pathetic co-op salary for the whole summer.

At which point my boss and I had to go visit the General Foreman and explain what DOUBLE PRECISION was and why we hadn’t used it. It wasn’t fun. For some reason, they didn’t ask me to re-run the calculations with the corrected code.

You can’t possibly imagine how terrible I felt. I was worried that my boss might have taken career damage, but I heard on the grapevine that he was forgiven, but ribbed unmercifully for months.

And when I graduated they offered me a job. I went to work for DEC instead.



By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.

I’m on Mastodon!


文章来源: https://www.tbray.org/ongoing/When/202x/2023/03/28/Rolling-Mill
如有侵权请联系:admin#unsafe.sh