PID params tbt

This commit is contained in:
germano 2023-07-24 22:46:19 +02:00
parent 0ff07836ed
commit 6346a91c19
4 changed files with 17 additions and 6 deletions

View File

@ -121,6 +121,12 @@ tolleranza_resistenza_pos: 10
tolleranza_resistenza_neg: 5 tolleranza_resistenza_neg: 5
prova_tenuta_abilitata: x prova_tenuta_abilitata: x
warning_img: warning_img:
#TECNA RECIPE PARAMETERS
pid_mode: 0 # 0=FAST 1=MEDIUM 2=SLOW 4 = FIXED 5 = AUTOMATIC 6 = FLOW 7 = LEAK WITH FLOW
pid_level: 1
pid_speed: 1
tempo_pre_riempimento: 0 tempo_pre_riempimento: 0
pressione_pre_riempimento: 1000 pressione_pre_riempimento: 1000
tempo_riempimento: 10 tempo_riempimento: 10

View File

@ -271,6 +271,10 @@ 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
pid_mode = int(step.spec["pid_mode"])<<4
test_flags = test_flags | pid_mode
pid_ramps=0b0000000000000000 | int(step.spec.get("pid_level",1))<<8 | int(step.spec.get("pid_speed",1))<<12
spec = { spec = {
"Flag: Instrument settings": 0b0000000000000000, "Flag: Instrument settings": 0b0000000000000000,
"Test program for read/write operation": table, "Test program for read/write operation": table,
@ -280,8 +284,7 @@ class TecnaMarpossProvasetT3(ModbusComponent):
# **{769 - 1 + i: (recipe_name[i * 2 + 1] << 8) + recipe_name[i * 2] for i in range(8)}, # print field 2 # **{769 - 1 + i: (recipe_name[i * 2 + 1] << 8) + recipe_name[i * 2] for i in range(8)}, # print field 2
"Print options": 0b0000000000000000 | self.saver_label_count << 12 | self.saver_print_on_fail << 8 | self.saver_label_template, "Print options": 0b0000000000000000 | self.saver_label_count << 12 | self.saver_print_on_fail << 8 | self.saver_label_template,
"Test type": "Leak Test", "Test type": "Leak Test",
# "Test flags": 0b0110000001011100 if step.spec.get("autotest", False) is not True else 0b0110000001010100, "Test flags": test_flags,
"Test flags": 0b0110100001010100 if (step.spec.get("autotest", False) in ["ko_check"]) else 0b0110000001010100,
"T0 - Pre-filling time": step.spec["pre_filling_time"], "T0 - Pre-filling time": step.spec["pre_filling_time"],
"P0 - Pre-filling pressure": step.spec["pre_filling_pressure"], "P0 - Pre-filling pressure": step.spec["pre_filling_pressure"],
"T1 - Filling time": step.spec["filling_time"], "T1 - Filling time": step.spec["filling_time"],
@ -295,6 +298,8 @@ class TecnaMarpossProvasetT3(ModbusComponent):
"FST - Discharge time": step.spec["flush_time"], "FST - Discharge time": step.spec["flush_time"],
"FSL - Discharge limit": step.spec["flush_pressure"], "FSL - Discharge limit": step.spec["flush_pressure"],
"PSQ - Next sequence program PSOUT mode": 0, "PSQ - Next sequence program PSOUT mode": 0,
"RAMPS: T1 configuration": pid_ramps,
"PID: pressure correction": 100
} }
if self.model == "t3p": if self.model == "t3p":

View File

