aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/multimeter/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'qolab/hardware/multimeter/__init__.py')
-rw-r--r--qolab/hardware/multimeter/__init__.py63
1 files changed, 34 insertions, 29 deletions
diff --git a/qolab/hardware/multimeter/__init__.py b/qolab/hardware/multimeter/__init__.py
index 34a7a74..f1698b6 100644
--- a/qolab/hardware/multimeter/__init__.py
+++ b/qolab/hardware/multimeter/__init__.py
@@ -1,6 +1,7 @@
from qolab.hardware.scpi import SCPIinstr
from qolab.hardware.basic import BasicInstrument
+
class Multimeter(BasicInstrument):
"""
Multimeter basic class.
@@ -9,53 +10,58 @@ class Multimeter(BasicInstrument):
"""
def __init__(self, *args, **kwds):
BasicInstrument.__init__(self, *args, **kwds)
- self.config['Device type']='Multimeter'
- self.config['Device model'] = 'Generic Multimeter generator Without Hardware interface'
- self.config['FnamePrefix'] = 'Multimeter'
- self.config['Device model'] = 'Generic Multimeter Without Hardware interface'
- self.config['FnamePrefix'] = 'multimeter'
+ self.config["Device type"] = "Multimeter"
+ self.config[
+ "Device model"
+ ] = "Generic Multimeter generator Without Hardware interface"
+ self.config["FnamePrefix"] = "Multimeter"
+ self.config["Device model"] = "Generic Multimeter Without Hardware interface"
+ self.config["FnamePrefix"] = "multimeter"
self.deviceProperties.update({})
# Minimal set of methods to be implemented.
def getVdc(self):
- """ Report DC Voltage """
- print('getVdc is not implemented')
+ """Report DC Voltage"""
+ print("getVdc is not implemented")
return None
+
def getVac(self):
- """ Report AC Voltage """
- print('getVac is not implemented')
+ """Report AC Voltage"""
+ print("getVac is not implemented")
return None
+
def getAdc(self):
- """ Report DC Current """
- print('getAdc is not implemented')
+ """Report DC Current"""
+ print("getAdc is not implemented")
return None
+
def getAac(self):
- """ Report AC Current """
- print('getAac is not implemented')
+ """Report AC Current"""
+ print("getAac is not implemented")
return None
+
def getResistance(self):
- """ Report Resistance """
- print('getResistance is not implemented')
+ """Report Resistance"""
+ print("getResistance is not implemented")
return None
+
def getResistance4Wires(self):
- """ Report Resistance with 4 wire method """
- print('getResistance4Wires is not implemented')
+ """Report Resistance with 4 wire method"""
+ print("getResistance4Wires is not implemented")
return None
+
def getDiode(self):
- """ Report Diode Voltage drop """
- print('getDiode is not implemented')
+ """Report Diode Voltage drop"""
+ print("getDiode is not implemented")
return None
+
def getFreq(self):
- """ Report Frequency """
- print('getFreq is not implemented')
+ """Report Frequency"""
+ print("getFreq is not implemented")
return None
class MultimeterSCPI(SCPIinstr, Multimeter):
- """
- Do not instantiate directly, use
- rm = pyvisa.ResourceManager()
- MultimeterSCPI(rm.open_resource('TCPIP::192.168.0.2::INSTR'))
"""
SCPI enabled basic multimeter.
@@ -68,13 +74,12 @@ class MultimeterSCPI(SCPIinstr, Multimeter):
"""
pass
+
def __init__(self, resource, *args, **kwds):
SCPIinstr.__init__(self, resource)
Multimeter.__init__(self, *args, **kwds)
- self.config['DeviceId'] = str.strip(self.idn)
+ self.config["DeviceId"] = str.strip(self.idn)
+
from .hp_34401 import HP_34401
from .bk_5491 import BK_5491
-
-
-