python系列009 操作仪器优化
使用万用表读取电压,保证进一步精度
def read_voltage1(self):
while (True):
voltage_is1 = float(self.goal_dev.query("MEASURE:VOLTAGE:DC?"))
time.sleep(2)
voltage_is2 = float(self.goal_dev.query("MEASURE:VOLTAGE:DC?"))
if abs(voltage_is1-voltage_is2) < 0.0001:
break

浙公网安备 33010602011771号