diff --git a/config/csv_import/ricette MULTIMATIC.csv b/config/csv_import/ricette MULTIMATIC.csv
new file mode 100644
index 0000000..8dd95b7
--- /dev/null
+++ b/config/csv_import/ricette MULTIMATIC.csv
@@ -0,0 +1,3 @@
+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_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
+200116-09-1238,Multimatic,200116-09-1238,,,,SCRx,,,,500.0,9999999.99,10.0,5.0,,,x,0,1000,10,10,5,5,10,30,3000,30,0,100,,0,1000,20,20,5,5,10,30,15000,30,0,100,False,000952054.ini,x,ETA30x16.prn
+200116-09-1320,Multimatic,200116-09-1320,,,,SCRx,,,,500.0,9999999.99,10.0,5.0,,,x,0,1000,10,10,5,5,10,30,3000,30,0,100,,0,1000,20,20,5,5,10,30,15000,30,0,100,False,000952054.ini,x,ETA30x16.prn
diff --git a/config/csv_import/ricette st-ten-8 19-09-2024.csv b/config/csv_import/ricette st-ten-8 19-09-2024.csv
new file mode 100644
index 0000000..4d91e93
--- /dev/null
+++ b/config/csv_import/ricette st-ten-8 19-09-2024.csv
@@ -0,0 +1,10 @@
+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_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
+000746453 REV.5,FERRARI,000746453 REV.5,,,,SCRx,,,,500.0,1000000000.0,10.0,5.0,,,x,0,1000,10,30,5,5,20,25,10000,5,1,100,,0,1000,20,20,5,5,10,30,15000,30,1,100,0,termorestringente_923578.ini,x,ferrari_stten8.prn
+5803112815,IVECO,5803112815,,,,SCRx,,,,500.0,9999999.99,10.0,5.0,,,x,0,1000,5,10,5,5,10,30,5000,5,1,100,,0,1000,20,20,5,5,10,30,15000,30,1,100,0,termorestringente_923578.ini,x,ETA30x16_203dpi.prn
+5803112816,IVECO,5803112816,,,,SCRx,,,,500.0,1000000000.0,10.0,5.0,,,x,0,1000,5,10,5,5,10,30,5000,5,1,100,,0,1000,20,20,5,5,10,30,15000,30,1,100,0,termorestringente_923578.ini,x,ETA30x16_203dpi.prn
+MY83-6B747-BA,ASTON MARTIN,MY83-6B747-BA,,,,SCRx,,,,500.0,1000000000.0,10.0,5.0,,,x,0,1000,5,10,5,5,10,30,7000,5,1,100,,0,1000,20,20,5,5,10,30,15000,30,1,100,0,termorestringente_923578.ini,x,aston_martin.prn
+MY83-6B748-BA,ASTON MARTIN,MY83-6B748-BA,,,,SCRx,,,,500.0,1000000000.0,10.0,5.0,,,x,0,1000,5,10,5,5,10,30,7000,5,1,100,,0,1000,20,20,5,5,10,30,15000,30,1,100,0,termorestringente_923578.ini,x,aston_martin.prn
+MY83-6L694-AB,ASTON MARTIN,MY83-6L694-AB,,,,SCRx,,,,500.0,1000000000.0,10.0,5.0,,,x,0,1000,5,10,5,5,10,30,7000,5,1,100,,0,1000,20,20,5,5,10,30,15000,30,1,100,0,termorestringente_923578.ini,x,aston_martin.prn
+MY83-6L701-AB,ASTON MARTIN,MY83-6L701-AB,,,,SCRx,,,,500.0,1000000000.0,10.0,5.0,,,x,0,1000,5,10,5,5,10,30,7000,5,1,100,,0,1000,20,20,5,5,10,30,15000,30,1,100,0,termorestringente_923578.ini,x,aston_martin.prn
+19799.00.35,DELL'ORTO,19799.00.35,,,,SCRx,,,,500.0,9999999.99,10.0,5.0,,,x,0,1000,5,10,5,5,20,30,9000,10,1,100,,0,1000,20,20,5,5,10,30,15000,30,1,100,False,000952054.ini,x,ETA30x16_203dpi.prn
+19872.00.35,DELL'ORTO,19872.00.35,,,,SCRx,,,,500.0,9999999.99,10.0,5.0,,,x,0,1000,5,10,5,5,20,30,9000,10,1,100,,0,1000,20,20,5,5,10,30,15000,30,1,100,False,000952054.ini,x,ETA30x16_203dpi.prn
diff --git a/config/csv_import/st-ten-11.csv b/config/csv_import/st-ten-11.csv
new file mode 100644
index 0000000..ceda131
--- /dev/null
+++ b/config/csv_import/st-ten-11.csv
@@ -0,0 +1,3 @@
+codice_ricetta,cliente,codice_prodotto,descrizione,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_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,archived
+07N131597,Lamborghini,07N131597,nuova dima grande,,,,SCRx,,,,500.0,9999999.99,10.0,5.0,,,x,0,1000,15,15,5,5,10,30,7000,30,0,100,,0,1000,20,20,5,5,10,30,15000,30,0,100,False,000952054.ini,x,ETA013L.prn,False
+07N131628,Lamborghini,07N131628,nuova dima piccola,,,,SCRx,,,,500.0,9999999.99,10.0,5.0,,,x,0,1000,15,15,5,5,10,30,7000,30,0,100,,0,1000,20,20,5,5,10,30,15000,30,0,100,False,000952054.ini,x,ETA013L.prn,False
diff --git a/config/instruction_images/st-ten-11/07N131597.svg b/config/instruction_images/st-ten-11/07N131597.svg
new file mode 100644
index 0000000..8688065
--- /dev/null
+++ b/config/instruction_images/st-ten-11/07N131597.svg
@@ -0,0 +1,148 @@
+
+
+
+
diff --git a/config/instruction_images/st-ten-11/07N131628.svg b/config/instruction_images/st-ten-11/07N131628.svg
new file mode 100644
index 0000000..332702c
--- /dev/null
+++ b/config/instruction_images/st-ten-11/07N131628.svg
@@ -0,0 +1,68 @@
+
+
+
+
diff --git a/config/instruction_images/st-ten-11/5802820548-extra.svg b/config/instruction_images/st-ten-11/5802820548-extra.svg
new file mode 100644
index 0000000..ea572d1
--- /dev/null
+++ b/config/instruction_images/st-ten-11/5802820548-extra.svg
@@ -0,0 +1,78 @@
+
+
+
+
diff --git a/config/instruction_images/st-ten-11/5803034806.svg b/config/instruction_images/st-ten-11/5802820548.svg
similarity index 99%
rename from config/instruction_images/st-ten-11/5803034806.svg
rename to config/instruction_images/st-ten-11/5802820548.svg
index 488b00b..c70bf86 100644
--- a/config/instruction_images/st-ten-11/5803034806.svg
+++ b/config/instruction_images/st-ten-11/5802820548.svg
@@ -61,7 +61,7 @@
height="50.946007"
preserveAspectRatio="none"
xlink:href="img/arw-yel-down.png"
- id="sensor_3_inv"
+ id="sensor_3"
x="963.87476"
y="-183.19855"
inkscape:svg-dpi="1"
@@ -83,7 +83,7 @@
height="50.946007"
preserveAspectRatio="none"
xlink:href="img/arw-yel-down.png"
- id="sensor_5"
+ id="sensor_5_inv"
x="1488.8005"
y="-19.472771"
inkscape:svg-dpi="1"
diff --git a/config/instruction_images/st-ten-11/98FA186CP-extra.svg b/config/instruction_images/st-ten-11/98FA186CP-extra.svg
new file mode 100644
index 0000000..bc400d1
--- /dev/null
+++ b/config/instruction_images/st-ten-11/98FA186CP-extra.svg
@@ -0,0 +1,90 @@
+
+
+
+
diff --git a/config/instruction_images/st-ten-11/98FA186CP.svg b/config/instruction_images/st-ten-11/98FA186CP.svg
new file mode 100644
index 0000000..0693c82
--- /dev/null
+++ b/config/instruction_images/st-ten-11/98FA186CP.svg
@@ -0,0 +1,90 @@
+
+
+
+
diff --git a/config/instruction_images/st-ten-12/DEFAULT.svg b/config/instruction_images/st-ten-12/DEFAULT.svg
new file mode 100644
index 0000000..facc0bb
--- /dev/null
+++ b/config/instruction_images/st-ten-12/DEFAULT.svg
@@ -0,0 +1,49 @@
+
+
+
+
diff --git a/config/instruction_images/st-ten-12/img/arw-yel-down.png b/config/instruction_images/st-ten-12/img/arw-yel-down.png
new file mode 100644
index 0000000..bb3c668
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/arw-yel-down.png differ
diff --git a/config/instruction_images/st-ten-12/img/mb1.png b/config/instruction_images/st-ten-12/img/mb1.png
new file mode 100644
index 0000000..731a437
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/mb1.png differ
diff --git a/config/instruction_images/st-ten-12/img/mi1.PNG b/config/instruction_images/st-ten-12/img/mi1.PNG
new file mode 100644
index 0000000..6b0f9d9
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/mi1.PNG differ
diff --git a/config/instruction_images/st-ten-12/img/mi2.PNG b/config/instruction_images/st-ten-12/img/mi2.PNG
new file mode 100644
index 0000000..9db21ff
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/mi2.PNG differ
diff --git a/config/instruction_images/st-ten-12/img/ok.png b/config/instruction_images/st-ten-12/img/ok.png
new file mode 100644
index 0000000..d576b7d
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/ok.png differ
diff --git a/config/instruction_images/st-ten-12/img/rb1.PNG b/config/instruction_images/st-ten-12/img/rb1.PNG
new file mode 100644
index 0000000..3050451
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/rb1.PNG differ
diff --git a/config/instruction_images/st-ten-12/img/rb2.PNG b/config/instruction_images/st-ten-12/img/rb2.PNG
new file mode 100644
index 0000000..4bf5efc
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/rb2.PNG differ
diff --git a/config/instruction_images/st-ten-12/img/rm1.PNG b/config/instruction_images/st-ten-12/img/rm1.PNG
new file mode 100644
index 0000000..33f0eeb
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/rm1.PNG differ
diff --git a/config/instruction_images/st-ten-12/img/rm2.PNG b/config/instruction_images/st-ten-12/img/rm2.PNG
new file mode 100644
index 0000000..ef1496a
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/rm2.PNG differ
diff --git a/config/instruction_images/st-ten-12/img/tape_black.png b/config/instruction_images/st-ten-12/img/tape_black.png
new file mode 100644
index 0000000..0d51c4b
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/tape_black.png differ
diff --git a/config/instruction_images/st-ten-12/img/tape_white.png b/config/instruction_images/st-ten-12/img/tape_white.png
new file mode 100644
index 0000000..d4b64f0
Binary files /dev/null and b/config/instruction_images/st-ten-12/img/tape_white.png differ
diff --git a/config/instruction_images/st-ten-13/DEFAULT.svg b/config/instruction_images/st-ten-13/DEFAULT.svg
new file mode 100644
index 0000000..facc0bb
--- /dev/null
+++ b/config/instruction_images/st-ten-13/DEFAULT.svg
@@ -0,0 +1,49 @@
+
+
+
+
diff --git a/config/instruction_images/st-ten-13/img/arw-yel-down.png b/config/instruction_images/st-ten-13/img/arw-yel-down.png
new file mode 100644
index 0000000..bb3c668
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/arw-yel-down.png differ
diff --git a/config/instruction_images/st-ten-13/img/mb1.png b/config/instruction_images/st-ten-13/img/mb1.png
new file mode 100644
index 0000000..731a437
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/mb1.png differ
diff --git a/config/instruction_images/st-ten-13/img/mi1.PNG b/config/instruction_images/st-ten-13/img/mi1.PNG
new file mode 100644
index 0000000..6b0f9d9
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/mi1.PNG differ
diff --git a/config/instruction_images/st-ten-13/img/mi2.PNG b/config/instruction_images/st-ten-13/img/mi2.PNG
new file mode 100644
index 0000000..9db21ff
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/mi2.PNG differ
diff --git a/config/instruction_images/st-ten-13/img/ok.png b/config/instruction_images/st-ten-13/img/ok.png
new file mode 100644
index 0000000..d576b7d
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/ok.png differ
diff --git a/config/instruction_images/st-ten-13/img/rb1.PNG b/config/instruction_images/st-ten-13/img/rb1.PNG
new file mode 100644
index 0000000..3050451
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/rb1.PNG differ
diff --git a/config/instruction_images/st-ten-13/img/rb2.PNG b/config/instruction_images/st-ten-13/img/rb2.PNG
new file mode 100644
index 0000000..4bf5efc
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/rb2.PNG differ
diff --git a/config/instruction_images/st-ten-13/img/rm1.PNG b/config/instruction_images/st-ten-13/img/rm1.PNG
new file mode 100644
index 0000000..33f0eeb
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/rm1.PNG differ
diff --git a/config/instruction_images/st-ten-13/img/rm2.PNG b/config/instruction_images/st-ten-13/img/rm2.PNG
new file mode 100644
index 0000000..ef1496a
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/rm2.PNG differ
diff --git a/config/instruction_images/st-ten-13/img/tape_black.png b/config/instruction_images/st-ten-13/img/tape_black.png
new file mode 100644
index 0000000..0d51c4b
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/tape_black.png differ
diff --git a/config/instruction_images/st-ten-13/img/tape_white.png b/config/instruction_images/st-ten-13/img/tape_white.png
new file mode 100644
index 0000000..d4b64f0
Binary files /dev/null and b/config/instruction_images/st-ten-13/img/tape_white.png differ
diff --git a/config/instruction_images/st-ten-5/5802850935.tubo.svg b/config/instruction_images/st-ten-5/5802850935.tubo.svg
deleted file mode 100644
index cb6ed4a..0000000
--- a/config/instruction_images/st-ten-5/5802850935.tubo.svg
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
diff --git a/config/instruction_images/st-ten-5/5803034027.svg b/config/instruction_images/st-ten-5/5803034027.svg
index a6a8e18..c65e001 100644
--- a/config/instruction_images/st-ten-5/5803034027.svg
+++ b/config/instruction_images/st-ten-5/5803034027.svg
@@ -8,7 +8,7 @@
version="1.1"
id="svg5"
xml:space="preserve"
- inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
+ inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="5803034027.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
@@ -29,12 +29,12 @@
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="0.74746377"
- inkscape:cx="557.21764"
- inkscape:cy="157.86718"
- inkscape:window-width="2490"
- inkscape:window-height="1016"
- inkscape:window-x="70"
- inkscape:window-y="27"
+ inkscape:cx="556.54871"
+ inkscape:cy="158.53611"
+ inkscape:window-width="1920"
+ inkscape:window-height="1017"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
+ style="stroke-width:1.00157;stroke-dasharray:none" />
diff --git a/config/instruction_images/st-ten-5/5803034028.svg b/config/instruction_images/st-ten-5/5803034028.svg
index 2fd5ecf..3280d8a 100644
--- a/config/instruction_images/st-ten-5/5803034028.svg
+++ b/config/instruction_images/st-ten-5/5803034028.svg
@@ -53,15 +53,6 @@
x="-69.333839"
y="-24.57136" />
-
-
+
diff --git a/config/instruction_images/st-ten-5/5803036734.svg b/config/instruction_images/st-ten-5/5803036734.svg
index c1b3d13..d617908 100644
--- a/config/instruction_images/st-ten-5/5803036734.svg
+++ b/config/instruction_images/st-ten-5/5803036734.svg
@@ -8,7 +8,7 @@
height="344"
viewBox="0 0 1323 344"
sodipodi:docname="5803036734.svg"
- inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
+ inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -26,12 +26,12 @@
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="1.1662887"
- inkscape:cx="661.50002"
- inkscape:cy="172.34155"
- inkscape:window-width="2490"
- inkscape:window-height="1016"
- inkscape:window-x="70"
- inkscape:window-y="27"
+ inkscape:cx="660.6426"
+ inkscape:cy="172.77026"
+ inkscape:window-width="1920"
+ inkscape:window-height="1017"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g1" />
+
diff --git a/config/instruction_images/st-ten-5/5803036735.svg b/config/instruction_images/st-ten-5/5803036735.svg
index 8f1dbbf..46f662f 100644
--- a/config/instruction_images/st-ten-5/5803036735.svg
+++ b/config/instruction_images/st-ten-5/5803036735.svg
@@ -8,7 +8,7 @@
height="339"
viewBox="0 0 1383 339"
sodipodi:docname="5803036735.svg"
- inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
+ inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -26,12 +26,12 @@
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="1.1156905"
- inkscape:cx="691.50002"
- inkscape:cy="169.40182"
- inkscape:window-width="2490"
- inkscape:window-height="1016"
- inkscape:window-x="70"
- inkscape:window-y="27"
+ inkscape:cx="509.54992"
+ inkscape:cy="169.84997"
+ inkscape:window-width="1920"
+ inkscape:window-height="1017"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g1" />
+
-
-
-
-
diff --git a/config/instruction_images/st-ten-5/5803048121.svg b/config/instruction_images/st-ten-5/5803048121.svg
index 10ba5f7..8d2abe0 100644
--- a/config/instruction_images/st-ten-5/5803048121.svg
+++ b/config/instruction_images/st-ten-5/5803048121.svg
@@ -2,6212 +2,60 @@
+ height="62.298107"
+ width="64.190125" />
diff --git a/config/instruction_images/st-ten-5/5803119922.svg b/config/instruction_images/st-ten-5/5803119922.svg
new file mode 100644
index 0000000..0beb37d
--- /dev/null
+++ b/config/instruction_images/st-ten-5/5803119922.svg
@@ -0,0 +1,68 @@
+
+
+
+
diff --git a/config/label_designs/FERRARI/ferrari_30x16_203.nlbl b/config/label_designs/FERRARI/ferrari_30x16_203.nlbl
new file mode 100644
index 0000000..c029dd7
Binary files /dev/null and b/config/label_designs/FERRARI/ferrari_30x16_203.nlbl differ
diff --git a/config/label_templates/st-ten-1/ferrari_30x16_203.prn b/config/label_templates/st-ten-1/ferrari_30x16_203.prn
new file mode 100644
index 0000000..53b6b78
--- /dev/null
+++ b/config/label_templates/st-ten-1/ferrari_30x16_203.prn
@@ -0,0 +1,30 @@
+CT~~CD,~CC^~CT~
+^XA
+~TA000
+~JSN
+^LT0
+^MNW
+^MTT
+^PON
+^PMN
+^LH0,0
+^JMA
+^PR2,2
+~SD15
+^JUS
+^LRN
+^CI27
+^PA0,1,1,0
+^XZ
+^XA
+^MMT
+^PW256
+^LL144
+^LS0
+^FT21,129^BQN,2,4
+^FH\^FDLA,{PART}{SN5}{MO}{YY}^FS
+^FT234,104^A0I,23,23^FH\^CI28^FD{PART}^FS^CI27
+^FT234,50^A0I,23,23^FH\^CI28^FDN:{SN5}^FS^CI27
+^FT234,23^A0I,23,23^FH\^CI28^FD{DD}/{MO}/{YY}^FS^CI27
+^PQ1,0,1,Y
+^XZ
diff --git a/config/label_templates/st-ten-1/ferrari_c01.prn b/config/label_templates/st-ten-1/ferrari_c01.prn
new file mode 100644
index 0000000..15efb50
--- /dev/null
+++ b/config/label_templates/st-ten-1/ferrari_c01.prn
@@ -0,0 +1,53 @@
+CT~~CD,~CC^~CT~
+^XA
+~TA000
+~JSN
+^LT0
+^MNW
+^MTT
+^PON
+^PMN
+^LH0,0
+^JMA
+^PR2,2
+~SD20
+^JUS
+^LRN
+^CI27
+^PA0,1,1,0
+^XZ
+^XA
+^MMT
+^PW472
+^LL1654
+^LS0
+^FT40,729^A0N,38,33^FH\^CI28^FD{DD}/{MO}/{YY}^FS^CI27
+^FT259,729^A0N,38,33^FH\^CI28^FD{HH}:{MI}:{SS}^FS^CI27
+^FT27,1497^A0N,46,46^FH\^CI28^FDESITO:^FS^CI27
+^FT213,1497^A0N,46,46^FH\^CI28^FDCONFORME^FS^CI27
+^FT43,130^A0N,38,38^FH\^CI28^FDNumero Disegno^FS^CI27
+^FT40,683^A0N,38,38^FH\^CI28^FDData/Ora Prova^FS^CI27
+^FT40,784^A0N,38,38^FH\^CI28^FDStazione: {STATION}^FS^CI27
+^FT40,615^A0N,38,38^FH\^CI28^FDN. Pezzo:^FS^CI27
+^FT200,617^A0N,38,38^FH\^CI28^FD{SN5}^FS^CI27
+^FT40,831^A0N,38,38^FH\^CI28^FDOPERATORE: {OPERATOR}^FS^CI27
+^FO77,960^GB318,0,12^FS
+^FT28,1043^A0N,38,38^FH\^CI28^FDP. prova:^FS^CI27
+^FT28,1090^A0N,38,38^FH\^CI28^FDP. rilevata:^FS^CI27
+^FT214,1090^A0N,38,38^FH\^CI28^FD{RESPSET}mbar^FS^CI27
+^FT28,1130^A0N,38,38^FH\^CI28^FDCaduta ammessa:^FS^CI27
+^FT305,1130^A0N,38,38^FH\^CI28^FD{PMIN} mbar^FS^CI27
+^FT28,1179^A0N,38,38^FH\^CI28^FDCaduta rilevata:^FS^CI27
+^FT264,1179^A0N,38,38^FH\^CI28^FD{RESLEAK} mbar^FS^CI27
+^FT28,1342^A0N,38,38^FH\^CI28^FDT.Prova^FS^CI27
+^FT306,1348^A0N,38,38^FH\^CI28^FD{TTEST} s^FS^CI27
+^FT27,1278^A0N,38,38^FH\^CI28^FDT.Riempim.^FS^CI27
+^FT306,1278^A0N,38,38^FH\^CI28^FD{TFILL} s^FS^CI27
+^FT28,1310^A0N,38,38^FH\^CI28^FDT.Stabilizzazione^FS^CI27
+^FT306,1313^A0N,38,38^FH\^CI28^FD{TSET} s^FS^CI27
+^FT214,1043^A0N,38,38^FH\^CI28^FD{PTEST} mbar^FS^CI27
+^FT46,352^BXN,9,200,0,0,1,_,1
+^FH\^FD{PART}{MO}{YY}{SN5}^FS
+^FT43,425^A0N,38,38^FH\^CI28^FD{PART}{MO}{YY}{SN5}^FS^CI27
+^PQ1,0,1,Y
+^XZ
diff --git a/config/label_templates/st-ten-1/ferrari_stten8.prn b/config/label_templates/st-ten-1/ferrari_stten8.prn
new file mode 100644
index 0000000..ab9abe9
--- /dev/null
+++ b/config/label_templates/st-ten-1/ferrari_stten8.prn
@@ -0,0 +1,58 @@
+CT~~CD,~CC^~CT~
+^XA
+~TA000
+~JSN
+^LT0
+^MNW
+^MTT
+^PON
+^PMN
+^LH0,0
+^JMA
+^PR2,2
+~SD20
+^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{CLIENT}^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{DESCRIPTION}^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
diff --git a/config/label_templates/st-ten-7/ETA013L.prn b/config/label_templates/st-ten-7/ETA013L.prn
new file mode 100644
index 0000000..43172a9
--- /dev/null
+++ b/config/label_templates/st-ten-7/ETA013L.prn
@@ -0,0 +1,47 @@
+SIZE 57.5 mm, 130 mm
+GAP 3 mm, 0 mm
+DIRECTION 0,0
+REFERENCE 0,0
+OFFSET 0 mm
+SET PEEL OFF
+SET CUTTER OFF
+SET PARTIAL_CUTTER OFF
+SET TEAR ON
+CLS
+CODEPAGE 1252
+TEXT 203,232,"0",180,9,9,"{TSET}s"
+TEXT 203,386,"0",180,9,9,"{RESPFILL}mbar"
+TEXT 292,813,"0",180,9,9,"{CLIENT}"
+TEXT 330,990,"0",180,12,12,"ERRECINQUE"
+TEXT 292,930,"0",180,8,8,"Fluid system"
+TEXT 307,901,"0",180,8,8,"Via Meucci 31/A"
+TEXT 333,872,"0",180,8,8,"10079 Mappano (TO)"
+TEXT 379,813,"0",180,9,9,"Cliente:"
+TEXT 379,778,"0",180,9,9,"N. disegno:"
+TEXT 379,736,"0",180,9,9,"N. dis. R5:"
+TEXT 379,703,"0",180,9,9,"N. pezzo:"
+TEXT 379,667,"0",180,9,9,"Data/ora prova:"
+TEXT 379,632,"0",180,9,9,"{DATETIME}"
+TEXT 257,778,"0",180,9,9,"{RECIPE}"
+TEXT 257,743,"0",180,11,11,"{PART}"
+TEXT 257,703,"0",180,9,9,"{SN}"
+BARCODE 379,576,"128M",102,0,180,2,4,"!105{BCODE}"
+TEXT 379,386,"0",180,9,9,"P. riempimento:"
+TEXT 379,348,"0",180,9,9,"P. assestamento:"
+TEXT 379,310,"0",180,9,9,"Caduta:"
+TEXT 203,348,"0",180,9,9,"{RESPSET}mbar"
+TEXT 203,310,"0",180,9,9,"{RESLEAK}mbar"
+TEXT 379,271,"0",180,9,9,"T. riemp:"
+TEXT 379,232,"0",180,9,9,"T. stab:"
+TEXT 379,194,"0",180,9,9,"T. prova:"
+TEXT 203,271,"0",180,9,9,"{TFILL}s"
+TEXT 203,194,"0",180,9,9,"{TTEST}s"
+TEXT 379,155,"0",180,9,9,"Caduta MAX"
+TEXT 379,116,"0",180,9,9,"Press nominale"
+TEXT 203,155,"0",180,9,9,"{PMIN}mbar"
+TEXT 203,116,"0",180,9,9,"{PTEST}mbar"
+TEXT 379,67,"0",180,11,11,"ESITO:"
+TEXT 285,67,"0",180,11,11,"{RESULT}"
+TEXT 379,464,"0",180,9,9,"{BCODE}"
+PRINT 1,1
+
\ No newline at end of file
diff --git a/config/label_templates/ETA30x16_203dpi.prn b/config/label_templates/st-ten-7/ETA30x16_203dpi.prn
similarity index 100%
rename from config/label_templates/ETA30x16_203dpi.prn
rename to config/label_templates/st-ten-7/ETA30x16_203dpi.prn
diff --git a/config/label_templates/EtichettaR5.prn b/config/label_templates/st-ten-7/EtichettaR5.prn
similarity index 100%
rename from config/label_templates/EtichettaR5.prn
rename to config/label_templates/st-ten-7/EtichettaR5.prn
diff --git a/config/machine_settings/defaults.ini b/config/machine_settings/defaults.ini
index 73f8223..1182755 100644
--- a/config/machine_settings/defaults.ini
+++ b/config/machine_settings/defaults.ini
@@ -118,6 +118,7 @@ r nominale: 1000000000
tolleranza_resistenza_pos: 10
tolleranza_resistenza_neg: 5
prova_tenuta_abilitata: x
+istruzione_abilitata_extra:
warning_img:
#TECNA RECIPE PARAMETERS
diff --git a/config/machine_settings/hostnames.ini b/config/machine_settings/hostnames.ini
index 788e34b..dfdc1c7 100644
--- a/config/machine_settings/hostnames.ini
+++ b/config/machine_settings/hostnames.ini
@@ -10,3 +10,6 @@ st-ten-8: st-ten-8
ST-TEN-9: st-ten-9
st-ten-10: st-ten-10
st-ten-11: st-ten-11
+st-ten-12: st-ten-12
+st-ten-13: st-ten-13
+
diff --git a/config/machine_settings/st-ten-11.ini b/config/machine_settings/st-ten-11.ini
index bbb3d5b..68bbacf 100644
--- a/config/machine_settings/st-ten-11.ini
+++ b/config/machine_settings/st-ten-11.ini
@@ -17,7 +17,9 @@ digital_io: present
barcode_recipe_selection: present
fixture_id: present
discard_box: absent
-enforce_piece_removal: yes
+second_leak_test: present
+dual_channel: absent
+#enforce_piece_removal: yes
[tecna_t3]
port: COM4
@@ -29,7 +31,9 @@ printer: zd421
[digital_io]
# OUTPUT MAP FOR FIXTURE CONNECTOR
-id: USB-5860,BID#0
+
+id_fixture: USB-5862,BID#0
+discard_idx:12 # BIT NUMBER OF THE I/0 MODULE USED FOR DISCARD SENSING
[fixture_rfid]
port: COM5
@@ -73,6 +77,7 @@ pressione_svuotamento_2: 100
canale_di_prova_2: 2
modello_etichetta: EtichettaR5_Montaggio_1prova.prn
pid_pressure_correction: 105
+istruzione_abilitata_extra:
[autotest_leak]
enabled: true
diff --git a/config/machine_settings/st-ten-12.ini b/config/machine_settings/st-ten-12.ini
new file mode 100644
index 0000000..73492b3
--- /dev/null
+++ b/config/machine_settings/st-ten-12.ini
@@ -0,0 +1,93 @@
+[machine]
+description = ST-TEN-12 AUTOMATICO
+instruction_folder = st-ten-12
+image_for_warning= st-ten-12
+
+[hardware_config]
+archive_synchronizer: present
+uvc_camera: absent
+label_printer: present
+neo_pixels: absent
+remote_api: absent
+tecna_t3: present
+vision_saver: absent
+vision: absent
+screwdriver: absent
+digital_io: present
+barcode_recipe_selection: present
+fixture_id: present
+discard_box: absent
+enforce_piece_removal: yes
+
+[tecna_t3]
+port: COM4
+model: t3p
+
+[label_printer]
+platform: windows
+printer: zd421
+
+[digital_io]
+# OUTPUT MAP FOR FIXTURE CONNECTOR
+id: USB-5862,BID#0
+
+[fixture_rfid]
+port: COM5
+
+[recipe]
+recipe_name_field: codice_ricetta
+part_number_field: codice_prodotto
+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: 15000
+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: 105
+
+[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: 10 #Q+ Upper test leak limit
+test_pressure_qneg: 30 #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
\ No newline at end of file
diff --git a/config/machine_settings/st-ten-13.ini b/config/machine_settings/st-ten-13.ini
new file mode 100644
index 0000000..2e9ae3b
--- /dev/null
+++ b/config/machine_settings/st-ten-13.ini
@@ -0,0 +1,93 @@
+[machine]
+description = ST-TEN-13 AUTOMATICO
+instruction_folder = st-ten-13
+image_for_warning= st-ten-13
+
+[hardware_config]
+archive_synchronizer: present
+uvc_camera: absent
+label_printer: present
+neo_pixels: absent
+remote_api: absent
+tecna_t3: present
+vision_saver: absent
+vision: absent
+screwdriver: absent
+digital_io: present
+barcode_recipe_selection: present
+fixture_id: present
+discard_box: absent
+enforce_piece_removal: yes
+
+[tecna_t3]
+port: COM4
+model: t3p
+
+[label_printer]
+platform: windows
+printer: zd421
+
+[digital_io]
+# OUTPUT MAP FOR FIXTURE CONNECTOR
+id: USB-5862,BID#0
+
+[fixture_rfid]
+port: COM5
+
+[recipe]
+recipe_name_field: codice_ricetta
+part_number_field: codice_prodotto
+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: 15000
+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: 105
+
+[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: 10 #Q+ Upper test leak limit
+test_pressure_qneg: 30 #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
\ No newline at end of file
diff --git a/config/machine_settings/st-ten-5.ini b/config/machine_settings/st-ten-5.ini
index c522c1a..a126107 100644
--- a/config/machine_settings/st-ten-5.ini
+++ b/config/machine_settings/st-ten-5.ini
@@ -12,6 +12,7 @@ tecna_t3: present
digital_io: present
digital_io_flush_blow: present
barcode_recipe_selection: present
+enforce_piece_removal: yes
external_flush_blow: present # EXTERNAL BOX CONTROLLING MULTI-CHANNEL TEST (IF PRESENT), BLOW-CLEANING AND EXTERNAL FLUSH
show_instructions: yes
diff --git a/config/machine_settings/st-ten-7.ini b/config/machine_settings/st-ten-7.ini
index 44ec6ac..af83383 100644
--- a/config/machine_settings/st-ten-7.ini
+++ b/config/machine_settings/st-ten-7.ini
@@ -13,6 +13,7 @@ tecna_t3: present
digital_io: present
barcode_recipe_selection: present
show_instructions: yes
+enforce_piece_removal: yes
[tecna_t3]
port: COM4
@@ -94,8 +95,8 @@ settling_pressure_min_percent: 5
settling_pressure_max_percent: 5
test_pressure: 5000
test_time: 10
-test_pressure_qpos: 7
-test_pressure_qneg: 17
+test_pressure_qpos: 8
+test_pressure_qneg: 12
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) (negative mbar)
flush_time: 1
diff --git a/src/components/Automation/BDaq/BDaqApi.py b/src/components/Automation/BDaq/BDaqApi.py
index 8a07693..6e86d7c 100644
--- a/src/components/Automation/BDaq/BDaqApi.py
+++ b/src/components/Automation/BDaq/BDaqApi.py
@@ -3,8 +3,8 @@
import platform
from ctypes import *
-from Automation.BDaq import *
-from Automation.BDaq import Utils
+from components.Automation.BDaq import *
+from components.Automation.BDaq import Utils
if platform.architecture()[0] == '32bit':
c_uint64 = c_uint32
diff --git a/src/components/Automation/BDaq/DaqCtrlBase.py b/src/components/Automation/BDaq/DaqCtrlBase.py
index 6cdf2c9..e109d24 100644
--- a/src/components/Automation/BDaq/DaqCtrlBase.py
+++ b/src/components/Automation/BDaq/DaqCtrlBase.py
@@ -1,12 +1,12 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
-from Automation.BDaq import ErrorCode
-from Automation.BDaq.BDaqApi import TDaqCtrlBase, TArray, BioFailed
-from Automation.BDaq import DeviceInformation, ControlState
-from Automation.BDaq.DeviceCtrl import DeviceCtrl
-from Automation.BDaq import Utils
-from Automation.BDaq import ErrorCode
+from components.Automation.BDaq import ErrorCode
+from components.Automation.BDaq.BDaqApi import TDaqCtrlBase, TArray, BioFailed
+from components.Automation.BDaq import DeviceInformation, ControlState
+from components.Automation.BDaq.DeviceCtrl import DeviceCtrl
+from components.Automation.BDaq import Utils
+from components.Automation.BDaq import ErrorCode
class DaqCtrlBase(object):
diff --git a/src/components/Automation/BDaq/DeviceCtrl.py b/src/components/Automation/BDaq/DeviceCtrl.py
index 75700d1..b5de241 100644
--- a/src/components/Automation/BDaq/DeviceCtrl.py
+++ b/src/components/Automation/BDaq/DeviceCtrl.py
@@ -5,10 +5,10 @@ from ctypes import c_int32, c_byte, c_uint8
from ctypes import create_unicode_buffer
from ctypes import pointer
-from Automation.BDaq.BDaqApi import TArray, TerminalBoard
-from Automation.BDaq.BDaqApi import TDeviceCtrl, BioFailed
-from Automation.BDaq import ErrorCode
-from Automation.BDaq import Utils
+from components.Automation.BDaq.BDaqApi import TArray, TerminalBoard
+from components.Automation.BDaq.BDaqApi import TDeviceCtrl, BioFailed
+from components.Automation.BDaq import ErrorCode
+from components.Automation.BDaq import Utils
class DeviceCtrl(object):
diff --git a/src/components/Automation/BDaq/DiCosintPort.py b/src/components/Automation/BDaq/DiCosintPort.py
index 30e4f24..24f05fd 100644
--- a/src/components/Automation/BDaq/DiCosintPort.py
+++ b/src/components/Automation/BDaq/DiCosintPort.py
@@ -2,8 +2,8 @@
# -*- coding:utf-8 -*-
-from Automation.BDaq.BDaqApi import TDiCosintPort, BioFailed
-from Automation.BDaq import ErrorCode
+from components.Automation.BDaq.BDaqApi import TDiCosintPort, BioFailed
+from components.Automation.BDaq import ErrorCode
class DiCosintPort(object):
diff --git a/src/components/Automation/BDaq/DiPmintPort.py b/src/components/Automation/BDaq/DiPmintPort.py
index e8733fd..94edc03 100644
--- a/src/components/Automation/BDaq/DiPmintPort.py
+++ b/src/components/Automation/BDaq/DiPmintPort.py
@@ -1,8 +1,8 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
-from Automation.BDaq.BDaqApi import TDiPmintPort
-from Automation.BDaq import ErrorCode
+from components.Automation.BDaq.BDaqApi import TDiPmintPort
+from components.Automation.BDaq import ErrorCode
class DiPmintPort(object):
diff --git a/src/components/Automation/BDaq/DiintChannel.py b/src/components/Automation/BDaq/DiintChannel.py
index 7388023..e42de8c 100644
--- a/src/components/Automation/BDaq/DiintChannel.py
+++ b/src/components/Automation/BDaq/DiintChannel.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
-from Automation.BDaq.BDaqApi import TDiintChannel, BioFailed
-from Automation.BDaq import ErrorCode, ActiveSignal
-from Automation.BDaq import Utils
+from components.Automation.BDaq.BDaqApi import TDiintChannel, BioFailed
+from components.Automation.BDaq import ErrorCode, ActiveSignal
+from components.Automation.BDaq import Utils
class DiintChannel(object):
diff --git a/src/components/Automation/BDaq/DioCtrlBase.py b/src/components/Automation/BDaq/DioCtrlBase.py
index de79cff..09d464f 100644
--- a/src/components/Automation/BDaq/DioCtrlBase.py
+++ b/src/components/Automation/BDaq/DioCtrlBase.py
@@ -1,10 +1,10 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
-from Automation.BDaq.BDaqApi import TDioCtrlBase, TArray
-from Automation.BDaq.DaqCtrlBase import DaqCtrlBase
-from Automation.BDaq.DioFeatures import DioFeatures
-from Automation.BDaq.DioPort import DioPort
+from components.Automation.BDaq.BDaqApi import TDioCtrlBase, TArray
+from components.Automation.BDaq.DaqCtrlBase import DaqCtrlBase
+from components.Automation.BDaq.DioFeatures import DioFeatures
+from components.Automation.BDaq.DioPort import DioPort
class DioCtrlBase(DaqCtrlBase):
diff --git a/src/components/Automation/BDaq/DioFeatures.py b/src/components/Automation/BDaq/DioFeatures.py
index 2504e57..90a7022 100644
--- a/src/components/Automation/BDaq/DioFeatures.py
+++ b/src/components/Automation/BDaq/DioFeatures.py
@@ -3,10 +3,10 @@
import ctypes
-from Automation.BDaq.BDaqApi import TArray
-from Automation.BDaq.BDaqApi import TDioFeatures
-from Automation.BDaq import MathInterval
-from Automation.BDaq import Utils
+from components.Automation.BDaq.BDaqApi import TArray
+from components.Automation.BDaq.BDaqApi import TDioFeatures
+from components.Automation.BDaq import MathInterval
+from components.Automation.BDaq import Utils
class DioFeatures(object):
diff --git a/src/components/Automation/BDaq/DioPort.py b/src/components/Automation/BDaq/DioPort.py
index 163b50d..011a961 100644
--- a/src/components/Automation/BDaq/DioPort.py
+++ b/src/components/Automation/BDaq/DioPort.py
@@ -1,9 +1,9 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
-from Automation.BDaq.BDaqApi import TDioPort, BioFailed
-from Automation.BDaq import Utils
-from Automation.BDaq import ErrorCode, DioPortDir, DoCircuitType
+from components.Automation.BDaq.BDaqApi import TDioPort, BioFailed
+from components.Automation.BDaq import Utils
+from components.Automation.BDaq import ErrorCode, DioPortDir, DoCircuitType
class DioPort(object):
diff --git a/src/components/Automation/BDaq/InstantDiCtrl.py b/src/components/Automation/BDaq/InstantDiCtrl.py
index 66f5589..af1e423 100644
--- a/src/components/Automation/BDaq/InstantDiCtrl.py
+++ b/src/components/Automation/BDaq/InstantDiCtrl.py
@@ -3,13 +3,13 @@
from ctypes import *
-from Automation.BDaq import Scenario, ErrorCode
-from Automation.BDaq.DioCtrlBase import DioCtrlBase
-from Automation.BDaq.BDaqApi import TInstantDiCtrl, TArray, BioFailed
-from Automation.BDaq.DiintChannel import DiintChannel
-from Automation.BDaq.NosFltChannel import NosFltChannel
-from Automation.BDaq.DiPmintPort import DiPmintPort
-from Automation.BDaq.DiCosintPort import DiCosintPort
+from components.Automation.BDaq import Scenario, ErrorCode
+from components.Automation.BDaq.DioCtrlBase import DioCtrlBase
+from components.Automation.BDaq.BDaqApi import TInstantDiCtrl, TArray, BioFailed
+from components.Automation.BDaq.DiintChannel import DiintChannel
+from components.Automation.BDaq.NosFltChannel import NosFltChannel
+from components.Automation.BDaq.DiPmintPort import DiPmintPort
+from components.Automation.BDaq.DiCosintPort import DiCosintPort
class InstantDiCtrl(DioCtrlBase):
diff --git a/src/components/Automation/BDaq/InstantDoCtrl.py b/src/components/Automation/BDaq/InstantDoCtrl.py
index e4e92d5..0351fe4 100644
--- a/src/components/Automation/BDaq/InstantDoCtrl.py
+++ b/src/components/Automation/BDaq/InstantDoCtrl.py
@@ -3,9 +3,9 @@
from ctypes import *
-from Automation.BDaq import Scenario, ErrorCode
-from Automation.BDaq.BDaqApi import TInstantDoCtrl
-from Automation.BDaq.DioCtrlBase import DioCtrlBase
+from components.Automation.BDaq import Scenario, ErrorCode
+from components.Automation.BDaq.BDaqApi import TInstantDoCtrl
+from components.Automation.BDaq.DioCtrlBase import DioCtrlBase
class InstantDoCtrl(DioCtrlBase):
diff --git a/src/components/Automation/BDaq/NoiseFilterChannel.py b/src/components/Automation/BDaq/NoiseFilterChannel.py
index 2adc278..38bda0d 100644
--- a/src/components/Automation/BDaq/NoiseFilterChannel.py
+++ b/src/components/Automation/BDaq/NoiseFilterChannel.py
@@ -1,8 +1,8 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
-from dummies.Automation.BDaq.BDaqApi import TNosFltChannel, BioFailed
-from dummies.Automation.BDaq import ErrorCode
+from components.dummies.Automation.BDaq.BDaqApi import TNosFltChannel, BioFailed
+from components.dummies.Automation.BDaq import ErrorCode
class NoiseFilterChannel(object):
diff --git a/src/components/Automation/BDaq/NosFltChannel.py b/src/components/Automation/BDaq/NosFltChannel.py
index 98a698d..53478af 100644
--- a/src/components/Automation/BDaq/NosFltChannel.py
+++ b/src/components/Automation/BDaq/NosFltChannel.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
-from Automation.BDaq.NoiseFilterChannel import NoiseFilterChannel
+from components.Automation.BDaq.NoiseFilterChannel import NoiseFilterChannel
class NosFltChannel(NoiseFilterChannel):
diff --git a/src/components/Automation/BDaq/Utils.py b/src/components/Automation/BDaq/Utils.py
index e3135c5..af86a6f 100644
--- a/src/components/Automation/BDaq/Utils.py
+++ b/src/components/Automation/BDaq/Utils.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
-from Automation.BDaq import *
+from components.Automation.BDaq import *
def CreateArray(DataType, DataNum):
diff --git a/src/components/dummies/Automation/BDaq/BDaqApi.py b/src/components/dummies/Automation/BDaq/BDaqApi.py
index 64ad9a4..5b9d665 100644
--- a/src/components/dummies/Automation/BDaq/BDaqApi.py
+++ b/src/components/dummies/Automation/BDaq/BDaqApi.py
@@ -3,8 +3,8 @@
import platform
from ctypes import *
-from Automation.BDaq import *
-from Automation.BDaq import Utils
+from components.Automation.BDaq import *
+from components.Automation.BDaq import Utils
if platform.architecture()[0] == '32bit':
c_uint64 = c_uint32
diff --git a/src/components/dummies/Automation/BDaq/InstantDoCtrl.py b/src/components/dummies/Automation/BDaq/InstantDoCtrl.py
index 7547de3..0a3cede 100644
--- a/src/components/dummies/Automation/BDaq/InstantDoCtrl.py
+++ b/src/components/dummies/Automation/BDaq/InstantDoCtrl.py
@@ -3,9 +3,9 @@
from ctypes import *
-from dummies.Automation.BDaq import Scenario, ErrorCode
-from dummies.Automation.BDaq.BDaqApi import TInstantDoCtrl
-from dummies.Automation.BDaq.DioCtrlBase import DioCtrlBase
+from components.dummies.Automation.BDaq import Scenario, ErrorCode
+from components.dummies.Automation.BDaq.BDaqApi import TInstantDoCtrl
+from components.dummies.Automation.BDaq.DioCtrlBase import DioCtrlBase
class InstantDoCtrl(DioCtrlBase):
diff --git a/src/components/usb_586x.py b/src/components/usb_586x.py
index 707f246..c4a954b 100644
--- a/src/components/usb_586x.py
+++ b/src/components/usb_586x.py
@@ -44,7 +44,7 @@ class USB_586x(Component):
self.mutex = QMutex()
self.simulate="--sim-io" in sys.argv
# DEVICE INFORMATION
- self.id=config[name]["id"]
+ self.id=config["digital_io"]["id"]
if "5860" in self.id:
self.type = "5860"
self.in_size = 1
@@ -60,6 +60,8 @@ class USB_586x(Component):
self.info.ModuleIndex = 0
self.open_device()
+ #self.out_bits = self.config["digital_outputs"]
+ #self.in_bits = self.config["digital_inputs"]
# SET ALL RELAYS OFF
for bit in range(0, self.out_size * 8):
@@ -69,6 +71,7 @@ class USB_586x(Component):
self.last_get = None
self.state_count = None
self.last_out = None
+ self.sim_in = [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]
def open_device(self):
# DIGITAL I/O CLASS
@@ -176,7 +179,7 @@ class USB_586x(Component):
if is_win or self.simulate:
if self.simulate:
- read=[1,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]
+ read = self.sim_in
break
else:
if self.io_ok:
@@ -213,6 +216,17 @@ class USB_586x(Component):
def get_bit(self, byte, bit):
return self.get()[byte][bit]
+ def get_in(self,input_name,data=None):
+ if data is None:
+ data=self.last_get
+ sensor_index = int(self.in_bits[input_name])
+ byte_idx = int(sensor_index / 8)
+ bit_idx = sensor_index % 8
+ if data is None:
+ return 0
+ else:
+ return data[byte_idx][bit_idx]
+
# Send data byte
def set(self, start_byte, val):
for byte, v in enumerate(val, start=start_byte):
@@ -256,3 +270,14 @@ class USB_586x(Component):
# val from buffer channel
def vfbc(self, buffer, channel):
return buffer[channel[0]][channel[1]]
+
+ def set_out(self,output_name,value):
+ if output_name in self.out_bits.keys():
+ sensor_index = int(self.out_bits[output_name])
+ byte_idx=int(sensor_index/8)
+ bit_idx=sensor_index%8
+ self.set_bit_verify(byte_idx,bit_idx,value)
+
+ def set_in_bit(self, byte, bit, val):
+ self.sim_in[byte][bit] = val
+ return True
diff --git a/src/main.py b/src/main.py
index 45583be..90c30a0 100644
--- a/src/main.py
+++ b/src/main.py
@@ -10,7 +10,7 @@ import traceback
import weakref
from datetime import datetime
from pathlib import Path
-
+from ui.diagnostics import Diagnostics
from lib.helpers.single_process import SingleProcess
if platform.system().lower() == "windows":
@@ -196,6 +196,8 @@ try:
self.main_window.table_selection_a.triggered.connect(self.set_recipe_mode_table)
self.main_window.barcode_selection_a.triggered.connect(self.set_recipe_mode_barcode)
self.main_window.ristampa_etichetta_a.triggered.connect(self.reprint_label)
+ self.main_window.diagnostics_a.triggered.connect(
+ lambda checked, selfie=weakref.ref(self): selfie().main_window.open_dialog(Diagnostics(selfie())))
if "--users-management" in sys.argv:
self.main_window.users_management_a.trigger()
diff --git a/src/scripts/print_labels.py b/src/scripts/print_labels.py
new file mode 100644
index 0000000..0c39fb0
--- /dev/null
+++ b/src/scripts/print_labels.py
@@ -0,0 +1,47 @@
+import time
+from datetime import datetime
+
+from PyQt5.QtWidgets import QApplication
+
+from src.components.os_label_printer import *
+from src.lib.helpers import ConfigReader
+
+SYSTEM_ID = "ST-TEN-1"
+START_SN=1
+STOP_SN=40
+TEMPLATE="ferrari_30x16_203.prn"
+PRINTER_NAME="Zebra_Technologies_ZTC_ZD421-203dpi_ZPL"
+
+config = ConfigReader(system_id=SYSTEM_ID)
+config["label_printer"]["printer"] = PRINTER_NAME
+printer=Os_Label_Printer(config=config,name="label_printer")
+
+
+timenow = datetime.now()
+app = QApplication(sys.argv)
+for sn in range(START_SN,STOP_SN+1):
+ print(f"PRINTING LABEL # {sn}")
+ context = {
+ # RECIPE DATA
+ "PART": "000825276",
+ # SERIAL DEFINITION
+ "SN": str(sn),
+ "SN4": f"{sn:0>4}",
+ "SN5": f"{sn:0>5}",
+ "SN6": f"{sn:0>6}",
+ # TIME DEFINITION
+ "DATETIME": timenow.strftime("%d/%m/%Y %H:%M:%S"),
+ "DATE": timenow.strftime("%d/%m/%Y"),
+ "TIME": timenow.strftime("%H:%M:%S"),
+ "YYYY": timenow.strftime("%Y"),
+ "YY": timenow.strftime("%y"),
+ "MO": timenow.strftime("%m"),
+ "DD": timenow.strftime("%d"),
+ "HH": timenow.strftime("%H"),
+ "MI": timenow.strftime("%M"),
+ "SS": timenow.strftime("%S"),
+ "JJJ": timenow.strftime("%j"),
+ }
+ printer.print_label(TEMPLATE,context)
+
+ time.sleep(1)
\ No newline at end of file
diff --git a/src/test/test_usb586x.py b/src/test/test_usb586x.py
new file mode 100644
index 0000000..33c1212
--- /dev/null
+++ b/src/test/test_usb586x.py
@@ -0,0 +1,43 @@
+import os
+import platform
+import sys
+import time
+
+if platform.system() == "Windows":
+ sys.path.append(f"{os.getcwd()}\\src\\components")
+else:
+ sys.path.append(f"{os.getcwd()}/src/components")
+
+from src.components.usb_586x import USB_586x
+from lib.helpers import ConfigReader
+
+test_config = ConfigReader()
+
+if "--5862" in sys.argv:
+ test_config["digital_io"]["id"] = "USB-5862,BID#0"
+ out_size = in_size = 16
+else:
+ test_config["digital_io"]["id"] = "USB-5860,BID#0"
+ out_size = in_size = 8
+
+digital_io = USB_586x(test_config)
+digital_io.start()
+# READ CONFIG
+
+out_num = 0
+n_in_bytes = int(in_size / 8)
+while True:
+ out_bit = out_num % 8
+ out_byte = int(out_num / 8)
+ res = digital_io.set_bit(out_byte, out_bit, 1)
+ time.sleep(0.5)
+ res2 = digital_io.set_bit(out_byte, out_bit, 0)
+ input_data = digital_io.get()
+ if "--5862" in sys.argv:
+ print("in:{} {} out:{}".format(bytes(input_data[0]), bytes(input_data[1]), out_num))
+ else:
+ print("in:{} out:{}".format(bytes(input_data[0]), out_num))
+ time.sleep(0.5)
+ out_num += 1
+ if out_num == out_size:
+ out_num = 0
diff --git a/src/ui/__init__.py b/src/ui/__init__.py
index 7b7d869..b4b958b 100644
--- a/src/ui/__init__.py
+++ b/src/ui/__init__.py
@@ -47,3 +47,4 @@ from .test_test import Test_Test
from .test_vision import Test_Vision
from .users_management import Users_Management
from .vision_step_editor import Vision_Step_Editor
+from .diagnostics import Diagnostics
diff --git a/src/ui/archive/archive.py b/src/ui/archive/archive.py
index cecd4d9..f0a1e6d 100755
--- a/src/ui/archive/archive.py
+++ b/src/ui/archive/archive.py
@@ -106,7 +106,7 @@ class Archive(Widget):
for archived in list(ArchiveDbModel.select()):
exportable = {
# "id": archived.id,
- "time": archived.time,
+ "time": archived.timenow,
"user": archived.user,
"result": archived.result,
"overridden": archived.overridden,
diff --git a/src/ui/diagnostics/__init__.py b/src/ui/diagnostics/__init__.py
new file mode 100644
index 0000000..9e4031b
--- /dev/null
+++ b/src/ui/diagnostics/__init__.py
@@ -0,0 +1 @@
+from .diagnostics import Diagnostics
\ No newline at end of file
diff --git a/src/ui/diagnostics/diagnostics.py b/src/ui/diagnostics/diagnostics.py
new file mode 100644
index 0000000..be00b30
--- /dev/null
+++ b/src/ui/diagnostics/diagnostics.py
@@ -0,0 +1,132 @@
+import sys
+
+from PyQt5 import QtGui, QtCore
+from PyQt5.QtCore import Qt, pyqtSlot
+from PyQt5.QtWidgets import QTableWidgetItem, QPushButton, QHeaderView, QLabel, QLineEdit
+from ui.widget import Widget
+
+
+class Diagnostics(Widget):
+ def __init__(self, parent):
+ super().__init__()
+ self.parent = parent
+ self.simulate = "--sim-io" in sys.argv
+ self.inputs = self.parent.config["digital_inputs"]
+ self.outputs = self.parent.config["digital_outputs"]
+ self.color_red = "#f00"
+ self.color_green = "#0f0"
+ headers_out = ["OUTPUT", "SET"]
+ headers_in = ["INPUT", "STATUS"]
+ r = 0
+ self.latch = [False for o in range (len(self.outputs))]
+ self.latch_in = [False for i in range(len(self.inputs))]
+
+
+ # POPULATE OUTPUT TABLE
+ self.output_tb.setColumnCount(len(headers_out))
+ self.output_tb.setHorizontalHeaderLabels(headers_out)
+ self.output_tb.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+ self.output_tb.verticalHeader().setSectionResizeMode(QHeaderView.Stretch)
+ self.output_tb.setRowCount(len(self.outputs))
+ self.output_tb.setVerticalHeaderLabels(list(self.outputs))
+ self.ICON_OK = QtGui.QPixmap("src/ui/icons/ok.png").scaled(30, 30, QtCore.Qt.KeepAspectRatio)
+ self.ICON_KO = QtGui.QPixmap("src/ui/icons/ko.png").scaled(30, 30, QtCore.Qt.KeepAspectRatio)
+ self.ICON_OFF = QtGui.QPixmap("src/ui/icons/off.png").scaled(30, 30, QtCore.Qt.KeepAspectRatio)
+ self.out_buttons=[QPushButton() for o in range(len(self.outputs))]
+ for output_name,output_idx in self.outputs.items():
+ for c, header in enumerate(headers_out):
+ if header == "ACTIVATE":
+ self.out_buttons[r].setCheckable(True)
+ self.out_buttons[r].setText("OFF")
+ self.output_tb.setCellWidget(r, c, self.out_buttons[r])
+ indexb = QtCore.QPersistentModelIndex(self.output_tb.model().index(r, c))
+ self.out_buttons[r].clicked.connect(lambda *args, index=indexb: self.plc_bit_toggle(index))
+ elif header == "OUTPUT":
+ i = QTableWidgetItem()
+ i.setText(str(output_idx))
+ self.output_tb.setItem(r, c, i)
+ r += 1
+
+ # POPULATE INPUT TABLE
+ self.input_tb.setColumnCount(len(headers_in))
+ self.input_tb.setHorizontalHeaderLabels(headers_in)
+ self.input_tb.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
+ self.input_tb.verticalHeader().setSectionResizeMode(QHeaderView.Stretch)
+ self.input_tb.setRowCount(len(self.inputs))
+ self.input_tb.setVerticalHeaderLabels(list(self.inputs))
+ r = 0
+ if self.simulate:
+ self.in_buttons = [QPushButton() for i in range(len(self.outputs))]
+ for input_name, input_idx in self.inputs.items():
+ for c, header in enumerate(headers_in):
+ if header == "STATUS":
+ if self.simulate:
+ self.in_buttons[r].setCheckable(True)
+ self.in_buttons[r].setText("OFF")
+ self.input_tb.setCellWidget(r, c, self.in_buttons[r])
+ indexb = QtCore.QPersistentModelIndex(self.input_tb.model().index(r, c))
+ self.in_buttons[r].clicked.connect(lambda *args, index=indexb: self.in_bit_toggle(index))
+ else:
+ w = QLabel()
+ w.setPixmap(self.ICON_KO)
+ self.input_tb.setCellWidget(r, c, w)
+ elif header == "INPUT":
+ i = QTableWidgetItem()
+ i.setText(str(input_idx))
+ self.input_tb.setItem(r, c, i)
+ r += 1
+ if not self.simulate:
+ self.parent.components["digital_io"].update.connect(self.update)
+
+ def plc_bit_toggle(self,bit_num):
+
+ bit_num=bit_num.row()
+ byte_idx = int(bit_num / 8)
+ bit_idx = bit_num % 8
+ if self.latch[bit_num] is True:
+ self.latch[bit_num]=False
+ self.out_buttons[bit_num].setText("OFF")
+ else:
+ self.latch[bit_num]=True
+ self.out_buttons[bit_num].setText("ON")
+ self.parent.components["digital_io"].set_bit(byte_idx, bit_idx, self.latch[bit_num])
+
+ def digital_int_update(self, bit_num, output_name):
+ row_num = bit_num.row()
+ item = self.output_tb.cellWidget(row_num, 1)
+ try:
+ value = int(item.text(), 10)
+ self.parent.components["digital_io"].set_int(output_name, value)
+ except ValueError:
+ item.setText("")
+
+ def in_bit_toggle(self, bit_num):
+ bit_num = bit_num.row()
+ byte_idx = int(bit_num / 8)
+ bit_idx = bit_num % 8
+ if self.latch_in[bit_num] is True:
+ self.latch_in[bit_num] = False
+ self.in_buttons[bit_num].setText("OFF")
+ else:
+ self.latch_in[bit_num] = True
+ self.in_buttons[bit_num].setText("ON")
+ self.parent.components["digital_io"].set_in_bit(byte_idx, bit_idx, self.latch_in[bit_num])
+
+ # UPDATE DIGITAL INPUTS DISPLAY
+ @pyqtSlot(dict)
+ def update(self, data):
+ r = 0
+ for input_name, input_idx in self.inputs.items():
+ item = self.input_tb.cellWidget(r, 1)
+ input_idx = int(input_idx)
+ byte_idx = int(input_idx / 8)
+ bit_idx = input_idx % 8
+ if data[1][byte_idx][bit_idx]:
+ item.setPixmap(self.ICON_OK)
+ else:
+ item.setPixmap(self.ICON_KO)
+ r += 1
+ pass
+
+ def closeEvent(self, event):
+ self.components["digital_io"].set_bit("")
diff --git a/src/ui/diagnostics/diagnostics.ui b/src/ui/diagnostics/diagnostics.ui
new file mode 100644
index 0000000..48fc5a4
--- /dev/null
+++ b/src/ui/diagnostics/diagnostics.ui
@@ -0,0 +1,47 @@
+
+
+ Form
+
+
+
+ 0
+ 0
+ 600
+ 600
+
+
+
+
+ 600
+ 600
+
+
+
+ Form
+
+
+ -
+
+
+ -
+
+
+ INPUTS
+
+
+
+ -
+
+
+ OUTPUTS
+
+
+
+ -
+
+
+
+
+
+
+
diff --git a/src/ui/main_window/main_window.ui b/src/ui/main_window/main_window.ui
index 5b8576c..73a6db4 100644
--- a/src/ui/main_window/main_window.ui
+++ b/src/ui/main_window/main_window.ui
@@ -25,7 +25,7 @@
0
0
843
- 31
+ 27
diff --git a/src/ui/recipe_selection/recipe_selection.py b/src/ui/recipe_selection/recipe_selection.py
index 9c7b2e1..94791ec 100755
--- a/src/ui/recipe_selection/recipe_selection.py
+++ b/src/ui/recipe_selection/recipe_selection.py
@@ -94,6 +94,7 @@ class Recipe_Selection(Widget):
self.config.get("recipes_defaults", noner)["verifica_resistenza_connettore_abilitata"]) and "resistance" not in self.unsupported_steps,
"screws": len(self.config.get("recipes_defaults", noner)["avvitatura_abilitata"]) and "screws" not in self.unsupported_steps,
"instruction": len(self.config.get("recipes_defaults", noner)["istruzione_abilitata"]) and "instruction" not in self.unsupported_steps,
+ "instruction_extra": len(self.config.get("recipes_defaults", noner)["istruzione_abilitata_extra"]) and "instruction_extra" not in self.unsupported_steps,
"leak_1": len(self.config.get("recipes_defaults", noner)["prova_tenuta_abilitata"]) and "leak_1" not in self.unsupported_steps,
"leak_2": len(self.config.get("recipes_defaults", noner)["prova_tenuta_abilitata_2"]) and "leak_2" not in self.unsupported_steps,
"vision": len(self.config.get("recipes_defaults", noner)["test_visione_abilitato"]) and "vision" not in self.unsupported_steps,
@@ -275,6 +276,9 @@ class Recipe_Selection(Widget):
if defaults is None:
global noner
defaults = self.config.get("recipes_defaults", noner)
+
+ if 'codice_prodotto' not in defaults:
+ defaults['codice_prodotto'] = "VALORE_PREDEFINITO"
if csv_path is None:
csv_path, _ = QFileDialog.getOpenFileName(
None,
@@ -319,7 +323,7 @@ class Recipe_Selection(Widget):
else:
step.save()
recipe.client = row.get("cliente", defaults["cliente"])
- recipe.part_number = row.get(part_number_field, defaults["part_number"])
+ recipe.part_number = row.get(part_number_field, defaults["codice_prodotto"])
recipe.description = row.get(description_field, defaults["descrizione"])
recipe.spec = {
"count": len(row.get("dimensione_lotto_abilitata", defaults["dimensione_lotto_abilitata"])) and "count" not in self.unsupported_steps,
@@ -377,6 +381,8 @@ class Recipe_Selection(Widget):
if len(csv_dir):
os.makedirs(csv_dir, exist_ok=True)
recipe_name_field = self.config.get("recipe", {}).get("recipe_name_field", "codice_ricetta").strip()
+ part_number_field = self.config.get("recipe", {}).get("part_number_field", "codice_prodotto").strip()
+ description_field = self.config.get("recipe", {}).get("description_field", "descrizione").strip()
barcode_enable_field = self.config.get("recipe", {}).get("barcode_enable_field", "verifica_codice_a_barre_abilitata").strip()
barcode_serial_field = self.config.get("recipe", {}).get("barcode_serial_field", "codice_a_barre").strip()
print_template_field = self.config.get("recipe", {}).get("label_template_field", "modello_etichetta").strip()
@@ -384,7 +390,8 @@ class Recipe_Selection(Widget):
fieldnames = [
recipe_name_field,
"cliente",
- "part_number",
+ part_number_field,
+ description_field,
"dimensione_lotto_abilitata",
"dimensione_lotto",
"verifica_connettore_abilitata",
@@ -434,7 +441,8 @@ class Recipe_Selection(Widget):
exportable = {
recipe_name_field: recipe.name,
"cliente": recipe.client,
- "part_number": recipe.part_number,
+ part_number_field: recipe.part_number,
+ description_field: recipe.description,
# "dimensione_lotto_abilitata": "x" if recipe.spec["count"] else "",
# "dimensione_lotto": steps["count"].spec["amount"],
"verifica_connettore_abilitata": "x" if recipe.spec["connector"] else "",
diff --git a/src/ui/recipe_spec_and_step_editor/recipe_spec_and_step_editor.py b/src/ui/recipe_spec_and_step_editor/recipe_spec_and_step_editor.py
index c34536c..c42b30d 100644
--- a/src/ui/recipe_spec_and_step_editor/recipe_spec_and_step_editor.py
+++ b/src/ui/recipe_spec_and_step_editor/recipe_spec_and_step_editor.py
@@ -59,6 +59,13 @@ class Recipe_Spec_And_Step_Editor(Editor):
"editor": Instruction_Step_Editor(),
"tab": self.instruction_t,
},
+ "instruction_extra": {
+ "type": "instruction_extra",
+ "enable": self.instruction_extra_enabled_cb,
+ "widget": "instruction_extra_editor_w",
+ "editor": Instruction_Step_Editor(),
+ "tab": self.instruction_extra_t,
+ },
"leak_1": {
"type": "leak_1",
"enable": self.leak_enabled_1_cb,
diff --git a/src/ui/recipe_spec_and_step_editor/recipe_spec_and_step_editor.ui b/src/ui/recipe_spec_and_step_editor/recipe_spec_and_step_editor.ui
index 506f39e..6852f91 100644
--- a/src/ui/recipe_spec_and_step_editor/recipe_spec_and_step_editor.ui
+++ b/src/ui/recipe_spec_and_step_editor/recipe_spec_and_step_editor.ui
@@ -38,7 +38,7 @@ Fasi di Test
-
- 0
+ 6
@@ -260,7 +260,7 @@ Fasi di Test
Montaggio
-
-
+
-
Qt::Horizontal
@@ -273,14 +273,10 @@ Fasi di Test
- -
-
-
- Fase Abilitata
-
-
+
-
+
- -
+
-
Qt::Horizontal
@@ -293,8 +289,55 @@ Fasi di Test
+ -
+
+
+ Fase Abilitata
+
+
+
+
+
+
+
+ Montaggio extra
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 572
+ 20
+
+
+
+
+ -
+
+
+ Fase Abilitata
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 571
+ 20
+
+
+
+
-
-
+
diff --git a/src/ui/test/test.py b/src/ui/test/test.py
index b4a379c..1c08976 100755
--- a/src/ui/test/test.py
+++ b/src/ui/test/test.py
@@ -106,13 +106,15 @@ class Test(Widget):
text=u"EMERGENZA INTERVENUTA - RIPRISTINARE PULSANTE E SELEZIONARE \"RESET EMERGENZA\" DAL MEN\u00d9 \"STRUMENTI\"", widget=None),
"fail": Test_Assembly(img_path=self.select_step_img("fail"), text=u"CICLO INTERROTTO, PREMERE CONTINUA PER COMINCIARE UN NUOVO CICLO", widget=Test_Fail(parent=self)),
"blow": Test_Assembly(img_path=None, text=u"SOFFIAGGIO TUBO IN CORSO - ATTENDERE...", widget=Test_Warning_Img(components=self.components, recipe=self.recipe, step=self.step)),
- "leak_1": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces, parent=self))
+ "leak_1": Test_Assembly(img_path=None, text=None, widget=Test_Leak(config=self.config,components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces, parent=self))
if self.config["hardware_config"]["tecna_t3"] != "absent" or self.config["hardware_config"]["furness_controls"] !="absent" else None,
- "leak_2": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces, parent=self))
+ "leak_2": Test_Assembly(img_path=None, text=None, widget=Test_Leak(config=self.config,components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces, parent=self))
if self.config["hardware_config"]["tecna_t3"] != "absent" or self.config["hardware_config"]["furness_controls"] != "absent" else None,
"flush": Test_Assembly(img_path=None, text=u"SCARICO ARIA IN CORSO - ATTENDERE...", widget=Test_Warning_Img(components=self.components, recipe=self.recipe, step=self.step)),
"instruction": Test_Assembly(img_path=None, text=u"ESEGUIRE LE OPERAZIONI DI MONTAGGIO INDICATE IN FIGURA",
widget=Test_Instructions(config=self.config,components=self.components, recipe=self.recipe, bench_name=self.config.machine_id, step=self.step)),
+ "instruction_extra": Test_Assembly(img_path=None, text=u"ESEGUIRE LE OPERAZIONI DI MONTAGGIO EXTRA INDICATE IN FIGURA",
+ widget=Test_Instructions(config=self.config, components=self.components,recipe=self.recipe, bench_name=self.config.machine_id,step=self.step)),
"piece_removal": Test_Assembly(img_path=None, text=u"RIMUOVERE IL PEZZO APRENDO TUTTE LE CHIUSURE",
widget=Test_Instructions(config=self.config,components=self.components, recipe=self.recipe, bench_name=self.config.machine_id, step=self.step)),
"print": Test_Assembly(img_path=self.select_step_img("print"), text=u"STAMPA ETICHETTA IN CORSO", widget=None),
@@ -375,6 +377,7 @@ class Test(Widget):
def set_recipe(self, recipe=None):
self.recipe = recipe
+ inserted_instruction = False
self.require_discard_piece = False
if self.recipe is None:
self.cycle_steps = None
@@ -397,7 +400,6 @@ class Test(Widget):
n_pieces_adapted -= 1
new_barcode_step = copy.deepcopy(step)
new_barcode_step.spec["n_pieces"] = str(n_pieces_adapted)
- n_pieces_adapted -= 1
steps.insert(i + 1, new_barcode_step)
if i in skip:
continue
@@ -437,6 +439,22 @@ class Test(Widget):
if step.type in ("leak_1", "leak_2"):
self.leak_step = step
+ step_types = [step.type for step in steps]
+ if "leak_1" in step_types and "leak_2" in step_types:
+ leak1_index = step_types.index("leak_1")
+ leak2_index = step_types.index("leak_2")
+ if leak1_index + 1 == leak2_index: # Ensure 'leak_1' is immediately followed by 'leak_2'
+ steps.insert(leak2_index, Steps(type="instruction_extra", spec={}))
+ inserted_instruction = True
+
+ # Insert 'instruction_extra' after the first 'instructions' if not inserted between leaks
+ if not inserted_instruction:
+ for i, step in enumerate(steps):
+ if step.type == "instructions":
+ steps.insert(i + 1, Steps(type="instruction_extra", spec={}))
+ inserted_instruction = True
+ break
+
if not print_found:
steps.append(Steps(type="done"))
if count_found:
diff --git a/src/ui/test_instructions/test_instructions.py b/src/ui/test_instructions/test_instructions.py
index f73fcf8..f87bce7 100644
--- a/src/ui/test_instructions/test_instructions.py
+++ b/src/ui/test_instructions/test_instructions.py
@@ -48,7 +48,11 @@ class Test_Instructions(Test_Test):
self.get_connection = self.components["digital_io"].out.connect(self.get)
if step is not None:
- svg_path=f"{self.svg_path}{self.recipe}.svg"
+ if step.type == "instruction":
+ svg_path = f"{self.svg_path}{self.recipe}.svg"
+ elif step.type == "instruction_extra":
+ svg_path = f"{self.svg_path}{self.recipe}-extra.svg"
+
if not os.path.exists(svg_path):
svg_path=f"{self.svg_path}DEFAULT.svg"
self.svg_root = etree.parse(svg_path)
@@ -74,26 +78,32 @@ class Test_Instructions(Test_Test):
for elem in self.monitored_ids:
sensor_name = elem.attrib['id']
- sensor_index = int(sensor_name.split("_")[1]) - 3
+ sensor_index_part = sensor_name.split("_")[1]
+
+ try:
+ sensor_index = int(sensor_index_part) - 3
+ except ValueError:
+ sensor_index = sensor_index_part
+
inverse = '_inv' in sensor_name
stat = '_stat' in sensor_name
if sensor_index not in self.inputs:
- continue
+ self.inputs[sensor_index] = False
if stat:
- if inverse:
- self.expected_input_state = False if step and step.type == "instruction" else True
+ if inverse and not self.inputs[sensor_index]:
self.show_ok(elem)
+ self.show_icon(elem)
else:
- self.expected_input_state = True if step and step.type == "instruction" else False
self.show_ok(elem)
+ self.show_icon(elem)
else:
if inverse:
if not self.inputs[sensor_index]:
- self.show_ok(elem)
+ self.show_ko(elem)
self.show_icon(elem)
else:
- self.show_ko(elem)
+ self.show_ok(elem)
if self.flag:
self.show_icon(elem)
else:
@@ -160,11 +170,28 @@ class Test_Instructions(Test_Test):
if len(data[0]["digital_io"])==0:
return
for sensor in self.monitored_ids:
- sensor_index = int(sensor.attrib['id'].split("_")[1])-3
- byte_idx=int(sensor_index/8)
- bit_idx=sensor_index%8
- if data[0]["digital_io"][byte_idx][bit_idx] == self.expected_input_state:
- self.inputs[sensor_index] = True
+ sensor_name = sensor.attrib['id']
+ sensor_index_part = sensor.attrib['id'].split("_")[1]
+
+ try:
+ sensor_index = int(sensor_index_part) - 3
+ except ValueError:
+ sensor_index = sensor_index_part
+
+ inverse = 'inv' in sensor_name
+ byte_idx=int(sensor_index/8) if isinstance(sensor_index, int) else None
+ bit_idx=sensor_index%8 if isinstance(sensor_index, int) else None
+ current_bitstate = data[0]["digital_io"][byte_idx][bit_idx] if isinstance(sensor_index, int) else None
+
+ if 'stat' in sensor_name:
+ continue
+
+ if isinstance(sensor_index, int):
+ if (inverse and current_bitstate != self.expected_input_state) or (not inverse and current_bitstate == self.expected_input_state):
+ self.inputs[sensor_index] = True
+ else:
+ self.inputs[sensor_index] = False
+ ok = False
else:
self.inputs[sensor_index] = False
ok = False
diff --git a/src/ui/test_instructions/test_instructions.ui b/src/ui/test_instructions/test_instructions.ui
index 736ba1c..24fc0e7 100644
--- a/src/ui/test_instructions/test_instructions.ui
+++ b/src/ui/test_instructions/test_instructions.ui
@@ -48,14 +48,7 @@
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
- -
-
-
- OK
-
-
-
- -
+
-
diff --git a/src/ui/test_leak/test_leak.py b/src/ui/test_leak/test_leak.py
index 24b77b1..4fc8bd1 100644
--- a/src/ui/test_leak/test_leak.py
+++ b/src/ui/test_leak/test_leak.py
@@ -12,13 +12,14 @@ from ui.test_test import Test_Test
VALVE_TIME=0.5
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, config,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)
self.get_connection = None
self.io_ok = True
self.blow_on = False
self.parent=parent
self.step=step
+ self.config = config
self.recipe_written = False
self.start_b.clicked.connect(self.start_test)
self.stop_b.clicked.connect(self.stop_test)
@@ -144,10 +145,15 @@ class Test_Leak(Test_Test):
# AUTO START SECOND TEST
if step.type == "leak_2":
- self.recipe_written = False
- time.sleep(1)
- self.start_b.setEnabled(True)
- self.start_b.click()
+ if self.config["hardware_config"].get("dual_chanel","absent") == "present":
+ self.recipe_written = False
+ time.sleep(1)
+ self.start_b.setEnabled(True)
+ self.start_b.click()
+ else:
+ self.recipe_written = False
+ time.sleep(1)
+ self.start_b.setEnabled(True)
return show