#!/usr/bin/env python #-*- coding: utf-8 -*- """Simple python library to communicate with Agilent 34410A over USB-TMC. """ import time import sys import os import agilenttmc __author__ = "Alexis Jeandet" __copyright__ = "Copyright 2015, Laboratory of Plasma Physics" __credits__ = [] __license__ = "GPLv2" __version__ = "1.0.0" __maintainer__ = "Alexis Jeandet" __email__ = "alexis.jeandet@member.fsf.org" __status__ = "Development" class Agilent3441xA(agilentusbtmc.AgilentUsbTmc): def __init__(self,serial=""): isnt=usbtmc.findInstrument("3441[0-1]A",serial) if inst=="": raise UserWarning("Can't find instrument "+ref) self.UsbTmc.__init__(isnt) def volts_dc(self): self.write("CONF:VOLT:DC\n READ?") volts=float(self.read(100)) def volts_ac(self): self.write("CONF:VOLT:AC\n READ?") volts=float(self.read(100))