diff options
-rw-r--r-- | lockin.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -12,13 +12,14 @@ class SCPIinstr: SCPIinstr(rm.open_resource('TCPIP::192.168.0.2::INSTR')) """ def __init__(self, resource): + print(resource) self.resource = resource # convenience pyvisa functions self.write = self.resource.write self.read = self.resource.read self.query = self.resource.query - self.query_values = self.resource.query_values + #self.query_values = self.resource.query_values @property def idn(self): @@ -68,7 +69,8 @@ class LockIn(SCPIinstr): LockIn(rm.open_resource('TCPIP::192.168.0.2::INSTR')) """ def __init__(self, resource): - super().__init__(self, resource) + super().__init__(resource) + self.resource.read_termination='\n' if __name__ == '__main__': @@ -79,5 +81,7 @@ if __name__ == '__main__': lckn = LockIn(instr) # lckn = LockIn(rm, 'TCPIP::192.168.0.51::INSTR') print(lckn.query('*idn?')) + print(lckn.idn) + |