Merge remote-tracking branch 'origin/master'

This commit is contained in:
stten7 2023-08-01 14:58:18 +02:00
commit f44a2c4619
11 changed files with 147 additions and 14 deletions

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,59 @@
CT~~CD,~CC^~CT~
^XA
~TA000
~JSN
^LT0
^MNW
^MTT
^PON
^PMN
^LH0,0
^JMA
^PR2,2
~SD25
^JUS
^LRN
^CI27
^PA0,1,1,0
^XZ
^XA
^MMT
^PW336
^LL1055
^LS0
^FT65,66^A0N,39,38^FH\^CI28^FDERRECINQUE^FS^CI27
^BY1,3,56^FT52,291^BCN,,N,N
^FH\^FD>:{PART}^FS
^FT23,382^A0N,31,30^FH\^CI28^FDPart number:^FS^CI27
^FT23,455^A0N,31,30^FH\^CI28^FD{PART}^FS^CI27
^FT25,101^A0N,17,18^FH\^CI28^FDVia Meucci 31/A - 10079 Mappano(TO)^FS^CI27
^FT61,173^A0N,39,38^FH\^CI28^FD{CUSTOMER}^FS^CI27
^FT61,211^A0N,39,38^FH\^CI28^FDLEAK TEST^FS^CI27
^FT23,921^A0N,23,23^FH\^CI28^FD{DD}/{MO}/{YY}^FS^CI27
^FT169,921^A0N,23,23^FH\^CI28^FD{HH}:{MI}:{SS}^FS^CI27
^FT25,1006^A0N,31,30^FH\^CI28^FDCHECK:^FS^CI27
^FT151,1006^A0N,31,30^FH\^CI28^FDPASSED^FS^CI27
^FT23,964^A0N,25,25^FH\^CI28^FDOperator:^FS^CI27
^FT151,964^A0N,25,25^FH\^CI28^FD{OPERATOR}^FS^CI27
^FT51,323^A0N,31,30^FH\^CI28^FD{PART}^FS^CI27
^FT23,417^A0N,31,30^FH\^CI28^FD{DESCRIPTION}^FS^CI27
^FT23,513^A0N,31,30^FH\^CI28^FDSequential number:^FS^CI27
^FT23,548^A0N,31,30^FH\^CI28^FD{SN5}^FS^CI27
^FT27,658^A0N,28,28^FH\^CI28^FDTest 1:^FS^CI27
^FT27,685^A0N,23,23^FH\^CI28^FDMeasured press.:^FS^CI27
^FT199,687^A0N,20,20^FH\^CI28^FD{RESPSET} mbar^FS^CI27
^FT27,707^A0N,23,23^FH\^CI28^FDAllowed leak:^FS^CI27
^FT199,709^A0N,20,20^FH\^CI28^FD{PMIN} mbar^FS^CI27
^FT27,730^A0N,23,23^FH\^CI28^FDMeasured leak:^FS^CI27
^FT187,731^A0N,20,20^FH\^CI28^FD{RESLEAK} mbar^FS^CI27
^FT27,817^A0N,23,23^FH\^CI28^FDMeasure time:^FS^CI27
^FT215,818^A0N,20,20^FH\^CI28^FD{TTEST} s^FS^CI27
^FT26,773^A0N,23,23^FH\^CI28^FDFill time:^FS^CI27
^FT215,770^A0N,20,20^FH\^CI28^FD{TFILL} s^FS^CI27
^FT27,795^A0N,23,23^FH\^CI28^FDSettling time:^FS^CI27
^FT215,794^A0N,20,20^FH\^CI28^FD{TSET} s^FS^CI27
^FT136,658^A0N,28,28^FH\^CI28^FD{PTEST} mbar^FS^CI27
^FT152,124^A0N,17,18^FH\^CI28^FDItaly^FS^CI27
^FT27,893^A0N,23,23^FH\^CI28^FDTest date/time:^FS^CI27
^PQ1,0,1,Y
^XZ

View File

