From 065695daa1f50ffa7d9b859f87c18a1e9f3a9e99 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Wed, 25 Sep 2019 11:42:09 +0200 Subject: [PATCH] --- config/settings.properties | 7 +++---- config/variables.properties | 2 ++ devices/C1.properties | 4 ++-- devices/C2.properties | 4 ++-- devices/C3.properties | 4 ++-- devices/C4.properties | 4 ++-- devices/C5.properties | 4 ++-- devices/D1.properties | 4 ++-- devices/D2.properties | 4 ++-- devices/D3.properties | 4 ++-- devices/D4.properties | 4 ++-- devices/D5.properties | 4 ++-- devices/led_ctrl_1.properties | 2 +- devices/led_ctrl_2.properties | 2 +- devices/led_ctrl_3.properties | 2 +- plugins/Commands.form | 2 +- plugins/Commands.java | 10 +++++++++- script/calibration/ScanY.py | 2 +- script/calibration/ToolCalibration6s.py | 7 +++++-- script/data/samples.py | 12 +++++++----- script/devices/Wago.py | 2 +- script/motion/dry.py | 14 ++++++++++++-- 22 files changed, 64 insertions(+), 40 deletions(-) create mode 100644 config/variables.properties diff --git a/config/settings.properties b/config/settings.properties index 8ba16a1..ae6e8fe 100644 --- a/config/settings.properties +++ b/config/settings.properties @@ -1,14 +1,13 @@ -#Tue Sep 17 16:36:06 CEST 2019 +#Wed Sep 25 11:32:39 CEST 2019 barcode_reader_scan_pucks=false beamline_status_enabled=false cold_position_timeout=3600 dry_mount_counter=0 -dry_timestamp=1.5687283096E9 +dry_timestamp=1.569403361248E9 force_dry_mount_count=8 force_dry_timeout=0 imaging_enabled=false -led_level=100.0 -mounted_sample_position=A25 +led_level=0.0 pin_offset=0.0 puck_types=true roi_h=1000 diff --git a/config/variables.properties b/config/variables.properties new file mode 100644 index 0000000..ff86a2b --- /dev/null +++ b/config/variables.properties @@ -0,0 +1,2 @@ +#Tue Sep 24 12:05:29 CEST 2019 +FileSequentialNumber=24 diff --git a/devices/C1.properties b/devices/C1.properties index 9b9088d..42e8813 100644 --- a/devices/C1.properties +++ b/devices/C1.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:34:38 CEST 2019 +#Thu Sep 19 08:23:31 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/C2.properties b/devices/C2.properties index c6592e7..7e4830e 100644 --- a/devices/C2.properties +++ b/devices/C2.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:34:40 CEST 2019 +#Thu Sep 19 08:23:34 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/C3.properties b/devices/C3.properties index 4eccc7c..5210a65 100644 --- a/devices/C3.properties +++ b/devices/C3.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:34:43 CEST 2019 +#Thu Sep 19 08:23:37 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/C4.properties b/devices/C4.properties index c88441d..eb44bbb 100644 --- a/devices/C4.properties +++ b/devices/C4.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:34:45 CEST 2019 +#Thu Sep 19 08:23:41 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/C5.properties b/devices/C5.properties index 6291d73..354cfeb 100644 --- a/devices/C5.properties +++ b/devices/C5.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:34:48 CEST 2019 +#Thu Sep 19 08:23:43 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/D1.properties b/devices/D1.properties index 23e3c3f..d83b456 100644 --- a/devices/D1.properties +++ b/devices/D1.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:34:50 CEST 2019 +#Thu Sep 19 08:23:48 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/D2.properties b/devices/D2.properties index 9ba64b9..65e40d6 100644 --- a/devices/D2.properties +++ b/devices/D2.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:34:57 CEST 2019 +#Thu Sep 19 08:23:51 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/D3.properties b/devices/D3.properties index 4db5dde..5490caf 100644 --- a/devices/D3.properties +++ b/devices/D3.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:34:59 CEST 2019 +#Thu Sep 19 08:23:53 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/D4.properties b/devices/D4.properties index ffd9e92..c934ce8 100644 --- a/devices/D4.properties +++ b/devices/D4.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:35:02 CEST 2019 +#Thu Sep 19 08:23:55 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/D5.properties b/devices/D5.properties index e0a110b..0fa5fe0 100644 --- a/devices/D5.properties +++ b/devices/D5.properties @@ -1,3 +1,3 @@ -#Wed Aug 21 15:35:04 CEST 2019 +#Thu Sep 19 08:23:57 CEST 2019 detection=Mechanical -disabled=true +disabled=false diff --git a/devices/led_ctrl_1.properties b/devices/led_ctrl_1.properties index b1b7adc..15ced94 100644 --- a/devices/led_ctrl_1.properties +++ b/devices/led_ctrl_1.properties @@ -1,4 +1,4 @@ -#Wed Sep 11 13:17:28 CEST 2019 +#Tue Sep 24 17:37:46 CEST 2019 maxValue=1.0 minValue=0.0 offset=0.0 diff --git a/devices/led_ctrl_2.properties b/devices/led_ctrl_2.properties index b1b7adc..15ced94 100644 --- a/devices/led_ctrl_2.properties +++ b/devices/led_ctrl_2.properties @@ -1,4 +1,4 @@ -#Wed Sep 11 13:17:28 CEST 2019 +#Tue Sep 24 17:37:46 CEST 2019 maxValue=1.0 minValue=0.0 offset=0.0 diff --git a/devices/led_ctrl_3.properties b/devices/led_ctrl_3.properties index b1b7adc..15ced94 100644 --- a/devices/led_ctrl_3.properties +++ b/devices/led_ctrl_3.properties @@ -1,4 +1,4 @@ -#Wed Sep 11 13:17:28 CEST 2019 +#Tue Sep 24 17:37:46 CEST 2019 maxValue=1.0 minValue=0.0 offset=0.0 diff --git a/plugins/Commands.form b/plugins/Commands.form index 0dd7059..26eeaf0 100644 --- a/plugins/Commands.form +++ b/plugins/Commands.form @@ -132,7 +132,7 @@ - + diff --git a/plugins/Commands.java b/plugins/Commands.java index fa3595d..fb37d24 100644 --- a/plugins/Commands.java +++ b/plugins/Commands.java @@ -26,6 +26,14 @@ public class Commands extends Panel { ((JSpinner.DefaultEditor)spinnerSegment.getEditor()).getTextField().setHorizontalAlignment(JTextField.CENTER); ((JSpinner.DefaultEditor)spinnerPuck.getEditor()).getTextField().setHorizontalAlignment(JTextField.CENTER); ((JSpinner.DefaultEditor)spinnerSample.getEditor()).getTextField().setHorizontalAlignment(JTextField.CENTER); + + + try{ + spinnerDryTime.setValue(getContext().getScriptManager().getVar("DEFAULT_DRY_HEAT_TIME")); + spinnerDrySpeed.setValue(getContext().getScriptManager().getVar("DEFAULT_DRY_SPEED")); + } catch(Exception ex){ + this.showException(ex); + } } //Overridable callbacks @@ -177,7 +185,7 @@ public class Commands extends Panel { jLabel6.setText("Heat time(s):"); - spinnerDryTime.setModel(new javax.swing.SpinnerNumberModel(30.0d, 1.0d, 50.0d, 1.0d)); + spinnerDryTime.setModel(new javax.swing.SpinnerNumberModel(35.0d, 1.0d, 50.0d, 1.0d)); spinnerDryTime.setRequestFocusEnabled(false); buttonDry.setText("Dry"); diff --git a/script/calibration/ScanY.py b/script/calibration/ScanY.py index 72e0759..cf93b9a 100644 --- a/script/calibration/ScanY.py +++ b/script/calibration/ScanY.py @@ -10,7 +10,7 @@ if d<0: if d>20: raise Exception ("Should be near the laser position to perform the scan") -RANGE = [-6.0, 3.0] #[-1.5, 1.5] +RANGE = [-7.0, 4.0] #[-1.5, 1.5] STEP = 0.02 Z_OFFSET = 0 #-1.0 LATENCY = 0.025 diff --git a/script/calibration/ToolCalibration6s.py b/script/calibration/ToolCalibration6s.py index c6eea39..7c213a5 100644 --- a/script/calibration/ToolCalibration6s.py +++ b/script/calibration/ToolCalibration6s.py @@ -60,8 +60,11 @@ xoff = (pos3[0]-pos1[0])/2 yoff = (pos3[1]-pos1[1])/2 xrot = math.degrees(math.atan(yoff/t[2])) yrot = math.degrees(math.atan(xoff/t[2])) -t[0]=xoff -t[1]=-yoff +t[0]=xoff #X +t[1]=-yoff #Y +#t[3]= xropt #RX +#t[4]= yropt #RY + print "Calibrated tool: " + str(t) diff --git a/script/data/samples.py b/script/data/samples.py index c3d8c7f..87480df 100644 --- a/script/data/samples.py +++ b/script/data/samples.py @@ -1,4 +1,5 @@ import json +import re import org.python.core.PyDictionary as PyDictionary SAMPLE_INFO_KEYS = ["userName", "dewarName", "puckName", "puckBarcode", "puckType", "puckAddress", @@ -86,15 +87,16 @@ def remove_puck_datamatrix(barcode): for el in remove: samples_info.remove(el) save_samples_info() + +barcode_clean_re = re.compile("[^a-zA-Z0-9]") + def is_same_datamatrix(table, reading): if table == reading: return True - table2 = table.replace(" ", "") - table2 = table2.replace("-", "") - reading2 = reading.replace(" ", "") - reading2 = reading2.replace("-", "") + table2 = barcode_clean_re.sub("", table.upper()) + reading2 = barcode_clean_re.sub("", reading.upper()) if table2 == reading2: - log("Assigning aproximative datamatrix " + reading + " to table entry " + table) + log("Assigning aproximative datamatrix " + reading ) return True return False diff --git a/script/devices/Wago.py b/script/devices/Wago.py index 9c76bec..e0921a4 100644 --- a/script/devices/Wago.py +++ b/script/devices/Wago.py @@ -93,7 +93,7 @@ def release_psys(): ################################################################################################### # Drier ################################################################################################### -MAX_HEATER_TIME = 70000 +MAX_HEATER_TIME = 90000 def set_air_stream(state): """ diff --git a/script/motion/dry.py b/script/motion/dry.py index f163300..b77d5dd 100644 --- a/script/motion/dry.py +++ b/script/motion/dry.py @@ -1,6 +1,8 @@ +DEFAULT_DRY_HEAT_TIME = 35.0 +DEFAULT_DRY_SPEED = 0.4 +DEFAULT_DRY_WAIT_COLD = 30.0 - -def dry(heat_time=45.0, speed=0.4, wait_cold = 30.0): +def dry(heat_time=None, speed=None, wait_cold = None): """ heat_time (float): in seconds speed (float): % of nominal speed @@ -9,6 +11,14 @@ def dry(heat_time=45.0, speed=0.4, wait_cold = 30.0): """ print "dry" + if heat_time is None: + heat_time = DEFAULT_DRY_HEAT_TIME + + if speed is None: + speed = DEFAULT_DRY_SPEED + + if wait_cold is None: + wait_cold = DEFAULT_DRY_WAIT_COLD if robot.simulated: time.sleep(10.0)