add ioClass to many module classes
+ add converted mb11_cfg.py Change-Id: Ic985fc16b5ce39caacbf1f3abd87b13b1e7c2da7
This commit is contained in:
@@ -1,211 +1,195 @@
|
|||||||
Node('mb11.psi.ch',
|
# please edit this file with frappy edit
|
||||||
'MB11 11 Tesla - 100 mm cryomagnet',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('itc1',
|
doc="""MB11 11 Tesla - 100 mm cryomagnet
|
||||||
'frappy_psi.mercury.IO',
|
|
||||||
'ITC for heat exchanger and pressures',
|
|
||||||
uri='mb11-ts:3001',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('itc2',
|
after conversion with frappy edit
|
||||||
'frappy_psi.mercury.IO',
|
"""
|
||||||
'ITC for neck and nv heaters',
|
Node('mb11.psi.ch', doc,
|
||||||
uri='mb11-ts:3002',
|
interface='tcp://10767',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('ips',
|
IO('itc1', 'mb11-ts:3001')
|
||||||
'frappy_psi.mercury.IO',
|
|
||||||
'IPS for magnet and levels',
|
IO('itc2', 'mb11-ts:3002')
|
||||||
uri='mb11-ts:3003',
|
|
||||||
)
|
IO('ips', 'mb11-ts:3003')
|
||||||
|
|
||||||
Mod('T_stat',
|
Mod('T_stat',
|
||||||
'frappy_psi.mercury.TemperatureAutoFlow',
|
'frappy_psi.mercury.TemperatureAutoFlow',
|
||||||
'static heat exchanger temperature',
|
'static heat exchanger temperature',
|
||||||
meaning=['temperature_regulation', 27],
|
meaning = ('temperature_regulation', 27),
|
||||||
output_module='htr_stat',
|
output_module = 'htr_stat',
|
||||||
needle_valve='p_stat',
|
needle_valve = 'p_stat',
|
||||||
slot='DB6.T1',
|
slot = 'DB6.T1',
|
||||||
io='itc1',
|
io = 'itc1',
|
||||||
tolerance=0.1,
|
tolerance = 0.1,
|
||||||
flowpars=((1,5), (2, 20)),
|
flowpars = ((1, 5), (2, 20)),
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('htr_stat',
|
Mod('htr_stat',
|
||||||
'frappy_psi.mercury.HeaterOutput',
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
'static heat exchanger heater',
|
'static heat exchanger heater',
|
||||||
slot='DB1.H1',
|
slot = 'DB1.H1',
|
||||||
io='itc1',
|
io = 'itc1',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('p_stat',
|
Mod('p_stat',
|
||||||
'frappy_psi.mercury.PressureLoop',
|
'frappy_psi.mercury.PressureLoop',
|
||||||
'static needle valve pressure',
|
'static needle valve pressure',
|
||||||
output_module='pos_stat',
|
output_module = 'pos_stat',
|
||||||
settling_time=60.0,
|
settling_time = 60,
|
||||||
slot='DB5.P1',
|
slot = 'DB5.P1',
|
||||||
io='itc1',
|
io = 'itc1',
|
||||||
tolerance=1.0,
|
tolerance = 1,
|
||||||
value=Param(
|
value = Param(unit='mbar_flow'),
|
||||||
unit='mbar_flow',
|
)
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('pos_stat',
|
Mod('pos_stat',
|
||||||
'frappy_psi.mercury.ValvePos',
|
'frappy_psi.mercury.ValvePos',
|
||||||
'static needle valve position',
|
'static needle valve position',
|
||||||
slot='DB5.P1,DB3.G1',
|
slot = 'DB5.P1,DB3.G1',
|
||||||
io='itc1',
|
io = 'itc1',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('T_dyn',
|
Mod('T_dyn',
|
||||||
'frappy_psi.mercury.TemperatureAutoFlow',
|
'frappy_psi.mercury.TemperatureAutoFlow',
|
||||||
'dynamic heat exchanger temperature',
|
'dynamic heat exchanger temperature',
|
||||||
output_module='htr_dyn',
|
output_module = 'htr_dyn',
|
||||||
needle_valve='p_dyn',
|
needle_valve = 'p_dyn',
|
||||||
slot='DB7.T1',
|
slot = 'DB7.T1',
|
||||||
io='itc1',
|
io = 'itc1',
|
||||||
tolerance=0.1,
|
tolerance = 0.1,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('htr_dyn',
|
Mod('htr_dyn',
|
||||||
'frappy_psi.mercury.HeaterOutput',
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
'dynamic heat exchanger heater',
|
'dynamic heat exchanger heater',
|
||||||
slot='DB2.H1',
|
slot = 'DB2.H1',
|
||||||
io='itc1',
|
io = 'itc1',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('p_dyn',
|
Mod('p_dyn',
|
||||||
'frappy_psi.mercury.PressureLoop',
|
'frappy_psi.mercury.PressureLoop',
|
||||||
'dynamic needle valve pressure',
|
'dynamic needle valve pressure',
|
||||||
output_module='pos_dyn',
|
output_module = 'pos_dyn',
|
||||||
settling_time=60.0,
|
settling_time = 60,
|
||||||
slot='DB8.P1',
|
slot = 'DB8.P1',
|
||||||
io='itc1',
|
io = 'itc1',
|
||||||
tolerance=1.0,
|
tolerance = 1,
|
||||||
value=Param(
|
value = Param(unit='mbar_flow'),
|
||||||
unit='mbar_flow',
|
)
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('pos_dyn',
|
Mod('pos_dyn',
|
||||||
'frappy_psi.mercury.ValvePos',
|
'frappy_psi.mercury.ValvePos',
|
||||||
'dynamic needle valve position',
|
'dynamic needle valve position',
|
||||||
slot='DB8.P1,DB4.G1',
|
slot = 'DB8.P1,DB4.G1',
|
||||||
io='itc1',
|
io = 'itc1',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('mf',
|
Mod('mf',
|
||||||
'frappy_psi.ips_mercury.Field',
|
'frappy_psi.ips_mercury.Field',
|
||||||
'magnetic field',
|
'magnetic field',
|
||||||
slot='GRPZ',
|
slot = 'GRPZ',
|
||||||
io='ips',
|
io = 'ips',
|
||||||
tolerance=0.001,
|
tolerance = 0.001,
|
||||||
wait_stable_field=60.0,
|
wait_stable_field = 60,
|
||||||
target=Param(
|
target = Param(max=11),
|
||||||
max=11.0,
|
persistent_limit = 11.1,
|
||||||
),
|
)
|
||||||
persistent_limit=11.1,
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('lev',
|
Mod('lev',
|
||||||
'frappy_psi.mercury.HeLevel',
|
'frappy_psi.mercury.HeLevel',
|
||||||
'LHe level',
|
'LHe level',
|
||||||
slot='DB1.L1',
|
slot = 'DB1.L1',
|
||||||
io='ips',
|
io = 'ips',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('n2lev',
|
Mod('n2lev',
|
||||||
'frappy_psi.mercury.N2Level',
|
'frappy_psi.mercury.N2Level',
|
||||||
'LN2 level',
|
'LN2 level',
|
||||||
slot='DB1.L1',
|
slot = 'DB1.L1',
|
||||||
io='ips',
|
io = 'ips',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('T_neck1',
|
Mod('T_neck1',
|
||||||
'frappy_psi.mercury.TemperatureLoop',
|
'frappy_psi.mercury.TemperatureLoop',
|
||||||
'neck heater 1 temperature',
|
'neck heater 1 temperature',
|
||||||
output_module='htr_neck1',
|
output_module = 'htr_neck1',
|
||||||
slot='MB1.T1',
|
slot = 'MB1.T1',
|
||||||
io='itc2',
|
io = 'itc2',
|
||||||
tolerance=1.0,
|
tolerance = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('htr_neck1',
|
Mod('htr_neck1',
|
||||||
'frappy_psi.mercury.HeaterOutput',
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
'neck heater 1 power',
|
'neck heater 1 power',
|
||||||
slot='MB0.H1',
|
slot = 'MB0.H1',
|
||||||
io='itc2',
|
io = 'itc2',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('T_neck2',
|
Mod('T_neck2',
|
||||||
'frappy_psi.mercury.TemperatureLoop',
|
'frappy_psi.mercury.TemperatureLoop',
|
||||||
'neck heater 2 temperature',
|
'neck heater 2 temperature',
|
||||||
output_module='htr_neck2',
|
output_module = 'htr_neck2',
|
||||||
slot='DB6.T1',
|
slot = 'DB6.T1',
|
||||||
io='itc2',
|
io = 'itc2',
|
||||||
tolerance=1.0,
|
tolerance = 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('htr_neck2',
|
Mod('htr_neck2',
|
||||||
'frappy_psi.mercury.HeaterOutput',
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
'neck heater 2 power',
|
'neck heater 2 power',
|
||||||
slot='DB1.H1',
|
slot = 'DB1.H1',
|
||||||
io='itc2',
|
io = 'itc2',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('T_nvs',
|
Mod('T_nvs',
|
||||||
'frappy_psi.mercury.TemperatureLoop',
|
'frappy_psi.mercury.TemperatureLoop',
|
||||||
'static needle valve temperature',
|
'static needle valve temperature',
|
||||||
output_module='htr_nvs',
|
output_module = 'htr_nvs',
|
||||||
slot='DB7.T1',
|
slot = 'DB7.T1',
|
||||||
io='itc2',
|
io = 'itc2',
|
||||||
tolerance=0.1,
|
tolerance = 0.1,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('htr_nvs',
|
Mod('htr_nvs',
|
||||||
'frappy_psi.mercury.HeaterOutput',
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
'static needle valve heater power',
|
'static needle valve heater power',
|
||||||
slot='DB2.H1',
|
slot = 'DB2.H1',
|
||||||
io='itc2',
|
io = 'itc2',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('T_nvd',
|
Mod('T_nvd',
|
||||||
'frappy_psi.mercury.TemperatureLoop',
|
'frappy_psi.mercury.TemperatureLoop',
|
||||||
'dynamic needle valve heater temperature',
|
'dynamic needle valve heater temperature',
|
||||||
output_module='htr_nvd',
|
output_module = 'htr_nvd',
|
||||||
slot='DB8.T1',
|
slot = 'DB8.T1',
|
||||||
io='itc2',
|
io = 'itc2',
|
||||||
tolerance=0.1,
|
tolerance = 0.1,
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('htr_nvd',
|
Mod('htr_nvd',
|
||||||
'frappy_psi.mercury.HeaterOutput',
|
'frappy_psi.mercury.HeaterOutput',
|
||||||
'dynamic needle valve heater power',
|
'dynamic needle valve heater power',
|
||||||
slot='DB3.H1',
|
slot = 'DB3.H1',
|
||||||
io='itc2',
|
io = 'itc2',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('T_coil',
|
Mod('T_coil',
|
||||||
'frappy_psi.mercury.TemperatureSensor',
|
'frappy_psi.mercury.TemperatureSensor',
|
||||||
'coil temperature',
|
'coil temperature',
|
||||||
slot='MB1.T1',
|
slot = 'MB1.T1',
|
||||||
io='ips',
|
io = 'ips',
|
||||||
)
|
)
|
||||||
|
|
||||||
Mod('om_io',
|
IO('om_io', 'mb11-ts.psi.ch:3004')
|
||||||
'frappy_psi.phytron.PhytronIO',
|
|
||||||
'dom motor IO',
|
|
||||||
uri='mb11-ts.psi.ch:3004',
|
|
||||||
)
|
|
||||||
|
|
||||||
Mod('om',
|
Mod('om',
|
||||||
'frappy_psi.phytron.Motor',
|
'frappy_psi.phytron.Motor',
|
||||||
'stick rotation, typically used for omega',
|
'stick rotation, typically used for omega',
|
||||||
io='om_io',
|
io = 'om_io',
|
||||||
target_min=-360,
|
target_min = '-360',
|
||||||
target_max=360,
|
target_max = '360',
|
||||||
encoder_mode='NO',
|
encoder_mode = 'NO',
|
||||||
target=Param(min=-360, max=360),
|
target = Param(min=-360, max=360),
|
||||||
)
|
)
|
||||||
@@ -45,6 +45,7 @@ class SR830_IO(StringIO):
|
|||||||
|
|
||||||
|
|
||||||
class StanfRes(HasIO, Readable):
|
class StanfRes(HasIO, Readable):
|
||||||
|
ioClass = SR830_IO
|
||||||
def set_par(self, cmd, *args):
|
def set_par(self, cmd, *args):
|
||||||
"""
|
"""
|
||||||
Set parameter.
|
Set parameter.
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ class IO(StringIO):
|
|||||||
|
|
||||||
|
|
||||||
class Power(HasIO, Readable):
|
class Power(HasIO, Readable):
|
||||||
|
ioClass = IO
|
||||||
value = Parameter(datatype=FloatRange(0,300,unit='W'))
|
value = Parameter(datatype=FloatRange(0,300,unit='W'))
|
||||||
|
|
||||||
def read_value(self):
|
def read_value(self):
|
||||||
@@ -67,6 +68,7 @@ class Power(HasIO, Readable):
|
|||||||
|
|
||||||
|
|
||||||
class Output(HasIO, HasControlledBy, Writable):
|
class Output(HasIO, HasControlledBy, Writable):
|
||||||
|
ioClass = IO
|
||||||
value = Parameter(datatype=FloatRange(0,100,unit='%'), default=0)
|
value = Parameter(datatype=FloatRange(0,100,unit='%'), default=0)
|
||||||
target = Parameter(datatype=FloatRange(0,100,unit='%'))
|
target = Parameter(datatype=FloatRange(0,100,unit='%'))
|
||||||
p_value = Parameter('?', datatype=FloatRange(0,100,unit='%'), default=0)
|
p_value = Parameter('?', datatype=FloatRange(0,100,unit='%'), default=0)
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ class BridgeIO(StringIO):
|
|||||||
|
|
||||||
|
|
||||||
class Base(HasIO):
|
class Base(HasIO):
|
||||||
|
ioClass = BridgeIO
|
||||||
port = Property('modules port', IntRange(0, 15))
|
port = Property('modules port', IntRange(0, 15))
|
||||||
|
|
||||||
def communicate(self, command):
|
def communicate(self, command):
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ SOURCECMDS = {
|
|||||||
|
|
||||||
|
|
||||||
class SourceMeter(HasIO, Module):
|
class SourceMeter(HasIO, Module):
|
||||||
|
ioClass = K2601bIO
|
||||||
export = False # export for tests only
|
export = False # export for tests only
|
||||||
mode = Parameter('measurement mode', EnumType(off=0, current=1, voltage=2),
|
mode = Parameter('measurement mode', EnumType(off=0, current=1, voltage=2),
|
||||||
readonly=False, export=False)
|
readonly=False, export=False)
|
||||||
@@ -107,6 +108,7 @@ class Resistivity(HasIO, Readable):
|
|||||||
|
|
||||||
|
|
||||||
class Current(HasIO, Writable):
|
class Current(HasIO, Writable):
|
||||||
|
ioClass = K2601bIO
|
||||||
sourcemeter = Attached()
|
sourcemeter = Attached()
|
||||||
|
|
||||||
value = Parameter('measured current', FloatRange(unit='A'))
|
value = Parameter('measured current', FloatRange(unit='A'))
|
||||||
@@ -153,6 +155,7 @@ class Current(HasIO, Writable):
|
|||||||
|
|
||||||
|
|
||||||
class Voltage(HasIO, Writable):
|
class Voltage(HasIO, Writable):
|
||||||
|
ioClass = K2601bIO
|
||||||
sourcemeter = Attached()
|
sourcemeter = Attached()
|
||||||
|
|
||||||
value = Parameter('measured voltage', FloatRange(unit='V'))
|
value = Parameter('measured voltage', FloatRange(unit='V'))
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ def parse_result(reply):
|
|||||||
|
|
||||||
|
|
||||||
class LakeShoreIO(HasIO):
|
class LakeShoreIO(HasIO):
|
||||||
|
ioClass = StringIO
|
||||||
|
|
||||||
def set_param(self, cmd, *args):
|
def set_param(self, cmd, *args):
|
||||||
args = [f'{a:g}' for a in args]
|
args = [f'{a:g}' for a in args]
|
||||||
if ' ' in cmd.strip():
|
if ' ' in cmd.strip():
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ class IO(StringIO):
|
|||||||
|
|
||||||
|
|
||||||
class MercuryChannel(HasIO):
|
class MercuryChannel(HasIO):
|
||||||
|
ioClass = IO
|
||||||
slot = Property('comma separated slot id(s), e.g. DB6.T1', StringType())
|
slot = Property('comma separated slot id(s), e.g. DB6.T1', StringType())
|
||||||
kind = '' #: used slot kind(s)
|
kind = '' #: used slot kind(s)
|
||||||
slots = () #: dict[<kind>] of <slot>
|
slots = () #: dict[<kind>] of <slot>
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ class Main(Communicator):
|
|||||||
|
|
||||||
class PpmsBase(HasIO, Readable):
|
class PpmsBase(HasIO, Readable):
|
||||||
"""common base for all ppms modules"""
|
"""common base for all ppms modules"""
|
||||||
|
ioClass = Main
|
||||||
value = Parameter(needscfg=False)
|
value = Parameter(needscfg=False)
|
||||||
status = Parameter(datatype=StatusType(Readable, 'DISABLED'), needscfg=False)
|
status = Parameter(datatype=StatusType(Readable, 'DISABLED'), needscfg=False)
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class PulseIO(StringIO):
|
|||||||
|
|
||||||
|
|
||||||
class Base(HasIO):
|
class Base(HasIO):
|
||||||
|
ioClass = PulseIO
|
||||||
|
|
||||||
def set_source(self):
|
def set_source(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class IO(StringIO):
|
|||||||
|
|
||||||
|
|
||||||
class Power(HasIO, Readable):
|
class Power(HasIO, Readable):
|
||||||
|
ioClass = IO
|
||||||
value = Parameter(datatype=FloatRange(0,3300,unit='W'))
|
value = Parameter(datatype=FloatRange(0,3300,unit='W'))
|
||||||
voltage = Parameter('voltage', FloatRange(0,8, unit='V'))
|
voltage = Parameter('voltage', FloatRange(0,8, unit='V'))
|
||||||
current = Parameter('current', FloatRange(0,400, unit='A'))
|
current = Parameter('current', FloatRange(0,400, unit='A'))
|
||||||
@@ -41,6 +42,7 @@ class Power(HasIO, Readable):
|
|||||||
|
|
||||||
|
|
||||||
class Output(HasIO, Writable):
|
class Output(HasIO, Writable):
|
||||||
|
ioClass = IO
|
||||||
value = Parameter(datatype=FloatRange(0,100,unit='%'), default=0)
|
value = Parameter(datatype=FloatRange(0,100,unit='%'), default=0)
|
||||||
target = Parameter(datatype=FloatRange(0,100,unit='%'))
|
target = Parameter(datatype=FloatRange(0,100,unit='%'))
|
||||||
mode = Parameter('regulation mode', EnumType(voltage=1, current=2, both=3),
|
mode = Parameter('regulation mode', EnumType(voltage=1, current=2, both=3),
|
||||||
|
|||||||
Reference in New Issue
Block a user