@ -0,0 +1,58 @@
CT~~CD,~CC^~CT~
^XA
~TA000
~JSN
^LT0
^MNW
^MTT
^PON
^PMN
^LH0,0
^JMA
^PR2,2
~SD25
^JUS
^LRN
^CI27
^PA0,1,1,0
^XZ
^XA
^MMT
^PW336
^LL1055
^LS0
^FT65,66^A0N,39,38^FH\^CI28^FDERRECINQUE^FS^CI27
^FT52,403^BQN,2,7
^FH\^FDLA,{PART}^FS
^FT23,436^A0N,31,30^FH\^CI28^FDPart number:^FS^CI27
^FT23,527^A0N,31,30^FH\^CI28^FD{PART}^FS^CI27
^FT25,101^A0N,17,18^FH\^CI28^FDVia Meucci 31/A - 10079 Mappano(TO)^FS^CI27
^FT61,173^A0N,39,38^FH\^CI28^FD{CUSTOMER}^FS^CI27
^FT61,211^A0N,39,38^FH\^CI28^FDLEAK TEST^FS^CI27
^FT23,921^A0N,23,23^FH\^CI28^FD{DD}/{MO}/{YY}^FS^CI27
^FT169,921^A0N,23,23^FH\^CI28^FD{HH}:{MI}:{SS}^FS^CI27
^FT25,1006^A0N,31,30^FH\^CI28^FDCHECK:^FS^CI27
^FT151,1006^A0N,31,30^FH\^CI28^FDPASSED^FS^CI27
^FT23,964^A0N,25,25^FH\^CI28^FDOperator:^FS^CI27
^FT151,964^A0N,25,25^FH\^CI28^FD{OPERATOR}^FS^CI27
^FT23,489^A0N,31,30^FH\^CI28^FD{CUSTOMER}^FS^CI27
^FT23,567^A0N,31,30^FH\^CI28^FDSequential number:^FS^CI27
^FT23,602^A0N,31,30^FH\^CI28^FD{SN5}^FS^CI27
^FT27,658^A0N,28,28^FH\^CI28^FDTest 1:^FS^CI27
^FT27,685^A0N,23,23^FH\^CI28^FDMeasured press.:^FS^CI27
^FT199,687^A0N,20,20^FH\^CI28^FD{RESPSET} mbar^FS^CI27
^FT27,707^A0N,23,23^FH\^CI28^FDAllowed leak:^FS^CI27
^FT199,709^A0N,20,20^FH\^CI28^FD{PMIN} mbar^FS^CI27
^FT27,730^A0N,23,23^FH\^CI28^FDMeasured leak:^FS^CI27
^FT187,731^A0N,20,20^FH\^CI28^FD{RESLEAK} mbar^FS^CI27
^FT27,817^A0N,23,23^FH\^CI28^FDMeasure time:^FS^CI27
^FT215,818^A0N,20,20^FH\^CI28^FD{TTEST} s^FS^CI27
^FT26,773^A0N,23,23^FH\^CI28^FDFill time:^FS^CI27
^FT215,770^A0N,20,20^FH\^CI28^FD{TFILL} s^FS^CI27
^FT27,795^A0N,23,23^FH\^CI28^FDSettling time:^FS^CI27
^FT215,794^A0N,20,20^FH\^CI28^FD{TSET} s^FS^CI27
^FT136,658^A0N,28,28^FH\^CI28^FD{PTEST} mbar^FS^CI27
^FT151,124^A0N,17,18^FH\^CI28^FDItaly^FS^CI27
^FT27,893^A0N,23,23^FH\^CI28^FDTest date/time:^FS^CI27
^PQ1,0,1,Y
^XZ

View File

@ -93,10 +93,9 @@ settling_pressure_max_percent: 5
test_pressure: 5000 test_pressure: 5000
test_time: 10 test_time: 10
test_pressure_qpos: 7 test_pressure_qpos: 7
test_pressure_qneg: 10 test_pressure_qneg: 17
test_pressure_tt_qpos: 0 # Q+ Upper test leak limit (tube-tube) test_pressure_tt_qpos: 1 # Q+ Upper test leak limit (tube-tube) (positive mbar)
test_pressure_tt_qneg: 5 # Q- Lower test leak limit (tube-tube) test_pressure_tt_qneg: 5 # Q- Lower test leak limit (tube-tube) (negative mbar)
flush_time: 1 flush_time: 1
flush_pressure: 100 flush_pressure: 100
relay_config: 1 relay_config: 1

View File

@ -4,11 +4,11 @@ here="$(realpath "$(dirname "$0")")"
cd "$here" cd "$here"
echo "---------- initialize venv ----------" echo "---------- initialize venv ----------"
sudo apt-get install python3-venv sudo apt-get install python3 python3-venv python-is-python3 python3-pip
lsof "./venv/bin/python" | awk 'NR > 1 {print $2}' | xargs kill || : lsof "./venv/bin/python" | awk 'NR > 1 {print $2}' | xargs kill || :
lsof "./venv/Scripts/activate" | awk 'NR > 1 {print $2}' | xargs kill || : lsof "./venv/Scripts/activate" | awk 'NR > 1 {print $2}' | xargs kill || :
python="python" python="python"
"${python}" -m pip install --upgrade pip #"${python}" -m pip install --upgrade pip
"${python}" -m venv venv "${python}" -m venv venv
source "./venv/bin/activate" || source "./venv/Scripts/activate" || : source "./venv/bin/activate" || source "./venv/Scripts/activate" || :
"${python}" -m pip install --upgrade pip "${python}" -m pip install --upgrade pip

