diff --git a/config/settings.properties b/config/settings.properties index fba1213..e693444 100644 --- a/config/settings.properties +++ b/config/settings.properties @@ -1,9 +1,9 @@ -#Wed Aug 13 10:52:38 CEST 2025 +#Fri Sep 12 15:42:10 CEST 2025 barcode_reader_scan_pucks=false beamline_status_enabled=false cold_position_timeout=3600 -dry_mount_counter=0 -dry_timestamp=1.753545811032E9 +dry_mount_counter=10 +dry_timestamp=1.757680125206E9 force_dry_mount_count=10 force_dry_timeout=27000 imaging_enabled=true diff --git a/devices/cover_detection.properties b/devices/cover_detection.properties index d1f08a1..d5d5f77 100644 --- a/devices/cover_detection.properties +++ b/devices/cover_detection.properties @@ -1,4 +1,4 @@ -#Wed Aug 13 10:52:40 CEST 2025 +#Wed Sep 10 12:06:02 CEST 2025 border_dewar=0.56 center_x=1020.0 center_y=1047.0 diff --git a/devices/led_ctrl_1.properties b/devices/led_ctrl_1.properties index 2b0d3f2..350eef1 100644 --- a/devices/led_ctrl_1.properties +++ b/devices/led_ctrl_1.properties @@ -1,4 +1,4 @@ -#Wed Aug 06 10:57:31 CEST 2025 +#Tue Aug 26 09:15:05 CEST 2025 description=null maxValue=1.0 minValue=0.0 diff --git a/devices/led_ctrl_2.properties b/devices/led_ctrl_2.properties index 2b0d3f2..350eef1 100644 --- a/devices/led_ctrl_2.properties +++ b/devices/led_ctrl_2.properties @@ -1,4 +1,4 @@ -#Wed Aug 06 10:57:31 CEST 2025 +#Tue Aug 26 09:15:05 CEST 2025 description=null maxValue=1.0 minValue=0.0 diff --git a/devices/led_ctrl_3.properties b/devices/led_ctrl_3.properties index 2b0d3f2..350eef1 100644 --- a/devices/led_ctrl_3.properties +++ b/devices/led_ctrl_3.properties @@ -1,4 +1,4 @@ -#Wed Aug 06 10:57:31 CEST 2025 +#Tue Aug 26 09:15:05 CEST 2025 description=null maxValue=1.0 minValue=0.0 diff --git a/plugins/BarcodeReaderPanel.java b/plugins/BarcodeReaderPanel.java index 65e9a76..3a75928 100644 --- a/plugins/BarcodeReaderPanel.java +++ b/plugins/BarcodeReaderPanel.java @@ -32,7 +32,7 @@ public class BarcodeReaderPanel extends DevicePanel { public void onTimer(){ if ((getDevice()!=null) && enabled){ if ((future==null) || (future.isDone())){ - future = Context.getInterpreter().evalLineBackgroundAsync(getDevice().getName() + ".get()"); + future = Context.getSequencer().evalLineBackgroundAsync(getDevice().getName() + ".get()"); } } } @@ -40,7 +40,7 @@ public class BarcodeReaderPanel extends DevicePanel { void execute(String statement, boolean showReturn){ try { - Context.getInterpreter().evalLineBackgroundAsync(statement).handle((ret, ex) -> { + Context.getSequencer().evalLineBackgroundAsync(statement).handle((ret, ex) -> { if (BarcodeReaderPanel.this.isShowing()){ if (ex != null){ showException((Exception)ex); diff --git a/plugins/Commands.java b/plugins/Commands.java index 211ae70..7cb7086 100644 --- a/plugins/Commands.java +++ b/plugins/Commands.java @@ -30,8 +30,8 @@ public class Commands extends Panel { try{ - spinnerDryTime.setValue(Context.getInterpreter().getScriptManager().getVar("DEFAULT_DRY_HEAT_TIME")); - spinnerDrySpeed.setValue(Context.getInterpreter().getScriptManager().getVar("DEFAULT_DRY_SPEED")); + spinnerDryTime.setValue(Context.getInterpreter().getVar("DEFAULT_DRY_HEAT_TIME")); + spinnerDrySpeed.setValue(Context.getInterpreter().getVar("DEFAULT_DRY_SPEED")); } catch(Exception ex){ this.showException(ex); } diff --git a/plugins/HexiposiPanel.java b/plugins/HexiposiPanel.java index ac349ff..46683c9 100644 --- a/plugins/HexiposiPanel.java +++ b/plugins/HexiposiPanel.java @@ -88,7 +88,7 @@ public class HexiposiPanel extends DevicePanel { private void buttonHomingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonHomingActionPerformed try { //Context.getInstance().evalLineAsync("hexiposi.move_home()").handle((ret, ex) -> { - Context.getInterpreter().evalLineAsync("homing_hexiposi()").handle((ret, ex) -> { + Context.getSequencer().evalLineAsync("homing_hexiposi()").handle((ret, ex) -> { if (ex != null){ showException((Exception)ex); } diff --git a/plugins/LaserUEPanel.java b/plugins/LaserUEPanel.java index 33bd325..c9a448c 100644 --- a/plugins/LaserUEPanel.java +++ b/plugins/LaserUEPanel.java @@ -27,7 +27,7 @@ public class LaserUEPanel extends DevicePanel { void execute(String statement, boolean showReturn){ try { - Context.getInterpreter().evalLineBackgroundAsync(statement).handle((ret, ex) -> { + Context.getSequencer().evalLineBackgroundAsync(statement).handle((ret, ex) -> { if (LaserUEPanel.this.isShowing()){ if (ex != null){ showException((Exception)ex); diff --git a/plugins/MXSC-2.0.0.jar b/plugins/MXSC-2.0.0.jar index 5109bae..6b75535 100644 Binary files a/plugins/MXSC-2.0.0.jar and b/plugins/MXSC-2.0.0.jar differ diff --git a/plugins/PuckDetectionPanel.java b/plugins/PuckDetectionPanel.java index 4a44322..90e5d9f 100644 --- a/plugins/PuckDetectionPanel.java +++ b/plugins/PuckDetectionPanel.java @@ -64,7 +64,7 @@ public class PuckDetectionPanel extends DevicePanel { void execute(String statement, boolean showReturn){ try { - Context.getInterpreter().evalLineBackgroundAsync(statement).handle((ret, ex) -> { + Context.getSequencer().evalLineBackgroundAsync(statement).handle((ret, ex) -> { if (ex != null){ showException((Exception)ex); } else if (showReturn){ diff --git a/plugins/RobotPanel.java b/plugins/RobotPanel.java index 5c54254..15cd9e0 100644 --- a/plugins/RobotPanel.java +++ b/plugins/RobotPanel.java @@ -569,7 +569,7 @@ public class RobotPanel extends DevicePanel { private void buttonEnableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEnableActionPerformed try{ - Context.getInterpreter().evalLineBackground(getDevice().getName() + ".enable()"); + Context.getSequencer().evalLineBackground(getDevice().getName() + ".enable()"); } catch (Exception ex){ this.showException(ex); } @@ -577,7 +577,7 @@ public class RobotPanel extends DevicePanel { private void buttonDisableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDisableActionPerformed try{ - Context.getInterpreter().evalLineBackground(getDevice().getName() + ".disable()"); + Context.getSequencer().evalLineBackground(getDevice().getName() + ".disable()"); } catch (Exception ex){ this.showException(ex); } @@ -586,7 +586,7 @@ public class RobotPanel extends DevicePanel { private void spinnerSpeedStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerSpeedStateChanged try{ if (!updating){ - Context.getInterpreter().evalLineBackground(getDevice().getName() + ".set_monitor_speed(" + spinnerSpeed.getValue() + ")"); + Context.getSequencer().evalLineBackground(getDevice().getName() + ".set_monitor_speed(" + spinnerSpeed.getValue() + ")"); } } catch (Exception ex){ this.showException(ex); @@ -595,7 +595,7 @@ public class RobotPanel extends DevicePanel { private void butonStopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butonStopActionPerformed try{ - Context.getInterpreter().evalLineBackground(getDevice().getName() + ".reset_motion()"); + Context.getSequencer().evalLineBackground(getDevice().getName() + ".reset_motion()"); } catch (Exception ex){ this.showException(ex); } @@ -603,7 +603,7 @@ public class RobotPanel extends DevicePanel { private void buttonPauseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPauseActionPerformed try{ - Context.getInterpreter().evalLineBackground(getDevice().getName() + ".stop()"); + Context.getSequencer().evalLineBackground(getDevice().getName() + ".stop()"); } catch (Exception ex){ this.showException(ex); } @@ -611,7 +611,7 @@ public class RobotPanel extends DevicePanel { private void buttonResumeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonResumeActionPerformed try{ - Context.getInterpreter().evalLineBackground(getDevice().getName() + ".resume()"); + Context.getSequencer().evalLineBackground(getDevice().getName() + ".resume()"); } catch (Exception ex){ this.showException(ex); } @@ -619,7 +619,7 @@ public class RobotPanel extends DevicePanel { private void buttonAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAbortActionPerformed try{ - Context.getInterpreter().evalLineBackground(getDevice().getName() + ".stop_task()"); + Context.getSequencer().evalLineBackground(getDevice().getName() + ".stop_task()"); //Context.getInstance().evalLineBackground(getDevice().getName() + ".task_kill('" + textTask.getText() + "')"); } catch (Exception ex){ this.showException(ex); @@ -628,7 +628,7 @@ public class RobotPanel extends DevicePanel { private void buttonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCloseActionPerformed try{ - Context.getInterpreter().evalLineBackground(getDevice().getName() + ".close_tool()"); + Context.getSequencer().evalLineBackground(getDevice().getName() + ".close_tool()"); } catch (Exception ex){ this.showException(ex); } @@ -636,7 +636,7 @@ public class RobotPanel extends DevicePanel { private void buttonOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonOpenActionPerformed try{ - Context.getInterpreter().evalLineBackground(getDevice().getName() + ".open_tool()"); + Context.getSequencer().evalLineBackground(getDevice().getName() + ".open_tool()"); } catch (Exception ex){ this.showException(ex); } diff --git a/plugins/SmartMagnetPanel.java b/plugins/SmartMagnetPanel.java index 9364632..1ba1cb5 100644 --- a/plugins/SmartMagnetPanel.java +++ b/plugins/SmartMagnetPanel.java @@ -275,7 +275,7 @@ public class SmartMagnetPanel extends DevicePanel { private void buttonSupressOnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSupressOnActionPerformed try { - Context.getInterpreter().evalLineBackground("smart_magnet.set_supress(True)"); + Context.getSequencer().evalLineBackground("smart_magnet.set_supress(True)"); } catch (Exception ex) { Logger.getLogger(SmartMagnetPanel.class.getName()).log(Level.SEVERE, null, ex); } @@ -283,7 +283,7 @@ public class SmartMagnetPanel extends DevicePanel { private void buttonSupressOffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSupressOffActionPerformed try { - Context.getInterpreter().evalLineBackground("smart_magnet.set_supress(False)"); + Context.getSequencer().evalLineBackground("smart_magnet.set_supress(False)"); } catch (Exception ex) { Logger.getLogger(SmartMagnetPanel.class.getName()).log(Level.SEVERE, null, ex); } diff --git a/plugins/WagoPanel.java b/plugins/WagoPanel.java index 9fd0843..e43ed31 100644 --- a/plugins/WagoPanel.java +++ b/plugins/WagoPanel.java @@ -38,7 +38,7 @@ public class WagoPanel extends DevicePanel { void execute(String statement){ try { - Context.getInterpreter().evalLineBackgroundAsync(statement).handle((ret, ex) -> { + Context.getSequencer().evalLineBackgroundAsync(statement).handle((ret, ex) -> { if (WagoPanel.this.isShowing()){ if (ex != null){ showException((Exception)ex); diff --git a/script/data/samples.py b/script/data/samples.py index eafa34c..1fce1ea 100644 --- a/script/data/samples.py +++ b/script/data/samples.py @@ -41,7 +41,7 @@ def save_samples_info(): output_file = open( Setup.expandPath("{context}/samples_info.json") , "w") output_file.write(data) output_file.close() - get_interpreter().sendEvent("samples_updated", True) + get_sequencer().sendEvent("samples_updated", True) save_puck_info() def restore_samples_info(): diff --git a/script/motion/mount.py b/script/motion/mount.py index dec0dba..1a0d1b0 100644 --- a/script/motion/mount.py +++ b/script/motion/mount.py @@ -61,6 +61,9 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False) try: #ZACH if needs_chilling and not delayed_chill: + #added bt domi 26.8.2025 + set_setting("dry_timestamp",time.time()) + set_setting("dry_mount_counter", 0) robot.move_dewar(*cover_info) robot.move_cold() time.sleep(30.0) @@ -155,11 +158,6 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False) # if cleaner_timer > 0: # start_pin_cleaner(cleaner_timer) - try: - dry_mount_count = int(get_setting("dry_mount_counter")) - except: - dry_mount_count = 0 - set_setting("dry_mount_counter", dry_mount_count+1) if is_aux: robot.move_park_async() @@ -194,9 +192,16 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False) set_exec_pars(then = "dry(wait_cold = -1)") else: set_exec_pars(then = "dry()") + else: + try: + dry_mount_count = int(get_setting("dry_mount_counter")) + except: + dry_mount_count = 0 + set_setting("dry_mount_counter", dry_mount_count+1) + - print "setting mounted sample to %s%d-%d" % (segment, puck, sample) - set_setting("mounted_sample_position", get_sample_name(segment, puck, sample)) + print "setting mounted sample to %s%d-%d" % (segment, puck, sample) + set_setting("mounted_sample_position", get_sample_name(segment, puck, sample)) return [mount_sample_detected, mount_sample_id] finally: smart_magnet.set_default_current() diff --git a/script/motion/move_cold.py b/script/motion/move_cold.py index d71343b..0daf5cf 100644 --- a/script/motion/move_cold.py +++ b/script/motion/move_cold.py @@ -1,6 +1,7 @@ def move_cold(reset_timestamp=False): """ """ + #useless code below if reset_timestamp: set_setting("dry_timestamp",time.time()) print "move_cold and resetting dry_timestamp" diff --git a/script/motion/move_park.py b/script/motion/move_park.py index 1be9f17..bb36c1d 100644 --- a/script/motion/move_park.py +++ b/script/motion/move_park.py @@ -15,6 +15,6 @@ def move_park(): if not robot.is_park(): - robot.move_park() + robot.move_park() return True \ No newline at end of file diff --git a/script/motion/unmount.py b/script/motion/unmount.py index e1f83e9..f4126ca 100644 --- a/script/motion/unmount.py +++ b/script/motion/unmount.py @@ -80,6 +80,9 @@ def unmount(segment = None, puck = None, sample = None, force=False, auto_unmoun if not is_aux: if needs_chilling: + #added bt domi 26.8.2025 + set_setting("dry_timestamp",time.time()) + set_setting("dry_mount_counter", 0) robot.move_dewar(*cover_info) robot.move_cold() time.sleep(30.) diff --git a/script/tasks/ColdPositionTimeout.py b/script/tasks/ColdPositionTimeout.py index 171a017..4ab4480 100644 --- a/script/tasks/ColdPositionTimeout.py +++ b/script/tasks/ColdPositionTimeout.py @@ -4,17 +4,17 @@ if cold_position_timeout > 0: if (time.time() - robot.last_command_timestamp) > cold_position_timeout: if robot.is_cold(): log("Detected cold position timeout", False) - if get_interpreter().state == State.Ready: + if get_sequencer().state == State.Ready: if robot.state == State.Ready: if feedback_psys_safety.take() == True: #TODO: Chan - get_interpreter().evalLine("dry(wait_cold = -1)") #Dry and park : use get_interpreter().evalLine to change application state + get_sequencer().evalLine("dry(wait_cold = -1)") #Dry and park : use get_sequencer().evalLine to change application state else: raise Exception("Cannot clear cold position: feedback_psys_safety = False ") else: raise Exception("Cannot clear cold position: robot state: " + str(robot.state)) else: - raise Exception("Cannot clear cold position: system state: " + str(get_interpreter().state)) + raise Exception("Cannot clear cold position: system state: " + str(get_sequencer().state)) diff --git a/script/test/mount_profile.py b/script/test/mount_profile.py index 92976c9..6cc90ed 100644 --- a/script/test/mount_profile.py +++ b/script/test/mount_profile.py @@ -50,6 +50,9 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False) try: #ZACH if needs_chilling: + #added bt domi 26.8.2025 + set_setting("dry_timestamp",time.time()) + set_setting("dry_mount_counter", 0) robot.move_cold() time.sleep(30.0) diff --git a/script/test/unmount_profile.py b/script/test/unmount_profile.py index 0dd0b2b..3b4ea0c 100644 --- a/script/test/unmount_profile.py +++ b/script/test/unmount_profile.py @@ -64,6 +64,9 @@ def unmount(segment = None, puck = None, sample = None, force=False, auto_unmoun if not force: visual_check_hexiposi(segment) if needs_chilling: + #added bt domi 26.8.2025 + set_setting("dry_timestamp",time.time()) + set_setting("dry_mount_counter", 0) robot.move_cold() time.sleep(30.) else: