blob: 34a7a74bd02f4c0811224f9f3bcd8de5f3bea1d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
from qolab.hardware.scpi import SCPIinstr
from qolab.hardware.basic import BasicInstrument
class Multimeter(BasicInstrument):
"""
Multimeter basic class.
Intended to be part of the hardware aware class.
"""
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.deviceProperties.update({})
# Minimal set of methods to be implemented.
def getVdc(self):
""" Report DC Voltage """
print('getVdc is not implemented')
return None
def getVac(self):
""" Report AC Voltage """
print('getVac is not implemented')
return None
def getAdc(self):
""" Report DC Current """
print('getAdc is not implemented')
return None
def getAac(self):
""" Report AC Current """
print('getAac is not implemented')
return None
def getResistance(self):
""" Report Resistance """
print('getResistance is not implemented')
return None
def getResistance4Wires(self):
""" 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')
return None
def getFreq(self):
""" 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.
Intended to be part of the hardware aware class.
Example
-------
>>> rm = pyvisa.ResourceManager()
>>> MultimeterSCPI(rm.open_resource('TCPIP::192.168.0.2::INSTR'))
"""
pass
def __init__(self, resource, *args, **kwds):
SCPIinstr.__init__(self, resource)
Multimeter.__init__(self, *args, **kwds)
self.config['DeviceId'] = str.strip(self.idn)
from .hp_34401 import HP_34401
from .bk_5491 import BK_5491
|