Commit 84ec7275a810a475cb777bfae4ea8a3a70f11f54
1 parent
c8a8ff0f66
Exists in
master
add \n
Showing 1 changed file with 2 additions and 1 deletions Inline Diff
instruments/Sym5125A.py
from abstract_instrument import abstract_instrument | 1 | 1 | from abstract_instrument import abstract_instrument | |
import telnetlib, time | 2 | 2 | import telnetlib, time | |
3 | 3 | |||
#============================================================================== | 4 | 4 | #============================================================================== | |
5 | 5 | |||
ALL_VAL_TYPE = ['phase'] | 6 | 6 | ALL_VAL_TYPE = ['phase'] | |
ALL_CHANNELS = ['1'] | 7 | 7 | ALL_CHANNELS = ['1'] | |
8 | 8 | |||
ADDRESS = "192.168.0.222" | 9 | 9 | ADDRESS = "192.168.0.222" | |
CONF_VAL_TYPE = ['phase'] | 10 | 10 | CONF_VAL_TYPE = ['phase'] | |
11 | 11 | |||
#============================================================================== | 12 | 12 | #============================================================================== | |
13 | 13 | |||
class Sym5125A(abstract_instrument): | 14 | 14 | class Sym5125A(abstract_instrument): | |
def __init__(self, channels, vtypes, address): | 15 | 15 | def __init__(self, channels, vtypes, address): | |
self.address = address | 16 | 16 | self.address = address | |
self.channels = channels | 17 | 17 | self.channels = channels | |
self.vtypes = vtypes | 18 | 18 | self.vtypes = vtypes | |
19 | 19 | |||
def model(self): | 20 | 20 | def model(self): | |
#self.send("*IDN?") | 21 | 21 | #self.send("*IDN?") | |
#return self.read() | 22 | 22 | #return self.read() | |
return "Sym5125A" | 23 | 23 | return "Sym5125A" | |
24 | 24 | |||
def connect(self): | 25 | 25 | def connect(self): | |
print('Connecting to device @%s...' %(self.address)) | 26 | 26 | print('Connecting to device @%s...' %(self.address)) | |
self.tn = telnetlib.Telnet(self.address, '1298') | 27 | 27 | self.tn = telnetlib.Telnet(self.address, '1298') | |
#time.sleep(1) | 28 | 28 | #time.sleep(1) | |
print(' --> Ok') | 29 | 29 | print(' --> Ok') | |
print(self.model()) | 30 | 30 | print(self.model()) | |
self.configure() | 31 | 31 | self.configure() | |
32 | 32 | |||
def configure(self): | 33 | 33 | def configure(self): | |
pass | 34 | 34 | pass | |
35 | 35 | |||
def getValue(self): | 36 | 36 | def getValue(self): |