Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c43a870db5
20
README.md
20
README.md
@ -5,18 +5,20 @@ CONTROL SOFTWARE FOR ERRECINQUE LEAK TEST SYSTEMS
|
|||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
This software is deployed on many different systems, each using one of the following leak test instruments:
|
This software is deployed on many different systems, each using one of the following leak test instruments:
|
||||||
-Tecna T3L
|
|
||||||
-Tecna T3P
|
- Tecna T3L
|
||||||
-Furness controls FCO730
|
- Tecna T3P
|
||||||
|
- Furness controls FCO730
|
||||||
|
|
||||||
In addition to leak testing, the software supports many other functions, depending on which system is deployed:
|
In addition to leak testing, the software supports many other functions, depending on which system is deployed:
|
||||||
-electrical resistance measurement
|
|
||||||
-vision test
|
- electrical resistance measurement
|
||||||
-fixture digital I/O management
|
- vision test
|
||||||
|
- fixture digital I/O management
|
||||||
|
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
-Clone the repository
|
- Clone the repository
|
||||||
-On Windows: ./init_win.bat
|
- On Windows: ./init_win.bat
|
||||||
-On Linux: ./init.sh
|
- On Linux: ./init.sh
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
codice_ricetta,cliente,codice_prodotto,descrizione,tempo_riempimento,tempo_assestamento,tempo_di_test,percentuale_minima_pressione_assestamento,percentuale_massima_pressione_assestamento,pressione_di_test_delta_minimo,pressione_di_test,pressione_di_test_delta_massimo,modello_etichetta,richiedi_inserimento_scarto,istruzione_abilitata,tempo_svuotamento
|
codice_ricetta,cliente,codice_prodotto,descrizione,tempo_riempimento,tempo_assestamento,tempo_di_test,percentuale_minima_pressione_assestamento,percentuale_massima_pressione_assestamento,pressione_di_test_delta_minimo,pressione_di_test,pressione_di_test_delta_massimo,modello_etichetta,richiedi_inserimento_scarto,istruzione_abilitata,tempo_svuotamento
|
||||||
5803112815,IVECO,5803112815,Daily Automatico,5,10,10,5,5,30,5000,5,ETA30x16_203dpi.prn,x,x,1
|
5803112815,IVECO,5803112815,Daily Automatico,5,10,10,5,5,30,5000,5,ETA30x16_203dpi.prn,x,x,0
|
||||||
5803112816,IVECO,5803112816,Daily Automatico,5,10,10,5,5,30,5000,5,ETA30x16_203dpi.prn,x,x,1
|
5803112816,IVECO,5803112816,Daily Automatico,5,10,10,5,5,30,5000,5,ETA30x16_203dpi.prn,x,x,0
|
||||||
000746453 REV.5,FERRARI,000746453 REV.5,TUBO RITORNO OLIO,10,30,20,5,5,25,10000,5,ferrari_stten8.prn,,,1
|
000746453 REV.5,FERRARI,000746453 REV.5,TUBO RITORNO OLIO,10,30,20,5,5,25,10000,5,ferrari_stten8.prn,,,0
|
||||||
MY83-6L701-AB,ASTON MARTIN,MY83-6L701-AB,TRANSMISSION OIL,5,10,10,5,5,30,7000,5,aston_martin.prn,,,1
|
MY83-6L701-AB,ASTON MARTIN,MY83-6L701-AB,TRANSMISSION OIL,5,10,10,5,5,30,7000,5,aston_martin.prn,,,0
|
||||||
MY83-6L694-AB,ASTON MARTIN,MY83-6L694-AB,TRANSMISSION OIL,5,10,10,5,5,30,7000,5,aston_martin.prn,,,1
|
MY83-6L694-AB,ASTON MARTIN,MY83-6L694-AB,TRANSMISSION OIL,5,10,10,5,5,30,7000,5,aston_martin.prn,,,0
|
||||||
MY83-6B747-BA,ASTON MARTIN,MY83-6B747-BA,ENGINE OIL,5,10,10,5,5,30,7000,5,aston_martin.prn,,,1
|
MY83-6B747-BA,ASTON MARTIN,MY83-6B747-BA,ENGINE OIL,5,10,10,5,5,30,7000,5,aston_martin.prn,,,0
|
||||||
MY83-6B748-BA,ASTON MARTIN,MY83-6B748-BA,ENGINE OIL,5,10,10,5,5,30,7000,5,aston_martin.prn,,,1
|
MY83-6B748-BA,ASTON MARTIN,MY83-6B748-BA,ENGINE OIL,5,10,10,5,5,30,7000,5,aston_martin.prn,,,0
|
||||||
|
@ -53,7 +53,7 @@ resize_resolution: 612x512
|
|||||||
archive_endpoint: https://r5portal.it/api/st-ten-save/
|
archive_endpoint: https://r5portal.it/api/st-ten-save/
|
||||||
images_path: data/images
|
images_path: data/images
|
||||||
poll_time: 60
|
poll_time: 60
|
||||||
hold_time: 1
|
hold_time: 30
|
||||||
service_account_json: config/machine_settings/gcloud_default.json
|
service_account_json: config/machine_settings/gcloud_default.json
|
||||||
bucket_id: st_ten_img
|
bucket_id: st_ten_img
|
||||||
|
|
||||||
|
|||||||
104
config/machine_settings/st-ten-8-no-io.ini
Normal file
104
config/machine_settings/st-ten-8-no-io.ini
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
[machine]
|
||||||
|
description = ST-TEN-8 DAILY AUTOMATICO (NO I/O DIMA)
|
||||||
|
instruction_folder = st-ten-8
|
||||||
|
|
||||||
|
[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: absent
|
||||||
|
digital_io_flush_blow: present
|
||||||
|
barcode_recipe_selection: present
|
||||||
|
fixture_id: present
|
||||||
|
discard_box: present
|
||||||
|
enforce_piece_removal: yes
|
||||||
|
external_flush_blow: present # EXTERNAL BOX CONTROLLING MULTI-CHANNEL TEST (IF PRESENT), BLOW-CLEANING AND EXTERNAL FLUSH
|
||||||
|
|
||||||
|
[tecna_t3]
|
||||||
|
port: COM4
|
||||||
|
model: t3p
|
||||||
|
|
||||||
|
[label_printer]
|
||||||
|
platform: windows
|
||||||
|
printer: zd421
|
||||||
|
|
||||||
|
[digital_io]
|
||||||
|
# OUTPUT MAP FOR FIXTURE CONNECTOR
|
||||||
|
id_fixture: USB-5862,BID#0
|
||||||
|
discard_idx:12 # BIT NUMBER OF THE I/0 MODULE USED FOR DISCARD SENSING
|
||||||
|
|
||||||
|
[digital_io_flush_blow]
|
||||||
|
id: USB-5860,BID#1
|
||||||
|
# OUTPUT MAP FOR EXTERNAL FLUSH/BLOW UNIT
|
||||||
|
blow_on: 0 # INPUT VALVE TO SERVICE AIR
|
||||||
|
flush_on: 1 # OUTPUT VALVE TO DIRT COLLECTOR
|
||||||
|
blow_led:4 # CLEAN INDICATOR
|
||||||
|
ch1_led:3 # CHANNEL 1 ACTIVE INDICATOR
|
||||||
|
flush_led:2 # FLUSH INDICATOR
|
||||||
|
|
||||||
|
|
||||||
|
[fixture_rfid]
|
||||||
|
port: COM5
|
||||||
|
|
||||||
|
[recipe]
|
||||||
|
recipe_name_field: codice_ricetta
|
||||||
|
part_number_field: codice_prodotto
|
||||||
|
label_template_field: modello_etichetta
|
||||||
|
description_field: descrizione
|
||||||
|
|
||||||
|
[recipes_defaults]
|
||||||
|
tester_discharge_enable: no
|
||||||
|
dimensione_lotto_abilitata: x
|
||||||
|
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: 0
|
||||||
|
pressione_svuotamento: 100
|
||||||
|
canale_di_prova: 1
|
||||||
|
prova_tenuta_abilitata_2:
|
||||||
|
tempo_pre_riempimento_2: 0
|
||||||
|
pressione_pre_riempimento_2: 1000
|
||||||
|
tempo_riempimento_2: 20
|
||||||
|
tempo_assestamento_2: 20
|
||||||
|
tempo_di_test_2: 10
|
||||||
|
percentuale_minima_pressione_assestamento_2: 5
|
||||||
|
percentuale_massima_pressione_assestamento_2: 5
|
||||||
|
pressione_di_test_delta_minimo_2: 30
|
||||||
|
pressione_di_test_2: 15000
|
||||||
|
pressione_di_test_delta_massimo_2: 30
|
||||||
|
tempo_svuotamento_2: 0
|
||||||
|
pressione_svuotamento_2: 100
|
||||||
|
canale_di_prova_2: 2
|
||||||
|
modello_etichetta: EtichettaR5_Montaggio_1prova.prn
|
||||||
|
pid_pressure_correction: 105
|
||||||
|
|
||||||
|
[autotest_leak]
|
||||||
|
enabled: true
|
||||||
|
pre_filling_time: 0
|
||||||
|
pre_filling_pressure: 1000
|
||||||
|
filling_time: 10
|
||||||
|
settling_time: 10
|
||||||
|
settling_pressure_min_percent: 5
|
||||||
|
settling_pressure_max_percent: 5
|
||||||
|
test_pressure: 7000
|
||||||
|
test_time: 10
|
||||||
|
test_pressure_qpos: 10 #Q+ Upper test leak limit
|
||||||
|
test_pressure_qneg: 30 #Q- Lower test leak limit
|
||||||
|
test_pressure_tt_qpos: 1 # Q+ Upper test leak limit (tube-tube)
|
||||||
|
test_pressure_tt_qneg: 5 # Q- Lower test leak limit (tube-tube)
|
||||||
|
flush_time: 1
|
||||||
|
flush_pressure: 100
|
||||||
|
relay_config: 1
|
||||||
@ -13,12 +13,12 @@ vision_saver: absent
|
|||||||
vision: absent
|
vision: absent
|
||||||
screwdriver: absent
|
screwdriver: absent
|
||||||
digital_io: present
|
digital_io: present
|
||||||
#digital_io_flush_blow: present
|
digital_io_flush_blow: present
|
||||||
barcode_recipe_selection: present
|
barcode_recipe_selection: present
|
||||||
fixture_id: present
|
fixture_id: present
|
||||||
discard_box: present
|
discard_box: present
|
||||||
enforce_piece_removal: yes
|
enforce_piece_removal: yes
|
||||||
#external_flush_blow: present # EXTERNAL BOX CONTROLLING MULTI-CHANNEL TEST (IF PRESENT), BLOW-CLEANING AND EXTERNAL FLUSH
|
external_flush_blow: present # EXTERNAL BOX CONTROLLING MULTI-CHANNEL TEST (IF PRESENT), BLOW-CLEANING AND EXTERNAL FLUSH
|
||||||
|
|
||||||
[tecna_t3]
|
[tecna_t3]
|
||||||
port: COM4
|
port: COM4
|
||||||
@ -34,7 +34,7 @@ id_fixture: USB-5862,BID#0
|
|||||||
discard_idx:12 # BIT NUMBER OF THE I/0 MODULE USED FOR DISCARD SENSING
|
discard_idx:12 # BIT NUMBER OF THE I/0 MODULE USED FOR DISCARD SENSING
|
||||||
|
|
||||||
[digital_io_flush_blow]
|
[digital_io_flush_blow]
|
||||||
id: USB-5860,BID#0
|
id: USB-5860,BID#1
|
||||||
# OUTPUT MAP FOR EXTERNAL FLUSH/BLOW UNIT
|
# OUTPUT MAP FOR EXTERNAL FLUSH/BLOW UNIT
|
||||||
blow_on: 0 # INPUT VALVE TO SERVICE AIR
|
blow_on: 0 # INPUT VALVE TO SERVICE AIR
|
||||||
flush_on: 1 # OUTPUT VALVE TO DIRT COLLECTOR
|
flush_on: 1 # OUTPUT VALVE TO DIRT COLLECTOR
|
||||||
@ -53,7 +53,7 @@ label_template_field: modello_etichetta
|
|||||||
description_field: descrizione
|
description_field: descrizione
|
||||||
|
|
||||||
[recipes_defaults]
|
[recipes_defaults]
|
||||||
tester_discharge_enable: yes
|
tester_discharge_enable: no
|
||||||
dimensione_lotto_abilitata: x
|
dimensione_lotto_abilitata: x
|
||||||
tempo_pre_riempimento: 0
|
tempo_pre_riempimento: 0
|
||||||
pressione_pre_riempimento: 1000
|
pressione_pre_riempimento: 1000
|
||||||
@ -65,7 +65,7 @@ percentuale_massima_pressione_assestamento: 5
|
|||||||
pressione_di_test_delta_minimo: 30
|
pressione_di_test_delta_minimo: 30
|
||||||
pressione_di_test: 7000
|
pressione_di_test: 7000
|
||||||
pressione_di_test_delta_massimo: 30
|
pressione_di_test_delta_massimo: 30
|
||||||
tempo_svuotamento: 1
|
tempo_svuotamento: 0
|
||||||
pressione_svuotamento: 100
|
pressione_svuotamento: 100
|
||||||
canale_di_prova: 1
|
canale_di_prova: 1
|
||||||
prova_tenuta_abilitata_2:
|
prova_tenuta_abilitata_2:
|
||||||
@ -79,7 +79,7 @@ percentuale_massima_pressione_assestamento_2: 5
|
|||||||
pressione_di_test_delta_minimo_2: 30
|
pressione_di_test_delta_minimo_2: 30
|
||||||
pressione_di_test_2: 15000
|
pressione_di_test_2: 15000
|
||||||
pressione_di_test_delta_massimo_2: 30
|
pressione_di_test_delta_massimo_2: 30
|
||||||
tempo_svuotamento_2: 1
|
tempo_svuotamento_2: 0
|
||||||
pressione_svuotamento_2: 100
|
pressione_svuotamento_2: 100
|
||||||
canale_di_prova_2: 2
|
canale_di_prova_2: 2
|
||||||
modello_etichetta: EtichettaR5_Montaggio_1prova.prn
|
modello_etichetta: EtichettaR5_Montaggio_1prova.prn
|
||||||
|
|||||||
@ -56,10 +56,11 @@ class Os_Label_Printer(Component):
|
|||||||
label_file_contents = label_file_contents.replace(key, val)
|
label_file_contents = label_file_contents.replace(key, val)
|
||||||
if platform.system().lower() == "windows":
|
if platform.system().lower() == "windows":
|
||||||
try:
|
try:
|
||||||
printer = win32print.OpenPrinter(self.printer)
|
if not self.simulate:
|
||||||
job = win32print.StartDocPrinter(printer, 1, ("label", None, "RAW"))
|
printer = win32print.OpenPrinter(self.printer)
|
||||||
win32print.WritePrinter(printer, bytes(label_file_contents, encoding="utf8", errors="surrogateescape"))
|
job = win32print.StartDocPrinter(printer, 1, ("label", None, "RAW"))
|
||||||
win32print.EndPagePrinter(printer)
|
win32print.WritePrinter(printer, bytes(label_file_contents, encoding="utf8", errors="surrogateescape"))
|
||||||
|
win32print.EndPagePrinter(printer)
|
||||||
return label_file_contents
|
return label_file_contents
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.exception(traceback.format_exc())
|
self.log.exception(traceback.format_exc())
|
||||||
@ -75,10 +76,7 @@ class Os_Label_Printer(Component):
|
|||||||
label_file = "tmp/label.prn"
|
label_file = "tmp/label.prn"
|
||||||
with open(label_file, "w", errors="surrogateescape") as f:
|
with open(label_file, "w", errors="surrogateescape") as f:
|
||||||
f.write(label_file_contents)
|
f.write(label_file_contents)
|
||||||
if platform.system().lower() == "windows":
|
cmd = f'lp -d "{self.printer}" "{label_file}"'
|
||||||
cmd = f'print /d:"{self.printer}" "{label_file}"'
|
|
||||||
else:
|
|
||||||
cmd = f'lp -d "{self.printer}" "{label_file}"'
|
|
||||||
if not self.simulate:
|
if not self.simulate:
|
||||||
p = subprocess.run(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=True) # unsafe
|
p = subprocess.run(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=True) # unsafe
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
|
|||||||
@ -271,7 +271,7 @@ class TecnaMarpossProvasetT3(ModbusComponent):
|
|||||||
recipe_name += b"\x00" * (16 - len(recipe_name))
|
recipe_name += b"\x00" * (16 - len(recipe_name))
|
||||||
recipe_barcode = f"j{recipe.part_number}"[:16].encode("ascii")
|
recipe_barcode = f"j{recipe.part_number}"[:16].encode("ascii")
|
||||||
recipe_barcode += b"\x00" * (24 - len(recipe_barcode))
|
recipe_barcode += b"\x00" * (24 - len(recipe_barcode))
|
||||||
test_flags = 0b0110100001010100 if (step.spec.get("autotest", False) in ["ko_check"]) else 0b0110000001010100
|
test_flags = 0b0110100001010000 if (step.spec.get("autotest", False) in ["ko_check"]) else 0b0110000001010000
|
||||||
pid_mode = int(self.config["recipes_defaults"]["pid_mode"])<<4
|
pid_mode = int(self.config["recipes_defaults"]["pid_mode"])<<4
|
||||||
test_flags = test_flags | pid_mode
|
test_flags = test_flags | pid_mode
|
||||||
pid_ramps=0b0000000000000000 | int(self.config["recipes_defaults"]["pid_level"])<<8 | int(self.config["recipes_defaults"]["pid_speed"])<<12
|
pid_ramps=0b0000000000000000 | int(self.config["recipes_defaults"]["pid_level"])<<8 | int(self.config["recipes_defaults"]["pid_speed"])<<12
|
||||||
|
|||||||
@ -16,6 +16,7 @@ from lxml import etree
|
|||||||
class Test_Instructions(Test_Test):
|
class Test_Instructions(Test_Test):
|
||||||
def __init__(self,config ,components=None, recipe=None, step=None, run_once=False, reset_on_start=False, enable_override=True,bench_name="generic"):
|
def __init__(self,config ,components=None, recipe=None, step=None, run_once=False, reset_on_start=False, enable_override=True,bench_name="generic"):
|
||||||
super().__init__(components=components, recipe=recipe, step=step, run_once=run_once, reset_on_start=reset_on_start, enable_override=enable_override)
|
super().__init__(components=components, recipe=recipe, step=step, run_once=run_once, reset_on_start=reset_on_start, enable_override=enable_override)
|
||||||
|
self.get_connection = None
|
||||||
self.bench_name = bench_name
|
self.bench_name = bench_name
|
||||||
self.config = config
|
self.config = config
|
||||||
self.recipe=recipe
|
self.recipe=recipe
|
||||||
@ -43,7 +44,8 @@ class Test_Instructions(Test_Test):
|
|||||||
|
|
||||||
self.timer.start(1000)
|
self.timer.start(1000)
|
||||||
# setup test loop
|
# setup test loop
|
||||||
self.get_connection = self.components["digital_io"].out.connect(self.get)
|
if "digital_io" in self.components.keys():
|
||||||
|
self.get_connection = self.components["digital_io"].out.connect(self.get)
|
||||||
|
|
||||||
if step is not None:
|
if step is not None:
|
||||||
svg_path=f"{self.svg_path}{self.recipe}.svg"
|
svg_path=f"{self.svg_path}{self.recipe}.svg"
|
||||||
@ -165,7 +167,8 @@ class Test_Instructions(Test_Test):
|
|||||||
#self.done=True
|
#self.done=True
|
||||||
#self.done_ok = True
|
#self.done_ok = True
|
||||||
self.timer.stop()
|
self.timer.stop()
|
||||||
self.disconnect(self.get_connection)
|
if self.get_connection is not None:
|
||||||
|
self.disconnect(self.get_connection)
|
||||||
super().stop()
|
super().stop()
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
|
|||||||
@ -64,12 +64,14 @@ class Test_Leak(Test_Test):
|
|||||||
self.display_text("SOFFIAGGIO IN CORSO...")
|
self.display_text("SOFFIAGGIO IN CORSO...")
|
||||||
self.set_digital_out("blow_led",True)
|
self.set_digital_out("blow_led",True)
|
||||||
self.set_digital_out("blow_on",True)
|
self.set_digital_out("blow_on",True)
|
||||||
|
time.sleep(VALVE_TIME)
|
||||||
self.set_digital_out("flush_on", True)
|
self.set_digital_out("flush_on", True)
|
||||||
blow_time=int(self.step.spec.get('ext_blow_time',3))
|
blow_time=int(self.step.spec.get('ext_blow_time',3))
|
||||||
self.set_digital_out("blow_led", True)
|
self.set_digital_out("blow_led", True)
|
||||||
time.sleep(blow_time)
|
time.sleep(blow_time)
|
||||||
self.set_digital_out("blow_led", False)
|
self.set_digital_out("blow_led", False)
|
||||||
self.set_digital_out("blow_on", False)
|
self.set_digital_out("blow_on", False)
|
||||||
|
time.sleep(VALVE_TIME)
|
||||||
self.set_digital_out("flush_on", False)
|
self.set_digital_out("flush_on", False)
|
||||||
|
|
||||||
if self.parent.config["hardware_config"].get("dual_channel", None) != "present":
|
if self.parent.config["hardware_config"].get("dual_channel", None) != "present":
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user