From 742fbc58240f487013218a4f093ed6d99c58a0e8 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Wed, 7 Nov 2018 12:47:48 +0100 Subject: [PATCH] --- script/devices/RobotSC.py | 1 + script/local.py | 8 ++++++++ script/motion/dry.py | 2 +- script/motion/mount.py | 2 +- script/motion/unmount.py | 9 +++++---- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/script/devices/RobotSC.py b/script/devices/RobotSC.py index f55c281..b8afa1a 100644 --- a/script/devices/RobotSC.py +++ b/script/devices/RobotSC.py @@ -12,6 +12,7 @@ DESC_DEFAULT = DESC_FAST AUX_SEGMENT = "X" + DEFAULT_ROBOT_POLLING = 500 TASK_WAIT_ROBOT_POLLING = 50 diff --git a/script/local.py b/script/local.py index ad48749..e94a0a2 100644 --- a/script/local.py +++ b/script/local.py @@ -147,6 +147,14 @@ def stop_puck_detection(): +def get_detected_pucks(): + ret = [] + for i in range(30): + p = BasePlate.getPucks()[i] + if (str(p.getDetection()) == "Present"): + ret.append(str(p.getName())) + return ret + ################################################################################################### # Device initialization ################################################################################################### diff --git a/script/motion/dry.py b/script/motion/dry.py index 18d5d8e..c7877da 100644 --- a/script/motion/dry.py +++ b/script/motion/dry.py @@ -11,7 +11,7 @@ def dry(heat_time=30.0, speed=0.5, wait_cold = 30.0): if robot.simulated: - time.sleep(3.0) + time.sleep(10.0) return #Initial chec diff --git a/script/motion/mount.py b/script/motion/mount.py index c402ad2..57840b9 100644 --- a/script/motion/mount.py +++ b/script/motion/mount.py @@ -1,7 +1,7 @@ mount_sample_id = None mount_sample_detected = None -def mount(segment, puck, sample, force=False, read_dm=False): +def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False): """ """ global mount_sample_id, mount_sample_detected diff --git a/script/motion/unmount.py b/script/motion/unmount.py index 9da17d1..358a10b 100644 --- a/script/motion/unmount.py +++ b/script/motion/unmount.py @@ -15,7 +15,7 @@ def unmount(segment = None, puck = None, sample = None, force=False): assert_valid_address(segment, puck, sample) assert_puck_detected(segment, puck) - if robot.simulated: + if robot.simulated: time.sleep(3.0) update_samples_info_sample_unmount(get_puck_name(segment, puck), sample) set_setting("mounted_sample_position", None) @@ -31,9 +31,10 @@ def unmount(segment = None, puck = None, sample = None, force=False): set_status("Umounting: " + str(segment) + str(puck) + str(sample)) try: - smart_magnet.enforce_sample_detection() - if smart_magnet.check_mounted(idle_time=0.5, timeout = 3.0) == False: - raise Exception("No pin detected on gonio") + if not force: + smart_magnet.enforce_sample_detection() + if smart_magnet.check_mounted(idle_time=0.5, timeout = 3.0) == False: + raise Exception("No pin detected on gonio") #Enabling