Based on the characteristic change in resistance of superconducting devices during the superconducting transition, a quantitative method to determine the temperature of superconducting devices has been proposed. This method can detect in real time whether the temperature of the superconducting device exceeds the superconducting transition temperature, thereby enabling quick elimination of the trapped magnetic flux in devices. We apply this method in our experiment, which uses a superconducting 22 subarrays programmable Josephson voltage standard (PJVS) device and obtains satisfactory results. We conclude that this method can efficiently eliminate the tapped magnetic flux in superconducting device testing systems that do not possess thermometers and facilitate testing.