An experimental device to alert pilots to potential mid-air collisions has performed well in its first tests aboard an airliner making scheduled flights, Federal Aviation Administration officials said yesterday. The devices are scheduled to begin going into service in the second half of 1984.

A Piedmont Airlines 727 jetliner carried the equipment during 150 hours of flight in November and December. Four times the device detected planes flying potentially dangerous courses and devised maneuvers intended to keep the 727 well apart from them.

Clyde Miller of the FAA stressed that an alarm does not necessarily signal a life-or-death threat, but it alerts the pilot to a potential hazard. FAA separation rules were not violated in any of the four incidents detected by the device, he said.

Pilots did not carry out the maneuvers recommended by the equipment, known as the Traffic Alert and Collision Avoidance System (TCAS), Miller said. The tests' purpose was to monitor the equipment's reaction to normal traffic.

Among the aircraft detected by the 727's equipment were an unidentified oncoming plane during a night approach to the Tampa, Fla., airport and an F15 fighter in the Norfolk area, officials said.

Congress, pilots and the aviation industry have debated for years the form that a collision warning system should take. Last June, attempting to close out the controversy, FAA chief J. Lynn Helms announced the selection of TCAS, which would operate independently of ground air traffic control.

Monday and yesterday, members of the aviation industry gathered at FAA headquarters in Washington for a conference on the system's development.

Use of TCAS would be voluntary. The sophisticated version carried on airliners would cost about $45,000. The device would monitor the positions of nearby planes, and plot their courses using an on-board computer. If a collision appeared possible, it would recommend a specific climb or descent course to the pilot. The pilot might also have a radar-like image of the other aircraft on a cockpit screen.

Smaller general aviation planes would carry a simpler version of TCAS, costing about $2,500. When in conflict with a TCAS-equipped airliner, the smaller plane's pilot would get evasion instructions on a screen. But if close to a plane with the simpler equipment, the pilot would get only a warning alarm and no instructions on what to do.

TCAS equipment is effective only if the "intruder" aircraft is equipped with a special air traffic control transmitter that broadcasts its altitude. All commercial airliners carry this equiment, but only about one-third of the 210,000 planes in the general aviation fleet do.

Planes flying into major airports or at altitudes over 12,500 feet are required to carry the equipment, however, and the threat of collision is greatest in these sectors, according to the FAA.