Compare commits

...

5 Commits

Author SHA1 Message Date
simone-neo
996b86b286 add new recipes to st-ten-7 2026-06-18 08:14:03 +02:00
simone-neo
92eca4d0a5 add new recipes to st-ten-7 2026-06-16 11:54:14 +02:00
st-ten-16
1d839a6487 dev 16 2026-06-11 08:38:19 +02:00
edo-neo
214725a90d update leak test logic: add conditional digital output for freefall leak tests and post-autotest warning popup 2026-06-08 09:13:04 +02:00
simone-neo
0af7ddc515 fix bad request recipe field 2026-06-04 15:48:31 +02:00
8 changed files with 147 additions and 14 deletions

View File

@ -0,0 +1,33 @@
codice_ricetta,cliente,part_number,dimensione_lotto_abilitata,dimensione_lotto,verifica_connettore_abilitata,connettore,verifica_codice_a_barre_abilitata,codice_a_barre,verifica_resistenza_connettore_abilitata,scala_resistenza,r nominale,tolleranza_resistenza_pos,tolleranza_resistenza_neg,avvitatura_abilitata,viti,prova_tenuta_abilitata,tempo_pre_riempimento,pressione_pre_riempimento,tempo_riempimento,tempo_assestamento,percentuale_minima_pressione_assestamento,percentuale_massima_pressione_assestamento,tempo_di_test,pressione_di_test_delta_minimo,pressione_di_test,pressione_di_test_delta_massimo,tempo_svuotamento,pressione_svuotamento,prova_pervieta_abilitata,tempo_riempimento_free_fall,pressione_riempimento_free_fall,pressione_min_free_fall,pressione_max_free_fall,riempimento_continuo_free_fall,prova_tenuta_abilitata_2,tempo_pre_riempimento_2,pressione_pre_riempimento_2,tempo_riempimento_2,tempo_assestamento_2,percentuale_minima_pressione_assestamento_2,percentuale_massima_pressione_assestamento_2,tempo_di_test_2,pressione_di_test_delta_minimo_2,pressione_di_test_2,pressione_di_test_delta_massimo_2,tempo_svuotamento_2,pressione_svuotamento_2,test_visione_abilitato,ricetta_visione,stampa_etichetta_abilitata,modello_etichetta,labeltxt_1,labeltxt_2,labeltxt_3,labeltxt_4,labeltxt_5,printer_selection
5803566932,IVECO,5803566932,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566933,IVECO,5803566933,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566934,IVECO,5803566934,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566935,IVECO,5803566935,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566936,IVECO,5803566936,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566937,IVECO,5803566937,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803532411,IVECO,5803532411,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803293151,IVECO,5803293151,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803293152,IVECO,5803293152,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520145,IVECO,5803520145,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520146,IVECO,5803520146,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520147,IVECO,5803520147,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520148,IVECO,5803520148,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520149,IVECO,5803520149,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520150,IVECO,5803520150,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520151,IVECO,5803520151,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520152,IVECO,5803520152,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520153,IVECO,5803520153,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803520154,IVECO,5803520154,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803522026,IVECO,5803522026,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803525931,IVECO,5803525931,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803525935,IVECO,5803525935,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803537510,IVECO,5803537510,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803537511,IVECO,5803537511,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803537512,IVECO,5803537512,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803547707,IVECO,5803547707,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803547712,IVECO,5803547712,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803547715,IVECO,5803547715,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803547736,IVECO,5803547736,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566929,IVECO,5803566929,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803566930,IVECO,5803566930,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
5803532412,IVECO,5803532412,,,,,,,,,,,,,,x,0,5000,5,10,5,5,10,30,5000,30,1,100,,,,,,,,,,,,,,,,,,,,False,,x,ETA30x16_203dpi.prn,,,,,,zd421b
1 codice_ricetta cliente part_number dimensione_lotto_abilitata dimensione_lotto verifica_connettore_abilitata connettore verifica_codice_a_barre_abilitata codice_a_barre verifica_resistenza_connettore_abilitata scala_resistenza r nominale tolleranza_resistenza_pos tolleranza_resistenza_neg avvitatura_abilitata viti prova_tenuta_abilitata tempo_pre_riempimento pressione_pre_riempimento tempo_riempimento tempo_assestamento percentuale_minima_pressione_assestamento percentuale_massima_pressione_assestamento tempo_di_test pressione_di_test_delta_minimo pressione_di_test pressione_di_test_delta_massimo tempo_svuotamento pressione_svuotamento prova_pervieta_abilitata tempo_riempimento_free_fall pressione_riempimento_free_fall pressione_min_free_fall pressione_max_free_fall riempimento_continuo_free_fall prova_tenuta_abilitata_2 tempo_pre_riempimento_2 pressione_pre_riempimento_2 tempo_riempimento_2 tempo_assestamento_2 percentuale_minima_pressione_assestamento_2 percentuale_massima_pressione_assestamento_2 tempo_di_test_2 pressione_di_test_delta_minimo_2 pressione_di_test_2 pressione_di_test_delta_massimo_2 tempo_svuotamento_2 pressione_svuotamento_2 test_visione_abilitato ricetta_visione stampa_etichetta_abilitata modello_etichetta labeltxt_1 labeltxt_2 labeltxt_3 labeltxt_4 labeltxt_5 printer_selection
2 5803566932 IVECO 5803566932 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
3 5803566933 IVECO 5803566933 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
4 5803566934 IVECO 5803566934 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
5 5803566935 IVECO 5803566935 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
6 5803566936 IVECO 5803566936 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
7 5803566937 IVECO 5803566937 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
8 5803532411 IVECO 5803532411 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
9 5803293151 IVECO 5803293151 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
10 5803293152 IVECO 5803293152 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
11 5803520145 IVECO 5803520145 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
12 5803520146 IVECO 5803520146 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
13 5803520147 IVECO 5803520147 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
14 5803520148 IVECO 5803520148 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
15 5803520149 IVECO 5803520149 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
16 5803520150 IVECO 5803520150 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
17 5803520151 IVECO 5803520151 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
18 5803520152 IVECO 5803520152 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
19 5803520153 IVECO 5803520153 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
20 5803520154 IVECO 5803520154 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
21 5803522026 IVECO 5803522026 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
22 5803525931 IVECO 5803525931 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
23 5803525935 IVECO 5803525935 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
24 5803537510 IVECO 5803537510 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
25 5803537511 IVECO 5803537511 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
26 5803537512 IVECO 5803537512 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
27 5803547707 IVECO 5803547707 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
28 5803547712 IVECO 5803547712 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
29 5803547715 IVECO 5803547715 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
30 5803547736 IVECO 5803547736 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
31 5803566929 IVECO 5803566929 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
32 5803566930 IVECO 5803566930 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b
33 5803532412 IVECO 5803532412 x 0 5000 5 10 5 5 10 30 5000 30 1 100 False x ETA30x16_203dpi.prn zd421b

