aboutsummaryrefslogtreecommitdiff
path: root/lockin.py
blob: 3fc157b0ab94d924763b2acd9cb41107ef4c72be (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
"""
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)