update SR_7270
This commit is contained in:
parent
1c42859466
commit
587b170f6a
33
cfg/mb11.cfg
33
cfg/mb11.cfg
@ -1,76 +1,69 @@
|
||||
[node mb11.psi.ch]
|
||||
description = mb11 over SEA
|
||||
|
||||
[interface tcp]
|
||||
type = tcp
|
||||
bindport = 5002
|
||||
|
||||
[module seaconn]
|
||||
[seaconn]
|
||||
class = secop_psi.sea.SeaClient
|
||||
description = a SEA connection
|
||||
uri = tcp://localhost:8645
|
||||
# uri will be automatic
|
||||
|
||||
[module ts]
|
||||
[ts]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = ts.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module tvs]
|
||||
[tvs]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = tvs.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module tvd]
|
||||
[tvd]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = tvd.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module pstat]
|
||||
[pstat]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = pstat.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module pdyn]
|
||||
[pdyn]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = pdyn.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module tneck1]
|
||||
[tneck1]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = tneck1.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module tneck2]
|
||||
[tneck2]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = tneck2.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module tnvs]
|
||||
[tnvs]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = tnvs.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module tnvd]
|
||||
[tnvd]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = tnvd.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module mf]
|
||||
[mf]
|
||||
class = secop_psi.sea.SeaDrivable
|
||||
iodev = seaconn
|
||||
json_descr = mf.mb11.config
|
||||
remote_paths = .
|
||||
|
||||
[module tcoil]
|
||||
[tcoil]
|
||||
class = secop_psi.sea.SeaReadable
|
||||
iodev = seaconn
|
||||
json_descr = tcoil.mb11.config
|
||||
|
@ -20,8 +20,8 @@
|
||||
# *****************************************************************************
|
||||
"""SIGNAL RECOVERY SR7270: lOCKIN AMPLIFIER FOR AC SUSCEPTIBILITY"""
|
||||
|
||||
from secop.core import Readable, Parameter, Override, FloatRange, TupleOf, HasIodev, StringIO, \
|
||||
Done, Attached, IntRange, BoolType
|
||||
from secop.core import Readable, Parameter, Override, Command, FloatRange, TupleOf, \
|
||||
HasIodev, StringIO, Done, Attached, IntRange, BoolType
|
||||
|
||||
|
||||
class SR7270(StringIO):
|
||||
@ -35,31 +35,33 @@ class SR7270(StringIO):
|
||||
|
||||
|
||||
|
||||
class XY(HasIodev, Readable):
|
||||
class XY(HasIodev, Readable):
|
||||
properties = {
|
||||
'x': Attached(),
|
||||
'y': Attached(),
|
||||
'freq_arg': Attached(),
|
||||
'amp_arg': Attached(),
|
||||
'tc_arg': Attached(),
|
||||
}
|
||||
}#parameters required an initial value but initwrite write the default value for polled parameters
|
||||
parameters = {
|
||||
'value': Override('X, Y', datatype=TupleOf(FloatRange(unit='V'), FloatRange(unit='V'))),
|
||||
'freq': Parameter('exc_freq_int',
|
||||
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',
|
||||
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),
|
||||
'irange': Parameter('sensitivity index', IntRange(0,27), poll=True, readonly=False, default=25),
|
||||
'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),
|
||||
'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),
|
||||
'aphase': Parameter('autophase',BoolType(), readonly=False, default=0),
|
||||
# FloatRange(0.00,5e6,unit='uVrms'),
|
||||
# poll=True, readonly=False, default=100),
|
||||
'phase': Parameter('Reference phase control', FloatRange(-360,360,unit='deg'), poll=True, readonly=False, initwrite=True, default=0),
|
||||
'vmode' : Parameter('Voltage input configuration', IntRange(0,3), readonly=False, default=3),
|
||||
}
|
||||
commands = {
|
||||
'aphase': Command('auto phase'),
|
||||
}
|
||||
iodevClass = SR7270
|
||||
|
||||
@ -82,6 +84,7 @@ class XY(HasIodev, Readable):
|
||||
self.write_irange(self.irange-1)
|
||||
self._x.value = x # to update X,Y classes which will be the collected data.
|
||||
self._y.value = y
|
||||
# print(x,y)
|
||||
self._freq_arg.value = self.freq
|
||||
self._amp_arg.value = self.amp
|
||||
self._tc_arg.value =self.tc
|
||||
@ -151,22 +154,43 @@ class XY(HasIodev, Readable):
|
||||
|
||||
return reply
|
||||
|
||||
#autophase
|
||||
def read_aphase(self):
|
||||
reply = self.comm('AQN')
|
||||
|
||||
#phase and autophase
|
||||
|
||||
|
||||
def read_phase(self):
|
||||
reply = self.comm('REFP.')
|
||||
|
||||
return reply
|
||||
|
||||
def write_aphase(self,value):
|
||||
self.comm('AQN')
|
||||
self.read_aphase()
|
||||
def write_phase(self,value):
|
||||
self.comm('REFP %d' % round(1000*value,0))
|
||||
self.read_phase()
|
||||
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):
|
||||
pollerClass = None
|
||||
parameters = {
|
||||
'value': Override(datatype=FloatRange(unit='V')),
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class arg(Readable):
|
||||
|
Loading…
x
Reference in New Issue
Block a user