@ -275,9 +275,7 @@ registers = {
# T1/Pr: Filling mode 0=TIME 1=PRESSURE (*) # T1/Pr: Filling mode 0=TIME 1=PRESSURE (*)
# T1/Pr (T3LPQ) = 0 - 250 (seconds) # T1/Pr (T3LPQ) = 0 - 250 (seconds)
# T3/Q: Fail mode 0=TIME 1=PRESSURE (*) # T3/Q: Fail mode 0=TIME 1=PRESSURE (*)
# PID MODE: 0=FAST 1=MEDIUM 2=SLOW 4 = FIXED 5 = AUTOMATIC 6 = FLOW 7 = LEAK WITH # PID MODE: 0=FAST 1=MEDIUM 2=SLOW 4 = FIXED 5 = AUTOMATIC 6 = FLOW 7 = LEAK WITH FLOW
# -----
# FLOW
# P0-: 0= P0 pre-filling pressure is positive 1=P0 pre-filling pressure is negative (vacuum) # P0-: 0= P0 pre-filling pressure is positive 1=P0 pre-filling pressure is negative (vacuum)
# Pr-: 0= Pr filling pressure is positive 1=Pr filling pressure is negative (vacuum) # Pr-: 0= Pr filling pressure is positive 1=Pr filling pressure is negative (vacuum)
# B: = beep (not used) # B: = beep (not used)
@ -338,4 +336,5 @@ registers = {
# | 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0 | # | 15 14 13 12 11 10 9 8 | 7 6 5 4 3 2 1 0 |
# | Step % T1 | T1 Steps | # | Step % T1 | T1 Steps |
"PSQ - Next sequence program PSOUT mode": [754 - 1, {"dt": "16bit_uint", }], "PSQ - Next sequence program PSOUT mode": [754 - 1, {"dt": "16bit_uint", }],
"RAMPS: T1 configuration": [755-1, {"dt": "16bit_uint", }]
} }

View File

@ -274,7 +274,7 @@ registers = {
"PB - Minimum burst pressure": [743 - 1, {"dt": "16bit_uint", "f": 23, }], "PB - Minimum burst pressure": [743 - 1, {"dt": "16bit_uint", "f": 23, }],
"BD - Burst gap / PD - Delta Aperture": [744 - 1, {"dt": "16bit_uint", "f": 23, }], "BD - Burst gap / PD - Delta Aperture": [744 - 1, {"dt": "16bit_uint", "f": 23, }],
"FSL - Discharge limit": [745 - 1, {"dt": "16bit_uint", "f": 23, }], "FSL - Discharge limit": [745 - 1, {"dt": "16bit_uint", "f": 23, }],
"RP% - Pressure ratio": [746 - 1, {"dt": "16bit_uint", "g": 100, }], "PID: pressure correction": [746 - 1, {"dt": "16bit_uint", "g": 100, }],
# Format; x.xx % # Format; x.xx %
"PR+ - Max pressure tolerance % (P+)": [747 - 1, {"dt": "16bit_uint", "g": 10, }], "PR+ - Max pressure tolerance % (P+)": [747 - 1, {"dt": "16bit_uint", "g": 10, }],
# Format: x.x % # Format: x.x %
@ -298,6 +298,7 @@ registers = {
# | PSQ | | PSOUT | # | PSQ | | PSOUT |
# PSOUT MODE: 0 = While test run 1 = After start delay 2 = Always 3 = Only during start delay # PSOUT MODE: 0 = While test run 1 = After start delay 2 = Always 3 = Only during start delay
# 1001-1060 Table of the last test performed X The order of the parameters is always the same, as indicated for register from 701 to 759. # 1001-1060 Table of the last test performed X The order of the parameters is always the same, as indicated for register from 701 to 759.
# 10001-10060 Direct access to test program table number 1 X X The order of the parameters is always the same, as indicated for register from 701 to 759. # 10001-10060 Direct access to test program table number 1 X X The order of the parameters is always the same, as indicated for register from 701 to 759.
# 10101-10160 Direct access to test program table number 2 X X The order of the parameters is always the same, as indicated for register from 701 to 759. # 10101-10160 Direct access to test program table number 2 X X The order of the parameters is always the same, as indicated for register from 701 to 759.