TOSHIBA IS getting what it deserves. In collusion with a smaller Norwegian firm, Kongsberg Vaapenfabrik, Toshiba Machine Co. deliberately violated Japanese law and international agreement by selling crucial technology to the Russians. The Senate has now responded by voting 92 to 5 to bar products of the parent Toshiba Corp. and Kongsberg from the United States for two to five years. For Toshiba, which annually sells several billion dollars worth of consumer goods and industrial electronics in this country, that's a stiff penalty. Excessive? Not really.

The Walker spy ring had signalled to the Soviets that the noisy propellers of their submarines were helping the NATO navies track them. To manufacture better propellers, the Soviets needed equipment superior to any they possessed. In 1982-3, they were able to buy four computer-guided milling machines from Toshiba; Kongsberg provided the software. In 1984 they got another four machines. Toshiba obtained the export licenses by falsifying the description of the equipment.

The U.S. government apparently learned of this breach last year, but it didn't become public knowledge until a couple of months ago. The Japanese are prosecuting Toshiba Machine and two of its officials, but to most of Congress that seemed an inadequate response to a crime that had greatly assisted the Soviets in a desperately serious competition over submarine design.

American export controllers over the years have repeatedly complained that the Japanese and many of the European governments give far less attention to enforcement than it requires. There's a longstanding American accusation that while the United States bears the enormous costs of defending the Pacific, the Japanese pursue their commercial advantages without restraint. The trade quarrel has heightened congressional exasperation with Japan on defense and strategic differences; the Senate voted the penalties against Toshiba and Kongberg as an amendment to the trade bill. (One addition to those penalties, the Helms amendment, should incidentally be dropped. Civil litigation for damages, against U.S. affiliates of offending foreign firms, is a bad way to enforce export rules.)

Japan can do two things to respond to American concern, and its government is already beginning to move on both. It needs to build up its tiny and underpowered export control apparatus and demonstrate that it is prepared to enforce its laws rigorously. Japanese-American cooperation in anti-submarine techniques can also be improved, and Prime Minister Nakasone has already pledged a greater effort there. The Toshiba incident has done real damage to the alliance, in both military and political terms. To repair it, Japan needs to show that it takes this lapse as seriously as the United States does.