Merge remote-tracking branch 'origin/master'

# Conflicts:
#	config/machine_settings/st-ten-5.ini
This commit is contained in:
stten5 2023-07-18 12:18:59 +02:00
commit 0ddae686a1
120 changed files with 71825 additions and 6564 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ __pycache__/
/tmp/
/venv*/
runme_custom.sh
runme_custom.bat

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 230 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 388 KiB

After

Width:  |  Height:  |  Size: 642 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 237 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 352 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 176 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 285 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 326 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 496 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 301 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 592 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 608 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 299 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 293 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 216 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 285 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 178 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 480 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 329 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 696 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 225 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -9,39 +9,39 @@ SET PARTIAL_CUTTER OFF
<xpml></page></xpml><xpml><page quantity='1' pitch='130.0 mm'></xpml>SET TEAR ON
CLS
CODEPAGE 1252
TEXT 203,221,"0",180,9,9,"{TSET}s"
TEXT 205,374,"0",180,9,9,"{RESPFILL}mbar"
TEXT 260,792,"0",180,9,9,"{CLIENT}"
TEXT 336,987,"0",180,12,12,"ERRECINQUE"
TEXT 292,923,"0",180,8,8,"Fluid system"
TEXT 307,894,"0",180,8,8,"Via Meucci 31/A"
TEXT 333,865,"0",180,8,8,"10079 Mappano (TO)"
TEXT 375,792,"0",180,9,9,"Cliente:"
TEXT 375,763,"0",180,9,9,"N. disegno:"
TEXT 375,732,"0",180,9,9,"N. dis. R5:"
TEXT 375,702,"0",180,9,9,"N. pezzo:"
TEXT 375,671,"0",180,9,9,"Data/ora prova:"
TEXT 375,640,"0",180,9,9,"{DATETIME}"
TEXT 252,763,"0",180,9,9,"{RECIPE}"
TEXT 222,732,"0",180,9,9,"{PART}"
TEXT 241,702,"0",180,9,9,"{SN}"
BARCODE 384,583,"128M",102,0,180,2,4,"!105{BCODE}"
TEXT 381,374,"0",180,9,9,"P. riempimento:"
TEXT 381,336,"0",180,9,9,"P. assestamento:"
TEXT 381,298,"0",180,9,9,"Caduta:"
TEXT 203,336,"0",180,9,9,"{RESPSET}mbar"
TEXT 203,298,"0",180,9,9,"{RESLEAK}mbar"
TEXT 381,259,"0",180,9,9,"T. riemp:"
TEXT 381,221,"0",180,9,9,"T. stab:"
TEXT 381,182,"0",180,9,9,"T. prova:"
TEXT 204,259,"0",180,9,9,"{TFILL}s"
TEXT 203,182,"0",180,9,9,"{TTEST}s"
TEXT 381,143,"0",180,9,9,"Caduta MAX"
TEXT 381,104,"0",180,9,9,"Press nominale"
TEXT 203,143,"0",180,9,9,"{PMIN}mbar"
TEXT 203,104,"0",180,9,9,"{PTEST}mbar"
TEXT 375,67,"0",180,11,11,"ESITO:"
TEXT 274,67,"0",180,11,11,"{RESULT}"
TEXT 312,450,"0",180,8,8,"{BCODE}"
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
<xpml></page></xpml><xpml><end/></xpml>

View File

@ -25,7 +25,7 @@ TEXT 375,617,"0",180,9,9,"{DATETIME}"
TEXT 252,766,"0",180,9,9,"{RECIPE}"
TEXT 222,709,"0",180,9,9,"{PART}"
TEXT 241,678,"0",180,9,9,"{SN}"
BARCODE 384,560,"128M",102,0,180,2,4,"!10500"
BARCODE 384,560,"128M",102,0,180,2,4,"!105{BCODE}"
TEXT 381,374,"0",180,9,9,"P. riempimento:"
TEXT 381,336,"0",180,9,9,"P. assestamento:"
TEXT 381,298,"0",180,9,9,"Caduta:"

View File

@ -1,4 +1,4 @@
SIZE 37.5 mm, 130 mm
SIZE 27.5 mm, 50 mm
GAP 3 mm, 0 mm
SPEED 2
DENSITY 7
@ -10,10 +10,9 @@ SET CUTTER OFF
SET PARTIAL_CUTTER OFF
SET TEAR ON
CLS
DMATRIX 116,270,184,184,x3,22,22,"{RECIPE}-{DD}{MO}{YY}{SN5}"
DMATRIX 82,230,138,138,x3,22,22,"{RECIPE}-{DD}{MO}{YY}{SN5}"
CODEPAGE 1252
TEXT 261,377,"ROMAN.TTF",180,1,7,"{RECIPE}-{DD}{MO}{YY}{SN5}"
DMATRIX 116,175,184,184,x3,22,22,"{RECIPE}-{DD}{MO}{YY}{SN5}"
DMATRIX 116,78,184,184,x3,22,22,"{RECIPE}-{DD}{MO}{YY}{SN5}"
BOX 13,16,287,401,3
TEXT 212,357,"ROMAN.TTF",180,1,7,"{RECIPE}-{DD}{MO}{YY}{SN5}"
DMATRIX 82,129,138,138,x3,22,22,"{RECIPE}-{DD}{MO}{YY}{SN5}"
DMATRIX 82,28,138,138,x3,22,22,"{RECIPE}-{DD}{MO}{YY}{SN5}"
PRINT 1,1

View File

@ -12,7 +12,7 @@ SET TEAR ON
CLS
DMATRIX 82,230,138,138,x3,22,22,"{RECIPE}-{DD}{MO}{YY}{SN5}"
CODEPAGE 1252
TEXT 212,357,"ROMAN.TTF",180,1,7,"{RECIPE}-{DD}{MO}{YY}"
TEXT 212,357,"ROMAN.TTF",180,1,7,"{RECIPE}-{DD}{MO}{YY}{SN5}"
DMATRIX 82,129,138,138,x3,22,22,"{RECIPE}-{DD}{MO}{YY}{SN5}"
DMATRIX 82,28,138,138,x3,22,22,"{RECIPE}-{DD}{MO}{YY}{SN5}"
PRINT 1,1

View File

@ -18,25 +18,25 @@
^XZ
^XA
^MMT
^PW320
^LL1119
^PW496
^LL1559
^LS0
^FT33,86^A0N,45,46^FH\^CI28^FDERRECINQUE^FS^CI27
^BY2,3,56^FT44,310^BCN,,N,N
^FT61,119^A0N,67,68^FH\^CI28^FDERRECINQUE^FS^CI27
^BY2,3,83^FT77,430^BCN,,N,N
^FH\^FD>:{PART}^FS
^FT15,347^A0N,31,30^FH\^CI28^FDPart number:^FS^CI27
^FT15,427^A0N,31,30^FH\^CI28^FD{PART}^FS^CI27
^FT17,136^A0N,17,18^FH\^CI28^FDVia Meucci 31/A - 10079 Mappano(TO)^FS^CI27
^FT53,193^A0N,39,38^FH\^CI28^FDFPT^FS^CI27
^FT53,235^A0N,39,38^FH\^CI28^FDLEAK TEST^FS^CI27
^FT15,387^A0N,31,30^FH\^CI28^FD{DESCRIPTION}^FS^CI27
^FT15,740^A0N,31,30^FH\^CI28^FDSequential number:^FS^CI27
^FT15,779^A0N,31,30^FH\^CI28^FD{SN5}^FS^CI27
^FT15,856^A0N,17,18^FH\^CI28^FD{DD}/{MM}/{YY}^FS^CI27
^FT161,856^A0N,17,18^FH\^CI28^FD{HH}:{MI}:{SS}^FS^CI27
^FT17,1081^A0N,31,30^FH\^CI28^FDESITO:^FS^CI27
^FT143,1081^A0N,31,30^FH\^CI28^FDCONFORME^FS^CI27
^FT15,934^A0N,25,25^FH\^CI28^FDOperatore^FS^CI27
^FT15,967^A0N,25,25^FH\^CI28^FD{OPERATOR}^FS^CI27
^FT34,482^A0N,46,46^FH\^CI28^FDPart number:^FS^CI27
^FT34,595^A0N,46,46^FH\^CI28^FD{PART}^FS^CI27
^FT37,172^A0N,25,25^FH\^CI28^FDVia Meucci 31/A - 10079 Mappano(TO)^FS^CI27
^FT91,256^A0N,58,56^FH\^CI28^FDFPT^FS^CI27
^FT91,312^A0N,58,56^FH\^CI28^FDLEAK TEST^FS^CI27
^FT34,530^A0N,46,46^FH\^CI28^FD{DESCRIPTION}^FS^CI27
^FT34,1243^A0N,46,46^FH\^CI28^FDSequential number:^FS^CI27
^FT34,1291^A0N,46,46^FH\^CI28^FD{SN5}^FS^CI27
^FT34,1361^A0N,33,33^FH\^CI28^FD{DD}/{MO}/{YY}^FS^CI27
^FT250,1361^A0N,33,33^FH\^CI28^FD{HH}:{MI}:{SS}^FS^CI27
^FT37,1487^A0N,46,46^FH\^CI28^FDCHECK:^FS^CI27
^FT223,1487^A0N,46,46^FH\^CI28^FDCONFORME^FS^CI27
^FT34,1427^A0N,38,38^FH\^CI28^FDOperatore^FS^CI27
^FT223,1427^A0N,38,38^FH\^CI28^FD{OPERATOR}^FS^CI27
^PQ1,0,1,Y
^XZ

View File

@ -0,0 +1,45 @@
CT~~CD,~CC^~CT~
^XA
~TA000
~JSN
^LT0
^MNW
^MTT
^PON
^PMN
^LH0,0
^JMA
^PR2,2
~SD22
^JUS
^LRN
^CI27
^PA0,1,1,0
^XZ
^XA
^MMT
^PW320
^LL1119
^LS0
^FT57,105^A0N,39,38^FH\^CI28^FDERRECINQUE^FS^CI27
^FT58,148^A0N,20,20^FH\^CI28^FDVia Meucci 31/A^FS^CI27
^FT58,173^A0N,20,20^FH\^CI28^FD10079 Mappano(TO)^FS^CI27
^FT18,758^A0N,23,20^FH\^CI28^FD{DD}/{MO}/{YY}^FS^CI27
^FT183,758^A0N,23,20^FH\^CI28^FD{HH}:{MI}:{SS}^FS^CI27
^FT18,981^A0N,31,30^FH\^CI28^FDESITO:^FS^CI27
^FT144,981^A0N,31,30^FH\^CI28^FDCONFORME^FS^CI27
^FT24,471^A0N,25,25^FH\^CI28^FDPart number:^FS^CI27
^FT24,513^A0N,23,23^FH\^CI28^FD{PART}^FS^CI27
^FT24,555^A0N,25,25^FH\^CI28^FDSequential number:^FS^CI27
^FT24,598^A0N,23,23^FH\^CI28^FD{SN4}^FS^CI27
^FT18,833^A0N,23,23^FH\^CI28^FDOperatore:^FS^CI27
^FT157,674^A0N,23,23^FH\^CI28^FD{RESLEAK} mbar^FS^CI27
^FT18,674^A0N,23,23^FH\^CI28^FD{TTEST} s^FS^CI27
^FT18,724^A0N,23,23^FH\^CI28^FD{PTEST} mbar^FS^CI27
^BY1,3,64^FT58,384^BCN,,N,N
^FH\^FD>:{PART}^FS
^FT58,241^A0N,25,25^FH\^CI28^FD{DESCRIPTION}^FS^CI27
^FT58,292^A0N,45,46^FH\^CI28^FDLEAK TEST^FS^CI27
^FT165,833^A0N,23,23^FH\^CI28^FD{BADGE_NUM}^FS^CI27
^PQ1,0,1,Y
^XZ

View File

@ -0,0 +1,56 @@
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
^PW320
^LL1119
^LS0
^FT27,493^A0N,25,23^FH\^CI28^FD{DD}/{MO}/{YY}^FS^CI27
^FT175,493^A0N,25,23^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
^FT29,72^A0N,25,25^FH\^CI28^FDNumero Disegno^FS^CI27
^FT27,462^A0N,25,25^FH\^CI28^FDData/Ora Prova^FS^CI27
^FT27,530^A0N,25,25^FH\^CI28^FDStazione: {STATION}^FS^CI27
^FT27,416^A0N,25,25^FH\^CI28^FDN. Pezzo:^FS^CI27
^FT135,417^A0N,25,25^FH\^CI28^FD{SN4}^FS^CI27
^FT27,562^A0N,25,25^FH\^CI28^FDOPERATORE: {BADGE_NUM}^FS^CI27
^FO52,649^GB215,0,8^FS
^FT19,705^A0N,25,25^FH\^CI28^FDP. prova:^FS^CI27
^FT19,737^A0N,25,25^FH\^CI28^FDP. rilevata:^FS^CI27
^FT145,737^A0N,25,25^FH\^CI28^FD{RESPSET}mbar^FS^CI27
^FT19,764^A0N,25,25^FH\^CI28^FDCaduta ammessa:^FS^CI27
^FT206,764^A0N,25,25^FH\^CI28^FD{PMIN} mbar^FS^CI27
^FT19,797^A0N,25,25^FH\^CI28^FDCaduta rilevata:^FS^CI27
^FT179,797^A0N,25,25^FH\^CI28^FD{RESLEAK} mbar^FS^CI27
^FT19,908^A0N,25,25^FH\^CI28^FDT.Prova^FS^CI27
^FT207,912^A0N,25,25^FH\^CI28^FD{TTEST} s^FS^CI27
^FT18,864^A0N,25,25^FH\^CI28^FDT.Riempim.^FS^CI27
^FT207,864^A0N,25,25^FH\^CI28^FD{TFILL} s^FS^CI27
^FT19,886^A0N,25,25^FH\^CI28^FDT.Stabilizzazione^FS^CI27
^FT207,888^A0N,25,25^FH\^CI28^FD{TSET} s^FS^CI27
^FT145,705^A0N,25,25^FH\^CI28^FD{PTEST} mbar^FS^CI27
^FT31,248^BXN,6,200,0,0,1,_,1
^FH\^FD{PART}{HH}{MI}{JJJ}{YY}^FS
^FT29,108^A0N,25,25^FH\^CI28^FD992752^FS^CI27
^FT29,287^A0N,25,25^FH\^CI28^FD{PART}{HH}{MI}{JJJ}{YY}^FS^CI27
^FT27,594^A0N,25,25^FH\^CI28^FDGB16897 / {DD}/{MO}/{YY}^FS^CI27
^FT27,625^A0N,25,25^FH\^CI28^FDERRECINQUE / 21882^FS^CI27
^PQ1,0,1,Y
^XZ

