Merge branch 'wip' of gitlab.psi.ch-samenv:samenv/frappy into wip

This commit is contained in:
zolliker 2022-06-10 13:22:04 +02:00
commit 182a8c7e49
5 changed files with 34 additions and 18 deletions

View File

@ -25,7 +25,7 @@ class = secop_psi.mercury.TemperatureAutoFlow
description = static heat exchanger temperature
output_module = htr_stat
needle_valve = p_stat
slot = DB6.T1,DB1.H1
slot = DB6.T1
io = itc1
tolerance = 0.1
@ -56,7 +56,7 @@ class = secop_psi.mercury.TemperatureAutoFlow
description = dynamic heat exchanger temperature
output_module = htr_dyn
needle_valve = p_dyn
slot = DB7.T1,DB2.H1
slot = DB7.T1
io = itc1
tolerance = 0.1
@ -98,7 +98,7 @@ io = ips
class = secop_psi.mercury.TemperatureLoop
description = neck heater 1 temperature
output_module = htr_neck1
slot = MB1.T1,MB0.H1
slot = MB1.T1
io = itc2
tolerance = 1
@ -112,7 +112,7 @@ io = itc2
class = secop_psi.mercury.TemperatureLoop
description = neck heater 2 temperature
output_module = htr_neck2
slot = DB6.T1,DB1.H1
slot = DB6.T1
io = itc2
tolerance = 1
@ -126,7 +126,7 @@ io = itc2
class = secop_psi.mercury.TemperatureLoop
description = static needle valve temperature
output_module = htr_nvs
slot = DB7.T1,DB2.H1
slot = DB7.T1
io = itc2
tolerance = 0.1
@ -140,7 +140,7 @@ io = itc2
class = secop_psi.mercury.TemperatureLoop
description = dynamic needle valve heater temperature
output_module = htr_nvd
slot = DB8.T1,DB3.H1
slot = DB8.T1
io = itc2
tolerance = 0.1

View File

@ -10,17 +10,17 @@ class = secop_psi.mercury.IO
description = connection to triton software
uri = tcp://linse-dil5:33576
#[ts]
#class = secop_psi.switching_sensor.Sensor
#description = either T_mix or T_mix_wup, depending on T
#lower = T_mix
#upper = T_mix_wup
#switch_range = (1.5, 4)
[ts]
class = secop_psi.triton.TemperatureSensor
class = secop_psi.triton.TemperatureLoop
description = mix. chamber temperature
slot = T5
output_module = htr_mix
io = triton
[htr_mix]
class = secop_psi.triton.HeaterOutput
description = mix. chamber heater
slot = H1
io = triton
[T_sorb]

View File

@ -343,7 +343,7 @@ class HeaterOutput(HasInput, MercuryChannel, Writable):
class TemperatureLoop(TemperatureSensor, Loop, Drivable):
channel_type = 'TEMP,HTR'
channel_type = 'TEMP'
output_module = Attached(HeaterOutput, mandatory=False)
ramp = Parameter('ramp rate', FloatRange(0, unit='K/min'), readonly=False)
enable_ramp = Parameter('enable ramp rate', BoolType(), readonly=False)
@ -463,7 +463,7 @@ class ValvePos(HasInput, MercuryChannel, Drivable):
class PressureLoop(HasInput, PressureSensor, Loop, Drivable):
channel_type = 'PRES,AUX'
channel_type = 'PRES'
output_module = Attached(ValvePos, mandatory=False)
tolerance = Parameter(default=0.1)

View File

@ -110,10 +110,13 @@ class SeaClient(ProxyClient, Module):
visibility = 'expert'
default_json_file = {}
_connect_thread = None
_service_manager = None
_instance = None
def __init__(self, name, log, opts, srv):
instance = srv.node_cfg['name'].rsplit('_', 1)[0]
if 'uri' not in opts:
self._instance = instance
port = get_sea_port(instance)
if port is None:
raise ConfigError('missing sea port for %s' % instance)
@ -140,6 +143,11 @@ class SeaClient(ProxyClient, Module):
self._connect_thread = mkthread(self._connect, start_events.get_trigger())
def _connect(self, started_callback):
if self._instance:
if not self._service_manager:
from servicemanager import SeaManager
self._service_manager = SeaManager()
self._service_manager.do_start(self._instance)
if '//' not in self.uri:
self.uri = 'tcp://' + self.uri
self.asynio = AsynConn(self.uri)

View File

@ -175,7 +175,7 @@ class FlowMeter(MercuryChannel, Readable):
return self.query('FLOW:SIG:FLOW')
class TemperatureSensor(mercury.TemperatureSensor):
class ScannerChannel:
# TODO: excitation, enable
# TODO: switch on/off filter, check
filter_time = Parameter('filter time', FloatRange(1, 200, unit='sec'), readonly=False)
@ -203,5 +203,13 @@ class TemperatureSensor(mercury.TemperatureSensor):
return self.change('TEMP:MEAS:PAUS', value)
class TemperatureLoop(mercury.TemperatureLoop):
class TemperatureSensor(ScannerChannel, mercury.TemperatureSensor):
pass
class TemperatureLoop(ScannerChannel, mercury.TemperatureLoop):
pass
class HeaterOutput(mercury.HeaterOutput):
pass # not sure if we need special handling of triton heater output: to be checked!