View File

@ -1,4 +1,4 @@
echo on echo on
SET mypath=%~dp0 SET mypath=%~dp0
cd %mypath% cd %mypath%
.\venv\Scripts\activate.bat && python -O "./src/main.py" --no-edgetpu --no-tflite .\venv\Scripts\activate.bat && python -O "./src/main.py" --no-edgetpu --no-tflite/

View File

@ -17,5 +17,5 @@ pyserial
pyserial-asyncio pyserial-asyncio
requests requests
tensorflow tensorflow
tflite-runtime #tflite-runtime
zebra zebra

View File

@ -0,0 +1,8 @@
codice_ricetta,cliente,codice_prodotto,descrizione,tempo_riempimento,tempo_assestamento,tempo_di_test,percentuale_minima_pressione_assestamento,percentuale_massima_pressione_assestamento,pressione_di_test_delta_minimo,pressione_di_test,pressione_di_test_delta_massimo,modello_etichetta
5803112815,IVECO,5803112815,Daily Automatico,5,10,10,5,5,30,5000,5,ETA30x16.prn
5803112816,IVECO,5803112816,Daily Automatico,5,10,10,5,5,30,5000,5,ETA30x16.prn
000746453,FERRARI,000746453,Daily Automatico,10,30,20,5,5,25,10000,5,EtichettaR5.prn
MY83-6L701-AB,ASTON MARTIN,MY83-6L701-AB,Daily Automatico,5,10,10,5,5,30,5000,5,EtichettaR5.prn
MY83-6L694-AB,ASTON MARTIN,MY83-6L694-AB,Daily Automatico,5,10,10,5,5,30,5000,5,EtichettaR5.prn
MY83-6B747-BA,ASTON MARTIN,MY83-6B747-BA,Daily Automatico,5,10,10,5,5,30,5000,5,EtichettaR5.prn
MY83-6B748-BA,ASTON MARTIN,MY83-6B748-BA,Daily Automatico,5,10,10,5,5,30,5000,5,EtichettaR5.prn
1 codice_ricetta cliente codice_prodotto descrizione tempo_riempimento tempo_assestamento tempo_di_test percentuale_minima_pressione_assestamento percentuale_massima_pressione_assestamento pressione_di_test_delta_minimo pressione_di_test pressione_di_test_delta_massimo modello_etichetta
2 5803112815 IVECO 5803112815 Daily Automatico 5 10 10 5 5 30 5000 5 ETA30x16.prn
3 5803112816 IVECO 5803112816 Daily Automatico 5 10 10 5 5 30 5000 5 ETA30x16.prn
4 000746453 FERRARI 000746453 Daily Automatico 10 30 20 5 5 25 10000 5 EtichettaR5.prn
5 MY83-6L701-AB ASTON MARTIN MY83-6L701-AB Daily Automatico 5 10 10 5 5 30 5000 5 EtichettaR5.prn
6 MY83-6L694-AB ASTON MARTIN MY83-6L694-AB Daily Automatico 5 10 10 5 5 30 5000 5 EtichettaR5.prn
7 MY83-6B747-BA ASTON MARTIN MY83-6B747-BA Daily Automatico 5 10 10 5 5 30 5000 5 EtichettaR5.prn
8 MY83-6B748-BA ASTON MARTIN MY83-6B748-BA Daily Automatico 5 10 10 5 5 30 5000 5 EtichettaR5.prn

View File