View File

@ -162,9 +162,9 @@ settling_time: 5
settling_pressure_min_percent: 5
settling_pressure_max_percent: 5
test_time: 10
test_pressure_min_delta: 5
test_pressure_qneg: 5
test_pressure: 9000
test_pressure_max_delta: 5
test_pressure_qpos: 5
flush_time: 1
flush_pressure: 100

View File

@ -2,6 +2,8 @@
ST-TEN-1: st-ten-1
ST-TEN-2: st-ten-2
stten3: st-ten-3
stten4: st-ten-4
ST-TEN-4: st-ten-4
st-ten-5: st-ten-5
st-ten-6: st-ten-6
st-ten-7: st-ten-7
st-ten-8: st-ten-8

View File

@ -10,7 +10,7 @@ neo_pixels: present
remote_api: absent
tecna_t3: present
vision_saver: present
vision: absent
vision: present
screwdriver: present
[tecna_t3]
@ -29,3 +29,67 @@ description_field: descrizione
[label_printer]
platform: windows
printer: zd420
[recipes_defaults]
codice_ricetta: specificare ricetta
cliente: IVECO
part_number: specificare part number
config_elettrovalvole: 0
warning_img:
dimensione_lotto_abilitata:
istruzione_abilitata: x
numero nastri (n):0
numero sensori anello (sa):0
numero sensori presenza (sp):0
prova_tenuta_abilitata: x
tempo_pre_riempimento: 0
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: 5000
pressione_di_test_delta_massimo: 30
tempo_svuotamento: 1
pressione_svuotamento: 100
prova_tenuta_abilitata_2:
tempo_pre_riempimento_2: 0
pressione_pre_riempimento_2: 1000
tempo_riempimento_2: 5
tempo_assestamento_2: 5
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
tempo_svuotamento_2: 1
pressione_svuotamento_2: 100
stampa_etichetta_abilitata: x
modello_etichetta: ETA30x16_203dpi.prn
descrizione: inserire descrizione ricetta
[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: 5 #Q+ Upper test leak limit
test_pressure_qneg: 15 #Q- Lower test leak limit
test_pressure_tt_qpos: 0 # 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

View File

@ -20,5 +20,38 @@ recipe_name_field: cod finito cliente
part_number_field: cod finito r5
barcode_enable_field: verifica_codice_a_barre_abilitata
barcode_serial_field: codice_a_barre
label_template_field: modello_etichetta
description_field: cod semilavorato costampato
label_template_field: etichetta
description_field: cod semilavorato costampato
[recipes_defaults]
prova_tenuta_abilitata: x
warning_img:
tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000
tempo_riempimento: 10
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: 15000
pressione_di_test_delta_massimo: 30
tempo_svuotamento: 1
pressione_svuotamento: 100
config_elettrovalvole: 0
[autotest_leak]
enabled: true
pre_filling_time: 0
pre_filling_pressure: 1000
filling_time: 5
settling_time: 10
settling_pressure_min_percent: 5
settling_pressure_max_percent: 5
test_time: 10
test_pressure_qneg: 5
test_pressure: 9000
test_pressure_qpos: 5
flush_time: 1
flush_pressure: 100
relay_config: 1

View File

@ -24,3 +24,36 @@ barcode_enable_field: verifica_codice_a_barre_abilitata_cl
[recipes_defaults]
descrizione:
prova_tenuta_abilitata: x
warning_img:
tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000
tempo_riempimento: 10
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: 15000
pressione_di_test_delta_massimo: 30
tempo_svuotamento: 1
pressione_svuotamento: 100
config_elettrovalvole: 0
[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: 5 #Q+ Upper test leak limit
test_pressure_qneg: 15 #Q- Lower test leak limit
test_pressure_tt_qpos: 0 # 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

View File

@ -1,31 +1,79 @@
[machine]
description = ST-TEN-4 - TERMOFORMATURA MAPPANO
description = ST-TEN-4 - REPARTO PREFORMATURA - MAPPANO
[hardware_config]
archive_synchronizer: present
; galaxy_camera: present
uvc_camera: present
uvc_camera: absent
label_printer: present
neo_pixels: present
neo_pixels: absent
remote_api: absent
tecna_t3: present
vision_saver: absent
vision: absent
screwdriver: present
screwdriver: absent
[tecna_t3]
port: COM4
model: t3l
model: t3p
[neo_pixels]
port: COM5
[label_printer]
platform: windows
printer: zd421
[recipe]
recipe_name_field: codice_ricetta
part_number_field: codice_prodotto
label_template_field: modello_etichetta
description_field: descrizione
[label_printer]
platform: windows
printer: zd420
[recipes_defaults]
dimensione_lotto_abilitata:
tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000
tempo_riempimento: 10
tempo_assestamento: 10
tempo_di_test: 10
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: 1
pressione_svuotamento: 100
config_elettrovalvole: 1
prova_tenuta_abilitata_2:
tempo_pre_riempimento_2: 0
pressione_pre_riempimento_2: 1000
tempo_riempimento_2: 10
tempo_assestamento_2: 10
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: 1
pressione_svuotamento_2: 100
config_elettrovalvole_2: 2
modello_etichetta: EtichettaR5_Montaggio_1prova.prn
[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: 2000
test_time: 10
test_pressure_qpos: 10 #Q+ Upper test leak limit (negative mbar)
test_pressure_qneg: 20 #Q- Lower test leak limit (negative mbar)
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
flush_pressure: 100
relay_config: 1

View File

@ -10,6 +10,7 @@ remote_api: absent
tecna_t3: present
digital_io: present
barcode_recipe_selection: present
show_instructions: yes
[tecna_t3]
port: COM4
@ -90,9 +91,9 @@ settling_time: 10
settling_pressure_min_percent: 5
settling_pressure_max_percent: 5
test_time: 10
test_pressure_min_delta: 8
test_pressure_qneg: 8
test_pressure: 5000
test_pressure_max_delta: 5
test_pressure_qpos: 5
flush_time: 1
flush_pressure: 100
relay_config: 1

View File

@ -3,8 +3,7 @@ description = ST-TEN-6 DOPPIA PROVA PRESSIONE 6/20 BAR
[hardware_config]
archive_synchronizer: present
; galaxy_camera: present
uvc_camera: present
uvc_camera: absent
label_printer: present
neo_pixels: present
remote_api: absent
@ -28,6 +27,7 @@ printer: zd421
[digital_io]
id: USB-5860,BID#0
[recipe]
recipe_name_field: codice_ricetta
part_number_field: codice_prodotto
@ -38,8 +38,8 @@ description_field: descrizione
dimensione_lotto_abilitata:
tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000
tempo_riempimento: 15
tempo_assestamento: 15
tempo_riempimento: 10
tempo_assestamento: 10
tempo_di_test: 10
percentuale_minima_pressione_assestamento: 5
percentuale_massima_pressione_assestamento: 5
@ -52,8 +52,8 @@ config_elettrovalvole: 1
prova_tenuta_abilitata_2:
tempo_pre_riempimento_2: 0
pressione_pre_riempimento_2: 1000
tempo_riempimento_2: 20
tempo_assestamento_2: 20
tempo_riempimento_2: 10
tempo_assestamento_2: 10
tempo_di_test_2: 10
percentuale_minima_pressione_assestamento_2: 5
percentuale_massima_pressione_assestamento_2: 5
@ -69,14 +69,16 @@ modello_etichetta: EtichettaR5_Montaggio_1prova.prn
enabled: true
pre_filling_time: 0
pre_filling_pressure: 1000
filling_time: 15
filling_time: 10
settling_time: 10
settling_pressure_min_percent: 5
settling_pressure_max_percent: 5
test_pressure: 7000
test_time: 10
test_pressure_min_delta: 35
test_pressure: 15000
test_pressure_max_delta: 5
test_pressure_qpos: 5 #Q+ Upper test leak limit
test_pressure_qneg: 15 #Q- Lower test leak limit
test_pressure_tt_qpos: 0 # 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

View File

@ -0,0 +1,99 @@
[machine]
description = ST-TEN-7 SECONDO BANCO IVECO DAILY ELETTRICO
[hardware_config]
archive_synchronizer: present
uvc_camera: absent
label_printer: present
extra_label_printer: present
remote_api: absent
tecna_t3: present
digital_io: present
barcode_recipe_selection: present
show_instructions: yes
[tecna_t3]
port: COM4
model: t3l
[recipe]
recipe_name_field: codice_ricetta
part_number_field: codice_ricetta
label_template_field: modello_etichetta
description_field: descrizione
[label_printer]
platform: windows
printer: zd421
[extra_label_printer]
platform: windows
printer: xlp504
[digital_io]
id: USB-5862,BID#0
[recipes_defaults]
codice_ricetta: specificare ricetta
cliente: IVECO
part_number: specificare part number
config_elettrovalvole: 0
warning_img:
dimensione_lotto_abilitata:
istruzione_abilitata: x
numero nastri (n):0
numero sensori anello (sa):0
numero sensori presenza (sp):0
prova_tenuta_abilitata: x
tempo_pre_riempimento: 0
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: 5000
pressione_di_test_delta_massimo: 30
tempo_svuotamento: 1
pressione_svuotamento: 100
prova_tenuta_abilitata_2:
tempo_pre_riempimento_2: 0
pressione_pre_riempimento_2: 1000
tempo_riempimento_2: 5
tempo_assestamento_2: 5
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
tempo_svuotamento_2: 1
pressione_svuotamento_2: 100
stampa_etichetta_abilitata: x
modello_etichetta: ETA30x16_203dpi.prn
descrizione: inserire descrizione ricetta
[autotest_leak]
enabled: true
pre_filling_time: 0
pre_filling_pressure: 1000
filling_time: 15
settling_time: 10
settling_pressure_min_percent: 5
settling_pressure_max_percent: 5
test_time: 10
test_pressure_qneg: 10
test_pressure: 5000
test_pressure_qpos: 5
flush_time: 1
flush_pressure: 100
relay_config: 1

View File

@ -0,0 +1,87 @@
[machine]
description = ST-TEN-8 DAILY AUTOMATICO
[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: present
[tecna_t3]
port: COM4
model: t3l
[label_printer]
platform: windows
printer: zd421
[digital_io]
id: USB-5860,BID#0
discard_idx:15 # BIT NUMBER OF THE I/0 MODULE USED FOR DISCARD SENSING
[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]
dimensione_lotto_abilitata:
tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000
tempo_riempimento: 15
tempo_assestamento: 15
tempo_di_test: 10
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: 1
pressione_svuotamento: 100
config_elettrovalvole: 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: 1
pressione_svuotamento_2: 100
config_elettrovalvole_2: 2
modello_etichetta: EtichettaR5_Montaggio_1prova.prn
[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: 5 #Q+ Upper test leak limit
test_pressure_qneg: 15 #Q- Lower test leak limit
test_pressure_tt_qpos: 0 # 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

View File

@ -6,3 +6,8 @@ port: COM4
[neo_pixels]
port: COM3
[label_printer]
platform: windows
printer: zd420

View File

@ -0,0 +1,10 @@
item {
id: 1
name: 'ok'
color: '0x55AA55'
}
item {
id: 2
name: 'ko'
color: '0xff0000'
}

View File

@ -1,10 +1,10 @@
item {
id: 1
name: 'hs-ok'
name: 'ok'
color: '0x55AA55'
}
item {
id: 2
name: 'hs-ko'
name: 'ko'
color: '0xff0000'
}

View File

@ -0,0 +1,10 @@
item {
id: 1
name: 'hs-ok'
color: '0x55AA55'
}
item {
id: 2
name: 'hs-ko'
color: '0xff0000'
}

View File

@ -0,0 +1,33 @@
# O-RING PRESENCE DETECTOR
# FOR FERRARI 000952054
[general]
name: ORING
instruction: CONTROLLARE PRESENZA N. 2 O-RING SU RACCORDI
neural_network: od1-50000
type: targeted
# POINTS FORMAT:
# point_name: point_center point_size fill_color border_color border_thickness shape
# EXAMPLE:
# name: X,Y W,H 0xAARRGGBB 0xAARRGGBB T SHAPE CLASS
# ZONES FORMAT:
# region_name: region_center region_margin class
# margin can be a box (XM*2,YM*2) or a radius (R)
# EXAMPLES:
# name: X,Y XM,YM T SHAPE CLASS
# name: X,Y R T SHAPE CLASS
# LABELS FORMAT:
# label_name: label_start_location font_size fill_color border_color border_thickness text
# EXAMPLE:
# name: X,Y S 0xAARRGGBB 0xAARRGGBB T TEXT
[markers]
[zones]
p1: 430,1140 520,260 ok
p2: 2900,1140 520,260 ok
[labels]
p1: 180,900 120 0xffffffff 0xff000000 4 O-RING 1
p2: 2600,900 120 0xffffffff 0xff000000 4 O-RING 2

View File

@ -3,6 +3,8 @@
[general]
name: TERMORESTRINGENTE
instruction: CONTROLLARE PRESENZA TERMORESTRINGENTE
neural_network: hs5-20000
type: global
# POINTS FORMAT:
# point_name: point_center point_size fill_color border_color border_thickness shape

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

View File

@ -2,7 +2,13 @@
:: RUN FROM POWERSHELL W/ADMIN RIGHTS:
:: Set-ExecutionPolicy Unrestricted -Scope CurrentUser
pip install -r src/requirements.txt
mkdir tmp
cd tmp
:: Advantech XNAVI
Invoke-WebRequest -uri "https://downloadt.advantech.com/download/downloadsr.aspx?File_Id=1-2BZC0F1" -usebasicparsing -outfile xnavi.zip
:: GXIPY
Invoke-WebRequest -uri "https://dahengimaging.com/downloads/Galaxy_Windows_EN_32bits%2064bits_1.18.2208.9301.zip" -OutFile Galaxy_Windows_EN_32bits_64bits_1.18.2208.9301.zip
Invoke-WebRequest -uri "https://dahengimaging.com/downloads/Galaxy_Windows_EN_32bits%2064bits_1.18.2208.9301.zip" -usebasicparsing -OutFile Galaxy_Windows_EN_32bits_64bits_1.18.2208.9301.zip

View File

@ -1,4 +0,0 @@
#!/bin/bash -e
cd "$(dirname "$0")"
source "./venv/bin/activate" || source "./venv/Scripts/activate" || :
python -O "./src/main.py" --no-edgetpu --no-tflite $*

4
runme_noautotest.bat Normal file
View File

@ -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

View File

@ -16,7 +16,6 @@ python -B -u "./src/main.py" \
--auto-accept-test-admin-permission \
--auto-login-admin \
--auto-select \
--debugger-workaround \
--no-edgetpu \
--no-gpu \
--panel \

View File

@ -11,6 +11,7 @@ from .tecna_marposs_provaset_t3 import TecnaMarpossProvasetT3
from .tecna_screwdriver import TecnaScrewdriver
from .test_component import TestComponent
from .usb_586x import USB_586x
from .rfid_pn532 import RFID_PN532
if "--vision" in sys.argv:
from .galaxy_camera import GalaxyCamera
from .neo_pixels import NeoPixels

View File

@ -85,6 +85,7 @@ class Component(QObject):
"""
super().__init__()
self.config = config
self.log=logging.getLogger(f"{self.__class__.__name__}")
self.name = name if name is not None else str(id(self))
self._threaded = threaded
self._period = period

View File

@ -10,9 +10,6 @@ if platform.architecture()[0] == '32bit':
c_uint64 = c_uint32
if platform.system().lower() == 'windows':
dll = windll.LoadLibrary(r"biodaq")
else:
dll = None

View File

@ -16,11 +16,11 @@ class ModbusClient:
return Readout([0] * count)
def write_register(self, register, data, unit=None, **kwargs):
self.log.debug(f"{unit}->{register} ({kwargs}) write: {data}, ", flush=True)
self.log.debug(f"{unit}->{register} ({kwargs}) write: {data}, ")
return Readout()
def write_registers(self, registers, data, unit=None, **kwargs):
self.log.debug(f"{unit}->{registers} ({kwargs}) write: {data}, ", flush=True)
self.log.debug(f"{unit}->{registers} ({kwargs}) write: {data}, ")
return Readout()
def close(self):

View File

@ -8,7 +8,7 @@ from PyQt5.QtWidgets import QMessageBox
from .component import Component
if platform.system() == "Windows":
if platform.system().lower() == "windows":
import win32print
@ -43,7 +43,7 @@ class Os_Label_Printer(Component):
for key, val in context.items():
key = "{" + key + "}"
label_file_contents = label_file_contents.replace(key, val)
if platform.system() == "Windows":
if platform.system().lower() == "windows":
try:
printer = win32print.OpenPrinter(self.printer)
job = win32print.StartDocPrinter(printer, 1, ("label", None, "RAW"))

View File

@ -0,0 +1,80 @@
import copy
import ctypes
import sys
import platform
from PyQt5.QtCore import QMutex, Qt, QTimer, pyqtSlot, pyqtSignal
from .component import Component
import ndef
import nfc
from nfc.clf import RemoteTarget
class RFID_PN532(Component):
new_id_signal = pyqtSignal(str)
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.data_to_write = None
self.mutex = QMutex()
self.simulate="--sim-rfid" in sys.argv
self.clf = None
self.connected=False
self.tag_present=False
self.current_data=None
self.is_win = platform.system().lower() == "windows"
self.dev_list = [f"{self.config['fixture_rfid']['port']}:pn532"] if self.is_win else ['tty:USB0:pn532','tty:USB1:pn532']
self._period = 1
def open_device(self):
self.clf = nfc.ContactlessFrontend()
for dev in self.dev_list:
self.connected = self.clf.open(dev)
if self.connected:
self.log.info(f"CONNECTED TO {dev}")
break
else:
self.log.info(f"UNABLE TO CONNECT TO {dev}")
def close_device(self):
self.clf.close()
@pyqtSlot()
def start(self):
super().start()
@pyqtSlot()
def _get(self):
if self.mutex.tryLock():
try:
if not self.connected:
self.open_device()
else:
target = self.clf.sense(RemoteTarget('106A'), RemoteTarget('106B'), RemoteTarget('212F'))
if target is not None:
tag = nfc.tag.activate(self.clf, target)
if tag is not None:
self.log.debug("tag present")
if tag.ndef is not None:
tag_content=tag.ndef.records[0].text
if tag_content!=self.current_data:
self.log.info(f"new tag detected:{tag_content}")
self.current_data=tag_content
self.new_id_signal.emit(self.current_data)
else:
self.log.error("tag is not NDEF")
else:
if self.current_data:
self.log.info(f"tag removed:{self.current_data}")
self.current_data = None
self.new_id_signal.emit(None)
self.log.debug("no target present")
except Exception as e:
self.log.info(f"{e}")
self.connected = False
finally:
self.mutex.unlock()
def write_tag(self,data):
self.data_to_write=copy.deepcopy(data)

View File

@ -24,7 +24,7 @@ class TecnaMarpossProvasetT3(ModbusComponent):
elif self.model == "t3l":
self.registers = t3l_registers
else:
raise NotImplementedError(f"techna t3 model {self.model!r} not implemented.")
raise NotImplementedError(f"tecna t3 model {self.model!r} not implemented.")
self.set_measure_units()
self.units = self.get_measure_units()
self.max_program_number = self.read("Max number of programs")
@ -67,7 +67,7 @@ class TecnaMarpossProvasetT3(ModbusComponent):
}.items():
self.write(register, unit) # (decimals << 8) + unit)
else:
raise NotImplementedError(f"techna t3 model {self.model!r} not implemented.")
raise NotImplementedError(f"tecna t3 model {self.model!r} not implemented.")
def get_measure_units(self):
units = {}
@ -105,7 +105,7 @@ class TecnaMarpossProvasetT3(ModbusComponent):
for unit_name in unit_names:
units[unit_name] = unit_spec
else:
raise NotImplementedError(f"techna t3 model {self.model!r} not implemented.")
raise NotImplementedError(f"tecna t3 model {self.model!r} not implemented.")
return units
def _convert_from_format(self, data, formatting=None, decoding_map=None):
@ -222,9 +222,12 @@ class TecnaMarpossProvasetT3(ModbusComponent):
"Active not severe alarm flags",
]})
else:
raise NotImplementedError(f"techna t3 model {self.model!r} not implemented.")
raise NotImplementedError(f"Tecna t3 model {self.model!r} not implemented.")
if info["Running test: active phase"] == "FINE TEST": # "END TEST, WAITING THE START OF A NEW TEST":
info.update(self.get_test_results())
for round_me in ["measured leak"]:
if round_me in info.keys():
info.update({round_me:float(f"{info[round_me]:.2f}")})
self.log.debug(str(info))
super()._get([info])
@ -251,13 +254,13 @@ class TecnaMarpossProvasetT3(ModbusComponent):
def get_test_results(self):
self.log.info("getting test results")
return {r: self.read(r) for r in [
"Running test: phase backwards time",
#"Running test: phase backwards time",
"Running test: filling pressure",
"Running test: pressure at the end of settling",
"Running test: burst pressure",
#"Running test: burst pressure",
"Running test: measured leak",
"Running test: calculated leak flow rate",
"Running test: calculate RVP%",
#"Running test: calculated leak flow rate",
#"Running test: calculate RVP%",
"Running test: result",
]}
@ -277,7 +280,8 @@ class TecnaMarpossProvasetT3(ModbusComponent):
# **{769 - 1 + i: (recipe_name[i * 2 + 1] << 8) + recipe_name[i * 2] for i in range(8)}, # print field 2
"Print options": 0b0000000000000000 | self.saver_label_count << 12 | self.saver_print_on_fail << 8 | self.saver_label_template,
"Test type": "Leak Test",
"Test flags": 0b0110000001011100 if step.spec.get("autotest", False) is not True else 0b0110000001010100,
# "Test flags": 0b0110000001011100 if step.spec.get("autotest", False) is not True else 0b0110000001010100,
"Test flags": 0b0110100001010100 if (step.spec.get("autotest", False) in ["ko_check"]) else 0b0110000001010100,
"T0 - Pre-filling time": step.spec["pre_filling_time"],
"P0 - Pre-filling pressure": step.spec["pre_filling_pressure"],
"T1 - Filling time": step.spec["filling_time"],
@ -285,11 +289,13 @@ class TecnaMarpossProvasetT3(ModbusComponent):
"PR- - Min pressure tolerance %": step.spec["settling_pressure_min_percent"],
"PR+ - Max pressure tolerance % (P+)": step.spec["settling_pressure_max_percent"],
"T3 - Measure time": step.spec["test_time"],
"Q- Lower test leak limit": step.spec["test_pressure_min_delta"],
"Q- Lower test leak limit": step.spec["test_pressure_qneg"],
"PREL - Nominal test pressure": step.spec["test_pressure"],
"Q+ Upper test leak limit": step.spec["test_pressure_max_delta"],
"Q+ Upper test leak limit": step.spec["test_pressure_qpos"],
"FST - Discharge time": step.spec["flush_time"],
"FSL - Discharge limit": step.spec["flush_pressure"],
"PSQ - Next sequence program PSOUT mode": 0,
}
if self.model == "t3p":
pass
@ -300,7 +306,7 @@ class TecnaMarpossProvasetT3(ModbusComponent):
"Pn - Nominal test pressure": step.spec["test_pressure"],
})
else:
raise NotImplementedError(f"techna t3 model {self.model!r} not implemented.")
raise NotImplementedError(f"tecna t3 model {self.model!r} not implemented.")
self.log.debug(str(spec))
for register, value in spec.items():
self.write(register, value)

View File

@ -80,7 +80,7 @@ registers = {
"Running test: calculated leak flow rate": [42 - 1, {"dt": "32bit_int", "f": 1507, }],
"Running test: calculate RVP%": [44 - 1, {"dt": "32bit_int", }],
"Running test: result": [46 - 1, {"dt": "16bit_uint", "decoding": {
1: "LEAK TEST PASSED (also used in Volume+Leak tests)",
1: "LEAK TEST PASSED",
2: "BURST TEST PASSED WITH BURST",
3: "BURST TEST PASSED WITHOUT BURST",
4: "APERTURE TEST PASSED",
@ -337,5 +337,5 @@ registers = {
"T1 Steps - T1 Step %": [753 - 1, {"dt": "16bit_uint", }],
# | 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0 |
# | Step % T1 | T1 Steps |
"Sequence": [754 - 1, {"dt": "16bit_uint", }],
"PSQ - Next sequence program PSOUT mode": [754 - 1, {"dt": "16bit_uint", }],
}

View File

@ -59,7 +59,7 @@ registers = {
"Running test: calculated leak flow rate": [42 - 1, {"dt": "32bit_int", "f": 24, }],
"Running test: calculate RVP%": [44 - 1, {"dt": "32bit_int", }],
"Running test: result": [46 - 1, {"dt": "16bit_uint", "decoding": {
1: "LEAK TEST PASSED (also used in Volume+Leak tests)",
1: "LEAK TEST PASSED",
2: "BURST TEST PASSED WITH BURST",
3: "BURST TEST PASSED WITHOUT BURST",
4: "APERTURE TEST PASSED",

View File

@ -8,7 +8,7 @@ from PyQt5.QtCore import QMutex, Qt, QTimer, pyqtSlot, pyqtSignal
from .component import Component
is_win = platform.system() == "Windows"
is_win = platform.system().lower() == "windows"
if "--sim-io" not in sys.argv:
if is_win:
@ -158,7 +158,7 @@ class USB_586x(Component):
read = []
if is_win or self.simulate:
if self.simulate:
read.append(bytearray(0))
read=[1,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]
else:
ret = self.di_read(0, self.in_size)
if ret[0].value == ErrorCode.Success.value:

View File

@ -57,7 +57,7 @@ else:
class Vision(Component):
"""everything is expected the have shape with height (y) first then width (x)"""
"""everything is expected to have shape with height (y) first then width (x)"""
status_signal = pyqtSignal(object)
loading_model_signal = pyqtSignal(object)
@ -66,6 +66,7 @@ class Vision(Component):
super().__init__(config=config, name=name, period=period, lazy=lazy, paused=paused, threaded=threaded)
self.lock = QMutex()
self.simulate = "--sim-vision" in sys.argv
self.vision_config = None
def start(self):
self.model = None
@ -96,7 +97,7 @@ class Vision(Component):
self.render_consumer.out.connect(self.process_render_consumed)
super().start()
def config_changed(self):
def config_changed(self,vision_recipe=None):
# OBJECT DETECTION
self.detection_threshold = float(self.config[self.name].get("detection_threshold", 0.5))
# recipe
@ -104,7 +105,8 @@ class Vision(Component):
self.labels = None
# LOAD RECIPE
self.recipes_dir = Path(self.config[self.name].get("recipes_dir", "./config/vision/recipes"))
self.set_recipe(None)
self.set_recipe(vision_recipe)
self.vision_recipe=vision_recipe
self.recipe_watcher = QFileSystemWatcher([])
self.recipe_watcher.fileChanged.connect(self._set_recipe)
# LOAD MODEL
@ -119,9 +121,11 @@ class Vision(Component):
if "--no-tflite" in sys.argv:
self.allowed_modes.pop("edgetpu", None)
self.allowed_modes.pop("tflite", None)
self.load_model(self.config[self.name].get("neural_network", None))
if self.vision_config is not None:
self.load_model(self.vision_config["neural_network"])
# LOAD LABELS
label_map = label_map_util.load_labelmap("./config/vision/labels/labels.pbtxt")
label_file="labels" if vision_recipe is None else vision_recipe
label_map = label_map_util.load_labelmap(f"./config/vision/labels/{label_file}.pbtxt")
self.num_classes = len(label_map.item)
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=self.num_classes, use_display_name=True)
self.category_index = label_map_util.create_category_index(categories)
@ -148,7 +152,7 @@ class Vision(Component):
return pow((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2, 1 / 2)
def clear_recipe(self):
self.recipe = None
self.recipe_name = None
self.markers = {}
self.zones = {}
self.labels = {}
@ -170,6 +174,7 @@ class Vision(Component):
if len(read) != 1 or self.recipe_path not in read:
raise AssertionError("Recipe could not be read.")
os.path.splitext(os.path.basename(read[0]))[0]
self.vision_config = config._sections.get("general", None)
self.markers = self.parse_markers(config._sections.get("markers", None))
self.zones = self.parse_zones(config._sections.get("zones", None))
self.labels = self.parse_labels(config._sections.get("labels", None))
@ -179,7 +184,7 @@ class Vision(Component):
self.log.exception(f"Error reading {self.recipe_path!r}:")
self.clear_recipe()
self.status_signal.emit({
"recipe": self.recipe,
"recipe": self.recipe_name,
"markers": self.markers,
"zones": self.zones,
"labels": self.labels,
@ -189,8 +194,8 @@ class Vision(Component):
if recipe is None:
self.clear_recipe()
else:
self.recipe = recipe
self._set_recipe(self.recipes_dir / str(recipe))
self.recipe_name = recipe.split(".")[0]
self._set_recipe(self.recipes_dir / f"{self.recipe_name}.ini")
def parse_markers(self, config=None):
if config is None:
@ -434,11 +439,104 @@ class Vision(Component):
parsed_detections.append(detection)
return parsed_detections
def check_features_targeted(self, frame, lock=True):
parsed_detections = []
for zone_name,zone in self.zones.items():
y1,x1,y2,x2=int(zone["box"][0]),int(zone["box"][1]),int(zone["box"][2]),int(zone["box"][3])
crop = frame[y1:y2,x1:x2]
if self.interpreter is not None and frame.shape != self.interpreter.get_input_details()[0]["shape"][1:3]:
tensor = np.expand_dims(cv2.resize(crop, self.interpreter.get_input_details()[0]["shape"][1:3], interpolation=cv2.INTER_LINEAR), axis=0)
else:
frame_resized = cv2.resize(crop, (256, 256), interpolation=cv2.INTER_LINEAR)
tensor = tf.convert_to_tensor(np.asarray(frame_resized))
tensor = tensor[tf.newaxis, ...]
# tensor = np.expand_dims(frame, axis=0)
# Run inference
if lock:
self.lock.lock()
if self.simulate or self.tf_mode == "simulation":
detections = {
"detection_scores": [[1.0]],
"detection_boxes": [[[0.2, 0.2, 0.8, 0.8]]],
"detection_classes": [[1]],
}
if lock:
self.lock.unlock()
elif self.tf_mode in {"edgetpu", "tflite"}:
i_d = self.interpreter.get_input_details()
# print(i_d)
o_d = self.interpreter.get_output_details()
# print(o_d)
self.interpreter.set_tensor(i_d[0]["index"], tensor)
self.interpreter.invoke()
# PARSE TFLITE DETECTIONS
# signature_list = self.interpreter._get_full_signature_list()
# if signature_list:
# if len(signature_list) > 1:
# raise ValueError("Only support model with one signature.")
# signature = signature_list[next(iter(signature_list))]
# # count = int(self.interpreter.get_tensor(signature["outputs"]["output_0"])[0])
# scores = self.interpreter.get_tensor(signature["outputs"]["output_1"])[0]
# class_ids = self.interpreter.get_tensor(signature["outputs"]["output_2"])[0]
# boxes = self.interpreter.get_tensor(signature["outputs"]["output_3"])[0]
if self.interpreter.get_tensor(o_d[3]["index"]).size == 1:
boxes = self.interpreter.get_tensor(o_d[0]["index"])[0]
class_ids = self.interpreter.get_tensor(o_d[1]["index"])[0]
scores = self.interpreter.get_tensor(o_d[2]["index"])[0]
# count = int(self.interpreter.get_tensor(o_d[3]["index"])[0])
else:
scores = self.interpreter.get_tensor(o_d[0]["index"])[0]
boxes = self.interpreter.get_tensor(o_d[1]["index"])[0]
# count = int(self.interpreter.get_tensor(o_d[2]["index"])[0])
class_ids = self.interpreter.get_tensor(o_d[3]["index"])[0]
if lock:
self.lock.unlock()
detections = {
"detection_scores": [scores],
"detection_boxes": [boxes],
"detection_classes": [map(lambda class_id: class_id + 1, class_ids)],
}
else:
detections = self.model(tensor)
if lock:
self.lock.unlock()
detections = {
"detection_scores": detections["detection_scores"].numpy().tolist(),
"detection_boxes": detections["detection_boxes"].numpy().tolist(),
"detection_classes": detections["detection_classes"],
}
# WARNING: results other than the ones related to tensor[-1] will be discarded
for d_score, d_box, d_class in zip( # , d_mask in zip(
detections["detection_scores"][-1],
detections["detection_boxes"][-1],
detections["detection_classes"][-1],
# detections["detection_masks"][-1],
):
if d_score < self.detection_threshold:
continue
box = list(d_box)
box = [i * s for i, s in zip(box, crop.shape[:2] * 2)] # rescale detection to frame size
box_real=[box[0]+y1,box[1]+x1,box[2]+y1,box[3]+x1]
detection = {
"score": d_score,
"box": box_real,
"class": self.category_index[int(d_class)],
# "mask": d_mask,
"center": self.get_center(box),
"size": self.get_size(box),
}
parsed_detections.append(detection)
break # keep only first detection
return parsed_detections
def detections_to_items(self, detections):
# DRAW DETECTIONS
if detections is not None and len(detections):
style = {
"border_thickness": 25,
"border_thickness": 5,
"fill_color": QColor("#00000000"),
"shape": "rect",
"convert_negative_placement": False,
@ -460,7 +558,7 @@ class Vision(Component):
# MATCH DETECTIONS WITH RECIPE
results = dict.fromkeys(self.zones)
for detection in detections:
# find closest zone center to the detection
# find the closest zone center to the detection
# filtering out those that do not contain the detection
min_distance = sys.maxsize
closest_zone = None
@ -586,7 +684,7 @@ class Vision(Component):
**style,
"border_color": Qt.green if item["ok"] else Qt.red,
}
return items
return items
else:
return {}
@ -744,7 +842,11 @@ class Vision(Component):
# VISION_CONSUMER TASK
if consumable is None:
return
detections = self.check_features(consumable["frame"])
if self.vision_config["type"]=="targeted":
detections = self.check_features_targeted(consumable["frame"])
else:
detections = self.check_features(consumable["frame"])
results = self.process_detections(detections)
return {"detections": detections, "results": results}

View File

@ -37,6 +37,8 @@ class VisionSaver(Component):
save_time = int(save_time)
if type(save_time) is int:
save_time = datetime.fromtimestamp(save_time)
if type(save_time) is str:
save_time = datetime.now()
if type(save_time) is not datetime:
raise ValueError(f"save_time must be float int or datetime, not {type(save_time)}")
timestamp = save_time.strftime(self.time_format)

View File

@ -60,8 +60,8 @@ def init_db():
# "connector": {"connector": row["connector"]},
# "barcodes": {"serial": ""},
# "resistance": {"scale": 500, "expected": float(row["resistance_expected"]), "tolerance": float(row["resistance_tolerance"])},
# "leak_1": {"pre_filling_time": 1, "pre_filling_pressure": 1000, "filling_time": 1, "settling_time": 1, "settling_pressure_min_percent": 5, "settling_pressure_max_percent": 5, "test_time": 5, "test_pressure_min_delta": 100, "test_pressure": 1000, "test_pressure_max_delta": 100, "flush_time": 1, "flush_pressure": 100},
# "leak_2": {"pre_filling_time": 1, "pre_filling_pressure": 1000, "filling_time": 1, "settling_time": 1, "settling_pressure_min_percent": 5, "settling_pressure_max_percent": 5, "test_time": 5, "test_pressure_min_delta": 100, "test_pressure": 1000, "test_pressure_max_delta": 100, "flush_time": 1, "flush_pressure": 100},
# "leak_1": {"pre_filling_time": 1, "pre_filling_pressure": 1000, "filling_time": 1, "settling_time": 1, "settling_pressure_min_percent": 5, "settling_pressure_max_percent": 5, "test_time": 5, "test_pressure_qneg": 100, "test_pressure": 1000, "test_pressure_qpos": 100, "flush_time": 1, "flush_pressure": 100},
# "leak_2": {"pre_filling_time": 1, "pre_filling_pressure": 1000, "filling_time": 1, "settling_time": 1, "settling_pressure_min_percent": 5, "settling_pressure_max_percent": 5, "test_time": 5, "test_pressure_qneg": 100, "test_pressure": 1000, "test_pressure_qpos": 100, "flush_time": 1, "flush_pressure": 100},
# "vision": {"recipe": "termorestringente_923578.ini"},
# "print": {"template": "EtichettaR5.prn", },
# }.items():

View File

@ -10,7 +10,7 @@ from .users import Users
class Archive(BaseModel):
id = AutoField(primary_key=True, unique=True, null=False)
time = DateTimeField(unique=True, null=False, default=datetime.now)
time = DateTimeField(unique=True, null=False, default=datetime.now())
user = ForeignKeyField(Users, Users.username, null=False)
result = BooleanField(null=False)
overridden = BooleanField(null=False)
@ -22,7 +22,11 @@ class Archive(BaseModel):
@classmethod
@db.atomic()
def archive(cls, test_data, result, overridden):
time=datetime.now()
test_data["time"]=time.strftime("%d/%m/%Y %H:%M:%S")
test_data["user"]=Users.get_session().username
return cls.create(
time=time,
user=Users.get_session().user,
result=result,
overridden=overridden,

View File

@ -136,11 +136,9 @@ class Users(BaseModel):
def delete_by_username(cls, username):
cls.update(password="").where(cls.username == username).execute()
@classmethod
def delete(cls, *args, **kwargs):
# OVERRIDE DELETION
# so that deleting a user will only disable it
return cls.update(password="")
# @classmethod
# def delete(cls, *args, **kwargs):
# return cls.delete()
@property
def is_admin(self):

View File

@ -48,7 +48,7 @@ class ConfigReader(QObject):
def read_config_file(self, config_path):
config_path = str(config_path)
config = ConfigParser(*self._args, **self._kwargs)
config = ConfigParser(*self._args, **self._kwargs, allow_no_value=True,comment_prefixes="#",inline_comment_prefixes="#")
read = config.read(config_path)
if len(read) != 1 or config_path != read[0]:
raise AssertionError(f"Config file {config_path} could not be read.")

View File

@ -1,7 +1,7 @@
from time import perf_counter, time
ref = time() - perf_counter()
pass
def timing():
global ref

View File

@ -11,6 +11,7 @@ import weakref
from datetime import datetime
from pathlib import Path
if platform.system().lower() == "windows":
sys.path.append(f"{os.getcwd()}\src\components")
else:
@ -43,7 +44,7 @@ logging.basicConfig(
format="{asctime}:{name}:{levelname}:{message}",
datefmt="%Y-%m-%dT%H-%M-%S%z",
style="{",
level="INFO",
level="DEBUG" if "--debug" in sys.argv else "INFO",
handlers=[
logging.StreamHandler(stream=sys.stderr),
logging.FileHandler(
@ -63,12 +64,13 @@ try:
# IMPORT PROJECT ONLY AFTER SETTING UP SIGNAL, FAULTHANDLER AND LOGGHING
from components import (ArchiveSynchronizer, Multicomp730424,
Os_Label_Printer, RemoteAPI,
TecnaMarpossProvasetT3, TecnaScrewdriver, USB_586x)
TecnaMarpossProvasetT3, TecnaScrewdriver, USB_586x,RFID_PN532)
from lib.db import Users
from lib.helpers import ConfigReader
from PyQt5.QtCore import QObject, QThread, pyqtSignal
from PyQt5.QtWidgets import QApplication, QMessageBox
from ui import About, Archive, Login, Main_Window, Test, Users_Management
from ui import About, Archive, Login, Main_Window, Test, Users_Management, Recipe_Selection, \
Barcode_Recipe_Selection
if "--vision" in sys.argv:
from components import GalaxyCamera, NeoPixels, UVCCamera, Vision, VisionSaver
@ -101,7 +103,8 @@ try:
"remote_api": {"c": RemoteAPI, "k": {"main": self}},
"screwdriver": {"c": TecnaScrewdriver, "k": {"paused": True}},
"tecna_t3": {"c": TecnaMarpossProvasetT3, "k": {"paused": True}},
"digital_io":{"c":USB_586x,"k":{"paused":True}}
"digital_io":{"c":USB_586x,"k":{"paused":True}},
"fixture_id":{"c":RFID_PN532,"k":{"paused":False, "lazy":False}},
}
# VISION COMPONENT IS OPTIONAL AND DISABLED BY DEFAULT
if "--vision" in sys.argv:
@ -146,15 +149,18 @@ try:
logging.exception(traceback.format_exc())
QMessageBox.critical(None, "Errore", f"Errore di avvio del programma di collaudo:\n\n{e}")
quit()
# connect camera frames to vision
if "vision" in self.components and "uvc_camera" in self.components:
self.components["vision"].set_sources({"uvc_camera": self.components["uvc_camera"].out})
elif "vision" in self.components and "galaxy_camera" in self.components:
self.components["vision"].set_sources({"galaxy_camera": self.components["galaxy_camera"].out})
# connect tecna to screwdriver
if "screwdriver" in self.components and "tecna_t3" in self.components:
self.components["tecna_t3"].set_requestors({"screwdriver": self.components["screwdriver"].request})
self.components["screwdriver"].set_sources({"tecna_t3": self.components["tecna_t3"].out})
# GUI INIT
if "--no-gui" not in sys.argv:
# self.main_window = Main_Window(self.bench)
@ -166,23 +172,22 @@ try:
Archive(hide_cloud_image="vision_saver" not in self().components)))
if "--archive" in sys.argv:
self.main_window.archive_a.trigger()
self.main_window.about_a.triggered.connect(
lambda checked, self=weakref.ref(self): self().main_window.open_dialog(About()))
if "--about" in sys.argv:
self.main_window.about_a.trigger()
self.main_window.admin_m.menuAction().setVisible(
False) # admin menu should not be visible before an admin logs in
# admin menu should not be visible before an admin logs in
self.main_window.admin_m.menuAction().setVisible(False)
self.main_window.about_a.triggered.connect(lambda checked, self=weakref.ref(self): self().main_window.open_dialog(About()))
self.main_window.quit_a.triggered.connect(quit_app)
self.main_window.users_management_a.triggered.connect(
lambda checked, self=weakref.ref(self): self().main_window.open_dialog(Users_Management()))
self.main_window.users_management_a.triggered.connect(lambda checked, self=weakref.ref(self): self().main_window.open_dialog(Users_Management()))
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)
if "--users-management" in sys.argv:
self.main_window.users_management_a.trigger()
# self.main_window.recipes_management_a.triggered.connect(lambda checked, self=weakref.ref(self): self().main_window.open_dialog(Recipes_Management()))
# if "--recipes-management" in sys.argv:
# self.main_window.recipes_management_a.trigger()
# self.main_window.steps_management_a.triggered.connect(lambda checked, self=weakref.ref(self): self().main_window.open_dialog(Steps_Management()))
# if "--steps-management" in sys.argv:
# self.main_window.steps_management_a.trigger()
# CONFIG-SPECIFIC MENU ENTRY ACTIVATION
if "tecna_t3" in self.components and (
"--enable-saving-tecna-recipes" in sys.argv or self.config.get("tecna_t3", {}).get("saver",
None) == "present"):
@ -192,9 +197,8 @@ try:
self.main_window.save_tecna_recipes_a.trigger()
else:
self.main_window.save_tecna_recipes_a.setVisible(False)
self.main_window.barcode_selection_a.setVisible(self.config["hardware_config"]["barcode_recipe_selection"] == "present")
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)
# OPEN LOGIN TAB
self.open_login()
# SHOW MAIN WINDOW
@ -220,16 +224,26 @@ try:
else:
self.main_window.admin_m.menuAction().setVisible(False)
# open test
self.main_window.open_tab(Test(self.config, self.components))
self.main_window.open_tab(Test(self.config, self.components,self))
self.main_window.centralWidget().request_autotest("login")
else:
self.main_window.admin_m.menuAction().setVisible(False)
def logout(self):
if type(self.main_window.centralWidget) is Test:
self.main_window.centralWidget.change_recipe()
Users.logout()
#Users.logout()
self.main_window.admin_m.menuAction().setVisible(False)
self.open_login()
if type(self.main_window.centralWidget().centralWidget.widget) in (Recipe_Selection,Barcode_Recipe_Selection):
# LOGOUT IMMEDIATELY IF NOT TESTING
Users.logout()
self.open_login()
else:
if not self.main_window.centralWidget().autotesting:
# LOGOUT AFTER AUTOTEST IF TESTING
self.main_window.centralWidget().request_autotest("logout")
else:
# LOGOUT IMMEDIATELY IF AUTOTESTING
Users.logout()
self.open_login()
def set_recipe_mode_table(self):
self.main_window.centralWidget().set_recipe_mode_table()

View File

@ -4,6 +4,7 @@ bottle
google-cloud-storage
imutils
lxml
nfcpy
numpy
opencv-python-headless
peewee

View File

@ -0,0 +1,35 @@
import csv
import json
file="STTEN5"
with open(f"tmp/{file}.csv",) as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
with open(f'tmp/{file}_out.csv', 'w') as csv_out:
# create the csv writer
writer = csv.writer(csv_out, lineterminator="\n")
line_count = 0
for row in csv_reader:
if line_count == 0:
print(f'Column names are {", ".join(row)}')
row.append("caduta")
row.append("pressione")
row.pop(1) # remove data column
line_count += 1
writer.writerow(row)
else:
data=json.loads(row[1])
if "leak_1" in data.keys():
leak=data["leak_1"]["0"]["results"]["data"]["""Running test: measured leak"""]
press=data["leak_1"]["0"]["results"]["data"]["""Running test: filling pressure"""]
leakstr=f'{leak:.3f}'
pressstr = f'{press:.3f}'
line_count += 1
row.append(leakstr)
row.append(pressstr)
row.pop(1) # remove data column
writer.writerow(row)
print(f'Processed {line_count} lines.')

View File

@ -0,0 +1,5 @@
-- REMEMBER TO BACKUP DB FIRST --
update steps set spec = json_insert(spec,"$.test_pressure_qpos",(json_extract(steps.spec, '$.test_pressure_max_delta'))) where type == "leak_1" or type=="leak_2";
update steps set spec = json_insert(spec,"$.test_pressure_qneg",(json_extract(steps.spec, '$.test_pressure_min_delta'))) where type == "leak_1" or type=="leak_2";
update steps set spec = json_insert(spec,"$.test_pressure_qpos",(json_extract(steps.spec, '$.test_pressure_max_delta'))) where type == "leak_1" or type=="leak_2";
update steps set spec = json_insert(spec,"$.test_pressure_qneg",(json_extract(steps.spec, '$.test_pressure_min_delta'))) where type == "leak_1" or type=="leak_2";

View File

@ -8,13 +8,19 @@ fieldnames = [
"cliente",
"codice_prodotto",
"descrizione",
"prova_tenuta_abilitata_2"
"pressione_di_test",
"pressione_di_test_delta_minimo",
"pressione_di_test_delta_massimo",
"tempo_riempimento",
"tempo_assestamento",
"tempo_di_test",
#"prova_tenuta_abilitata_2"
]
# FOLDER CONFIGURATION
in_path="../../tmp/ricette/"
files=glob(f"{in_path}/**/*.dsg",recursive=True)
csv_path="../test/csv_import/importazione da banco montaggio.csv"
csv_path="../test/csv_import/importazione da banco preformatura.csv"
data=[]
#FOR EACH FILE CREATE A TEST RECIPE
@ -30,7 +36,13 @@ for file in files:
"cliente":list(read_values["cliente"].keys())[0],
"codice_prodotto":list(read_values["numero disegno"].keys())[0],
"descrizione":os.path.basename(file),
"prova_tenuta_abilitata_2":"x" if list(read_values["prova2:tempo di riempimento"].keys())[0] not in ("0","00") else ""
"pressione_di_test":str(int(list(read_values["prova2:pressione di test"].keys())[0])*10),
"pressione_di_test_delta_minimo":list(read_values["prova2:tolleranza"].keys())[0],
"pressione_di_test_delta_massimo":list(read_values["prova2:tolleranza"].keys())[0],
"tempo_riempimento":list(read_values["prova2:tempo di riempimento"].keys())[0],
"tempo_assestamento":list(read_values["prova2:tempo di stabilizzazione"].keys())[0],
"tempo_di_test": list(read_values["prova2:tempo di prova"].keys())[0],
#"prova_tenuta_abilitata_2":"x" if list(read_values["prova2:tempo di riempimento"].keys())[0] not in ("0","00") else ""
}
data.append(line)

View File

@ -0,0 +1,40 @@
codice_ricetta,Priorita ,descrizione,etichette_supplementari,Numero nastri (N),Numero sensori anello (SA),Numero sensori presenza (SP)
5803223729,3,priorita  3,,,,
5803223730,3,priorita  3,,,,
5803223731,3,priorita  3,,,,
5803223732,3,priorita  3,,,,
5803223733,3,priorita  3,,,,
5803223734,3,priorita  3,,,,
5803223735,3,priorita  3,,,,
5803223736,3,priorita  3,,,,
5803223737,3,priorita  3,,,,
5803223738,3,priorita  3,,,,
5803223739,3,priorita  3,,,,
5803223740,3,priorita  3,,,,
5803223741,3,priorita  3,,,,
5803223742,3,priorita  3,,,,
5803223743,3,priorita  3,,,,
5803223744,3,priorita  3,,,,
5803223745,3,priorita  3,,,,
5803223746,3,priorita  3,,,,
5803223747,3,priorita  3,,,,
5803223748,3,priorita  3,,,,
5803223749,3,priorita  3,,,,
5803223750,3,priorita  3,,,,
5803223751,3,priorita  3,,,,
5803223752,3,priorita  3,,,,
5803223753,3,priorita  3,,,,
5803120372,3,priorita  3,,,,
5803120373,3,priorita  3,,,,
5803120374,3,priorita  3,,,,
5803120375,3,priorita  3,,,,
5803101543,3,priorita  3,,,,
5803101544,3,priorita  3,,,,
5803101545,3,priorita  3,,,,
5803101546,3,priorita  3,,,,
5803101547,3,priorita  3,,,,
5803223754,3,priorita  3,,,,
5803223755,3,priorita  3,,,,
5803120371,3,priorita  3,,,,
5803228584,3,priorita  3,,,,
5803228585,3,priorita  3,,,,
1 codice_ricetta Priorita  descrizione etichette_supplementari Numero nastri (N) Numero sensori anello (SA) Numero sensori presenza (SP)
2 5803223729 3 priorita  3
3 5803223730 3 priorita  3
4 5803223731 3 priorita  3
5 5803223732 3 priorita  3
6 5803223733 3 priorita  3
7 5803223734 3 priorita  3
8 5803223735 3 priorita  3
9 5803223736 3 priorita  3
10 5803223737 3 priorita  3
11 5803223738 3 priorita  3
12 5803223739 3 priorita  3
13 5803223740 3 priorita  3
14 5803223741 3 priorita  3
15 5803223742 3 priorita  3
16 5803223743 3 priorita  3
17 5803223744 3 priorita  3
18 5803223745 3 priorita  3
19 5803223746 3 priorita  3
20 5803223747 3 priorita  3
21 5803223748 3 priorita  3
22 5803223749 3 priorita  3
23 5803223750 3 priorita  3
24 5803223751 3 priorita  3
25 5803223752 3 priorita  3
26 5803223753 3 priorita  3
27 5803120372 3 priorita  3
28 5803120373 3 priorita  3
29 5803120374 3 priorita  3
30 5803120375 3 priorita  3
31 5803101543 3 priorita  3
32 5803101544 3 priorita  3
33 5803101545 3 priorita  3
34 5803101546 3 priorita  3
35 5803101547 3 priorita  3
36 5803223754 3 priorita  3
37 5803223755 3 priorita  3
38 5803120371 3 priorita  3
39 5803228584 3 priorita  3
40 5803228585 3 priorita  3

View File

@ -0,0 +1,165 @@
codice_ricetta,cliente,codice_prodotto,descrizione,pressione_di_test,pressione_di_test_delta_minimo,pressione_di_test_delta_massimo,tempo_riempimento,tempo_assestamento,tempo_di_test
5802011947,fpt,5802011947,5802011947.dsg,2000,10,10,10,10,10
5801970021,lancia bolzano,5801970021,5801970021.dsg,8000,10,10,10,10,10
5802401058,FPT,5802401058,5802401058.dsg,2000,10,10,05,20,10
579970919,iveco magirus,579970919,579970919.dsg,8000,20,20,10,10,10
5801404429,fpt,5801404429,5801404429.dsg,2000,10,10,10,10,10
5802108501,bolzano,5802108501,5802108501.dsg,8000,10,10,10,10,10
5801871355,fpt,5801871355,test sonda 6 (2).dsg,2000,10,10,10,10,10
5802195437,fpt,5802195437,5802195437.dsg,2000,10,10,10,10,10
5802990922,cnh,5802990922,5802990922.dsg,10000,30,30,5,5,10
5802754975,fpt,5802754975,5802754975.dsg,6000,30,30,10,10,10
5802506048,fpt,5802506048,5802506048.dsg,2000,20,20,10,20,40
5802772050,IVECO,5802772050,5802772050.dsg,10000,20,20,10,20,10
5802401142,FPT,5802401142,5802401142.dsg,2000,10,10,10,10,10
5801684362,fpt,5801684362,5801684362.dsg,2000,10,10,10,10,10
5802362033,fpt,5802362033,5802362033.dsg,2000,10,10,10,10,10
5801684373,fpt,5801684373,5801684373.dsg,2000,10,10,10,10,10
5801592607,fpt,5801592607,5801592607.dsg,2000,10,10,10,10,10
8051475,fpt,8051475,8051475.dsg,2000,10,10,10,10,10
5801779216,fpt,5801779216,5801779216.dsg,6000,30,30,05,05,20
5802731910,lancia bolzano,5802731910,5802731910.dsg,8000,10,10,10,10,10
5802108503,bolzano,5802108503,5802108503.dsg,8000,10,10,10,10,10
5801869611,fpt,5801869611,5801869611.dsg,6000,30,30,05,05,20
504291549,bolzano,504291549,504291549.dsg,8000,10,10,10,10,10
16L0001CP,fpt,16L0001CP,16L0001CP mc laren.dsg,1000,10,10,10,10,10
504354068,fpt,504354068,504354068.dsg,2000,10,10,10,10,10
5801588455,fpt,5801588455,5801588455.dsg,2000,10,10,10,10,10
5802517329,fpt,5802517329,5802517329.dsg,2000,30,30,05,10,10
5802899148,fpt,5802899148,5802899148.dsg,2000,10,10,10,20,99
5803012719,cnh,5803012719,5803012719.dsg,10000,30,30,5,5,10
TGA001EL,VANHOOL,TGA001EL,TGA001EL.dsg,120000,30,30,10,15,10
5801667698,fpt,5801667698,5801667698.dsg,2000,10,10,10,10,10
5802011985,fpt,5802011985,5802011985.dsg,2000,10,10,10,10,10
504126998,bolzano,504126998,504126998.dsg,8000,10,10,10,10,10
5801636013,fpt,5801636013,5801636013.dsg,2000,10,10,10,10,10
5802200725,CNH,5802200725,5802200725.dsg,3000,30,30,10,10,40
504049840,lancia bolzano,504049840,504049840.dsg,8000,10,10,10,10,10
5801970066,bolzano,5801970066,5801970066.dsg,8000,10,10,10,10,10
5802093875,FPT,5802093875,5802093875.dsg,2000,10,10,10,10,10
5801368939,fpt,5801368939,5801368939.dsg,2000,10,10,10,10,10
5802195441,fpt,5802195441,5802195441.dsg,2000,10,10,10,10,10
003934,dts,003934,003934.dsg,2000,10,10,10,10,10
5802093832,FPT,5802093832,5802093832.dsg,2000,10,10,10,10,10
5802422752,fpt,5802422752,5802422752.dsg,2000,10,10,05,20,10
5801632026,FPT,5801632026,5801632026.dsg,2000,10,10,10,10,10
5801404445,fpt,5801404445,5801404445.dsg,2000,10,10,10,10,10
5801970064,bolzano,5801970064,5801970064.dsg,8000,10,10,10,10,10
5801615767,irisbus,5801615767,5801615767.dsg,10000,10,10,10,10,10
5006217212,IVECO CDR,5006217212,5006217212 IVECO CDR.dsg,10000,20,20,10,10,10
5801664502,fpt,5801664502,5801664502.dsg,2000,10,10,10,10,07
5801871355,fpt,5801871355,TEST.dsg,2000,10,10,10,10,10
5802457210,heuliez bus,5802457210,5802457210.dsg,10000,10,10,10,10,10
5801541811,fpt,5801541811,5801541811.dsg,2000,10,10,10,10,10
5802011990,fpt,5802011990,5802011990.dsg,2000,10,10,10,10,10
5801970067,bolzano,5801970067,5801970067.dsg,8000,10,10,10,10,10
5802772051,IVECO,5802772051,5802772051.dsg,10000,20,20,10,20,10
5802832212,fpt,5802832212,5802832212.dsg,2000,10,10,10,20,40
504354067,fpt,504354067,504354067.dsg,2000,10,10,10,10,10
5801565620,fpt,5801565620,5801565620.dsg,2000,10,10,10,10,10
5801565599,fpt,5801565599,5801565599.dsg,2000,10,10,10,10,10
5803012724,cnh,5803012724,5803012724.dsg,10000,30,30,5,5,10
504321531,bolzano,504321531,504321531.dsg,8000,10,10,10,10,10
5802771992,IVECO,5802771992,5802771992.dsg,10000,20,20,05,10,10
5802753762,fpt,5802753762,5802753762.dsg,2000,10,10,10,20,60
5802729983,lancia bolzano,5802729983,5802729983.dsg,8000,10,10,10,10,10
5801592617,fpt,5801592617,5801592617.dsg,2000,10,10,10,10,10
5801501533,fpt,5801501533,5801501533.dsg,2000,10,10,10,10,10
579970920,iveco magirus,579970920,579970920.dsg,8000,20,20,10,10,10
5801869610,fpt,5801869610,5801869610.dsg,6000,30,30,05,05,20
5801666343,fpt,5801666343,5801666343.dsg,2000,10,10,10,10,10
5801616061,irisbus,5801616061,5801616061.dsg,10000,10,10,10,10,10
5006217211,IVECO CDR,5006217211,5006217211 IVECO CDR.dsg,10000,20,20,10,10,10
5802362019,fpt,5802362019,5802362019.dsg,2000,10,10,10,10,10
504385052,fpt,504385052,504385052.dsg,10000,10,10,10,10,10
5802991065,cnh,5802991065,5802991065.dsg,10000,30,30,5,5,10
5801821750,fpt,5801821750,5801821750.dsg,2000,10,10,10,10,10
5802282454,fpt,5802282454,5802282454.dsg,2000,10,10,10,20,20
5802771977,IVECO,5802771977,5802771977.dsg,10000,20,20,05,10,10
5801970018,lancia bolzano,5801970018,5801970018.dsg,8000,10,10,10,10,10
60192054,lancia,60192054,60192054.dsg,8000,10,10,10,10,10
5802991066,cnh,5802991066,5802991066.dsg,10000,30,30,5,5,10
5801384839,lancia bolzano,5801384839,5801384839.dsg,8000,10,10,10,10,10
5801384838,lancia bolzano,5801384838,5801384838.dsg,8000,10,10,10,10,10
5802912912,fpt,5802912912,5802912912.dsg,2000,10,10,10,20,60
5802399858,fpt,5802399858,5802399858.dsg,2000,10,10,05,20,10
5801615766,irisbus,5801615766,5801615766.dsg,10000,10,10,10,10,10
5801636018,fpt,5801636018,5801636018.dsg,2000,10,10,10,10,10
5802170804,bolzano,5802170804,5802170804.dsg,8000,10,10,10,10,10
5802459861,lancia bolzano,5802459861,5802459861.dsg,3000,10,10,05,25,10
5801744070,fpt,5801744070,5801744070.dsg,2000,10,10,10,10,10
504354065,fpt,504354065,504354065.dsg,2000,10,10,10,10,10
5801429438,fpt,5801429438,5801429438.dsg,3000,10,10,10,10,10
5801501538,fpt,5801501538,5801501538.dsg,2000,10,10,10,10,10
5801871355,fpt,5801871355,5801871355.dsg,2000,10,10,10,10,10
5802912988,fpt,5802912988,5802912988.dsg,2000,10,10,10,20,70
579970907,iveco magirus,579970907,579970907.dsg,8000,20,20,10,10,10
5802901208,fpt,5802901208,FPT_5802901208.dsg,3000,30,30,05,25,10
5802399842,fpt,5802399842,5802399842.dsg,2000,10,10,10,20,57
5801744059,fpt,5801744059,5801744059.dsg,2000,10,10,10,10,10
5801779215,fpt,5801779215,5801779215.dsg,6000,30,30,05,05,20
504321532,lancia bolzano,504321532,504321532.dsg,8000,10,10,10,10,10
5802518329,fpt,5802518329,5802518329.dsg,2000,10,10,05,20,10
5801404450,fpt,5801404450,5801404450.dsg,10000,30,30,30,30,10
5801384841,lqncia bolzano,5801384841,5801384841.dsg,8000,10,10,10,10,10
5801384842,lancia bolzano,5801384842,5801384842.dsg,8000,10,10,10,10,10
504378974,fpt,504378974,504378974.dsg,5000,30,30,10,10,15
5802912853,fpt,5802912853,5802912853.dsg,2000,10,10,05,20,120
5801588464,fpt,5801588464,5801588464.dsg,2000,10,10,10,10,10
60192056,lancia bolzano,60192056,60192056.dsg,8000,10,10,10,10,10
5801770912,fpt,5801770912,5801770912.dsg,2000,10,10,10,10,10
5801780088,fpt,5801780088,5801780088.dsg,6000,30,30,05,05,20
test sonda 6,fpt,test sonda 6,Test controllo sonda n° 6.dsg,2000,10,10,10,10,10
5006217210,IVECO CDR,5006217210,5006217210 IVECO CDR.dsg,10000,10,10,10,10,10
5802011955,fpt,5802011955,5802011955.dsg,2000,10,10,10,10,10
5802506033,fpt,5802506033,5802506033.dsg,2000,20,20,10,20,30
5802195448,fpt,5802195448,5802195448.dsg,2000,10,10,10,10,10
5802170779,bolzano,5802170779,5802170779.dsg,8000,10,10,10,10,10
5801869604,fpt,5801869604,5801869604.dsg,6000,30,30,05,05,20
001030,dts,001030,001030.dsg,5000,10,10,10,30,30
5802782344,IVECO,5802782344,5802782344.dsg,5000,10,10,10,10,10
5802784037,IVECO,5802784037,5802784037.dsg,5000,10,10,10,10,10
5801615768,irisbus,5801615768,5801615768.dsg,10000,10,10,10,10,10
504354070,fpt,504354070,504354070.dsg,2000,10,10,10,10,10
5802401073,FPT,5802401073,5802401073.dsg,2000,10,10,05,20,10
5801912552,fpt,5801912552,5801912552.dsg,6000,30,30,05,05,20
5801524941,fpt,5801524941,5801524941.dsg,10000,30,30,10,30,30
5802753755,fpt,5802753755,5802753755.dsg,2000,10,10,10,20,60
5802930104,fpt,5802930104,5802930104.dsg,2000,10,10,05,20,120
5801613010,fpt,5801613010,5801613010.dsg,2000,10,10,10,10,10
5801603399,fpt,5801603399,5801603399.dsg,2000,10,10,10,10,10
5801925887,fpt,5801925887,5801925887.dsg,3000,10,10,10,10,10
5802990926,cnh,5802990926,5802990926.dsg,10000,30,30,5,5,10
5801576299,fpt,5801576299,5801576299.dsg,2000,10,10,10,10,10
011356,dts,011356,011356.dsg,5000,10,10,10,30,30
5802269836,fpt,5802269836,5802269836.dsg,2000,30,30,05,10,10
504049844,lancia bolzano,504049844,504049844.dsg,8000,10,10,10,10,10
5801378904,fpt,5801378904,5801378904.dsg,2000,10,10,10,10,10
5801970019,lancia bolzano,5801970019,5801970019.dsg,8000,10,10,10,10,10
5802965967,fpt,5802965967,5802965967.dsg,2000,10,10,10,20,99
5802832205,fpt,5802832205,5802832205.dsg,2000,10,10,10,20,40
579970916,iveco magirus,579970916,579970916.dsg,8000,20,20,10,10,10
5802889710,IVECO BUS,5802889710,5802889710.dsg,15000,15,15,10,30,50
5802506036,fpt,5802506036,5802506036.dsg,2000,20,20,10,20,20
5801429431,fpt,5801429431,5801429431.dsg,3000,10,10,10,10,20
5801869609,fpt,5801869609,5801869609.dsg,6000,30,30,5,5,20
5802425718,FPT,5802425718,5802425718.dsg,2000,10,10,10,20,20
5802425688,fpt,5802425688,5802425688.dsg,2000,10,10,10,20,45
504326641,lancia boolzano,504326641,504326641.dsg,8000,10,10,10,10,10
5801780089,fpt,5801780089,5801780089.dsg,6000,30,30,05,05,20
504365800,fpt,504365800,504365800.dsg,2000,10,10,10,10,10
504291548,bolzano,504291548,504291548.dsg,8000,10,10,10,10,10
5802195453,fpt,5802195453,5802195453.dsg,2000,10,10,10,10,10
5801429403,fpt,5801429403,5801429403.dsg,3000,10,10,10,10,10
5801384840,lancia bolzano,5801384840,5801384840.dsg,8000,10,10,10,10,10
504126777,bolzano,504126777,504126777.dsg,8000,10,10,10,10,10
5801862227,lbz,5801862227,5801862227.dsg,8000,10,10,10,10,10
5801368948,fpt,5801368948,5801368948.dsg,2000,10,10,10,10,10
5801565573,fpt,5801565573,5801565573.dsg,2000,10,10,10,10,10
5801743988,fpt,5801743988,5801743988.dsg,2000,10,10,10,10,10
5801923370,fpt,5801923370,5801923370.dsg,2000,10,10,10,10,10
5801743980,fpt,5801743980,5801743980.dsg,2000,10,10,10,10,10
MY83-6B747-BA,ASTON MARTIN,MY83-6B747-BA,MY83-6B747-BA.dsg,7000,20,20,05,05,30
MY83-6B748-BA,ASTON MARTIN,MY83-6B748-BA,MY83-6B748-BA.dsg,7000,20,20,05,05,30
MY83-6L694-AB,ASTON MARTIN,MY83-6L694-AB,MY83-6L694-AB.dsg,7000,20,20,05,05,30
MY83-6L701-AB,ASTON MARTIN,MY83-6L701-AB,MY83-6L701-AB.dsg,7000,20,20,05,05,30
1 codice_ricetta cliente codice_prodotto descrizione pressione_di_test pressione_di_test_delta_minimo pressione_di_test_delta_massimo tempo_riempimento tempo_assestamento tempo_di_test
2 5802011947 fpt 5802011947 5802011947.dsg 2000 10 10 10 10 10
3 5801970021 lancia bolzano 5801970021 5801970021.dsg 8000 10 10 10 10 10
4 5802401058 FPT 5802401058 5802401058.dsg 2000 10 10 05 20 10
5 579970919 iveco magirus 579970919 579970919.dsg 8000 20 20 10 10 10
6 5801404429 fpt 5801404429 5801404429.dsg 2000 10 10 10 10 10
7 5802108501 bolzano 5802108501 5802108501.dsg 8000 10 10 10 10 10
8 5801871355 fpt 5801871355 test sonda 6 (2).dsg 2000 10 10 10 10 10
9 5802195437 fpt 5802195437 5802195437.dsg 2000 10 10 10 10 10
10 5802990922 cnh 5802990922 5802990922.dsg 10000 30 30 5 5 10
11 5802754975 fpt 5802754975 5802754975.dsg 6000 30 30 10 10 10
12 5802506048 fpt 5802506048 5802506048.dsg 2000 20 20 10 20 40
13 5802772050 IVECO 5802772050 5802772050.dsg 10000 20 20 10 20 10
14 5802401142 FPT 5802401142 5802401142.dsg 2000 10 10 10 10 10
15 5801684362 fpt 5801684362 5801684362.dsg 2000 10 10 10 10 10
16 5802362033 fpt 5802362033 5802362033.dsg 2000 10 10 10 10 10
17 5801684373 fpt 5801684373 5801684373.dsg 2000 10 10 10 10 10
18 5801592607 fpt 5801592607 5801592607.dsg 2000 10 10 10 10 10
19 8051475 fpt 8051475 8051475.dsg 2000 10 10 10 10 10
20 5801779216 fpt 5801779216 5801779216.dsg 6000 30 30 05 05 20
21 5802731910 lancia bolzano 5802731910 5802731910.dsg 8000 10 10 10 10 10
22 5802108503 bolzano 5802108503 5802108503.dsg 8000 10 10 10 10 10
23 5801869611 fpt 5801869611 5801869611.dsg 6000 30 30 05 05 20
24 504291549 bolzano 504291549 504291549.dsg 8000 10 10 10 10 10
25 16L0001CP fpt 16L0001CP 16L0001CP mc laren.dsg 1000 10 10 10 10 10
26 504354068 fpt 504354068 504354068.dsg 2000 10 10 10 10 10
27 5801588455 fpt 5801588455 5801588455.dsg 2000 10 10 10 10 10
28 5802517329 fpt 5802517329 5802517329.dsg 2000 30 30 05 10 10
29 5802899148 fpt 5802899148 5802899148.dsg 2000 10 10 10 20 99
30 5803012719 cnh 5803012719 5803012719.dsg 10000 30 30 5 5 10
31 TGA001EL VANHOOL TGA001EL TGA001EL.dsg 120000 30 30 10 15 10
32 5801667698 fpt 5801667698 5801667698.dsg 2000 10 10 10 10 10
33 5802011985 fpt 5802011985 5802011985.dsg 2000 10 10 10 10 10
34 504126998 bolzano 504126998 504126998.dsg 8000 10 10 10 10 10
35 5801636013 fpt 5801636013 5801636013.dsg 2000 10 10 10 10 10
36 5802200725 CNH 5802200725 5802200725.dsg 3000 30 30 10 10 40
37 504049840 lancia bolzano 504049840 504049840.dsg 8000 10 10 10 10 10
38 5801970066 bolzano 5801970066 5801970066.dsg 8000 10 10 10 10 10
39 5802093875 FPT 5802093875 5802093875.dsg 2000 10 10 10 10 10
40 5801368939 fpt 5801368939 5801368939.dsg 2000 10 10 10 10 10
41 5802195441 fpt 5802195441 5802195441.dsg 2000 10 10 10 10 10
42 003934 dts 003934 003934.dsg 2000 10 10 10 10 10
43 5802093832 FPT 5802093832 5802093832.dsg 2000 10 10 10 10 10
44 5802422752 fpt 5802422752 5802422752.dsg 2000 10 10 05 20 10
45 5801632026 FPT 5801632026 5801632026.dsg 2000 10 10 10 10 10
46 5801404445 fpt 5801404445 5801404445.dsg 2000 10 10 10 10 10
47 5801970064 bolzano 5801970064 5801970064.dsg 8000 10 10 10 10 10
48 5801615767 irisbus 5801615767 5801615767.dsg 10000 10 10 10 10 10
49 5006217212 IVECO CDR 5006217212 5006217212 IVECO CDR.dsg 10000 20 20 10 10 10
50 5801664502 fpt 5801664502 5801664502.dsg 2000 10 10 10 10 07
51 5801871355 fpt 5801871355 TEST.dsg 2000 10 10 10 10 10
52 5802457210 heuliez bus 5802457210 5802457210.dsg 10000 10 10 10 10 10
53 5801541811 fpt 5801541811 5801541811.dsg 2000 10 10 10 10 10
54 5802011990 fpt 5802011990 5802011990.dsg 2000 10 10 10 10 10
55 5801970067 bolzano 5801970067 5801970067.dsg 8000 10 10 10 10 10
56 5802772051 IVECO 5802772051 5802772051.dsg 10000 20 20 10 20 10
57 5802832212 fpt 5802832212 5802832212.dsg 2000 10 10 10 20 40
58 504354067 fpt 504354067 504354067.dsg 2000 10 10 10 10 10
59 5801565620 fpt 5801565620 5801565620.dsg 2000 10 10 10 10 10
60 5801565599 fpt 5801565599 5801565599.dsg 2000 10 10 10 10 10
61 5803012724 cnh 5803012724 5803012724.dsg 10000 30 30 5 5 10
62 504321531 bolzano 504321531 504321531.dsg 8000 10 10 10 10 10
63 5802771992 IVECO 5802771992 5802771992.dsg 10000 20 20 05 10 10
64 5802753762 fpt 5802753762 5802753762.dsg 2000 10 10 10 20 60
65 5802729983 lancia bolzano 5802729983 5802729983.dsg 8000 10 10 10 10 10
66 5801592617 fpt 5801592617 5801592617.dsg 2000 10 10 10 10 10
67 5801501533 fpt 5801501533 5801501533.dsg 2000 10 10 10 10 10
68 579970920 iveco magirus 579970920 579970920.dsg 8000 20 20 10 10 10
69 5801869610 fpt 5801869610 5801869610.dsg 6000 30 30 05 05 20
70 5801666343 fpt 5801666343 5801666343.dsg 2000 10 10 10 10 10
71 5801616061 irisbus 5801616061 5801616061.dsg 10000 10 10 10 10 10
72 5006217211 IVECO CDR 5006217211 5006217211 IVECO CDR.dsg 10000 20 20 10 10 10
73 5802362019 fpt 5802362019 5802362019.dsg 2000 10 10 10 10 10
74 504385052 fpt 504385052 504385052.dsg 10000 10 10 10 10 10
75 5802991065 cnh 5802991065 5802991065.dsg 10000 30 30 5 5 10
76 5801821750 fpt 5801821750 5801821750.dsg 2000 10 10 10 10 10
77 5802282454 fpt 5802282454 5802282454.dsg 2000 10 10 10 20 20
78 5802771977 IVECO 5802771977 5802771977.dsg 10000 20 20 05 10 10
79 5801970018 lancia bolzano 5801970018 5801970018.dsg 8000 10 10 10 10 10
80 60192054 lancia 60192054 60192054.dsg 8000 10 10 10 10 10
81 5802991066 cnh 5802991066 5802991066.dsg 10000 30 30 5 5 10
82 5801384839 lancia bolzano 5801384839 5801384839.dsg 8000 10 10 10 10 10
83 5801384838 lancia bolzano 5801384838 5801384838.dsg 8000 10 10 10 10 10
84 5802912912 fpt 5802912912 5802912912.dsg 2000 10 10 10 20 60
85 5802399858 fpt 5802399858 5802399858.dsg 2000 10 10 05 20 10
86 5801615766 irisbus 5801615766 5801615766.dsg 10000 10 10 10 10 10
87 5801636018 fpt 5801636018 5801636018.dsg 2000 10 10 10 10 10
88 5802170804 bolzano 5802170804 5802170804.dsg 8000 10 10 10 10 10
89 5802459861 lancia bolzano 5802459861 5802459861.dsg 3000 10 10 05 25 10
90 5801744070 fpt 5801744070 5801744070.dsg 2000 10 10 10 10 10
91 504354065 fpt 504354065 504354065.dsg 2000 10 10 10 10 10
92 5801429438 fpt 5801429438 5801429438.dsg 3000 10 10 10 10 10
93 5801501538 fpt 5801501538 5801501538.dsg 2000 10 10 10 10 10
94 5801871355 fpt 5801871355 5801871355.dsg 2000 10 10 10 10 10
95 5802912988 fpt 5802912988 5802912988.dsg 2000 10 10 10 20 70
96 579970907 iveco magirus 579970907 579970907.dsg 8000 20 20 10 10 10
97 5802901208 fpt 5802901208 FPT_5802901208.dsg 3000 30 30 05 25 10
98 5802399842 fpt 5802399842 5802399842.dsg 2000 10 10 10 20 57
99 5801744059 fpt 5801744059 5801744059.dsg 2000 10 10 10 10 10
100 5801779215 fpt 5801779215 5801779215.dsg 6000 30 30 05 05 20
101 504321532 lancia bolzano 504321532 504321532.dsg 8000 10 10 10 10 10
102 5802518329 fpt 5802518329 5802518329.dsg 2000 10 10 05 20 10
103 5801404450 fpt 5801404450 5801404450.dsg 10000 30 30 30 30 10
104 5801384841 lqncia bolzano 5801384841 5801384841.dsg 8000 10 10 10 10 10
105 5801384842 lancia bolzano 5801384842 5801384842.dsg 8000 10 10 10 10 10
106 504378974 fpt 504378974 504378974.dsg 5000 30 30 10 10 15
107 5802912853 fpt 5802912853 5802912853.dsg 2000 10 10 05 20 120
108 5801588464 fpt 5801588464 5801588464.dsg 2000 10 10 10 10 10
109 60192056 lancia bolzano 60192056 60192056.dsg 8000 10 10 10 10 10
110 5801770912 fpt 5801770912 5801770912.dsg 2000 10 10 10 10 10
111 5801780088 fpt 5801780088 5801780088.dsg 6000 30 30 05 05 20
112 test sonda 6 fpt test sonda 6 Test controllo sonda n° 6.dsg 2000 10 10 10 10 10
113 5006217210 IVECO CDR 5006217210 5006217210 IVECO CDR.dsg 10000 10 10 10 10 10
114 5802011955 fpt 5802011955 5802011955.dsg 2000 10 10 10 10 10
115 5802506033 fpt 5802506033 5802506033.dsg 2000 20 20 10 20 30
116 5802195448 fpt 5802195448 5802195448.dsg 2000 10 10 10 10 10
117 5802170779 bolzano 5802170779 5802170779.dsg 8000 10 10 10 10 10
118 5801869604 fpt 5801869604 5801869604.dsg 6000 30 30 05 05 20
119 001030 dts 001030 001030.dsg 5000 10 10 10 30 30
120 5802782344 IVECO 5802782344 5802782344.dsg 5000 10 10 10 10 10
121 5802784037 IVECO 5802784037 5802784037.dsg 5000 10 10 10 10 10
122 5801615768 irisbus 5801615768 5801615768.dsg 10000 10 10 10 10 10
123 504354070 fpt 504354070 504354070.dsg 2000 10 10 10 10 10
124 5802401073 FPT 5802401073 5802401073.dsg 2000 10 10 05 20 10
125 5801912552 fpt 5801912552 5801912552.dsg 6000 30 30 05 05 20
126 5801524941 fpt 5801524941 5801524941.dsg 10000 30 30 10 30 30
127 5802753755 fpt 5802753755 5802753755.dsg 2000 10 10 10 20 60
128 5802930104 fpt 5802930104 5802930104.dsg 2000 10 10 05 20 120
129 5801613010 fpt 5801613010 5801613010.dsg 2000 10 10 10 10 10
130 5801603399 fpt 5801603399 5801603399.dsg 2000 10 10 10 10 10
131 5801925887 fpt 5801925887 5801925887.dsg 3000 10 10 10 10 10
132 5802990926 cnh 5802990926 5802990926.dsg 10000 30 30 5 5 10
133 5801576299 fpt 5801576299 5801576299.dsg 2000 10 10 10 10 10
134 011356 dts 011356 011356.dsg 5000 10 10 10 30 30
135 5802269836 fpt 5802269836 5802269836.dsg 2000 30 30 05 10 10
136 504049844 lancia bolzano 504049844 504049844.dsg 8000 10 10 10 10 10
137 5801378904 fpt 5801378904 5801378904.dsg 2000 10 10 10 10 10
138 5801970019 lancia bolzano 5801970019 5801970019.dsg 8000 10 10 10 10 10
139 5802965967 fpt 5802965967 5802965967.dsg 2000 10 10 10 20 99
140 5802832205 fpt 5802832205 5802832205.dsg 2000 10 10 10 20 40
141 579970916 iveco magirus 579970916 579970916.dsg 8000 20 20 10 10 10
142 5802889710 IVECO BUS 5802889710 5802889710.dsg 15000 15 15 10 30 50
143 5802506036 fpt 5802506036 5802506036.dsg 2000 20 20 10 20 20
144 5801429431 fpt 5801429431 5801429431.dsg 3000 10 10 10 10 20
145 5801869609 fpt 5801869609 5801869609.dsg 6000 30 30 5 5 20
146 5802425718 FPT 5802425718 5802425718.dsg 2000 10 10 10 20 20
147 5802425688 fpt 5802425688 5802425688.dsg 2000 10 10 10 20 45
148 504326641 lancia boolzano 504326641 504326641.dsg 8000 10 10 10 10 10
149 5801780089 fpt 5801780089 5801780089.dsg 6000 30 30 05 05 20
150 504365800 fpt 504365800 504365800.dsg 2000 10 10 10 10 10
151 504291548 bolzano 504291548 504291548.dsg 8000 10 10 10 10 10
152 5802195453 fpt 5802195453 5802195453.dsg 2000 10 10 10 10 10
153 5801429403 fpt 5801429403 5801429403.dsg 3000 10 10 10 10 10
154 5801384840 lancia bolzano 5801384840 5801384840.dsg 8000 10 10 10 10 10
155 504126777 bolzano 504126777 504126777.dsg 8000 10 10 10 10 10
156 5801862227 lbz 5801862227 5801862227.dsg 8000 10 10 10 10 10
157 5801368948 fpt 5801368948 5801368948.dsg 2000 10 10 10 10 10
158 5801565573 fpt 5801565573 5801565573.dsg 2000 10 10 10 10 10
159 5801743988 fpt 5801743988 5801743988.dsg 2000 10 10 10 10 10
160 5801923370 fpt 5801923370 5801923370.dsg 2000 10 10 10 10 10
161 5801743980 fpt 5801743980 5801743980.dsg 2000 10 10 10 10 10
162 MY83-6B747-BA ASTON MARTIN MY83-6B747-BA MY83-6B747-BA.dsg 7000 20 20 05 05 30
163 MY83-6B748-BA ASTON MARTIN MY83-6B748-BA MY83-6B748-BA.dsg 7000 20 20 05 05 30
164 MY83-6L694-AB ASTON MARTIN MY83-6L694-AB MY83-6L694-AB.dsg 7000 20 20 05 05 30
165 MY83-6L701-AB ASTON MARTIN MY83-6L701-AB MY83-6L701-AB.dsg 7000 20 20 05 05 30

View File

@ -0,0 +1,13 @@
codice_ricetta,cliente,codice_prodotto,descrizione,avvitatura_abilitata,viti,prova_tenuta_abilitata,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,stampa_etichetta_abilitata,modello_etichetta
5803148257,IVECO,5803148257,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803148256,IVECO,5803148256,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803148263,IVECO,5803148263,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803148261,IVECO,5803148261,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803148264,IVECO,5803148264,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803148265,IVECO,5803148265,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803148267,IVECO,5803148267,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803148266,IVECO,5803148266,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803166717,IVECO,5803166717,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803148269,IVECO,5803148269,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803148268,IVECO,5803148268,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
5803167128,IVECO,5803167128,Daily Himatic MY24,,,x,5,5,10,10,5,30,5000,30,1,100,x,ETA30x16.prn
1 codice_ricetta cliente codice_prodotto descrizione avvitatura_abilitata viti prova_tenuta_abilitata 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 stampa_etichetta_abilitata modello_etichetta
2 5803148257 IVECO 5803148257 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
3 5803148256 IVECO 5803148256 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
4 5803148263 IVECO 5803148263 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
5 5803148261 IVECO 5803148261 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
6 5803148264 IVECO 5803148264 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
7 5803148265 IVECO 5803148265 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
8 5803148267 IVECO 5803148267 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
9 5803148266 IVECO 5803148266 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
10 5803166717 IVECO 5803166717 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
11 5803148269 IVECO 5803148269 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
12 5803148268 IVECO 5803148268 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn
13 5803167128 IVECO 5803167128 Daily Himatic MY24 x 5 5 10 10 5 30 5000 30 1 100 x ETA30x16.prn

View File

@ -5,15 +5,42 @@ from PyQt5.QtWidgets import QApplication
from components import Os_Label_Printer
from lib.helpers import ConfigReader
config = ConfigReader(system_id="stten5")
dmtx="5802850925"
config = ConfigReader(system_id="vm")
time =datetime.now()
context = {
"PART": dmtx,
"SN5": str(12345),
"DATE": datetime.now().strftime("%d/%m/%Y"),
"TIME": datetime.now().strftime("%H:%M:%S"),
# RECIPE DATA
"RECIPE": "000992752",
"PART": "000992752",
"TFILL": "5",
"TSET": "10",
"TTEST": "10",
"PSETMINP_A": "4750",
"PSETMAXP_A": "5250",
"PTEST": "5000",
"PMIN": "30",
"RESPSET": "5123",
"RESLEAK": "12.34",
"SN4": "1234",
# TIME DEFINITION
"DATETIME": time.strftime("%d/%m/%Y %H:%M:%S"),
"DATE": time.strftime("%d/%m/%Y"),
"TIME": time.strftime("%H:%M:%S"),
"YYYY": time.strftime("%Y"),
"YY": time.strftime("%y"),
"MO": time.strftime("%m"),
"DD": time.strftime("%d"),
"HH": time.strftime("%H"),
"MI": time.strftime("%M"),
"SS": time.strftime("%S"),
"JJJ": time.strftime("%j"),
# EXTRA DATA
"SHIFT": "1",
"STATION": "ST-TEN-1",
"OPERATOR": "MARIO",
"BADGE_NUM": "999",
}
app = QApplication(sys.argv)
if "--extra" in sys.argv:
@ -25,4 +52,4 @@ else:
# TEST STANDARD PRINTER
printer = Os_Label_Printer(config=config, name="label_printer")
printer.config_changed()
printer.print_label("ETA30x16.prn", context=context)
printer.print_label("F164F169.prn", context=context)

View File

@ -0,0 +1,55 @@
import sys
from datetime import datetime
from PyQt5.QtWidgets import QApplication
from components import Os_Label_Printer
from lib.helpers import ConfigReader
config = ConfigReader(system_id="st-ten-7")
time =datetime.now()
context = {
# RECIPE DATA
"RECIPE": "5803037204",
"PART": "5803037204",
"TFILL": "5",
"TSET": "10",
"TTEST": "10",
"PSETMINP_A": "4750",
"PSETMAXP_A": "5250",
"PTEST": "5000",
"PMIN": "30",
"RESPSET": "5123",
"RESLEAK": "12.34",
"SN5": "12345",
# TIME DEFINITION
"DATETIME": time.strftime("%d/%m/%Y %H:%M:%S"),
"DATE": time.strftime("%d/%m/%Y"),
"TIME": time.strftime("%H:%M:%S"),
"YYYY": time.strftime("%Y"),
"YY": time.strftime("%y"),
"MO": time.strftime("%m"),
"DD": time.strftime("%d"),
"HH": time.strftime("%H"),
"MI": time.strftime("%M"),
"SS": time.strftime("%S"),
"JJJ": time.strftime("%j"),
# EXTRA DATA
"SHIFT": "1",
"STATION": "ST-TEN-1",
"OPERATOR": "MARIO",
"BADGE_NUM": "999",
}
app = QApplication(sys.argv)
if "--extra" in sys.argv:
# TEST EXTRA PRINTER
printer = Os_Label_Printer(config=config, name="extra_label_printer")
printer.config_changed()
printer.print_label("MI1.prn")
else:
# TEST STANDARD PRINTER
printer = Os_Label_Printer(config=config, name="label_printer")
printer.config_changed()
printer.print_label("ETA30x16_203dpi.prn", context=context)

View File

@ -0,0 +1,55 @@
import sys
from datetime import datetime
from PyQt5.QtWidgets import QApplication
from components import Os_Label_Printer
from lib.helpers import ConfigReader
config = ConfigReader(system_id="st-ten-4")
time =datetime.now()
context = {
# RECIPE DATA
"RECIPE": "000992752",
"PART": "000992752",
"TFILL": "5",
"TSET": "10",
"TTEST": "10",
"PSETMINP_A": "4750",
"PSETMAXP_A": "5250",
"PTEST": "5000",
"PMIN": "30",
"RESPSET": "5123",
"RESLEAK": "12.34",
"SN4": "1234",
# TIME DEFINITION
"DATETIME": time.strftime("%d/%m/%Y %H:%M:%S"),
"DATE": time.strftime("%d/%m/%Y"),
"TIME": time.strftime("%H:%M:%S"),
"YYYY": time.strftime("%Y"),
"YY": time.strftime("%y"),
"MO": time.strftime("%m"),
"DD": time.strftime("%d"),
"HH": time.strftime("%H"),
"MI": time.strftime("%M"),
"SS": time.strftime("%S"),
"JJJ": time.strftime("%j"),
# EXTRA DATA
"SHIFT": "1",
"STATION": "ST-TEN-1",
"OPERATOR": "MARIO",
"BADGE_NUM": "999",
}
app = QApplication(sys.argv)
if "--extra" in sys.argv:
# TEST EXTRA PRINTER
printer = Os_Label_Printer(config=config, name="extra_label_printer")
printer.config_changed()
printer.print_label("MI1.prn")
else:
# TEST STANDARD PRINTER
printer = Os_Label_Printer(config=config, name="label_printer")
printer.config_changed()
printer.print_label("EtichettaR5_Montaggio_1prova.prn", context=context)

89
src/test/rfid.py Normal file
View File

@ -0,0 +1,89 @@
import logging
import platform
import sys
import time
from datetime import datetime
from pathlib import Path
import serial
import ndef
import nfc
from nfc.clf import RemoteTarget
logging.basicConfig(
format="{asctime}:{name}:{levelname}:{message}",
datefmt="%Y-%m-%dT%H-%M-%S%z",
style="{",
level="INFO",
handlers=[
logging.StreamHandler(stream=sys.stderr),
logging.FileHandler(
Path("data/logs") / f"{datetime.now().isoformat().replace(':', '_')}.log",
mode="a",
encoding="utf-8",
delay=False,
**({"errors": "surrogateescape"} if sys.version_info.major >= 3 and sys.version_info.minor >= 10 else {}),
),
],
force=True,
**({"encoding": "utf-8"} if sys.version_info.major >= 3 and sys.version_info.minor >= 10 else {}),
**({"errors": "surrogateescape"} if sys.version_info.major >= 3 and sys.version_info.minor >= 10 else {}),
)
connected=False
is_win = platform.system().lower() == "windows"
if is_win:
dev_list=['COM5:pn532']
else:
dev_list = ['tty:USB0:pn532', 'tty:USB1:pn532', 'tty:USB2:pn532']
while True:
try:
if not connected:
clf = nfc.ContactlessFrontend()
for dev in dev_list:
connected = clf.open(dev)
if connected:
print(f"CONNECTED TO {dev}")
break
else:
print(f"UNABLE TO CONNECT TO {dev}")
if connected:
target = clf.sense(RemoteTarget('106A'), RemoteTarget('106B'), RemoteTarget('212F'))
if target is not None:
tag = nfc.tag.activate(clf, target)
if tag is not None:
print(tag)
if tag.ndef is not None:
if not len(tag.ndef.records):
print("EMPTY TAG - WRITING...")
if not tag.ndef.is_writeable:
print("This Tag is not writeable.")
break
else:
tag.format()
#tag.ndef.records = [ndef.TextRecord("Errecinque"),ndef.TextRecord("5812345678")]
record=ndef.TextRecord("Errecinque,fixture,5812345678")
tag.ndef.records = [record]
if tag.ndef.has_changed:
print("WRITE ERROR")
else:
print("WRITE OK")
for record in tag.ndef.records:
print(record)
else:
print("ERROR NOT NDEF")
else:
print("NO TARGET")
else:
print("NOT CONNECTED")
except Exception as e:
print(f"EXCEPTION {e}")
connected=False
time.sleep(1)
print("EXITING")
clf.close()

View File

@ -3,7 +3,7 @@ import platform
import sys
import time
if platform.system() == "Windows":
if platform.system().lower() == "windows":
sys.path.append(f"{os.getcwd()}\src\components")
from src.components.usb_586x import USB_586x
from lib.helpers import ConfigReader

View File

@ -1,6 +1,8 @@
from .dialog import Dialog
from .about import About
from .archive import Archive
from .barcodes_step_editor import Barcodes_Step_Editor
from .barcode_recipe_selection import Barcode_Recipe_Selection
from .connector_step_editor import Connector_Step_Editor
from .count_step_editor import Count_Step_Editor
from .crud import (Cell, Combo_Box_Cell_Widget, CopyPastableCrudQTableWidget,
@ -8,7 +10,6 @@ from .crud import (Cell, Combo_Box_Cell_Widget, CopyPastableCrudQTableWidget,
Json_External_Dialog_Cell_Widget,
Json_External_Dialog_Editor_Cell_Widget,
Line_Edit_Cell_Widget)
from .dialog import Dialog
from .editor import Editor
from .helpers import calc_foreground_color, replace_widget
from .leak_step_editor import Leak_Step_Editor

Some files were not shown because too many files have changed in this diff Show More