In a field where the sun once nourished corn, Solarex Corp. is getting ready to make solar cells the same way.

The Rockville-based maker of photovoltaic cells last week dedicated what it calls a "solar breeder" -- a $6 million facility that uses power from the sun to power machinery that will produce new cells. The plant's 27,000 square feet of manufacturing space is nearly matched by 25,000 square feet of solar cells mounted on the building's steeply pitched roof. Due to go into full production next year, the plant will employ 50 to 100 persons, company officials say.

Never mind that Solarex could make the cells more cheaply in a conventionally powered factory. Never mind that Solarex, after nine years in business, is experiencing growing pains that are causing it to lose money. Company officials believe that the plant here is a forerunner of a new kind of solar-powered factory -- and if you want one, Solarex wants to sell it to you.

"It's just like buying a prefabricated building, but this has the power attached to it already," says Solarex founder and President Joseph Lindmayer, exchanging his inventor's hat for that of a salesman.

The hoped-for entry into the prefabricated factory business is a new tack for a company that has been producing nothing larger than solar panels, products that found use with experimenters and hobbyists, and few others. Those efforts have given Solarex about 40 percent of the market for solar cells.

But company officials say the diversification is necessary: Solarex has determined that the best way to sell solar cells is to create its own market for them. If not, executives say, Solarex would find itself making more solar cells than it could find customers for.

"Transistors wouldn't be anywhere if someone hadn't pushed the computer," Lindmayer observed. "We have to get into the systems business ourselves... where we deliver the end need, rather than just the solar cells."

The breeder is one of two major Solarex manufacturing projects coming on stream in the next few months. The company is hoping to complete in January a facility in Martinsburg, W. Va., that will refine the silicon the company uses to make solar cells. Operations there will begin later next year. That plant, by the way, is conventionally powered.

The two projects come at a crucial time for Solarex. Despite infusions of capital from Standard Oil Co. of Indiana, which now owns about one-third of the company, Solarex began losing money last year. Although company officials don't like to reveal details of the closely held company's finances, sources say it posted a loss of more than $3 million in 1981, on sales of more than $20 million, and will lose more this year. "The company is losing money hand over first," says a source.

Solarex, however, is apparently not in danger of crashing like Icarus, the mythical flyer who fell victim to the sun when he flew too close and its rays melted the wax holding his wings together. The company just received an $8 million line of credit from Maryland National Bank, and if it had to, it could probably tap Indiana Standard's coffers again.

But if Solarex is to return to profitability and continue its history of doubling its sales annually, the breeder is probably going to have to live up to its name.

The key to the breeder is that huge array of solar cells that slopes 40 degrees on the south side of the building -- a glittering corporate symbol for those traveling by on state Rte. 15.

Solarex officials say the cells produce enough electricity to run the manufacturing operations within the building, as well as supplying light and heat and filling up the storage batteries that are to provide power on cloudy days. Indeed, on a miserably cold and rainy day last week, the building was well-lighted and warm on power from the batteries.

Solarex says the batteries will power the factory for a bit more than four straight days without sun; after that, they admit, they'll have to shut down until good weather returns. Even on a cloudy day, though, the solar cells can pick up enough sun energy to provide a bit of electricity. And on a too-sunny day, the plant will "dump sun" by using power to run secondary manufacturing operations or by simply leaving lights burning to use up unneeded power.

The building also uses a variety of newly refined insulation, control and engineering techniques designed to maximize its efficiency. "We have a lot of firsts," says Ray McFarlane, director of advanced facilities development for Solarex, who oversaw construction of the facility. "It was interesting to take each one of these disciplines and give them this challenge."

So confident are Solarex officials that their plan will work, the breeder has no connections to any electric utility. Everything, down to the street lights in the parking lot, is to operate off the solar cells or the batteries.

Inside the breeder, Solarex's manufacturing process will turn out solar electric cells like the ones on the roof, slicing waferthin pieces from blocks of silicon and machining them into individual cells, then assembling them into panels. Company officials expect that the plant will produce an amount of cells equivalent to the number on the roof every 28 days.

One problem: It's very expensive. Electricity from solar cells still costs about eight times as much as it does when bought from a utility, so the breeder is no bargain. "It's not an economic thing right now," concedes Lindmayer. "It would be easier to connect to the utility."

But Solarex hopes that the largescale production of cells made possible by the new plant will eventually bring costs down to a point where they are competitive. And while the high cost of operating the factory might scare off some potential buyers, Solarex officials say the plant is economical where electricity is scarce or absent altogether -- so they're pushing overseas sales. "In many parts of the world, this would be economic now," Lindmayer says.

Although the company has no firm commitments to sell one of its solar factories, Solarex officials say they are negotiating two possible deals. Solarex also hopes to turn the 80-acre site here into a solar-powered industrial park, bringing in light industry and offices powered by the technology developed in the breeder project. But there are no firm customers for that offering, either. "We've had some serious discussions with several people, but we don't have anything signed on the botted line yet," says Hal Macomber, director of major power systems for Solarex.

Solarex executives think that they'll be better able to sell the solar factory concept now that they've got one in operation. "It's a test-bed for the technology, it's a demonstration of the use of the technology for all sorts of applications," Macomber says.

"I think nothing convinces people more than a working system," Lindmayer says.