From f47ea308714745988bf04201d527811f4709eac5 Mon Sep 17 00:00:00 2001 From: Miguel Date: Tue, 23 Apr 2024 09:52:24 +0200 Subject: [PATCH] Con autosize y autocentrado --- CreateTable.py => CreateTableAndOffsets.py | 32 +- DB SIPA Supervision/DB SIPA Supervision.cvs | 178 ++ DB SIPA Supervision/DB SIPA Supervision.json | 768 +++++++ DB SIPA Supervision/DB SIPA Supervision.xlsx | Bin 0 -> 11809 bytes DB SIPA Supervision/DB SIPA Supervision.xml | 1300 +++++++++++ DB_to_Excel.py | 197 +- Data_block_1.db | 2 +- Data_block_1/Data_block_1.cvs | 262 +++ Data_block_1/Data_block_1.json | 1313 +++++++++++ Data_block_1/Data_block_1.xlsx | Bin 0 -> 14396 bytes Data_block_1/Data_block_1.xml | 2097 ++++++++++++++++++ Excel.py | 90 + FileSystem.py | 114 + S7_DBParser.py | 152 ++ __pycache__/ExpandDB.cpython-310.pyc | Bin 2321 -> 2321 bytes 15 files changed, 6308 insertions(+), 197 deletions(-) rename CreateTable.py => CreateTableAndOffsets.py (90%) create mode 100644 DB SIPA Supervision/DB SIPA Supervision.cvs create mode 100644 DB SIPA Supervision/DB SIPA Supervision.json create mode 100644 DB SIPA Supervision/DB SIPA Supervision.xlsx create mode 100644 DB SIPA Supervision/DB SIPA Supervision.xml create mode 100644 Data_block_1/Data_block_1.cvs create mode 100644 Data_block_1/Data_block_1.json create mode 100644 Data_block_1/Data_block_1.xlsx create mode 100644 Data_block_1/Data_block_1.xml create mode 100644 Excel.py create mode 100644 FileSystem.py create mode 100644 S7_DBParser.py diff --git a/CreateTable.py b/CreateTableAndOffsets.py similarity index 90% rename from CreateTable.py rename to CreateTableAndOffsets.py index 9484242..a741329 100644 --- a/CreateTable.py +++ b/CreateTableAndOffsets.py @@ -1,33 +1,7 @@ -import xmltodict import pandas as pd import re import sys -def save_json_to_xml(json_data, filename="DB_Structure.xml"): - """ - Convert JSON data to XML and save it to a file. - """ - xml_data = xmltodict.unparse({"root": json_data}, pretty=True) - with open(filename, "w") as xml_file: - xml_file.write(xml_data) - print(f"XML data saved to {filename}") - - -def save_dataframe_to_excel(df, filename="DB_Structure.xlsx"): - """ - Save the provided DataFrame to an Excel file. - """ - df.to_excel(filename, index=False) - print(f"Data saved to {filename}") - - -def save_dataframe_to_file(df, filename="DB_Structure.csv"): - """ - Save the provided DataFrame to a CSV file. - """ - df.to_csv(filename, index=False) - print(f"Data saved to {filename}") - type_sizes = { "Byte": 1, @@ -225,19 +199,19 @@ def collect_data_for_table( return collected_data -def convert_to_table(db_struct): +def initiate_conversion_to_table(db_struct): offset_state = OffsetState() return collect_data_for_table(db_struct, offset_state) -def display_as_table(dbs): +def convert_to_table(dbs): """ Convert collected DB data into a pandas DataFrame and display it. """ all_data = [] for db_name, db_content in dbs.items(): print(f"Processing DB: {db_name}") - db_data = convert_to_table(db_content) + db_data = initiate_conversion_to_table(db_content) all_data.extend(db_data) df = pd.DataFrame(all_data) diff --git a/DB SIPA Supervision/DB SIPA Supervision.cvs b/DB SIPA Supervision/DB SIPA Supervision.cvs new file mode 100644 index 0000000..a63b99a --- /dev/null +++ b/DB SIPA Supervision/DB SIPA Supervision.cvs @@ -0,0 +1,178 @@ +Nombre,Tipo,Offset,Size,Level,Dirección PLC,Comentario +MAIN,"""UDT SIPA SV Main""",0,-1,0,DBX0.0, +MAIN.N1,DInt,0,4,1,DBD0,.DB_IOT.USERLEVEL +MAIN.N2,String[81],4,83,1,DBX4.0,.DB_IOT.USERNAME +MAIN.N3,String[81],88,83,1,DBX88.0,.DB_IOT.NOME_RICETTA +MAIN.N4,Int,172,2,1,DBW172,.DB_IOT.NEXT_MAINT_CYCLES +MAIN.N5.V1,String[254],174,256,2,DBX174.0, +MAIN.N5.V2,String[254],430,256,2,DBX430.0, +MAIN.N5.V3,String[254],686,256,2,DBX686.0, +MAIN.N5.V4,String[254],942,256,2,DBX942.0, +MAIN.N5.V5,String[8],1198,10,2,DBX1198.0, +MAIN.N6,Array[1..3] of Real,1208,0,1,DBX1208.0,.DB_IOT.ELECTRIC_VOLTAGE_PHASE_D +MAIN.N6[1],Real,1208,4,2,DBD1208,.DB_IOT.ELECTRIC_VOLTAGE_PHASE_D +MAIN.N6[2],Real,1212,4,2,DBD1212,.DB_IOT.ELECTRIC_VOLTAGE_PHASE_D +MAIN.N6[3],Real,1216,4,2,DBD1216,.DB_IOT.ELECTRIC_VOLTAGE_PHASE_D +MAIN.N7,Array[1..3] of Real,1220,0,1,DBX1220.0,.DB_IOT.ELECTRIC_CURRENT_PHASE_D +MAIN.N7[1],Real,1220,4,2,DBD1220,.DB_IOT.ELECTRIC_CURRENT_PHASE_D +MAIN.N7[2],Real,1224,4,2,DBD1224,.DB_IOT.ELECTRIC_CURRENT_PHASE_D +MAIN.N7[3],Real,1228,4,2,DBD1228,.DB_IOT.ELECTRIC_CURRENT_PHASE_D +MAIN.N8,Real,1232,4,1,DBD1232,.DB_IOT.ELECTRIC_POWER_D +MAIN.N9,Real,1236,4,1,DBD1236,.DB_IOT.ELECTRIC_POWER_FACTOR_D +MAIN.N10,Real,1240,4,1,DBD1240,.DB_IOT.ELECTRIC_POWER_HOUR_D +MAIN.N11,Real,1244,4,1,DBD1244,.DB_IOT.ELECTRIC_POWER_WH +SECT1,"""UDT SIPA SV Section""",1248,-1,0,DBX1248.0, +SECT1.N1,DInt,1248,4,1,DBD1248,.DB_IOT.STATO_MACCHINA +SECT1.N2,DInt,1252,4,1,DBD1252,.DB_IOT.ALLARME_FERMO +SECT1.N3,DInt,1256,4,1,DBD1256,.DB_IOT.WARNING_ATTIVO (che compromette produzione) +SECT1.N4,Int,1260,2,1,DBW1260,.DB_IOT.STATO_OPERATIVO (Semaforo) +SECT1.N5,Int,1262,2,1,DBW1262,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" +SECT1.N6,DInt,1264,4,1,DBD1264,.DB_IOT.ALARM_STOP_NO +SECT1.N7.V1,DInt,1268,4,2,DBD1268,PIECES_TOT +SECT1.N7.V2,DInt,1272,4,2,DBD1272,PIECES_OK +SECT1.N7.V3,DInt,1276,4,2,DBD1276,PIECES_KO_1 +SECT1.N7.V4,DInt,1280,4,2,DBD1280,PIECES_KO_2 +SECT1.N7.V5,DInt,1284,4,2,DBD1284,PIECES_KO_3 +SECT1.N7.V6,DInt,1288,4,2,DBD1288,PIECES_KO_4 +SECT1.N7.V7,DInt,1292,4,2,DBD1292,PIECES_KO_5 +SECT1.N7.V8,DInt,1296,4,2,DBD1296,PIECES_KO_6 +SECT1.N7.V9,DInt,1300,4,2,DBD1300,PIECES_KO_7 +SECT1.N7.V10,DInt,1304,4,2,DBD1304,PIECES_KO_8 +SECT1.N7.V11,DInt,1308,4,2,DBD1308,PIECES_KO_9 +SECT1.N7.V12,DInt,1312,4,2,DBD1312,PIECES_KO_10 +SECT1.N7.V13,DInt,1316,4,2,DBD1316,T_ALARM_HOURS +SECT1.N7.V14,DInt,1320,4,2,DBD1320,T_DRY_CYCLE_HOURS +SECT1.N7.V15,DInt,1324,4,2,DBD1324,T_POWERED_HOURS +SECT1.N7.V16,DInt,1328,4,2,DBD1328,T_PRODUCT_100_HOURS +SECT1.N7.V17,DInt,1332,4,2,DBD1332,T_PRODUCT_0_HOURS +SECT1.N7.V18,DInt,1336,4,2,DBD1336,T_STOP_HOURS +SECT1.N7.V19,Int,1340,2,2,DBW1340,T_ALARM_MINUTES +SECT1.N7.V20,Int,1342,2,2,DBW1342,T_DRY_CYCLE_MINUTES +SECT1.N7.V21,Int,1344,2,2,DBW1344,T_POWERED_MINUTES +SECT1.N7.V22,Int,1346,2,2,DBW1346,T_PRODUCT_100_MINUTES +SECT1.N7.V23,Int,1348,2,2,DBW1348,T_PRODUCT_0_MINUTES +SECT1.N7.V24,Int,1350,2,2,DBW1350,T_STOP_MINUTES +SECT2,"""UDT SIPA SV Section""",1352,-1,0,DBX1352.0, +SECT2.N1,DInt,1352,4,1,DBD1352,.DB_IOT.STATO_MACCHINA +SECT2.N2,DInt,1356,4,1,DBD1356,.DB_IOT.ALLARME_FERMO +SECT2.N3,DInt,1360,4,1,DBD1360,.DB_IOT.WARNING_ATTIVO (che compromette produzione) +SECT2.N4,Int,1364,2,1,DBW1364,.DB_IOT.STATO_OPERATIVO (Semaforo) +SECT2.N5,Int,1366,2,1,DBW1366,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" +SECT2.N6,DInt,1368,4,1,DBD1368,.DB_IOT.ALARM_STOP_NO +SECT2.N7.V1,DInt,1372,4,2,DBD1372,PIECES_TOT +SECT2.N7.V2,DInt,1376,4,2,DBD1376,PIECES_OK +SECT2.N7.V3,DInt,1380,4,2,DBD1380,PIECES_KO_1 +SECT2.N7.V4,DInt,1384,4,2,DBD1384,PIECES_KO_2 +SECT2.N7.V5,DInt,1388,4,2,DBD1388,PIECES_KO_3 +SECT2.N7.V6,DInt,1392,4,2,DBD1392,PIECES_KO_4 +SECT2.N7.V7,DInt,1396,4,2,DBD1396,PIECES_KO_5 +SECT2.N7.V8,DInt,1400,4,2,DBD1400,PIECES_KO_6 +SECT2.N7.V9,DInt,1404,4,2,DBD1404,PIECES_KO_7 +SECT2.N7.V10,DInt,1408,4,2,DBD1408,PIECES_KO_8 +SECT2.N7.V11,DInt,1412,4,2,DBD1412,PIECES_KO_9 +SECT2.N7.V12,DInt,1416,4,2,DBD1416,PIECES_KO_10 +SECT2.N7.V13,DInt,1420,4,2,DBD1420,T_ALARM_HOURS +SECT2.N7.V14,DInt,1424,4,2,DBD1424,T_DRY_CYCLE_HOURS +SECT2.N7.V15,DInt,1428,4,2,DBD1428,T_POWERED_HOURS +SECT2.N7.V16,DInt,1432,4,2,DBD1432,T_PRODUCT_100_HOURS +SECT2.N7.V17,DInt,1436,4,2,DBD1436,T_PRODUCT_0_HOURS +SECT2.N7.V18,DInt,1440,4,2,DBD1440,T_STOP_HOURS +SECT2.N7.V19,Int,1444,2,2,DBW1444,T_ALARM_MINUTES +SECT2.N7.V20,Int,1446,2,2,DBW1446,T_DRY_CYCLE_MINUTES +SECT2.N7.V21,Int,1448,2,2,DBW1448,T_POWERED_MINUTES +SECT2.N7.V22,Int,1450,2,2,DBW1450,T_PRODUCT_100_MINUTES +SECT2.N7.V23,Int,1452,2,2,DBW1452,T_PRODUCT_0_MINUTES +SECT2.N7.V24,Int,1454,2,2,DBW1454,T_STOP_MINUTES +SECT3,"""UDT SIPA SV Section""",1456,-1,0,DBX1456.0, +SECT3.N1,DInt,1456,4,1,DBD1456,.DB_IOT.STATO_MACCHINA +SECT3.N2,DInt,1460,4,1,DBD1460,.DB_IOT.ALLARME_FERMO +SECT3.N3,DInt,1464,4,1,DBD1464,.DB_IOT.WARNING_ATTIVO (che compromette produzione) +SECT3.N4,Int,1468,2,1,DBW1468,.DB_IOT.STATO_OPERATIVO (Semaforo) +SECT3.N5,Int,1470,2,1,DBW1470,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" +SECT3.N6,DInt,1472,4,1,DBD1472,.DB_IOT.ALARM_STOP_NO +SECT3.N7.V1,DInt,1476,4,2,DBD1476,PIECES_TOT +SECT3.N7.V2,DInt,1480,4,2,DBD1480,PIECES_OK +SECT3.N7.V3,DInt,1484,4,2,DBD1484,PIECES_KO_1 +SECT3.N7.V4,DInt,1488,4,2,DBD1488,PIECES_KO_2 +SECT3.N7.V5,DInt,1492,4,2,DBD1492,PIECES_KO_3 +SECT3.N7.V6,DInt,1496,4,2,DBD1496,PIECES_KO_4 +SECT3.N7.V7,DInt,1500,4,2,DBD1500,PIECES_KO_5 +SECT3.N7.V8,DInt,1504,4,2,DBD1504,PIECES_KO_6 +SECT3.N7.V9,DInt,1508,4,2,DBD1508,PIECES_KO_7 +SECT3.N7.V10,DInt,1512,4,2,DBD1512,PIECES_KO_8 +SECT3.N7.V11,DInt,1516,4,2,DBD1516,PIECES_KO_9 +SECT3.N7.V12,DInt,1520,4,2,DBD1520,PIECES_KO_10 +SECT3.N7.V13,DInt,1524,4,2,DBD1524,T_ALARM_HOURS +SECT3.N7.V14,DInt,1528,4,2,DBD1528,T_DRY_CYCLE_HOURS +SECT3.N7.V15,DInt,1532,4,2,DBD1532,T_POWERED_HOURS +SECT3.N7.V16,DInt,1536,4,2,DBD1536,T_PRODUCT_100_HOURS +SECT3.N7.V17,DInt,1540,4,2,DBD1540,T_PRODUCT_0_HOURS +SECT3.N7.V18,DInt,1544,4,2,DBD1544,T_STOP_HOURS +SECT3.N7.V19,Int,1548,2,2,DBW1548,T_ALARM_MINUTES +SECT3.N7.V20,Int,1550,2,2,DBW1550,T_DRY_CYCLE_MINUTES +SECT3.N7.V21,Int,1552,2,2,DBW1552,T_POWERED_MINUTES +SECT3.N7.V22,Int,1554,2,2,DBW1554,T_PRODUCT_100_MINUTES +SECT3.N7.V23,Int,1556,2,2,DBW1556,T_PRODUCT_0_MINUTES +SECT3.N7.V24,Int,1558,2,2,DBW1558,T_STOP_MINUTES +SECT4,"""UDT SIPA SV Section""",1560,-1,0,DBX1560.0, +SECT4.N1,DInt,1560,4,1,DBD1560,.DB_IOT.STATO_MACCHINA +SECT4.N2,DInt,1564,4,1,DBD1564,.DB_IOT.ALLARME_FERMO +SECT4.N3,DInt,1568,4,1,DBD1568,.DB_IOT.WARNING_ATTIVO (che compromette produzione) +SECT4.N4,Int,1572,2,1,DBW1572,.DB_IOT.STATO_OPERATIVO (Semaforo) +SECT4.N5,Int,1574,2,1,DBW1574,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" +SECT4.N6,DInt,1576,4,1,DBD1576,.DB_IOT.ALARM_STOP_NO +SECT4.N7.V1,DInt,1580,4,2,DBD1580,PIECES_TOT +SECT4.N7.V2,DInt,1584,4,2,DBD1584,PIECES_OK +SECT4.N7.V3,DInt,1588,4,2,DBD1588,PIECES_KO_1 +SECT4.N7.V4,DInt,1592,4,2,DBD1592,PIECES_KO_2 +SECT4.N7.V5,DInt,1596,4,2,DBD1596,PIECES_KO_3 +SECT4.N7.V6,DInt,1600,4,2,DBD1600,PIECES_KO_4 +SECT4.N7.V7,DInt,1604,4,2,DBD1604,PIECES_KO_5 +SECT4.N7.V8,DInt,1608,4,2,DBD1608,PIECES_KO_6 +SECT4.N7.V9,DInt,1612,4,2,DBD1612,PIECES_KO_7 +SECT4.N7.V10,DInt,1616,4,2,DBD1616,PIECES_KO_8 +SECT4.N7.V11,DInt,1620,4,2,DBD1620,PIECES_KO_9 +SECT4.N7.V12,DInt,1624,4,2,DBD1624,PIECES_KO_10 +SECT4.N7.V13,DInt,1628,4,2,DBD1628,T_ALARM_HOURS +SECT4.N7.V14,DInt,1632,4,2,DBD1632,T_DRY_CYCLE_HOURS +SECT4.N7.V15,DInt,1636,4,2,DBD1636,T_POWERED_HOURS +SECT4.N7.V16,DInt,1640,4,2,DBD1640,T_PRODUCT_100_HOURS +SECT4.N7.V17,DInt,1644,4,2,DBD1644,T_PRODUCT_0_HOURS +SECT4.N7.V18,DInt,1648,4,2,DBD1648,T_STOP_HOURS +SECT4.N7.V19,Int,1652,2,2,DBW1652,T_ALARM_MINUTES +SECT4.N7.V20,Int,1654,2,2,DBW1654,T_DRY_CYCLE_MINUTES +SECT4.N7.V21,Int,1656,2,2,DBW1656,T_POWERED_MINUTES +SECT4.N7.V22,Int,1658,2,2,DBW1658,T_PRODUCT_100_MINUTES +SECT4.N7.V23,Int,1660,2,2,DBW1660,T_PRODUCT_0_MINUTES +SECT4.N7.V24,Int,1662,2,2,DBW1662,T_STOP_MINUTES +SECT5,"""UDT SIPA SV Section""",1664,-1,0,DBX1664.0, +SECT5.N1,DInt,1664,4,1,DBD1664,.DB_IOT.STATO_MACCHINA +SECT5.N2,DInt,1668,4,1,DBD1668,.DB_IOT.ALLARME_FERMO +SECT5.N3,DInt,1672,4,1,DBD1672,.DB_IOT.WARNING_ATTIVO (che compromette produzione) +SECT5.N4,Int,1676,2,1,DBW1676,.DB_IOT.STATO_OPERATIVO (Semaforo) +SECT5.N5,Int,1678,2,1,DBW1678,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" +SECT5.N6,DInt,1680,4,1,DBD1680,.DB_IOT.ALARM_STOP_NO +SECT5.N7.V1,DInt,1684,4,2,DBD1684,PIECES_TOT +SECT5.N7.V2,DInt,1688,4,2,DBD1688,PIECES_OK +SECT5.N7.V3,DInt,1692,4,2,DBD1692,PIECES_KO_1 +SECT5.N7.V4,DInt,1696,4,2,DBD1696,PIECES_KO_2 +SECT5.N7.V5,DInt,1700,4,2,DBD1700,PIECES_KO_3 +SECT5.N7.V6,DInt,1704,4,2,DBD1704,PIECES_KO_4 +SECT5.N7.V7,DInt,1708,4,2,DBD1708,PIECES_KO_5 +SECT5.N7.V8,DInt,1712,4,2,DBD1712,PIECES_KO_6 +SECT5.N7.V9,DInt,1716,4,2,DBD1716,PIECES_KO_7 +SECT5.N7.V10,DInt,1720,4,2,DBD1720,PIECES_KO_8 +SECT5.N7.V11,DInt,1724,4,2,DBD1724,PIECES_KO_9 +SECT5.N7.V12,DInt,1728,4,2,DBD1728,PIECES_KO_10 +SECT5.N7.V13,DInt,1732,4,2,DBD1732,T_ALARM_HOURS +SECT5.N7.V14,DInt,1736,4,2,DBD1736,T_DRY_CYCLE_HOURS +SECT5.N7.V15,DInt,1740,4,2,DBD1740,T_POWERED_HOURS +SECT5.N7.V16,DInt,1744,4,2,DBD1744,T_PRODUCT_100_HOURS +SECT5.N7.V17,DInt,1748,4,2,DBD1748,T_PRODUCT_0_HOURS +SECT5.N7.V18,DInt,1752,4,2,DBD1752,T_STOP_HOURS +SECT5.N7.V19,Int,1756,2,2,DBW1756,T_ALARM_MINUTES +SECT5.N7.V20,Int,1758,2,2,DBW1758,T_DRY_CYCLE_MINUTES +SECT5.N7.V21,Int,1760,2,2,DBW1760,T_POWERED_MINUTES +SECT5.N7.V22,Int,1762,2,2,DBW1762,T_PRODUCT_100_MINUTES +SECT5.N7.V23,Int,1764,2,2,DBW1764,T_PRODUCT_0_MINUTES +SECT5.N7.V24,Int,1766,2,2,DBW1766,T_STOP_MINUTES diff --git a/DB SIPA Supervision/DB SIPA Supervision.json b/DB SIPA Supervision/DB SIPA Supervision.json new file mode 100644 index 0000000..71e1272 --- /dev/null +++ b/DB SIPA Supervision/DB SIPA Supervision.json @@ -0,0 +1,768 @@ +{ + "DB SIPA Supervision": { + "Struct": { + "MAIN": { + "type": "\"UDT SIPA SV Main\"", + "comment": "", + "is_udt_definition": true, + "fields": { + "Struct": { + "N1": { + "type": "DInt", + "comment": ".DB_IOT.USERLEVEL" + }, + "N2": { + "type": "String[81]", + "comment": ".DB_IOT.USERNAME" + }, + "N3": { + "type": "String[81]", + "comment": ".DB_IOT.NOME_RICETTA" + }, + "N4": { + "type": "Int", + "comment": ".DB_IOT.NEXT_MAINT_CYCLES" + }, + "N5": { + "V1": { + "type": "String[254]", + "comment": "" + }, + "V2": { + "type": "String[254]", + "comment": "" + }, + "V3": { + "type": "String[254]", + "comment": "" + }, + "V4": { + "type": "String[254]", + "comment": "" + }, + "V5": { + "type": "String[8]", + "comment": "" + } + }, + "N6": { + "type": "Array[1..3] of Real", + "comment": ".DB_IOT.ELECTRIC_VOLTAGE_PHASE_D", + "array_definition": true, + "Array": { + "[1]": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_VOLTAGE_PHASE_D", + "is_array_element": true + }, + "[2]": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_VOLTAGE_PHASE_D", + "is_array_element": true + }, + "[3]": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_VOLTAGE_PHASE_D", + "is_array_element": true + } + } + }, + "N7": { + "type": "Array[1..3] of Real", + "comment": ".DB_IOT.ELECTRIC_CURRENT_PHASE_D", + "array_definition": true, + "Array": { + "[1]": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_CURRENT_PHASE_D", + "is_array_element": true + }, + "[2]": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_CURRENT_PHASE_D", + "is_array_element": true + }, + "[3]": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_CURRENT_PHASE_D", + "is_array_element": true + } + } + }, + "N8": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_POWER_D" + }, + "N9": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_POWER_FACTOR_D" + }, + "N10": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_POWER_HOUR_D" + }, + "N11": { + "type": "Real", + "comment": ".DB_IOT.ELECTRIC_POWER_WH" + } + } + } + }, + "SECT1": { + "type": "\"UDT SIPA SV Section\"", + "comment": "", + "is_udt_definition": true, + "fields": { + "Struct": { + "N1": { + "type": "DInt", + "comment": ".DB_IOT.STATO_MACCHINA" + }, + "N2": { + "type": "DInt", + "comment": ".DB_IOT.ALLARME_FERMO" + }, + "N3": { + "type": "DInt", + "comment": ".DB_IOT.WARNING_ATTIVO (che compromette produzione)" + }, + "N4": { + "type": "Int", + "comment": ".DB_IOT.STATO_OPERATIVO (Semaforo)" + }, + "N5": { + "type": "Int", + "comment": ".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" + }, + "N6": { + "type": "DInt", + "comment": ".DB_IOT.ALARM_STOP_NO" + }, + "N7": { + "V1": { + "type": "DInt", + "comment": "PIECES_TOT" + }, + "V2": { + "type": "DInt", + "comment": "PIECES_OK" + }, + "V3": { + "type": "DInt", + "comment": "PIECES_KO_1" + }, + "V4": { + "type": "DInt", + "comment": "PIECES_KO_2" + }, + "V5": { + "type": "DInt", + "comment": "PIECES_KO_3" + }, + "V6": { + "type": "DInt", + "comment": "PIECES_KO_4" + }, + "V7": { + "type": "DInt", + "comment": "PIECES_KO_5" + }, + "V8": { + "type": "DInt", + "comment": "PIECES_KO_6" + }, + "V9": { + "type": "DInt", + "comment": "PIECES_KO_7" + }, + "V10": { + "type": "DInt", + "comment": "PIECES_KO_8" + }, + "V11": { + "type": "DInt", + "comment": "PIECES_KO_9" + }, + "V12": { + "type": "DInt", + "comment": "PIECES_KO_10" + }, + "V13": { + "type": "DInt", + "comment": "T_ALARM_HOURS" + }, + "V14": { + "type": "DInt", + "comment": "T_DRY_CYCLE_HOURS" + }, + "V15": { + "type": "DInt", + "comment": "T_POWERED_HOURS" + }, + "V16": { + "type": "DInt", + "comment": "T_PRODUCT_100_HOURS" + }, + "V17": { + "type": "DInt", + "comment": "T_PRODUCT_0_HOURS" + }, + "V18": { + "type": "DInt", + "comment": "T_STOP_HOURS" + }, + "V19": { + "type": "Int", + "comment": "T_ALARM_MINUTES" + }, + "V20": { + "type": "Int", + "comment": "T_DRY_CYCLE_MINUTES" + }, + "V21": { + "type": "Int", + "comment": "T_POWERED_MINUTES" + }, + "V22": { + "type": "Int", + "comment": "T_PRODUCT_100_MINUTES" + }, + "V23": { + "type": "Int", + "comment": "T_PRODUCT_0_MINUTES" + }, + "V24": { + "type": "Int", + "comment": "T_STOP_MINUTES" + } + } + } + } + }, + "SECT2": { + "type": "\"UDT SIPA SV Section\"", + "comment": "", + "is_udt_definition": true, + "fields": { + "Struct": { + "N1": { + "type": "DInt", + "comment": ".DB_IOT.STATO_MACCHINA" + }, + "N2": { + "type": "DInt", + "comment": ".DB_IOT.ALLARME_FERMO" + }, + "N3": { + "type": "DInt", + "comment": ".DB_IOT.WARNING_ATTIVO (che compromette produzione)" + }, + "N4": { + "type": "Int", + "comment": ".DB_IOT.STATO_OPERATIVO (Semaforo)" + }, + "N5": { + "type": "Int", + "comment": ".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" + }, + "N6": { + "type": "DInt", + "comment": ".DB_IOT.ALARM_STOP_NO" + }, + "N7": { + "V1": { + "type": "DInt", + "comment": "PIECES_TOT" + }, + "V2": { + "type": "DInt", + "comment": "PIECES_OK" + }, + "V3": { + "type": "DInt", + "comment": "PIECES_KO_1" + }, + "V4": { + "type": "DInt", + "comment": "PIECES_KO_2" + }, + "V5": { + "type": "DInt", + "comment": "PIECES_KO_3" + }, + "V6": { + "type": "DInt", + "comment": "PIECES_KO_4" + }, + "V7": { + "type": "DInt", + "comment": "PIECES_KO_5" + }, + "V8": { + "type": "DInt", + "comment": "PIECES_KO_6" + }, + "V9": { + "type": "DInt", + "comment": "PIECES_KO_7" + }, + "V10": { + "type": "DInt", + "comment": "PIECES_KO_8" + }, + "V11": { + "type": "DInt", + "comment": "PIECES_KO_9" + }, + "V12": { + "type": "DInt", + "comment": "PIECES_KO_10" + }, + "V13": { + "type": "DInt", + "comment": "T_ALARM_HOURS" + }, + "V14": { + "type": "DInt", + "comment": "T_DRY_CYCLE_HOURS" + }, + "V15": { + "type": "DInt", + "comment": "T_POWERED_HOURS" + }, + "V16": { + "type": "DInt", + "comment": "T_PRODUCT_100_HOURS" + }, + "V17": { + "type": "DInt", + "comment": "T_PRODUCT_0_HOURS" + }, + "V18": { + "type": "DInt", + "comment": "T_STOP_HOURS" + }, + "V19": { + "type": "Int", + "comment": "T_ALARM_MINUTES" + }, + "V20": { + "type": "Int", + "comment": "T_DRY_CYCLE_MINUTES" + }, + "V21": { + "type": "Int", + "comment": "T_POWERED_MINUTES" + }, + "V22": { + "type": "Int", + "comment": "T_PRODUCT_100_MINUTES" + }, + "V23": { + "type": "Int", + "comment": "T_PRODUCT_0_MINUTES" + }, + "V24": { + "type": "Int", + "comment": "T_STOP_MINUTES" + } + } + } + } + }, + "SECT3": { + "type": "\"UDT SIPA SV Section\"", + "comment": "", + "is_udt_definition": true, + "fields": { + "Struct": { + "N1": { + "type": "DInt", + "comment": ".DB_IOT.STATO_MACCHINA" + }, + "N2": { + "type": "DInt", + "comment": ".DB_IOT.ALLARME_FERMO" + }, + "N3": { + "type": "DInt", + "comment": ".DB_IOT.WARNING_ATTIVO (che compromette produzione)" + }, + "N4": { + "type": "Int", + "comment": ".DB_IOT.STATO_OPERATIVO (Semaforo)" + }, + "N5": { + "type": "Int", + "comment": ".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" + }, + "N6": { + "type": "DInt", + "comment": ".DB_IOT.ALARM_STOP_NO" + }, + "N7": { + "V1": { + "type": "DInt", + "comment": "PIECES_TOT" + }, + "V2": { + "type": "DInt", + "comment": "PIECES_OK" + }, + "V3": { + "type": "DInt", + "comment": "PIECES_KO_1" + }, + "V4": { + "type": "DInt", + "comment": "PIECES_KO_2" + }, + "V5": { + "type": "DInt", + "comment": "PIECES_KO_3" + }, + "V6": { + "type": "DInt", + "comment": "PIECES_KO_4" + }, + "V7": { + "type": "DInt", + "comment": "PIECES_KO_5" + }, + "V8": { + "type": "DInt", + "comment": "PIECES_KO_6" + }, + "V9": { + "type": "DInt", + "comment": "PIECES_KO_7" + }, + "V10": { + "type": "DInt", + "comment": "PIECES_KO_8" + }, + "V11": { + "type": "DInt", + "comment": "PIECES_KO_9" + }, + "V12": { + "type": "DInt", + "comment": "PIECES_KO_10" + }, + "V13": { + "type": "DInt", + "comment": "T_ALARM_HOURS" + }, + "V14": { + "type": "DInt", + "comment": "T_DRY_CYCLE_HOURS" + }, + "V15": { + "type": "DInt", + "comment": "T_POWERED_HOURS" + }, + "V16": { + "type": "DInt", + "comment": "T_PRODUCT_100_HOURS" + }, + "V17": { + "type": "DInt", + "comment": "T_PRODUCT_0_HOURS" + }, + "V18": { + "type": "DInt", + "comment": "T_STOP_HOURS" + }, + "V19": { + "type": "Int", + "comment": "T_ALARM_MINUTES" + }, + "V20": { + "type": "Int", + "comment": "T_DRY_CYCLE_MINUTES" + }, + "V21": { + "type": "Int", + "comment": "T_POWERED_MINUTES" + }, + "V22": { + "type": "Int", + "comment": "T_PRODUCT_100_MINUTES" + }, + "V23": { + "type": "Int", + "comment": "T_PRODUCT_0_MINUTES" + }, + "V24": { + "type": "Int", + "comment": "T_STOP_MINUTES" + } + } + } + } + }, + "SECT4": { + "type": "\"UDT SIPA SV Section\"", + "comment": "", + "is_udt_definition": true, + "fields": { + "Struct": { + "N1": { + "type": "DInt", + "comment": ".DB_IOT.STATO_MACCHINA" + }, + "N2": { + "type": "DInt", + "comment": ".DB_IOT.ALLARME_FERMO" + }, + "N3": { + "type": "DInt", + "comment": ".DB_IOT.WARNING_ATTIVO (che compromette produzione)" + }, + "N4": { + "type": "Int", + "comment": ".DB_IOT.STATO_OPERATIVO (Semaforo)" + }, + "N5": { + "type": "Int", + "comment": ".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" + }, + "N6": { + "type": "DInt", + "comment": ".DB_IOT.ALARM_STOP_NO" + }, + "N7": { + "V1": { + "type": "DInt", + "comment": "PIECES_TOT" + }, + "V2": { + "type": "DInt", + "comment": "PIECES_OK" + }, + "V3": { + "type": "DInt", + "comment": "PIECES_KO_1" + }, + "V4": { + "type": "DInt", + "comment": "PIECES_KO_2" + }, + "V5": { + "type": "DInt", + "comment": "PIECES_KO_3" + }, + "V6": { + "type": "DInt", + "comment": "PIECES_KO_4" + }, + "V7": { + "type": "DInt", + "comment": "PIECES_KO_5" + }, + "V8": { + "type": "DInt", + "comment": "PIECES_KO_6" + }, + "V9": { + "type": "DInt", + "comment": "PIECES_KO_7" + }, + "V10": { + "type": "DInt", + "comment": "PIECES_KO_8" + }, + "V11": { + "type": "DInt", + "comment": "PIECES_KO_9" + }, + "V12": { + "type": "DInt", + "comment": "PIECES_KO_10" + }, + "V13": { + "type": "DInt", + "comment": "T_ALARM_HOURS" + }, + "V14": { + "type": "DInt", + "comment": "T_DRY_CYCLE_HOURS" + }, + "V15": { + "type": "DInt", + "comment": "T_POWERED_HOURS" + }, + "V16": { + "type": "DInt", + "comment": "T_PRODUCT_100_HOURS" + }, + "V17": { + "type": "DInt", + "comment": "T_PRODUCT_0_HOURS" + }, + "V18": { + "type": "DInt", + "comment": "T_STOP_HOURS" + }, + "V19": { + "type": "Int", + "comment": "T_ALARM_MINUTES" + }, + "V20": { + "type": "Int", + "comment": "T_DRY_CYCLE_MINUTES" + }, + "V21": { + "type": "Int", + "comment": "T_POWERED_MINUTES" + }, + "V22": { + "type": "Int", + "comment": "T_PRODUCT_100_MINUTES" + }, + "V23": { + "type": "Int", + "comment": "T_PRODUCT_0_MINUTES" + }, + "V24": { + "type": "Int", + "comment": "T_STOP_MINUTES" + } + } + } + } + }, + "SECT5": { + "type": "\"UDT SIPA SV Section\"", + "comment": "", + "is_udt_definition": true, + "fields": { + "Struct": { + "N1": { + "type": "DInt", + "comment": ".DB_IOT.STATO_MACCHINA" + }, + "N2": { + "type": "DInt", + "comment": ".DB_IOT.ALLARME_FERMO" + }, + "N3": { + "type": "DInt", + "comment": ".DB_IOT.WARNING_ATTIVO (che compromette produzione)" + }, + "N4": { + "type": "Int", + "comment": ".DB_IOT.STATO_OPERATIVO (Semaforo)" + }, + "N5": { + "type": "Int", + "comment": ".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)" + }, + "N6": { + "type": "DInt", + "comment": ".DB_IOT.ALARM_STOP_NO" + }, + "N7": { + "V1": { + "type": "DInt", + "comment": "PIECES_TOT" + }, + "V2": { + "type": "DInt", + "comment": "PIECES_OK" + }, + "V3": { + "type": "DInt", + "comment": "PIECES_KO_1" + }, + "V4": { + "type": "DInt", + "comment": "PIECES_KO_2" + }, + "V5": { + "type": "DInt", + "comment": "PIECES_KO_3" + }, + "V6": { + "type": "DInt", + "comment": "PIECES_KO_4" + }, + "V7": { + "type": "DInt", + "comment": "PIECES_KO_5" + }, + "V8": { + "type": "DInt", + "comment": "PIECES_KO_6" + }, + "V9": { + "type": "DInt", + "comment": "PIECES_KO_7" + }, + "V10": { + "type": "DInt", + "comment": "PIECES_KO_8" + }, + "V11": { + "type": "DInt", + "comment": "PIECES_KO_9" + }, + "V12": { + "type": "DInt", + "comment": "PIECES_KO_10" + }, + "V13": { + "type": "DInt", + "comment": "T_ALARM_HOURS" + }, + "V14": { + "type": "DInt", + "comment": "T_DRY_CYCLE_HOURS" + }, + "V15": { + "type": "DInt", + "comment": "T_POWERED_HOURS" + }, + "V16": { + "type": "DInt", + "comment": "T_PRODUCT_100_HOURS" + }, + "V17": { + "type": "DInt", + "comment": "T_PRODUCT_0_HOURS" + }, + "V18": { + "type": "DInt", + "comment": "T_STOP_HOURS" + }, + "V19": { + "type": "Int", + "comment": "T_ALARM_MINUTES" + }, + "V20": { + "type": "Int", + "comment": "T_DRY_CYCLE_MINUTES" + }, + "V21": { + "type": "Int", + "comment": "T_POWERED_MINUTES" + }, + "V22": { + "type": "Int", + "comment": "T_PRODUCT_100_MINUTES" + }, + "V23": { + "type": "Int", + "comment": "T_PRODUCT_0_MINUTES" + }, + "V24": { + "type": "Int", + "comment": "T_STOP_MINUTES" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/DB SIPA Supervision/DB SIPA Supervision.xlsx b/DB SIPA Supervision/DB SIPA Supervision.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..567bd37412312794a746de67835b18b490510337 GIT binary patch literal 11809 zcmZ{q1z1$w+V>F&73omAJB1mL?(XhTy1S$Vq?;iJ31L9#ZUGUL?k=Sp=|=eW;Caq@ zkKg;kH8a<+|Lcym?)$gb#a=4%50UT?5D*?AyjDupkqi$z$wSC`Rpl5;FutA#Zq+PwBBByJ+VXpT*sOxo z6LeRuEQO9N?zcKMjT*cBl9lato>u%-o)T3%0u5hfS51EmTUeOTo1~j)=|?i;USH5RbVD2fgu?&h+WAXu-*Tv--vlXW{SOF@&Sx@L)XpG%jb*TdvCx zM0Lu3a7EqY#r4BtP7<${mnQ4**gxQcbmJ)b8e2R}LZ)}6Zq1-XH@s7beB`B-em&}M zG*&d(kQHnT0XlnIDVV$YP6sC2iXwhuI7Lp}8l8jw2eqC8dwKG@%Fo@nI2|o7o?&ZM z-~|feTs*pv>MxtJQRM#$s#A%kHu13)C=e12PRg$ZTmCRTz-LZ(xKJRuNSDZ@>WHON zx}vtM>OG|xm0RuNC??blmj}>#fSa$ z**m453k@~Zi^fBj<;!ncjOsU7F3b^juT2W8gWRuKKXPpp1|Ick{#bx&yY_j-1ehYX zjcmDnj=^cI>}+Pf&??<>n3DJMj5yai-M8~>9>DpbznsB*aho4gp#R-6Cw|1MDoAOi zF}xpmQ!1<*fnQZ&u zK}@&=PY?F&2KKZCmPqKb9bPcj7!ESV18amc4IRWE?_XJbb(fj(_Cx|9;2vzB7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P6YQB-p#S&4 zzp?qBfmjUxj{F~p{yq5bKL5|)_l)<0|BtT!+s@yu^dCEcOb7`7OJk|XBcs4YkAYty L0QdvU@NfSQeYh3~ literal 0 HcmV?d00001 diff --git a/DB SIPA Supervision/DB SIPA Supervision.xml b/DB SIPA Supervision/DB SIPA Supervision.xml new file mode 100644 index 0000000..c4dfafc --- /dev/null +++ b/DB SIPA Supervision/DB SIPA Supervision.xml @@ -0,0 +1,1300 @@ + + + + +
+ "UDT SIPA SV Main" + + true + + + + DInt + .DB_IOT.USERLEVEL + 0 + DBD0 + 4 + + + String[81] + .DB_IOT.USERNAME + 4 + DBX4.0 + 83 + + + String[81] + .DB_IOT.NOME_RICETTA + 88 + DBX88.0 + 83 + + + Int + .DB_IOT.NEXT_MAINT_CYCLES + 172 + DBW172 + 2 + + + + String[254] + + 174 + DBX174.0 + 256 + + + String[254] + + 430 + DBX430.0 + 256 + + + String[254] + + 686 + DBX686.0 + 256 + + + String[254] + + 942 + DBX942.0 + 256 + + + String[8] + + 1198 + DBX1198.0 + 10 + + + + Array[1..3] of Real + .DB_IOT.ELECTRIC_VOLTAGE_PHASE_D + true + + <[1]> + Real + .DB_IOT.ELECTRIC_VOLTAGE_PHASE_D + true + 1208 + DBD1208 + 4 + + <[2]> + Real + .DB_IOT.ELECTRIC_VOLTAGE_PHASE_D + true + 1212 + DBD1212 + 4 + + <[3]> + Real + .DB_IOT.ELECTRIC_VOLTAGE_PHASE_D + true + 1216 + DBD1216 + 4 + + + 1208 + DBX1208.0 + 0 + + + Array[1..3] of Real + .DB_IOT.ELECTRIC_CURRENT_PHASE_D + true + + <[1]> + Real + .DB_IOT.ELECTRIC_CURRENT_PHASE_D + true + 1220 + DBD1220 + 4 + + <[2]> + Real + .DB_IOT.ELECTRIC_CURRENT_PHASE_D + true + 1224 + DBD1224 + 4 + + <[3]> + Real + .DB_IOT.ELECTRIC_CURRENT_PHASE_D + true + 1228 + DBD1228 + 4 + + + 1220 + DBX1220.0 + 0 + + + Real + .DB_IOT.ELECTRIC_POWER_D + 1232 + DBD1232 + 4 + + + Real + .DB_IOT.ELECTRIC_POWER_FACTOR_D + 1236 + DBD1236 + 4 + + + Real + .DB_IOT.ELECTRIC_POWER_HOUR_D + 1240 + DBD1240 + 4 + + + Real + .DB_IOT.ELECTRIC_POWER_WH + 1244 + DBD1244 + 4 + + + + 0 + DBX0.0 + -1 +
+ + "UDT SIPA SV Section" + + true + + + + DInt + .DB_IOT.STATO_MACCHINA + 1248 + DBD1248 + 4 + + + DInt + .DB_IOT.ALLARME_FERMO + 1252 + DBD1252 + 4 + + + DInt + .DB_IOT.WARNING_ATTIVO (che compromette produzione) + 1256 + DBD1256 + 4 + + + Int + .DB_IOT.STATO_OPERATIVO (Semaforo) + 1260 + DBW1260 + 2 + + + Int + .DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc) + 1262 + DBW1262 + 2 + + + DInt + .DB_IOT.ALARM_STOP_NO + 1264 + DBD1264 + 4 + + + + DInt + PIECES_TOT + 1268 + DBD1268 + 4 + + + DInt + PIECES_OK + 1272 + DBD1272 + 4 + + + DInt + PIECES_KO_1 + 1276 + DBD1276 + 4 + + + DInt + PIECES_KO_2 + 1280 + DBD1280 + 4 + + + DInt + PIECES_KO_3 + 1284 + DBD1284 + 4 + + + DInt + PIECES_KO_4 + 1288 + DBD1288 + 4 + + + DInt + PIECES_KO_5 + 1292 + DBD1292 + 4 + + + DInt + PIECES_KO_6 + 1296 + DBD1296 + 4 + + + DInt + PIECES_KO_7 + 1300 + DBD1300 + 4 + + + DInt + PIECES_KO_8 + 1304 + DBD1304 + 4 + + + DInt + PIECES_KO_9 + 1308 + DBD1308 + 4 + + + DInt + PIECES_KO_10 + 1312 + DBD1312 + 4 + + + DInt + T_ALARM_HOURS + 1316 + DBD1316 + 4 + + + DInt + T_DRY_CYCLE_HOURS + 1320 + DBD1320 + 4 + + + DInt + T_POWERED_HOURS + 1324 + DBD1324 + 4 + + + DInt + T_PRODUCT_100_HOURS + 1328 + DBD1328 + 4 + + + DInt + T_PRODUCT_0_HOURS + 1332 + DBD1332 + 4 + + + DInt + T_STOP_HOURS + 1336 + DBD1336 + 4 + + + Int + T_ALARM_MINUTES + 1340 + DBW1340 + 2 + + + Int + T_DRY_CYCLE_MINUTES + 1342 + DBW1342 + 2 + + + Int + T_POWERED_MINUTES + 1344 + DBW1344 + 2 + + + Int + T_PRODUCT_100_MINUTES + 1346 + DBW1346 + 2 + + + Int + T_PRODUCT_0_MINUTES + 1348 + DBW1348 + 2 + + + Int + T_STOP_MINUTES + 1350 + DBW1350 + 2 + + + + + 1248 + DBX1248.0 + -1 + + + "UDT SIPA SV Section" + + true + + + + DInt + .DB_IOT.STATO_MACCHINA + 1352 + DBD1352 + 4 + + + DInt + .DB_IOT.ALLARME_FERMO + 1356 + DBD1356 + 4 + + + DInt + .DB_IOT.WARNING_ATTIVO (che compromette produzione) + 1360 + DBD1360 + 4 + + + Int + .DB_IOT.STATO_OPERATIVO (Semaforo) + 1364 + DBW1364 + 2 + + + Int + .DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc) + 1366 + DBW1366 + 2 + + + DInt + .DB_IOT.ALARM_STOP_NO + 1368 + DBD1368 + 4 + + + + DInt + PIECES_TOT + 1372 + DBD1372 + 4 + + + DInt + PIECES_OK + 1376 + DBD1376 + 4 + + + DInt + PIECES_KO_1 + 1380 + DBD1380 + 4 + + + DInt + PIECES_KO_2 + 1384 + DBD1384 + 4 + + + DInt + PIECES_KO_3 + 1388 + DBD1388 + 4 + + + DInt + PIECES_KO_4 + 1392 + DBD1392 + 4 + + + DInt + PIECES_KO_5 + 1396 + DBD1396 + 4 + + + DInt + PIECES_KO_6 + 1400 + DBD1400 + 4 + + + DInt + PIECES_KO_7 + 1404 + DBD1404 + 4 + + + DInt + PIECES_KO_8 + 1408 + DBD1408 + 4 + + + DInt + PIECES_KO_9 + 1412 + DBD1412 + 4 + + + DInt + PIECES_KO_10 + 1416 + DBD1416 + 4 + + + DInt + T_ALARM_HOURS + 1420 + DBD1420 + 4 + + + DInt + T_DRY_CYCLE_HOURS + 1424 + DBD1424 + 4 + + + DInt + T_POWERED_HOURS + 1428 + DBD1428 + 4 + + + DInt + T_PRODUCT_100_HOURS + 1432 + DBD1432 + 4 + + + DInt + T_PRODUCT_0_HOURS + 1436 + DBD1436 + 4 + + + DInt + T_STOP_HOURS + 1440 + DBD1440 + 4 + + + Int + T_ALARM_MINUTES + 1444 + DBW1444 + 2 + + + Int + T_DRY_CYCLE_MINUTES + 1446 + DBW1446 + 2 + + + Int + T_POWERED_MINUTES + 1448 + DBW1448 + 2 + + + Int + T_PRODUCT_100_MINUTES + 1450 + DBW1450 + 2 + + + Int + T_PRODUCT_0_MINUTES + 1452 + DBW1452 + 2 + + + Int + T_STOP_MINUTES + 1454 + DBW1454 + 2 + + + + + 1352 + DBX1352.0 + -1 + + + "UDT SIPA SV Section" + + true + + + + DInt + .DB_IOT.STATO_MACCHINA + 1456 + DBD1456 + 4 + + + DInt + .DB_IOT.ALLARME_FERMO + 1460 + DBD1460 + 4 + + + DInt + .DB_IOT.WARNING_ATTIVO (che compromette produzione) + 1464 + DBD1464 + 4 + + + Int + .DB_IOT.STATO_OPERATIVO (Semaforo) + 1468 + DBW1468 + 2 + + + Int + .DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc) + 1470 + DBW1470 + 2 + + + DInt + .DB_IOT.ALARM_STOP_NO + 1472 + DBD1472 + 4 + + + + DInt + PIECES_TOT + 1476 + DBD1476 + 4 + + + DInt + PIECES_OK + 1480 + DBD1480 + 4 + + + DInt + PIECES_KO_1 + 1484 + DBD1484 + 4 + + + DInt + PIECES_KO_2 + 1488 + DBD1488 + 4 + + + DInt + PIECES_KO_3 + 1492 + DBD1492 + 4 + + + DInt + PIECES_KO_4 + 1496 + DBD1496 + 4 + + + DInt + PIECES_KO_5 + 1500 + DBD1500 + 4 + + + DInt + PIECES_KO_6 + 1504 + DBD1504 + 4 + + + DInt + PIECES_KO_7 + 1508 + DBD1508 + 4 + + + DInt + PIECES_KO_8 + 1512 + DBD1512 + 4 + + + DInt + PIECES_KO_9 + 1516 + DBD1516 + 4 + + + DInt + PIECES_KO_10 + 1520 + DBD1520 + 4 + + + DInt + T_ALARM_HOURS + 1524 + DBD1524 + 4 + + + DInt + T_DRY_CYCLE_HOURS + 1528 + DBD1528 + 4 + + + DInt + T_POWERED_HOURS + 1532 + DBD1532 + 4 + + + DInt + T_PRODUCT_100_HOURS + 1536 + DBD1536 + 4 + + + DInt + T_PRODUCT_0_HOURS + 1540 + DBD1540 + 4 + + + DInt + T_STOP_HOURS + 1544 + DBD1544 + 4 + + + Int + T_ALARM_MINUTES + 1548 + DBW1548 + 2 + + + Int + T_DRY_CYCLE_MINUTES + 1550 + DBW1550 + 2 + + + Int + T_POWERED_MINUTES + 1552 + DBW1552 + 2 + + + Int + T_PRODUCT_100_MINUTES + 1554 + DBW1554 + 2 + + + Int + T_PRODUCT_0_MINUTES + 1556 + DBW1556 + 2 + + + Int + T_STOP_MINUTES + 1558 + DBW1558 + 2 + + + + + 1456 + DBX1456.0 + -1 + + + "UDT SIPA SV Section" + + true + + + + DInt + .DB_IOT.STATO_MACCHINA + 1560 + DBD1560 + 4 + + + DInt + .DB_IOT.ALLARME_FERMO + 1564 + DBD1564 + 4 + + + DInt + .DB_IOT.WARNING_ATTIVO (che compromette produzione) + 1568 + DBD1568 + 4 + + + Int + .DB_IOT.STATO_OPERATIVO (Semaforo) + 1572 + DBW1572 + 2 + + + Int + .DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc) + 1574 + DBW1574 + 2 + + + DInt + .DB_IOT.ALARM_STOP_NO + 1576 + DBD1576 + 4 + + + + DInt + PIECES_TOT + 1580 + DBD1580 + 4 + + + DInt + PIECES_OK + 1584 + DBD1584 + 4 + + + DInt + PIECES_KO_1 + 1588 + DBD1588 + 4 + + + DInt + PIECES_KO_2 + 1592 + DBD1592 + 4 + + + DInt + PIECES_KO_3 + 1596 + DBD1596 + 4 + + + DInt + PIECES_KO_4 + 1600 + DBD1600 + 4 + + + DInt + PIECES_KO_5 + 1604 + DBD1604 + 4 + + + DInt + PIECES_KO_6 + 1608 + DBD1608 + 4 + + + DInt + PIECES_KO_7 + 1612 + DBD1612 + 4 + + + DInt + PIECES_KO_8 + 1616 + DBD1616 + 4 + + + DInt + PIECES_KO_9 + 1620 + DBD1620 + 4 + + + DInt + PIECES_KO_10 + 1624 + DBD1624 + 4 + + + DInt + T_ALARM_HOURS + 1628 + DBD1628 + 4 + + + DInt + T_DRY_CYCLE_HOURS + 1632 + DBD1632 + 4 + + + DInt + T_POWERED_HOURS + 1636 + DBD1636 + 4 + + + DInt + T_PRODUCT_100_HOURS + 1640 + DBD1640 + 4 + + + DInt + T_PRODUCT_0_HOURS + 1644 + DBD1644 + 4 + + + DInt + T_STOP_HOURS + 1648 + DBD1648 + 4 + + + Int + T_ALARM_MINUTES + 1652 + DBW1652 + 2 + + + Int + T_DRY_CYCLE_MINUTES + 1654 + DBW1654 + 2 + + + Int + T_POWERED_MINUTES + 1656 + DBW1656 + 2 + + + Int + T_PRODUCT_100_MINUTES + 1658 + DBW1658 + 2 + + + Int + T_PRODUCT_0_MINUTES + 1660 + DBW1660 + 2 + + + Int + T_STOP_MINUTES + 1662 + DBW1662 + 2 + + + + + 1560 + DBX1560.0 + -1 + + + "UDT SIPA SV Section" + + true + + + + DInt + .DB_IOT.STATO_MACCHINA + 1664 + DBD1664 + 4 + + + DInt + .DB_IOT.ALLARME_FERMO + 1668 + DBD1668 + 4 + + + DInt + .DB_IOT.WARNING_ATTIVO (che compromette produzione) + 1672 + DBD1672 + 4 + + + Int + .DB_IOT.STATO_OPERATIVO (Semaforo) + 1676 + DBW1676 + 2 + + + Int + .DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc) + 1678 + DBW1678 + 2 + + + DInt + .DB_IOT.ALARM_STOP_NO + 1680 + DBD1680 + 4 + + + + DInt + PIECES_TOT + 1684 + DBD1684 + 4 + + + DInt + PIECES_OK + 1688 + DBD1688 + 4 + + + DInt + PIECES_KO_1 + 1692 + DBD1692 + 4 + + + DInt + PIECES_KO_2 + 1696 + DBD1696 + 4 + + + DInt + PIECES_KO_3 + 1700 + DBD1700 + 4 + + + DInt + PIECES_KO_4 + 1704 + DBD1704 + 4 + + + DInt + PIECES_KO_5 + 1708 + DBD1708 + 4 + + + DInt + PIECES_KO_6 + 1712 + DBD1712 + 4 + + + DInt + PIECES_KO_7 + 1716 + DBD1716 + 4 + + + DInt + PIECES_KO_8 + 1720 + DBD1720 + 4 + + + DInt + PIECES_KO_9 + 1724 + DBD1724 + 4 + + + DInt + PIECES_KO_10 + 1728 + DBD1728 + 4 + + + DInt + T_ALARM_HOURS + 1732 + DBD1732 + 4 + + + DInt + T_DRY_CYCLE_HOURS + 1736 + DBD1736 + 4 + + + DInt + T_POWERED_HOURS + 1740 + DBD1740 + 4 + + + DInt + T_PRODUCT_100_HOURS + 1744 + DBD1744 + 4 + + + DInt + T_PRODUCT_0_HOURS + 1748 + DBD1748 + 4 + + + DInt + T_STOP_HOURS + 1752 + DBD1752 + 4 + + + Int + T_ALARM_MINUTES + 1756 + DBW1756 + 2 + + + Int + T_DRY_CYCLE_MINUTES + 1758 + DBW1758 + 2 + + + Int + T_POWERED_MINUTES + 1760 + DBW1760 + 2 + + + Int + T_PRODUCT_100_MINUTES + 1762 + DBW1762 + 2 + + + Int + T_PRODUCT_0_MINUTES + 1764 + DBW1764 + 2 + + + Int + T_STOP_MINUTES + 1766 + DBW1766 + 2 + + + + + 1664 + DBX1664.0 + -1 + +
+
+
\ No newline at end of file diff --git a/DB_to_Excel.py b/DB_to_Excel.py index 16f3609..5f6b771 100644 --- a/DB_to_Excel.py +++ b/DB_to_Excel.py @@ -1,185 +1,48 @@ -import re -import os -import json - -def clean_line(line): - """Clean line from BOM and extra spaces or quotes.""" - # Remove UTF-8 BOM if exists and strip trailing/leading whitespace - line = line.replace("\ufeff", "").strip() - # Standardize TYPE and DATA_BLOCK definitions to ensure they're properly captured - line = re.sub(r'\s*TYPE\s+"?', 'TYPE "', line) - line = re.sub(r'\s*DATA_BLOCK\s+"?', 'DATA_BLOCK "', line) - line = remove_text_inside_brackets(line) - return line - -def remove_text_inside_brackets(text): - # Define the pattern to find text inside brackets - pattern = r"\{.*?\}" - # Use re.sub to replace the found text with an empty string - cleaned_text = re.sub(pattern, '', text) - return cleaned_text - -def extract_name(line): - """Extract the name from TYPE or DATA_BLOCK definition line.""" - # Attempt to find a quoted name first - match = re.search(r'(TYPE|DATA_BLOCK)\s+"([^"]+)"', line) - if match: - return match.group(2).strip() # The name is within quotes - - # If no quoted name, find an unquoted name - match = re.search(r"(TYPE|DATA_BLOCK)\s+(\S+)", line) - if match: - return match.group(2).strip() # The name is without quotes - - -def parse_udts(lines): - udt_json = {} - udt_name = None - nested_structs = [] - current_struct = None - is_within_struct = False - - for line in lines: - line = clean_line(line) - if "TYPE" in line and "END_TYPE" not in line: - udt_name = extract_name(line) - udt_json[udt_name] = {} - current_struct = udt_json[udt_name] - print(f"Created UDT: {udt_name}") - elif "END_TYPE" in line: - print(f"Completed UDT: {udt_name}") - udt_name = None - nested_structs = [] - current_struct = None - is_within_struct = False - elif "STRUCT" in line and "END_STRUCT" not in line and udt_name is not None: - struct_name = ( - "Struct" if "STRUCT" == line.strip() else line.split(":")[0].strip() - ) - new_struct = {} - current_struct[struct_name] = new_struct - nested_structs.append(current_struct) - current_struct = new_struct - is_within_struct = True - print(f"Created STRUCT: {struct_name}") - elif "END_STRUCT" in line and udt_name is not None: - current_struct = nested_structs.pop() if nested_structs else None - is_within_struct = bool(nested_structs) - print(f"Closed STRUCT in UDT '{udt_name}'") - elif udt_name and ":" in line and is_within_struct: - parts = line.split(":") - field_name = parts[0].strip() - field_details = parts[1].strip().split("//") - field_type = ( - field_details[0].replace(";", "").strip() - ) # Removing ';' from field type - field_comment = parts[1].split("//")[1].strip() if "//" in parts[1] else "" - if "Struct" in field_type: - new_struct = {} - current_struct[field_name] = new_struct - nested_structs.append(current_struct) - current_struct = new_struct - print(f"Opened inline STRUCT at field '{field_name}'") - else: - current_struct[field_name] = { - "type": field_type, - "comment": field_comment, - } - print( - f"Added field '{field_name}' to STRUCT: Type={field_type}, Comment={field_comment}" - ) - - return udt_json - - -def parse_dbs(lines, udts): - db_json = {} - db_name = None - nested_structs = [] - current_struct = None - is_within_struct = False - - for line in lines: - line = clean_line(line) - if "DATA_BLOCK" in line and "END_DATA_BLOCK" not in line: - db_name = extract_name(line) - db_json[db_name] = {} - current_struct = db_json[db_name] - print(f"Created DATA_BLOCK: {db_name}") - elif "END_DATA_BLOCK" in line: - print(f"Completed DATA_BLOCK: {db_name}") - db_name = None - nested_structs = [] - current_struct = None - is_within_struct = False - elif "STRUCT" in line and "END_STRUCT" not in line and db_name is not None: - struct_name = ( - "Struct" if "STRUCT" == line.strip() else line.split(":")[0].strip() - ) - new_struct = {} - current_struct[struct_name] = new_struct - nested_structs.append(current_struct) - current_struct = new_struct - is_within_struct = True - print(f"Created STRUCT in DB '{db_name}': {struct_name}") - elif "END_STRUCT" in line and db_name is not None: - current_struct = nested_structs.pop() if nested_structs else None - is_within_struct = bool(nested_structs) - print(f"Closed STRUCT in DB '{db_name}'") - elif db_name and ":" in line and is_within_struct: - parts = line.split(":") - field_name = parts[0].strip() - field_details = parts[1].strip().split("//") - field_type = ( - field_details[0].replace(";", "").strip() - ) # Removing ';' from field type - field_comment = parts[1].split("//")[1].strip() if "//" in parts[1] else "" - if "Struct" in field_type: - new_struct = {} - current_struct[field_name] = new_struct - nested_structs.append(current_struct) - current_struct = new_struct - print(f"Opened inline STRUCT at field '{field_name}' in DB '{db_name}'") - else: - current_struct[field_name] = { - "type": field_type, - "comment": field_comment, - } - print( - f"Added field '{field_name}' to STRUCT in DB '{db_name}': Type={field_type}, Comment={field_comment}" - ) - - return db_json - -def save_data_as_json(file_path, data): - with open(file_path, 'w', encoding='utf-8') as f: - json.dump(data, f, ensure_ascii=False, indent=4) - -from CreateTable import * -from ExpandDB import * -from manejoArchivos import * +from CreateTableAndOffsets import convert_to_table +from ExpandDB import expand_dbs +from manejoArchivos import select_file, open_file_explorer +from FileSystem import * +from S7_DBParser import parse_dbs, parse_udts +from Excel import * if __name__ == "__main__": - file_path = "Data_block_1.db" ## select_file() + file_path = select_file() if file_path: # Proceed only if a file was selected with open(file_path, "r", encoding="utf-8-sig") as file: lines = file.readlines() + file_name, extension, dest_path = extract_file_details(file_path) + dest_path = create_directory(dest_path, file_name) + json_path = build_file_path(dest_path, file_name, "json") + xml_path = build_file_path(dest_path, file_name, "xml") + excel_path = build_file_path(dest_path, file_name, "xlsx") + cvs_path = build_file_path(dest_path, file_name, "cvs") + udt_json = parse_udts(lines) db_json = parse_dbs(lines, udt_json) expand_dbs(udt_json, db_json) # Expand DBs with UDT definitions - save_data_as_json("DB_Structure.jon", db_json) + + save_data_as_json(db_json, json_path) # Display the expanded DBs as a table - df = display_as_table(db_json) - save_dataframe_to_file(df) # Save the DataFrame to a CSV file - save_dataframe_to_excel(df,"DB_Structure.xlsx") # Optionally, save the DataFrame to an Excel file + df = convert_to_table(db_json) + + save_dataframe_to_file(df, cvs_path) # Save the DataFrame to a CSV file + + ## EXCEL output + save_dataframe_to_excel( + df, excel_path, file_name + ) # Optionally, save the DataFrame to an Excel file + workbook, worksheet = open_worksheet(excel_path, file_name) + autosize_columns(worksheet, ["A", "B", "C", "D", "E", "F", "G"]) + center_columns(worksheet, ["C", "D", "E"]) + save_workbook(workbook, excel_path) # Save JSON data to an XML file - save_json_to_xml(db_json) + save_json_to_xml(db_json, xml_path) # Open the directory containing the new file in Explorer - ##open_file_explorer(os.path.dirname(file_path)) + open_file_explorer(os.path.dirname(excel_path)) else: print("No file was selected.") diff --git a/Data_block_1.db b/Data_block_1.db index ece905d..25a6b0d 100644 --- a/Data_block_1.db +++ b/Data_block_1.db @@ -62,7 +62,7 @@ NON_RETAIN b2 : Int; b3 : Array[0..15] of Bool; b4 : Array[0..11] of Bool; - "Udt" { S7_SetPoint := 'False'} : "UDTd Complicada"; + "Udt" { S7_SetPoint := 'False'} : "UDT Complicada"; udt_1 : "UDTComp"; END_STRUCT; diff --git a/Data_block_1/Data_block_1.cvs b/Data_block_1/Data_block_1.cvs new file mode 100644 index 0000000..39ce1a9 --- /dev/null +++ b/Data_block_1/Data_block_1.cvs @@ -0,0 +1,262 @@ +Nombre,Tipo,Offset,Size,Level,Dirección PLC,Comentario +asa,Array[1..8] of Byte,0,0,0,DBX0.0, +asa[1],Byte,0,1,1,DBB0, +asa[2],Byte,1,1,1,DBB1, +asa[3],Byte,2,1,1,DBB2, +asa[4],Byte,3,1,1,DBB3, +asa[5],Byte,4,1,1,DBB4, +asa[6],Byte,5,1,1,DBB5, +asa[7],Byte,6,1,1,DBB6, +asa[8],Byte,7,1,1,DBB7, +b0,Bool,8,0.1,0,DBX8.0, +b1,Bool,8,0.1,0,DBX8.1, +s5,S5Time,10,2,0,DBW10, +s,LInt,12,8,0,DBX12.0, +s_1,WString,20,512,0,DBX20.0, +s_2,UInt,532,2,0,DBW532, +ss,LReal,534,8,0,DBX534.0, +b2,Int,542,2,0,DBW542, +b3,Array[0..15] of Bool,544,0,0,DBX544.0, +b3[0],Bool,544,0.1,1,DBX544.0, +b3[1],Bool,544,0.1,1,DBX544.1, +b3[2],Bool,544,0.1,1,DBX544.2, +b3[3],Bool,544,0.1,1,DBX544.3, +b3[4],Bool,544,0.1,1,DBX544.4, +b3[5],Bool,544,0.1,1,DBX544.5, +b3[6],Bool,544,0.1,1,DBX544.6, +b3[7],Bool,544,0.1,1,DBX544.7, +b3[8],Bool,545,0.1,1,DBX545.0, +b3[9],Bool,545,0.1,1,DBX545.1, +b3[10],Bool,545,0.1,1,DBX545.2, +b3[11],Bool,545,0.1,1,DBX545.3, +b3[12],Bool,545,0.1,1,DBX545.4, +b3[13],Bool,545,0.1,1,DBX545.5, +b3[14],Bool,545,0.1,1,DBX545.6, +b3[15],Bool,545,0.1,1,DBX545.7, +b4,Array[0..11] of Bool,546,0,0,DBX546.0, +b4[0],Bool,546,0.1,1,DBX546.0, +b4[1],Bool,546,0.1,1,DBX546.1, +b4[2],Bool,546,0.1,1,DBX546.2, +b4[3],Bool,546,0.1,1,DBX546.3, +b4[4],Bool,546,0.1,1,DBX546.4, +b4[5],Bool,546,0.1,1,DBX546.5, +b4[6],Bool,546,0.1,1,DBX546.6, +b4[7],Bool,546,0.1,1,DBX546.7, +b4[8],Bool,547,0.1,1,DBX547.0, +b4[9],Bool,547,0.1,1,DBX547.1, +b4[10],Bool,547,0.1,1,DBX547.2, +b4[11],Bool,547,0.1,1,DBX547.3, +"""Udt""","""UDT Complicada""",548,-1,0,DBX548.0, +"""Udt"".""String""",String,548,256,1,DBX548.0, +"""Udt"".String_1",String[60],804,62,1,DBX804.0, +"""Udt"".""Bool""",Bool,866,0.1,1,DBX866.0, +"""Udt"".Bool_1",Array[0..1] of Bool,868,0,1,DBX868.0, +"""Udt"".Bool_1[0]",Bool,868,0.1,2,DBX868.0, +"""Udt"".Bool_1[1]",Bool,868,0.1,2,DBX868.1, +"""Udt"".Bool_2",Array[0..51] of Bool,870,0,1,DBX870.0, +"""Udt"".Bool_2[0]",Bool,870,0.1,2,DBX870.0, +"""Udt"".Bool_2[1]",Bool,870,0.1,2,DBX870.1, +"""Udt"".Bool_2[2]",Bool,870,0.1,2,DBX870.2, +"""Udt"".Bool_2[3]",Bool,870,0.1,2,DBX870.3, +"""Udt"".Bool_2[4]",Bool,870,0.1,2,DBX870.4, +"""Udt"".Bool_2[5]",Bool,870,0.1,2,DBX870.5, +"""Udt"".Bool_2[6]",Bool,870,0.1,2,DBX870.6, +"""Udt"".Bool_2[7]",Bool,870,0.1,2,DBX870.7, +"""Udt"".Bool_2[8]",Bool,871,0.1,2,DBX871.0, +"""Udt"".Bool_2[9]",Bool,871,0.1,2,DBX871.1, +"""Udt"".Bool_2[10]",Bool,871,0.1,2,DBX871.2, +"""Udt"".Bool_2[11]",Bool,871,0.1,2,DBX871.3, +"""Udt"".Bool_2[12]",Bool,871,0.1,2,DBX871.4, +"""Udt"".Bool_2[13]",Bool,871,0.1,2,DBX871.5, +"""Udt"".Bool_2[14]",Bool,871,0.1,2,DBX871.6, +"""Udt"".Bool_2[15]",Bool,871,0.1,2,DBX871.7, +"""Udt"".Bool_2[16]",Bool,872,0.1,2,DBX872.0, +"""Udt"".Bool_2[17]",Bool,872,0.1,2,DBX872.1, +"""Udt"".Bool_2[18]",Bool,872,0.1,2,DBX872.2, +"""Udt"".Bool_2[19]",Bool,872,0.1,2,DBX872.3, +"""Udt"".Bool_2[20]",Bool,872,0.1,2,DBX872.4, +"""Udt"".Bool_2[21]",Bool,872,0.1,2,DBX872.5, +"""Udt"".Bool_2[22]",Bool,872,0.1,2,DBX872.6, +"""Udt"".Bool_2[23]",Bool,872,0.1,2,DBX872.7, +"""Udt"".Bool_2[24]",Bool,873,0.1,2,DBX873.0, +"""Udt"".Bool_2[25]",Bool,873,0.1,2,DBX873.1, +"""Udt"".Bool_2[26]",Bool,873,0.1,2,DBX873.2, +"""Udt"".Bool_2[27]",Bool,873,0.1,2,DBX873.3, +"""Udt"".Bool_2[28]",Bool,873,0.1,2,DBX873.4, +"""Udt"".Bool_2[29]",Bool,873,0.1,2,DBX873.5, +"""Udt"".Bool_2[30]",Bool,873,0.1,2,DBX873.6, +"""Udt"".Bool_2[31]",Bool,873,0.1,2,DBX873.7, +"""Udt"".Bool_2[32]",Bool,874,0.1,2,DBX874.0, +"""Udt"".Bool_2[33]",Bool,874,0.1,2,DBX874.1, +"""Udt"".Bool_2[34]",Bool,874,0.1,2,DBX874.2, +"""Udt"".Bool_2[35]",Bool,874,0.1,2,DBX874.3, +"""Udt"".Bool_2[36]",Bool,874,0.1,2,DBX874.4, +"""Udt"".Bool_2[37]",Bool,874,0.1,2,DBX874.5, +"""Udt"".Bool_2[38]",Bool,874,0.1,2,DBX874.6, +"""Udt"".Bool_2[39]",Bool,874,0.1,2,DBX874.7, +"""Udt"".Bool_2[40]",Bool,875,0.1,2,DBX875.0, +"""Udt"".Bool_2[41]",Bool,875,0.1,2,DBX875.1, +"""Udt"".Bool_2[42]",Bool,875,0.1,2,DBX875.2, +"""Udt"".Bool_2[43]",Bool,875,0.1,2,DBX875.3, +"""Udt"".Bool_2[44]",Bool,875,0.1,2,DBX875.4, +"""Udt"".Bool_2[45]",Bool,875,0.1,2,DBX875.5, +"""Udt"".Bool_2[46]",Bool,875,0.1,2,DBX875.6, +"""Udt"".Bool_2[47]",Bool,875,0.1,2,DBX875.7, +"""Udt"".Bool_2[48]",Bool,876,0.1,2,DBX876.0, +"""Udt"".Bool_2[49]",Bool,876,0.1,2,DBX876.1, +"""Udt"".Bool_2[50]",Bool,876,0.1,2,DBX876.2, +"""Udt"".Bool_2[51]",Bool,876,0.1,2,DBX876.3, +"""Udt"".""Int""",Int,878,2,1,DBW878, +"""Udt"".""Hola como Estas""",Int,880,2,1,DBW880, +"""Udt"".""No se""",Int,882,2,1,DBW882, +"""Udt"".""Real""",Array[0..10] of Real,884,0,1,DBX884.0, +"""Udt"".""Real""[0]",Real,884,4,2,DBD884, +"""Udt"".""Real""[1]",Real,888,4,2,DBD888, +"""Udt"".""Real""[2]",Real,892,4,2,DBD892, +"""Udt"".""Real""[3]",Real,896,4,2,DBD896, +"""Udt"".""Real""[4]",Real,900,4,2,DBD900, +"""Udt"".""Real""[5]",Real,904,4,2,DBD904, +"""Udt"".""Real""[6]",Real,908,4,2,DBD908, +"""Udt"".""Real""[7]",Real,912,4,2,DBD912, +"""Udt"".""Real""[8]",Real,916,4,2,DBD916, +"""Udt"".""Real""[9]",Real,920,4,2,DBD920, +"""Udt"".""Real""[10]",Real,924,4,2,DBD924, +"""Udt"".Bool_3",Bool,928,0.1,1,DBX928.0, +"""Udt"".Bool_4",Bool,928,0.1,1,DBX928.1, +"""Udt"".Bool_5",Array[0..7] of Bool,930,0,1,DBX930.0, +"""Udt"".Bool_5[0]",Bool,930,0.1,2,DBX930.0, +"""Udt"".Bool_5[1]",Bool,930,0.1,2,DBX930.1, +"""Udt"".Bool_5[2]",Bool,930,0.1,2,DBX930.2, +"""Udt"".Bool_5[3]",Bool,930,0.1,2,DBX930.3, +"""Udt"".Bool_5[4]",Bool,930,0.1,2,DBX930.4, +"""Udt"".Bool_5[5]",Bool,930,0.1,2,DBX930.5, +"""Udt"".Bool_5[6]",Bool,930,0.1,2,DBX930.6, +"""Udt"".Bool_5[7]",Bool,930,0.1,2,DBX930.7, +"""Udt"".Bool_6",Array[0..15] of Bool,932,0,1,DBX932.0, +"""Udt"".Bool_6[0]",Bool,932,0.1,2,DBX932.0, +"""Udt"".Bool_6[1]",Bool,932,0.1,2,DBX932.1, +"""Udt"".Bool_6[2]",Bool,932,0.1,2,DBX932.2, +"""Udt"".Bool_6[3]",Bool,932,0.1,2,DBX932.3, +"""Udt"".Bool_6[4]",Bool,932,0.1,2,DBX932.4, +"""Udt"".Bool_6[5]",Bool,932,0.1,2,DBX932.5, +"""Udt"".Bool_6[6]",Bool,932,0.1,2,DBX932.6, +"""Udt"".Bool_6[7]",Bool,932,0.1,2,DBX932.7, +"""Udt"".Bool_6[8]",Bool,933,0.1,2,DBX933.0, +"""Udt"".Bool_6[9]",Bool,933,0.1,2,DBX933.1, +"""Udt"".Bool_6[10]",Bool,933,0.1,2,DBX933.2, +"""Udt"".Bool_6[11]",Bool,933,0.1,2,DBX933.3, +"""Udt"".Bool_6[12]",Bool,933,0.1,2,DBX933.4, +"""Udt"".Bool_6[13]",Bool,933,0.1,2,DBX933.5, +"""Udt"".Bool_6[14]",Bool,933,0.1,2,DBX933.6, +"""Udt"".Bool_6[15]",Bool,933,0.1,2,DBX933.7, +"""Udt"".Int_1",Int,934,2,1,DBW934, +"""Udt"".""Time""",Time,936,4,1,DBD936, +"""Udt"".Time_of",Time_Of_Day,940,4,1,DBD940, +"""Udt"".""Word""",Word,944,2,1,DBW944, +udt_1,"""UDTComp""",946,-1,0,DBX946.0, +"udt_1.""String""",String,946,256,1,DBX946.0, +udt_1.String_1,String[60],1202,62,1,DBX1202.0, +"udt_1.""Bool""",Bool,1264,0.1,1,DBX1264.0, +udt_1.Bool_1,Array[0..1] of Bool,1266,0,1,DBX1266.0, +udt_1.Bool_1[0],Bool,1266,0.1,2,DBX1266.0, +udt_1.Bool_1[1],Bool,1266,0.1,2,DBX1266.1, +udt_1.Bool_2,Array[0..51] of Bool,1268,0,1,DBX1268.0, +udt_1.Bool_2[0],Bool,1268,0.1,2,DBX1268.0, +udt_1.Bool_2[1],Bool,1268,0.1,2,DBX1268.1, +udt_1.Bool_2[2],Bool,1268,0.1,2,DBX1268.2, +udt_1.Bool_2[3],Bool,1268,0.1,2,DBX1268.3, +udt_1.Bool_2[4],Bool,1268,0.1,2,DBX1268.4, +udt_1.Bool_2[5],Bool,1268,0.1,2,DBX1268.5, +udt_1.Bool_2[6],Bool,1268,0.1,2,DBX1268.6, +udt_1.Bool_2[7],Bool,1268,0.1,2,DBX1268.7, +udt_1.Bool_2[8],Bool,1269,0.1,2,DBX1269.0, +udt_1.Bool_2[9],Bool,1269,0.1,2,DBX1269.1, +udt_1.Bool_2[10],Bool,1269,0.1,2,DBX1269.2, +udt_1.Bool_2[11],Bool,1269,0.1,2,DBX1269.3, +udt_1.Bool_2[12],Bool,1269,0.1,2,DBX1269.4, +udt_1.Bool_2[13],Bool,1269,0.1,2,DBX1269.5, +udt_1.Bool_2[14],Bool,1269,0.1,2,DBX1269.6, +udt_1.Bool_2[15],Bool,1269,0.1,2,DBX1269.7, +udt_1.Bool_2[16],Bool,1270,0.1,2,DBX1270.0, +udt_1.Bool_2[17],Bool,1270,0.1,2,DBX1270.1, +udt_1.Bool_2[18],Bool,1270,0.1,2,DBX1270.2, +udt_1.Bool_2[19],Bool,1270,0.1,2,DBX1270.3, +udt_1.Bool_2[20],Bool,1270,0.1,2,DBX1270.4, +udt_1.Bool_2[21],Bool,1270,0.1,2,DBX1270.5, +udt_1.Bool_2[22],Bool,1270,0.1,2,DBX1270.6, +udt_1.Bool_2[23],Bool,1270,0.1,2,DBX1270.7, +udt_1.Bool_2[24],Bool,1271,0.1,2,DBX1271.0, +udt_1.Bool_2[25],Bool,1271,0.1,2,DBX1271.1, +udt_1.Bool_2[26],Bool,1271,0.1,2,DBX1271.2, +udt_1.Bool_2[27],Bool,1271,0.1,2,DBX1271.3, +udt_1.Bool_2[28],Bool,1271,0.1,2,DBX1271.4, +udt_1.Bool_2[29],Bool,1271,0.1,2,DBX1271.5, +udt_1.Bool_2[30],Bool,1271,0.1,2,DBX1271.6, +udt_1.Bool_2[31],Bool,1271,0.1,2,DBX1271.7, +udt_1.Bool_2[32],Bool,1272,0.1,2,DBX1272.0, +udt_1.Bool_2[33],Bool,1272,0.1,2,DBX1272.1, +udt_1.Bool_2[34],Bool,1272,0.1,2,DBX1272.2, +udt_1.Bool_2[35],Bool,1272,0.1,2,DBX1272.3, +udt_1.Bool_2[36],Bool,1272,0.1,2,DBX1272.4, +udt_1.Bool_2[37],Bool,1272,0.1,2,DBX1272.5, +udt_1.Bool_2[38],Bool,1272,0.1,2,DBX1272.6, +udt_1.Bool_2[39],Bool,1272,0.1,2,DBX1272.7, +udt_1.Bool_2[40],Bool,1273,0.1,2,DBX1273.0, +udt_1.Bool_2[41],Bool,1273,0.1,2,DBX1273.1, +udt_1.Bool_2[42],Bool,1273,0.1,2,DBX1273.2, +udt_1.Bool_2[43],Bool,1273,0.1,2,DBX1273.3, +udt_1.Bool_2[44],Bool,1273,0.1,2,DBX1273.4, +udt_1.Bool_2[45],Bool,1273,0.1,2,DBX1273.5, +udt_1.Bool_2[46],Bool,1273,0.1,2,DBX1273.6, +udt_1.Bool_2[47],Bool,1273,0.1,2,DBX1273.7, +udt_1.Bool_2[48],Bool,1274,0.1,2,DBX1274.0, +udt_1.Bool_2[49],Bool,1274,0.1,2,DBX1274.1, +udt_1.Bool_2[50],Bool,1274,0.1,2,DBX1274.2, +udt_1.Bool_2[51],Bool,1274,0.1,2,DBX1274.3, +"udt_1.""Int""",Int,1276,2,1,DBW1276, +"udt_1.""Hola como Estas""",Int,1278,2,1,DBW1278, +"udt_1.""No se""",Int,1280,2,1,DBW1280, +"udt_1.""Real""",Array[0..10] of Real,1282,0,1,DBX1282.0, +"udt_1.""Real""[0]",Real,1282,4,2,DBD1282, +"udt_1.""Real""[1]",Real,1286,4,2,DBD1286, +"udt_1.""Real""[2]",Real,1290,4,2,DBD1290, +"udt_1.""Real""[3]",Real,1294,4,2,DBD1294, +"udt_1.""Real""[4]",Real,1298,4,2,DBD1298, +"udt_1.""Real""[5]",Real,1302,4,2,DBD1302, +"udt_1.""Real""[6]",Real,1306,4,2,DBD1306, +"udt_1.""Real""[7]",Real,1310,4,2,DBD1310, +"udt_1.""Real""[8]",Real,1314,4,2,DBD1314, +"udt_1.""Real""[9]",Real,1318,4,2,DBD1318, +"udt_1.""Real""[10]",Real,1322,4,2,DBD1322, +udt_1.Bool_3,Bool,1326,0.1,1,DBX1326.0, +udt_1.Bool_4,Bool,1326,0.1,1,DBX1326.1, +udt_1.Bool_5,Array[0..7] of Bool,1328,0,1,DBX1328.0, +udt_1.Bool_5[0],Bool,1328,0.1,2,DBX1328.0, +udt_1.Bool_5[1],Bool,1328,0.1,2,DBX1328.1, +udt_1.Bool_5[2],Bool,1328,0.1,2,DBX1328.2, +udt_1.Bool_5[3],Bool,1328,0.1,2,DBX1328.3, +udt_1.Bool_5[4],Bool,1328,0.1,2,DBX1328.4, +udt_1.Bool_5[5],Bool,1328,0.1,2,DBX1328.5, +udt_1.Bool_5[6],Bool,1328,0.1,2,DBX1328.6, +udt_1.Bool_5[7],Bool,1328,0.1,2,DBX1328.7, +udt_1.Bool_6,Array[0..15] of Bool,1330,0,1,DBX1330.0, +udt_1.Bool_6[0],Bool,1330,0.1,2,DBX1330.0, +udt_1.Bool_6[1],Bool,1330,0.1,2,DBX1330.1, +udt_1.Bool_6[2],Bool,1330,0.1,2,DBX1330.2, +udt_1.Bool_6[3],Bool,1330,0.1,2,DBX1330.3, +udt_1.Bool_6[4],Bool,1330,0.1,2,DBX1330.4, +udt_1.Bool_6[5],Bool,1330,0.1,2,DBX1330.5, +udt_1.Bool_6[6],Bool,1330,0.1,2,DBX1330.6, +udt_1.Bool_6[7],Bool,1330,0.1,2,DBX1330.7, +udt_1.Bool_6[8],Bool,1331,0.1,2,DBX1331.0, +udt_1.Bool_6[9],Bool,1331,0.1,2,DBX1331.1, +udt_1.Bool_6[10],Bool,1331,0.1,2,DBX1331.2, +udt_1.Bool_6[11],Bool,1331,0.1,2,DBX1331.3, +udt_1.Bool_6[12],Bool,1331,0.1,2,DBX1331.4, +udt_1.Bool_6[13],Bool,1331,0.1,2,DBX1331.5, +udt_1.Bool_6[14],Bool,1331,0.1,2,DBX1331.6, +udt_1.Bool_6[15],Bool,1331,0.1,2,DBX1331.7, +udt_1.Int_1,Int,1332,2,1,DBW1332, +"udt_1.""Time""",Time,1334,4,1,DBD1334, +udt_1.Time_of,Time_Of_Day,1338,4,1,DBD1338, +"udt_1.""Word""",Word,1342,2,1,DBW1342, diff --git a/Data_block_1/Data_block_1.json b/Data_block_1/Data_block_1.json new file mode 100644 index 0000000..31d8561 --- /dev/null +++ b/Data_block_1/Data_block_1.json @@ -0,0 +1,1313 @@ +{ + "Data_block_1": { + "Struct": { + "asa": { + "type": "Array[1..8] of Byte", + "comment": "", + "array_definition": true, + "Array": { + "[1]": { + "type": "Byte", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Byte", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Byte", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Byte", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Byte", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Byte", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Byte", + "comment": "", + "is_array_element": true + }, + "[8]": { + "type": "Byte", + "comment": "", + "is_array_element": true + } + } + }, + "b0": { + "type": "Bool", + "comment": "" + }, + "b1": { + "type": "Bool", + "comment": "" + }, + "s5": { + "type": "S5Time", + "comment": "" + }, + "s": { + "type": "LInt", + "comment": "" + }, + "s_1": { + "type": "WString", + "comment": "" + }, + "s_2": { + "type": "UInt", + "comment": "" + }, + "ss": { + "type": "LReal", + "comment": "" + }, + "b2": { + "type": "Int", + "comment": "" + }, + "b3": { + "type": "Array[0..15] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[8]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[9]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[10]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[11]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[12]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[13]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[14]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[15]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "b4": { + "type": "Array[0..11] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[8]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[9]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[10]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[11]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "\"Udt\"": { + "type": "\"UDT Complicada\"", + "comment": "", + "is_udt_definition": true, + "fields": { + "Struct": { + "\"String\"": { + "type": "String", + "comment": "" + }, + "String_1": { + "type": "String[60]", + "comment": "" + }, + "\"Bool\"": { + "type": "Bool", + "comment": "" + }, + "Bool_1": { + "type": "Array[0..1] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "Bool_2": { + "type": "Array[0..51] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[8]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[9]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[10]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[11]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[12]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[13]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[14]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[15]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[16]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[17]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[18]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[19]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[20]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[21]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[22]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[23]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[24]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[25]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[26]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[27]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[28]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[29]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[30]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[31]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[32]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[33]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[34]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[35]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[36]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[37]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[38]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[39]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[40]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[41]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[42]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[43]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[44]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[45]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[46]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[47]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[48]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[49]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[50]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[51]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "\"Int\"": { + "type": "Int", + "comment": "" + }, + "\"Hola como Estas\"": { + "type": "Int", + "comment": "" + }, + "\"No se\"": { + "type": "Int", + "comment": "" + }, + "\"Real\"": { + "type": "Array[0..10] of Real", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[8]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[9]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[10]": { + "type": "Real", + "comment": "", + "is_array_element": true + } + } + }, + "Bool_3": { + "type": "Bool", + "comment": "" + }, + "Bool_4": { + "type": "Bool", + "comment": "" + }, + "Bool_5": { + "type": "Array[0..7] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "Bool_6": { + "type": "Array[0..15] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[8]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[9]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[10]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[11]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[12]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[13]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[14]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[15]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "Int_1": { + "type": "Int", + "comment": "" + }, + "\"Time\"": { + "type": "Time", + "comment": "" + }, + "Time_of": { + "type": "Time_Of_Day", + "comment": "" + }, + "\"Word\"": { + "type": "Word", + "comment": "" + } + } + } + }, + "udt_1": { + "type": "\"UDTComp\"", + "comment": "", + "is_udt_definition": true, + "fields": { + "Struct": { + "\"String\"": { + "type": "String", + "comment": "" + }, + "String_1": { + "type": "String[60]", + "comment": "" + }, + "\"Bool\"": { + "type": "Bool", + "comment": "" + }, + "Bool_1": { + "type": "Array[0..1] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "Bool_2": { + "type": "Array[0..51] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[8]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[9]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[10]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[11]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[12]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[13]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[14]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[15]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[16]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[17]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[18]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[19]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[20]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[21]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[22]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[23]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[24]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[25]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[26]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[27]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[28]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[29]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[30]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[31]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[32]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[33]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[34]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[35]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[36]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[37]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[38]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[39]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[40]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[41]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[42]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[43]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[44]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[45]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[46]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[47]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[48]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[49]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[50]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[51]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "\"Int\"": { + "type": "Int", + "comment": "" + }, + "\"Hola como Estas\"": { + "type": "Int", + "comment": "" + }, + "\"No se\"": { + "type": "Int", + "comment": "" + }, + "\"Real\"": { + "type": "Array[0..10] of Real", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[8]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[9]": { + "type": "Real", + "comment": "", + "is_array_element": true + }, + "[10]": { + "type": "Real", + "comment": "", + "is_array_element": true + } + } + }, + "Bool_3": { + "type": "Bool", + "comment": "" + }, + "Bool_4": { + "type": "Bool", + "comment": "" + }, + "Bool_5": { + "type": "Array[0..7] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "Bool_6": { + "type": "Array[0..15] of Bool", + "comment": "", + "array_definition": true, + "Array": { + "[0]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[1]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[2]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[3]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[4]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[5]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[6]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[7]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[8]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[9]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[10]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[11]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[12]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[13]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[14]": { + "type": "Bool", + "comment": "", + "is_array_element": true + }, + "[15]": { + "type": "Bool", + "comment": "", + "is_array_element": true + } + } + }, + "Int_1": { + "type": "Int", + "comment": "" + }, + "\"Time\"": { + "type": "Time", + "comment": "" + }, + "Time_of": { + "type": "Time_Of_Day", + "comment": "" + }, + "\"Word\"": { + "type": "Word", + "comment": "" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Data_block_1/Data_block_1.xlsx b/Data_block_1/Data_block_1.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..0ada5e0b5005ae3d017af9bf0aa27483f71fe2b4 GIT binary patch literal 14396 zcmZ{L1zc3y`Zg^B(jkI$cXtlm-6ahoIiw>kNP~oQw;)JJmjVLPp-4+e4vj;@e-EB} z&pCeg(;sW^z1Di4=dJbbJv%g2kWmN`5D?ITKS_i$|OGpdN&uY+^OP~%o@A$e618Z|87VhK8uz_*Y~8)Z>>#o935|S zlrC_o9HM8{DsA@W!F_RJ58265*{Sj$bP!$_F!CITJlrWQ_RSRg*+?U!y~so&mTZN} zB;P$4{n3U9k#`Sf7?r`as1(@}E^moP<6EUm%^!8fuV$U{s92L*q=LxZjHB&bdO+}Hh^Xj;Zvrbsm@ltV#`JH{ zo?V#xIwkTa#Of8;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BB2 + 1 + + <[4]> + Byte + + true + 3 + DBB3 + 1 + + <[5]> + Byte + + true + 4 + DBB4 + 1 + + <[6]> + Byte + + true + 5 + DBB5 + 1 + + <[7]> + Byte + + true + 6 + DBB6 + 1 + + <[8]> + Byte + + true + 7 + DBB7 + 1 + + + 0 + DBX0.0 + 0 + + + Bool + + 8 + DBX8.0 + 0.1 + + + Bool + + 8 + DBX8.1 + 0.1 + + + S5Time + + 10 + DBW10 + 2 + + + LInt + + 12 + DBX12.0 + 8 + + + WString + + 20 + DBX20.0 + 512 + + + UInt + + 532 + DBW532 + 2 + + + LReal + + 534 + DBX534.0 + 8 + + + Int + + 542 + DBW542 + 2 + + + Array[0..15] of Bool + + true + + <[0]> + Bool + + true + 544 + DBX544.0 + 0.1 + + <[1]> + Bool + + true + 544 + DBX544.1 + 0.1 + + <[2]> + Bool + + true + 544 + DBX544.2 + 0.1 + + <[3]> + Bool + + true + 544 + DBX544.3 + 0.1 + + <[4]> + Bool + + true + 544 + DBX544.4 + 0.1 + + <[5]> + Bool + + true + 544 + DBX544.5 + 0.1 + + <[6]> + Bool + + true + 544 + DBX544.6 + 0.1 + + <[7]> + Bool + + true + 544 + DBX544.7 + 0.1 + + <[8]> + Bool + + true + 545 + DBX545.0 + 0.1 + + <[9]> + Bool + + true + 545 + DBX545.1 + 0.1 + + <[10]> + Bool + + true + 545 + DBX545.2 + 0.1 + + <[11]> + Bool + + true + 545 + DBX545.3 + 0.1 + + <[12]> + Bool + + true + 545 + DBX545.4 + 0.1 + + <[13]> + Bool + + true + 545 + DBX545.5 + 0.1 + + <[14]> + Bool + + true + 545 + DBX545.6 + 0.1 + + <[15]> + Bool + + true + 545 + DBX545.7 + 0.1 + + + 544 + DBX544.0 + 0 + + + Array[0..11] of Bool + + true + + <[0]> + Bool + + true + 546 + DBX546.0 + 0.1 + + <[1]> + Bool + + true + 546 + DBX546.1 + 0.1 + + <[2]> + Bool + + true + 546 + DBX546.2 + 0.1 + + <[3]> + Bool + + true + 546 + DBX546.3 + 0.1 + + <[4]> + Bool + + true + 546 + DBX546.4 + 0.1 + + <[5]> + Bool + + true + 546 + DBX546.5 + 0.1 + + <[6]> + Bool + + true + 546 + DBX546.6 + 0.1 + + <[7]> + Bool + + true + 546 + DBX546.7 + 0.1 + + <[8]> + Bool + + true + 547 + DBX547.0 + 0.1 + + <[9]> + Bool + + true + 547 + DBX547.1 + 0.1 + + <[10]> + Bool + + true + 547 + DBX547.2 + 0.1 + + <[11]> + Bool + + true + 547 + DBX547.3 + 0.1 + + + 546 + DBX546.0 + 0 + + <"Udt"> + "UDT Complicada" + + true + + + <"String"> + String + + 548 + DBX548.0 + 256 + + + String[60] + + 804 + DBX804.0 + 62 + + <"Bool"> + Bool + + 866 + DBX866.0 + 0.1 + + + Array[0..1] of Bool + + true + + <[0]> + Bool + + true + 868 + DBX868.0 + 0.1 + + <[1]> + Bool + + true + 868 + DBX868.1 + 0.1 + + + 868 + DBX868.0 + 0 + + + Array[0..51] of Bool + + true + + <[0]> + Bool + + true + 870 + DBX870.0 + 0.1 + + <[1]> + Bool + + true + 870 + DBX870.1 + 0.1 + + <[2]> + Bool + + true + 870 + DBX870.2 + 0.1 + + <[3]> + Bool + + true + 870 + DBX870.3 + 0.1 + + <[4]> + Bool + + true + 870 + DBX870.4 + 0.1 + + <[5]> + Bool + + true + 870 + DBX870.5 + 0.1 + + <[6]> + Bool + + true + 870 + DBX870.6 + 0.1 + + <[7]> + Bool + + true + 870 + DBX870.7 + 0.1 + + <[8]> + Bool + + true + 871 + DBX871.0 + 0.1 + + <[9]> + Bool + + true + 871 + DBX871.1 + 0.1 + + <[10]> + Bool + + true + 871 + DBX871.2 + 0.1 + + <[11]> + Bool + + true + 871 + DBX871.3 + 0.1 + + <[12]> + Bool + + true + 871 + DBX871.4 + 0.1 + + <[13]> + Bool + + true + 871 + DBX871.5 + 0.1 + + <[14]> + Bool + + true + 871 + DBX871.6 + 0.1 + + <[15]> + Bool + + true + 871 + DBX871.7 + 0.1 + + <[16]> + Bool + + true + 872 + DBX872.0 + 0.1 + + <[17]> + Bool + + true + 872 + DBX872.1 + 0.1 + + <[18]> + Bool + + true + 872 + DBX872.2 + 0.1 + + <[19]> + Bool + + true + 872 + DBX872.3 + 0.1 + + <[20]> + Bool + + true + 872 + DBX872.4 + 0.1 + + <[21]> + Bool + + true + 872 + DBX872.5 + 0.1 + + <[22]> + Bool + + true + 872 + DBX872.6 + 0.1 + + <[23]> + Bool + + true + 872 + DBX872.7 + 0.1 + + <[24]> + Bool + + true + 873 + DBX873.0 + 0.1 + + <[25]> + Bool + + true + 873 + DBX873.1 + 0.1 + + <[26]> + Bool + + true + 873 + DBX873.2 + 0.1 + + <[27]> + Bool + + true + 873 + DBX873.3 + 0.1 + + <[28]> + Bool + + true + 873 + DBX873.4 + 0.1 + + <[29]> + Bool + + true + 873 + DBX873.5 + 0.1 + + <[30]> + Bool + + true + 873 + DBX873.6 + 0.1 + + <[31]> + Bool + + true + 873 + DBX873.7 + 0.1 + + <[32]> + Bool + + true + 874 + DBX874.0 + 0.1 + + <[33]> + Bool + + true + 874 + DBX874.1 + 0.1 + + <[34]> + Bool + + true + 874 + DBX874.2 + 0.1 + + <[35]> + Bool + + true + 874 + DBX874.3 + 0.1 + + <[36]> + Bool + + true + 874 + DBX874.4 + 0.1 + + <[37]> + Bool + + true + 874 + DBX874.5 + 0.1 + + <[38]> + Bool + + true + 874 + DBX874.6 + 0.1 + + <[39]> + Bool + + true + 874 + DBX874.7 + 0.1 + + <[40]> + Bool + + true + 875 + DBX875.0 + 0.1 + + <[41]> + Bool + + true + 875 + DBX875.1 + 0.1 + + <[42]> + Bool + + true + 875 + DBX875.2 + 0.1 + + <[43]> + Bool + + true + 875 + DBX875.3 + 0.1 + + <[44]> + Bool + + true + 875 + DBX875.4 + 0.1 + + <[45]> + Bool + + true + 875 + DBX875.5 + 0.1 + + <[46]> + Bool + + true + 875 + DBX875.6 + 0.1 + + <[47]> + Bool + + true + 875 + DBX875.7 + 0.1 + + <[48]> + Bool + + true + 876 + DBX876.0 + 0.1 + + <[49]> + Bool + + true + 876 + DBX876.1 + 0.1 + + <[50]> + Bool + + true + 876 + DBX876.2 + 0.1 + + <[51]> + Bool + + true + 876 + DBX876.3 + 0.1 + + + 870 + DBX870.0 + 0 + + <"Int"> + Int + + 878 + DBW878 + 2 + + <"Hola como Estas"> + Int + + 880 + DBW880 + 2 + + <"No se"> + Int + + 882 + DBW882 + 2 + + <"Real"> + Array[0..10] of Real + + true + + <[0]> + Real + + true + 884 + DBD884 + 4 + + <[1]> + Real + + true + 888 + DBD888 + 4 + + <[2]> + Real + + true + 892 + DBD892 + 4 + + <[3]> + Real + + true + 896 + DBD896 + 4 + + <[4]> + Real + + true + 900 + DBD900 + 4 + + <[5]> + Real + + true + 904 + DBD904 + 4 + + <[6]> + Real + + true + 908 + DBD908 + 4 + + <[7]> + Real + + true + 912 + DBD912 + 4 + + <[8]> + Real + + true + 916 + DBD916 + 4 + + <[9]> + Real + + true + 920 + DBD920 + 4 + + <[10]> + Real + + true + 924 + DBD924 + 4 + + + 884 + DBX884.0 + 0 + + + Bool + + 928 + DBX928.0 + 0.1 + + + Bool + + 928 + DBX928.1 + 0.1 + + + Array[0..7] of Bool + + true + + <[0]> + Bool + + true + 930 + DBX930.0 + 0.1 + + <[1]> + Bool + + true + 930 + DBX930.1 + 0.1 + + <[2]> + Bool + + true + 930 + DBX930.2 + 0.1 + + <[3]> + Bool + + true + 930 + DBX930.3 + 0.1 + + <[4]> + Bool + + true + 930 + DBX930.4 + 0.1 + + <[5]> + Bool + + true + 930 + DBX930.5 + 0.1 + + <[6]> + Bool + + true + 930 + DBX930.6 + 0.1 + + <[7]> + Bool + + true + 930 + DBX930.7 + 0.1 + + + 930 + DBX930.0 + 0 + + + Array[0..15] of Bool + + true + + <[0]> + Bool + + true + 932 + DBX932.0 + 0.1 + + <[1]> + Bool + + true + 932 + DBX932.1 + 0.1 + + <[2]> + Bool + + true + 932 + DBX932.2 + 0.1 + + <[3]> + Bool + + true + 932 + DBX932.3 + 0.1 + + <[4]> + Bool + + true + 932 + DBX932.4 + 0.1 + + <[5]> + Bool + + true + 932 + DBX932.5 + 0.1 + + <[6]> + Bool + + true + 932 + DBX932.6 + 0.1 + + <[7]> + Bool + + true + 932 + DBX932.7 + 0.1 + + <[8]> + Bool + + true + 933 + DBX933.0 + 0.1 + + <[9]> + Bool + + true + 933 + DBX933.1 + 0.1 + + <[10]> + Bool + + true + 933 + DBX933.2 + 0.1 + + <[11]> + Bool + + true + 933 + DBX933.3 + 0.1 + + <[12]> + Bool + + true + 933 + DBX933.4 + 0.1 + + <[13]> + Bool + + true + 933 + DBX933.5 + 0.1 + + <[14]> + Bool + + true + 933 + DBX933.6 + 0.1 + + <[15]> + Bool + + true + 933 + DBX933.7 + 0.1 + + + 932 + DBX932.0 + 0 + + + Int + + 934 + DBW934 + 2 + + <"Time"> + Time + + 936 + DBD936 + 4 + + + Time_Of_Day + + 940 + DBD940 + 4 + + <"Word"> + Word + + 944 + DBW944 + 2 + + + + 548 + DBX548.0 + -1 + + + "UDTComp" + + true + + + <"String"> + String + + 946 + DBX946.0 + 256 + + + String[60] + + 1202 + DBX1202.0 + 62 + + <"Bool"> + Bool + + 1264 + DBX1264.0 + 0.1 + + + Array[0..1] of Bool + + true + + <[0]> + Bool + + true + 1266 + DBX1266.0 + 0.1 + + <[1]> + Bool + + true + 1266 + DBX1266.1 + 0.1 + + + 1266 + DBX1266.0 + 0 + + + Array[0..51] of Bool + + true + + <[0]> + Bool + + true + 1268 + DBX1268.0 + 0.1 + + <[1]> + Bool + + true + 1268 + DBX1268.1 + 0.1 + + <[2]> + Bool + + true + 1268 + DBX1268.2 + 0.1 + + <[3]> + Bool + + true + 1268 + DBX1268.3 + 0.1 + + <[4]> + Bool + + true + 1268 + DBX1268.4 + 0.1 + + <[5]> + Bool + + true + 1268 + DBX1268.5 + 0.1 + + <[6]> + Bool + + true + 1268 + DBX1268.6 + 0.1 + + <[7]> + Bool + + true + 1268 + DBX1268.7 + 0.1 + + <[8]> + Bool + + true + 1269 + DBX1269.0 + 0.1 + + <[9]> + Bool + + true + 1269 + DBX1269.1 + 0.1 + + <[10]> + Bool + + true + 1269 + DBX1269.2 + 0.1 + + <[11]> + Bool + + true + 1269 + DBX1269.3 + 0.1 + + <[12]> + Bool + + true + 1269 + DBX1269.4 + 0.1 + + <[13]> + Bool + + true + 1269 + DBX1269.5 + 0.1 + + <[14]> + Bool + + true + 1269 + DBX1269.6 + 0.1 + + <[15]> + Bool + + true + 1269 + DBX1269.7 + 0.1 + + <[16]> + Bool + + true + 1270 + DBX1270.0 + 0.1 + + <[17]> + Bool + + true + 1270 + DBX1270.1 + 0.1 + + <[18]> + Bool + + true + 1270 + DBX1270.2 + 0.1 + + <[19]> + Bool + + true + 1270 + DBX1270.3 + 0.1 + + <[20]> + Bool + + true + 1270 + DBX1270.4 + 0.1 + + <[21]> + Bool + + true + 1270 + DBX1270.5 + 0.1 + + <[22]> + Bool + + true + 1270 + DBX1270.6 + 0.1 + + <[23]> + Bool + + true + 1270 + DBX1270.7 + 0.1 + + <[24]> + Bool + + true + 1271 + DBX1271.0 + 0.1 + + <[25]> + Bool + + true + 1271 + DBX1271.1 + 0.1 + + <[26]> + Bool + + true + 1271 + DBX1271.2 + 0.1 + + <[27]> + Bool + + true + 1271 + DBX1271.3 + 0.1 + + <[28]> + Bool + + true + 1271 + DBX1271.4 + 0.1 + + <[29]> + Bool + + true + 1271 + DBX1271.5 + 0.1 + + <[30]> + Bool + + true + 1271 + DBX1271.6 + 0.1 + + <[31]> + Bool + + true + 1271 + DBX1271.7 + 0.1 + + <[32]> + Bool + + true + 1272 + DBX1272.0 + 0.1 + + <[33]> + Bool + + true + 1272 + DBX1272.1 + 0.1 + + <[34]> + Bool + + true + 1272 + DBX1272.2 + 0.1 + + <[35]> + Bool + + true + 1272 + DBX1272.3 + 0.1 + + <[36]> + Bool + + true + 1272 + DBX1272.4 + 0.1 + + <[37]> + Bool + + true + 1272 + DBX1272.5 + 0.1 + + <[38]> + Bool + + true + 1272 + DBX1272.6 + 0.1 + + <[39]> + Bool + + true + 1272 + DBX1272.7 + 0.1 + + <[40]> + Bool + + true + 1273 + DBX1273.0 + 0.1 + + <[41]> + Bool + + true + 1273 + DBX1273.1 + 0.1 + + <[42]> + Bool + + true + 1273 + DBX1273.2 + 0.1 + + <[43]> + Bool + + true + 1273 + DBX1273.3 + 0.1 + + <[44]> + Bool + + true + 1273 + DBX1273.4 + 0.1 + + <[45]> + Bool + + true + 1273 + DBX1273.5 + 0.1 + + <[46]> + Bool + + true + 1273 + DBX1273.6 + 0.1 + + <[47]> + Bool + + true + 1273 + DBX1273.7 + 0.1 + + <[48]> + Bool + + true + 1274 + DBX1274.0 + 0.1 + + <[49]> + Bool + + true + 1274 + DBX1274.1 + 0.1 + + <[50]> + Bool + + true + 1274 + DBX1274.2 + 0.1 + + <[51]> + Bool + + true + 1274 + DBX1274.3 + 0.1 + + + 1268 + DBX1268.0 + 0 + + <"Int"> + Int + + 1276 + DBW1276 + 2 + + <"Hola como Estas"> + Int + + 1278 + DBW1278 + 2 + + <"No se"> + Int + + 1280 + DBW1280 + 2 + + <"Real"> + Array[0..10] of Real + + true + + <[0]> + Real + + true + 1282 + DBD1282 + 4 + + <[1]> + Real + + true + 1286 + DBD1286 + 4 + + <[2]> + Real + + true + 1290 + DBD1290 + 4 + + <[3]> + Real + + true + 1294 + DBD1294 + 4 + + <[4]> + Real + + true + 1298 + DBD1298 + 4 + + <[5]> + Real + + true + 1302 + DBD1302 + 4 + + <[6]> + Real + + true + 1306 + DBD1306 + 4 + + <[7]> + Real + + true + 1310 + DBD1310 + 4 + + <[8]> + Real + + true + 1314 + DBD1314 + 4 + + <[9]> + Real + + true + 1318 + DBD1318 + 4 + + <[10]> + Real + + true + 1322 + DBD1322 + 4 + + + 1282 + DBX1282.0 + 0 + + + Bool + + 1326 + DBX1326.0 + 0.1 + + + Bool + + 1326 + DBX1326.1 + 0.1 + + + Array[0..7] of Bool + + true + + <[0]> + Bool + + true + 1328 + DBX1328.0 + 0.1 + + <[1]> + Bool + + true + 1328 + DBX1328.1 + 0.1 + + <[2]> + Bool + + true + 1328 + DBX1328.2 + 0.1 + + <[3]> + Bool + + true + 1328 + DBX1328.3 + 0.1 + + <[4]> + Bool + + true + 1328 + DBX1328.4 + 0.1 + + <[5]> + Bool + + true + 1328 + DBX1328.5 + 0.1 + + <[6]> + Bool + + true + 1328 + DBX1328.6 + 0.1 + + <[7]> + Bool + + true + 1328 + DBX1328.7 + 0.1 + + + 1328 + DBX1328.0 + 0 + + + Array[0..15] of Bool + + true + + <[0]> + Bool + + true + 1330 + DBX1330.0 + 0.1 + + <[1]> + Bool + + true + 1330 + DBX1330.1 + 0.1 + + <[2]> + Bool + + true + 1330 + DBX1330.2 + 0.1 + + <[3]> + Bool + + true + 1330 + DBX1330.3 + 0.1 + + <[4]> + Bool + + true + 1330 + DBX1330.4 + 0.1 + + <[5]> + Bool + + true + 1330 + DBX1330.5 + 0.1 + + <[6]> + Bool + + true + 1330 + DBX1330.6 + 0.1 + + <[7]> + Bool + + true + 1330 + DBX1330.7 + 0.1 + + <[8]> + Bool + + true + 1331 + DBX1331.0 + 0.1 + + <[9]> + Bool + + true + 1331 + DBX1331.1 + 0.1 + + <[10]> + Bool + + true + 1331 + DBX1331.2 + 0.1 + + <[11]> + Bool + + true + 1331 + DBX1331.3 + 0.1 + + <[12]> + Bool + + true + 1331 + DBX1331.4 + 0.1 + + <[13]> + Bool + + true + 1331 + DBX1331.5 + 0.1 + + <[14]> + Bool + + true + 1331 + DBX1331.6 + 0.1 + + <[15]> + Bool + + true + 1331 + DBX1331.7 + 0.1 + + + 1330 + DBX1330.0 + 0 + + + Int + + 1332 + DBW1332 + 2 + + <"Time"> + Time + + 1334 + DBD1334 + 4 + + + Time_Of_Day + + 1338 + DBD1338 + 4 + + <"Word"> + Word + + 1342 + DBW1342 + 2 + + + + 946 + DBX946.0 + -1 + + + + \ No newline at end of file diff --git a/Excel.py b/Excel.py new file mode 100644 index 0000000..3d67013 --- /dev/null +++ b/Excel.py @@ -0,0 +1,90 @@ +from openpyxl.styles import Alignment + +def center_columns(worksheet, columns): + """ + Center the content of specified columns in a worksheet. + + Parameters: + worksheet: The worksheet object from openpyxl. + columns (list of str): List of column letters to be centered, e.g., ['B', 'D', 'E']. + """ + for col_letter in columns: + for cell in worksheet[col_letter]: + cell.alignment = Alignment(horizontal='center') + + +from openpyxl import Workbook +from openpyxl.utils import get_column_letter + +def autosize_columns(worksheet, columns): + """ + Adjust the column width to the maximum content size of specified columns in a worksheet. + + Parameters: + worksheet: The worksheet object from openpyxl. + columns (list of str): List of column letters to be resized, e.g., ['A', 'C', 'F']. + """ + for col_letter in columns: + max_length = 0 + col = worksheet[col_letter] + for cell in col: + try: + if len(str(cell.value)) > max_length: + max_length = len(str(cell.value)) + except: + pass + adjusted_width = (max_length + 2) * 1.2 # Adding a little extra width + worksheet.column_dimensions[col_letter].width = adjusted_width + + +from openpyxl import load_workbook + +def open_worksheet(file_path, sheet_name): + """ + Opens an Excel file and returns a specific worksheet by name. + + Parameters: + file_path (str): The path to the Excel file. + sheet_name (str): The name of the worksheet to load. + + Returns: + worksheet: The loaded worksheet object, or None if the sheet does not exist. + """ + try: + # Cargar el libro de trabajo desde el archivo especificado + workbook = load_workbook(filename=file_path) + + # Intentar obtener la hoja de trabajo por nombre + if sheet_name in workbook.sheetnames: + worksheet = workbook[sheet_name] + return workbook, worksheet + else: + print(f"Sheet named '{sheet_name}' does not exist in the workbook.") + return None, None + except FileNotFoundError: + print(f"No such file: '{file_path}'") + return None, None + except Exception as e: + print(f"An error occurred: {e}") + return None, None + + +def save_workbook(workbook, file_path): + """ + Saves the modified workbook to a specified file path. + + Parameters: + workbook: The openpyxl workbook object that has been modified. + file_path (str): The file path where the workbook should be saved. + + Returns: + bool: True if the workbook was saved successfully, False otherwise. + """ + try: + workbook.save(file_path) + print(f"Workbook saved successfully to '{file_path}'.") + return True + except Exception as e: + print(f"Failed to save the workbook. Error: {e}") + return False + diff --git a/FileSystem.py b/FileSystem.py new file mode 100644 index 0000000..f0b178b --- /dev/null +++ b/FileSystem.py @@ -0,0 +1,114 @@ +import os +import xmltodict + +def extract_file_details(file_path): + """ + Extracts and returns the file name without extension, the file extension, and the file path. + + Parameters: + file_path (str): The full path to the file. + + Returns: + tuple: (file_name_without_extension, file_extension, path_only) + + Uso: + file_name, extension, path = extract_file_details(file_path) + """ + # Extrae el path completo del directorio + path_only = os.path.dirname(file_path) + + # Extrae el nombre completo del archivo con extension + full_file_name = os.path.basename(file_path) + + # Separa la extension del nombre del archivo + file_name_without_extension, file_extension = os.path.splitext(full_file_name) + + return (file_name_without_extension, file_extension, path_only) + +def create_directory(base_path, additional_path=""): + """ + Creates a directory at the specified base path, optionally extended by an additional path. + This function handles paths whether or not they end with a slash. + + Parameters: + base_path (str): The base path of the directory to create. + additional_path (str, optional): Additional path elements to be appended. Default is empty. + + Returns: + bool: True if the directory was created successfully, False otherwise. + """ + # Construye el path completo asegurando que los componentes están correctamente separados + full_path = os.path.join(base_path, additional_path) + + try: + # Intenta crear el directorio, incluyendo todos los directorios intermedios necesarios + os.makedirs(full_path, exist_ok=True) + print(f"Directory '{full_path}' created successfully.") + return full_path + except Exception as e: + # Captura cualquier error que ocurra y lo muestra + print(f"Failed to create directory '{full_path}'. Error: {e}") + return full_path + +def build_file_path(base_path, file_name, extension): + """ + Constructs a complete file path given a base path, a file name, and an extension. + Handles cases where the file name may include an incorrect or correct extension. + + Parameters: + base_path (str): The base directory path where the file will be located. + file_name (str): The file name, which may or may not include an extension. + extension (str): The desired file extension (e.g., 'txt', '.txt'). + + Returns: + str: The complete file path including the base path, file name, and extension. + """ + # Ensure the extension is in the correct format (i.e., starts with a dot) + if not extension.startswith('.'): + extension = '.' + extension + + # Separate the base file name from its extension if present + file_name_without_extension, _ = os.path.splitext(file_name) + + # Reconstruct the file name with the correct extension + file_name_corrected = file_name_without_extension + extension + + # Construct the full file path + full_path = os.path.join(base_path, file_name_corrected) + + return full_path + +import json + +def save_data_as_json(data ,file_path): + with open(file_path, 'w', encoding='utf-8') as f: + json.dump(data, f, ensure_ascii=False, indent=4) + + +def save_json_to_xml(json_data, filename="DB_Structure.xml"): + """ + Convert JSON data to XML and save it to a file. + """ + xml_data = xmltodict.unparse({"root": json_data}, pretty=True) + with open(filename, "w") as xml_file: + xml_file.write(xml_data) + print(f"XML data saved to {filename}") + + +def save_dataframe_to_excel(df, filename="DB_Structure.xlsx", sheet_name= "DB"): + """ + Save the provided DataFrame to an Excel file. + """ + df.to_excel(filename, index=False, sheet_name=sheet_name) + print(f"Data saved to {filename}") + + +def save_dataframe_to_file(df, filename="DB_Structure.csv"): + """ + Save the provided DataFrame to a CSV file. + """ + df.to_csv(filename, index=False) + print(f"Data saved to {filename}") + + + \ No newline at end of file diff --git a/S7_DBParser.py b/S7_DBParser.py new file mode 100644 index 0000000..9dc0ea7 --- /dev/null +++ b/S7_DBParser.py @@ -0,0 +1,152 @@ +import re +import os +import json + +def clean_line(line): + """Clean line from BOM and extra spaces or quotes.""" + # Remove UTF-8 BOM if exists and strip trailing/leading whitespace + line = line.replace("\ufeff", "").strip() + # Standardize TYPE and DATA_BLOCK definitions to ensure they're properly captured + line = re.sub(r'\s*TYPE\s+"?', 'TYPE "', line) + line = re.sub(r'\s*DATA_BLOCK\s+"?', 'DATA_BLOCK "', line) + line = remove_text_inside_brackets(line) + return line + +def remove_text_inside_brackets(text): + # Define the pattern to find text inside brackets + pattern = r"\{.*?\}" + # Use re.sub to replace the found text with an empty string + cleaned_text = re.sub(pattern, '', text) + return cleaned_text + +def extract_name(line): + """Extract the name from TYPE or DATA_BLOCK definition line.""" + # Attempt to find a quoted name first + match = re.search(r'(TYPE|DATA_BLOCK)\s+"([^"]+)"', line) + if match: + return match.group(2).strip() # The name is within quotes + + # If no quoted name, find an unquoted name + match = re.search(r"(TYPE|DATA_BLOCK)\s+(\S+)", line) + if match: + return match.group(2).strip() # The name is without quotes + + +def parse_udts(lines): + udt_json = {} + udt_name = None + nested_structs = [] + current_struct = None + is_within_struct = False + + for line in lines: + line = clean_line(line) + if "TYPE" in line and "END_TYPE" not in line: + udt_name = extract_name(line) + udt_json[udt_name] = {} + current_struct = udt_json[udt_name] + print(f"Created UDT: {udt_name}") + elif "END_TYPE" in line: + print(f"Completed UDT: {udt_name}") + udt_name = None + nested_structs = [] + current_struct = None + is_within_struct = False + elif "STRUCT" in line and "END_STRUCT" not in line and udt_name is not None: + struct_name = ( + "Struct" if "STRUCT" == line.strip() else line.split(":")[0].strip() + ) + new_struct = {} + current_struct[struct_name] = new_struct + nested_structs.append(current_struct) + current_struct = new_struct + is_within_struct = True + print(f"Created STRUCT: {struct_name}") + elif "END_STRUCT" in line and udt_name is not None: + current_struct = nested_structs.pop() if nested_structs else None + is_within_struct = bool(nested_structs) + print(f"Closed STRUCT in UDT '{udt_name}'") + elif udt_name and ":" in line and is_within_struct: + parts = line.split(":") + field_name = parts[0].strip() + field_details = parts[1].strip().split("//") + field_type = ( + field_details[0].replace(";", "").strip() + ) # Removing ';' from field type + field_comment = parts[1].split("//")[1].strip() if "//" in parts[1] else "" + if "Struct" in field_type: + new_struct = {} + current_struct[field_name] = new_struct + nested_structs.append(current_struct) + current_struct = new_struct + print(f"Opened inline STRUCT at field '{field_name}'") + else: + current_struct[field_name] = { + "type": field_type, + "comment": field_comment, + } + print( + f"Added field '{field_name}' to STRUCT: Type={field_type}, Comment={field_comment}" + ) + + return udt_json + + +def parse_dbs(lines, udts): + db_json = {} + db_name = None + nested_structs = [] + current_struct = None + is_within_struct = False + + for line in lines: + line = clean_line(line) + if "DATA_BLOCK" in line and "END_DATA_BLOCK" not in line: + db_name = extract_name(line) + db_json[db_name] = {} + current_struct = db_json[db_name] + print(f"Created DATA_BLOCK: {db_name}") + elif "END_DATA_BLOCK" in line: + print(f"Completed DATA_BLOCK: {db_name}") + db_name = None + nested_structs = [] + current_struct = None + is_within_struct = False + elif "STRUCT" in line and "END_STRUCT" not in line and db_name is not None: + struct_name = ( + "Struct" if "STRUCT" == line.strip() else line.split(":")[0].strip() + ) + new_struct = {} + current_struct[struct_name] = new_struct + nested_structs.append(current_struct) + current_struct = new_struct + is_within_struct = True + print(f"Created STRUCT in DB '{db_name}': {struct_name}") + elif "END_STRUCT" in line and db_name is not None: + current_struct = nested_structs.pop() if nested_structs else None + is_within_struct = bool(nested_structs) + print(f"Closed STRUCT in DB '{db_name}'") + elif db_name and ":" in line and is_within_struct: + parts = line.split(":") + field_name = parts[0].strip() + field_details = parts[1].strip().split("//") + field_type = ( + field_details[0].replace(";", "").strip() + ) # Removing ';' from field type + field_comment = parts[1].split("//")[1].strip() if "//" in parts[1] else "" + if "Struct" in field_type: + new_struct = {} + current_struct[field_name] = new_struct + nested_structs.append(current_struct) + current_struct = new_struct + print(f"Opened inline STRUCT at field '{field_name}' in DB '{db_name}'") + else: + current_struct[field_name] = { + "type": field_type, + "comment": field_comment, + } + print( + f"Added field '{field_name}' to STRUCT in DB '{db_name}': Type={field_type}, Comment={field_comment}" + ) + + return db_json \ No newline at end of file diff --git a/__pycache__/ExpandDB.cpython-310.pyc b/__pycache__/ExpandDB.cpython-310.pyc index 6cea9d1ec682bba82765a67d073296b802648251..b68b3487b464e0f27f921ee9bb2df56d8977f3af 100644 GIT binary patch delta 19 ZcmbOzG*O5vpO=@50SF!**~rDt2>>fe1XKV3 delta 19 ZcmbOzG*O5vpO=@50SG*%Y~*6+1OO((1B(Cv