ParamManagerScripts/backend/script_groups/S7_DB_Utils
Miguel de5134920d Add initial implementation of Recipe Production and HMI Blender Parameters
- Introduced a new data type "Recipe_Prod" with various parameters related to production settings, including syrup properties, CO2 factors, and production rates.
- Created a data block "HMI_Blender_Parameters" to encapsulate processor options and settings for the blender, including various operational flags and parameters for different components.
- Initialized default values for recipe parameters and process setup configurations to ensure proper operation of the production system.
2025-05-17 14:31:37 +02:00
..
DB_Parser.py Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
data.json Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
db1001_data.db Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
db1001_format.csv Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
db1001_format.db.txt Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
description.json Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
documentation_db_HMI_Blender_Parameters.md Add initial implementation of Recipe Production and HMI Blender Parameters 2025-05-17 14:31:37 +02:00
esquema_group.json Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
esquema_work.json Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
log_x1.txt Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
log_x2.txt Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
log_x3.txt Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
parsed_s7_data.json Add initial implementation of Recipe Production and HMI Blender Parameters 2025-05-17 14:31:37 +02:00
readme.md Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
reconstructed_s7_source.txt Add initial implementation of Recipe Production and HMI Blender Parameters 2025-05-17 14:31:37 +02:00
script_config.json Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
scripts_description.json Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
work_dir.json Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
x1.py Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
x2.py Add x4.py for S7 source code generation and documentation 2025-05-17 14:06:22 +02:00
x3.py Add initial implementation of Recipe Production and HMI Blender Parameters 2025-05-17 14:31:37 +02:00
x4.py Add initial implementation of Recipe Production and HMI Blender Parameters 2025-05-17 14:31:37 +02:00

readme.md

How to work with config setup Example

script_root = os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname(file))) ) sys.path.append(script_root) from backend.script_utils import load_configuration

if name == "main": """ Load configuration from script_config.json in the current script directory.

Returns:
    Dict containing configurations with levels 1, 2, 3 and working_directory

Example usage in scripts:
    from script_utils import load_configuration

    configs = load_configuration()
    level1_config = configs.get("level1", {})
    level2_config = configs.get("level2", {})
    level3_config = configs.get("level3", {})
    working_dir = configs.get("working_directory", "")

""""

configs = load_configuration()
working_directory = configs.get("working_directory")

# Acceder a la configuración específica del grupo
group_config = configs.get("level2", {})

# Leer parámetros con valores por defecto (usando los defaults del esquema como guía)
# Parámetros necesarios para x4
cfg_scl_output_dirname = group_config.get("scl_output_dir", "scl_output")
cfg_xref_output_dirname = group_config.get("xref_output_dir", "xref_output")
cfg_xref_source_subdir = group_config.get("xref_source_subdir", "source")

Directory structure for Tia Portal scripts

<working_directory>/ ├── <Project_Name>_CAx_Export.aml ├── <PLC1_Name>/ │ ├── ProgramBlocks_XML/ │ │ └── ... (archivos XML de bloques) │ ├── ProgramBlocks_SCL/ │ │ └── ... (archivos SCL de bloques) │ ├── ProgramBlocks_CR/ │ │ └── ... (archivos XML de referencias cruzadas de bloques) │ ├── PlcTags/ │ │ └── ... (archivos XML de tablas de tags) │ ├── PlcTags_CR/ │ │ └── ... (archivos XML de referencias cruzadas de tablas de tags) │ ├── PlcDataTypes_CR/ │ │ └── ... (archivos XML de referencias cruzadas de UDTs) │ ├── SystemBlocks_CR/ │ │ └── ... │ └── SoftwareUnits_CR/ │ └── ... │ └── Documentation/ │ └── Source │ └── ... (archivos md de bloques de programa) │ └── JSON │ └── ... (archivos JSON temporales) │ └── xref_calls_tree.md │ └── xref_db_usage_summary.md │ └── xref_plc_tags_summary.md │ └── full_project_representation.md │ └── <Project_Name>_CAx_Export_Hardware_Tree.md

├── <PLC2_Name>/ │ ├── ProgramBlocks_XML/ │ │ └── ... │ └── ... └── ...