many params updated, code to mount samples
This commit is contained in:
@@ -93,7 +93,7 @@ def release_psys():
|
||||
###################################################################################################
|
||||
# Drier
|
||||
###################################################################################################
|
||||
MAX_HEATER_TIME = 90000
|
||||
MAX_HEATER_TIME = 120000
|
||||
|
||||
def set_air_stream(state):
|
||||
"""
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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,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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user