""" provide basic class to operate Lock-in """ import pyvisa import scpi class LockIn(scpi.SCPIinstr): """ Do not instantiate directly, use rm = pyvisa.ResourceManager() LockIn(rm.open_resource('TCPIP::192.168.0.2::INSTR')) """ def __init__(self, resource): super().__init__(resource) self.resource.read_termination='\n' if __name__ == '__main__': print("testing") rm = pyvisa.ResourceManager() print(rm.list_resources()) instr=rm.open_resource('TCPIP::192.168.0.51::INSTR') lckn = LockIn(instr) print(lckn.idn)