Merge remote-tracking branch 'origin/master'

This commit is contained in:
germano 2023-04-23 18:18:23 +02:00
commit 29b1120f22
32 changed files with 1029 additions and 214 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 237 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 284 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 480 KiB

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

@ -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_min_delta: 5
test_pressure: 9000
test_pressure_max_delta: 5
flush_time: 1
flush_pressure: 100
relay_config: 1

View File

@ -24,3 +24,18 @@ 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

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

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,6 +2,8 @@
:: RUN FROM POWERSHELL W/ADMIN RIGHTS:
:: Set-ExecutionPolicy Unrestricted -Scope CurrentUser
pip install -r src/requirements.txt
cd tmp
:: GXIPY

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 $*

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

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

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

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

@ -1,8 +1,6 @@
import csv
import itertools
import locale
import os
import re
import sys
import weakref
from glob import glob
@ -39,16 +37,13 @@ class Recipe_Selection(Widget):
self.unsupported_steps.add("second_leak_test")
session = Users.get_session()
if session.is_admin:
# readonly = ["id"]
readonly = False
crud_aliases = {
# "id": "Id",
"name": "Ricetta",
"client": "Cliente",
"part_number": "N° disegno",
"spec": "Specifica",
"description": "Descrizione",
# "archived": "Archiviata",
}
filters = None
else:
@ -59,7 +54,6 @@ class Recipe_Selection(Widget):
"part_number": "N° disegno",
"spec": "Specifica",
"description": "Descrizione",
# "archived": "Archiviata",
}
filters = {"archived": False}
step_defaults = self.read_steps(self.config.get("recipes_defaults", noner), noner)

View File

@ -93,7 +93,7 @@ class Test(Widget):
"emergency": Test_Assembly(img_path=self.select_step_img("reset_emergency"), text=u"EMERGENZA INTERVENUTA - RIPRISTINARE PULSANTE E SELEZIONARE \"RESET EMERGENZA\" DAL MEN\u00d9 \"STRUMENTI\"", widget=None),
"fail": Test_Assembly(img_path=self.select_step_img("fail"), text=u"CICLO INTERROTTO, PREMERE CONTINUA PER COMINCIARE UN NUOVO CICLO", widget=Test_Fail()),
"leak_1": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces,parent=self)),
"leak_2": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces)),
"leak_2": Test_Assembly(img_path=None, text=None, widget=Test_Leak(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces,parent=self)),
"instruction": Test_Assembly(img_path=None, text=u"ESEGUIRE LE OPERAZIONI DI MONTAGGIO INDICATE IN FIGURA", widget=Test_Instructions(components=self.components, recipe=self.recipe,bench_name=self.config.machine_id, step=self.step)),
"print": Test_Assembly(img_path=self.select_step_img("print"), text=u"STAMPA ETICHETTA IN CORSO", widget=None),
"resistance": Test_Assembly(img_path=None, text=u"COLLEGARE CONNETTORE ELETTRICO PER EFFETTUARE PROVA RESISTENZA", widget=Test_Resistance(components=self.components, recipe=self.recipe, step=self.step, pieces=self.pieces)),
@ -195,7 +195,7 @@ class Test(Widget):
self.autotest_timer = QTimer()
self.autotest_timer.setSingleShot(False)
self.autotest_timer.timeout.connect(self.request_periodic_autotest)
self.time_timer.start(self.autotest_period)
self.autotest_timer.start(self.autotest_period)
reason = "boot"
self.autotest_request = reason
@ -474,6 +474,7 @@ class Test(Widget):
if self.autotesting:
self.data["autotest"] = True
self.data["autotest_reason"] = self.autotesting_reason
self.data["recipe"]["name"] = "AUTOTEST"
archived = Archive.archive(self.data, ok and self.data["ok"], overridden=self.data["overridden"])
self.log.info(f"cycle archived locally: {archived!r}")
if not self.autotesting:

View File

@ -90,4 +90,4 @@ class Test_Connector(Test_Test):
return barcode is not None and len(barcode)
def set_focus(self):
self.barcodes_le.setFocus()
self.connector_le.setFocus()

View File

