supporto assemblati whip

This commit is contained in:
eduardo 2024-05-23 14:26:01 +02:00
parent 235eaddb74
commit 3f72be3abc
6 changed files with 87 additions and 47 deletions

View File

@ -1,6 +1,6 @@
N°,AGGIORNATO COD VOLPIANO (UT),AGGIORNATO COD VOLPIANO (MANU),AGGIORNATO CICLI VOLPIANO (GRAZIA),INSERIM. LISTINO CL (ACQ),Cliente,Cod FInito cliente,testo_etich_1,Cod Finito R5,Cod finito REV,Cod Semilavorato costampato con guaina,Cod Semilavorato Costampato,Cod Semilavorato raccordato e cablato,Cod Semilav. REV,Cod. ContoLavoro OLD,Tubo,Mat,L[mm],L taglio [mm],diam[mm],Racc. 1,Or. 1,Racc. 2,Or. 2,CE su racc.1,Connettore elettrico,W-lock,connettore,tolleranza_resistenza_pos,tolleranza_resistenza_neg,tolleranza_resistenza,tempo_assestamento,barcode_input_finelinea,verifica_codice_a_barre_abilitata,barcode_input_guaina,Etichetta,etichetta interoperazionale,Immagine_warning,T alim,Serie,Volumi,Lotti di produzione,Immagini warning,NOTE,R nominale,T tolleranza disegno +/-,MIN: Potenza 30 W/m,MAX: Potenza a 15 W/m,Collegamento elettrico,Valore medio mis Res costampato,Valore medio mis Res semilav,Commessa N°,Note2,Aggiornata Tolleranza,Immagine_guaina,Immagine_antares,barcode_input_2,barcode_input_3,barcode_input_4,barcode_input_5
N°,AGGIORNATO COD VOLPIANO (UT),AGGIORNATO COD VOLPIANO (MANU),AGGIORNATO CICLI VOLPIANO (GRAZIA),INSERIM. LISTINO CL (ACQ),Cliente,Cod FInito cliente,testo_etich_1,Cod Finito R5,Cod finito REV,Cod Semilavorato costampato con guaina,Cod Semilavorato Costampato,Cod Semilavorato raccordato e cablato,Cod Semilav. REV,Cod. ContoLavoro OLD,Tubo,Mat,L[mm],L taglio [mm],diam[mm],Racc. 1,Or. 1,Racc. 2,Or. 2,CE su racc.1,Connettore elettrico,W-lock,connettore,tolleranza_resistenza_pos,tolleranza_resistenza_neg,tolleranza_resistenza,tempo_assestamento,barcode_input_finelinea,verifica_codice_a_barre_abilitata,barcode_input_guaina,Etichetta,etichetta interoperazionale,Immagine_warning,T alim,Serie,Volumi,Lotti di produzione,Immagini warning,NOTE,R nominale,T tolleranza disegno +/-,MIN: Potenza 30 W/m,MAX: Potenza a 15 W/m,Collegamento elettrico,Valore medio mis Res costampato,Valore medio mis Res semilav,Commessa N°,Note2,Aggiornata Tolleranza,Immagine_guaina,Immagine_antares,barcode_input_2,barcode_input_3,barcode_input_4,barcode_input_5,n_componenti
1,x,x,x,x,Vanhool,11519588,,ND,,,R52373,R52373/1,,11519588/CL,026/02EL,PA12,4600,,6X13,"9,49",90°,"9,49",0°,CE0017,AMP SUPERSEAL 1.5 SERIES: 282104-1,,SCR1,10,10,10,10,R52373/1-{N11},x,,ETA013L.prn,ETACL.prn,,24 V,SI,,,,,"7,9 Ω",10%,#DIV/0!,#DIV/0!,,#N/A,#N/A,,,,,
2,x,x,x,x,Vanhool,11519589,,ND,,,R52374,R52374/1,,11519589/CL,026/02EL,PA12,4600,,6X13,"9,49",90°,"7,89",0°,CE0017,AMP SUPERSEAL 1.5 SERIES: 282104-1,,SCR1,10,10,10,10,R52374/1-{N11},x,,ETA013L.prn,ETACL.prn,,24 V,SI,,,,,"7,9 Ω",10%,#DIV/0!,#DIV/0!,,#N/A,#N/A,,,,,
2,x,x,x,x,Vanhool,11519589,,ND,,,R52374,R52374/1,,11519589/CL,026/02EL,PA12,4600,,6X13,"9,49",90°,"7,89",0°,CE0017,AMP SUPERSEAL 1.5 SERIES: 282104-1,,SCR1,10,10,10,10,R52374/1-{N11},x,,ETA013L.prn,ETACL.prn,,24 V,SI,,,,,"7,9 Ω",10%,#DIV/0!,#DIV/0!,,#N/A,#N/A,,,,,,,,,,
3,x,x,x,x,Vanhool,11519590,,ND,,,R52375,R52375/1,,11519590/CL,026/02EL,PA12,2700,,6X13,"7,89",90°,"7,89",0°,CE0017,AMP SUPERSEAL 1.5 SERIES: 282104-1,,SCR1,10,10,10,10,R52375/1-{N11},x,,ETA013L.prn,ETACL.prn,,24 V,SI,,,,,"9,4 Ω",10%,#DIV/0!,#DIV/0!,,#N/A,#N/A,,,,,
4,x,x,x,x,Manitou,53020608,,ND,,,R52399,R52399/1,,53020608/CL,026/02EL,PA12,3650,,6X13,"9,49",90°,"7,89",90°,CE0025,DEUTSCH DT: DT04-2P-C015,W2P,SCR2,10,10,10,10,R52399/1-{N11},x,,ETA013L.prn,ETACL.prn,,24 V,SI,,,,,"6,3 Ω",10%,#DIV/0!,#DIV/0!,,#N/A,#N/A,,,,,
5,x,x,x,x,Manitou,53020610,,ND,,,R52400,R52400/1,,53020610/CL,026/02EL,PA12,2680,2865,6X13,"7,89",90°,"6,30",90°,CE0025,DEUTSCH DT: DT04-2P-C015,W2P,SCR2,15,15,15,10,R52400/1-{N11},x,,ETA013L.prn,ETACL.prn,,24 V,SI,,,,,"8,7 Ω",15%,"6,7","13,4",,#N/A,#N/A,,Modificare valore disegno,,,
@ -282,7 +282,7 @@ N°,AGGIORNATO COD VOLPIANO (UT),AGGIORNATO COD VOLPIANO (MANU),AGGIORNATO CICLI
281,x,x,x,x,Tekne,R55911,,R55911,0,,R55910,R55910/1,0,--,026/02EL-S,PA12,1000,1185,6x13,"9,49",90°,"7,89",90°,CE0017,AMP SUPERSEAL 1.5 SERIES: 282104-1,,SCR1,25,25,25,10,R55910/1-{N11},x,,ETA013L.prn,ETACL.prn,,24 V,SI,,,,,"26,1 Ω",25%,"16,0","32,4",4S,#N/A,#N/A,,,,,
282,x,x,x,x,Goldoni,FAM50301001,,R56568,0,,R56567,R56567/1,0,--,026/02EL-S,PA12,400,"562,6",6x13,"9,49",0°,"7,89",90°,CE0017,AMP SUPERSEAL 1.5 SERIES: 282104-1,,SCR1,20,20,20,10,R56567/1-{N11},x,,ETA013L.prn,ETACL.prn,,12 V,SI,,,,,"12,4 Ω",20%,"8,0","17,1",4S,#N/A,#N/A,,,,,
283,x,x,x,x,Golodni,FAM50301002,,R56570,0,,R56569,R56569/1,0,--,TGAI15EL,EPDM,1500,"1675,2",4x13,"7,89",90°,"7,89",90°,CE0017,AMP SUPERSEAL 1.5 SERIES: 282104-1,,SCR1,20,20,20,20,R56569/1-{N11},x,,ETA013L.prn,ETACL.prn,,12 V,SI,,,,,"3,9 Ω",20%,"2,8","5,7",3S // 1S,#N/A,#N/A,,,,,
284,x,x,x,,New Flyer Bus,6498653,,R56739,0,R56739/1,R56738,R56738/1,,--,TGAI15EL,EPDM,6250,"6559,4",4x13,"7,89",90°,"7,89",0°,CE0098,DEUTSCH DT: DT04-2P-E008,W2PA,SCR3,15,20,15,10,R56739/1-{N11},,R56631/1-{N11},ETA013L.prn,ETACL.prn,,24 V,PRT,300 pz/anno,,,"Con guaina GC0035, GA0077, GA0018","5,1 Ω",15%,"3,0","5,9",4P,#N/A,#N/A,24033,"NECESSARIO AGGIORNAMENTO SOFTWARE, CREARE/MODIFICARE LE IMMAGINI",,,,R56737/1-{N11}
284,x,x,x,,New Flyer Bus,6498653,,R56739,0,R56739/1,R56738,R56738/1,,--,TGAI15EL,EPDM,6250,"6559,4",4x13,"7,89",90°,"7,89",0°,CE0098,DEUTSCH DT: DT04-2P-E008,W2PA,SCR3,15,20,15,10,R56739/1-{N11},,R56631/1-{N11},ETA013L.prn,ETACL.prn,,24 V,PRT,300 pz/anno,,,"Con guaina GC0035, GA0077, GA0018","5,1 Ω",15%,"3,0","5,9",4P,#N/A,#N/A,24033,"NECESSARIO AGGIORNAMENTO SOFTWARE, CREARE/MODIFICARE LE IMMAGINI",,,,R56737/1-{N11},,,,2
285,x,x,x,x,New Flyer Bus,6498886,,R56632,0,R56632/1,R56631,R56631/1,0,--,TGAI15EL,EPDM,2795,"2949,7",4x13,"7,89",90°,"7,89",0°,CE0166,DEUTSCH DT: DT04-2P-E008,W2PB,SCR4,15,20,15,30,R56632/1-{N11},x,R56631/1-{N11},ETA013L.prn,ETACL.prn,,11 V,PRT,300 pz/anno,,,"Con guaina GC0035, GA0077, GA0018","2,3 Ω",15%,"1,3","2,6",4P,#N/A,#N/A,24033,CREARE/MODIFICARE LE IMMAGINI,,,
286,x,x,x,x,New Flyer Bus,6499200,,R56738,0,R56738/1,R56737,R56737/1,0,--,TGAI15EL,EPDM,3455,"3609,7",4x13,"7,89",90°,"7,89",0°,CE0098,DEUTSCH DT: DT04-2P-E008,W2PA,SCR3,18,20,18,30,R56738/1-{N11},x,R56737/1-{N11},ETA013L.prn,ETACL.prn,,13 V,PRT,300 pz/anno,,C,Con guaina GC0035,"2,8 Ω",18%,"1,6","3,2",4P,#N/A,#N/A,24033,CREARE/MODIFICARE LE IMMAGINI,,,
287,x,x,x,,New Flyer Bus,6498654,,R56634,0,,R56633,R56633/1,0,--,TGAI15EL-L,EPDM,3556,"3710,7",4x13,"7,89",90°,"7,89",0°,CE0164,FCI 54200206-FEMALE HOUSING,KEY A,SCR16,15,15,15,30,R56633/1-{N11},x,,ETA013L.prn,ETACL.prn,,12 V,PRT,300 pz/anno,,,,"2,3 Ω",15%,"1,3","2,6",2S,#N/A,#N/A,24033,Ordinato nuovo SCR16,,,