@ -115,7 +115,7 @@ class Test(Widget):
self.autotesting_reason = None self.autotesting_reason = None
self.autotest_cycle_steps = None self.autotest_cycle_steps = None
if "--no-autotest" not in sys.argv: if "--no-autotest" not in sys.argv:
self.autotest_period = 8.5 * 60 * 60 * 1000 # 8.5 HOURS self.autotest_period = int(8.5 * 60 * 60 * 1000) # 8.5 HOURS
# self.autotest_period = 12 * 60 * 60 * 1000 # 12 HOURS # self.autotest_period = 12 * 60 * 60 * 1000 # 12 HOURS
#if not self.config["autotest_done"]: #if not self.config["autotest_done"]:
# self.request_autotest("init") # self.request_autotest("init")
@ -226,6 +226,8 @@ class Test(Widget):
if action == "change_recipe": if action == "change_recipe":
self.log.info(f"cycle next: action: {action!r}") self.log.info(f"cycle next: action: {action!r}")
self.set_recipe(recipe=None) self.set_recipe(recipe=None)
self.cycle_available_steps["leak_1"].recipe_written=False
self.cycle_available_steps["leak_2"].recipe_written=False
self.step = Steps(type="select_recipe") self.step = Steps(type="select_recipe")
self.cycle_index = -1 self.cycle_index = -1
# COUNT RESET # COUNT RESET

View File

@ -13,10 +13,12 @@ VALVE_TIME=0.5
class Test_Leak(Test_Test): class Test_Leak(Test_Test):
def __init__(self, components=None, recipe=None, step=None, pieces=None, run_once=False, reset_on_start=True, enable_override=False,parent=None): def __init__(self, components=None, recipe=None, step=None, pieces=None, run_once=False, reset_on_start=True, enable_override=False,parent=None):
super().__init__(components=components, recipe=recipe, step=step, pieces=pieces, run_once=run_once, reset_on_start=reset_on_start, enable_override=enable_override) super().__init__(components=components, recipe=recipe, step=step, pieces=pieces, run_once=run_once, reset_on_start=reset_on_start, enable_override=enable_override)
self.get_connection = None
self.io_ok = True self.io_ok = True
self.blow_on = False self.blow_on = False
self.parent=parent self.parent=parent
self.step=step self.step=step
self.recipe_written = False
self.start_b.clicked.connect(self.start_test) self.start_b.clicked.connect(self.start_test)
self.stop_b.clicked.connect(lambda checked, self=weakref.ref(self): self().components["tecna_t3"].stop_test()) self.stop_b.clicked.connect(lambda checked, self=weakref.ref(self): self().components["tecna_t3"].stop_test())
self.show_instruction_b.setVisible("show_instructions" in self.parent.config["hardware_config"].keys()) self.show_instruction_b.setVisible("show_instructions" in self.parent.config["hardware_config"].keys())
@ -85,8 +87,14 @@ class Test_Leak(Test_Test):
self.recipe_pressure_l.setText(f"{self.step.spec['test_pressure']}") self.recipe_pressure_l.setText(f"{self.step.spec['test_pressure']}")
self.leak_min_l.setText(f"{self.step.spec['test_pressure_qneg']}") self.leak_min_l.setText(f"{self.step.spec['test_pressure_qneg']}")
self.leak_max_l.setText(f"{self.step.spec['test_pressure_qpos']}") self.leak_max_l.setText(f"{self.step.spec['test_pressure_qpos']}")
# setup test loop
# SETUP TEST LOOP
if self.step.spec.get("autotest", False) != False: # IF AUTOTESTING UPLOAD RECIPE EVERY TIME
self.recipe_written = False
if not self.recipe_written:
self.components["tecna_t3"].write_recipe(self.recipe, self.step) self.components["tecna_t3"].write_recipe(self.recipe, self.step)
self.recipe_written=True
self.get_connection = self.components["tecna_t3"].out.connect(self.get) self.get_connection = self.components["tecna_t3"].out.connect(self.get)
self.components["tecna_t3"].resume() self.components["tecna_t3"].resume()
if self.parent_assembly_widget is not None: if self.parent_assembly_widget is not None:
@ -107,9 +115,10 @@ class Test_Leak(Test_Test):
QApplication.processEvents() QApplication.processEvents()
time.sleep(2) time.sleep(2)
time.sleep(1)
# AUTO START SECOND TEST # AUTO START SECOND TEST
if step.type == "leak_2": if step.type == "leak_2":
self.recipe_written = False
time.sleep(1)
self.start_b.setEnabled(True) self.start_b.setEnabled(True)
self.start_b.click() self.start_b.click()
@ -121,8 +130,6 @@ class Test_Leak(Test_Test):
self.components["tecna_t3"].pause() self.components["tecna_t3"].pause()
self.disconnect(self.get_connection) self.disconnect(self.get_connection)
super().stop() super().stop()
#if self.parent_assembly_widget is not None:
# self.parent_assembly_widget().set_text(text="WAIT")
self.start_b.setEnabled(False) self.start_b.setEnabled(False)
self.stop_b.setEnabled(False) self.stop_b.setEnabled(False)