diff --git a/secop_psi/dpm.py b/secop_psi/dpm.py index 70e32be..e8c7de4 100644 --- a/secop_psi/dpm.py +++ b/secop_psi/dpm.py @@ -85,7 +85,7 @@ class DPM3(HasIO, Readable): else: cmd = "" cmd = cmd + '*1G3%02X' % adr - hexvalue = self._iodev.communicate(cmd) + hexvalue = self.communicate(cmd) if adr == self.SCALE: mag = self.MAGNITUDE[hexvalue[0:1]] value = int(hexvalue[1:], 16) @@ -95,7 +95,7 @@ class DPM3(HasIO, Readable): def write_digits(self, value): # value defines the number of digits - back_value = self._iodev.communicate('*1F135%02X\r*1G135' % (value + 1)) + back_value = self.communicate('*1F135%02X\r*1G135' % (value + 1)) self.digits = int(back_value, 16) - 1 # recalculate proper scale and offset self.write_scale_factor(self.scale_factor) @@ -103,11 +103,11 @@ class DPM3(HasIO, Readable): return Done def read_digits(self): - back_value = self._iodev.communicate('*1G135') + back_value = self.communicate('*1G135') return int(back_value,16) - 1 def read_value(self): - return float(self._iodev.communicate('*1B1')) + return float(self.communicate('*1B1')) def read_offset(self): reply = self.query(self.OFFSET) diff --git a/secop_psi/ls340res.py b/secop_psi/ls340res.py index 5709f34..d1a5c7c 100644 --- a/secop_psi/ls340res.py +++ b/secop_psi/ls340res.py @@ -24,7 +24,7 @@ import time from secop.datatypes import StringType, FloatRange from secop.modules import Parameter, Property, Readable -from secop.io import HasIodev, StringIO +from secop.io import HasIO, StringIO class LscIO(StringIO): @@ -33,13 +33,13 @@ class LscIO(StringIO): wait_before = 0.05 -class ResChannel(HasIodev, Readable): +class ResChannel(HasIO, Readable): """temperature channel on Lakeshore 340""" - iodevClass = LscIO + ioClass = LscIO value = Parameter(datatype=FloatRange(unit='Ohm')) channel = Property('the channel A,B,C or D', StringType()) def read_value(self): - return float(self._iodev.communicate('SRDG?%s' % self.channel)) + return float(self.communicate('SRDG?%s' % self.channel)) diff --git a/secop_psi/uniax.py b/secop_psi/uniax.py index cc3ff5c..22443be 100644 --- a/secop_psi/uniax.py +++ b/secop_psi/uniax.py @@ -71,6 +71,7 @@ class Uniax(PersistentMixin, Drivable): _find_target = 0 def earlyInit(self): + super().earlyInit() self._zero_pos_tol = {} self._action = self.idle