Can't render this file because it has a wrong number of fields in line 2.

View File

@ -6,10 +6,10 @@ class Barcodes_Step_Editor(Editor):
super().__init__(action=action, cell_widget=cell_widget)
self.spec.update({
"serial": self.serial_le,
"barcode_input_1": self.serial_le_2,
"barcode_input_2": self.serial_le_3,
"barcode_input_3": self.serial_le_4,
"barcode_input_4": self.serial_le_5,
"n_pieces":self.n_comp_le
"barcode_input_2": self.serial_le_2,
"barcode_input_3": self.serial_le_3,
"barcode_input_4": self.serial_le_4,
"barcode_input_5": self.serial_le_5,
"n_pieces": self.n_comp_le
})

View File

@ -202,12 +202,11 @@ class Recipe_Selection(Widget):
},
"barcodes": {
"serial": row.get(barcode_serial_field, defaults["codice_a_barre"]),
"n_pieces":row.get("n_componenti", defaults["n_componenti"]),
"barcode_input_1": row.get("barcode_input_1", "-"),
"barcode_input_2": row.get("barcode_input_2", "-"),
"barcode_input_3": row.get("barcode_input_3", "-"),
"barcode_input_4": row.get("barcode_input_4", "-"),
"barcode_input_5": row.get("barcode_input_5", "-"),
"n_pieces":row.get("n_componenti", defaults["n_componenti"]),
},
"resistance": {
"scale": locale.atof(row.get("scala_resistenza", defaults["scala_resistenza"])),

View File

@ -384,24 +384,17 @@ class Test(Widget):
print_found = False
count_found = False
# create step sequence list
barcode_names = ['serial', 'barcode_input_1', 'barcode_input_2', 'barcode_input_3', 'barcode_input_4']
barcode_names = ['serial', 'barcode_input_2', 'barcode_input_3', 'barcode_input_4', 'barcode_input_5']
for i, step in enumerate(steps):
#if step.spec:
# n_pieces = int(step.spec.get("n_pieces", "1"))
#else:
# n_pieces = 1 # default to 1 if spec does not exist
if step.type == "barcodes":
n_pieces = int(step.spec.get("n_pieces", 1))
if n_pieces == 1:
step.spec["barcode_name"] = 'serial'
else:
step.spec["barcode_name"] = barcode_names[(n_pieces - 1) % len(barcode_names)]
if step.type == "barcodes" and n_pieces > 1:
step.spec["n_pieces"] = str(n_pieces - 1)
new_barcode_step = copy.deepcopy(step) # create a deep copy of the step
steps.insert(i + 1, new_barcode_step)
step.spec["n_pieces"] = str(n_pieces - 1)
new_barcode_step = copy.deepcopy(step) # create a deep copy of the step
steps.insert(i + 1, new_barcode_step)
if i in skip:
continue
if step.type == "vision":

View File

@ -11,12 +11,13 @@ from ui.test_test import Test_Test
class Test_Barcodes(Test_Test):
def __init__(self, components=None, recipe=None, step=None, pieces=None, run_once=False, reset_on_start=True, enable_override=False):
super().__init__(components=components, recipe=recipe, step=step, pieces=pieces, run_once=run_once, reset_on_start=reset_on_start, enable_override=enable_override)
self.current_step_barcode_name = None
self.barcodes_spec = {
"serial": self.check_serial_barcode,
"barcode_input_1": self.check_serial_barcode,
"barcode_input_2": self.check_serial_barcode,
"barcode_input_3": self.check_serial_barcode,
"barcode_input_4": self.check_serial_barcode,
"barcode_input_5": self.check_serial_barcode,
}
QShortcut(QKeySequence("Return"), self).activated.connect(self.get)
@ -30,6 +31,10 @@ class Test_Barcodes(Test_Test):
show = super().start(recipe=recipe, step=step, pieces=pieces)
if show is False:
return show
self.current_step_barcode_name = self.step.spec.get('barcode_name')
self.counter_l.setText(self.step.spec.get("n_pieces"))
self.expected_barcode.setText(self.step.spec.get(self.current_step_barcode_name))
self.visualize()
self.barcodes_le.setPalette(self.status_palettes[None])
self.barcodes_le.setText("")
@ -66,6 +71,7 @@ class Test_Barcodes(Test_Test):
barcode_ok = False
self.current_step_barcode_name = self.step.spec.get('barcode_name') # get current step's barcode name
barcode_check = self.barcodes_spec.get(self.current_step_barcode_name)
#self.expected_barcode.setText(self.step.spec.get(self.current_step_barcode_name))
# If the current step's barcode type exists in barcodes_spec and it's valid, store it
if barcode_check and barcode_check(data):

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>938</width>
<width>934</width>
<height>363</height>
</rect>
</property>
@ -14,19 +14,61 @@
<string>Test Barcodes</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_2">
<item row="3" column="0" colspan="2">
<widget class="QPushButton" name="override_b">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>FORZA ACCETTAZIONE</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="barcodes_le">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="expected_barcode">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>100</height>
</size>
</property>
<property name="title">
<string>Stato</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Codice pezzo</string>
@ -59,25 +101,28 @@
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="counter_l">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;-&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QPushButton" name="override_b">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>FORZA ACCETTAZIONE</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="barcodes_expected_le"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
@ -91,9 +136,6 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="barcodes_le"/>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_3">
<property name="text">