Skip to content

Commit

Permalink
Add TTI 1705 & HP 8116
Browse files Browse the repository at this point in the history
NVRS add calibration data and sensor HW ID
  • Loading branch information
DavidLutton authored Mar 19, 2024
1 parent fbd6a87 commit 6939d43
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 3 deletions.
17 changes: 17 additions & 0 deletions src/labtoolkit/DigitalMultimeter/TTI1705.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from ..IEEE488 import IEEE488


class TTI1705(IEEE488):
"""TTI 1705."""

def __post__(self):
self.inst.read_termination = '\r\n'

@property
def reading(self):
"""."""
read = self.query_float('READ?')
if 'OVLOAD' in read:
return read
else:
return float(read[0:10]), read[10:].strip()
22 changes: 21 additions & 1 deletion src/labtoolkit/PowerMeter/RohdeSchwarzNRVS.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,25 @@ def frequency(self, frequency):
@property
def amplitude(self):
"""."""
# ' DBM 6.94910E+00'
# ' DBM 6.94910E+00' with N0 headers on
return self.query_float('X3')

@property
def calibration_data(self):
self.write('SI')
return [self.inst.read().strip() for i in range(1,32)]

@property
def calibration_dates(self):
self.write('S4')
return [self.inst.read().strip() for i in range(1,6)]

@property
def sensor(self):
# 'NRV-Z5 / nnnnnnnn/nnnnn.nn.nn 3X'
return self.query('SP')

@property
def setup(self):
# 'A0,AV09,B1,G1,KA0,KF1,M0,N1,O1,Q0,RG0,RS3,SC1,U 1,W5'
return self.query('ST')
62 changes: 60 additions & 2 deletions src/labtoolkit/WaveformGenerator/HP8116A.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,70 @@
from ..Instrument import Instrument
from ..IEEE488 import IEEE488
from ..SCPI import SCPI


class HP8116A(Instrument):
"""HP 8116A, 0 to 50MHz.
.. figure:: images/WaveformGenerator/HP8116A.jpg
"""
"""."""

pass
# self.amps = [0.01, 7]
# self.freqs = [0, 50e6]

# ' NO MESSAGE' or ' SYNTAX' on inital or following comms

def __post__(self):
self.inst.read_termination = '\r\n'
self.inst.write_termination = '\r\n'

def state(self):
"""."""
print(f"Amplitude: {self.amplitude}")
print(f"Frequency: {self.frequency}")
print(f"Shape: {self.shape}")
# print(f"Load: {self.load}")
# print("Output: {}".format(self.output))

@property
def frequency(self):
"""."""
return self.query("IFRQ")

@frequency.setter
def frequency(self, frequency):
self.write(f"FRQ {frequency} Hz")

@property
def shape(self):
"""."""
# inst.query('W3') # 0, 1,2,3 DC, Sine, Tri, Square
return NotImplementedError # self.query("SOURce:FUNCtion:SHAPe?")

@shape.setter
def shape(self, shape="SIN"):
# self.write(f"SOURce:FUNCtion:SHAPe {shape}")
pass

@property
def amplitude(self):
return self.query("IAMP")

@amplitude.setter
# @AmplitudeLimiter
def amplitude(self, amplitude:
self.write(f"AMP {amplitude} V")

@property
def offset(self):
return self.query("IOFS")

@offset.setter
# @AmplitudeLimiter
def offset(self, amplitude:
self.write(f"OFS {amplitude} V")

@property
def setup(self):
# ' M1,CT0,T0,W0,H0,A0,L0,C0,D0,FRQ 55.0 HZ,DTY 50 %,WID 500 MS,AMP 1.00 V,OFS 7.50 V,'
return self.query('CST')
1 change: 1 addition & 0 deletions src/labtoolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ def IDN_for_HP(self, inst, resource, mapping, number):

['Hewlett Packard', '34401A', 'DigitalMultimeter', 'HP34401A'],
['Hewlett Packard', '3457A', 'DigitalMultimeter', 'HP3457A'],
['Thurlby Thandar', '1705', 'DigitalMultimeter', 'TTI1705'],

['Lumiloop', 'LSProbe', 'FieldStrength', 'LumiloopLSProbe'],
['Wandel Goltermann', 'EMC20', 'FieldStrength', 'WandelGoltermannEMC20'],
Expand Down

0 comments on commit 6939d43

Please sign in to comment.