diff --git a/instruments/Sym5125A.py b/instruments/Sym5125A.py new file mode 100644 index 0000000..a7b07f0 --- /dev/null +++ b/instruments/Sym5125A.py @@ -0,0 +1,46 @@ +from abstract_instrument import abstract_instrument +import telnetlib, time + +#============================================================================== + +ALL_VAL_TYPE = ['phase'] +ALL_CHANNELS = ['1'] + +ADDRESS = "192.168.0.222" +CONF_VAL_TYPE = ['phase'] + +#============================================================================== + +class Sym5125A(abstract_instrument): + def __init__(self, channels, vtypes, address): + self.address = address + self.channels = channels + self.vtypes = vtypes + + def model(self): + #self.send("*IDN?") + #return self.read() + return "Sym5125A" + + def connect(self): + print('Connecting to device @%s...' %(self.address)) + self.tn = telnetlib.Telnet(self.address, '1298') + #time.sleep(1) + print(' --> Ok') + print(self.model()) + self.configure() + + def configure(self): + pass + + def getValue(self): + return self.tn.read_until('\n').replace('\r\n','') + + def read(self): + pass + + def disconnect(self): + self.tn.close() + + def send(self, command): + pass