61 lines
1.4 KiB
Python
61 lines
1.4 KiB
Python
path1=time.strftime("%Y_%m", time.localtime())
|
|
path2=time.strftime("%Y%m%d", time.localtime())
|
|
path="/sls/X07MA/data/x07maop/Data1/"+path1+"/"+path2 +"/"+"refill.log"
|
|
|
|
sp = temperature.read
|
|
|
|
if (sp<2.0):
|
|
# open needle valve
|
|
print "Open needle valve to 50%"
|
|
needle.write(50.0)
|
|
print "Wait 1.0 min ..."
|
|
time.sleep(60)
|
|
print "Wait until T< 4K"
|
|
while True:
|
|
time.sleep(2)
|
|
t=temperature_readback.read()
|
|
if t < 4:
|
|
break
|
|
print "Wait 5 min ..."
|
|
time.sleep(300)
|
|
print "Set needle valve to 0%"
|
|
needle.write(0.0)
|
|
print "Wait temperature stabilization"
|
|
|
|
t_old=0.
|
|
while True:
|
|
t=temperature_readback.read()
|
|
t_diff=abs(t-t_old)
|
|
drift_mKelvin_per_min=t_diff*2*1000 # it was t_diff*6*1000, don't know why 6. It takes tooooo long to exit script.CP 23.11.14
|
|
print "T drift in mK per minute: ",drift_mKelvin_per_min
|
|
t_old=t
|
|
|
|
if (t>10.0):
|
|
break
|
|
|
|
if ( (drift_mKelvin_per_min<10.0) and (t<2.2) ):
|
|
break
|
|
|
|
time.sleep(30)
|
|
|
|
file=open(path,'a')
|
|
file.write(time.strftime("%d %b %Y %H:%M:%S", time.localtime()))
|
|
file.write( '# 1K pot refilled \n' )
|
|
file.close()
|
|
|
|
|
|
|
|
if ((sp >2.0) and (sp < 15)):
|
|
caput ("X07MA-PC-HE:PUMP", "ON")
|
|
time.sleep(60)
|
|
caput ("X07MA-PC-HE:PUMP", "AUTO")
|
|
while True:
|
|
time.sleep(20)
|
|
hlb=caget("X07MA-PC-HE:LEVELB", 'd')
|
|
if (hlb>110.0):
|
|
caput ("X07MA-PC-HE:PUMP", "OFF")
|
|
time.sleep(300)
|
|
break
|
|
|
|
time.sleep (3)
|