Aerospace conglomerate Rockwell International Corp. took a giant step into the burgeoning field of factory automation today, announcing that it would acquire Allen-Bradley Co., a privately held maker of automation equipment, for $1.65 billion.

The move puts Rockwell directly into competition with such industrial giants as General Electric Co., General Motors Corp. and International Business Machines Corp. in the race to modernize America's factories through the use of robotics and other automation equipment. Allen-Bradley's main product is programmable controllers, the "brains" that run automated factories; it is considered the leader in this field.

"Our studies show that demand for highly automated factories of the future is accelerating," said Robert Anderson, chairman of Pittsburgh-based Rockwell. "Allen-Bradley will be a substantial new core business for Rockwell. Together with our telecommunications, avionics and semiconductor businesses, Allen-Bradley provides Rockwell a growing array of commercial businesses applying advanced electronics technologies."

Rockwell is perhaps best known for such aerospace projects as its B1B bomber and the space shuttle. But it recently has been expanding into other areas with a stated goal of doubling sales and earnings within five years. In the year ended Sept. 30, the company had sales of $9.3 billion and earnings of $496 million. Allen-Bradley had sales last year of $942 million and income of $40 million.

In acquiring Milwaukee-based Allen-Bradley, Rockwell edged out at least a dozen other contenders for the company, which had put itself up for sale last year. An earlier proposal for a leveraged buyout by Allen-Bradley's management had been pending, and on Tuesday West Germany's giant Siemens A. G. electronics conglomerate said it planned to make a bid for Allen-Bradley.

Top executives of Allen-Bradley said that though they had organized the leveraged buyout offer, they were happy with Rockwell's bid and would stay with the company after the sale, which is expected to be completed by the end of next month.