In the fall of 1981 a Soviet expert in robotics was set to visit Stanford University as the invited guest of the National Academy of Sciences. Before he arrived, however, the US Commerce Department informed Stanford officials that they would be responsible for monitoring the expert's visits to industries in the area, which includes the ''Silicon Valley,'' where a large number of high-technology firms are concentrated.
Stanford was also advised that the visitor could not even have general access to facilities at Stanford, where considerable unclassified, government-sponsored research takes place.
The university balked. It didn't want to be forced into policing its scholars , and the visit was canceled.
To what extent was the work at Stanford or in nearby industries vulnerable to exportation? Did the proposed visit increase such dangers? How was the university's role as a place for the open exchange of knowledge affected by the government's demands? And, given the generally held view that the Soviet Union was ahead of the United States in the field of robotics, were US interests served by cancellation of the visit?
The search for answers to such questions is the business of the Department of Defense-University Forum, a trouble-shooting group, which has recently been made a permanent advisory body to the Pentagon. A Defense Department task force recommended in 1981 that a university-defense group be set up, and initial discussions began in the spring of 1982.
The group brings together the presidents of several top American research universities and of various collegiate organizations with a handful of Pentagon officials.
The forum has helped calm growing tensions between the defense and university communities at a time of increasing concern over government efforts to limit the flow of information.
''As a result of the forum, a set of communications channels have been established that have allowed us to reduce the anxiety of the research community ,'' says Donald Kennedy, president of Stanford University. Dr. Kennedy, who cochairs the forum with Richard Delauer, undersecretary of defense for research and engineering, decribes the forum as a ''particularly effective venue'' for discussing the common concerns facing the defense and academic communities.
Kennedy notes that the prickly question of technology export control is just one of the issues the forum addresses. Also on the group's agenda are engineering and science education, and foreign language and regional studies.
Today more than half the students enrolled in US postgraduate engineering programs come from outside the United States. And there is concern that too few American students are going on to advanced studies in scientific disciplines.
University officials say they need more funding to pay for equipment and facilities and for instructors, if the US research effort is not to risk falling behind foreign efforts. University officials and the Pentagon agree that there is increasing demand for graduates specializing in foreign languages and regions.
But Robert Rosenzweig, president of the Association of American Universities, says, ''The chief motivating issue behind the forum's creation was the export-control controversy.''
At a time when Defense Department research again is becoming a major source of funding at universities - many of which have more foreign students than ever before - the Reagan administration wants the universities to play a larger role in controlling the export of technology.
''Our government increasingly believes that our opponents are gaining ground on our scientific community, not just through covert activity, but by simply buying scientific journals or attending open meetings and hearing papers read,'' Dr. Ro-senzweig adds.
Before the forum got rolling, several of its members believed the defense and university communities were headed for a period of high tension reminsecent of the post-Vietnam era. There was little hope that significant common ground could be found between the Defense Department goal of limiting the export of technology and university efforts to maintain an unfettered research environment.
These concerns have not disappeared, but there is now a feeling on both sides that real progress has been made toward mutual accommodation.
''I think what Defense is saying is that we don't want the country to shoot itself in the foot,'' says Edward Green of the Defense Department's research and lab management division. ''And I think we are slowly finding a middle ground where we can keep the other guy in the dark as much as possible, while harming ourselves as little as possible.''
C. Peter Magrath, president of the University of Minnesota, says the government's toughening line on technology exchanges could have meant a complete cutoff between American researchers and scholars elsewhere. ''I can say that my faculty members are very sensitive about freedom of research, and, if it had come to that, they would have wished no ties with federal research money.''
That was a prospect no president of a major research university could live with. Dr. Magrath credits the forum with reducing the level of tension between the two communities. ''We are certainly going in the direction of recognizing a need for as much freedom as possible.''
Dr. Magrath warns though, ''These are sticky issues we are addressing, and I'm convinced some pretty complicated and nettlesome questions are going to continue coming up.''
Whether or not the forum will help make confrontations like the one over the visit of the Soviet scholar less likely remains uncertain. The forum doesn't encompass such federal agencies as the Commerce Department, which told Stanford it had to watch the Russian's visits. There has been some talk of trying to involve other agencies.
In addition, several university representatives say they continue to have grave concern over recent Reagan administration initiatives to control the flow of information both into and out of the country. As one puts it, ''There seems to be a war going on within a number of federal agencies on these issues, and it doesn't look as though we (the universities) are winning.''