From 936647379afc9f90e28abf0a98763ceb8be0dadb Mon Sep 17 00:00:00 2001 From: gg Date: Tue, 7 Nov 2023 16:57:58 +0100 Subject: [PATCH] pid correction via config file tbt --- config/machine_settings/defaults.ini | 1 + config/machine_settings/st-ten-8.ini | 1 + src/components/tecna_marposs_provaset_t3.py | 4 ++-- src/components/usb_586x.py | 5 ++--- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/machine_settings/defaults.ini b/config/machine_settings/defaults.ini index c63aa8d..5f35c00 100644 --- a/config/machine_settings/defaults.ini +++ b/config/machine_settings/defaults.ini @@ -125,6 +125,7 @@ pid_mode: 0 # 0=FAST 1=MEDIUM 2=SLOW 4 = FIXED 5 = AUTOMATIC 6 = FLOW 7 = LEAK W pid_level: 1 pid_speed: 1 tester_discharge_enable: no +pid_pressure_correction: 110 tempo_pre_riempimento: 0 pressione_pre_riempimento: 1000 diff --git a/config/machine_settings/st-ten-8.ini b/config/machine_settings/st-ten-8.ini index 4f581f2..df3ce56 100644 --- a/config/machine_settings/st-ten-8.ini +++ b/config/machine_settings/st-ten-8.ini @@ -82,6 +82,7 @@ tempo_svuotamento_2: 1 pressione_svuotamento_2: 100 canale_di_prova_2: 2 modello_etichetta: EtichettaR5_Montaggio_1prova.prn +pid_pressure_correction: 110 [autotest_leak] enabled: true diff --git a/src/components/tecna_marposs_provaset_t3.py b/src/components/tecna_marposs_provaset_t3.py index 35d10ae..b4143a7 100644 --- a/src/components/tecna_marposs_provaset_t3.py +++ b/src/components/tecna_marposs_provaset_t3.py @@ -299,8 +299,8 @@ class TecnaMarpossProvasetT3(ModbusComponent): "FSL - Discharge limit": step.spec["flush_pressure"], "PSQ - Next sequence program PSOUT mode": 0, "RAMPS: T1 configuration": pid_ramps, - "PID: pressure correction": 100, - "Various flags": 0b0000000000010000 if self.config["recipes_defaults"]["tester_discharge_enable"]=="yes" else 0b0000000000000000 + "PID: pressure correction": int(self.config["recipes_defaults"]["pid_pressure_correction"]), + "Various flags": 0b0000000000010000 if self.config["recipes_defaults"]["tester_discharge_enable"] == "yes" else 0b0000000000000000 } if self.model == "t3p": diff --git a/src/components/usb_586x.py b/src/components/usb_586x.py index 1349062..707f246 100644 --- a/src/components/usb_586x.py +++ b/src/components/usb_586x.py @@ -56,15 +56,14 @@ class USB_586x(Component): self.info = self.DeviceInformation() self.info.Description = self.id - # self.info.DeviceNumber = -1 self.info.DeviceMode = 1 self.info.ModuleIndex = 0 self.open_device() # SET ALL RELAYS OFF - for bit in range(0, self.out_size*8): - self.set_bit(int(bit/8), bit%8, False) + for bit in range(0, self.out_size * 8): + self.set_bit(int(bit/8), bit % 8, False) self.state_delay = 1 self.last_get = None