agilenttmc.py
30 lines
| 732 B
| text/x-python
|
PythonLexer
/ lppinstru / agilenttmc.py
|
r1 | #!/usr/bin/env python | ||
#-*- coding: utf-8 -*- | ||||
"""Common Agilent USB-TMC/SCPI traits. | ||||
""" | ||||
import time | ||||
import sys | ||||
import os | ||||
import usbtmc | ||||
__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 AgilentUsbTmc(usbtmc.UsbTmc): | ||||
def __init__(self,ref,serial=""): | ||||
isnt=usbtmc.findInstrument(ref,serial) | ||||
if inst=="": | ||||
raise UserWarning("Can't find instrument "+ref) | ||||
self.UsbTmc.__init__(isnt) | ||||
|
r2 | |||
def abort(self): | ||||
self.write("ABORt") | ||||
def reset(self): | ||||
self.write("*RST") | ||||