View File

@ -16,3 +16,4 @@ st-ten-14: st-ten-14
st-ten-15: st-ten-15
test-linux: test-linux
Dell06:st-ten-3
ST-TEN-16: st-ten-16

View File

@ -0,0 +1,99 @@
[machine]
description = ST-TEN-16 raccordati
instruction_folder = st-ten-16
image_for_warning= st-ten-16
[hardware_config]
archive_synchronizer: present
archive_synchronizer_extra: absent
uvc_camera: absent
label_printer: present
neo_pixels: absent
remote_api: absent
tecna_t3: present
vision_saver: absent
vision: absent
screwdriver: absent
digital_io: absent
barcode_recipe_selection: absent
fixture_id: absent
discard_box: absent
second_leak_test:absent
dual_channel: absent
#enforce_piece_removal: yes
[tecna_t3]
port: /dev/ttyUSB0
model: t3P
[archive_synchronizer_extra]
portal_address: http://172.20.3.13:45022/
poll_time: 10
hold_time: 10
[label_printer]
platform: linux
printer: ZTC-ZD421-203dpi-ZPL
risoluzione:203
[recipe]
recipe_name_field: codice_ricetta
part_number_field: codice_ricetta
label_template_field: modello_etichetta
description_field: descrizione
[recipes_defaults]
tester_discharge_enable: yes
dimensione_lotto_abilitata: x
tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000
tempo_riempimento: 15
tempo_assestamento: 15
tempo_di_test: 10
n_componenti:1
percentuale_minima_pressione_assestamento: 5
percentuale_massima_pressione_assestamento: 5
pressione_di_test_delta_minimo: 30
pressione_di_test: 7000
pressione_di_test_delta_massimo: 30
tempo_svuotamento: 0
pressione_svuotamento: 100
canale_di_prova: 1
prova_tenuta_abilitata_2:
tempo_pre_riempimento_2: 0
pressione_pre_riempimento_2: 1000
tempo_riempimento_2: 20
tempo_assestamento_2: 20
tempo_di_test_2: 10
percentuale_minima_pressione_assestamento_2: 5
percentuale_massima_pressione_assestamento_2: 5
pressione_di_test_delta_minimo_2: 30
pressione_di_test_2: 1000
pressione_di_test_delta_massimo_2: 30
tempo_svuotamento_2: 0
pressione_svuotamento_2: 100
canale_di_prova_2: 2
modello_etichetta: EtichettaR5_Montaggio_1prova.prn
pid_pressure_correction: 100
istruzione_abilitata_extra:
slow_pid:
[autotest_leak]
enabled: true
pre_filling_time: 0
pre_filling_pressure: 1000
filling_time: 10
settling_time: 10
settling_pressure_min_percent: 5
settling_pressure_max_percent: 5
test_pressure: 7000
test_time: 10
test_pressure_qpos: 16 #Q+ Upper test leak limit
test_pressure_qneg: 24 #Q- Lower test leak limit
test_pressure_tt_qpos: 1 # Q+ Upper test leak limit (tube-tube)
test_pressure_tt_qneg: 5 # Q- Lower test leak limit (tube-tube)
flush_time: 1
flush_pressure: 100
relay_config: 1
pid_pressure_correction: 100

