many params updated, code to mount samples

This commit is contained in:
gac-S_Changer
2020-10-02 16:53:19 +02:00
parent 90fa8b91c3
commit c8c7d5663a
19 changed files with 71 additions and 26 deletions
+2
View File
@@ -1,3 +1,5 @@
magnet_position=ch.psi.pshell.epics.ChannelDouble|X10SA-ES-DFS:CBOX-SENSOR1|Read||true
magnet_position_ok=ch.psi.pshell.epics.ChannelString|X10SA-ES-DF1:SN1-CMP|Read||true
th2e=ch.psi.pshell.modbus.ModbusTCP|129.129.118.200:502|||
temperature=ch.psi.pshell.modbus.ReadonlyProcessVariable|th2e 1||10000|
humidity=ch.psi.pshell.modbus.ReadonlyProcessVariable|th2e 5||10000|
+4 -3
View File
@@ -1,10 +1,11 @@
#Tue Sep 08 11:44:29 CEST 2020
#Fri Oct 02 16:34:52 CEST 2020
dry_mount_counter=0
mounted_sample_position=D316
room_temperature_enabled=false
pin_offset=0.0
pin_offset=-0.0
puck_types=true
imaging_enabled=false
dry_timestamp=1.59953968313E9
dry_timestamp=1.601637048912E9
roi_h=1000
led_level=0.0
beamline_status_enabled=false
+2 -2
View File
@@ -1,2 +1,2 @@
#Tue Sep 01 14:22:49 CEST 2020
FileSequentialNumber=140
#Wed Sep 30 10:51:37 CEST 2020
FileSequentialNumber=145
+1 -1
View File
@@ -1,3 +1,3 @@
#Tue Aug 18 11:35:05 CEST 2020
#Tue Sep 22 08:45:34 CEST 2020
detection=Mechanical
disabled=false
+2 -2
View File
@@ -1,3 +1,3 @@
#Thu Sep 19 08:23:31 CEST 2019
#Wed Sep 23 08:55:15 CEST 2020
detection=Mechanical
disabled=false
disabled=true
+2 -2
View File
@@ -1,3 +1,3 @@
#Thu Sep 19 08:23:43 CEST 2019
#Thu Oct 01 11:36:19 CEST 2020
detection=Mechanical
disabled=false
disabled=true
+1 -1
View File
@@ -1,3 +1,3 @@
#Thu Sep 19 08:23:48 CEST 2019
#Tue Sep 22 08:45:39 CEST 2020
detection=Mechanical
disabled=false
+2 -2
View File
@@ -1,3 +1,3 @@
#Wed Aug 19 08:50:06 CEST 2020
#Tue Sep 22 08:45:44 CEST 2020
detection=Mechanical
disabled=true
disabled=false
+1 -1
View File
@@ -1,3 +1,3 @@
#Tue Aug 27 11:23:36 CEST 2019
#Tue Sep 22 08:45:50 CEST 2020
detection=Mechanical
disabled=false
+1 -1
View File
@@ -1,3 +1,3 @@
#Tue Sep 10 08:18:28 CEST 2019
#Tue Sep 22 08:45:55 CEST 2020
detection=Mechanical
disabled=false
+2 -2
View File
@@ -1,8 +1,8 @@
#Tue Aug 18 13:34:46 CEST 2020
#Fri Oct 02 15:05:45 CEST 2020
minValue=0.0
unit=V
offset=0.0
maxValue=1.0
maxValue=0.4
precision=2
sign_bit=0
scale=3.0E-4
+2 -2
View File
@@ -1,8 +1,8 @@
#Tue Aug 18 13:34:46 CEST 2020
#Fri Oct 02 15:05:45 CEST 2020
minValue=0.0
unit=V
offset=0.0
maxValue=1.0
maxValue=0.4
precision=2
sign_bit=0
scale=3.0E-4
+2 -2
View File
@@ -1,8 +1,8 @@
#Tue Aug 18 13:34:46 CEST 2020
#Fri Oct 02 15:05:45 CEST 2020
minValue=0.0
unit=V
offset=0.0
maxValue=1.0
maxValue=0.4
precision=2
sign_bit=0
scale=3.0E-4
Binary file not shown.
+1 -1
View File
@@ -93,7 +93,7 @@ def release_psys():
###################################################################################################
# Drier
###################################################################################################
MAX_HEATER_TIME = 90000
MAX_HEATER_TIME = 120000
def set_air_stream(state):
"""
+3 -3
View File
@@ -1,6 +1,6 @@
DEFAULT_DRY_HEAT_TIME = 40.0
DEFAULT_DRY_SPEED = 0.35
DEFAULT_DRY_WAIT_COLD = 35.0
DEFAULT_DRY_HEAT_TIME = 45.0
DEFAULT_DRY_SPEED = 0.4
DEFAULT_DRY_WAIT_COLD = 40.0
def dry(heat_time=None, speed=None, wait_cold = None):
"""
+1
View File
@@ -3,6 +3,7 @@ def get_aux(sample):
"""
print "get_aux: ",sample
sample = int(sample) #assert_valid_sample only acceps int as parameters
#Initial checks
assert_valid_sample(sample)
+2 -1
View File
@@ -2,7 +2,8 @@ def put_aux(sample):
"""
"""
print "put_aux: ",sample
sample = int(sample) #assert_valid_sample only acceps int as parameters
#Initial checks
assert_valid_sample(sample)
+40
View File
@@ -55,13 +55,53 @@ def scan_pin(segment, puck, sample, force=False):
ret = str(dm)
return ret
def mount_pucks(pucks):
"""mount evry position from the given pucks
pucks is a list of puck specification in the format: [segment][puck]
Example: mount_pucks(['c4', e3', 'e2', 'f1'])
"""
for p in pucks:
seg, puc = list(p)
seg = seg.upper()
puc = int(puc)
print "Mounting all positions from {} {}".format(seg.upper(), puc)
mount_puck_pins(seg, puc)
def mount_puck_pins(segment, puck, positions=None):
""" Mounts every position from the given segment/puck."""
from time import sleep
results = []
if positions is None:
positions = range(1, 17)
for i in positions:
b = magnet_position.getValue()
mount(segment, puck, i, True, False, True)
a = magnet_position.getValue()
results.append((b, a))
print "{:^8.3f}|{:^8.3f}".format(b, a)
sleep(1.0)
# print results
print "{:^8s}|{:^8s}".format("Before", "After")
for b,a in results:
print "{:^8.3f}|{:^8.3f}".format(b, a)
def scan_puck(segment, puck, force=False):
if segment == AUX_SEGMENT:
raise Exception("Cannot scan auxiliary puck")
ret = []
for i in range(16):
mgok = magnet_position_ok.getValue()
mgpos = magnet_position.getValue()
print "magnet sensor before: {} == {:.3f}".format(mgok, mgpos)
ret.append(scan_pin (segment, puck, i+1, force))
print "magnet sensor after: {} == {:.3f}".format(mgok, mgpos)
return ret