flamedil as of 2023-07-04
This commit is contained in:
parent
6ac3938b78
commit
e9a195d61e
@ -22,7 +22,7 @@ Mod('ts_low',
|
|||||||
channel = 3,
|
channel = 3,
|
||||||
switcher = 'lsc_channel',
|
switcher = 'lsc_channel',
|
||||||
minrange=13,
|
minrange=13,
|
||||||
range=17,
|
range=22,
|
||||||
tolerance = 0.1,
|
tolerance = 0.1,
|
||||||
htrrng=4,
|
htrrng=4,
|
||||||
)
|
)
|
||||||
@ -33,7 +33,7 @@ Mod('ts_high',
|
|||||||
channel = 1,
|
channel = 1,
|
||||||
switcher = 'lsc_channel',
|
switcher = 'lsc_channel',
|
||||||
minrange=9,
|
minrange=9,
|
||||||
range=20,
|
range=22,
|
||||||
tolerance = 0.1,
|
tolerance = 0.1,
|
||||||
htrrng=5,
|
htrrng=5,
|
||||||
minheater=5e-4,
|
minheater=5e-4,
|
||||||
|
@ -426,16 +426,18 @@ class TemperatureLoop(HasConvergence, TemperatureChannel, Drivable):
|
|||||||
|
|
||||||
def write_target(self, target):
|
def write_target(self, target):
|
||||||
outmode = (5, self.channel, 0, 0, 1, 3)
|
outmode = (5, self.channel, 0, 0, 1, 3)
|
||||||
prev = parse(self.communicate('OUTMODE?{self.loop}'))
|
prev = parse(self.communicate(f'OUTMODE?{self.loop}'))
|
||||||
if outmode != prev:
|
if outmode != prev:
|
||||||
self.communicate('OUTMODE {self.loop}, %g,%g,%g,%g,%g,%g;*OPC?' % tuple(outmode))
|
self.communicate(f'OUTMODE {self.loop}, %g,%g,%g,%g,%g,%g;*OPC?' % tuple(outmode))
|
||||||
self.communicate('MOUT {self.loop},{self.min_percent()};*OPC?')
|
self.communicate(f'MOUT {self.loop},{self.min_percent()};*OPC?')
|
||||||
for chan in self.switcher.channels.values():
|
for chan in self.switcher.channels.values():
|
||||||
chan._control_active = False
|
chan._control_active = False
|
||||||
self._control_active = True
|
self._control_active = True
|
||||||
self.read_control_active()
|
self.read_control_active()
|
||||||
self.convergence_start()
|
self.convergence_start()
|
||||||
return float(self.communicate(f'SETP {self.loop},{target};SETP?{self.loop}'))
|
# do not resturn the readback value, as it might not yet be correct
|
||||||
|
self.communicate(f'SETP {self.loop},{target};SETP?{self.loop}')
|
||||||
|
return target
|
||||||
|
|
||||||
#def write_ctrlpars(self, ctrlpars):
|
#def write_ctrlpars(self, ctrlpars):
|
||||||
# p, i, d = self.change(f'PID {self.loop}', ctrlpars['p'], ctrlpars['i'], ctrlpars['d'])
|
# p, i, d = self.change(f'PID {self.loop}', ctrlpars['p'], ctrlpars['i'], ctrlpars['d'])
|
||||||
|
@ -196,4 +196,5 @@ class SwitchDriv(HasConvergence, Drivable):
|
|||||||
set_enabled(other, False)
|
set_enabled(other, False)
|
||||||
self.write_selected(selected)
|
self.write_selected(selected)
|
||||||
self.convergence_start()
|
self.convergence_start()
|
||||||
|
self.log.info('target=%g (%s)', target, this.name)
|
||||||
return this.write_target(target)
|
return this.write_target(target)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user