diff --git a/config/machine_settings/st-ten-1-linux.ini b/config/machine_settings/st-ten-1-linux.ini new file mode 100644 index 0000000..9a43767 --- /dev/null +++ b/config/machine_settings/st-ten-1-linux.ini @@ -0,0 +1,62 @@ +[machine] +description = ST-TEN-2 - COLLAUDO TUBI RISCALDATI VOLPIANO + +[hardware_config] +archive_synchronizer: present +label_printer: present +remote_api: absent +tecna_t3: present + +[digital_io] +# OUTPUT MAP FOR EXTERNAL FLUSH/BLOW UNIT +id_flush_blow: USB-5860,BID#0 +blow_on: 0 # INPUT VALVE TO SERVICE AIR +flush_on: 1 # OUTPUT VALVE TO DIRT COLLECTOR +blow_led:2 # CLEAN INDICATOR +test_on_led:3 # LEAK TEST ACTIVE INDICATOR +flush_led:4 # FLUSH INDICATOR + +[tecna_t3] +port: /dev/ttyUSB0 + +[recipe] +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: 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 +canale_di_prova: 0 +tecna_discharge_enable: yes + +[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 \ No newline at end of file diff --git a/config/machine_settings/st-ten-2-linux.ini b/config/machine_settings/st-ten-2-linux.ini new file mode 100644 index 0000000..7b91d90 --- /dev/null +++ b/config/machine_settings/st-ten-2-linux.ini @@ -0,0 +1,67 @@ +[machine] +description = ST-TEN-2 - COLLAUDO TUBI RISCALDATI VOLPIANO + +[hardware_config] +archive_synchronizer: present +label_printer: present +multicomp: present +remote_api: absent +tecna_t3: present + +[digital_io] +# OUTPUT MAP FOR EXTERNAL FLUSH/BLOW UNIT +id_flush_blow: USB-5860,BID#0 +blow_on: 0 # INPUT VALVE TO SERVICE AIR +flush_on: 1 # OUTPUT VALVE TO DIRT COLLECTOR +blow_led:2 # CLEAN INDICATOR +test_on_led:3 # LEAK TEST ACTIVE INDICATOR +flush_led:4 # FLUSH INDICATOR + +[tecna_t3] +port: /dev/ttyUSB0 + +[multicomp] +port: COM10 +4wire: enabled + +[recipe] +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: 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 +canale_di_prova: 0 +tecna_discharge_enable: yes + +[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 \ No newline at end of file diff --git a/config/machine_settings/st-ten-2.ini b/config/machine_settings/st-ten-2.ini index d576e6f..7f25cae 100644 --- a/config/machine_settings/st-ten-2.ini +++ b/config/machine_settings/st-ten-2.ini @@ -8,6 +8,15 @@ multicomp: present remote_api: absent tecna_t3: present +[digital_io] +# OUTPUT MAP FOR EXTERNAL FLUSH/BLOW UNIT +id_flush_blow: USB-5860,BID#0 +blow_on: 0 # INPUT VALVE TO SERVICE AIR +flush_on: 1 # OUTPUT VALVE TO DIRT COLLECTOR +blow_led:2 # CLEAN INDICATOR +test_on_led:3 # LEAK TEST ACTIVE INDICATOR +flush_led:4 # FLUSH INDICATOR + [tecna_t3] port: COM6 diff --git a/config/machine_settings/st-ten-6.ini b/config/machine_settings/st-ten-6.ini index 08d2f31..43d725e 100644 --- a/config/machine_settings/st-ten-6.ini +++ b/config/machine_settings/st-ten-6.ini @@ -28,8 +28,8 @@ platform: windows printer: zd421 [digital_io] -id: USB-5860,BID#0 -# OUTPUT MAP +id_flush_blow: USB-5860,BID#0 +# OUTPUT MAP FOR EXTERNAL FLUSH/BLOW UNIT blow_on: 3 # INPUT VALVE TO SERVICE AIR out_channel_select: 2 # AIR OUT VALVE (0=CH1, 1=CH2) in_channel_select: 0 # AIR IN VALVE (0=CH1, 1=CH2) diff --git a/config/machine_settings/st-ten-8.ini b/config/machine_settings/st-ten-8.ini index a1bd58a..0d7936a 100644 --- a/config/machine_settings/st-ten-8.ini +++ b/config/machine_settings/st-ten-8.ini @@ -16,6 +16,7 @@ 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 @@ -26,7 +27,19 @@ platform: windows printer: zd421 [digital_io] -id: USB-5862,BID#0 +# OUTPUT MAP FOR EXTERNAL FLUSH/BLOW UNIT +id_flush_blow: USB-5860,BID#0 +blow_on: 3 # INPUT VALVE TO SERVICE AIR +out_channel_select: 2 # AIR OUT VALVE (0=CH1, 1=CH2) +in_channel_select: 0 # AIR IN VALVE (0=CH1, 1=CH2) +flush_on: 1 # OUTPUT VALVE TO DIRT COLLECTOR +blow_led:7 # CLEAN INDICATOR +ch1_led:6 # CHANNEL 1 ACTIVE INDICATOR +ch2_led:5 # CHANNEL 2 ACTIVE INDICATOR +flush_led:4 # FLUSH INDICATOR + +# 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 [fixture_rfid] diff --git a/config/machine_settings/st-ten-9.ini b/config/machine_settings/st-ten-9.ini new file mode 100644 index 0000000..377d333 --- /dev/null +++ b/config/machine_settings/st-ten-9.ini @@ -0,0 +1,96 @@ +[machine] +description = ST-TEN-9 SATIL SRL - BANCO COLLAUDO TUBI R5 + +[hardware_config] +archive_synchronizer: present +label_printer: present +remote_api: absent +furness_controls: present + +[archive_synchronizer] +archive_endpoint: https://satilportal.it/api/st-ten-save/ +poll_time: 60 +hold_time: 1 + +[furness_controls] +port: COM4 +model: t3l + +[label_printer] +platform: windows +printer: zd421 + +[digital_io] +# OUTPUT MAP FOR EXTERNAL FLUSH/BLOW UNIT +id_flush_blow: USB-5860,BID#0 +blow_on: 3 # INPUT VALVE TO SERVICE AIR +out_channel_select: 2 # AIR OUT VALVE (0=CH1, 1=CH2) +in_channel_select: 0 # AIR IN VALVE (0=CH1, 1=CH2) +flush_on: 1 # OUTPUT VALVE TO DIRT COLLECTOR +blow_led:7 # CLEAN INDICATOR +ch1_led:6 # CHANNEL 1 ACTIVE INDICATOR +ch2_led:5 # CHANNEL 2 ACTIVE INDICATOR +flush_led:4 # FLUSH INDICATOR + +# 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 + +[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] +tecna_discharge_enable: yes +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: 1 +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: 1 +pressione_svuotamento_2: 100 +canale_di_prova_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: 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 diff --git a/src/components/modbus_component.py b/src/components/modbus_component.py index 0a33db6..1c34453 100644 --- a/src/components/modbus_component.py +++ b/src/components/modbus_component.py @@ -33,8 +33,8 @@ class ModbusComponent(Component): self.stopbits = getattr(serial, self.config[self.name].get("stopbits", "stopbits_one").upper()) self.parity = getattr(serial, self.config[self.name].get("parity", "parity_none").upper()) self.bytesize = getattr(serial, self.config[self.name].get("bytesize", "eightbits").upper()) - self.byteorder = getattr(Endian, self.config[self.name].get("byteorder", "Big").title()) - self.wordorder = getattr(Endian, self.config[self.name].get("wordorder", "Little").title()) + self.byteorder = getattr(Endian, self.config[self.name].get("byteorder", "Big").upper()) + self.wordorder = getattr(Endian, self.config[self.name].get("wordorder", "Little").upper()) self.timeout = int(self.config[self.name].get("timeout", 1)) self.lock.lock() self.client = ModbusClient( diff --git a/src/components/multicomp_730424.py b/src/components/multicomp_730424.py index 147f585..3fca333 100644 --- a/src/components/multicomp_730424.py +++ b/src/components/multicomp_730424.py @@ -1,6 +1,6 @@ import sys -if "--sim-serial" in sys.argv: +if "--sim-multicomp" in sys.argv: from components.dummies.serial import serial else: import serial