Like a cat sizing up its cornered prey, the robot arm measured the distance to the metal block with its camera eye and then swiftly picked up the block.

Not as quick as a cat or even a pickpocket -- more like a human hand reaching for the first morning cup of coffee, although more steadily -- the arm probably still is the fastest, "smartest" robot of its kind.

Most robots have no trouble carrying out a prearranged task, but cannot react quickly to the unexpected.

This one can, however. As blocks are moved around on the table, the robot stops, takes a new sighting, then firmly seizes the blocks, one by one, in metallic fingers equipped with presure monitors.

The robot, the pride of the National Bureau of Standards, seems to be an unlikely attraction at that 79-year-old institution, which has spent most of that time providing basic measurement services in the United States. All time-keeping in the nation is based on the bureau's cesium-atom clock at Boulder, Colo., which strays a mere one millionth of a second a year; standard weights, measurements and temperatures are set at its Gaithersburg laboratories, and it determines the standard compositions of hundreds of manufactured products, from the octane ratings of gasoline to the chemical makeup of various steel alloys.

The bureau's first problems were providing a national standard to determine the exact volume of a quart and the distance of a foot.It now sets the standard dimensions in the microscope would of semiconductors. i

But the bureau also is putting more emphasis on the first word in its name than the last. From Ernest Ambler, the bureau's director, down into the ranks of scientists, computer specialists and technicians, the bureau is increasingly absorbed in the competition between the United States and Japan for supremacy in industrial technology.

One of the bureau's major projects is an attempt to perfect the use of robots and sophisticated computer controls in assembly lines and manufacturing processes, and its staff is prodded by the knowledge that the Japanese are headed in the same direction.

It isn't obvious at first how the tricks the bureau's robot arm performs will help Ford Motor Co. build cars more quickly, cheaply and carefully than Toyota, for example, or how it will lower U.S. Steele's production costs.

The explanation begins with John Simpson, director of the Center for Manufacturing Engineering at the bureau.

The robot's speed results from its formidable silicon "brain," an array of microcomputers that permits the rapid processing of pictures taken by its TV-camera eye. A strobe light just below the robot's "wrist" flashes a narrow plane of light on an object in front of the robot, and by comparing shape and position of the reflection with images stored in its computer memory, the robot can deduce the distance and direction to the object.

"As far as we know, no other robot in the world can do that," Simpson said.

Robot welders used in the automible industry work only when the pieces being joined are properly positioned in front of the welder. A "smart" welder, able to detect slight errors in positioning and to adjust accordingly would be a major advance in technology, bureau officials say.

This is the challenge that currently holds back the use of robots in industry. Each movement must be controlled by a computer program, the bureau's James Albus explained, and in a factory, the robots' tasks become so complex that eventually the computer programmers are overwhelmed. The triumph of the bureau's robot is not merely its remarkable ability to react and change course, but also the ability of human programmers to break the work down into a series of steps and create computer programs that enable the robot to function, the bureau staff says.

They hope to produce a series of standard computer programs that can be used by any company that has tasks for "smart" robots.

Robots eventually will find a place along the automated manufacturing line of the future that bureau officials foresee.

In one corner of the bureau's Gaithersburg headquarters is a small machine shop where the staff is building matches, high-speed drums designed to punch perforations in sheets of postage stamps. More than 45 percent of the bureau's budget comes as assignments from other federal agencies, and this is an example. The Bureau of Engraving and Printing has been using a French-built perforator, but wanted one made in this country. It turned to the National Bureau of Standards.

What does that have to do with establishing uniform standards of measurement, the bureau's original mission fixed by Congress?

Simpson and his associate, Robert Hocken, explain: The oldest way to check for quality workmanship is to inspect the finished product, Simpson said. But a company connecting tiny silicon chips to create a computer assembly can't afford to check the microscopic components, and another firm producing expensive gears cannot tolerate a high error rate.

The answer is to perfect the manufacturing process to remove the chance of error, Simpson said, and that is a problem of measurement.

In the tool shop, Hocken points out a gleaming vertical drill for boring and milling that has been implanted with sensors and hooked to a computer like a patient in intensive care whose heart and respiration are monitored constantly.

A laser light beam helps align the machine to keep it exactly centered, while heat sensors deal with another problem. As the machine starts up, it generates heat -- enough to cause the cutting edge to drift a few thousandths of an inch, a potentially critical error in the production of the high-speed perforating drums whose pins and sockets must meet each other perfectly as the drums rotate.

Today, shops deal with this problem by letting machines warm up for an hour or more, to prevent drift. Better, said Simpson, to monitor the machine's performance exactly, with sensors that measure heat and vibration, and use this information to enable the machine to control its operation automatically.

"This is our first serious attempt to get a handle on the practicality of this," Simpson said.

If they work, the control techniques that bureau is developing could be used to make machines much more precise, Simpson said. "The real market lies in upgrading machines," he added.

"We want to build a miniature, experimental production line with American tools as a test bed and let others come in and see it. I'd like to see representatives from American industry crawling all over that shop," Ambler said. There currently are 105 outsider researchers working at the bureau, 28 from private industry and 77 from trade groups and government organizations.

"We'd like to bring measurement technology right into the processing itself," said John Lyon, director of the bureau's National Engineering Laboratory.

"It does look like we're developing a product," he said, but that isn't the point. "The way we look at it, the robot will ultimately be an integral part of an automated machine shop -- a robot feeding the machine tool.

"We're just picking up a head of steam in robotics," Lyons added, "but we're very carefully trying to decide what our role is."

Ambler says the bureau has been able to anticipate new demands on its research skills by the White House and Congress. Its work with robots and automation was a response to the growing concern over quality and productivity in American industry, he says.

But the arrival of a Reagan administration opposed to regulation and looking to eliminate low-priority subsidies to industry represents a tougher challenge.

A sizable part of the bureau's budget recently has been devoted to research on consumer and energy issues, reflecting the high priority these had in the Carter administration.

One laboratory dropped motorcycle and football helmets down a vertical slide to determine their strength. Another test measured the velocity of toy projectiles fired into a simulated human eyeball set in gelatin. Other tests rated the energy efficiency of kitchen appliances.

The Reagan administration's new budget directs the bureau to halt work on energy conservation and consumer product tecting, as part of a $884,000 budget reduction for the current 1981 fiscal year. A $2.1 million reduction is proposed for fiscal 1982, trimming the $128.8 million requested by the Carter administration.

However, 40 percent of the bureau's work is financed by other federal agencies, rather than direct congressional funding, and the agencies that have used the bureau the most -- the Environmental Protection Agency, the Department of Energy, and the Department of Housing and Urban Development -- are facing stiff budget cuts, too, that are certain to reduce their contracts with the bureau.

But if those agencies close their wallets, the Defense Department and others are likely to open theirs wider, as the new administration's research demands take shape. The bureau hasn't run out of things to measure.