diff --git a/secop_psi/ppms.py b/secop_psi/ppms.py index c5172bd..5cbfe7f 100644 --- a/secop_psi/ppms.py +++ b/secop_psi/ppms.py @@ -73,7 +73,7 @@ class Main(Communicator): """ppms communicator module""" pollinterval = Parameter('poll interval', FloatRange(), readonly=False, default=2) - data = Parameter('internal', StringType(), poll=True, export=True, # export for test only + data = Parameter('internal', StringType(), poll=True, export=False, # export for test only default="", readonly=True) class_id = Property('Quantum Design class id', StringType(), export=False) @@ -89,6 +89,7 @@ class Main(Communicator): pollerClass = Poller def earlyInit(self): + super().earlyInit() self.modules = {} self._ppms_device = ppmshw.QDevice(self.class_id) self.lock = threading.Lock() @@ -99,8 +100,9 @@ class Main(Communicator): def communicate(self, command): """GPIB command""" with self.lock: + self.log.debug('> %s' % command) reply = self._ppms_device.send(command) - self.log.debug("%s|%s", command, reply) + self.log.debug('< %s' % reply) return reply def read_data(self): @@ -143,23 +145,9 @@ class PpmsMixin: pollinterval = Parameter('', FloatRange(), needscfg=False, export=False) def initModule(self): + super().initModule() self._iodev.register(self) - def startModule(self, started_callback): - # no polls except on main module - started_callback() - - def read_value(self): - # polling is done by the main module - # and PPMS does not deliver really more fresh values when polled more often - return Done - - def read_status(self): - # polling is done by the main module - # and PPMS does not deliver really fresh status values anyway: the status is not - # changed immediately after a target change! - return Done - def update_value_status(self, value, packed_status): # update value and status # to be reimplemented for modules looking at packed_status @@ -176,7 +164,7 @@ class PpmsMixin: class Channel(PpmsMixin, HasIodev, Readable): """channel base class""" - value = Parameter('main value of channels', poll=True) + value = Parameter('main value of channels', poll=False, needscfg=False) enabled = Parameter('is this channel used?', readonly=False, poll=False, datatype=BoolType(), default=False)