The federal government, which has invested $30 million in developing a system to detect diversion of weapons-usable plutonium from nuclear reprocessing plants, was told yesterday that an extra $2.8 million is needed by May 1 for a full test.

Dr. James A. Buckham, president of the Barnwell reprocessing plant in South Carolina, wrote Energy Secretary Donald P. Hodel that unless he is sent more federal funds, he intends to dismiss 40 of 290 workers May 1 and begin shutting down the controversial facility.

"Once the May 1 termination action is under way, we will be unable to conduct this demonstration" of the safeguards system, Buckham told Hodel.

The plant, which was 90 percent complete in 1977 when President Carter ordered an "indefinite deferral" of commercial reprocessing in this country, never has operated.

Congress has kept it alive by appropriating research and development funds totaling $78 million, and President Reagan has tried to get private industry to finish and operate the plant.

No private companies have agreed to take over the facility, although a consortium of utilities led by Bechtel and Westinghouse reportedly still is trying to work out a plan. Congress has barred federal funding of Barnwell after July 31.

The original owners of the plant, a consortium of Allied Co., Gulf, and Royal Dutch Shell, have declared they will not spend any more money on the facility and several weeks ago sued the federal government for $500 million, contending that Carter's action deprived them of their investment.

The plutonium accountancy system at Barnwell, which was developed with assistance of the government's national laboratories, has attracted a fair amount of international interest.

Deputy Assistant Secretary of State James Devine last month termed the planned test of the system "the only way" to answer a number of questions about how best to guarantee no plutonium is being diverted from the large plants that will be built in the future.

"We at the State Department hope moneys can be found to fund this important effort," Devine said.

Buckham said yesterday that even if the government puts up the additional funds, there no longer would be time for the 60-day test originally planned. "But we think we could get it done in 45 days," he said.

An Energy Department spokesman, however, said prospects of getting more money for Barnwell "don't look very promising."

"Secretary Hodel has said we plan to cap the amount spent at Barnwell this year at $10.6 million, and most of that already has been spent," spokesman Philip A. Garon said. "We basically have done all we can."

Buckham also expressed frustration at the pace of industry talks aimed at finding new private owners for Barnwell. "I think they don't truly believe our owners' statement that they won't put any more money in," he said. "But when research and development funds run out, we are just going to salvage what we can and shut it down and abandon it. In all likelihood, there will be dismantling occurring in the summer."