@ -21,6 +21,7 @@ class Test_Instructions(Test_Test):
self.svgWidget=None
self.svg_root=None
self.flag=False
self.inputs={}
self.svg_widget=QtSvg.QSvgWidget()
self.layout = QVBoxLayout()
self.layout.addWidget(self.svg_widget)
@ -31,12 +32,7 @@ class Test_Instructions(Test_Test):
def start(self, recipe=None, step=None, pieces=None):
show = super().start(recipe=recipe, step=step)
ring_ids=[f"ring_{i+1}" for i in range(step.spec["num_ring"])]
piece_ids=[f"piece_{i+1}" for i in range(step.spec["num_piece"])]
tape_ids=[f"tape_{i+1}" for i in range(step.spec["num_tape"])]
self.ids=ring_ids+piece_ids
self.inputs= {idx: {"id":id,"status":False} for idx,id in enumerate(self.ids)}
self.tapes = {idx: {"id": id, "status": False} for idx, id in enumerate(tape_ids)}
self.timer.start(1000)
# setup test loop
self.get_connection = self.components["digital_io"].out.connect(self.get)
@ -48,22 +44,26 @@ class Test_Instructions(Test_Test):
self.svg_root = etree.parse(svg_path)
self.svg_str = etree.tostring(self.svg_root)
self.svg_str=etree.tostring(self.svg_root)
self.monitored_ids=self.svg_root.xpath(f'''.//*[starts-with(@id, 'sensor_')]''')
self.tape_ids=self.svg_root.xpath(f'''.//*[starts-with(@id, 'tape_')]''')
self.done = False
return show
def toggle_icons(self):
self.flag = not self.flag
for idx,tape in self.tapes.items():
elem = self.svg_root.findall(f'''.//*[@id='{tape["id"]}']''')[0]
for elem in self.tape_ids:
if self.flag:
self.show_tape(elem)
else:
self.hide_tape(elem)
for idx,input in self.inputs.items():
elem = self.svg_root.findall(f'''.//*[@id='{input["id"]}']''')[0]
if input["status"]:
for elem in self.monitored_ids:
sensor_index = int(elem.attrib['id'].split("_")[1]) - 3
if self.inputs[sensor_index]:
self.show_ok(elem)
self.show_icon(elem)
else:
@ -76,9 +76,9 @@ class Test_Instructions(Test_Test):
self.show_svg()
def show_ok(self,id):
id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}ok.png"
id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}img/ok.png"
def show_ko(self,id):
id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}arw-yel-down.png"
id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}img/arw-yel-down.png"
def show_icon(self,id):
id.set("display", "inline")
@ -87,7 +87,7 @@ class Test_Instructions(Test_Test):
id.set("display", "none")
def show_tape(self,id):
id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}tape_black.png"
id.attrib["{http://www.w3.org/1999/xlink}href"]= f"{self.svg_path}img/tape_black.png"
id.set("display", "inline")
def hide_tape(self,id):
@ -110,13 +110,14 @@ class Test_Instructions(Test_Test):
ok = True
if len(data[0]["digital_io"])==0:
return
for sensor_index,sensor in enumerate(self.ids):
for sensor in self.monitored_ids:
sensor_index = int(sensor.attrib['id'].split("_")[1])-3
byte_idx=int(sensor_index/8)
bit_idx=sensor_index%8
if data[0]["digital_io"][byte_idx][bit_idx]:
self.inputs[sensor_index]["status"]=True
self.inputs[sensor_index] = True
else:
self.inputs[sensor_index]["status"] = False
self.inputs[sensor_index] = False
ok = False
if ok:
super().get([{

View File

@ -2,18 +2,26 @@ import sys
import time
import weakref
from PyQt5.QtWidgets import QMessageBox
from PyQt5.QtWidgets import QMessageBox, QDialog
from ui import Dialog
from ui.test_test import Test_Test
from components.Automation.BDaq import ErrorCode
class Test_Leak(Test_Test):
def __init__(self, components=None, recipe=None, step=None, pieces=None, run_once=False, reset_on_start=True, enable_override=False,parent=None):
super().__init__(components=components, recipe=recipe, step=step, pieces=pieces, run_once=run_once, reset_on_start=reset_on_start, enable_override=enable_override)
self.parent=parent
self.step=step
self.start_b.clicked.connect(self.start_test)
self.stop_b.clicked.connect(lambda checked, self=weakref.ref(self): self().components["tecna_t3"].stop_test())
self.parent=parent
self.show_instruction_b.setVisible("show_instructions" in self.parent.config["hardware_config"].keys())
self.show_instruction_b.clicked.connect(self.show_instruction)
def show_instruction(self):
dialog=Dialog()
dialog.setCentralWidget(self.parent.cycle_available_steps["instruction"])
dialog.show()
def start_test(self):
# print extra labels
@ -98,10 +106,13 @@ class Test_Leak(Test_Test):
if "Running test: result" in data["tecna_t3"]:
result = data["tecna_t3"]["Running test: result"]
if self.step.spec.get("autotest", False) is not True:
ok = type(result) is str and "passed" in result.lower()
step=self.step.spec.get("autotest", "")
if step == "ok_check":
ok = type(result) is str and "passed" in result.lower() # AUTOTEST - NO LEAK
elif step == "ko_check":
ok = type(result) is str and "failed" in result.lower() # AUTOTEST - LEAK
else:
ok = type(result) is str and "failed" in result.lower()
ok = type(result) is str and "passed" in result.lower() # NORMAL TEST
if "digital_io" in self.components.keys():
# RESET RELAYS

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>370</width>
<height>491</height>
<width>1424</width>
<height>806</height>
</rect>
</property>
<property name="windowTitle">
@ -26,7 +26,7 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0" colspan="2">
<item row="0" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox_2">
<property name="font">
<font>
@ -39,8 +39,8 @@
<string>PROVA TENUTA</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="4" column="0">
<widget class="QLabel" name="label_8">
<item row="3" column="2">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>16</pointsize>
@ -49,15 +49,54 @@
</font>
</property>
<property name="text">
<string>Tipo di test</string>
<string>mbar</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="regulated_pressure_l">
<property name="maximumSize">
<size>
<width>130</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);
border: 1px solid black;
</string>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_9">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Indice di sequenza del test</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<item row="1" column="2">
<widget class="QLabel" name="label_6">
<property name="font">
<font>
<pointsize>16</pointsize>
@ -66,10 +105,7 @@
</font>
</property>
<property name="text">
<string>Pressione del circuito</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<string>mbar</string>
</property>
</widget>
</item>
@ -107,17 +143,11 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="leak_l">
<property name="maximumSize">
<size>
<width>130</width>
<height>16777215</height>
</size>
</property>
<item row="5" column="1" colspan="2">
<widget class="QLabel" name="sequence_index_l">
<property name="font">
<font>
<pointsize>20</pointsize>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
@ -132,6 +162,54 @@ border: 1px solid black;
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_8">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Tipo di test</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Pressione del circuito</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>mbar</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="circuit_pressure_l">
<property name="maximumSize">
@ -187,8 +265,27 @@ border: 1px solid black;
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="regulated_pressure_l">
<item row="4" column="1" colspan="2">
<widget class="QLabel" name="test_type_l">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);
border: 1px solid black;
</string>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="leak_l">
<property name="maximumSize">
<size>
<width>130</width>
@ -212,65 +309,6 @@ border: 1px solid black;
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_9">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Indice di sequenza del test</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>mbar</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>mbar</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_6">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>mbar</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QLabel" name="test_phase_l">
<property name="font">
@ -283,44 +321,6 @@ border: 1px solid black;
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);
border: 1px solid black;
</string>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QLabel" name="test_type_l">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);
border: 1px solid black;
</string>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QLabel" name="sequence_index_l">
<property name="font">
<font>
<pointsize>16</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);
border: 1px solid black;
</string>
</property>
<property name="text">
@ -331,7 +331,27 @@ border: 1px solid black;
</layout>
</widget>
</item>
<item row="1" column="0">
<item row="16" column="0" colspan="3">
<widget class="QPushButton" name="override_b">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>FORZA ACCETTAZIONE</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="start_b">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -345,6 +365,12 @@ border: 1px solid black;
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="palette">
<palette>
<active>
@ -802,7 +828,7 @@ border: 1px solid black;
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<item row="4" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
@ -856,7 +882,7 @@ border: 1px solid black;
</layout>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QPushButton" name="stop_b">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -870,6 +896,12 @@ border: 1px solid black;
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="palette">
<palette>
<active>
@ -1327,23 +1359,474 @@ border: 1px solid black;
</property>
</widget>
</item>
<item row="14" column="0" colspan="2">
<widget class="QPushButton" name="override_b">
<item row="2" column="2">
<widget class="QPushButton" name="show_instruction_b">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>100</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>112</red>
<green>112</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>63</green>
<blue>63</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>170</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>112</red>
<green>112</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>112</red>
<green>112</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="SolidPattern">
<color alpha="128">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>112</red>
<green>112</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>63</green>
<blue>63</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>170</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>112</red>
<green>112</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>112</red>
<green>112</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="SolidPattern">
<color alpha="128">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Button">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>112</red>
<green>112</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Light">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>127</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Midlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>63</green>
<blue>63</blue>
</color>
</brush>
</colorrole>
<colorrole role="Dark">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Mid">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>170</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="BrightText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>127</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>112</red>
<green>112</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>112</red>
<green>112</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipBase">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>220</blue>
</color>
</brush>
</colorrole>
<colorrole role="ToolTipText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="SolidPattern">
<color alpha="128">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
<pointsize>20</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">background-color:rgb(112, 112, 255);</string>
</property>
<property name="text">
<string>FORZA ACCETTAZIONE</string>
<string>MOSTRA ISTRUZIONE</string>
</property>
</widget>
</item>