update SR_7270
This commit is contained in:
33
cfg/mb11.cfg
33
cfg/mb11.cfg
@ -1,76 +1,69 @@
|
|||||||
[node mb11.psi.ch]
|
[seaconn]
|
||||||
description = mb11 over SEA
|
|
||||||
|
|
||||||
[interface tcp]
|
|
||||||
type = tcp
|
|
||||||
bindport = 5002
|
|
||||||
|
|
||||||
[module seaconn]
|
|
||||||
class = secop_psi.sea.SeaClient
|
class = secop_psi.sea.SeaClient
|
||||||
description = a SEA connection
|
description = a SEA connection
|
||||||
uri = tcp://localhost:8645
|
# uri will be automatic
|
||||||
|
|
||||||
[module ts]
|
[ts]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = ts.mb11.config
|
json_descr = ts.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module tvs]
|
[tvs]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = tvs.mb11.config
|
json_descr = tvs.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module tvd]
|
[tvd]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = tvd.mb11.config
|
json_descr = tvd.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module pstat]
|
[pstat]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = pstat.mb11.config
|
json_descr = pstat.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module pdyn]
|
[pdyn]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = pdyn.mb11.config
|
json_descr = pdyn.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module tneck1]
|
[tneck1]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = tneck1.mb11.config
|
json_descr = tneck1.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module tneck2]
|
[tneck2]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = tneck2.mb11.config
|
json_descr = tneck2.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module tnvs]
|
[tnvs]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = tnvs.mb11.config
|
json_descr = tnvs.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module tnvd]
|
[tnvd]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = tnvd.mb11.config
|
json_descr = tnvd.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module mf]
|
[mf]
|
||||||
class = secop_psi.sea.SeaDrivable
|
class = secop_psi.sea.SeaDrivable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = mf.mb11.config
|
json_descr = mf.mb11.config
|
||||||
remote_paths = .
|
remote_paths = .
|
||||||
|
|
||||||
[module tcoil]
|
[tcoil]
|
||||||
class = secop_psi.sea.SeaReadable
|
class = secop_psi.sea.SeaReadable
|
||||||
iodev = seaconn
|
iodev = seaconn
|
||||||
json_descr = tcoil.mb11.config
|
json_descr = tcoil.mb11.config
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
# *****************************************************************************
|
# *****************************************************************************
|
||||||
"""SIGNAL RECOVERY SR7270: lOCKIN AMPLIFIER FOR AC SUSCEPTIBILITY"""
|
"""SIGNAL RECOVERY SR7270: lOCKIN AMPLIFIER FOR AC SUSCEPTIBILITY"""
|
||||||
|
|
||||||
from secop.core import Readable, Parameter, Override, FloatRange, TupleOf, HasIodev, StringIO, \
|
from secop.core import Readable, Parameter, Override, Command, FloatRange, TupleOf, \
|
||||||
Done, Attached, IntRange, BoolType
|
HasIodev, StringIO, Done, Attached, IntRange, BoolType
|
||||||
|
|
||||||
|
|
||||||
class SR7270(StringIO):
|
class SR7270(StringIO):
|
||||||
@ -42,24 +42,26 @@ class XY(HasIodev, Readable):
|
|||||||
'freq_arg': Attached(),
|
'freq_arg': Attached(),
|
||||||
'amp_arg': Attached(),
|
'amp_arg': Attached(),
|
||||||
'tc_arg': Attached(),
|
'tc_arg': Attached(),
|
||||||
}
|
}#parameters required an initial value but initwrite write the default value for polled parameters
|
||||||
parameters = {
|
parameters = {
|
||||||
'value': Override('X, Y', datatype=TupleOf(FloatRange(unit='V'), FloatRange(unit='V'))),
|
'value': Override('X, Y', datatype=TupleOf(FloatRange(unit='V'), FloatRange(unit='V'))),
|
||||||
'freq': Parameter('exc_freq_int',
|
'freq': Parameter('exc_freq_int',
|
||||||
FloatRange(0.001,250e3,unit='Hz'),
|
FloatRange(0.001,250e3,unit='Hz'),
|
||||||
poll=True, readonly=False, default=100),
|
poll=True, readonly=False, initwrite=True, default=1000),
|
||||||
'amp': Parameter('exc_volt_int',
|
'amp': Parameter('exc_volt_int',
|
||||||
FloatRange(0.00,5,unit='Vrms'),
|
FloatRange(0.00,5,unit='Vrms'),
|
||||||
poll=True, readonly=False, default=5),
|
poll=True, readonly=False, initwrite=True, default=1),
|
||||||
'range': Parameter('sensitivity value', FloatRange(0.00,1,unit='V'), poll=True, default=1),
|
'range': Parameter('sensitivity value', FloatRange(0.00,1,unit='V'), poll=True, default=1),
|
||||||
'irange': Parameter('sensitivity index', IntRange(0,27), poll=True, readonly=False, default=25),
|
'irange': Parameter('sensitivity index', IntRange(0,27), poll=True, readonly=False, default=25),
|
||||||
'autorange': Parameter('autorange_on', BoolType(), readonly=False, default=True),
|
'autorange': Parameter('autorange_on', BoolType(), readonly=False, default=True),
|
||||||
'tc': Parameter('time constant value', FloatRange(10e-6,1,unit='s'), poll=True, default=0.1),
|
'tc': Parameter('time constant value', FloatRange(10e-6,1,unit='s'), poll=True, default=0.1),
|
||||||
'itc': Parameter('time constant index', IntRange(0,30), poll=True, readonly=False, default=12),
|
'itc': Parameter('time constant index', IntRange(0,30), poll=True, readonly=False, initwrite=True, default=14),
|
||||||
'nm': Parameter ('noise mode',BoolType(), readonly=False, default=0),
|
'nm': Parameter ('noise mode',BoolType(), readonly=False, default=0),
|
||||||
'aphase': Parameter('autophase',BoolType(), readonly=False, default=0),
|
'phase': Parameter('Reference phase control', FloatRange(-360,360,unit='deg'), poll=True, readonly=False, initwrite=True, default=0),
|
||||||
# FloatRange(0.00,5e6,unit='uVrms'),
|
'vmode' : Parameter('Voltage input configuration', IntRange(0,3), readonly=False, default=3),
|
||||||
# poll=True, readonly=False, default=100),
|
}
|
||||||
|
commands = {
|
||||||
|
'aphase': Command('auto phase'),
|
||||||
}
|
}
|
||||||
iodevClass = SR7270
|
iodevClass = SR7270
|
||||||
|
|
||||||
@ -82,6 +84,7 @@ class XY(HasIodev, Readable):
|
|||||||
self.write_irange(self.irange-1)
|
self.write_irange(self.irange-1)
|
||||||
self._x.value = x # to update X,Y classes which will be the collected data.
|
self._x.value = x # to update X,Y classes which will be the collected data.
|
||||||
self._y.value = y
|
self._y.value = y
|
||||||
|
# print(x,y)
|
||||||
self._freq_arg.value = self.freq
|
self._freq_arg.value = self.freq
|
||||||
self._amp_arg.value = self.amp
|
self._amp_arg.value = self.amp
|
||||||
self._tc_arg.value =self.tc
|
self._tc_arg.value =self.tc
|
||||||
@ -151,17 +154,36 @@ class XY(HasIodev, Readable):
|
|||||||
|
|
||||||
return reply
|
return reply
|
||||||
|
|
||||||
#autophase
|
#phase and autophase
|
||||||
def read_aphase(self):
|
|
||||||
reply = self.comm('AQN')
|
|
||||||
|
def read_phase(self):
|
||||||
|
reply = self.comm('REFP.')
|
||||||
|
|
||||||
return reply
|
return reply
|
||||||
|
|
||||||
def write_aphase(self,value):
|
def write_phase(self,value):
|
||||||
self.comm('AQN')
|
self.comm('REFP %d' % round(1000*value,0))
|
||||||
self.read_aphase()
|
self.read_phase()
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
def do_aphase(self):
|
||||||
|
self.read_phase()
|
||||||
|
reply = self.comm('AQN')
|
||||||
|
self.read_phase()
|
||||||
|
|
||||||
|
#voltage input configuration 0:grounded,1=A,2=B,3=A-B
|
||||||
|
# def read_vmode(self):
|
||||||
|
# reply = self.comm('VMODE')
|
||||||
|
# return reply
|
||||||
|
|
||||||
|
def write_vmode(self,value):
|
||||||
|
self.comm('VMODE %d' % value)
|
||||||
|
# self.read_vmode()
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
class Comp(Readable):
|
class Comp(Readable):
|
||||||
pollerClass = None
|
pollerClass = None
|
||||||
parameters = {
|
parameters = {
|
||||||
@ -169,6 +191,8 @@ class Comp(Readable):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class arg(Readable):
|
class arg(Readable):
|
||||||
pollerClass = None
|
pollerClass = None
|
||||||
parameters = {
|
parameters = {
|
||||||
|
Reference in New Issue
Block a user