Ejemplo n.º 1
0
	def SetupHW(self):
		cmd_map     =   {'Ohm':'R','ohm':'R',
				'Vol':'U','vol':'U',
				'Amp':'I','amp':'I',
				}

		#根据单位设置RUI
		unit = self.eut.GetYunit()
		sw_cmd = "adc:swt:%s:"%(cmd_map[unit[:3]])
		print sw_cmd
		self.cmd_queue.put(sw_cmd)
		time.sleep(0.01)

		#根据range_设置PGA
		range_ = self.eut.GetRange()
		r_code,a_code =  gPGA.find_solution(range_,unit)
		pga_cmd = "adc:pga:r:%d:a:%d"%(r_code,a_code)
		print pga_cmd
		self.cmd_queue.put(pga_cmd)
		time.sleep(0.01)