diff --git a/config/instruction_images/st-ten-5/5803034807.svg b/config/instruction_images/st-ten-5/5803034807.svg
new file mode 100644
index 0000000..38a60be
--- /dev/null
+++ b/config/instruction_images/st-ten-5/5803034807.svg
@@ -0,0 +1,63 @@
+
+
+
+
diff --git a/config/label_designs/E-DAILY/MB1.nlbl b/config/label_designs/E-DAILY/MB1.nlbl
new file mode 100644
index 0000000..3cdbf1f
Binary files /dev/null and b/config/label_designs/E-DAILY/MB1.nlbl differ
diff --git a/config/label_designs/E-DAILY/MB2.nlbl b/config/label_designs/E-DAILY/MB2.nlbl
index f19b246..63fd66b 100644
Binary files a/config/label_designs/E-DAILY/MB2.nlbl and b/config/label_designs/E-DAILY/MB2.nlbl differ
diff --git a/config/label_designs/E-DAILY/MI1.nlbl b/config/label_designs/E-DAILY/MI1.nlbl
index cfb77aa..f6d72b7 100644
Binary files a/config/label_designs/E-DAILY/MI1.nlbl and b/config/label_designs/E-DAILY/MI1.nlbl differ
diff --git a/config/label_designs/E-DAILY/MI2.nlbl b/config/label_designs/E-DAILY/MI2.nlbl
new file mode 100644
index 0000000..01f6a6d
Binary files /dev/null and b/config/label_designs/E-DAILY/MI2.nlbl differ
diff --git a/config/label_designs/E-DAILY/RB1.nlbl b/config/label_designs/E-DAILY/RB1.nlbl
new file mode 100644
index 0000000..7abbdf4
Binary files /dev/null and b/config/label_designs/E-DAILY/RB1.nlbl differ
diff --git a/config/label_designs/E-DAILY/RB2.nlbl b/config/label_designs/E-DAILY/RB2.nlbl
new file mode 100644
index 0000000..baaa7f5
Binary files /dev/null and b/config/label_designs/E-DAILY/RB2.nlbl differ
diff --git a/config/label_designs/E-DAILY/RM1.nlbl b/config/label_designs/E-DAILY/RM1.nlbl
new file mode 100644
index 0000000..e3bfe4f
Binary files /dev/null and b/config/label_designs/E-DAILY/RM1.nlbl differ
diff --git a/config/label_designs/E-DAILY/RM2.nlbl b/config/label_designs/E-DAILY/RM2.nlbl
new file mode 100644
index 0000000..7064b1b
Binary files /dev/null and b/config/label_designs/E-DAILY/RM2.nlbl differ
diff --git a/config/label_designs/IVECO ETA30x16/ETA30x16_203dpi.nlbl b/config/label_designs/IVECO ETA30x16/ETA30x16_203dpi.nlbl
new file mode 100644
index 0000000..48f52ff
Binary files /dev/null and b/config/label_designs/IVECO ETA30x16/ETA30x16_203dpi.nlbl differ
diff --git a/config/label_designs/STANDARD/EtichettaR5_Montaggio.nlbl b/config/label_designs/STANDARD/EtichettaR5_Montaggio.nlbl
deleted file mode 100644
index b810204..0000000
Binary files a/config/label_designs/STANDARD/EtichettaR5_Montaggio.nlbl and /dev/null differ
diff --git a/config/label_designs/STANDARD/EtichettaR5_Montaggio_1prova.nlbl b/config/label_designs/STANDARD/EtichettaR5_Montaggio_1prova.nlbl
new file mode 100644
index 0000000..6c7fffe
Binary files /dev/null and b/config/label_designs/STANDARD/EtichettaR5_Montaggio_1prova.nlbl differ
diff --git a/config/label_designs/STANDARD/EtichettaR5_Montaggio_2prove.nlbl b/config/label_designs/STANDARD/EtichettaR5_Montaggio_2prove.nlbl
index 1194762..17230df 100644
Binary files a/config/label_designs/STANDARD/EtichettaR5_Montaggio_2prove.nlbl and b/config/label_designs/STANDARD/EtichettaR5_Montaggio_2prove.nlbl differ
diff --git a/config/label_templates/ETA30x16_203dpi.prn b/config/label_templates/ETA30x16_203dpi.prn
new file mode 100644
index 0000000..4612fb0
--- /dev/null
+++ b/config/label_templates/ETA30x16_203dpi.prn
@@ -0,0 +1,14 @@
+CT~~CD,~CC^~CT~
+^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD20^JUS^LRN^CI0^XZ
+^XA
+^MMT
+^PW256
+^LL0144
+^LS0
+^FT148,125^BQN,2,4
+^FH\^FDLA,{PART}^FS
+^FT19,40^A0N,23,21^FH\^FD{PART}^FS
+^FT19,71^A0N,23,21^FH\^FDNum:{SN5}^FS
+^FT19,101^A0N,23,21^FH\^FD{DATE}^FS
+^FT19,126^A0N,23,21^FH\^FD{TIME}^FS
+^PQ1,0,1,Y^XZ
diff --git a/config/label_templates/EtichettaR5_Montaggio_1prova.prn b/config/label_templates/EtichettaR5_Montaggio_1prova.prn
new file mode 100644
index 0000000..5c86a99
--- /dev/null
+++ b/config/label_templates/EtichettaR5_Montaggio_1prova.prn
@@ -0,0 +1,45 @@
+CT~~CD,~CC^~CT~
+^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD20^JUS^LRN^CI0^XZ
+^XA
+^MMT
+^PW320
+^LL1119
+^LS0
+^FT263,1045^A0I,39,36^FH\^FDERRECINQUE^FS
+^FT209,1017^A0I,20,19^FB156,1,0,C^FH\^FDFluid System^FS
+^FT209,993^A0I,20,19^FB156,1,0,C^FH\^FDVia Meucci 31/A^FS
+^FT209,969^A0I,20,19^FB156,1,0,C^FH\^FD10079 Mappano(TO)^FS
+^FT235,932^A0I,25,24^FH\^FDCliente:^FS
+^FT233,767^A0I,20,16^FH\^FD{DD}/{MO}/{YY}^FS
+^FT104,767^A0I,20,16^FH\^FD{HH}:{MI}:{SS}^FS
+^FT302,106^A0I,31,28^FH\^FDESITO:^FS
+^FT176,106^A0I,31,28^FH\^FDCONFORME^FS
+^FT235,907^A0I,20,19^FH\^FD{CLIENT}^FS
+^FT233,878^A0I,25,24^FH\^FDNumero Disegno:^FS
+^FT233,853^A0I,20,19^FH\^FD{PART}^FS
+^FT233,792^A0I,26,24^FH\^FDData/Ora Prova^FS
+^FT233,733^A0I,25,24^FH\^FDStazione:^FS
+^FT232,824^A0I,25,24^FH\^FDN. Pezzo:^FS
+^FT130,827^A0I,20,19^FH\^FD{SN4}^FS
+^FT233,693^A0I,25,24^FH\^FDOPERATORE:^FS
+^FT138,736^A0I,23,16^FH\^FD{STATION}^FS
+^FT103,696^A0I,23,16^FH\^FD{BADGE_NUM}^FS
+^FO53,636^GB215,0,8^FS
+^FT301,578^A0I,28,26^FH\^FDProva 1:^FS
+^FT301,551^A0I,23,21^FH\^FDP. rilevata:^FS
+^FT129,548^A0I,20,19^FH\^FD{RESPSET}^FS
+^FT301,528^A0I,23,21^FH\^FDCaduta ammessa:^FS
+^FT129,526^A0I,20,19^FH\^FD{PMIN} mbar^FS
+^FT301,506^A0I,23,21^FH\^FDCaduta rilevata:^FS
+^FT141,505^A0I,20,19^FH\^FD{RESLEAK} mbar^FS
+^FT301,418^A0I,23,21^FH\^FDT.Prova^FS
+^FT113,417^A0I,20,19^FH\^FD{TTEST} s^FS
+^FT302,462^A0I,23,21^FH\^FDT.Riempim.^FS
+^FT113,465^A0I,20,19^FH\^FD{TFILL} s^FS
+^FT301,440^A0I,23,21^FH\^FDT.Stabilizzaz.^FS
+^FT113,441^A0I,20,19^FH\^FD{TSET} s^FS
+^FT308,990^A0B,23,21^FH\^FD{YY}{MO}{DD}{HH}{MI}{SS}{SN4}^FS
+^BY1,3,39^FT281,999^BCB,,N,N
+^FD>:{YY}{MO}{DD}{HH}{MI}{SS}{SN4}^FS
+^FT192,578^A0I,28,26^FH\^FD{PTEST} mbar^FS
+^PQ1,0,1,Y^XZ
diff --git a/config/label_templates/EtichettaR5_Montaggio_2prove.prn b/config/label_templates/EtichettaR5_Montaggio_2prove.prn
index ef7137e..f287468 100644
--- a/config/label_templates/EtichettaR5_Montaggio_2prove.prn
+++ b/config/label_templates/EtichettaR5_Montaggio_2prove.prn
@@ -1,70 +1,59 @@
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~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD20^JUS^LRN^CI0^XZ
^XA
^MMT
^PW320
^LL1119
^LS0
-^FT57,74^A0N,39,38^FH\^CI28^FDERRECINQUE^FS^CI27
-^FT71,102^A0N,20,20^FB249,1,5,C^FH\^CI28^FDFluid System^FS^CI27
-^FT71,127^A0N,20,20^FB249,1,5,C^FH\^CI28^FDVia Meucci 31/A^FS^CI27
-^FT71,152^A0N,20,20^FB249,1,5,C^FH\^CI28^FD10079 Mappano(TO)^FS^CI27
-^FT85,187^A0N,25,25^FH\^CI28^FDCliente:^FS^CI27
-^FT87,359^A0N,20,18^FH\^CI28^FD{DD}/{MO}/{YY}^FS^CI27
-^FT216,359^A0N,20,18^FH\^CI28^FD{HH}:{MI}:{SS}^FS^CI27
-^FT18,1013^A0N,31,30^FH\^CI28^FDESITO:^FS^CI27
-^FT144,1013^A0N,31,30^FH\^CI28^FDCONFORME^FS^CI27
-^FT85,212^A0N,20,20^FH\^CI28^FD{CLIENT}^FS^CI27
-^FT87,241^A0N,25,25^FH\^CI28^FDNumero Disegno:^FS^CI27
-^FT87,266^A0N,20,20^FH\^CI28^FD{PART}^FS^CI27
-^FT87,333^A0N,26,25^FH\^CI28^FDData/Ora Prova^FS^CI27
-^FT87,386^A0N,25,25^FH\^CI28^FDStazione:^FS^CI27
-^FT88,295^A0N,25,25^FH\^CI28^FDN. Pezzo:^FS^CI27
-^FT223,296^A0N,20,20^FH\^CI28^FD{SN4}^FS^CI27
-^FT87,426^A0N,25,25^FH\^CI28^FDOPERATORE:^FS^CI27
-^FT196,388^A0N,17,13^FH\^CI28^FD{STATION}^FS^CI27
-^FT236,427^A0N,17,13^FH\^CI28^FD{OPERATOR}^FS^CI27
-^FO52,475^GB215,0,8^FS
-^FT19,541^A0N,28,28^FH\^CI28^FDProva 2 (Alta)^FS^CI27
-^FT19,568^A0N,23,23^FH\^CI28^FDPress.Max(mbar)^FS^CI27
-^FT207,571^A0N,20,20^FH\^CI28^FD{PSETMAXP2}^FS^CI27
-^FT19,596^A0N,23,23^FH\^CI28^FDPress.Min(mbar)^FS^CI27
-^FT207,599^A0N,20,20^FH\^CI28^FD{PSETMINP2}^FS^CI27
-^FT19,626^A0N,23,23^FH\^CI28^FDCaduta(mbar)^FS^CI27
-^FT207,629^A0N,20,20^FH\^CI28^FD{RESLEAK2}^FS^CI27
-^FT19,668^A0N,28,28^FH\^CI28^FDProva 1 (Bassa)^FS^CI27
-^FT19,695^A0N,23,23^FH\^CI28^FDPress.Max(mbar)^FS^CI27
-^FT207,698^A0N,20,20^FH\^CI28^FD{PSETMAXP}^FS^CI27
-^FT19,723^A0N,23,23^FH\^CI28^FDPress.Min(mbar)^FS^CI27
-^FT207,726^A0N,20,20^FH\^CI28^FD{PSETMINP}^FS^CI27
-^FT19,753^A0N,23,23^FH\^CI28^FDCaduta(mbar)^FS^CI27
-^FT207,756^A0N,20,20^FH\^CI28^FD{RESLEAK}^FS^CI27
-^FT19,851^A0N,23,23^FH\^CI28^FDT.Pulizia(sec)^FS^CI27
-^FT207,854^A0N,20,20^FH\^CI28^FD{PSETMAXP}^FS^CI27
-^FT18,879^A0N,23,23^FH\^CI28^FDT.Riempim.(sec)^FS^CI27
-^FT207,882^A0N,20,20^FH\^CI28^FD{PSETMINP}^FS^CI27
-^FT19,909^A0N,23,23^FH\^CI28^FDT.Stabilizzaz.(sec)^FS^CI27
-^FT207,912^A0N,20,20^FH\^CI28^FD{RESLEAK}^FS^CI27
-^FT19,941^A0N,23,23^FH\^CI28^FDCaduta Tollerata max:^FS^CI27
-^FT18,969^A0N,20,20^FH\^CI28^FD{PMIN} bar^FS^CI27
-^FT12,129^A0R,23,23^FH\^CI28^FD{YY}{MO}{DD}{HH}{MI}{SS}{SN4}^FS^CI27
-^BY1,3,39^FT39,120^BCR,,N,N
-^FH\^FD>:{YY}{MO}{DD}{HH}{MI}{SS}{SN4}^FS
-^PQ1,0,1,Y
-^XZ
+^FT263,1045^A0I,39,36^FH\^FDERRECINQUE^FS
+^FT209,1017^A0I,20,19^FB156,1,0,C^FH\^FDFluid System^FS
+^FT209,993^A0I,20,19^FB156,1,0,C^FH\^FDVia Meucci 31/A^FS
+^FT209,969^A0I,20,19^FB156,1,0,C^FH\^FD10079 Mappano(TO)^FS
+^FT235,932^A0I,25,24^FH\^FDCliente:^FS
+^FT233,767^A0I,20,16^FH\^FD{DD}/{MO}/{YY}^FS
+^FT104,767^A0I,20,16^FH\^FD{HH}:{MI}:{SS}^FS
+^FT302,106^A0I,31,28^FH\^FDESITO:^FS
+^FT176,106^A0I,31,28^FH\^FDCONFORME^FS
+^FT235,907^A0I,20,19^FH\^FD{CLIENT}^FS
+^FT233,878^A0I,25,24^FH\^FDNumero Disegno:^FS
+^FT233,853^A0I,20,19^FH\^FD{PART}^FS
+^FT233,792^A0I,26,24^FH\^FDData/Ora Prova^FS
+^FT233,733^A0I,25,24^FH\^FDStazione:^FS
+^FT232,824^A0I,25,24^FH\^FDN. Pezzo:^FS
+^FT136,826^A0I,23,24^FH\^FD{SN4}^FS
+^FT233,693^A0I,25,24^FH\^FDOPERATORE:^FS
+^FT140,736^A0I,23,16^FH\^FD{STATION}^FS
+^FT103,696^A0I,23,16^FH\^FD{BADGE_NUM}^FS
+^FO53,636^GB215,0,8^FS
+^FT301,578^A0I,28,26^FH\^FDProva 1:^FS
+^FT301,551^A0I,23,21^FH\^FDP. rilevata:^FS
+^FT129,548^A0I,20,19^FH\^FD{RESPSET}^FS
+^FT301,528^A0I,23,21^FH\^FDCaduta ammessa:^FS
+^FT129,526^A0I,20,19^FH\^FD{PMIN} mbar^FS
+^FT301,506^A0I,23,21^FH\^FDCaduta rilevata:^FS
+^FT141,505^A0I,20,19^FH\^FD{RESLEAK} mbar^FS
+^FT301,418^A0I,23,21^FH\^FDT.Prova^FS
+^FT113,417^A0I,20,19^FH\^FD{TTEST} s^FS
+^FT302,462^A0I,23,21^FH\^FDT.Riempim.^FS
+^FT113,465^A0I,20,19^FH\^FD{TFILL} s^FS
+^FT301,440^A0I,23,21^FH\^FDT.Stabilizzaz.^FS
+^FT113,441^A0I,20,19^FH\^FD{TSET} s^FS
+^FT308,990^A0B,23,21^FH\^FD{YY}{MO}{DD}{HH}{MI}{SS}{SN4}^FS
+^BY1,3,39^FT281,999^BCB,,N,N
+^FD>:{YY}{MO}{DD}{HH}{MI}{SS}{SN4}^FS
+^FT192,578^A0I,28,26^FH\^FD{PTEST} mbar^FS
+^FT301,344^A0I,28,26^FH\^FDProva 2:^FS
+^FT301,317^A0I,23,21^FH\^FDP. rilevata:^FS
+^FT129,314^A0I,20,19^FH\^FD{RESPSET2}^FS
+^FT301,294^A0I,23,21^FH\^FDCaduta ammessa:^FS
+^FT129,293^A0I,20,19^FH\^FD{PMIN2} mbar^FS
+^FT301,272^A0I,23,21^FH\^FDCaduta rilevata:^FS
+^FT141,271^A0I,20,19^FH\^FD{RESLEAK2} mbar^FS
+^FT301,185^A0I,23,21^FH\^FDT.Prova^FS
+^FT113,184^A0I,20,19^FH\^FD{TTEST2} s^FS
+^FT302,228^A0I,23,21^FH\^FDT.Riempim.^FS
+^FT113,231^A0I,20,19^FH\^FD{TFILL2} s^FS
+^FT301,207^A0I,23,21^FH\^FDT.Stabilizzaz.^FS
+^FT113,208^A0I,20,19^FH\^FD{TSET2} s^FS
+^FT192,344^A0I,28,26^FH\^FD{PTEST2} mbar^FS
+^PQ1,0,1,Y^XZ
diff --git a/config/label_templates/MB1.prn b/config/label_templates/MB1.prn
new file mode 100644
index 0000000..bdca4c9
--- /dev/null
+++ b/config/label_templates/MB1.prn
@@ -0,0 +1,38 @@
+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
+^PW679
+^LL200
+^LS0
+^FT137,171^A0B,42,41^FH\^CI28^FDMB 1^FS^CI27
+^FO148,111^GB8,61,4^FS
+^FT394,171^A0B,42,41^FH\^CI28^FDMB 1^FS^CI27
+^FO405,111^GB8,61,4^FS
+^FT239,59^A0R,42,41^FH\^CI28^FDMB 1^FS^CI27
+^FO220,57^GB8,61,4^FS
+^FT504,59^A0R,42,41^FH\^CI28^FDMB 1^FS^CI27
+^FO485,57^GB8,61,4^FS
+^LRY^FO2,1^GB676,0,198^FS^LRN
+^LRY^FO100,57^GB56,0,53^FS^LRN
+^LRY^FO357,57^GB56,0,53^FS^LRN
+^LRY^FO220,119^GB56,0,53^FS^LRN
+^LRY^FO485,119^GB56,0,53^FS^LRN
+^PQ1,0,1,Y
+^XZ
diff --git a/config/label_templates/MB2.prn b/config/label_templates/MB2.prn
new file mode 100644
index 0000000..5024873
--- /dev/null
+++ b/config/label_templates/MB2.prn
@@ -0,0 +1,38 @@
+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
+^PW679
+^LL200
+^LS0
+^FT137,171^A0B,42,41^FH\^CI28^FDMB 2^FS^CI27
+^FO148,111^GB8,61,4^FS
+^FT394,171^A0B,42,41^FH\^CI28^FDMB 2^FS^CI27
+^FO405,111^GB8,61,4^FS
+^FT239,59^A0R,42,41^FH\^CI28^FDMB 2^FS^CI27
+^FO220,57^GB8,61,4^FS
+^FT504,59^A0R,42,41^FH\^CI28^FDMB 2^FS^CI27
+^FO485,57^GB8,61,4^FS
+^LRY^FO2,1^GB676,0,198^FS^LRN
+^LRY^FO100,57^GB56,0,53^FS^LRN
+^LRY^FO357,57^GB56,0,53^FS^LRN
+^LRY^FO220,119^GB56,0,53^FS^LRN
+^LRY^FO485,119^GB56,0,53^FS^LRN
+^PQ1,0,1,Y
+^XZ
diff --git a/config/label_templates/MI1.prn b/config/label_templates/MI1.prn
index 11cdb0f..6658d73 100644
--- a/config/label_templates/MI1.prn
+++ b/config/label_templates/MI1.prn
@@ -10,7 +10,7 @@
^LH0,0
^JMA
^PR2,2
-~SD20
+~SD25
^JUS
^LRN
^CI27
@@ -18,21 +18,21 @@
^XZ
^XA
^MMT
-^PW575
-^LL288
+^PW679
+^LL200
^LS0
-^FT120,224^A0B,68,68^FH\^CI28^FDMI 1^FS^CI27
-^FO133,145^GB8,79,4^FS
-^FT198,69^A0R,68,68^FH\^CI28^FDMI 1^FS^CI27
-^FO178,69^GB8,79,4^FS
-^FT371,224^A0B,68,68^FH\^CI28^FDMI 1^FS^CI27
-^FO384,145^GB8,79,4^FS
-^FT449,69^A0R,68,68^FH\^CI28^FDMI 1^FS^CI27
-^FO428,69^GB8,79,4^FS
-^LRY^FO52,86^GB89,0,59^FS^LRN
-^LRY^FO178,149^GB89,0,59^FS^LRN
-^LRY^FO303,86^GB89,0,59^FS^LRN
-^LRY^FO428,149^GB89,0,59^FS^LRN
-^LRY^FO0,0^GB575,288,145^FS^LRN
+^FT137,161^A0B,42,41^FH\^CI28^FDMI 1^FS^CI27
+^FO148,111^GB8,61,4^FS
+^FT394,161^A0B,42,41^FH\^CI28^FDMI 1^FS^CI27
+^FO405,111^GB8,61,4^FS
+^FT239,64^A0R,42,41^FH\^CI28^FDMI 1^FS^CI27
+^FO220,57^GB8,61,4^FS
+^FT506,69^A0R,42,41^FH\^CI28^FDMI 1^FS^CI27
+^FO487,60^GB8,61,4^FS
+^LRY^FO2,1^GB676,0,198^FS^LRN
+^LRY^FO100,57^GB56,0,53^FS^LRN
+^LRY^FO357,57^GB56,0,53^FS^LRN
+^LRY^FO220,119^GB56,0,53^FS^LRN
+^LRY^FO487,121^GB56,0,53^FS^LRN
^PQ1,0,1,Y
^XZ
diff --git a/config/label_templates/MI2.prn b/config/label_templates/MI2.prn
new file mode 100644
index 0000000..f2d8e36
--- /dev/null
+++ b/config/label_templates/MI2.prn
@@ -0,0 +1,38 @@
+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
+^PW679
+^LL200
+^LS0
+^FT137,161^A0B,42,41^FH\^CI28^FDMI 2^FS^CI27
+^FO148,111^GB8,61,4^FS
+^FT394,161^A0B,42,41^FH\^CI28^FDMI 2^FS^CI27
+^FO405,111^GB8,61,4^FS
+^FT239,64^A0R,42,41^FH\^CI28^FDMI 2^FS^CI27
+^FO220,57^GB8,61,4^FS
+^FT506,69^A0R,42,41^FH\^CI28^FDMI 2^FS^CI27
+^FO487,60^GB8,61,4^FS
+^LRY^FO2,1^GB676,0,198^FS^LRN
+^LRY^FO100,57^GB56,0,53^FS^LRN
+^LRY^FO357,57^GB56,0,53^FS^LRN
+^LRY^FO220,119^GB56,0,53^FS^LRN
+^LRY^FO487,121^GB56,0,53^FS^LRN
+^PQ1,0,1,Y
+^XZ
diff --git a/config/label_templates/RB1.prn b/config/label_templates/RB1.prn
new file mode 100644
index 0000000..d4a25c6
--- /dev/null
+++ b/config/label_templates/RB1.prn
@@ -0,0 +1,38 @@
+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
+^PW679
+^LL200
+^LS0
+^FT393,174^A0B,42,43^FH\^CI28^FDRB 1^FS^CI27
+^FO404,113^GB8,61,4^FS
+^FT138,174^A0B,42,43^FH\^CI28^FDRB 1^FS^CI27
+^FO149,113^GB8,61,4^FS
+^FT245,59^A0R,42,43^FH\^CI28^FDRB 1^FS^CI27
+^FO226,57^GB8,61,4^FS
+^FT501,59^A0R,42,43^FH\^CI28^FDRB 1^FS^CI27
+^FO484,57^GB8,61,4^FS
+^LRY^FO2,1^GB676,0,198^FS^LRN
+^LRY^FO356,57^GB56,0,56^FS^LRN
+^LRY^FO101,57^GB56,0,56^FS^LRN
+^LRY^FO226,118^GB56,0,56^FS^LRN
+^LRY^FO484,118^GB56,0,56^FS^LRN
+^PQ1,0,1,Y
+^XZ
diff --git a/config/label_templates/RB2.prn b/config/label_templates/RB2.prn
new file mode 100644
index 0000000..d88ff51
--- /dev/null
+++ b/config/label_templates/RB2.prn
@@ -0,0 +1,38 @@
+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
+^PW679
+^LL200
+^LS0
+^FT393,174^A0B,42,43^FH\^CI28^FDRB 2^FS^CI27
+^FO404,113^GB8,61,4^FS
+^FT138,174^A0B,42,43^FH\^CI28^FDRB 2^FS^CI27
+^FO149,113^GB8,61,4^FS
+^FT245,59^A0R,42,43^FH\^CI28^FDRB 2^FS^CI27
+^FO226,57^GB8,61,4^FS
+^FT501,59^A0R,42,43^FH\^CI28^FDRB 2^FS^CI27
+^FO484,57^GB8,61,4^FS
+^LRY^FO2,1^GB676,0,198^FS^LRN
+^LRY^FO356,57^GB56,0,56^FS^LRN
+^LRY^FO101,57^GB56,0,56^FS^LRN
+^LRY^FO226,118^GB56,0,56^FS^LRN
+^LRY^FO484,118^GB56,0,56^FS^LRN
+^PQ1,0,1,Y
+^XZ
diff --git a/config/label_templates/RM1.prn b/config/label_templates/RM1.prn
new file mode 100644
index 0000000..30099ea
--- /dev/null
+++ b/config/label_templates/RM1.prn
@@ -0,0 +1,38 @@
+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
+^PW679
+^LL200
+^LS0
+^FT139,175^A0B,42,43^FH\^CI28^FDRM 1^FS^CI27
+^FO149,109^GB8,66,4^FS
+^FT245,50^A0R,42,43^FH\^CI28^FDRM 1^FS^CI27
+^FO226,53^GB8,66,4^FS
+^FT397,175^A0B,42,43^FH\^CI28^FDRM 1^FS^CI27
+^FO407,109^GB8,66,4^FS
+^FT503,50^A0R,42,43^FH\^CI28^FDRM 1^FS^CI27
+^FO484,53^GB8,66,4^FS
+^LRY^FO2,1^GB676,0,198^FS^LRN
+^LRY^FO101,54^GB56,0,56^FS^LRN
+^LRY^FO226,119^GB56,0,56^FS^LRN
+^LRY^FO359,54^GB56,0,56^FS^LRN
+^LRY^FO484,119^GB56,0,56^FS^LRN
+^PQ1,0,1,Y
+^XZ
diff --git a/config/label_templates/RM2.prn b/config/label_templates/RM2.prn
new file mode 100644
index 0000000..d69b69a
--- /dev/null
+++ b/config/label_templates/RM2.prn
@@ -0,0 +1,38 @@
+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
+^PW679
+^LL200
+^LS0
+^FT139,175^A0B,42,43^FH\^CI28^FDRM 2^FS^CI27
+^FO149,109^GB8,66,4^FS
+^FT245,50^A0R,42,43^FH\^CI28^FDRM 2^FS^CI27
+^FO226,53^GB8,66,4^FS
+^FT397,175^A0B,42,43^FH\^CI28^FDRM 2^FS^CI27
+^FO407,109^GB8,66,4^FS
+^FT503,50^A0R,42,43^FH\^CI28^FDRM 2^FS^CI27
+^FO484,53^GB8,66,4^FS
+^LRY^FO2,1^GB676,0,198^FS^LRN
+^LRY^FO101,54^GB56,0,56^FS^LRN
+^LRY^FO226,119^GB56,0,56^FS^LRN
+^LRY^FO359,54^GB56,0,56^FS^LRN
+^LRY^FO484,119^GB56,0,56^FS^LRN
+^PQ1,0,1,Y
+^XZ
diff --git a/config/machine_settings/defaults.ini b/config/machine_settings/defaults.ini
index 1a5e2f4..05d7447 100644
--- a/config/machine_settings/defaults.ini
+++ b/config/machine_settings/defaults.ini
@@ -8,6 +8,7 @@ digital_io: absent
second_leak_test: absent
; archive_synchronizer: present
; label_printer: present
+; extra_label_printer: absent
; multicomp: present
; neo_pixels: present
; remote_api: present
@@ -61,7 +62,7 @@ printer: ttp247
[tecna_t3]
model: t3l
-; port: ?
+port: COM4
baudrate: 115200
admin_pin: 603
modify_pin: 603
@@ -114,7 +115,6 @@ r nominale: 1000000000
tolleranza_resistenza_pos: 10
tolleranza_resistenza_neg: 5
prova_tenuta_abilitata: x
-config_elettrovalvole: 0
warning_img:
tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000
@@ -124,23 +124,25 @@ percentuale_minima_pressione_assestamento: 5
percentuale_massima_pressione_assestamento: 5
tempo_di_test: 10
pressione_di_test_delta_minimo: 30
-pressione_di_test: 15000
+pressione_di_test: 1111
pressione_di_test_delta_massimo: 30
tempo_svuotamento: 1
-pressione_svuotmento: 100
+pressione_svuotamento: 100
+config_elettrovalvole: 0
prova_tenuta_abilitata_2:
tempo_pre_riempimento_2: 0
pressione_pre_riempimento_2: 1000
-tempo_riempimento_2: 5
-tempo_assestamento_2: 5
+tempo_riempimento_2: 10
+tempo_assestamento_2: 10
percentuale_minima_pressione_assestamento_2: 5
percentuale_massima_pressione_assestamento_2: 5
-tempo_di_test_2: 5
+tempo_di_test_2: 10
pressione_di_test_delta_minimo_2: 200
-pressione_di_test_2: 1000
+pressione_di_test_2: 2222
pressione_di_test_delta_massimo_2: 200
tempo_svuotamento_2: 1
-pressione_svuotmento_2: 100
+pressione_svuotamento_2: 100
+config_elettrovalvole_2: 0
test_visione_abilitato:
ricetta_visione: termorestringente_923578.ini
stampa_etichetta_abilitata: x
diff --git a/config/machine_settings/st-ten-5.ini b/config/machine_settings/st-ten-5.ini
index caf8e99..735d609 100644
--- a/config/machine_settings/st-ten-5.ini
+++ b/config/machine_settings/st-ten-5.ini
@@ -6,6 +6,7 @@ description = ST-TEN-5 IVECO DAILY ELETTRICO
archive_synchronizer: absent
uvc_camera: absent
label_printer: present
+extra_label_printer: present
remote_api: absent
tecna_t3: present
digital_io: present
@@ -16,7 +17,7 @@ model: t3l
[recipe]
recipe_name_field: codice_ricetta
-part_number_field: codice_prodotto
+part_number_field: codice_ricetta
label_template_field: modello_etichetta
description_field: descrizione
@@ -33,6 +34,8 @@ printer: xlp504
id: USB-5862,BID#0
[recipes_defaults]
+
+
codice_ricetta: specificare ricetta
cliente: IVECO
part_number: specificare part number
@@ -48,17 +51,17 @@ numero sensori presenza (sp):0
prova_tenuta_abilitata: x
tempo_pre_riempimento: 0
-pressione_pre_riempimento: 1000
-tempo_riempimento: 10
+pressione_pre_riempimento: 5000
+tempo_riempimento: 5
tempo_assestamento: 10
percentuale_minima_pressione_assestamento: 5
percentuale_massima_pressione_assestamento: 5
tempo_di_test: 10
pressione_di_test_delta_minimo: 30
-pressione_di_test: 6000
+pressione_di_test: 5000
pressione_di_test_delta_massimo: 30
tempo_svuotamento: 1
-pressione_svuotmento: 100
+pressione_svuotamento: 100
prova_tenuta_abilitata_2:
tempo_pre_riempimento_2: 0
@@ -72,8 +75,8 @@ pressione_di_test_delta_minimo_2: 200
pressione_di_test_2: 1000
pressione_di_test_delta_massimo_2: 200
tempo_svuotamento_2: 1
-pressione_svuotmento_2: 100
+pressione_svuotamento_2: 100
stampa_etichetta_abilitata: x
-modello_etichetta: ETA30x16.prn
+modello_etichetta: ETA30x16_203dpi.prn
descrizione: inserire descrizione ricetta
\ No newline at end of file
diff --git a/config/machine_settings/st-ten-6.ini b/config/machine_settings/st-ten-6.ini
index 4eff422..fda6a0b 100644
--- a/config/machine_settings/st-ten-6.ini
+++ b/config/machine_settings/st-ten-6.ini
@@ -2,7 +2,7 @@
description = ST-TEN-6 DOPPIA PROVA PRESSIONE 6/20 BAR
[hardware_config]
-archive_synchronizer: absent
+archive_synchronizer: present
; galaxy_camera: present
uvc_camera: present
label_printer: present
@@ -27,31 +27,37 @@ recipe_name_field: codice_ricetta
part_number_field: codice_prodotto
label_template_field: modello_etichetta
description_field: descrizione
+
+[recipes_defaults]
+dimensione_lotto_abilitata:
tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000
-tempo_riempimento: 10
-tempo_assestamento: 10
+tempo_riempimento: 15
+tempo_assestamento: 15
+tempo_di_test: 10
percentuale_minima_pressione_assestamento: 5
percentuale_massima_pressione_assestamento: 5
-tempo_di_test: 10
pressione_di_test_delta_minimo: 30
-pressione_di_test: 15000
+pressione_di_test: 7000
pressione_di_test_delta_massimo: 30
tempo_svuotamento: 1
-pressione_svuotmento: 100
-prova_tenuta_abilitata_2: x
+pressione_svuotamento: 100
+config_elettrovalvole: 1
+prova_tenuta_abilitata_2:
tempo_pre_riempimento_2: 0
pressione_pre_riempimento_2: 1000
-tempo_riempimento_2: 5
-tempo_assestamento_2: 5
+tempo_riempimento_2: 15
+tempo_assestamento_2: 15
+tempo_di_test_2: 10
percentuale_minima_pressione_assestamento_2: 5
percentuale_massima_pressione_assestamento_2: 5
-tempo_di_test_2: 5
-pressione_di_test_delta_minimo_2: 200
-pressione_di_test_2: 1000
-pressione_di_test_delta_massimo_2: 200
+pressione_di_test_delta_minimo_2: 30
+pressione_di_test_2: 15000
+pressione_di_test_delta_massimo_2: 30
tempo_svuotamento_2: 1
-pressione_svuotmento_2: 100
+pressione_svuotamento_2: 100
+config_elettrovalvole_2: 2
+modello_etichetta: EtichettaR5_Montaggio_1prova.prn
[label_printer]
platform: windows
diff --git a/make_desktop_file.bat b/make_desktop_file.bat
index 8ac5c12..7e87391 100644
--- a/make_desktop_file.bat
+++ b/make_desktop_file.bat
@@ -2,7 +2,7 @@ set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"
echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
echo sLinkFile = "%USERPROFILE%\Desktop\AVVIO PROGRAMMA COLLAUDO.lnk" >> %SCRIPT%
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
-echo oLink.TargetPath = "%userprofile%\PycharmProjects\st-ten-1\runme.sh" >> %SCRIPT%
+echo oLink.TargetPath = "%userprofile%\PycharmProjects\st-ten-1\runme.bat" >> %SCRIPT%
echo oLink.IconLocation = "%userprofile%\PycharmProjects\st-ten-1\src\ui\imgs\neo.ico"
echo oLink.Save >> %SCRIPT%
cscript /nologo %SCRIPT%
diff --git a/runme.bat b/runme.bat
new file mode 100644
index 0000000..0e1d578
--- /dev/null
+++ b/runme.bat
@@ -0,0 +1,4 @@
+echo on
+SET mypath=%~dp0
+cd %mypath%
+.\venv\Scripts\activate.bat && python -O "./src/main.py" --no-edgetpu --no-tflite --no-autotest
diff --git a/src/components/dummies/libbiodaq/libbiodaq.py b/src/components/dummies/libbiodaq/libbiodaq.py
index c03b0c1..53c39a0 100644
--- a/src/components/dummies/libbiodaq/libbiodaq.py
+++ b/src/components/dummies/libbiodaq/libbiodaq.py
@@ -1,7 +1,7 @@
from ctypes import (CFUNCTYPE, POINTER, byref, c_char, c_int32, c_uint8,
c_void_p, cast, create_string_buffer, pointer)
-
+from src.components.Automation.BDaq import *
buffer = {}
out_data =[0b00000101,0b00000101]
@@ -25,7 +25,7 @@ def InstantDoCtrl_WriteBit(useless, byte, bit, val):
b = int(int.from_bytes(val, "big") != 0) << bit
buffer[byte] &= 0b11111111 & ~(1 << bit)
buffer[byte] |= b
- return 0
+ return ErrorCode.Success
@CFUNCTYPE(c_void_p)
diff --git a/src/components/usb_586x.py b/src/components/usb_586x.py
index 4d1f1e1..0b6e870 100644
--- a/src/components/usb_586x.py
+++ b/src/components/usb_586x.py
@@ -12,14 +12,14 @@ is_win = platform.system() == "Windows"
if "--sim-io" not in sys.argv:
if is_win:
- from Automation.BDaq import *
- from Automation.BDaq.InstantDoCtrl import InstantDoCtrl
- from Automation.BDaq.InstantDiCtrl import InstantDiCtrl
+ from components.Automation.BDaq import *
+ from components.Automation.BDaq.InstantDoCtrl import InstantDoCtrl
+ from components.Automation.BDaq.InstantDiCtrl import InstantDiCtrl
else:
libbiodaq = ctypes.CDLL("/opt/advantech/libs/libbiodaq.so")
else:
is_win=False
- import src.components.dummies.libbiodaq as libbiodaq
+ import components.dummies.libbiodaq as libbiodaq
class USB_586x(Component):
@@ -36,7 +36,7 @@ class USB_586x(Component):
def __init__(self, config=None, name=None, period=1, lazy=True, paused=False, threaded=True):
super().__init__(config=config, name=name, period=period, lazy=lazy, paused=paused, threaded=threaded)
self.mutex = QMutex()
-
+ self.simulate="--sim-io" in sys.argv
# DEVICE INFORMATION
self.id=config["digital_io"]["id"]
if "5860" in self.id:
@@ -147,7 +147,7 @@ class USB_586x(Component):
read = []
if is_win:
ret = self.di_read(0, self.in_size)
- if ret[0] == ErrorCode.Success:
+ if ret[0].value == ErrorCode.Success.value:
self.buffer = ret[1]
for byte_num in range(len(self.buffer)):
byte = self.buffer[byte_num]
@@ -192,8 +192,8 @@ class USB_586x(Component):
retry=0
max_retry = 3
while not ok and retry
- -
-
-
- Campo testo 5
-
-
-
-
@@ -132,6 +125,30 @@
+ -
+
+
+ Campo testo 5
+
+
+
+ -
+
+
+ Etichette supplementari
+
+
+
+ -
+
+
+
+ 200
+ 0
+
+
+
+
diff --git a/src/ui/recipe_selection/recipe_selection.py b/src/ui/recipe_selection/recipe_selection.py
index 7d1e598..6410378 100755
--- a/src/ui/recipe_selection/recipe_selection.py
+++ b/src/ui/recipe_selection/recipe_selection.py
@@ -91,8 +91,8 @@ class Recipe_Selection(Widget):
"resistance": len(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,
- "leak_1": len(self.config.get("recipes_defaults", noner)["prova_tenuta_abilitata"]) and "leak" not in self.unsupported_steps,
- "leak_2": len(self.config.get("recipes_defaults", noner)["prova_tenuta_abilitata_2"]) and "leak" 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,
"print": len(self.config.get("recipes_defaults", noner)["stampa_etichetta_abilitata"]) and "print" not in self.unsupported_steps,
"step_editors": step_defaults,
@@ -209,8 +209,8 @@ class Recipe_Selection(Widget):
},
"instruction": {
"num_tape": int(self.get_def(row,"numero nastri (n)")),
- "num_piece": int(self.get_def(row,"numero sensori anello (sa)")),
- "num_ring": int(self.get_def(row,"numero sensori presenza (sp)"))
+ "num_ring": int(self.get_def(row,"numero sensori anello (sa)")),
+ "num_piece": int(self.get_def(row,"numero sensori presenza (sp)"))
},
"leak_1": {
"pre_filling_time": int(row.get("tempo_pre_riempimento", defaults["tempo_pre_riempimento"])),
@@ -224,7 +224,7 @@ class Recipe_Selection(Widget):
"test_pressure": int(row.get("pressione_di_test", defaults["pressione_di_test"])),
"test_pressure_max_delta": int(row.get("pressione_di_test_delta_massimo", defaults["pressione_di_test_delta_massimo"])),
"flush_time": int(row.get("tempo_svuotamento", defaults["tempo_svuotamento"])),
- "flush_pressure": int(row.get("pressione_svuotmento", defaults["pressione_svuotmento"])),
+ "flush_pressure": int(row.get("pressione_svuotamento", defaults["pressione_svuotamento"])),
"relay_config": int(row.get("config_elettrovalvole", defaults["config_elettrovalvole"]))
},
"leak_2": {
@@ -239,8 +239,8 @@ class Recipe_Selection(Widget):
"test_pressure": int(row.get("pressione_di_test_2", defaults["pressione_di_test_2"])),
"test_pressure_max_delta": int(row.get("pressione_di_test_delta_massimo_2", defaults["pressione_di_test_delta_massimo_2"])),
"flush_time": int(row.get("tempo_svuotamento_2", defaults["tempo_svuotamento_2"])),
- "flush_pressure": int(row.get("pressione_svuotmento_2", defaults["pressione_svuotmento_2"])),
- "relay_config": int(row.get("config_elettrovalvole", defaults["config_elettrovalvole"]))
+ "flush_pressure": int(row.get("pressione_svuotamento_2", defaults["pressione_svuotamento_2"])),
+ "relay_config": int(row.get("config_elettrovalvole_2", defaults["config_elettrovalvole_2"]))
},
"vision": {
"recipe": row.get("ricetta_visione", defaults["ricetta_visione"]),
@@ -252,6 +252,7 @@ class Recipe_Selection(Widget):
"labeltxt_3": row.get("testo_etich_3", ""),
"labeltxt_4": row.get("testo_etich_4", ""),
"labeltxt_5": row.get("testo_etich_5", ""),
+ "extra_label": row.get("etichette_supplementari", ""),
},
}
@@ -296,7 +297,8 @@ class Recipe_Selection(Widget):
recipe_is_new = True
for step_name, step_spec in steps_specs.items():
step = steps[step_name]
- step.type = re.sub(r"^(.*)_[0-9]+$", r"\1", step_name)
+ #step.type = re.sub(r"^(.*)_[0-9]+$", r"\1", step_name)
+ step.type = step_name
step.spec = step_spec
if recipe_is_new:
step.save(force_insert=True)
@@ -312,8 +314,8 @@ class Recipe_Selection(Widget):
"resistance": len(row.get("verifica_resistenza_connettore_abilitata", defaults["verifica_resistenza_connettore_abilitata"])) and "resistance" not in self.unsupported_steps,
"screws": len(row.get("avvitatura_abilitata", defaults["avvitatura_abilitata"])) and "screws" not in self.unsupported_steps,
"instruction": len(row.get("istruzione_abilitata", defaults["istruzione_abilitata"])) and "instruction" not in self.unsupported_steps,
- "leak_1": len(row.get("prova_tenuta_abilitata", defaults["prova_tenuta_abilitata"])) and "leak" not in self.unsupported_steps,
- "leak_2": len(row.get("prova_tenuta_abilitata_2", defaults["prova_tenuta_abilitata_2"])) and "leak" not in self.unsupported_steps,
+ "leak_1": len(row.get("prova_tenuta_abilitata", defaults["prova_tenuta_abilitata"])) and "leak_1" not in self.unsupported_steps,
+ "leak_2": len(row.get("prova_tenuta_abilitata_2", defaults["prova_tenuta_abilitata_2"])) and "leak_2" not in self.unsupported_steps,
"vision": len(row.get("test_visione_abilitato", defaults["test_visione_abilitato"])) and "vision" not in self.unsupported_steps,
"print": len(row.get("stampa_etichetta_abilitata", defaults["stampa_etichetta_abilitata"])) and "print" not in self.unsupported_steps,
"steps": [], # should be pks of the enabled steps
@@ -392,7 +394,7 @@ class Recipe_Selection(Widget):
"pressione_di_test",
"pressione_di_test_delta_massimo",
"tempo_svuotamento",
- "pressione_svuotmento",
+ "pressione_svuotamento",
"prova_tenuta_abilitata_2",
"tempo_pre_riempimento_2",
"pressione_pre_riempimento_2",
@@ -405,7 +407,7 @@ class Recipe_Selection(Widget):
"pressione_di_test_2",
"pressione_di_test_delta_massimo_2",
"tempo_svuotamento_2",
- "pressione_svuotmento_2",
+ "pressione_svuotamento_2",
"test_visione_abilitato",
"ricetta_visione",
"stampa_etichetta_abilitata",
@@ -442,7 +444,7 @@ class Recipe_Selection(Widget):
"pressione_di_test": steps["leak_1"].spec["test_pressure"],
"pressione_di_test_delta_massimo": steps["leak_1"].spec["test_pressure_max_delta"],
"tempo_svuotamento": steps["leak_1"].spec["flush_time"],
- "pressione_svuotmento": steps["leak_1"].spec["flush_pressure"],
+ "pressione_svuotamento": steps["leak_1"].spec["flush_pressure"],
"prova_tenuta_abilitata_2": "x" if recipe.spec["leak_2"] else "",
"tempo_pre_riempimento_2": steps["leak_2"].spec["pre_filling_time"],
"pressione_pre_riempimento_2": steps["leak_2"].spec["pre_filling_pressure"],
@@ -455,7 +457,7 @@ class Recipe_Selection(Widget):
"pressione_di_test_2": steps["leak_2"].spec["test_pressure"],
"pressione_di_test_delta_massimo_2": steps["leak_2"].spec["test_pressure_max_delta"],
"tempo_svuotamento_2": steps["leak_2"].spec["flush_time"],
- "pressione_svuotmento_2": steps["leak_2"].spec["flush_pressure"],
+ "pressione_svuotamento_2": steps["leak_2"].spec["flush_pressure"],
"test_visione_abilitato": recipe.spec["vision"],
"ricetta_visione": steps["vision"].spec["recipe"],
"stampa_etichetta_abilitata": "x" if recipe.spec["print"] 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 70d08c8..bf30dac 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,14 +59,14 @@ class Recipe_Spec_And_Step_Editor(Editor):
"tab": self.instruction_t,
},
"leak_1": {
- "type": "leak",
+ "type": "leak_1",
"enable": self.leak_enabled_1_cb,
"widget": "leak_editor_1_w",
"editor": Leak_Step_Editor(),
"tab": self.leak_1_t,
},
"leak_2": {
- "type": "leak",
+ "type": "leak_2",
"enable": self.leak_enabled_2_cb,
"widget": "leak_editor_2_w",
"editor": Leak_Step_Editor(),
diff --git a/src/ui/steps_management/steps_management.py b/src/ui/steps_management/steps_management.py
index b5f3d2c..7a46c20 100644
--- a/src/ui/steps_management/steps_management.py
+++ b/src/ui/steps_management/steps_management.py
@@ -13,7 +13,8 @@ class Step_Spec_JEDECW(QPushButton, Cell):
def __init__(self, action=None, readonly=True, autocomplete=None, field_name=None, field_alias=None, field=None, row_number=None, crud=None):
self.editors = {
"vision": Vision_Step_Editor(cell_widget=self),
- "leak": Leak_Step_Editor(cell_widget=self),
+ "leak_1": Leak_Step_Editor(cell_widget=self),
+ "leak_2": Leak_Step_Editor(cell_widget=self),
}
self.editor = None
self.editor_type = None
@@ -75,7 +76,8 @@ class Steps_Management(Widget):
fields_aliases=crud_aliases,
autocomplete={
"type": [
- "leak",
+ "leak_1",
+ "leak_2",
"vision",
],
"spec": {
diff --git a/src/ui/test/test.py b/src/ui/test/test.py
index 2f187cd..56b78be 100755
--- a/src/ui/test/test.py
+++ b/src/ui/test/test.py
@@ -56,7 +56,8 @@ class Test(Widget):
"instruction":{"digital_io"},
"screws": {"screwdriver", "tecna_t3", },
"resistance": {"multicomp", },
- "leak": {"tecna_t3", },
+ "leak_1": {"tecna_t3", },
+ "leak_2": {"tecna_t3", },
"vision": {("uvc_camera", "galaxy_camera", ), "vision", "vision_saver", }, # "neo_pixels", },
"print": {"label_printer", },
}
@@ -84,8 +85,9 @@ class Test(Widget):
"done": Test_Assembly(img_path=self.select_step_img("success"), text=u"COLLAUDO COMPLETATO", widget=None),
"emergency": Test_Assembly(img_path=self.select_step_img("reset_emergency"), 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()),
- "leak": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces)),
- "instruction": Test_Assembly(img_path=None, text=u"ESEGUIRE LE OPERAZIONI DI MONTAGGIO INDICATE IN FIGURA", widget=Test_Instructions(components=self.components, recipe=self.recipe,bench_name=self.config.machine_id, step=self.step,run_once=True)),
+ "leak_1": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces)),
+ "leak_2": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces)),
+ "instruction": Test_Assembly(img_path=None, text=u"ESEGUIRE LE OPERAZIONI DI MONTAGGIO INDICATE IN FIGURA", widget=Test_Instructions(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),
"resistance": Test_Assembly(img_path=None, text=u"COLLEGARE CONNETTORE ELETTRICO PER EFFETTUARE PROVA RESISTENZA", widget=Test_Resistance(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces)),
"screws": Test_Assembly(img_path=None, text=u"AVVITARE TUTE LE VITI COME INDICATO", widget=Test_Screws(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces)),
@@ -356,7 +358,7 @@ class Test(Widget):
}),
] if "resistance" not in self.unsupported_steps else []),
*([
- Steps(type="leak", spec={
+ Steps(type="leak_1", spec={
"pre_filling_time": 0,
"pre_filling_pressure": 1000,
"filling_time": 5,
@@ -371,9 +373,9 @@ class Test(Widget):
"flush_pressure": 100,
"autotest": True,
}),
- ] if "leak" not in self.unsupported_steps else []),
+ ] if "leak_1" not in self.unsupported_steps else []),
*([
- Steps(type="leak", spec={
+ Steps(type="leak_1", spec={
"pre_filling_time": 0,
"pre_filling_pressure": 1000,
"filling_time": 5,
@@ -388,7 +390,7 @@ class Test(Widget):
"flush_pressure": 100,
"autotest": False,
}),
- ] if "leak" not in self.unsupported_steps else []),
+ ] if "leak_1" not in self.unsupported_steps else []),
Steps(type="done"),
Steps(type="wait"),
]
@@ -499,17 +501,23 @@ class Test(Widget):
self.log.info("cycle printed already compiled label")
# LABEL PRINT
recipe = archived.test_data.get("recipe", {})
- leak_test_1 = archived.test_data.get("leak", {}).get("0", {})
+ leak_test_1 = archived.test_data.get("leak_1", {}).get("0", {})
leak_test_1_step = leak_test_1.get("step", {})
leak_test_1_step_spec = leak_test_1_step.get("spec", {})
leak_test_1_results = leak_test_1.get("results", {})
leak_test_1_results_data = leak_test_1_results.get("data", {})
leak_test_2 = archived.test_data.get("leak_2", {}).get("0", {})
- leak_test_2_step = leak_test_1.get("step", {})
- leak_test_2_step_spec = leak_test_1_step.get("spec", {})
- leak_test_2_results = leak_test_1.get("results", {})
- leak_test_2_results_data = leak_test_1_results.get("data", {})
- printer_fields=self.step.spec
+ leak_test_2_step = leak_test_2.get("step", {})
+ leak_test_2_step_spec = leak_test_2_step.get("spec", {})
+ leak_test_2_results = leak_test_2.get("results", {})
+ leak_test_2_results_data = leak_test_2_results.get("data", {})
+
+ psetminp_a = leak_test_1_step_spec.get("test_pressure", 0) * (100+leak_test_1_step_spec.get("test_pressure_min_delta", 0)/100)
+ psetmaxp_a = leak_test_1_step_spec.get("settling_pressure_max_percent", 0) * (100+leak_test_1_step_spec.get("test_pressure_max_delta", 0)/100)
+ psetminp2_a = leak_test_2_step_spec.get("settling_pressure_min_percent", 0) * (100+leak_test_2_step_spec.get("test_pressure_min_delta", 0)/100)
+ psetmaxp2_a = leak_test_2_step_spec.get("settling_pressure_max_percent", 0) * (100+leak_test_2_step_spec.get("test_pressure_max_delta", 0)/100)
+
+ printer_fields = self.step.spec
context = {
# RECIPE DATA
"RECIPE": self.labellify(recipe.get("name", "-")),
@@ -520,13 +528,24 @@ class Test(Widget):
"PPREFILL": self.labellify(leak_test_1_step_spec.get("pre_filling_pressure", "-")),
"TFILL": self.labellify(leak_test_1_step_spec.get("filling_time", "-")),
"TSET": self.labellify(leak_test_1_step_spec.get("settling_time", "-")),
+ "TPREFILL2": self.labellify(leak_test_2_step_spec.get("pre_filling_time", "-")),
+ "PPREFILL2": self.labellify(leak_test_2_step_spec.get("pre_filling_pressure", "-")),
+ "TFILL2": self.labellify(leak_test_2_step_spec.get("filling_time", "-")),
+ "TSET2": self.labellify(leak_test_2_step_spec.get("settling_time", "-")),
"PSETMINP": self.labellify(leak_test_1_step_spec.get("settling_pressure_min_percent", " -")),
"PSETMAXP": self.labellify(leak_test_1_step_spec.get("settling_pressure_max_percent", " -")),
"PSETMINP2": self.labellify(leak_test_2_step_spec.get("settling_pressure_min_percent", " -")),
"PSETMAXP2": self.labellify(leak_test_2_step_spec.get("settling_pressure_max_percent", " -")),
+ "PSETMINP_A": self.labellify(psetminp_a),
+ "PSETMAXP_A": self.labellify(psetmaxp_a),
+ "PSETMINP2_A": self.labellify(psetminp2_a),
+ "PSETMAXP2_A": self.labellify(psetmaxp2_a),
"TTEST": self.labellify(leak_test_1_step_spec.get("test_time", "-")),
+ "TTEST2": self.labellify(leak_test_2_step_spec.get("test_time", "-")),
"PMIN": self.labellify(leak_test_1_step_spec.get("test_pressure_min_delta", "-")),
+ "PMIN2": self.labellify(leak_test_2_step_spec.get("test_pressure_min_delta", "-")),
"PTEST": self.labellify(leak_test_1_step_spec.get("test_pressure", "-")),
+ "PTEST2": self.labellify(leak_test_2_step_spec.get("test_pressure", "-")),
"PMAX": self.labellify(leak_test_1_step_spec.get("test_pressure_max_delta", "-")),
"TFLUSH": self.labellify(leak_test_1_step_spec.get("flush_time", "-")),
"PFLUSH": self.labellify(leak_test_1_step_spec.get("flush_pressure", "-")),
@@ -534,6 +553,7 @@ class Test(Widget):
"RESTPB": self.labellify(leak_test_1_results_data.get("Running test: phase backwards time", "-")),
"RESPFILL": self.labellify(leak_test_1_results_data.get("Running test: filling pressure", "-")),
"RESPSET": self.labellify(leak_test_1_results_data.get("Running test: pressure at the end of settling", "-")),
+ "RESPSET2": self.labellify(leak_test_2_results_data.get("Running test: pressure at the end of settling", "-")),
"RESPB": self.labellify(leak_test_1_results_data.get("Running test: burst pressure", "-")),
"RESLEAK": self.labellify(leak_test_1_results_data.get("Running test: measured leak", "-")),
"RESLEAK2": self.labellify(leak_test_2_results_data.get("Running test: measured leak", "-")),
@@ -560,6 +580,8 @@ class Test(Widget):
"SHIFT": str(get_shift(archived.time)),
"STATION": str(self.config.machine_id),
"OPERATOR": str(archived.user.username),
+ "BADGE_NUM": str(archived.user.badge_number),
+
# RESULT
"RESULT": str("CONFORME" if leak_test_1_results.get("ok", False) else "SCARTO") + str(" FORZATO" if self.data.get("overridden", False) else ""),
"RESULT_L1": "ESITO" + str(" FORZATO" if self.data.get("overridden", False) else ""),
@@ -576,6 +598,9 @@ class Test(Widget):
# PRINT EXTRA LABELS IF NEEDED
if "extra_label_printer" in self.components.keys():
- self.components["extra_label_printer"].print_label(label, context=context)
+ if len(printer_fields["extra_label"])>0:
+ labels=printer_fields["extra_label"].split(",")
+ for label in labels:
+ self.components["extra_label_printer"].print_label(f"{label}.prn", context=context)
self.log.info(f"cycle printed: {context!r}")
return compiled_label
diff --git a/src/ui/test_instructions/test_instructions.py b/src/ui/test_instructions/test_instructions.py
index 244b9c8..9a47a50 100644
--- a/src/ui/test_instructions/test_instructions.py
+++ b/src/ui/test_instructions/test_instructions.py
@@ -25,7 +25,7 @@ class Test_Instructions(Test_Test):
self.layout = QVBoxLayout()
self.layout.addWidget(self.svg_widget)
self.svg_w.setLayout(self.layout)
-
+ self.svg_path=os.path.join("config","instruction_images",self.bench_name,"")
self.timer = QTimer()
self.timer.timeout.connect(self.toggle_icons)
@@ -33,26 +33,34 @@ class Test_Instructions(Test_Test):
show = super().start(recipe=recipe, step=step)
ring_ids=[f"ring_{i+1}" for i in range(step.spec["num_ring"])]
piece_ids=[f"piece_{i+1}" for i in range(step.spec["num_piece"])]
+ tape_ids=[f"tape_{i+1}" for i in range(step.spec["num_tape"])]
self.ids=ring_ids+piece_ids
self.inputs= {idx: {"id":id,"status":False} for idx,id in enumerate(self.ids)}
-
+ self.tapes = {idx: {"id": id, "status": False} for idx, id in enumerate(tape_ids)}
self.timer.start(1000)
# setup test loop
self.get_connection = self.components["digital_io"].out.connect(self.get)
if step is not None:
- svg_path=f"config/instruction_images/{self.bench_name}/{self.recipe}.svg"
+ svg_path=f"{self.svg_path}{self.recipe}.svg"
if not os.path.exists(svg_path):
- svg_path=f"config/instruction_images/{self.bench_name}/DEFAULT.svg"
+ svg_path=f"{self.svg_path}DEFAULT.svg"
self.svg_root = etree.parse(svg_path)
self.svg_str = etree.tostring(self.svg_root)
self.svg_str=etree.tostring(self.svg_root)
-
+ self.done = False
return show
def toggle_icons(self):
self.flag = not self.flag
+ for idx,tape in self.tapes.items():
+ elem = self.svg_root.findall(f'''.//*[@id='{tape["id"]}']''')[0]
+ if self.flag:
+ self.show_tape(elem)
+ else:
+ self.hide_tape(elem)
+
for idx,input in self.inputs.items():
elem = self.svg_root.findall(f'''.//*[@id='{input["id"]}']''')[0]
if input["status"]:
@@ -68,9 +76,9 @@ class Test_Instructions(Test_Test):
self.show_svg()
def show_ok(self,id):
- id.attrib["{http://www.w3.org/1999/xlink}href"]= "ok.png"
+ id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}ok.png"
def show_ko(self,id):
- id.attrib["{http://www.w3.org/1999/xlink}href"]= "arw-yel-down.png"
+ id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}arw-yel-down.png"
def show_icon(self,id):
id.set("display", "inline")
@@ -78,6 +86,13 @@ class Test_Instructions(Test_Test):
def hide_icon(self,id):
id.set("display", "none")
+ def show_tape(self,id):
+ id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}tape_black.png"
+ id.set("display", "inline")
+
+ def hide_tape(self,id):
+ id.set("display", "none")
+
def show_svg(self):
self.svg_str = etree.tostring(self.svg_root)
self.svg_widget.load(self.svg_str)
@@ -93,10 +108,11 @@ class Test_Instructions(Test_Test):
#check if all sensor are ok
ok = True
+ if len(data[0]["digital_io"])==0:
+ return
for sensor_index,sensor in enumerate(self.ids):
byte_idx=int(sensor_index/8)
bit_idx=sensor_index%8
-
if data[0]["digital_io"][byte_idx][bit_idx]:
self.inputs[sensor_index]["status"]=True
else:
diff --git a/src/ui/test_leak/test_leak.py b/src/ui/test_leak/test_leak.py
index c27a10c..b82685d 100644
--- a/src/ui/test_leak/test_leak.py
+++ b/src/ui/test_leak/test_leak.py
@@ -5,7 +5,7 @@ import weakref
from PyQt5.QtWidgets import QMessageBox
from ui.test_test import Test_Test
-from src.components.Automation.BDaq import ErrorCode
+from components.Automation.BDaq import ErrorCode
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=True):
@@ -32,19 +32,23 @@ class Test_Leak(Test_Test):
self.start_b.setEnabled(False)
self.stop_b.setEnabled(False)
- # SETUP RELAY
+ # SETUP RELAY CONFIGURATION
if "digital_io" in self.components.keys():
if "relay_config" in step.spec.keys():
relay_config = step.spec["relay_config"]
+ bits = [0, 0]
if relay_config == 1:
- ret=self.components["digital_io"].set_bit_verify(0, 0, 1)
- else:
- ret=self.components["digital_io"].set_bit_verify(0, 0, 0)
+ bits = [0,1]
+ if relay_config == 2:
+ bits = [1,0]
+
+ ret=self.components["digital_io"].set_bit_verify(0, 0, bits[0])
+ ret=self.components["digital_io"].set_bit_verify(0, 1, bits[1])
if ret:
time.sleep(1)
# AUTO START SECOND TEST
- if relay_config == 1:
+ if step.spec == "leak_2":
self.start_b.setEnabled(True)
self.start_b.click()
else:
@@ -72,6 +76,7 @@ class Test_Leak(Test_Test):
super().get(None, override=override)
return
data = data[-1]
+
# TESTING
if self.simulate:
if self.step.spec.get("autotest", False) is not True:
@@ -82,13 +87,18 @@ class Test_Leak(Test_Test):
data["tecna_t3"] = {
"Running test: result": "-----TESTING----- failed",
}
- # /TESTING
+
if "Running test: result" in data["tecna_t3"]:
result = data["tecna_t3"]["Running test: result"]
if self.step.spec.get("autotest", False) is not True:
ok = type(result) is str and "passed" in result.lower()
else:
ok = type(result) is str and "failed" in result.lower()
+
+ # RESET RELAYS
+ ret = self.components["digital_io"].set_bit_verify(0, 0, 0)
+ ret = self.components["digital_io"].set_bit_verify(0, 1, 0)
+
else:
result = None
ok = None
@@ -139,7 +149,7 @@ class Test_Leak(Test_Test):
self.parent_assembly_widget().set_text(text="PROVA TENUTA IN CORSO")
else:
if self.parent_assembly_widget is not None:
- self.parent_assembly_widget().set_text(text="AUTOTEST: PROVA TENUTA DI PROVA IN CORSO")
+ self.parent_assembly_widget().set_text(text="AUTOTEST: PROVA TENUTA IN CORSO")
self.start_b.setEnabled(False)
self.stop_b.setEnabled(True)
ok = data.get("results", {}).get("ok", None)
diff --git a/src/ui/users_management/users_management.py b/src/ui/users_management/users_management.py
index caaa375..99887d6 100644
--- a/src/ui/users_management/users_management.py
+++ b/src/ui/users_management/users_management.py
@@ -47,6 +47,7 @@ class Users_Management(Widget):
"username": "Nome utente",
"password": "Password",
"roles": "Ruoli",
+ "badge_number": "Matricola",
}
self.crud = Crud(
"users",