From 3a0af875bd51383600f4ec1f7cfef3cffee80299 Mon Sep 17 00:00:00 2001 From: mer0m Date: Wed, 8 Mar 2017 15:24:53 +0100 Subject: [PATCH] add Symmetricom 5125A phase support --- instruments/Sym5125A.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 instruments/Sym5125A.py 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 -- 2.16.4