Implement hash-based change detection for XML files and enhance cross-reference parsing documentation

- Added HASH_DETECTION.md to document the new SHA256 hash-based change detection method for XML files, detailing its advantages over traditional methods.
- Introduced a new field `source_xml_hash` in JSON files to store the hash of the source XML, improving change detection accuracy.
- Updated `x0_main.py`, `x1_to_json.py`, and `x2_process.py` to implement hash calculation and usage in processing logic.
- Created xref_info.md to provide comprehensive technical documentation on parsing TIA Portal `_XRef.xml` files for call tree generation.
- Added debug scripts (`debug_find_network13.py`, `debug_sr_details.py`, `debug_sr_processed.py`, `debug_sr_xml.py`) for detailed analysis of network and instruction data in JSON and XML formats.
This commit is contained in:
Miguel 2025-09-02 15:53:49 +02:00
parent 70bbc8d6f9
commit ab99a1cee1
21 changed files with 44460 additions and 5491 deletions

View File

@ -5,5 +5,5 @@
}, },
"level2": {}, "level2": {},
"level3": {}, "level3": {},
"working_directory": "C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\ExportTia" "working_directory": "D:\\Trabajo\\VM\\22 - 93841 - Sidel - Tilting\\ExportTia"
} }

View File

@ -1,6 +1,7 @@
{ {
"path": "C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\ExportTia", "path": "D:\\Trabajo\\VM\\22 - 93841 - Sidel - Tilting\\ExportTia",
"history": [ "history": [
"D:\\Trabajo\\VM\\22 - 93841 - Sidel - Tilting\\ExportTia",
"C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\ExportTia", "C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\ExportTia",
"D:\\Trabajo\\VM\\45 - HENKEL - VM Auto Changeover\\ExportTia", "D:\\Trabajo\\VM\\45 - HENKEL - VM Auto Changeover\\ExportTia",
"C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\Reporte\\TiaExport", "C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\Reporte\\TiaExport",
@ -9,7 +10,6 @@
"D:\\Trabajo\\VM\\44 - 98050 - Fiera\\Reporte\\ExportsTia", "D:\\Trabajo\\VM\\44 - 98050 - Fiera\\Reporte\\ExportsTia",
"C:\\Trabajo\\SIDEL\\13 - E5.007560 - Modifica O&U - SAE235\\Reporte\\ExportTia", "C:\\Trabajo\\SIDEL\\13 - E5.007560 - Modifica O&U - SAE235\\Reporte\\ExportTia",
"D:\\Trabajo\\VM\\22 - 93841 - Sidel - Tilting\\Reporte\\TiaExports", "D:\\Trabajo\\VM\\22 - 93841 - Sidel - Tilting\\Reporte\\TiaExports",
"C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giovanni in Bosco\\Reporte\\SourceDoc\\SourcdSD", "C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giovanni in Bosco\\Reporte\\SourceDoc\\SourcdSD"
"C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giovanni in Bosco\\Reporte\\SourceDoc\\SourceXML"
] ]
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
import json
json_file = r"C:\Trabajo\SIDEL\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\ExportTia\CPU_315F-2_PN_DP\ProgramBlocks_XML\parsing\System_Run_Out.json"
with open(json_file, "r", encoding="utf-8") as f:
data = json.load(f)
print("Network IDs y comentarios:")
for i, network in enumerate(data["networks"]):
print(
f'{i+1:2d}. ID: {network["id"]:>3s} - Title: "{network["title"]}" - Comment: "{network["comment"]}"'
)
print(f'\nTotal redes: {len(data["networks"])}')
# La red 13 seria la numero 13 en la lista (index 12)
if len(data["networks"]) >= 13:
network_13 = data["networks"][12] # index 12 = red numero 13
print(f"\n=== RED 13 (Index 12) ===")
print(f'ID: {network_13["id"]}')
print(f'Title: "{network_13["title"]}"')
print(f'Comment: "{network_13["comment"]}"')
print(f'Language: {network_13["language"]}')
print(f'Logic instructions: {len(network_13["logic"])}')
# Mostrar tipos de instrucciones
if network_13["logic"]:
print("Instruction types:")
for instr in network_13["logic"]:
print(f' - UID {instr["uid"]}: {instr["type"]}')
# Buscar Sr o Set/Reset
sr_instructions = [
instr
for instr in network_13["logic"]
if instr["type"] in ["Sr", "S", "R", "Set", "Reset"]
]
if sr_instructions:
print(f"\nSr/Set/Reset instructions found: {len(sr_instructions)}")
for instr in sr_instructions:
print(f" - {instr}")
else:
print("No logic instructions found!")

View File

@ -0,0 +1,56 @@
import json
json_file = r"C:\Trabajo\SIDEL\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\ExportTia\CPU_315F-2_PN_DP\ProgramBlocks_XML\parsing\System_Run_Out.json"
with open(json_file, "r", encoding="utf-8") as f:
data = json.load(f)
# Encontrar la red 13 (ID: D5)
network_13 = None
for i, network in enumerate(data["networks"]):
if network["id"] == "D5":
network_13 = network
print(f"RED 13 encontrada en position {i+1}")
break
if network_13:
print(f"\n=== ANÁLISIS DETALLADO RED 13 (ID: D5) ===")
print(f'Title: "{network_13["title"]}"')
print(f'Comment: "{network_13["comment"]}"')
print(f'Language: {network_13["language"]}')
print(f"\n=== TODAS LAS INSTRUCCIONES ===")
for instr in network_13["logic"]:
print(f'\nInstrucción UID {instr["uid"]} - Tipo: {instr["type"]}')
print(f' Inputs: {instr["inputs"]}')
print(f' Outputs: {instr["outputs"]}')
if instr["type"] == "Sr":
print(f" >>> ESTA ES LA INSTRUCCIÓN Sr PROBLEMÁTICA <<<")
print(f' Template values: {instr.get("template_values", {})}')
print(f' Negated pins: {instr.get("negated_pins", {})}')
# Buscar variables que mencionen gIN_SyrRoomLast400lRunno o M1507
print(f"\n=== BÚSQUEDA DE VARIABLES RELACIONADAS ===")
found_vars = []
for instr in network_13["logic"]:
for input_key, input_val in instr["inputs"].items():
if isinstance(input_val, dict) and "name" in input_val:
var_name = input_val["name"]
if "1507" in var_name or "SyrRoom" in var_name or "Last400" in var_name:
found_vars.append(var_name)
for output_key, output_val in instr["outputs"].items():
if isinstance(output_val, dict) and "name" in output_val:
var_name = output_val["name"]
if "1507" in var_name or "SyrRoom" in var_name or "Last400" in var_name:
found_vars.append(var_name)
if found_vars:
print("Variables relacionadas encontradas:")
for var in set(found_vars):
print(f" - {var}")
else:
print("No se encontraron variables relacionadas con 1507/SyrRoom/Last400")
else:
print("RED 13 (ID: D5) no encontrada!")

View File

@ -0,0 +1,37 @@
import json
# Cargar el JSON procesado
json_file = r"C:\Trabajo\SIDEL\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\ExportTia\CPU_315F-2_PN_DP\ProgramBlocks_XML\parsing\System_Run_Out_processed.json"
with open(json_file, "r", encoding="utf-8") as f:
data = json.load(f)
# Encontrar la red 13 (ID: D5) y la instrucción Sr
for network in data["networks"]:
if network["id"] == "D5":
print(f"=== RED 13 (ID: D5) PROCESADA ===")
print(f'Title: "{network["title"]}"')
print(f'Comment: "{network["comment"]}"')
for instr in network["logic"]:
if instr["type"] == "Sr" or "Sr" in instr["type"]:
print(f'\n=== INSTRUCCIÓN Sr (UID {instr["uid"]}) ===')
print(f'Type: {instr["type"]}')
print(f"SCL generado:")
print(f'{instr.get("scl", "NO SCL ENCONTRADO")}')
print(f'Inputs: {instr.get("inputs", {})}')
print(f'Outputs: {instr.get("outputs", {})}')
break
else:
print("No se encontró instrucción Sr en la red!")
# Mostrar todas las instrucciones para debugging
print(f"\n=== TODAS LAS INSTRUCCIONES EN LA RED 13 ===")
for instr in network["logic"]:
print(
f'UID {instr["uid"]} - Type: {instr["type"]} - SCL: {len(instr.get("scl", ""))} chars'
)
break
else:
print("RED 13 (ID: D5) no encontrada en el JSON procesado!")

View File

@ -0,0 +1,64 @@
import json
from lxml import etree
# Cargar el JSON para obtener el UID de la instrucción Sr
json_file = r"C:\Trabajo\SIDEL\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\ExportTia\CPU_315F-2_PN_DP\ProgramBlocks_XML\parsing\System_Run_Out.json"
xml_file = r"C:\Trabajo\SIDEL\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\ExportTia\CPU_315F-2_PN_DP\ProgramBlocks_XML\System_Run_Out.xml"
with open(json_file, "r", encoding="utf-8") as f:
data = json.load(f)
# Encontrar la red 13 (ID: D5) y la instrucción Sr
sr_uid = None
for network in data["networks"]:
if network["id"] == "D5":
for instr in network["logic"]:
if instr["type"] == "Sr":
sr_uid = instr["uid"]
print(f"Instrucción Sr encontrada con UID: {sr_uid}")
break
break
if sr_uid:
print(f"\n=== BÚSQUEDA EN XML ORIGINAL ===")
# Buscar en el XML original la instrucción Sr con ese UID
tree = etree.parse(xml_file)
root = tree.getroot()
# Buscar la parte Sr con ese UId
sr_elements = root.xpath(f"//Part[@Name='Sr' and @UId='{sr_uid}']")
if sr_elements:
sr_element = sr_elements[0]
print(f"Elemento Sr encontrado en XML:")
print(
f"XML: {etree.tostring(sr_element, encoding='unicode', pretty_print=True)}"
)
else:
print(f"No se encontró Part con Name='Sr' y UId='{sr_uid}' en el XML")
# Buscar cualquier elemento con ese UID
any_elements = root.xpath(f"//*[@UId='{sr_uid}']")
if any_elements:
print(f"Elementos encontrados con UId='{sr_uid}':")
for elem in any_elements:
print(f" - Tag: {elem.tag}, Attributes: {elem.attrib}")
print(
f" XML: {etree.tostring(elem, encoding='unicode', pretty_print=True)[:200]}..."
)
else:
print(f"No se encontró NINGÚN elemento con UId='{sr_uid}' en el XML")
# También buscar wires que conecten a este UID
print(f"\n=== WIRES CONECTADOS AL SR UID {sr_uid} ===")
wire_elements = root.xpath(f"//Wire[*/@UId='{sr_uid}']")
if wire_elements:
print(f"Encontrados {len(wire_elements)} wires conectados:")
for i, wire in enumerate(wire_elements):
print(f"Wire {i+1}:")
print(
f" XML: {etree.tostring(wire, encoding='unicode', pretty_print=True)}"
)
else:
print("No se encontraron wires conectados al Sr")
else:
print("No se encontró instrucción Sr en la red 13")

View File

@ -283,9 +283,13 @@ def parse_lad_fbd_network(network_element):
# Generar pines in1, in2, ..., inN # Generar pines in1, in2, ..., inN
for i in range(1, num_inputs + 1): for i in range(1, num_inputs + 1):
possible_input_pins.add(f"in{i}") possible_input_pins.add(f"in{i}")
print(f"INFO: Compuerta {original_type} UID {instruction_uid} con cardinalidad {num_inputs} - generando pines in1...in{num_inputs}") print(
f"INFO: Compuerta {original_type} UID {instruction_uid} con cardinalidad {num_inputs} - generando pines in1...in{num_inputs}"
)
except (ValueError, TypeError): except (ValueError, TypeError):
print(f"Advertencia: Cardinalidad inválida '{cardinality}' para {original_type} UID {instruction_uid}") print(
f"Advertencia: Cardinalidad inválida '{cardinality}' para {original_type} UID {instruction_uid}"
)
# Fallback a pines estándar # Fallback a pines estándar
possible_input_pins.update(["in1", "in2"]) possible_input_pins.update(["in1", "in2"])
else: else:
@ -325,6 +329,10 @@ def parse_lad_fbd_network(network_element):
possible_input_pins.add("in") possible_input_pins.add("in")
elif original_type == "Convert": elif original_type == "Convert":
possible_input_pins.add("in") possible_input_pins.add("in")
elif original_type == "Sr":
possible_input_pins.update(
["s", "r1", "operand"]
) # Set/Reset flip-flop pins
elif original_type == "Call": elif original_type == "Call":
# Para Calls, los nombres de los parámetros reales se definen en el XML # Para Calls, los nombres de los parámetros reales se definen en el XML
# El Xpath busca Parameter DENTRO de CallInfo, que está DENTRO de Call # El Xpath busca Parameter DENTRO de CallInfo, que está DENTRO de Call
@ -408,6 +416,8 @@ def parse_lad_fbd_network(network_element):
"ET", # Añadir pines de salida estándar SCL "ET", # Añadir pines de salida estándar SCL
] ]
) )
if original_type == "Sr":
possible_output_pins.add("Q") # Sr flip-flop output
if original_type == "BLKMOV": if original_type == "BLKMOV":
possible_output_pins.add("DSTBLK") possible_output_pins.add("DSTBLK")
if ( if (

View File

@ -16,7 +16,6 @@ SCL_SUFFIX = "_sympy_processed"
def process_sr(instruction, network_id, sympy_map, symbol_manager: SymbolManager, data): def process_sr(instruction, network_id, sympy_map, symbol_manager: SymbolManager, data):
""" """
Genera SCL para Set/Reset flip-flop (Sr). Genera SCL para Set/Reset flip-flop (Sr).
Por ahora, marca como procesado sin generar código específico.
""" """
instr_uid = instruction["instruction_uid"] instr_uid = instruction["instruction_uid"]
instr_type_original = instruction.get("type", "Sr") instr_type_original = instruction.get("type", "Sr")
@ -35,10 +34,68 @@ def process_sr(instruction, network_id, sympy_map, symbol_manager: SymbolManager
instruction["type"] = instr_type_original + SCL_SUFFIX instruction["type"] = instr_type_original + SCL_SUFFIX
return True return True
# TODO: Implementar lógica completa para Sr cuando se encuentren casos con conexiones # Extraer la variable de salida (operand)
# Por ahora, marcar como error para casos más complejos operand_info = inputs.get("operand")
instruction["scl"] = f"// ERROR: Sr {instr_uid} con conexiones no implementado aún." if not operand_info or operand_info.get("type") != "variable":
instruction["type"] = instr_type_original + "_error" instruction["scl"] = f"// ERROR: Sr {instr_uid} sin variable operand válida."
instruction["type"] = instr_type_original + "_error"
return True
output_var = operand_info.get("name", f"Unknown_Sr_{instr_uid}")
output_var_formatted = format_variable_name(output_var)
# Obtener condiciones Set y Reset
set_condition = inputs.get("s")
reset_condition = inputs.get("r1")
scl_lines = []
scl_lines.append(f"// Sr flip-flop for {output_var_formatted}")
# Generar código Set (prioridad alta)
if set_condition:
try:
set_key = (network_id, instr_uid, "s")
set_sympy_expr = get_sympy_representation(
set_condition, network_id, sympy_map, symbol_manager
)
if set_sympy_expr is not None:
sympy_map[set_key] = set_sympy_expr
set_scl = sympy_expr_to_scl(set_sympy_expr, symbol_manager)
scl_lines.append(f"IF {set_scl} THEN")
scl_lines.append(f" {output_var_formatted} := TRUE;")
scl_lines.append("END_IF;")
except Exception as e:
scl_lines.append(f"// ERROR procesando condición Set: {e}")
# Generar código Reset (prioridad baja)
if reset_condition:
try:
reset_key = (network_id, instr_uid, "r1")
reset_sympy_expr = get_sympy_representation(
reset_condition, network_id, sympy_map, symbol_manager
)
if reset_sympy_expr is not None:
sympy_map[reset_key] = reset_sympy_expr
reset_scl = sympy_expr_to_scl(reset_sympy_expr, symbol_manager)
scl_lines.append(f"IF {reset_scl} THEN")
scl_lines.append(f" {output_var_formatted} := FALSE;")
scl_lines.append("END_IF;")
except Exception as e:
scl_lines.append(f"// ERROR procesando condición Reset: {e}")
# Generar también la salida Q del Sr en sympy_map para que otros puedan usarla
try:
output_key = (network_id, instr_uid, "Q")
output_symbol = symbol_manager.get_symbol(output_var_formatted)
if output_symbol:
sympy_map[output_key] = output_symbol
except Exception as e:
print(
f"Warning: No se pudo crear símbolo sympy para Sr output {output_var_formatted}: {e}"
)
instruction["scl"] = "\n".join(scl_lines)
instruction["type"] = instr_type_original + SCL_SUFFIX
return True return True

View File

@ -1,219 +0,0 @@
// FB1809
// Block Type: FB
// Block Name (Original): SyrBrix Autocorrection
// Block Number: 1809
// Original Network Languages: LAD
// Block Comment:
// Syrup Autocorrection means that the measured syrup brix AND syrup density from
// meter, are used instead
// OF the one from the recipe, TO calculate the volumetric ratio.
// Activated only IF the beverage is sugar based.
FUNCTION_BLOCK "SyrBrix_Autocorrection"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
VAR_INPUT
i_Value : Real;
i_Num : Int;
i_Enable : Bool;
END_VAR
VAR_OUTPUT
FilterOut : Real;
END_VAR
VAR_STAT
mProdSyrFact : Real;
mSyrMFMFact : Real;
mAuxONS : Bool;
mAuxONS1 : Bool;
mAuxONS2 : Bool;
mSyrBrix_AutoCorrReqTPON : Bool;
Syrup_Fact_Fltd : "LowPassFilter";
SyrupMFM_Fact_Fltd : "LowPassFilter";
mSyrBrix_AutoCorrReqTP : "TP:v1.0";
END_VAR
VAR_TEMP
Latch_ONS : Bool;
sec2_ONS : Bool;
mProdSyrFactAcq : Bool;
mZeroTest : Bool;
mZeroTest1 : Bool;
SyrBrix : Real;
SyrBrixMaxCorr : Real;
SyrBrixMaxValveOp : Real;
END_VAR
BEGIN
// Network 1: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Qualifier" := "gBlenderProdMode" AND "Blender_Variables_Pers"."gSugarBeverage" AND "Procedure_Variables"."First_Production"."Done" AND "gBlenderSuppliesOk" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode";
// Network 2: SyrBrix_AutoCorrReq (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"SyrAutoCorrReq" := "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_SyrAutoReq" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch"; // P_TRIG("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_SyrAutoReq" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch") - Mem: "SyrAutoCorrReq"
"Procedure_Variables"."SyrAuto_Corr"."Request" := ("Procedure_Variables"."Syr_RunOut"."Latch" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Latch") OR ("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_SyrAutoReq" AND NOT "SyrAutoCorrReq" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch");
// Network 3: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Reset" := NOT "Procedure_Variables"."SyrAuto_Corr"."Qualifier";
// Network 4: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Wait" := NOT "gBlenderEnToRamp" OR ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_SyrBrixMeter" AND "mPDS_SYR_PA_Data"."Input_From_mPDS"."gPAmPDS_CommErr") OR ("gFTP302_Fault" AND NOT "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_SyrBrixMeter");
// Network 5: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Latch" := ("Procedure_Variables"."SyrAuto_Corr"."Request" AND NOT "AUX Start CPU" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Done" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Reset" AND NOT "Procedure_Variables"."Syr_RunOut"."Done") OR ("Procedure_Variables"."SyrAuto_Corr"."Latch" AND NOT "AUX Start CPU" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Done" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Reset" AND NOT "Procedure_Variables"."Syr_RunOut"."Done");
// Network 6: MIX - (Original Language: LAD)
// Edge Logic handled by Coil 28_dup4
"SyrAutoCorrLatch" := "Procedure_Variables"."SyrAuto_Corr"."Latch"; // P_TRIG("Procedure_Variables"."SyrAuto_Corr"."Latch") - Mem: "SyrAutoCorrLatch"
"Latch_ONS" := "Procedure_Variables"."SyrAuto_Corr"."Latch" AND NOT "SyrAutoCorrLatch";
"SyrAutoCorrLatch" := "Procedure_Variables"."SyrAuto_Corr"."Latch"; // P_TRIG("Procedure_Variables"."SyrAuto_Corr"."Latch") - Mem: "SyrAutoCorrLatch"
"Procedure_Variables"."SyrAuto_Corr"."Running" := "Procedure_Variables"."SyrAuto_Corr"."Latch" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Wait";
// Network 7: (Original Language: LAD)
SyrBrix_SyrupCorrPerc();
// Network 8: MIX - Blender Variables - Persistent (Original Language: LAD)
// Edge Logic handled by Coil 26_dup1
"SyrAutoCorrBlink2Sec" := "AUX Blink_2.0S"; // P_TRIG("AUX Blink_2.0S") - Mem: "SyrAutoCorrBlink2Sec"
"sec2_ONS" := "AUX Blink_2.0S" AND NOT "SyrAutoCorrBlink2Sec";
"SyrAutoCorrBlink2Sec" := "AUX Blink_2.0S"; // P_TRIG("AUX Blink_2.0S") - Mem: "SyrAutoCorrBlink2Sec"
// Network 9: (Original Language: LAD)
"mProdSyrFactAcq" := "gBlenderEnToRamp" AND "gPV_SyrBrixOk" AND "sec2_ONS" AND "Procedure_Variables"."First_Production"."Done" AND "Procedure_Variables"."SyrAuto_Corr"."Qualifier";
// Network 10: (Original Language: LAD)
"mZeroTest" := Eq("mProdSyrFact", 0) OR Eq("Blender_Variables"."gProdRunSyrFact", 0);
// Network 11: (Original Language: LAD)
"mZeroTest1" := Eq("mSyrMFMFact", 0) OR Eq("Blender_Variables"."gProdRunSyrMFMFact", 0);
// Network 12: (Original Language: LAD)
// This segment calculates the Syrup Factor during the production, so when the
// Surup Run Out starts OR the Autocorrection is activated, the actual syrup brix
// doesn't change, the actual ratio doesn't change too
SEL_R(G := Eq("Blender_Variables"."gMeterSyrBrix", 0.0), IN0 := "Blender_Variables"."gMeterSyrBrix", IN1 := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix");
"SyrBrix" := "SyrBrix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
"SyrBrix" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" / "SyrBrix";
IF "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_SyrBrixMeter" AND "mProdSyrFactAcq" AND NOT "mZeroTest" THEN
SEL_R(G := "Procedure_Variables"."Syr_RunOut"."Latch" OR "Procedure_Variables"."SyrAuto_Corr"."Latch", IN0 := "SyrBrix", IN1 := "mProdSyrFact");
END_IF;
// Network 13: (Original Language: LAD)
// This segment calculates the Syrup Factor during production, so when the Syrup
// Run Out starts OR the Autocorrection is activated, the actual syrup brix
// doesn't change, the actual ratio doesn't change too
SEL_R(G := Eq("Profibus_Variables"."gFTP302_Brix", 0.0), IN0 := "Profibus_Variables"."gFTP302_Brix", IN1 := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix");
"SyrBrix" := "SyrBrix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
"SyrBrix" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" / "SyrBrix";
IF "mProdSyrFactAcq" AND NOT "mZeroTest1" THEN
SEL_R(G := "Procedure_Variables"."Syr_RunOut"."Latch" OR "Procedure_Variables"."SyrAuto_Corr"."Latch", IN0 := "SyrBrix", IN1 := "mSyrMFMFact");
END_IF;
// Network 14: (Original Language: LAD)
IF "mZeroTest" OR "Procedure_Variables"."First_Production"."Latch" OR "gSyrBrixOutSpec_Fault" OR "gBlenderCIPMode" OR "gBlenderRinseMode" THEN
"mProdSyrFact" := 1.0;
"Blender_Variables"."gProdRunSyrFact" := 1.0;
END_IF;
// Network 15: (Original Language: LAD)
IF "mZeroTest1" OR "Procedure_Variables"."First_Production"."Latch" OR "gSyrBrixOutSpec_Fault" THEN
"mSyrMFMFact" := 1.0;
"Blender_Variables"."gProdRunSyrMFMFact" := 1.0;
END_IF;
// Network 16: (Original Language: LAD)
IF "mProdSyrFactAcq" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"Syrup_Fact_Fltd"(i_Enable := "AUX TRUE", i_Num := 12, i_Value := "mProdSyrFact");
END_IF;
// Network 17: (Original Language: LAD)
IF "mProdSyrFactAcq" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"SyrupMFM_Fact_Fltd"(i_Enable := "AUX TRUE", i_Num := 12, i_Value := "mSyrMFMFact");
END_IF;
// Network 18: (Original Language: LAD)
// ??
IF "Procedure_Variables"."SyrAuto_Corr"."Request" AND "AUX FALSE" THEN
"HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor" := "Blender_Variables"."gProdRunSyrFact" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
END_IF;
"HMI_Variables_Cmd"."Recipe_Updates"."SyrFactUpdate" := "Procedure_Variables"."SyrAuto_Corr"."Request" AND "AUX FALSE";
// Network 19: MIX - Maximum Syrup Brix Autocorr Acheaved - minimum ratio - (Original Language: LAD)
"gMinRatio" := "HMI_PID"."RMP302"."Out" > 80.0;
// Network 20: MIX - Maximum Syrup Brix Autocorr Acheaved maximum autocorr per (Original Language: LAD)
// Creato due parametri per la Massima Correzzione.
// per la Produzione con Brix Sciroppo inferiori a 15 la massima correzzione
// passada 40 a 10. W.O.28/01/2025
"M1743.5" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" <= 15.0;
IF "AUX TRUE" AND NOT "M_validat_27_01_25" AND NOT "M1743.5" THEN
"SyrBrixMaxCorr" := 40.0;
END_IF;
IF "AUX TRUE" AND "M1743.5" AND NOT "M_validat_27_01_25" THEN
"SyrBrixMaxCorr" := 10.0;
END_IF;
"gMaxSyrAutoCorrDone" := "HMI_Variables_Status"."Analog_Values"."SyrupBrixCorrection" > "SyrBrixMaxCorr";
_HMI_Alarms___gH_Status__8_ := "HMI_Variables_Status"."Analog_Values"."SyrupBrixCorrection" > "SyrBrixMaxCorr";
// Network 21: MIX - Maximum Syrup Brix Autocorr Acheaved - minimum ratio - (Original Language: LAD)
IF NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"gMinRatio" := FALSE;
END_IF;
IF NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"gMaxSyrAutoCorrDone" := FALSE;
END_IF;
// Network 22: (Original Language: LAD)
"HMI_Variables_Status"."Procedures"."SyrBrixAutoRun" := "Procedure_Variables"."SyrAuto_Corr"."Latch";
// Network 23: Syrup Autocorrection Running (Original Language: LAD)
// Message Syrup Autocorrection Running TO HMI
_HMI_Alarms___gH_Status__4_ := "Procedure_Variables"."SyrAuto_Corr"."Running";
// Network 24: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Done" := ("Procedure_Variables"."SyrAuto_Corr"."Running" AND "gMinRatio" AND "Procedure_Variables"."Syr_RunOut"."Latch") OR ("Procedure_Variables"."SyrAuto_Corr"."Running" AND "gMaxSyrAutoCorrDone" AND "Procedure_Variables"."Syr_RunOut"."Latch") OR ("Procedure_Variables"."SyrAuto_Corr"."Request" AND NOT "Latch_ONS" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch");
END_FUNCTION_BLOCK

View File

@ -1,219 +0,0 @@
// FB1809
// Block Type: FB
// Block Name (Original): SyrBrix Autocorrection
// Block Number: 1809
// Original Network Languages: LAD
// Block Comment:
// Syrup Autocorrection means that the measured syrup brix AND syrup density from
// meter, are used instead
// OF the one from the recipe, TO calculate the volumetric ratio.
// Activated only IF the beverage is sugar based.
FUNCTION_BLOCK "SyrBrix_Autocorrection"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
VAR_INPUT
i_Value : Real;
i_Num : Int;
i_Enable : Bool;
END_VAR
VAR_OUTPUT
FilterOut : Real;
END_VAR
VAR_STAT
mProdSyrFact : Real;
mSyrMFMFact : Real;
mAuxONS : Bool;
mAuxONS1 : Bool;
mAuxONS2 : Bool;
mSyrBrix_AutoCorrReqTPON : Bool;
Syrup_Fact_Fltd : "LowPassFilter";
SyrupMFM_Fact_Fltd : "LowPassFilter";
mSyrBrix_AutoCorrReqTP : "TP:v1.0";
END_VAR
VAR_TEMP
Latch_ONS : Bool;
sec2_ONS : Bool;
mProdSyrFactAcq : Bool;
mZeroTest : Bool;
mZeroTest1 : Bool;
SyrBrix : Real;
SyrBrixMaxCorr : Real;
SyrBrixMaxValveOp : Real;
END_VAR
BEGIN
// Network 1: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Qualifier" := "gBlenderProdMode" AND "Blender_Variables_Pers"."gSugarBeverage" AND "Procedure_Variables"."First_Production"."Done" AND "gBlenderSuppliesOk" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode";
// Network 2: SyrBrix_AutoCorrReq (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"SyrAutoCorrReq" := "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_SyrAutoReq" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch"; // P_TRIG("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_SyrAutoReq" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch") - Mem: "SyrAutoCorrReq"
"Procedure_Variables"."SyrAuto_Corr"."Request" := ("Procedure_Variables"."Syr_RunOut"."Latch" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Latch") OR ("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_SyrAutoReq" AND NOT "SyrAutoCorrReq" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch");
// Network 3: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Reset" := NOT "Procedure_Variables"."SyrAuto_Corr"."Qualifier";
// Network 4: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Wait" := NOT "gBlenderEnToRamp" OR ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_SyrBrixMeter" AND "mPDS_SYR_PA_Data"."Input_From_mPDS"."gPAmPDS_CommErr") OR ("gFTP302_Fault" AND NOT "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_SyrBrixMeter");
// Network 5: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Latch" := ("Procedure_Variables"."SyrAuto_Corr"."Request" AND NOT "AUX Start CPU" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Done" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Reset" AND NOT "Procedure_Variables"."Syr_RunOut"."Done") OR ("Procedure_Variables"."SyrAuto_Corr"."Latch" AND NOT "AUX Start CPU" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Done" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Reset" AND NOT "Procedure_Variables"."Syr_RunOut"."Done");
// Network 6: MIX - (Original Language: LAD)
// Edge Logic handled by Coil 28_dup4
"SyrAutoCorrLatch" := "Procedure_Variables"."SyrAuto_Corr"."Latch"; // P_TRIG("Procedure_Variables"."SyrAuto_Corr"."Latch") - Mem: "SyrAutoCorrLatch"
"SyrAutoCorrLatch" := "Procedure_Variables"."SyrAuto_Corr"."Latch";; // P_TRIG("Procedure_Variables"."SyrAuto_Corr"."Latch") - Mem: "SyrAutoCorrLatch"
"Latch_ONS" := "Procedure_Variables"."SyrAuto_Corr"."Latch" AND NOT "SyrAutoCorrLatch";
"Procedure_Variables"."SyrAuto_Corr"."Running" := "Procedure_Variables"."SyrAuto_Corr"."Latch" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Wait";
// Network 7: (Original Language: LAD)
SyrBrix_SyrupCorrPerc();
// Network 8: MIX - Blender Variables - Persistent (Original Language: LAD)
// Edge Logic handled by Coil 26_dup1
"SyrAutoCorrBlink2Sec" := "AUX Blink_2.0S"; // P_TRIG("AUX Blink_2.0S") - Mem: "SyrAutoCorrBlink2Sec"
"SyrAutoCorrBlink2Sec" := "AUX Blink_2.0S";; // P_TRIG("AUX Blink_2.0S") - Mem: "SyrAutoCorrBlink2Sec"
"sec2_ONS" := "AUX Blink_2.0S" AND NOT "SyrAutoCorrBlink2Sec";
// Network 9: (Original Language: LAD)
"mProdSyrFactAcq" := "gBlenderEnToRamp" AND "gPV_SyrBrixOk" AND "sec2_ONS" AND "Procedure_Variables"."First_Production"."Done" AND "Procedure_Variables"."SyrAuto_Corr"."Qualifier";
// Network 10: (Original Language: LAD)
"mZeroTest" := Eq("mProdSyrFact", 0) OR Eq("Blender_Variables"."gProdRunSyrFact", 0);
// Network 11: (Original Language: LAD)
"mZeroTest1" := Eq("mSyrMFMFact", 0) OR Eq("Blender_Variables"."gProdRunSyrMFMFact", 0);
// Network 12: (Original Language: LAD)
// This segment calculates the Syrup Factor during the production, so when the
// Surup Run Out starts OR the Autocorrection is activated, the actual syrup brix
// doesn't change, the actual ratio doesn't change too
SEL_R(G := Eq("Blender_Variables"."gMeterSyrBrix", 0.0), IN0 := "Blender_Variables"."gMeterSyrBrix", IN1 := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix");
"SyrBrix" := "SyrBrix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
"SyrBrix" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" / "SyrBrix";
IF "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_SyrBrixMeter" AND "mProdSyrFactAcq" AND NOT "mZeroTest" THEN
SEL_R(G := "Procedure_Variables"."Syr_RunOut"."Latch" OR "Procedure_Variables"."SyrAuto_Corr"."Latch", IN0 := "SyrBrix", IN1 := "mProdSyrFact");
END_IF;
// Network 13: (Original Language: LAD)
// This segment calculates the Syrup Factor during production, so when the Syrup
// Run Out starts OR the Autocorrection is activated, the actual syrup brix
// doesn't change, the actual ratio doesn't change too
SEL_R(G := Eq("Profibus_Variables"."gFTP302_Brix", 0.0), IN0 := "Profibus_Variables"."gFTP302_Brix", IN1 := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix");
"SyrBrix" := "SyrBrix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
"SyrBrix" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" / "SyrBrix";
IF "mProdSyrFactAcq" AND NOT "mZeroTest1" THEN
SEL_R(G := "Procedure_Variables"."Syr_RunOut"."Latch" OR "Procedure_Variables"."SyrAuto_Corr"."Latch", IN0 := "SyrBrix", IN1 := "mSyrMFMFact");
END_IF;
// Network 14: (Original Language: LAD)
IF "mZeroTest" OR "Procedure_Variables"."First_Production"."Latch" OR "gSyrBrixOutSpec_Fault" OR "gBlenderCIPMode" OR "gBlenderRinseMode" THEN
"mProdSyrFact" := 1.0;
"Blender_Variables"."gProdRunSyrFact" := 1.0;
END_IF;
// Network 15: (Original Language: LAD)
IF "mZeroTest1" OR "Procedure_Variables"."First_Production"."Latch" OR "gSyrBrixOutSpec_Fault" THEN
"mSyrMFMFact" := 1.0;
"Blender_Variables"."gProdRunSyrMFMFact" := 1.0;
END_IF;
// Network 16: (Original Language: LAD)
IF "mProdSyrFactAcq" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"Syrup_Fact_Fltd"(i_Enable := "AUX TRUE", i_Num := 12, i_Value := "mProdSyrFact");
END_IF;
// Network 17: (Original Language: LAD)
IF "mProdSyrFactAcq" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"SyrupMFM_Fact_Fltd"(i_Enable := "AUX TRUE", i_Num := 12, i_Value := "mSyrMFMFact");
END_IF;
// Network 18: (Original Language: LAD)
// ??
IF "Procedure_Variables"."SyrAuto_Corr"."Request" AND "AUX FALSE" THEN
"HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor" := "Blender_Variables"."gProdRunSyrFact" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
END_IF;
"HMI_Variables_Cmd"."Recipe_Updates"."SyrFactUpdate" := "Procedure_Variables"."SyrAuto_Corr"."Request" AND "AUX FALSE";
// Network 19: MIX - Maximum Syrup Brix Autocorr Acheaved - minimum ratio - (Original Language: LAD)
"gMinRatio" := "HMI_PID"."RMP302"."Out" > 80.0;
// Network 20: MIX - Maximum Syrup Brix Autocorr Acheaved maximum autocorr per (Original Language: LAD)
// Creato due parametri per la Massima Correzzione.
// per la Produzione con Brix Sciroppo inferiori a 15 la massima correzzione
// passada 40 a 10. W.O.28/01/2025
"M1743.5" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" <= 15.0;
IF "AUX TRUE" AND NOT "M_validat_27_01_25" AND NOT "M1743.5" THEN
"SyrBrixMaxCorr" := 40.0;
END_IF;
IF "AUX TRUE" AND "M1743.5" AND NOT "M_validat_27_01_25" THEN
"SyrBrixMaxCorr" := 10.0;
END_IF;
"gMaxSyrAutoCorrDone" := "HMI_Variables_Status"."Analog_Values"."SyrupBrixCorrection" > "SyrBrixMaxCorr";
_HMI_Alarms___gH_Status__8_ := "HMI_Variables_Status"."Analog_Values"."SyrupBrixCorrection" > "SyrBrixMaxCorr";
// Network 21: MIX - Maximum Syrup Brix Autocorr Acheaved - minimum ratio - (Original Language: LAD)
IF NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"gMinRatio" := FALSE;
END_IF;
IF NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"gMaxSyrAutoCorrDone" := FALSE;
END_IF;
// Network 22: (Original Language: LAD)
"HMI_Variables_Status"."Procedures"."SyrBrixAutoRun" := "Procedure_Variables"."SyrAuto_Corr"."Latch";
// Network 23: Syrup Autocorrection Running (Original Language: LAD)
// Message Syrup Autocorrection Running TO HMI
_HMI_Alarms___gH_Status__4_ := "Procedure_Variables"."SyrAuto_Corr"."Running";
// Network 24: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Done" := ("Procedure_Variables"."SyrAuto_Corr"."Running" AND "gMinRatio" AND "Procedure_Variables"."Syr_RunOut"."Latch") OR ("Procedure_Variables"."SyrAuto_Corr"."Running" AND "gMaxSyrAutoCorrDone" AND "Procedure_Variables"."Syr_RunOut"."Latch") OR ("Procedure_Variables"."SyrAuto_Corr"."Request" AND NOT "Latch_ONS" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch");
END_FUNCTION_BLOCK

View File

@ -1,219 +0,0 @@
// FB1809
// Block Type: FB
// Block Name (Original): SyrBrix Autocorrection
// Block Number: 1809
// Original Network Languages: LAD
// Block Comment:
// Syrup Autocorrection means that the measured syrup brix AND syrup density from
// meter, are used instead
// OF the one from the recipe, TO calculate the volumetric ratio.
// Activated only IF the beverage is sugar based.
FUNCTION_BLOCK "SyrBrix_Autocorrection"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
VAR_INPUT
i_Value : Real;
i_Num : Int;
i_Enable : Bool;
END_VAR
VAR_OUTPUT
FilterOut : Real;
END_VAR
VAR_STAT
mProdSyrFact : Real;
mSyrMFMFact : Real;
mAuxONS : Bool;
mAuxONS1 : Bool;
mAuxONS2 : Bool;
mSyrBrix_AutoCorrReqTPON : Bool;
Syrup_Fact_Fltd : "LowPassFilter";
SyrupMFM_Fact_Fltd : "LowPassFilter";
mSyrBrix_AutoCorrReqTP : "TP:v1.0";
END_VAR
VAR_TEMP
Latch_ONS : Bool;
sec2_ONS : Bool;
mProdSyrFactAcq : Bool;
mZeroTest : Bool;
mZeroTest1 : Bool;
SyrBrix : Real;
SyrBrixMaxCorr : Real;
SyrBrixMaxValveOp : Real;
END_VAR
BEGIN
// Network 1: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Qualifier" := "gBlenderProdMode" AND "Blender_Variables_Pers"."gSugarBeverage" AND "Procedure_Variables"."First_Production"."Done" AND "gBlenderSuppliesOk" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode";
// Network 2: SyrBrix_AutoCorrReq (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"SyrAutoCorrReq" := "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_SyrAutoReq" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch"; // P_TRIG("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_SyrAutoReq" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch") - Mem: "SyrAutoCorrReq"
"Procedure_Variables"."SyrAuto_Corr"."Request" := ("Procedure_Variables"."Syr_RunOut"."Latch" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Latch") OR ("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_SyrAutoReq" AND NOT "SyrAutoCorrReq" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch");
// Network 3: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Reset" := NOT "Procedure_Variables"."SyrAuto_Corr"."Qualifier";
// Network 4: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Wait" := NOT "gBlenderEnToRamp" OR ("HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_SyrBrixMeter" AND "mPDS_SYR_PA_Data"."Input_From_mPDS"."gPAmPDS_CommErr") OR ("gFTP302_Fault" AND NOT "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_SyrBrixMeter");
// Network 5: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Latch" := ("Procedure_Variables"."SyrAuto_Corr"."Request" AND NOT "AUX Start CPU" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Done" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Reset" AND NOT "Procedure_Variables"."Syr_RunOut"."Done") OR ("Procedure_Variables"."SyrAuto_Corr"."Latch" AND NOT "AUX Start CPU" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Done" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Reset" AND NOT "Procedure_Variables"."Syr_RunOut"."Done");
// Network 6: MIX - (Original Language: LAD)
// Edge Logic handled by Coil 28_dup4
"SyrAutoCorrLatch" := "Procedure_Variables"."SyrAuto_Corr"."Latch"; // P_TRIG("Procedure_Variables"."SyrAuto_Corr"."Latch") - Mem: "SyrAutoCorrLatch"
"SyrAutoCorrLatch" := "Procedure_Variables"."SyrAuto_Corr"."Latch"; // P_TRIG("Procedure_Variables"."SyrAuto_Corr"."Latch") - Mem: "SyrAutoCorrLatch"
"Latch_ONS" := "Procedure_Variables"."SyrAuto_Corr"."Latch" AND NOT "SyrAutoCorrLatch";
"Procedure_Variables"."SyrAuto_Corr"."Running" := "Procedure_Variables"."SyrAuto_Corr"."Latch" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Wait";
// Network 7: (Original Language: LAD)
SyrBrix_SyrupCorrPerc();
// Network 8: MIX - Blender Variables - Persistent (Original Language: LAD)
// Edge Logic handled by Coil 26_dup1
"SyrAutoCorrBlink2Sec" := "AUX Blink_2.0S"; // P_TRIG("AUX Blink_2.0S") - Mem: "SyrAutoCorrBlink2Sec"
"SyrAutoCorrBlink2Sec" := "AUX Blink_2.0S"; // P_TRIG("AUX Blink_2.0S") - Mem: "SyrAutoCorrBlink2Sec"
"sec2_ONS" := "AUX Blink_2.0S" AND NOT "SyrAutoCorrBlink2Sec";
// Network 9: (Original Language: LAD)
"mProdSyrFactAcq" := "gBlenderEnToRamp" AND "gPV_SyrBrixOk" AND "sec2_ONS" AND "Procedure_Variables"."First_Production"."Done" AND "Procedure_Variables"."SyrAuto_Corr"."Qualifier";
// Network 10: (Original Language: LAD)
"mZeroTest" := Eq("mProdSyrFact", 0) OR Eq("Blender_Variables"."gProdRunSyrFact", 0);
// Network 11: (Original Language: LAD)
"mZeroTest1" := Eq("mSyrMFMFact", 0) OR Eq("Blender_Variables"."gProdRunSyrMFMFact", 0);
// Network 12: (Original Language: LAD)
// This segment calculates the Syrup Factor during the production, so when the
// Surup Run Out starts OR the Autocorrection is activated, the actual syrup brix
// doesn't change, the actual ratio doesn't change too
SEL_R(G := Eq("Blender_Variables"."gMeterSyrBrix", 0.0), IN0 := "Blender_Variables"."gMeterSyrBrix", IN1 := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix");
"SyrBrix" := "SyrBrix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
"SyrBrix" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" / "SyrBrix";
IF "HMI_Blender_Parameters"."Processor_Options"."Blender_OPT"."_SyrBrixMeter" AND "mProdSyrFactAcq" AND NOT "mZeroTest" THEN
SEL_R(G := "Procedure_Variables"."Syr_RunOut"."Latch" OR "Procedure_Variables"."SyrAuto_Corr"."Latch", IN0 := "SyrBrix", IN1 := "mProdSyrFact");
END_IF;
// Network 13: (Original Language: LAD)
// This segment calculates the Syrup Factor during production, so when the Syrup
// Run Out starts OR the Autocorrection is activated, the actual syrup brix
// doesn't change, the actual ratio doesn't change too
SEL_R(G := Eq("Profibus_Variables"."gFTP302_Brix", 0.0), IN0 := "Profibus_Variables"."gFTP302_Brix", IN1 := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix");
"SyrBrix" := "SyrBrix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
"SyrBrix" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" / "SyrBrix";
IF "mProdSyrFactAcq" AND NOT "mZeroTest1" THEN
SEL_R(G := "Procedure_Variables"."Syr_RunOut"."Latch" OR "Procedure_Variables"."SyrAuto_Corr"."Latch", IN0 := "SyrBrix", IN1 := "mSyrMFMFact");
END_IF;
// Network 14: (Original Language: LAD)
IF "mZeroTest" OR "Procedure_Variables"."First_Production"."Latch" OR "gSyrBrixOutSpec_Fault" OR "gBlenderCIPMode" OR "gBlenderRinseMode" THEN
"mProdSyrFact" := 1.0;
"Blender_Variables"."gProdRunSyrFact" := 1.0;
END_IF;
// Network 15: (Original Language: LAD)
IF "mZeroTest1" OR "Procedure_Variables"."First_Production"."Latch" OR "gSyrBrixOutSpec_Fault" THEN
"mSyrMFMFact" := 1.0;
"Blender_Variables"."gProdRunSyrMFMFact" := 1.0;
END_IF;
// Network 16: (Original Language: LAD)
IF "mProdSyrFactAcq" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"Syrup_Fact_Fltd"(i_Enable := "AUX TRUE", i_Num := 12, i_Value := "mProdSyrFact");
END_IF;
// Network 17: (Original Language: LAD)
IF "mProdSyrFactAcq" AND NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"SyrupMFM_Fact_Fltd"(i_Enable := "AUX TRUE", i_Num := 12, i_Value := "mSyrMFMFact");
END_IF;
// Network 18: (Original Language: LAD)
// ??
IF "Procedure_Variables"."SyrAuto_Corr"."Request" AND "AUX FALSE" THEN
"HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor" := "Blender_Variables"."gProdRunSyrFact" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
END_IF;
"HMI_Variables_Cmd"."Recipe_Updates"."SyrFactUpdate" := "Procedure_Variables"."SyrAuto_Corr"."Request" AND "AUX FALSE";
// Network 19: MIX - Maximum Syrup Brix Autocorr Acheaved - minimum ratio - (Original Language: LAD)
"gMinRatio" := "HMI_PID"."RMP302"."Out" > 80.0;
// Network 20: MIX - Maximum Syrup Brix Autocorr Acheaved maximum autocorr per (Original Language: LAD)
// Creato due parametri per la Massima Correzzione.
// per la Produzione con Brix Sciroppo inferiori a 15 la massima correzzione
// passada 40 a 10. W.O.28/01/2025
"M1743.5" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" <= 15.0;
IF "AUX TRUE" AND NOT "M_validat_27_01_25" AND NOT "M1743.5" THEN
"SyrBrixMaxCorr" := 40.0;
END_IF;
IF "AUX TRUE" AND "M1743.5" AND NOT "M_validat_27_01_25" THEN
"SyrBrixMaxCorr" := 10.0;
END_IF;
"gMaxSyrAutoCorrDone" := "HMI_Variables_Status"."Analog_Values"."SyrupBrixCorrection" > "SyrBrixMaxCorr";
_HMI_Alarms___gH_Status__8_ := "HMI_Variables_Status"."Analog_Values"."SyrupBrixCorrection" > "SyrBrixMaxCorr";
// Network 21: MIX - Maximum Syrup Brix Autocorr Acheaved - minimum ratio - (Original Language: LAD)
IF NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"gMinRatio" := FALSE;
END_IF;
IF NOT "Procedure_Variables"."SyrAuto_Corr"."Latch" THEN
"gMaxSyrAutoCorrDone" := FALSE;
END_IF;
// Network 22: (Original Language: LAD)
"HMI_Variables_Status"."Procedures"."SyrBrixAutoRun" := "Procedure_Variables"."SyrAuto_Corr"."Latch";
// Network 23: Syrup Autocorrection Running (Original Language: LAD)
// Message Syrup Autocorrection Running TO HMI
_HMI_Alarms___gH_Status__4_ := "Procedure_Variables"."SyrAuto_Corr"."Running";
// Network 24: (Original Language: LAD)
"Procedure_Variables"."SyrAuto_Corr"."Done" := ("Procedure_Variables"."SyrAuto_Corr"."Running" AND "gMinRatio" AND "Procedure_Variables"."Syr_RunOut"."Latch") OR ("Procedure_Variables"."SyrAuto_Corr"."Running" AND "gMaxSyrAutoCorrDone" AND "Procedure_Variables"."Syr_RunOut"."Latch") OR ("Procedure_Variables"."SyrAuto_Corr"."Request" AND NOT "Latch_ONS" AND NOT "Procedure_Variables"."Syr_RunOut"."Latch");
END_FUNCTION_BLOCK

View File

@ -1,269 +0,0 @@
// FB1813
// Block Type: FB
// Block Name (Original): Syrup Line MFM Prep DAR
// Block Number: 1813
// Original Network Languages: LAD, STL
FUNCTION_BLOCK "Syrup_Line_MFM_Prep_DAR"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
VAR_INPUT
IN : Bool;
PT : Time;
END_VAR
VAR_OUTPUT
Q : Bool;
ET : Time;
END_VAR
VAR_STAT
mStepNum : Int;
mTimeStep : Int;
Real_Time : Time;
mTransition : Bool;
mSyrLineMFMPrepONS : Bool;
mSyrupLineManualDrainSR : Bool;
mQTM306_PrepReqTPON : Bool;
mQTM306_PrepReqTP1ON : Bool;
mDelayON_StopPumpON : Bool;
mDelayON_SyrupMinON : Bool;
mDelayON_PumpStatusON : Bool;
mHVP302_TONON : Bool;
mQTM306_Prep_TimeOutON : Bool;
mQTM306_PrepReqTP : "TP:v1.0";
mQTM306_PrepReqTP1 : "TP:v1.0";
mDelayON_StopPump : "TON:v1.0";
mDelayON_SyrupMin : "TON:v1.0";
mDelayON_PumpStatus : "TON:v1.0";
mHVP302_TON : "TON:v1.0";
mQTM306_Prep_TimeOut : "TON:v1.0";
END_VAR
VAR_TEMP
mDummy : Bool;
mAux1 : Real;
mAux2 : Real;
mTimeOutElapsed : Bool;
mStopPumpP2 : Bool;
mSyrMinLevel : Bool;
mPumpP2Running : Bool;
mWaterCountAcheaved : Bool;
mSyrupLineManualDrained : Bool;
mFuzzyNetOut : Bool;
Out_Time_DI : DInt;
Real_Time_S5 : S5Time;
mProcSlctd : Bool;
mFuzzyNetAdd1 : Real;
mFuzzyNetAdd2 : Real;
mFuzzyNetAdd3 : Real;
mSyrBrixAux : Real;
mSyrBrixAux_1 : Real;
Aux_Somma_Lt : Real;
END_VAR
#_1S : Bool; // Auto-generated temporary
#_4S : Bool; // Auto-generated temporary
#_4S_600MS : Bool; // Auto-generated temporary
#_5S : Bool; // Auto-generated temporary
#TON_INSTANCE_26_dup3 : TON; // Auto-generated temporary
#TON_INSTANCE_26_dup5 : TON; // Auto-generated temporary
#TON_INSTANCE_27_dup4 : TON; // Auto-generated temporary
#TON_INSTANCE_30_dup5 : TON; // Auto-generated temporary
#TP_INSTANCE_44 : TP; // Auto-generated temporary
BEGIN
// Network 1: (Original Language: LAD)
%DB960.DBX56.0 := ("gBlenderProdMode" AND "gBlenderSuppliesOk" AND "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Blender_Variables_Pers"."gWaterRecipe") OR ("gBlenderProdMode" AND "gBlenderSuppliesOk" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode");
// Network 2: SyrLineMFMPrepReq (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"Tag_69" := "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone"; // P_TRIG("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone") - Mem: "Tag_69"
#TP_INSTANCE_44(IN := "System_RunOut_Variables"."FastChangeOverActivated" AND "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone" AND "HMI_Variables_Cmd"."GLOBAL_CMD"."_EnableNextRecipe" AND "System_RunOut_Variables"."NextRecipeOk" AND NOT %DB960.DBX56.6, PT := T#1S);
%DB960.DBX56.1 := ("mQTM306_PrepReqTP1ON" AND %DB960.DBX56.0) OR (%DB960.DBX56.0 AND "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Tag_69" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone");
// Network 3: (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"mSyrLineMFMPrepONS" := %DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated"; // P_TRIG(%DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated") - Mem: "mSyrLineMFMPrepONS"
%DB960.DBX56.2 := "gBlenderCIPMode" OR "Blender_Variables_Pers"."gWaterRecipe" OR ("gEmergencyPressed" AND %DB960.DBX56.3) OR ("Procedure_Variables"."SyrupLineRinse"."Latch" AND "System_RunOut_Variables"."FastChangeOverActivated") OR ("gBlenderRinseMode" AND NOT "System_RunOut_Variables"."FastChangeOverActivated") OR (%DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "mSyrLineMFMPrepONS");
// Network 4: (Original Language: LAD)
IF ("Procedure_Variables"."Blender_Rinse"."Latch" AND NOT "AUX MASTER VALIDATION") OR ("Procedure_Variables"."Syr_RunOut"."Latch" AND NOT "AUX MASTER VALIDATION") OR ("CIP_Program_Variables"."Status"."Started" AND NOT "AUX MASTER VALIDATION") THEN
%DB960.DBX57.0 := FALSE;
END_IF;
// Network 5: (Original Language: LAD)
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"mStepNum" := 0;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
%DB960.DBX56.6 := FALSE;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"Procedure_Variables"."FTP302Line_Preparation"."LinePrepared" := FALSE;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"mWaterCountAcheaved" := FALSE;
END_IF;
// Network 6: (Original Language: LAD)
%DB960.DBX56.5 := "HMI_Device"."PPP302"."Alarm" OR "HMI_Device"."SyrupRoom_SyrupPump"."Alarm" OR NOT "HMI_Digital"."PSM311"."Filtered";
// Network 7: (Original Language: LAD)
%DB960.DBX56.3 := (%DB960.DBX56.1 AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) OR ("Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6);
IF (%DB960.DBX56.1 AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) OR ("Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) THEN
"HMI_Variables_Status"."Procedures"."BlenderStateNum" := 3;
END_IF;
// Network 8: (Original Language: LAD)
%DB960.DBX56.4 := %DB960.DBX56.3 AND NOT %DB960.DBX56.5;
// Network 9: MIX - (Original Language: LAD)
"mAux1" := "Blender_Variables"."gMinProduction" / 6.0;
SEL_R(G := Ne("mAux1", 0.0), IN0 := 1.0, IN1 := "mAux1");
"mAux2" := "HMI_Blender_Parameters"."ProcessSetup"."_SyrupRunOutLiters" * 1.5;
"mAux1" := "mAux2" / "mAux1";
"Out_Time_DI" := CEIL("mAux1");
"mDummy" := TRUE;
// Network 10: (Original Language: STL)
// #Out_Time_DI (DINT) converted in #Real_Time_S5 (S5Time)
// Use L#1000 IF #Out_Time_DI is in ms
// --- BEGIN STL Network 10 ---
```stl
L "Out_Time_DI"
L 1000
MUL_D
T "Real_Time"
```
// --- END STL Network 10 ---
// Network 11: SyrLineMFMPrep_TimeOut (Original Language: LAD)
#TON_INSTANCE_26_dup3(IN := %DBX56.3, PT := "Real_Time");
"mTimeOutElapsed" := "mQTM306_Prep_TimeOutON";
// Network 12: DelayON_StopPump (Original Language: LAD)
#TON_INSTANCE_27_dup4(IN := NOT "gIN_SyrTank_MinLvl", PT := T#4S_600MS);
"mStopPumpP2" := "mDelayON_StopPumpON";
// Network 13: DelayON_SyrupMin (Original Language: LAD)
"mSyrMinLevel" := "gIN_SyrTank_MinLvl";
// Network 14: DelayON_PumpStatus (Original Language: LAD)
#TON_INSTANCE_26_dup5(IN := "HMI_Device"."PPP302"."Out", PT := T#4S);
"mPumpP2Running" := "mDelayON_PumpStatusON";
// Network 15: SYRUP LINE MANUAL DRAIN (Original Language: LAD)
// THIS PROCEDURE HAS TO BE DONE BEFORE TO SELECT THE SYRUP LINE STARTUP.
#TON_INSTANCE_30_dup5(IN := "gIN_HVP301_Aux", PT := T#5S);
// Network 16: MIX - HMI Variables Cmd (Original Language: LAD)
"mSyrupLineManualDrained" := %DB960.DBX56.3 AND "mSyrupLineManualDrainSR" AND NOT "gIN_HVP301_Aux";
// Network 17: (Original Language: LAD)
IF NOT "Procedure_Variables"."FTP302Line_Preparation"."Latch" THEN
"Blender_Variables_Pers"."gSyrLinePrepCountInit" := "Profibus_Variables"."gFTP302_Tot";
END_IF;
// Network 18: BRIX PRODUCT STARTUP THRESHOLD (Original Language: LAD)
"mSyrBrixAux" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" * "HMI_Blender_Parameters"."ProcessSetup"."_PercSyrupBrixSyrStarUp";
"mSyrBrixAux_1" := "mSyrBrixAux" / 100.0;
"Blender_Constants"."gSugaredSyrupBrixThrsd" := "mSyrBrixAux_1";
// Network 19: Fuzzy Net (Original Language: LAD)
SEL_R(G := "M_validat_27_01_25" AND "gPV_SyrDensOk" AND "HMI_Device"."PPP302"."Out" AND NOT "Blender_Variables_Pers"."gSugarBeverage", IN0 := 0.0, IN1 := 101.0);
IF "Blender_Variables_Pers"."gSugarBeverage" THEN
"mAux1" := "Profibus_Variables"."gFTP302_Brix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
END_IF;
SEL_R(G := "gIN_SyrTank_MinLvl" AND ("mAux1" > "Blender_Constants"."gSugaredSyrupBrixThrsd"), IN0 := 0.0, IN1 := 101.0);
IF NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" THEN
"Aux_Somma_Lt" := "HMI_Blender_Parameters"."ProcessSetup"."_SyrupRunOutLiters" + %DBD784;
END_IF;
IF NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" THEN
"HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" := "Profibus_Variables"."gFTP302_Tot" - "Blender_Variables_Pers"."gSyrLinePrepCountInit";
END_IF;
"mWaterCountAcheaved" := NOT "mSyrupLineManualDrainSR" AND ("HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" >= "Aux_Somma_Lt");
SEL_R(G := "HMI_Device"."PPP302"."Out" AND NOT "mSyrupLineManualDrainSR" AND ("HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" >= "Aux_Somma_Lt"), IN0 := 0.0, IN1 := 101.0);
"mDummy" := TRUE;
// Network 20: Fuzzy Net (Original Language: LAD)
"mFuzzyNetAdd1" := "mFuzzyNetAdd1" + "mFuzzyNetAdd2";
"mFuzzyNetAdd1" := "mFuzzyNetAdd1" + "mFuzzyNetAdd3";
"mFuzzyNetOut" := "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND ("mFuzzyNetAdd1" > 100.0);
IF "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX MASTER VALIDATION" AND ("mFuzzyNetAdd1" > 100.0) THEN
"Procedure_Variables"."FTP302Line_Preparation"."LinePrepared" := TRUE;
END_IF;
// Network 21: Opeartor Run Syrup Prep (Original Language: LAD)
_HMI_Alarms___gH_Message__8_ := "gBlenderProdMode" AND "Procedure_Variables"."FTP302Line_Preparation"."Qualifier" AND NOT "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode" AND NOT "Procedure_Variables"."FTP302_StartUp"."Latch" AND NOT "Procedure_Variables"."FTP302Line_Preparation"."Done" AND NOT "System_RunOut_Variables"."FastChangeOverActivated";
// Network 22: Syrup Tank Prep Running (Original Language: LAD)
// Syrup Tank Prep Running Message
"HMI_Variables_Status"."Procedures"."TP301PrepRun" := "Procedure_Variables"."FTP302Line_Preparation"."Latch";
// Network 23: Syrup Tank Prep Running (Original Language: LAD)
// Syrup Tank Prep Running Message
_HMI_Alarms___gH_Status__3_ := "Procedure_Variables"."FTP302Line_Preparation"."Latch" OR "Procedure_Variables"."FTP302_StartUp"."Latch";
// Network 24: (Original Language: LAD)
IF "Procedure_Variables"."FTP302Line_Preparation"."Running" THEN
Syrup_Line_MFM_Prep_Seq(FuzzyNetOut := "mFuzzyNetOut", SyrupLineManualDrained := "mSyrupLineManualDrained", WaterCountAcheaved := "mWaterCountAcheaved", mStep := "mStepNum", mStopPumpP2 := "mStopPumpP2", mSyrMinLevel := "mDelayON_SyrupMinON", mTimer := "mTimeStep", mTransition := "mTransition");
END_IF;
// Network 25: (Original Language: LAD)
"HMI_Variables_Status"."System_Run_Out"."TP301PrepDone" := "Procedure_Variables"."FTP302Line_Preparation"."Done";
END_FUNCTION_BLOCK

View File

@ -1,269 +0,0 @@
// FB1813
// Block Type: FB
// Block Name (Original): Syrup Line MFM Prep DAR
// Block Number: 1813
// Original Network Languages: LAD, STL
FUNCTION_BLOCK "Syrup_Line_MFM_Prep_DAR"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
VAR_INPUT
IN : Bool;
PT : Time;
END_VAR
VAR_OUTPUT
Q : Bool;
ET : Time;
END_VAR
VAR_STAT
mStepNum : Int;
mTimeStep : Int;
Real_Time : Time;
mTransition : Bool;
mSyrLineMFMPrepONS : Bool;
mSyrupLineManualDrainSR : Bool;
mQTM306_PrepReqTPON : Bool;
mQTM306_PrepReqTP1ON : Bool;
mDelayON_StopPumpON : Bool;
mDelayON_SyrupMinON : Bool;
mDelayON_PumpStatusON : Bool;
mHVP302_TONON : Bool;
mQTM306_Prep_TimeOutON : Bool;
mQTM306_PrepReqTP : "TP:v1.0";
mQTM306_PrepReqTP1 : "TP:v1.0";
mDelayON_StopPump : "TON:v1.0";
mDelayON_SyrupMin : "TON:v1.0";
mDelayON_PumpStatus : "TON:v1.0";
mHVP302_TON : "TON:v1.0";
mQTM306_Prep_TimeOut : "TON:v1.0";
END_VAR
VAR_TEMP
mDummy : Bool;
mAux1 : Real;
mAux2 : Real;
mTimeOutElapsed : Bool;
mStopPumpP2 : Bool;
mSyrMinLevel : Bool;
mPumpP2Running : Bool;
mWaterCountAcheaved : Bool;
mSyrupLineManualDrained : Bool;
mFuzzyNetOut : Bool;
Out_Time_DI : DInt;
Real_Time_S5 : S5Time;
mProcSlctd : Bool;
mFuzzyNetAdd1 : Real;
mFuzzyNetAdd2 : Real;
mFuzzyNetAdd3 : Real;
mSyrBrixAux : Real;
mSyrBrixAux_1 : Real;
Aux_Somma_Lt : Real;
END_VAR
#_1S : Bool; // Auto-generated temporary
#_4S : Bool; // Auto-generated temporary
#_4S_600MS : Bool; // Auto-generated temporary
#_5S : Bool; // Auto-generated temporary
#TON_INSTANCE_26_dup3 : TON; // Auto-generated temporary
#TON_INSTANCE_26_dup5 : TON; // Auto-generated temporary
#TON_INSTANCE_27_dup4 : TON; // Auto-generated temporary
#TON_INSTANCE_30_dup5 : TON; // Auto-generated temporary
#TP_INSTANCE_44 : TP; // Auto-generated temporary
BEGIN
// Network 1: (Original Language: LAD)
%DB960.DBX56.0 := ("gBlenderProdMode" AND "gBlenderSuppliesOk" AND "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Blender_Variables_Pers"."gWaterRecipe") OR ("gBlenderProdMode" AND "gBlenderSuppliesOk" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode");
// Network 2: SyrLineMFMPrepReq (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"Tag_69" := "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone"; // P_TRIG("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone") - Mem: "Tag_69"
#TP_INSTANCE_44(IN := "System_RunOut_Variables"."FastChangeOverActivated" AND "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone" AND "HMI_Variables_Cmd"."GLOBAL_CMD"."_EnableNextRecipe" AND "System_RunOut_Variables"."NextRecipeOk" AND NOT %DB960.DBX56.6, PT := T#1S);
%DB960.DBX56.1 := ("mQTM306_PrepReqTP1ON" AND %DB960.DBX56.0) OR (%DB960.DBX56.0 AND "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Tag_69" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone");
// Network 3: (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"mSyrLineMFMPrepONS" := %DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated"; // P_TRIG(%DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated") - Mem: "mSyrLineMFMPrepONS"
%DB960.DBX56.2 := "gBlenderCIPMode" OR "Blender_Variables_Pers"."gWaterRecipe" OR ("gEmergencyPressed" AND %DB960.DBX56.3) OR ("Procedure_Variables"."SyrupLineRinse"."Latch" AND "System_RunOut_Variables"."FastChangeOverActivated") OR ("gBlenderRinseMode" AND NOT "System_RunOut_Variables"."FastChangeOverActivated") OR (%DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "mSyrLineMFMPrepONS");
// Network 4: (Original Language: LAD)
IF ("Procedure_Variables"."Blender_Rinse"."Latch" AND NOT "AUX MASTER VALIDATION") OR ("Procedure_Variables"."Syr_RunOut"."Latch" AND NOT "AUX MASTER VALIDATION") OR ("CIP_Program_Variables"."Status"."Started" AND NOT "AUX MASTER VALIDATION") THEN
%DB960.DBX57.0 := FALSE;
END_IF;
// Network 5: (Original Language: LAD)
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"mStepNum" := 0;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
%DB960.DBX56.6 := FALSE;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"Procedure_Variables"."FTP302Line_Preparation"."LinePrepared" := FALSE;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"mWaterCountAcheaved" := FALSE;
END_IF;
// Network 6: (Original Language: LAD)
%DB960.DBX56.5 := "HMI_Device"."PPP302"."Alarm" OR "HMI_Device"."SyrupRoom_SyrupPump"."Alarm" OR NOT "HMI_Digital"."PSM311"."Filtered";
// Network 7: (Original Language: LAD)
%DB960.DBX56.3 := (%DB960.DBX56.1 AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) OR ("Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6);
IF (%DB960.DBX56.1 AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) OR ("Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) THEN
"HMI_Variables_Status"."Procedures"."BlenderStateNum" := 3;
END_IF;
// Network 8: (Original Language: LAD)
%DB960.DBX56.4 := %DB960.DBX56.3 AND NOT %DB960.DBX56.5;
// Network 9: MIX - (Original Language: LAD)
"mAux1" := "Blender_Variables"."gMinProduction" / 6.0;
mAux1 := SEL_R(G := Ne("mAux1", 0.0), IN0 := 1.0, IN1 := "mAux1");
"mAux2" := "HMI_Blender_Parameters"."ProcessSetup"."_SyrupRunOutLiters" * 1.5;
"mAux1" := "mAux2" / "mAux1";
"Out_Time_DI" := CEIL("mAux1");
"mDummy" := TRUE;
// Network 10: (Original Language: STL)
// #Out_Time_DI (DINT) converted in #Real_Time_S5 (S5Time)
// Use L#1000 IF #Out_Time_DI is in ms
// --- BEGIN STL Network 10 ---
```stl
L "Out_Time_DI"
L 1000
MUL_D
T "Real_Time"
```
// --- END STL Network 10 ---
// Network 11: SyrLineMFMPrep_TimeOut (Original Language: LAD)
#TON_INSTANCE_26_dup3(IN := %DBX56.3, PT := "Real_Time");
"mTimeOutElapsed" := "mQTM306_Prep_TimeOutON";
// Network 12: DelayON_StopPump (Original Language: LAD)
#TON_INSTANCE_27_dup4(IN := NOT "gIN_SyrTank_MinLvl", PT := T#4S_600MS);
"mStopPumpP2" := "mDelayON_StopPumpON";
// Network 13: DelayON_SyrupMin (Original Language: LAD)
"mSyrMinLevel" := "gIN_SyrTank_MinLvl";
// Network 14: DelayON_PumpStatus (Original Language: LAD)
#TON_INSTANCE_26_dup5(IN := "HMI_Device"."PPP302"."Out", PT := T#4S);
"mPumpP2Running" := "mDelayON_PumpStatusON";
// Network 15: SYRUP LINE MANUAL DRAIN (Original Language: LAD)
// THIS PROCEDURE HAS TO BE DONE BEFORE TO SELECT THE SYRUP LINE STARTUP.
#TON_INSTANCE_30_dup5(IN := "gIN_HVP301_Aux", PT := T#5S);
// Network 16: MIX - HMI Variables Cmd (Original Language: LAD)
"mSyrupLineManualDrained" := %DB960.DBX56.3 AND "mSyrupLineManualDrainSR" AND NOT "gIN_HVP301_Aux";
// Network 17: (Original Language: LAD)
IF NOT "Procedure_Variables"."FTP302Line_Preparation"."Latch" THEN
"Blender_Variables_Pers"."gSyrLinePrepCountInit" := "Profibus_Variables"."gFTP302_Tot";
END_IF;
// Network 18: BRIX PRODUCT STARTUP THRESHOLD (Original Language: LAD)
"mSyrBrixAux" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" * "HMI_Blender_Parameters"."ProcessSetup"."_PercSyrupBrixSyrStarUp";
"mSyrBrixAux_1" := "mSyrBrixAux" / 100.0;
"Blender_Constants"."gSugaredSyrupBrixThrsd" := "mSyrBrixAux_1";
// Network 19: Fuzzy Net (Original Language: LAD)
mFuzzyNetAdd1 := SEL_R(G := "M_validat_27_01_25" AND "gPV_SyrDensOk" AND "HMI_Device"."PPP302"."Out" AND NOT "Blender_Variables_Pers"."gSugarBeverage", IN0 := 0.0, IN1 := 101.0);
IF "Blender_Variables_Pers"."gSugarBeverage" THEN
"mAux1" := "Profibus_Variables"."gFTP302_Brix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
END_IF;
mFuzzyNetAdd2 := SEL_R(G := "gIN_SyrTank_MinLvl" AND ("mAux1" > "Blender_Constants"."gSugaredSyrupBrixThrsd"), IN0 := 0.0, IN1 := 101.0);
IF NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" THEN
"Aux_Somma_Lt" := "HMI_Blender_Parameters"."ProcessSetup"."_SyrupRunOutLiters" + %DBD784;
END_IF;
IF NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" THEN
"HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" := "Profibus_Variables"."gFTP302_Tot" - "Blender_Variables_Pers"."gSyrLinePrepCountInit";
END_IF;
"mWaterCountAcheaved" := NOT "mSyrupLineManualDrainSR" AND ("HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" >= "Aux_Somma_Lt");
mFuzzyNetAdd3 := SEL_R(G := "HMI_Device"."PPP302"."Out" AND NOT "mSyrupLineManualDrainSR" AND ("HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" >= "Aux_Somma_Lt"), IN0 := 0.0, IN1 := 101.0);
"mDummy" := TRUE;
// Network 20: Fuzzy Net (Original Language: LAD)
"mFuzzyNetAdd1" := "mFuzzyNetAdd1" + "mFuzzyNetAdd2";
"mFuzzyNetAdd1" := "mFuzzyNetAdd1" + "mFuzzyNetAdd3";
"mFuzzyNetOut" := "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND ("mFuzzyNetAdd1" > 100.0);
IF "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX MASTER VALIDATION" AND ("mFuzzyNetAdd1" > 100.0) THEN
"Procedure_Variables"."FTP302Line_Preparation"."LinePrepared" := TRUE;
END_IF;
// Network 21: Opeartor Run Syrup Prep (Original Language: LAD)
_HMI_Alarms___gH_Message__8_ := "gBlenderProdMode" AND "Procedure_Variables"."FTP302Line_Preparation"."Qualifier" AND NOT "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode" AND NOT "Procedure_Variables"."FTP302_StartUp"."Latch" AND NOT "Procedure_Variables"."FTP302Line_Preparation"."Done" AND NOT "System_RunOut_Variables"."FastChangeOverActivated";
// Network 22: Syrup Tank Prep Running (Original Language: LAD)
// Syrup Tank Prep Running Message
"HMI_Variables_Status"."Procedures"."TP301PrepRun" := "Procedure_Variables"."FTP302Line_Preparation"."Latch";
// Network 23: Syrup Tank Prep Running (Original Language: LAD)
// Syrup Tank Prep Running Message
_HMI_Alarms___gH_Status__3_ := "Procedure_Variables"."FTP302Line_Preparation"."Latch" OR "Procedure_Variables"."FTP302_StartUp"."Latch";
// Network 24: (Original Language: LAD)
IF "Procedure_Variables"."FTP302Line_Preparation"."Running" THEN
Syrup_Line_MFM_Prep_Seq(FuzzyNetOut := "mFuzzyNetOut", SyrupLineManualDrained := "mSyrupLineManualDrained", WaterCountAcheaved := "mWaterCountAcheaved", mStep := "mStepNum", mStopPumpP2 := "mStopPumpP2", mSyrMinLevel := "mDelayON_SyrupMinON", mTimer := "mTimeStep", mTransition := "mTransition");
END_IF;
// Network 25: (Original Language: LAD)
"HMI_Variables_Status"."System_Run_Out"."TP301PrepDone" := "Procedure_Variables"."FTP302Line_Preparation"."Done";
END_FUNCTION_BLOCK

View File

@ -1,269 +0,0 @@
// FB1813
// Block Type: FB
// Block Name (Original): Syrup Line MFM Prep DAR
// Block Number: 1813
// Original Network Languages: STL, LAD
FUNCTION_BLOCK "Syrup_Line_MFM_Prep_DAR"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
VAR_INPUT
IN : Bool;
PT : Time;
END_VAR
VAR_OUTPUT
Q : Bool;
ET : Time;
END_VAR
VAR_STAT
mStepNum : Int;
mTimeStep : Int;
Real_Time : Time;
mTransition : Bool;
mSyrLineMFMPrepONS : Bool;
mSyrupLineManualDrainSR : Bool;
mQTM306_PrepReqTPON : Bool;
mQTM306_PrepReqTP1ON : Bool;
mDelayON_StopPumpON : Bool;
mDelayON_SyrupMinON : Bool;
mDelayON_PumpStatusON : Bool;
mHVP302_TONON : Bool;
mQTM306_Prep_TimeOutON : Bool;
mQTM306_PrepReqTP : "TP:v1.0";
mQTM306_PrepReqTP1 : "TP:v1.0";
mDelayON_StopPump : "TON:v1.0";
mDelayON_SyrupMin : "TON:v1.0";
mDelayON_PumpStatus : "TON:v1.0";
mHVP302_TON : "TON:v1.0";
mQTM306_Prep_TimeOut : "TON:v1.0";
END_VAR
VAR_TEMP
mDummy : Bool;
mAux1 : Real;
mAux2 : Real;
mTimeOutElapsed : Bool;
mStopPumpP2 : Bool;
mSyrMinLevel : Bool;
mPumpP2Running : Bool;
mWaterCountAcheaved : Bool;
mSyrupLineManualDrained : Bool;
mFuzzyNetOut : Bool;
Out_Time_DI : DInt;
Real_Time_S5 : S5Time;
mProcSlctd : Bool;
mFuzzyNetAdd1 : Real;
mFuzzyNetAdd2 : Real;
mFuzzyNetAdd3 : Real;
mSyrBrixAux : Real;
mSyrBrixAux_1 : Real;
Aux_Somma_Lt : Real;
END_VAR
#_1S : Bool; // Auto-generated temporary
#_4S : Bool; // Auto-generated temporary
#_4S_600MS : Bool; // Auto-generated temporary
#_5S : Bool; // Auto-generated temporary
#TON_INSTANCE_26_dup3 : TON; // Auto-generated temporary
#TON_INSTANCE_26_dup5 : TON; // Auto-generated temporary
#TON_INSTANCE_27_dup4 : TON; // Auto-generated temporary
#TON_INSTANCE_30_dup5 : TON; // Auto-generated temporary
#TP_INSTANCE_44 : TP; // Auto-generated temporary
BEGIN
// Network 1: (Original Language: LAD)
%DB960.DBX56.0 := ("gBlenderProdMode" AND "gBlenderSuppliesOk" AND "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Blender_Variables_Pers"."gWaterRecipe") OR ("gBlenderProdMode" AND "gBlenderSuppliesOk" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode");
// Network 2: SyrLineMFMPrepReq (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"Tag_69" := "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone"; // P_TRIG("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone") - Mem: "Tag_69"
#TP_INSTANCE_44(IN := "System_RunOut_Variables"."FastChangeOverActivated" AND "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone" AND "HMI_Variables_Cmd"."GLOBAL_CMD"."_EnableNextRecipe" AND "System_RunOut_Variables"."NextRecipeOk" AND NOT %DB960.DBX56.6, PT := T#1S);
%DB960.DBX56.1 := ("mQTM306_PrepReqTP1ON" AND %DB960.DBX56.0) OR (%DB960.DBX56.0 AND "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Tag_69" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone");
// Network 3: (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"mSyrLineMFMPrepONS" := %DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated"; // P_TRIG(%DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated") - Mem: "mSyrLineMFMPrepONS"
%DB960.DBX56.2 := "gBlenderCIPMode" OR "Blender_Variables_Pers"."gWaterRecipe" OR ("gEmergencyPressed" AND %DB960.DBX56.3) OR ("Procedure_Variables"."SyrupLineRinse"."Latch" AND "System_RunOut_Variables"."FastChangeOverActivated") OR ("gBlenderRinseMode" AND NOT "System_RunOut_Variables"."FastChangeOverActivated") OR (%DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "mSyrLineMFMPrepONS");
// Network 4: (Original Language: LAD)
IF ("Procedure_Variables"."Blender_Rinse"."Latch" AND NOT "AUX MASTER VALIDATION") OR ("Procedure_Variables"."Syr_RunOut"."Latch" AND NOT "AUX MASTER VALIDATION") OR ("CIP_Program_Variables"."Status"."Started" AND NOT "AUX MASTER VALIDATION") THEN
%DB960.DBX57.0 := FALSE;
END_IF;
// Network 5: (Original Language: LAD)
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"mStepNum" := 0;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
%DB960.DBX56.6 := FALSE;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"Procedure_Variables"."FTP302Line_Preparation"."LinePrepared" := FALSE;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"mWaterCountAcheaved" := FALSE;
END_IF;
// Network 6: (Original Language: LAD)
%DB960.DBX56.5 := "HMI_Device"."PPP302"."Alarm" OR "HMI_Device"."SyrupRoom_SyrupPump"."Alarm" OR NOT "HMI_Digital"."PSM311"."Filtered";
// Network 7: (Original Language: LAD)
%DB960.DBX56.3 := (%DB960.DBX56.1 AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) OR ("Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6);
IF (%DB960.DBX56.1 AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) OR ("Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) THEN
"HMI_Variables_Status"."Procedures"."BlenderStateNum" := 3;
END_IF;
// Network 8: (Original Language: LAD)
%DB960.DBX56.4 := %DB960.DBX56.3 AND NOT %DB960.DBX56.5;
// Network 9: MIX - (Original Language: LAD)
"mAux1" := "Blender_Variables"."gMinProduction" / 6.0;
mAux1 := SEL_R(G := Ne("mAux1", 0.0), IN0 := 1.0, IN1 := "mAux1");
"mAux2" := "HMI_Blender_Parameters"."ProcessSetup"."_SyrupRunOutLiters" * 1.5;
"mAux1" := "mAux2" / "mAux1";
"Out_Time_DI" := CEIL("mAux1");
"mDummy" := TRUE;
// Network 10: (Original Language: STL)
// #Out_Time_DI (DINT) converted in #Real_Time_S5 (S5Time)
// Use L#1000 IF #Out_Time_DI is in ms
// --- BEGIN STL Network 10 ---
```stl
L "Out_Time_DI"
L 1000
MUL_D
T "Real_Time"
```
// --- END STL Network 10 ---
// Network 11: SyrLineMFMPrep_TimeOut (Original Language: LAD)
#TON_INSTANCE_26_dup3(IN := %DBX56.3, PT := "Real_Time");
"mTimeOutElapsed" := "mQTM306_Prep_TimeOutON";
// Network 12: DelayON_StopPump (Original Language: LAD)
#TON_INSTANCE_27_dup4(IN := NOT "gIN_SyrTank_MinLvl", PT := T#4S_600MS);
"mStopPumpP2" := "mDelayON_StopPumpON";
// Network 13: DelayON_SyrupMin (Original Language: LAD)
"mSyrMinLevel" := "gIN_SyrTank_MinLvl";
// Network 14: DelayON_PumpStatus (Original Language: LAD)
#TON_INSTANCE_26_dup5(IN := "HMI_Device"."PPP302"."Out", PT := T#4S);
"mPumpP2Running" := "mDelayON_PumpStatusON";
// Network 15: SYRUP LINE MANUAL DRAIN (Original Language: LAD)
// THIS PROCEDURE HAS TO BE DONE BEFORE TO SELECT THE SYRUP LINE STARTUP.
#TON_INSTANCE_30_dup5(IN := "gIN_HVP301_Aux", PT := T#5S);
// Network 16: MIX - HMI Variables Cmd (Original Language: LAD)
"mSyrupLineManualDrained" := %DB960.DBX56.3 AND "mSyrupLineManualDrainSR" AND NOT "gIN_HVP301_Aux";
// Network 17: (Original Language: LAD)
IF NOT "Procedure_Variables"."FTP302Line_Preparation"."Latch" THEN
"Blender_Variables_Pers"."gSyrLinePrepCountInit" := "Profibus_Variables"."gFTP302_Tot";
END_IF;
// Network 18: BRIX PRODUCT STARTUP THRESHOLD (Original Language: LAD)
"mSyrBrixAux" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" * "HMI_Blender_Parameters"."ProcessSetup"."_PercSyrupBrixSyrStarUp";
"mSyrBrixAux_1" := "mSyrBrixAux" / 100.0;
"Blender_Constants"."gSugaredSyrupBrixThrsd" := "mSyrBrixAux_1";
// Network 19: Fuzzy Net (Original Language: LAD)
mFuzzyNetAdd1 := SEL_R(G := "M_validat_27_01_25" AND "gPV_SyrDensOk" AND "HMI_Device"."PPP302"."Out" AND NOT "Blender_Variables_Pers"."gSugarBeverage", IN0 := 0.0, IN1 := 101.0);
IF "Blender_Variables_Pers"."gSugarBeverage" THEN
"mAux1" := "Profibus_Variables"."gFTP302_Brix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
END_IF;
mFuzzyNetAdd2 := SEL_R(G := "gIN_SyrTank_MinLvl" AND "Blender_Variables_Pers"."gSugarBeverage" AND ("mAux1" > "Blender_Constants"."gSugaredSyrupBrixThrsd"), IN0 := 0.0, IN1 := 101.0);
IF NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" THEN
"Aux_Somma_Lt" := "HMI_Blender_Parameters"."ProcessSetup"."_SyrupRunOutLiters" + %DBD784;
END_IF;
IF NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" THEN
"HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" := "Profibus_Variables"."gFTP302_Tot" - "Blender_Variables_Pers"."gSyrLinePrepCountInit";
END_IF;
"mWaterCountAcheaved" := NOT "mSyrupLineManualDrainSR" AND NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" AND ("HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" >= "Aux_Somma_Lt");
mFuzzyNetAdd3 := SEL_R(G := "HMI_Device"."PPP302"."Out" AND NOT "mSyrupLineManualDrainSR" AND NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" AND ("HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" >= "Aux_Somma_Lt"), IN0 := 0.0, IN1 := 101.0);
"mDummy" := TRUE;
// Network 20: Fuzzy Net (Original Language: LAD)
"mFuzzyNetAdd1" := "mFuzzyNetAdd1" + "mFuzzyNetAdd2";
"mFuzzyNetAdd1" := "mFuzzyNetAdd1" + "mFuzzyNetAdd3";
"mFuzzyNetOut" := "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND ("mFuzzyNetAdd1" > 100.0);
IF "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX MASTER VALIDATION" AND ("mFuzzyNetAdd1" > 100.0) THEN
"Procedure_Variables"."FTP302Line_Preparation"."LinePrepared" := TRUE;
END_IF;
// Network 21: Opeartor Run Syrup Prep (Original Language: LAD)
_HMI_Alarms___gH_Message__8_ := "gBlenderProdMode" AND "Procedure_Variables"."FTP302Line_Preparation"."Qualifier" AND NOT "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode" AND NOT "Procedure_Variables"."FTP302_StartUp"."Latch" AND NOT "Procedure_Variables"."FTP302Line_Preparation"."Done" AND NOT "System_RunOut_Variables"."FastChangeOverActivated";
// Network 22: Syrup Tank Prep Running (Original Language: LAD)
// Syrup Tank Prep Running Message
"HMI_Variables_Status"."Procedures"."TP301PrepRun" := "Procedure_Variables"."FTP302Line_Preparation"."Latch";
// Network 23: Syrup Tank Prep Running (Original Language: LAD)
// Syrup Tank Prep Running Message
_HMI_Alarms___gH_Status__3_ := "Procedure_Variables"."FTP302Line_Preparation"."Latch" OR "Procedure_Variables"."FTP302_StartUp"."Latch";
// Network 24: (Original Language: LAD)
IF "Procedure_Variables"."FTP302Line_Preparation"."Running" THEN
Syrup_Line_MFM_Prep_Seq(FuzzyNetOut := "mFuzzyNetOut", SyrupLineManualDrained := "mSyrupLineManualDrained", WaterCountAcheaved := "mWaterCountAcheaved", mStep := "mStepNum", mStopPumpP2 := "mStopPumpP2", mSyrMinLevel := "mDelayON_SyrupMinON", mTimer := "mTimeStep", mTransition := "mTransition");
END_IF;
// Network 25: (Original Language: LAD)
"HMI_Variables_Status"."System_Run_Out"."TP301PrepDone" := "Procedure_Variables"."FTP302Line_Preparation"."Done";
END_FUNCTION_BLOCK

View File

@ -1,269 +0,0 @@
// FB1813
// Block Type: FB
// Block Name (Original): Syrup Line MFM Prep DAR
// Block Number: 1813
// Original Network Languages: LAD, STL
FUNCTION_BLOCK "Syrup_Line_MFM_Prep_DAR"
{ S7_Optimized_Access := 'TRUE' }
VERSION : 0.1
VAR_INPUT
IN : Bool;
PT : Time;
END_VAR
VAR_OUTPUT
Q : Bool;
ET : Time;
END_VAR
VAR_STAT
mStepNum : Int;
mTimeStep : Int;
Real_Time : Time;
mTransition : Bool;
mSyrLineMFMPrepONS : Bool;
mSyrupLineManualDrainSR : Bool;
mQTM306_PrepReqTPON : Bool;
mQTM306_PrepReqTP1ON : Bool;
mDelayON_StopPumpON : Bool;
mDelayON_SyrupMinON : Bool;
mDelayON_PumpStatusON : Bool;
mHVP302_TONON : Bool;
mQTM306_Prep_TimeOutON : Bool;
mQTM306_PrepReqTP : "TP:v1.0";
mQTM306_PrepReqTP1 : "TP:v1.0";
mDelayON_StopPump : "TON:v1.0";
mDelayON_SyrupMin : "TON:v1.0";
mDelayON_PumpStatus : "TON:v1.0";
mHVP302_TON : "TON:v1.0";
mQTM306_Prep_TimeOut : "TON:v1.0";
END_VAR
VAR_TEMP
mDummy : Bool;
mAux1 : Real;
mAux2 : Real;
mTimeOutElapsed : Bool;
mStopPumpP2 : Bool;
mSyrMinLevel : Bool;
mPumpP2Running : Bool;
mWaterCountAcheaved : Bool;
mSyrupLineManualDrained : Bool;
mFuzzyNetOut : Bool;
Out_Time_DI : DInt;
Real_Time_S5 : S5Time;
mProcSlctd : Bool;
mFuzzyNetAdd1 : Real;
mFuzzyNetAdd2 : Real;
mFuzzyNetAdd3 : Real;
mSyrBrixAux : Real;
mSyrBrixAux_1 : Real;
Aux_Somma_Lt : Real;
END_VAR
#_1S : Bool; // Auto-generated temporary
#_4S : Bool; // Auto-generated temporary
#_4S_600MS : Bool; // Auto-generated temporary
#_5S : Bool; // Auto-generated temporary
#TON_INSTANCE_26_dup3 : Bool; // Auto-generated temporary
#TON_INSTANCE_26_dup5 : Bool; // Auto-generated temporary
#TON_INSTANCE_27_dup4 : Bool; // Auto-generated temporary
#TON_INSTANCE_30_dup5 : Bool; // Auto-generated temporary
#TP_INSTANCE_44 : Bool; // Auto-generated temporary
BEGIN
// Network 1: (Original Language: LAD)
%DB960.DBX56.0 := ("gBlenderProdMode" AND "gBlenderSuppliesOk" AND "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Blender_Variables_Pers"."gWaterRecipe") OR ("gBlenderProdMode" AND "gBlenderSuppliesOk" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode");
// Network 2: SyrLineMFMPrepReq (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"Tag_69" := "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone"; // P_TRIG("HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone") - Mem: "Tag_69"
#TP_INSTANCE_44(IN := "System_RunOut_Variables"."FastChangeOverActivated" AND "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone" AND "HMI_Variables_Cmd"."GLOBAL_CMD"."_EnableNextRecipe" AND "System_RunOut_Variables"."NextRecipeOk" AND NOT %DB960.DBX56.6, PT := T#1S); // TODO: Declarar #TP_INSTANCE_44 : TP;
%DB960.DBX56.1 := ("mQTM306_PrepReqTP1ON" AND %DB960.DBX56.0) OR (%DB960.DBX56.0 AND "HMI_Variables_Cmd"."Commands_From_HMI"."CMD_FTP302Line_Prep" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "Tag_69" AND NOT "Procedure_Variables"."Syr_RunOut"."FastChangeOverRinseDone");
// Network 3: (Original Language: LAD)
// PBox SymPy processed, logic in consumer
"mSyrLineMFMPrepONS" := %DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated"; // P_TRIG(%DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated") - Mem: "mSyrLineMFMPrepONS"
%DB960.DBX56.2 := "gBlenderCIPMode" OR "Blender_Variables_Pers"."gWaterRecipe" OR ("gEmergencyPressed" AND %DB960.DBX56.3) OR ("Procedure_Variables"."SyrupLineRinse"."Latch" AND "System_RunOut_Variables"."FastChangeOverActivated") OR ("gBlenderRinseMode" AND NOT "System_RunOut_Variables"."FastChangeOverActivated") OR (%DB960.DBX56.1 AND %DB960.DBX56.6 AND NOT "Procedure_Variables"."Blender_Run"."Latch" AND NOT "System_RunOut_Variables"."FastChangeOverActivated" AND NOT "mSyrLineMFMPrepONS");
// Network 4: (Original Language: LAD)
IF ("Procedure_Variables"."Blender_Rinse"."Latch" AND NOT "AUX MASTER VALIDATION") OR ("Procedure_Variables"."Syr_RunOut"."Latch" AND NOT "AUX MASTER VALIDATION") OR ("CIP_Program_Variables"."Status"."Started" AND NOT "AUX MASTER VALIDATION") THEN
%DB960.DBX57.0 := FALSE;
END_IF;
// Network 5: (Original Language: LAD)
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"mStepNum" := 0;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
%DB960.DBX56.6 := FALSE;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"Procedure_Variables"."FTP302Line_Preparation"."LinePrepared" := FALSE;
END_IF;
IF "Procedure_Variables"."FTP302Line_Preparation"."Reset" THEN
"mWaterCountAcheaved" := FALSE;
END_IF;
// Network 6: (Original Language: LAD)
%DB960.DBX56.5 := "HMI_Device"."PPP302"."Alarm" OR "HMI_Device"."SyrupRoom_SyrupPump"."Alarm" OR NOT "HMI_Digital"."PSM311"."Filtered";
// Network 7: (Original Language: LAD)
%DB960.DBX56.3 := (%DB960.DBX56.1 AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) OR ("Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6);
IF (%DB960.DBX56.1 AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) OR ("Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX Start CPU" AND NOT %DB960.DBX56.2 AND NOT %DB960.DBX56.6) THEN
"HMI_Variables_Status"."Procedures"."BlenderStateNum" := 3;
END_IF;
// Network 8: (Original Language: LAD)
%DB960.DBX56.4 := %DB960.DBX56.3 AND NOT %DB960.DBX56.5;
// Network 9: MIX - (Original Language: LAD)
"mAux1" := "Blender_Variables"."gMinProduction" / 6.0;
SEL_R(G := Ne("mAux1", 0.0), IN0 := 1.0, IN1 := "mAux1");
"mAux2" := "HMI_Blender_Parameters"."ProcessSetup"."_SyrupRunOutLiters" * 1.5;
"mAux1" := "mAux2" / "mAux1";
"Out_Time_DI" := CEIL("mAux1");
"mDummy" := TRUE;
// Network 10: (Original Language: STL)
// #Out_Time_DI (DINT) converted in #Real_Time_S5 (S5Time)
// Use L#1000 IF #Out_Time_DI is in ms
// --- BEGIN STL Network 10 ---
```stl
L "Out_Time_DI"
L 1000
MUL_D
T "Real_Time"
```
// --- END STL Network 10 ---
// Network 11: SyrLineMFMPrep_TimeOut (Original Language: LAD)
#TON_INSTANCE_26_dup3(IN := %DBX56.3, PT := "Real_Time"); // TODO: Declarar #TON_INSTANCE_26_dup3 : TON;
"mTimeOutElapsed" := "mQTM306_Prep_TimeOutON";
// Network 12: DelayON_StopPump (Original Language: LAD)
#TON_INSTANCE_27_dup4(IN := NOT "gIN_SyrTank_MinLvl", PT := T#4S_600MS); // TODO: Declarar #TON_INSTANCE_27_dup4 : TON;
"mStopPumpP2" := "mDelayON_StopPumpON";
// Network 13: DelayON_SyrupMin (Original Language: LAD)
"mSyrMinLevel" := "gIN_SyrTank_MinLvl";
// Network 14: DelayON_PumpStatus (Original Language: LAD)
#TON_INSTANCE_26_dup5(IN := "HMI_Device"."PPP302"."Out", PT := T#4S); // TODO: Declarar #TON_INSTANCE_26_dup5 : TON;
"mPumpP2Running" := "mDelayON_PumpStatusON";
// Network 15: SYRUP LINE MANUAL DRAIN (Original Language: LAD)
// THIS PROCEDURE HAS TO BE DONE BEFORE TO SELECT THE SYRUP LINE STARTUP.
#TON_INSTANCE_30_dup5(IN := "gIN_HVP301_Aux", PT := T#5S); // TODO: Declarar #TON_INSTANCE_30_dup5 : TON;
// Network 16: MIX - HMI Variables Cmd (Original Language: LAD)
"mSyrupLineManualDrained" := %DB960.DBX56.3 AND "mSyrupLineManualDrainSR" AND NOT "gIN_HVP301_Aux";
// Network 17: (Original Language: LAD)
IF NOT "Procedure_Variables"."FTP302Line_Preparation"."Latch" THEN
"Blender_Variables_Pers"."gSyrLinePrepCountInit" := "Profibus_Variables"."gFTP302_Tot";
END_IF;
// Network 18: BRIX PRODUCT STARTUP THRESHOLD (Original Language: LAD)
"mSyrBrixAux" := "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupBrix" * "HMI_Blender_Parameters"."ProcessSetup"."_PercSyrupBrixSyrStarUp";
"mSyrBrixAux_1" := "mSyrBrixAux" / 100.0;
"Blender_Constants"."gSugaredSyrupBrixThrsd" := "mSyrBrixAux_1";
// Network 19: Fuzzy Net (Original Language: LAD)
SEL_R(G := "M_validat_27_01_25" AND "gPV_SyrDensOk" AND "HMI_Device"."PPP302"."Out" AND NOT "Blender_Variables_Pers"."gSugarBeverage", IN0 := 0.0, IN1 := 101.0);
IF "Blender_Variables_Pers"."gSugarBeverage" THEN
"mAux1" := "Profibus_Variables"."gFTP302_Brix" * "HMI_Blender_Parameters"."Actual_Recipe_Parameters"."_SyrupFactor";
END_IF;
SEL_R(G := "gIN_SyrTank_MinLvl" AND ("mAux1" > "Blender_Constants"."gSugaredSyrupBrixThrsd"), IN0 := 0.0, IN1 := 101.0);
IF NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" THEN
"Aux_Somma_Lt" := "HMI_Blender_Parameters"."ProcessSetup"."_SyrupRunOutLiters" + %DBD784;
END_IF;
IF NOT "M_validat_27_01_25" AND NOT "Blender_Variables_Pers"."gSugarBeverage" THEN
"HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" := "Profibus_Variables"."gFTP302_Tot" - "Blender_Variables_Pers"."gSyrLinePrepCountInit";
END_IF;
"mWaterCountAcheaved" := NOT "mSyrupLineManualDrainSR" AND ("HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" >= "Aux_Somma_Lt");
SEL_R(G := "HMI_Device"."PPP302"."Out" AND NOT "mSyrupLineManualDrainSR" AND ("HMI_Variables_Status"."Analog_Values"."TP301SyrupPrimingCount" >= "Aux_Somma_Lt"), IN0 := 0.0, IN1 := 101.0);
"mDummy" := TRUE;
// Network 20: Fuzzy Net (Original Language: LAD)
"mFuzzyNetAdd1" := "mFuzzyNetAdd1" + "mFuzzyNetAdd2";
"mFuzzyNetAdd1" := "mFuzzyNetAdd1" + "mFuzzyNetAdd3";
"mFuzzyNetOut" := "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND ("mFuzzyNetAdd1" > 100.0);
IF "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "AUX MASTER VALIDATION" AND ("mFuzzyNetAdd1" > 100.0) THEN
"Procedure_Variables"."FTP302Line_Preparation"."LinePrepared" := TRUE;
END_IF;
// Network 21: Opeartor Run Syrup Prep (Original Language: LAD)
_HMI_Alarms___gH_Message__8_ := "gBlenderProdMode" AND "Procedure_Variables"."FTP302Line_Preparation"."Qualifier" AND NOT "Procedure_Variables"."FTP302Line_Preparation"."Latch" AND NOT "Blender_Variables_Pers"."gWaterRecipe" AND NOT "gBlenderRinseMode" AND NOT "Procedure_Variables"."FTP302_StartUp"."Latch" AND NOT "Procedure_Variables"."FTP302Line_Preparation"."Done" AND NOT "System_RunOut_Variables"."FastChangeOverActivated";
// Network 22: Syrup Tank Prep Running (Original Language: LAD)
// Syrup Tank Prep Running Message
"HMI_Variables_Status"."Procedures"."TP301PrepRun" := "Procedure_Variables"."FTP302Line_Preparation"."Latch";
// Network 23: Syrup Tank Prep Running (Original Language: LAD)
// Syrup Tank Prep Running Message
_HMI_Alarms___gH_Status__3_ := "Procedure_Variables"."FTP302Line_Preparation"."Latch" OR "Procedure_Variables"."FTP302_StartUp"."Latch";
// Network 24: (Original Language: LAD)
IF "Procedure_Variables"."FTP302Line_Preparation"."Running" THEN
Syrup_Line_MFM_Prep_Seq(FuzzyNetOut := "mFuzzyNetOut", SyrupLineManualDrained := "mSyrupLineManualDrained", WaterCountAcheaved := "mWaterCountAcheaved", mStep := "mStepNum", mStopPumpP2 := "mStopPumpP2", mSyrMinLevel := "mDelayON_SyrupMinON", mTimer := "mTimeStep", mTransition := "mTransition");
END_IF;
// Network 25: (Original Language: LAD)
"HMI_Variables_Status"."System_Run_Out"."TP301PrepDone" := "Procedure_Variables"."FTP302Line_Preparation"."Done";
END_FUNCTION_BLOCK

View File

@ -2,6 +2,7 @@
"path": "C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\ExportTia", "path": "C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\ExportTia",
"history": [ "history": [
"C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\ExportTia", "C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\ExportTia",
"D:\\Trabajo\\VM\\22 - 93841 - Sidel - Tilting\\ExportTia",
"D:\\Trabajo\\VM\\45 - HENKEL - VM Auto Changeover\\ExportTia", "D:\\Trabajo\\VM\\45 - HENKEL - VM Auto Changeover\\ExportTia",
"C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\Reporte\\TiaExport" "C:\\Trabajo\\SIDEL\\09 - SAE452 - Diet as Regular - San Giorgio in Bosco\\Reporte\\TiaExport"
] ]

View File

@ -1,5 +1,31 @@
{ {
"history": [ "history": [
{
"id": "f3bfd2b0",
"group_id": "2",
"script_name": "main.py",
"executed_date": "2025-08-31T22:42:46.885442Z",
"arguments": [],
"working_directory": "D:/Proyectos/Scripts/RS485/MaselliSimulatorApp",
"python_env": "tia_scripting",
"executable_type": "pythonw.exe",
"status": "running",
"pid": 11624,
"execution_time": null
},
{
"id": "80f1137e",
"group_id": "2",
"script_name": "main.py",
"executed_date": "2025-08-29T19:51:58.743573Z",
"arguments": [],
"working_directory": "D:/Proyectos/Scripts/RS485/MaselliSimulatorApp",
"python_env": "tia_scripting",
"executable_type": "pythonw.exe",
"status": "running",
"pid": 28716,
"execution_time": null
},
{ {
"id": "896ccf92", "id": "896ccf92",
"group_id": "2", "group_id": "2",

46528
data/log.txt

File diff suppressed because it is too large Load Diff