View File

@ -9,6 +9,6 @@ Exec=bash $here/runme.sh
Icon=$here/src/ui/imgs/neo.ico
Terminal=false
Type=Application
Categories=Application;" > "$HOME/.local/share/applications/ST-TEN-13.desktop"
Categories=Application;" > "$HOME/.local/share/applications/ST-TEN-16.desktop"
ln -f -s "$HOME/.local/share/applications/ST-TEN-13.desktop" "$HOME/Scrivania/ST-TEN-13.desktop"
ln -f -s "$HOME/.local/share/applications/ST-TEN-16.desktop" "$HOME/Scrivania/ST-TEN-16.desktop"

View File

@ -219,7 +219,7 @@ class ArchiveSynchronizer(Component):
"data": json.dumps(record.test_data),
"machine_id": self.machine_id,
"overridden": record.overridden,
"recipe": record.test_data.get("recipe", {}).get("name", None),
"recipe": record.test_data.get("recipe", {}).get("name") or "N/A",
"result": "OK" if record.result else "KO",
"serial": record.id,
"time": record.time.isoformat(),
@ -230,7 +230,7 @@ class ArchiveSynchronizer(Component):
r = requests.get(self.archive_endpoint, params={
"machine_id": self.machine_id,
"overridden": record.overridden,
"recipe": record.test_data.get("recipe", {}).get("name", None),
"recipe": record.test_data.get("recipe", {}).get("name") or "N/A",
"result": "OK" if record.result else "KO",
"serial": record.id,
"time": record.time.isoformat(),

View File

@ -1,29 +1,25 @@
import os
from peewee import Model
from playhouse.sqlite_ext import SqliteExtDatabase
from peewee import Model, SqliteDatabase
db_path = "./data/database"
os.makedirs(db_path, exist_ok=True)
db = SqliteExtDatabase(
db = SqliteDatabase(
db_path + "/sqlite.db",
pragmas={ # see https://www.sqlite.org/pragma.html
pragmas={
"auto_vacuum": 1,
"busy_timeout": 5000,
"cache_size": round(-64e3),
"foreign_keys": 1,
"ignore_check_constraints": 0,
"journal_mode": "wal",
"synchronous": 1, # Changed from 0 to 1 (NORMAL) for better data integrity
"synchronous": 1,
},
timeout=5
)
class BaseModel(Model):
"""A base model that will use our Sqlite database."""
class Meta:
global db
database = db
database = db

View File

@ -535,6 +535,9 @@ class Test(Widget):
else:
# Autotest succeeded; proceed to post-autotest actions
self.autotesting = False
# MOSTRA IL POPUP RICHIESTO ALLA FINE DELL'AUTOTEST
QMessageBox.information(self, "Avviso",
"ATTENZIONE ,SCOLLEGARE IL TUBO-TUBO PRIMA DI INIZIARE A COLLAUDARE")
if self.autotesting_reason == "logout":
Users.logout()
self.main_window.open_login()

View File

@ -233,7 +233,8 @@ class Test_Leak(Test_Test):
self.components[self.tester_component].stop_test()
self.components[self.tester_component].pause()
self.disconnect(self.get_connection)
self.set_digital_out("first_output", 0) # Set low when test stops
if self.step.step_type == "test_freefall_leak":
self.set_digital_out("first_output", 0) # Set low when test stops
super().stop()
self.start_b.setEnabled(False)
self.stop_b.setEnabled(False)