Offsets funcionando. El problema era el uso de copy en vez de deepcopy al expandir las udt
This commit is contained in:
parent
ee112f5e77
commit
a4bc042b2c
33
CopyPaste.py
33
CopyPaste.py
|
@ -1,24 +1,19 @@
|
||||||
def handle_array_types(db_struct):
|
def calculate_offsets(db_struct, current_offset=0, parent=None):
|
||||||
"""
|
"""
|
||||||
Handle array types once all UDTs are expanded.
|
Recursively calculate byte offsets for each field in the DB structure considering special types.
|
||||||
This function modifies the structure in place.
|
|
||||||
"""
|
"""
|
||||||
|
last_key_was_bool = False
|
||||||
|
last_bit_offset = 0 # To track bit offsets within a byte
|
||||||
if isinstance(db_struct, dict):
|
if isinstance(db_struct, dict):
|
||||||
for key, value in list(db_struct.items()):
|
for key, value in list(db_struct.items()):
|
||||||
if isinstance(value, dict):
|
if isinstance(value, dict):
|
||||||
handle_array_types(value)
|
if "type" in value and not "offset" in value:
|
||||||
elif isinstance(value, str):
|
|
||||||
# Parsing array definitions, e.g., "Array[1..3] of Real"
|
current_offset = calculate_offsets(
|
||||||
match = re.match(r"Array\[(\d+)\.\.(\d+)\] of (\w+)", value)
|
value, current_offset, value
|
||||||
if match:
|
) # Recurse into nested structs
|
||||||
lower_bound, upper_bound, base_type = (
|
|
||||||
int(match.group(1)),
|
elif isinstance(db_struct, list):
|
||||||
int(match.group(2)),
|
for item in db_struct:
|
||||||
match.group(3),
|
current_offset = calculate_offsets(item, current_offset, parent)
|
||||||
)
|
return current_offset
|
||||||
# Expand this field into multiple fields
|
|
||||||
db_struct.pop(key) # Remove the original field
|
|
||||||
for i in range(lower_bound, upper_bound + 1):
|
|
||||||
db_struct[f"{key}_{i}"] = {"type": base_type, 'is_array_element': True}
|
|
||||||
print(
|
|
||||||
f"Expanded field '{key}' into array fields: {key}_{lower_bound} to {key}_{upper_bound} of type {base_type}
|
|
240
DB_Structure.csv
240
DB_Structure.csv
|
@ -22,129 +22,129 @@ MAIN.N9,Real,1236,DBD1236,.DB_IOT.ELECTRIC_POWER_FACTOR_D
|
||||||
MAIN.N10,Real,1240,DBD1240,.DB_IOT.ELECTRIC_POWER_HOUR_D
|
MAIN.N10,Real,1240,DBD1240,.DB_IOT.ELECTRIC_POWER_HOUR_D
|
||||||
MAIN.N11,Real,1244,DBD1244,.DB_IOT.ELECTRIC_POWER_WH
|
MAIN.N11,Real,1244,DBD1244,.DB_IOT.ELECTRIC_POWER_WH
|
||||||
SECT1,"""UDT SIPA SV Section""",1248,DBX1248.0,
|
SECT1,"""UDT SIPA SV Section""",1248,DBX1248.0,
|
||||||
SECT1.N1,DInt,1664,DBD1664,.DB_IOT.STATO_MACCHINA
|
SECT1.N1,DInt,1248,DBD1248,.DB_IOT.STATO_MACCHINA
|
||||||
SECT1.N2,DInt,1668,DBD1668,.DB_IOT.ALLARME_FERMO
|
SECT1.N2,DInt,1252,DBD1252,.DB_IOT.ALLARME_FERMO
|
||||||
SECT1.N3,DInt,1672,DBD1672,.DB_IOT.WARNING_ATTIVO (che compromette produzione)
|
SECT1.N3,DInt,1256,DBD1256,.DB_IOT.WARNING_ATTIVO (che compromette produzione)
|
||||||
SECT1.N4,Int,1676,DBW1676,.DB_IOT.STATO_OPERATIVO (Semaforo)
|
SECT1.N4,Int,1260,DBW1260,.DB_IOT.STATO_OPERATIVO (Semaforo)
|
||||||
SECT1.N5,Int,1678,DBW1678,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)"
|
SECT1.N5,Int,1262,DBW1262,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)"
|
||||||
SECT1.N6,DInt,1680,DBD1680,.DB_IOT.ALARM_STOP_NO
|
SECT1.N6,DInt,1264,DBD1264,.DB_IOT.ALARM_STOP_NO
|
||||||
SECT1.N7.V1,DInt,1684,DBD1684,PIECES_TOT
|
SECT1.N7.V1,DInt,1268,DBD1268,PIECES_TOT
|
||||||
SECT1.N7.V2,DInt,1688,DBD1688,PIECES_OK
|
SECT1.N7.V2,DInt,1272,DBD1272,PIECES_OK
|
||||||
SECT1.N7.V3,DInt,1692,DBD1692,PIECES_KO_1
|
SECT1.N7.V3,DInt,1276,DBD1276,PIECES_KO_1
|
||||||
SECT1.N7.V4,DInt,1696,DBD1696,PIECES_KO_2
|
SECT1.N7.V4,DInt,1280,DBD1280,PIECES_KO_2
|
||||||
SECT1.N7.V5,DInt,1700,DBD1700,PIECES_KO_3
|
SECT1.N7.V5,DInt,1284,DBD1284,PIECES_KO_3
|
||||||
SECT1.N7.V6,DInt,1704,DBD1704,PIECES_KO_4
|
SECT1.N7.V6,DInt,1288,DBD1288,PIECES_KO_4
|
||||||
SECT1.N7.V7,DInt,1708,DBD1708,PIECES_KO_5
|
SECT1.N7.V7,DInt,1292,DBD1292,PIECES_KO_5
|
||||||
SECT1.N7.V8,DInt,1712,DBD1712,PIECES_KO_6
|
SECT1.N7.V8,DInt,1296,DBD1296,PIECES_KO_6
|
||||||
SECT1.N7.V9,DInt,1716,DBD1716,PIECES_KO_7
|
SECT1.N7.V9,DInt,1300,DBD1300,PIECES_KO_7
|
||||||
SECT1.N7.V10,DInt,1720,DBD1720,PIECES_KO_8
|
SECT1.N7.V10,DInt,1304,DBD1304,PIECES_KO_8
|
||||||
SECT1.N7.V11,DInt,1724,DBD1724,PIECES_KO_9
|
SECT1.N7.V11,DInt,1308,DBD1308,PIECES_KO_9
|
||||||
SECT1.N7.V12,DInt,1728,DBD1728,PIECES_KO_10
|
SECT1.N7.V12,DInt,1312,DBD1312,PIECES_KO_10
|
||||||
SECT1.N7.V13,DInt,1732,DBD1732,T_ALARM_HOURS
|
SECT1.N7.V13,DInt,1316,DBD1316,T_ALARM_HOURS
|
||||||
SECT1.N7.V14,DInt,1736,DBD1736,T_DRY_CYCLE_HOURS
|
SECT1.N7.V14,DInt,1320,DBD1320,T_DRY_CYCLE_HOURS
|
||||||
SECT1.N7.V15,DInt,1740,DBD1740,T_POWERED_HOURS
|
SECT1.N7.V15,DInt,1324,DBD1324,T_POWERED_HOURS
|
||||||
SECT1.N7.V16,DInt,1744,DBD1744,T_PRODUCT_100_HOURS
|
SECT1.N7.V16,DInt,1328,DBD1328,T_PRODUCT_100_HOURS
|
||||||
SECT1.N7.V17,DInt,1748,DBD1748,T_PRODUCT_0_HOURS
|
SECT1.N7.V17,DInt,1332,DBD1332,T_PRODUCT_0_HOURS
|
||||||
SECT1.N7.V18,DInt,1752,DBD1752,T_STOP_HOURS
|
SECT1.N7.V18,DInt,1336,DBD1336,T_STOP_HOURS
|
||||||
SECT1.N7.V19,Int,1756,DBW1756,T_ALARM_MINUTES
|
SECT1.N7.V19,Int,1340,DBW1340,T_ALARM_MINUTES
|
||||||
SECT1.N7.V20,Int,1758,DBW1758,T_DRY_CYCLE_MINUTES
|
SECT1.N7.V20,Int,1342,DBW1342,T_DRY_CYCLE_MINUTES
|
||||||
SECT1.N7.V21,Int,1760,DBW1760,T_POWERED_MINUTES
|
SECT1.N7.V21,Int,1344,DBW1344,T_POWERED_MINUTES
|
||||||
SECT1.N7.V22,Int,1762,DBW1762,T_PRODUCT_100_MINUTES
|
SECT1.N7.V22,Int,1346,DBW1346,T_PRODUCT_100_MINUTES
|
||||||
SECT1.N7.V23,Int,1764,DBW1764,T_PRODUCT_0_MINUTES
|
SECT1.N7.V23,Int,1348,DBW1348,T_PRODUCT_0_MINUTES
|
||||||
SECT1.N7.V24,Int,1766,DBW1766,T_STOP_MINUTES
|
SECT1.N7.V24,Int,1350,DBW1350,T_STOP_MINUTES
|
||||||
SECT2,"""UDT SIPA SV Section""",1352,DBX1352.0,
|
SECT2,"""UDT SIPA SV Section""",1352,DBX1352.0,
|
||||||
SECT2.N1,DInt,1664,DBD1664,.DB_IOT.STATO_MACCHINA
|
SECT2.N1,DInt,1352,DBD1352,.DB_IOT.STATO_MACCHINA
|
||||||
SECT2.N2,DInt,1668,DBD1668,.DB_IOT.ALLARME_FERMO
|
SECT2.N2,DInt,1356,DBD1356,.DB_IOT.ALLARME_FERMO
|
||||||
SECT2.N3,DInt,1672,DBD1672,.DB_IOT.WARNING_ATTIVO (che compromette produzione)
|
SECT2.N3,DInt,1360,DBD1360,.DB_IOT.WARNING_ATTIVO (che compromette produzione)
|
||||||
SECT2.N4,Int,1676,DBW1676,.DB_IOT.STATO_OPERATIVO (Semaforo)
|
SECT2.N4,Int,1364,DBW1364,.DB_IOT.STATO_OPERATIVO (Semaforo)
|
||||||
SECT2.N5,Int,1678,DBW1678,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)"
|
SECT2.N5,Int,1366,DBW1366,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)"
|
||||||
SECT2.N6,DInt,1680,DBD1680,.DB_IOT.ALARM_STOP_NO
|
SECT2.N6,DInt,1368,DBD1368,.DB_IOT.ALARM_STOP_NO
|
||||||
SECT2.N7.V1,DInt,1684,DBD1684,PIECES_TOT
|
SECT2.N7.V1,DInt,1372,DBD1372,PIECES_TOT
|
||||||
SECT2.N7.V2,DInt,1688,DBD1688,PIECES_OK
|
SECT2.N7.V2,DInt,1376,DBD1376,PIECES_OK
|
||||||
SECT2.N7.V3,DInt,1692,DBD1692,PIECES_KO_1
|
SECT2.N7.V3,DInt,1380,DBD1380,PIECES_KO_1
|
||||||
SECT2.N7.V4,DInt,1696,DBD1696,PIECES_KO_2
|
SECT2.N7.V4,DInt,1384,DBD1384,PIECES_KO_2
|
||||||
SECT2.N7.V5,DInt,1700,DBD1700,PIECES_KO_3
|
SECT2.N7.V5,DInt,1388,DBD1388,PIECES_KO_3
|
||||||
SECT2.N7.V6,DInt,1704,DBD1704,PIECES_KO_4
|
SECT2.N7.V6,DInt,1392,DBD1392,PIECES_KO_4
|
||||||
SECT2.N7.V7,DInt,1708,DBD1708,PIECES_KO_5
|
SECT2.N7.V7,DInt,1396,DBD1396,PIECES_KO_5
|
||||||
SECT2.N7.V8,DInt,1712,DBD1712,PIECES_KO_6
|
SECT2.N7.V8,DInt,1400,DBD1400,PIECES_KO_6
|
||||||
SECT2.N7.V9,DInt,1716,DBD1716,PIECES_KO_7
|
SECT2.N7.V9,DInt,1404,DBD1404,PIECES_KO_7
|
||||||
SECT2.N7.V10,DInt,1720,DBD1720,PIECES_KO_8
|
SECT2.N7.V10,DInt,1408,DBD1408,PIECES_KO_8
|
||||||
SECT2.N7.V11,DInt,1724,DBD1724,PIECES_KO_9
|
SECT2.N7.V11,DInt,1412,DBD1412,PIECES_KO_9
|
||||||
SECT2.N7.V12,DInt,1728,DBD1728,PIECES_KO_10
|
SECT2.N7.V12,DInt,1416,DBD1416,PIECES_KO_10
|
||||||
SECT2.N7.V13,DInt,1732,DBD1732,T_ALARM_HOURS
|
SECT2.N7.V13,DInt,1420,DBD1420,T_ALARM_HOURS
|
||||||
SECT2.N7.V14,DInt,1736,DBD1736,T_DRY_CYCLE_HOURS
|
SECT2.N7.V14,DInt,1424,DBD1424,T_DRY_CYCLE_HOURS
|
||||||
SECT2.N7.V15,DInt,1740,DBD1740,T_POWERED_HOURS
|
SECT2.N7.V15,DInt,1428,DBD1428,T_POWERED_HOURS
|
||||||
SECT2.N7.V16,DInt,1744,DBD1744,T_PRODUCT_100_HOURS
|
SECT2.N7.V16,DInt,1432,DBD1432,T_PRODUCT_100_HOURS
|
||||||
SECT2.N7.V17,DInt,1748,DBD1748,T_PRODUCT_0_HOURS
|
SECT2.N7.V17,DInt,1436,DBD1436,T_PRODUCT_0_HOURS
|
||||||
SECT2.N7.V18,DInt,1752,DBD1752,T_STOP_HOURS
|
SECT2.N7.V18,DInt,1440,DBD1440,T_STOP_HOURS
|
||||||
SECT2.N7.V19,Int,1756,DBW1756,T_ALARM_MINUTES
|
SECT2.N7.V19,Int,1444,DBW1444,T_ALARM_MINUTES
|
||||||
SECT2.N7.V20,Int,1758,DBW1758,T_DRY_CYCLE_MINUTES
|
SECT2.N7.V20,Int,1446,DBW1446,T_DRY_CYCLE_MINUTES
|
||||||
SECT2.N7.V21,Int,1760,DBW1760,T_POWERED_MINUTES
|
SECT2.N7.V21,Int,1448,DBW1448,T_POWERED_MINUTES
|
||||||
SECT2.N7.V22,Int,1762,DBW1762,T_PRODUCT_100_MINUTES
|
SECT2.N7.V22,Int,1450,DBW1450,T_PRODUCT_100_MINUTES
|
||||||
SECT2.N7.V23,Int,1764,DBW1764,T_PRODUCT_0_MINUTES
|
SECT2.N7.V23,Int,1452,DBW1452,T_PRODUCT_0_MINUTES
|
||||||
SECT2.N7.V24,Int,1766,DBW1766,T_STOP_MINUTES
|
SECT2.N7.V24,Int,1454,DBW1454,T_STOP_MINUTES
|
||||||
SECT3,"""UDT SIPA SV Section""",1456,DBX1456.0,
|
SECT3,"""UDT SIPA SV Section""",1456,DBX1456.0,
|
||||||
SECT3.N1,DInt,1664,DBD1664,.DB_IOT.STATO_MACCHINA
|
SECT3.N1,DInt,1456,DBD1456,.DB_IOT.STATO_MACCHINA
|
||||||
SECT3.N2,DInt,1668,DBD1668,.DB_IOT.ALLARME_FERMO
|
SECT3.N2,DInt,1460,DBD1460,.DB_IOT.ALLARME_FERMO
|
||||||
SECT3.N3,DInt,1672,DBD1672,.DB_IOT.WARNING_ATTIVO (che compromette produzione)
|
SECT3.N3,DInt,1464,DBD1464,.DB_IOT.WARNING_ATTIVO (che compromette produzione)
|
||||||
SECT3.N4,Int,1676,DBW1676,.DB_IOT.STATO_OPERATIVO (Semaforo)
|
SECT3.N4,Int,1468,DBW1468,.DB_IOT.STATO_OPERATIVO (Semaforo)
|
||||||
SECT3.N5,Int,1678,DBW1678,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)"
|
SECT3.N5,Int,1470,DBW1470,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)"
|
||||||
SECT3.N6,DInt,1680,DBD1680,.DB_IOT.ALARM_STOP_NO
|
SECT3.N6,DInt,1472,DBD1472,.DB_IOT.ALARM_STOP_NO
|
||||||
SECT3.N7.V1,DInt,1684,DBD1684,PIECES_TOT
|
SECT3.N7.V1,DInt,1476,DBD1476,PIECES_TOT
|
||||||
SECT3.N7.V2,DInt,1688,DBD1688,PIECES_OK
|
SECT3.N7.V2,DInt,1480,DBD1480,PIECES_OK
|
||||||
SECT3.N7.V3,DInt,1692,DBD1692,PIECES_KO_1
|
SECT3.N7.V3,DInt,1484,DBD1484,PIECES_KO_1
|
||||||
SECT3.N7.V4,DInt,1696,DBD1696,PIECES_KO_2
|
SECT3.N7.V4,DInt,1488,DBD1488,PIECES_KO_2
|
||||||
SECT3.N7.V5,DInt,1700,DBD1700,PIECES_KO_3
|
SECT3.N7.V5,DInt,1492,DBD1492,PIECES_KO_3
|
||||||
SECT3.N7.V6,DInt,1704,DBD1704,PIECES_KO_4
|
SECT3.N7.V6,DInt,1496,DBD1496,PIECES_KO_4
|
||||||
SECT3.N7.V7,DInt,1708,DBD1708,PIECES_KO_5
|
SECT3.N7.V7,DInt,1500,DBD1500,PIECES_KO_5
|
||||||
SECT3.N7.V8,DInt,1712,DBD1712,PIECES_KO_6
|
SECT3.N7.V8,DInt,1504,DBD1504,PIECES_KO_6
|
||||||
SECT3.N7.V9,DInt,1716,DBD1716,PIECES_KO_7
|
SECT3.N7.V9,DInt,1508,DBD1508,PIECES_KO_7
|
||||||
SECT3.N7.V10,DInt,1720,DBD1720,PIECES_KO_8
|
SECT3.N7.V10,DInt,1512,DBD1512,PIECES_KO_8
|
||||||
SECT3.N7.V11,DInt,1724,DBD1724,PIECES_KO_9
|
SECT3.N7.V11,DInt,1516,DBD1516,PIECES_KO_9
|
||||||
SECT3.N7.V12,DInt,1728,DBD1728,PIECES_KO_10
|
SECT3.N7.V12,DInt,1520,DBD1520,PIECES_KO_10
|
||||||
SECT3.N7.V13,DInt,1732,DBD1732,T_ALARM_HOURS
|
SECT3.N7.V13,DInt,1524,DBD1524,T_ALARM_HOURS
|
||||||
SECT3.N7.V14,DInt,1736,DBD1736,T_DRY_CYCLE_HOURS
|
SECT3.N7.V14,DInt,1528,DBD1528,T_DRY_CYCLE_HOURS
|
||||||
SECT3.N7.V15,DInt,1740,DBD1740,T_POWERED_HOURS
|
SECT3.N7.V15,DInt,1532,DBD1532,T_POWERED_HOURS
|
||||||
SECT3.N7.V16,DInt,1744,DBD1744,T_PRODUCT_100_HOURS
|
SECT3.N7.V16,DInt,1536,DBD1536,T_PRODUCT_100_HOURS
|
||||||
SECT3.N7.V17,DInt,1748,DBD1748,T_PRODUCT_0_HOURS
|
SECT3.N7.V17,DInt,1540,DBD1540,T_PRODUCT_0_HOURS
|
||||||
SECT3.N7.V18,DInt,1752,DBD1752,T_STOP_HOURS
|
SECT3.N7.V18,DInt,1544,DBD1544,T_STOP_HOURS
|
||||||
SECT3.N7.V19,Int,1756,DBW1756,T_ALARM_MINUTES
|
SECT3.N7.V19,Int,1548,DBW1548,T_ALARM_MINUTES
|
||||||
SECT3.N7.V20,Int,1758,DBW1758,T_DRY_CYCLE_MINUTES
|
SECT3.N7.V20,Int,1550,DBW1550,T_DRY_CYCLE_MINUTES
|
||||||
SECT3.N7.V21,Int,1760,DBW1760,T_POWERED_MINUTES
|
SECT3.N7.V21,Int,1552,DBW1552,T_POWERED_MINUTES
|
||||||
SECT3.N7.V22,Int,1762,DBW1762,T_PRODUCT_100_MINUTES
|
SECT3.N7.V22,Int,1554,DBW1554,T_PRODUCT_100_MINUTES
|
||||||
SECT3.N7.V23,Int,1764,DBW1764,T_PRODUCT_0_MINUTES
|
SECT3.N7.V23,Int,1556,DBW1556,T_PRODUCT_0_MINUTES
|
||||||
SECT3.N7.V24,Int,1766,DBW1766,T_STOP_MINUTES
|
SECT3.N7.V24,Int,1558,DBW1558,T_STOP_MINUTES
|
||||||
SECT4,"""UDT SIPA SV Section""",1560,DBX1560.0,
|
SECT4,"""UDT SIPA SV Section""",1560,DBX1560.0,
|
||||||
SECT4.N1,DInt,1664,DBD1664,.DB_IOT.STATO_MACCHINA
|
SECT4.N1,DInt,1560,DBD1560,.DB_IOT.STATO_MACCHINA
|
||||||
SECT4.N2,DInt,1668,DBD1668,.DB_IOT.ALLARME_FERMO
|
SECT4.N2,DInt,1564,DBD1564,.DB_IOT.ALLARME_FERMO
|
||||||
SECT4.N3,DInt,1672,DBD1672,.DB_IOT.WARNING_ATTIVO (che compromette produzione)
|
SECT4.N3,DInt,1568,DBD1568,.DB_IOT.WARNING_ATTIVO (che compromette produzione)
|
||||||
SECT4.N4,Int,1676,DBW1676,.DB_IOT.STATO_OPERATIVO (Semaforo)
|
SECT4.N4,Int,1572,DBW1572,.DB_IOT.STATO_OPERATIVO (Semaforo)
|
||||||
SECT4.N5,Int,1678,DBW1678,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)"
|
SECT4.N5,Int,1574,DBW1574,".DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)"
|
||||||
SECT4.N6,DInt,1680,DBD1680,.DB_IOT.ALARM_STOP_NO
|
SECT4.N6,DInt,1576,DBD1576,.DB_IOT.ALARM_STOP_NO
|
||||||
SECT4.N7.V1,DInt,1684,DBD1684,PIECES_TOT
|
SECT4.N7.V1,DInt,1580,DBD1580,PIECES_TOT
|
||||||
SECT4.N7.V2,DInt,1688,DBD1688,PIECES_OK
|
SECT4.N7.V2,DInt,1584,DBD1584,PIECES_OK
|
||||||
SECT4.N7.V3,DInt,1692,DBD1692,PIECES_KO_1
|
SECT4.N7.V3,DInt,1588,DBD1588,PIECES_KO_1
|
||||||
SECT4.N7.V4,DInt,1696,DBD1696,PIECES_KO_2
|
SECT4.N7.V4,DInt,1592,DBD1592,PIECES_KO_2
|
||||||
SECT4.N7.V5,DInt,1700,DBD1700,PIECES_KO_3
|
SECT4.N7.V5,DInt,1596,DBD1596,PIECES_KO_3
|
||||||
SECT4.N7.V6,DInt,1704,DBD1704,PIECES_KO_4
|
SECT4.N7.V6,DInt,1600,DBD1600,PIECES_KO_4
|
||||||
SECT4.N7.V7,DInt,1708,DBD1708,PIECES_KO_5
|
SECT4.N7.V7,DInt,1604,DBD1604,PIECES_KO_5
|
||||||
SECT4.N7.V8,DInt,1712,DBD1712,PIECES_KO_6
|
SECT4.N7.V8,DInt,1608,DBD1608,PIECES_KO_6
|
||||||
SECT4.N7.V9,DInt,1716,DBD1716,PIECES_KO_7
|
SECT4.N7.V9,DInt,1612,DBD1612,PIECES_KO_7
|
||||||
SECT4.N7.V10,DInt,1720,DBD1720,PIECES_KO_8
|
SECT4.N7.V10,DInt,1616,DBD1616,PIECES_KO_8
|
||||||
SECT4.N7.V11,DInt,1724,DBD1724,PIECES_KO_9
|
SECT4.N7.V11,DInt,1620,DBD1620,PIECES_KO_9
|
||||||
SECT4.N7.V12,DInt,1728,DBD1728,PIECES_KO_10
|
SECT4.N7.V12,DInt,1624,DBD1624,PIECES_KO_10
|
||||||
SECT4.N7.V13,DInt,1732,DBD1732,T_ALARM_HOURS
|
SECT4.N7.V13,DInt,1628,DBD1628,T_ALARM_HOURS
|
||||||
SECT4.N7.V14,DInt,1736,DBD1736,T_DRY_CYCLE_HOURS
|
SECT4.N7.V14,DInt,1632,DBD1632,T_DRY_CYCLE_HOURS
|
||||||
SECT4.N7.V15,DInt,1740,DBD1740,T_POWERED_HOURS
|
SECT4.N7.V15,DInt,1636,DBD1636,T_POWERED_HOURS
|
||||||
SECT4.N7.V16,DInt,1744,DBD1744,T_PRODUCT_100_HOURS
|
SECT4.N7.V16,DInt,1640,DBD1640,T_PRODUCT_100_HOURS
|
||||||
SECT4.N7.V17,DInt,1748,DBD1748,T_PRODUCT_0_HOURS
|
SECT4.N7.V17,DInt,1644,DBD1644,T_PRODUCT_0_HOURS
|
||||||
SECT4.N7.V18,DInt,1752,DBD1752,T_STOP_HOURS
|
SECT4.N7.V18,DInt,1648,DBD1648,T_STOP_HOURS
|
||||||
SECT4.N7.V19,Int,1756,DBW1756,T_ALARM_MINUTES
|
SECT4.N7.V19,Int,1652,DBW1652,T_ALARM_MINUTES
|
||||||
SECT4.N7.V20,Int,1758,DBW1758,T_DRY_CYCLE_MINUTES
|
SECT4.N7.V20,Int,1654,DBW1654,T_DRY_CYCLE_MINUTES
|
||||||
SECT4.N7.V21,Int,1760,DBW1760,T_POWERED_MINUTES
|
SECT4.N7.V21,Int,1656,DBW1656,T_POWERED_MINUTES
|
||||||
SECT4.N7.V22,Int,1762,DBW1762,T_PRODUCT_100_MINUTES
|
SECT4.N7.V22,Int,1658,DBW1658,T_PRODUCT_100_MINUTES
|
||||||
SECT4.N7.V23,Int,1764,DBW1764,T_PRODUCT_0_MINUTES
|
SECT4.N7.V23,Int,1660,DBW1660,T_PRODUCT_0_MINUTES
|
||||||
SECT4.N7.V24,Int,1766,DBW1766,T_STOP_MINUTES
|
SECT4.N7.V24,Int,1662,DBW1662,T_STOP_MINUTES
|
||||||
SECT5,"""UDT SIPA SV Section""",1664,DBX1664.0,
|
SECT5,"""UDT SIPA SV Section""",1664,DBX1664.0,
|
||||||
SECT5.N1,DInt,1664,DBD1664,.DB_IOT.STATO_MACCHINA
|
SECT5.N1,DInt,1664,DBD1664,.DB_IOT.STATO_MACCHINA
|
||||||
SECT5.N2,DInt,1668,DBD1668,.DB_IOT.ALLARME_FERMO
|
SECT5.N2,DInt,1668,DBD1668,.DB_IOT.ALLARME_FERMO
|
||||||
|
|
|
Binary file not shown.
480
DB_Structure.xml
480
DB_Structure.xml
|
@ -158,183 +158,183 @@
|
||||||
<N1>
|
<N1>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.STATO_MACCHINA</comment>
|
<comment>.DB_IOT.STATO_MACCHINA</comment>
|
||||||
<offset>1664</offset>
|
<offset>1248</offset>
|
||||||
<plc_address>DBD1664</plc_address>
|
<plc_address>DBD1248</plc_address>
|
||||||
</N1>
|
</N1>
|
||||||
<N2>
|
<N2>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.ALLARME_FERMO</comment>
|
<comment>.DB_IOT.ALLARME_FERMO</comment>
|
||||||
<offset>1668</offset>
|
<offset>1252</offset>
|
||||||
<plc_address>DBD1668</plc_address>
|
<plc_address>DBD1252</plc_address>
|
||||||
</N2>
|
</N2>
|
||||||
<N3>
|
<N3>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.WARNING_ATTIVO (che compromette produzione)</comment>
|
<comment>.DB_IOT.WARNING_ATTIVO (che compromette produzione)</comment>
|
||||||
<offset>1672</offset>
|
<offset>1256</offset>
|
||||||
<plc_address>DBD1672</plc_address>
|
<plc_address>DBD1256</plc_address>
|
||||||
</N3>
|
</N3>
|
||||||
<N4>
|
<N4>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>.DB_IOT.STATO_OPERATIVO (Semaforo)</comment>
|
<comment>.DB_IOT.STATO_OPERATIVO (Semaforo)</comment>
|
||||||
<offset>1676</offset>
|
<offset>1260</offset>
|
||||||
<plc_address>DBW1676</plc_address>
|
<plc_address>DBW1260</plc_address>
|
||||||
</N4>
|
</N4>
|
||||||
<N5>
|
<N5>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>.DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)</comment>
|
<comment>.DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)</comment>
|
||||||
<offset>1678</offset>
|
<offset>1262</offset>
|
||||||
<plc_address>DBW1678</plc_address>
|
<plc_address>DBW1262</plc_address>
|
||||||
</N5>
|
</N5>
|
||||||
<N6>
|
<N6>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.ALARM_STOP_NO</comment>
|
<comment>.DB_IOT.ALARM_STOP_NO</comment>
|
||||||
<offset>1680</offset>
|
<offset>1264</offset>
|
||||||
<plc_address>DBD1680</plc_address>
|
<plc_address>DBD1264</plc_address>
|
||||||
</N6>
|
</N6>
|
||||||
<N7>
|
<N7>
|
||||||
<V1>
|
<V1>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_TOT</comment>
|
<comment>PIECES_TOT</comment>
|
||||||
<offset>1684</offset>
|
<offset>1268</offset>
|
||||||
<plc_address>DBD1684</plc_address>
|
<plc_address>DBD1268</plc_address>
|
||||||
</V1>
|
</V1>
|
||||||
<V2>
|
<V2>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_OK</comment>
|
<comment>PIECES_OK</comment>
|
||||||
<offset>1688</offset>
|
<offset>1272</offset>
|
||||||
<plc_address>DBD1688</plc_address>
|
<plc_address>DBD1272</plc_address>
|
||||||
</V2>
|
</V2>
|
||||||
<V3>
|
<V3>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_1</comment>
|
<comment>PIECES_KO_1</comment>
|
||||||
<offset>1692</offset>
|
<offset>1276</offset>
|
||||||
<plc_address>DBD1692</plc_address>
|
<plc_address>DBD1276</plc_address>
|
||||||
</V3>
|
</V3>
|
||||||
<V4>
|
<V4>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_2</comment>
|
<comment>PIECES_KO_2</comment>
|
||||||
<offset>1696</offset>
|
<offset>1280</offset>
|
||||||
<plc_address>DBD1696</plc_address>
|
<plc_address>DBD1280</plc_address>
|
||||||
</V4>
|
</V4>
|
||||||
<V5>
|
<V5>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_3</comment>
|
<comment>PIECES_KO_3</comment>
|
||||||
<offset>1700</offset>
|
<offset>1284</offset>
|
||||||
<plc_address>DBD1700</plc_address>
|
<plc_address>DBD1284</plc_address>
|
||||||
</V5>
|
</V5>
|
||||||
<V6>
|
<V6>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_4</comment>
|
<comment>PIECES_KO_4</comment>
|
||||||
<offset>1704</offset>
|
<offset>1288</offset>
|
||||||
<plc_address>DBD1704</plc_address>
|
<plc_address>DBD1288</plc_address>
|
||||||
</V6>
|
</V6>
|
||||||
<V7>
|
<V7>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_5</comment>
|
<comment>PIECES_KO_5</comment>
|
||||||
<offset>1708</offset>
|
<offset>1292</offset>
|
||||||
<plc_address>DBD1708</plc_address>
|
<plc_address>DBD1292</plc_address>
|
||||||
</V7>
|
</V7>
|
||||||
<V8>
|
<V8>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_6</comment>
|
<comment>PIECES_KO_6</comment>
|
||||||
<offset>1712</offset>
|
<offset>1296</offset>
|
||||||
<plc_address>DBD1712</plc_address>
|
<plc_address>DBD1296</plc_address>
|
||||||
</V8>
|
</V8>
|
||||||
<V9>
|
<V9>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_7</comment>
|
<comment>PIECES_KO_7</comment>
|
||||||
<offset>1716</offset>
|
<offset>1300</offset>
|
||||||
<plc_address>DBD1716</plc_address>
|
<plc_address>DBD1300</plc_address>
|
||||||
</V9>
|
</V9>
|
||||||
<V10>
|
<V10>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_8</comment>
|
<comment>PIECES_KO_8</comment>
|
||||||
<offset>1720</offset>
|
<offset>1304</offset>
|
||||||
<plc_address>DBD1720</plc_address>
|
<plc_address>DBD1304</plc_address>
|
||||||
</V10>
|
</V10>
|
||||||
<V11>
|
<V11>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_9</comment>
|
<comment>PIECES_KO_9</comment>
|
||||||
<offset>1724</offset>
|
<offset>1308</offset>
|
||||||
<plc_address>DBD1724</plc_address>
|
<plc_address>DBD1308</plc_address>
|
||||||
</V11>
|
</V11>
|
||||||
<V12>
|
<V12>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_10</comment>
|
<comment>PIECES_KO_10</comment>
|
||||||
<offset>1728</offset>
|
<offset>1312</offset>
|
||||||
<plc_address>DBD1728</plc_address>
|
<plc_address>DBD1312</plc_address>
|
||||||
</V12>
|
</V12>
|
||||||
<V13>
|
<V13>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_ALARM_HOURS</comment>
|
<comment>T_ALARM_HOURS</comment>
|
||||||
<offset>1732</offset>
|
<offset>1316</offset>
|
||||||
<plc_address>DBD1732</plc_address>
|
<plc_address>DBD1316</plc_address>
|
||||||
</V13>
|
</V13>
|
||||||
<V14>
|
<V14>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_DRY_CYCLE_HOURS</comment>
|
<comment>T_DRY_CYCLE_HOURS</comment>
|
||||||
<offset>1736</offset>
|
<offset>1320</offset>
|
||||||
<plc_address>DBD1736</plc_address>
|
<plc_address>DBD1320</plc_address>
|
||||||
</V14>
|
</V14>
|
||||||
<V15>
|
<V15>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_POWERED_HOURS</comment>
|
<comment>T_POWERED_HOURS</comment>
|
||||||
<offset>1740</offset>
|
<offset>1324</offset>
|
||||||
<plc_address>DBD1740</plc_address>
|
<plc_address>DBD1324</plc_address>
|
||||||
</V15>
|
</V15>
|
||||||
<V16>
|
<V16>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_PRODUCT_100_HOURS</comment>
|
<comment>T_PRODUCT_100_HOURS</comment>
|
||||||
<offset>1744</offset>
|
<offset>1328</offset>
|
||||||
<plc_address>DBD1744</plc_address>
|
<plc_address>DBD1328</plc_address>
|
||||||
</V16>
|
</V16>
|
||||||
<V17>
|
<V17>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_PRODUCT_0_HOURS</comment>
|
<comment>T_PRODUCT_0_HOURS</comment>
|
||||||
<offset>1748</offset>
|
<offset>1332</offset>
|
||||||
<plc_address>DBD1748</plc_address>
|
<plc_address>DBD1332</plc_address>
|
||||||
</V17>
|
</V17>
|
||||||
<V18>
|
<V18>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_STOP_HOURS</comment>
|
<comment>T_STOP_HOURS</comment>
|
||||||
<offset>1752</offset>
|
<offset>1336</offset>
|
||||||
<plc_address>DBD1752</plc_address>
|
<plc_address>DBD1336</plc_address>
|
||||||
</V18>
|
</V18>
|
||||||
<V19>
|
<V19>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_ALARM_MINUTES</comment>
|
<comment>T_ALARM_MINUTES</comment>
|
||||||
<offset>1756</offset>
|
<offset>1340</offset>
|
||||||
<plc_address>DBW1756</plc_address>
|
<plc_address>DBW1340</plc_address>
|
||||||
</V19>
|
</V19>
|
||||||
<V20>
|
<V20>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_DRY_CYCLE_MINUTES</comment>
|
<comment>T_DRY_CYCLE_MINUTES</comment>
|
||||||
<offset>1758</offset>
|
<offset>1342</offset>
|
||||||
<plc_address>DBW1758</plc_address>
|
<plc_address>DBW1342</plc_address>
|
||||||
</V20>
|
</V20>
|
||||||
<V21>
|
<V21>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_POWERED_MINUTES</comment>
|
<comment>T_POWERED_MINUTES</comment>
|
||||||
<offset>1760</offset>
|
<offset>1344</offset>
|
||||||
<plc_address>DBW1760</plc_address>
|
<plc_address>DBW1344</plc_address>
|
||||||
</V21>
|
</V21>
|
||||||
<V22>
|
<V22>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_PRODUCT_100_MINUTES</comment>
|
<comment>T_PRODUCT_100_MINUTES</comment>
|
||||||
<offset>1762</offset>
|
<offset>1346</offset>
|
||||||
<plc_address>DBW1762</plc_address>
|
<plc_address>DBW1346</plc_address>
|
||||||
</V22>
|
</V22>
|
||||||
<V23>
|
<V23>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_PRODUCT_0_MINUTES</comment>
|
<comment>T_PRODUCT_0_MINUTES</comment>
|
||||||
<offset>1764</offset>
|
<offset>1348</offset>
|
||||||
<plc_address>DBW1764</plc_address>
|
<plc_address>DBW1348</plc_address>
|
||||||
</V23>
|
</V23>
|
||||||
<V24>
|
<V24>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_STOP_MINUTES</comment>
|
<comment>T_STOP_MINUTES</comment>
|
||||||
<offset>1766</offset>
|
<offset>1350</offset>
|
||||||
<plc_address>DBW1766</plc_address>
|
<plc_address>DBW1350</plc_address>
|
||||||
</V24>
|
</V24>
|
||||||
</N7>
|
</N7>
|
||||||
</Struct>
|
</Struct>
|
||||||
|
@ -350,183 +350,183 @@
|
||||||
<N1>
|
<N1>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.STATO_MACCHINA</comment>
|
<comment>.DB_IOT.STATO_MACCHINA</comment>
|
||||||
<offset>1664</offset>
|
<offset>1352</offset>
|
||||||
<plc_address>DBD1664</plc_address>
|
<plc_address>DBD1352</plc_address>
|
||||||
</N1>
|
</N1>
|
||||||
<N2>
|
<N2>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.ALLARME_FERMO</comment>
|
<comment>.DB_IOT.ALLARME_FERMO</comment>
|
||||||
<offset>1668</offset>
|
<offset>1356</offset>
|
||||||
<plc_address>DBD1668</plc_address>
|
<plc_address>DBD1356</plc_address>
|
||||||
</N2>
|
</N2>
|
||||||
<N3>
|
<N3>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.WARNING_ATTIVO (che compromette produzione)</comment>
|
<comment>.DB_IOT.WARNING_ATTIVO (che compromette produzione)</comment>
|
||||||
<offset>1672</offset>
|
<offset>1360</offset>
|
||||||
<plc_address>DBD1672</plc_address>
|
<plc_address>DBD1360</plc_address>
|
||||||
</N3>
|
</N3>
|
||||||
<N4>
|
<N4>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>.DB_IOT.STATO_OPERATIVO (Semaforo)</comment>
|
<comment>.DB_IOT.STATO_OPERATIVO (Semaforo)</comment>
|
||||||
<offset>1676</offset>
|
<offset>1364</offset>
|
||||||
<plc_address>DBW1676</plc_address>
|
<plc_address>DBW1364</plc_address>
|
||||||
</N4>
|
</N4>
|
||||||
<N5>
|
<N5>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>.DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)</comment>
|
<comment>.DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)</comment>
|
||||||
<offset>1678</offset>
|
<offset>1366</offset>
|
||||||
<plc_address>DBW1678</plc_address>
|
<plc_address>DBW1366</plc_address>
|
||||||
</N5>
|
</N5>
|
||||||
<N6>
|
<N6>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.ALARM_STOP_NO</comment>
|
<comment>.DB_IOT.ALARM_STOP_NO</comment>
|
||||||
<offset>1680</offset>
|
<offset>1368</offset>
|
||||||
<plc_address>DBD1680</plc_address>
|
<plc_address>DBD1368</plc_address>
|
||||||
</N6>
|
</N6>
|
||||||
<N7>
|
<N7>
|
||||||
<V1>
|
<V1>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_TOT</comment>
|
<comment>PIECES_TOT</comment>
|
||||||
<offset>1684</offset>
|
<offset>1372</offset>
|
||||||
<plc_address>DBD1684</plc_address>
|
<plc_address>DBD1372</plc_address>
|
||||||
</V1>
|
</V1>
|
||||||
<V2>
|
<V2>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_OK</comment>
|
<comment>PIECES_OK</comment>
|
||||||
<offset>1688</offset>
|
<offset>1376</offset>
|
||||||
<plc_address>DBD1688</plc_address>
|
<plc_address>DBD1376</plc_address>
|
||||||
</V2>
|
</V2>
|
||||||
<V3>
|
<V3>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_1</comment>
|
<comment>PIECES_KO_1</comment>
|
||||||
<offset>1692</offset>
|
<offset>1380</offset>
|
||||||
<plc_address>DBD1692</plc_address>
|
<plc_address>DBD1380</plc_address>
|
||||||
</V3>
|
</V3>
|
||||||
<V4>
|
<V4>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_2</comment>
|
<comment>PIECES_KO_2</comment>
|
||||||
<offset>1696</offset>
|
<offset>1384</offset>
|
||||||
<plc_address>DBD1696</plc_address>
|
<plc_address>DBD1384</plc_address>
|
||||||
</V4>
|
</V4>
|
||||||
<V5>
|
<V5>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_3</comment>
|
<comment>PIECES_KO_3</comment>
|
||||||
<offset>1700</offset>
|
<offset>1388</offset>
|
||||||
<plc_address>DBD1700</plc_address>
|
<plc_address>DBD1388</plc_address>
|
||||||
</V5>
|
</V5>
|
||||||
<V6>
|
<V6>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_4</comment>
|
<comment>PIECES_KO_4</comment>
|
||||||
<offset>1704</offset>
|
<offset>1392</offset>
|
||||||
<plc_address>DBD1704</plc_address>
|
<plc_address>DBD1392</plc_address>
|
||||||
</V6>
|
</V6>
|
||||||
<V7>
|
<V7>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_5</comment>
|
<comment>PIECES_KO_5</comment>
|
||||||
<offset>1708</offset>
|
<offset>1396</offset>
|
||||||
<plc_address>DBD1708</plc_address>
|
<plc_address>DBD1396</plc_address>
|
||||||
</V7>
|
</V7>
|
||||||
<V8>
|
<V8>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_6</comment>
|
<comment>PIECES_KO_6</comment>
|
||||||
<offset>1712</offset>
|
<offset>1400</offset>
|
||||||
<plc_address>DBD1712</plc_address>
|
<plc_address>DBD1400</plc_address>
|
||||||
</V8>
|
</V8>
|
||||||
<V9>
|
<V9>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_7</comment>
|
<comment>PIECES_KO_7</comment>
|
||||||
<offset>1716</offset>
|
<offset>1404</offset>
|
||||||
<plc_address>DBD1716</plc_address>
|
<plc_address>DBD1404</plc_address>
|
||||||
</V9>
|
</V9>
|
||||||
<V10>
|
<V10>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_8</comment>
|
<comment>PIECES_KO_8</comment>
|
||||||
<offset>1720</offset>
|
<offset>1408</offset>
|
||||||
<plc_address>DBD1720</plc_address>
|
<plc_address>DBD1408</plc_address>
|
||||||
</V10>
|
</V10>
|
||||||
<V11>
|
<V11>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_9</comment>
|
<comment>PIECES_KO_9</comment>
|
||||||
<offset>1724</offset>
|
<offset>1412</offset>
|
||||||
<plc_address>DBD1724</plc_address>
|
<plc_address>DBD1412</plc_address>
|
||||||
</V11>
|
</V11>
|
||||||
<V12>
|
<V12>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_10</comment>
|
<comment>PIECES_KO_10</comment>
|
||||||
<offset>1728</offset>
|
<offset>1416</offset>
|
||||||
<plc_address>DBD1728</plc_address>
|
<plc_address>DBD1416</plc_address>
|
||||||
</V12>
|
</V12>
|
||||||
<V13>
|
<V13>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_ALARM_HOURS</comment>
|
<comment>T_ALARM_HOURS</comment>
|
||||||
<offset>1732</offset>
|
<offset>1420</offset>
|
||||||
<plc_address>DBD1732</plc_address>
|
<plc_address>DBD1420</plc_address>
|
||||||
</V13>
|
</V13>
|
||||||
<V14>
|
<V14>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_DRY_CYCLE_HOURS</comment>
|
<comment>T_DRY_CYCLE_HOURS</comment>
|
||||||
<offset>1736</offset>
|
<offset>1424</offset>
|
||||||
<plc_address>DBD1736</plc_address>
|
<plc_address>DBD1424</plc_address>
|
||||||
</V14>
|
</V14>
|
||||||
<V15>
|
<V15>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_POWERED_HOURS</comment>
|
<comment>T_POWERED_HOURS</comment>
|
||||||
<offset>1740</offset>
|
<offset>1428</offset>
|
||||||
<plc_address>DBD1740</plc_address>
|
<plc_address>DBD1428</plc_address>
|
||||||
</V15>
|
</V15>
|
||||||
<V16>
|
<V16>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_PRODUCT_100_HOURS</comment>
|
<comment>T_PRODUCT_100_HOURS</comment>
|
||||||
<offset>1744</offset>
|
<offset>1432</offset>
|
||||||
<plc_address>DBD1744</plc_address>
|
<plc_address>DBD1432</plc_address>
|
||||||
</V16>
|
</V16>
|
||||||
<V17>
|
<V17>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_PRODUCT_0_HOURS</comment>
|
<comment>T_PRODUCT_0_HOURS</comment>
|
||||||
<offset>1748</offset>
|
<offset>1436</offset>
|
||||||
<plc_address>DBD1748</plc_address>
|
<plc_address>DBD1436</plc_address>
|
||||||
</V17>
|
</V17>
|
||||||
<V18>
|
<V18>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_STOP_HOURS</comment>
|
<comment>T_STOP_HOURS</comment>
|
||||||
<offset>1752</offset>
|
<offset>1440</offset>
|
||||||
<plc_address>DBD1752</plc_address>
|
<plc_address>DBD1440</plc_address>
|
||||||
</V18>
|
</V18>
|
||||||
<V19>
|
<V19>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_ALARM_MINUTES</comment>
|
<comment>T_ALARM_MINUTES</comment>
|
||||||
<offset>1756</offset>
|
<offset>1444</offset>
|
||||||
<plc_address>DBW1756</plc_address>
|
<plc_address>DBW1444</plc_address>
|
||||||
</V19>
|
</V19>
|
||||||
<V20>
|
<V20>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_DRY_CYCLE_MINUTES</comment>
|
<comment>T_DRY_CYCLE_MINUTES</comment>
|
||||||
<offset>1758</offset>
|
<offset>1446</offset>
|
||||||
<plc_address>DBW1758</plc_address>
|
<plc_address>DBW1446</plc_address>
|
||||||
</V20>
|
</V20>
|
||||||
<V21>
|
<V21>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_POWERED_MINUTES</comment>
|
<comment>T_POWERED_MINUTES</comment>
|
||||||
<offset>1760</offset>
|
<offset>1448</offset>
|
||||||
<plc_address>DBW1760</plc_address>
|
<plc_address>DBW1448</plc_address>
|
||||||
</V21>
|
</V21>
|
||||||
<V22>
|
<V22>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_PRODUCT_100_MINUTES</comment>
|
<comment>T_PRODUCT_100_MINUTES</comment>
|
||||||
<offset>1762</offset>
|
<offset>1450</offset>
|
||||||
<plc_address>DBW1762</plc_address>
|
<plc_address>DBW1450</plc_address>
|
||||||
</V22>
|
</V22>
|
||||||
<V23>
|
<V23>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_PRODUCT_0_MINUTES</comment>
|
<comment>T_PRODUCT_0_MINUTES</comment>
|
||||||
<offset>1764</offset>
|
<offset>1452</offset>
|
||||||
<plc_address>DBW1764</plc_address>
|
<plc_address>DBW1452</plc_address>
|
||||||
</V23>
|
</V23>
|
||||||
<V24>
|
<V24>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_STOP_MINUTES</comment>
|
<comment>T_STOP_MINUTES</comment>
|
||||||
<offset>1766</offset>
|
<offset>1454</offset>
|
||||||
<plc_address>DBW1766</plc_address>
|
<plc_address>DBW1454</plc_address>
|
||||||
</V24>
|
</V24>
|
||||||
</N7>
|
</N7>
|
||||||
</Struct>
|
</Struct>
|
||||||
|
@ -542,183 +542,183 @@
|
||||||
<N1>
|
<N1>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.STATO_MACCHINA</comment>
|
<comment>.DB_IOT.STATO_MACCHINA</comment>
|
||||||
<offset>1664</offset>
|
<offset>1456</offset>
|
||||||
<plc_address>DBD1664</plc_address>
|
<plc_address>DBD1456</plc_address>
|
||||||
</N1>
|
</N1>
|
||||||
<N2>
|
<N2>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.ALLARME_FERMO</comment>
|
<comment>.DB_IOT.ALLARME_FERMO</comment>
|
||||||
<offset>1668</offset>
|
<offset>1460</offset>
|
||||||
<plc_address>DBD1668</plc_address>
|
<plc_address>DBD1460</plc_address>
|
||||||
</N2>
|
</N2>
|
||||||
<N3>
|
<N3>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.WARNING_ATTIVO (che compromette produzione)</comment>
|
<comment>.DB_IOT.WARNING_ATTIVO (che compromette produzione)</comment>
|
||||||
<offset>1672</offset>
|
<offset>1464</offset>
|
||||||
<plc_address>DBD1672</plc_address>
|
<plc_address>DBD1464</plc_address>
|
||||||
</N3>
|
</N3>
|
||||||
<N4>
|
<N4>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>.DB_IOT.STATO_OPERATIVO (Semaforo)</comment>
|
<comment>.DB_IOT.STATO_OPERATIVO (Semaforo)</comment>
|
||||||
<offset>1676</offset>
|
<offset>1468</offset>
|
||||||
<plc_address>DBW1676</plc_address>
|
<plc_address>DBW1468</plc_address>
|
||||||
</N4>
|
</N4>
|
||||||
<N5>
|
<N5>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>.DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)</comment>
|
<comment>.DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)</comment>
|
||||||
<offset>1678</offset>
|
<offset>1470</offset>
|
||||||
<plc_address>DBW1678</plc_address>
|
<plc_address>DBW1470</plc_address>
|
||||||
</N5>
|
</N5>
|
||||||
<N6>
|
<N6>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.ALARM_STOP_NO</comment>
|
<comment>.DB_IOT.ALARM_STOP_NO</comment>
|
||||||
<offset>1680</offset>
|
<offset>1472</offset>
|
||||||
<plc_address>DBD1680</plc_address>
|
<plc_address>DBD1472</plc_address>
|
||||||
</N6>
|
</N6>
|
||||||
<N7>
|
<N7>
|
||||||
<V1>
|
<V1>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_TOT</comment>
|
<comment>PIECES_TOT</comment>
|
||||||
<offset>1684</offset>
|
<offset>1476</offset>
|
||||||
<plc_address>DBD1684</plc_address>
|
<plc_address>DBD1476</plc_address>
|
||||||
</V1>
|
</V1>
|
||||||
<V2>
|
<V2>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_OK</comment>
|
<comment>PIECES_OK</comment>
|
||||||
<offset>1688</offset>
|
<offset>1480</offset>
|
||||||
<plc_address>DBD1688</plc_address>
|
<plc_address>DBD1480</plc_address>
|
||||||
</V2>
|
</V2>
|
||||||
<V3>
|
<V3>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_1</comment>
|
<comment>PIECES_KO_1</comment>
|
||||||
<offset>1692</offset>
|
<offset>1484</offset>
|
||||||
<plc_address>DBD1692</plc_address>
|
<plc_address>DBD1484</plc_address>
|
||||||
</V3>
|
</V3>
|
||||||
<V4>
|
<V4>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_2</comment>
|
<comment>PIECES_KO_2</comment>
|
||||||
<offset>1696</offset>
|
<offset>1488</offset>
|
||||||
<plc_address>DBD1696</plc_address>
|
<plc_address>DBD1488</plc_address>
|
||||||
</V4>
|
</V4>
|
||||||
<V5>
|
<V5>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_3</comment>
|
<comment>PIECES_KO_3</comment>
|
||||||
<offset>1700</offset>
|
<offset>1492</offset>
|
||||||
<plc_address>DBD1700</plc_address>
|
<plc_address>DBD1492</plc_address>
|
||||||
</V5>
|
</V5>
|
||||||
<V6>
|
<V6>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_4</comment>
|
<comment>PIECES_KO_4</comment>
|
||||||
<offset>1704</offset>
|
<offset>1496</offset>
|
||||||
<plc_address>DBD1704</plc_address>
|
<plc_address>DBD1496</plc_address>
|
||||||
</V6>
|
</V6>
|
||||||
<V7>
|
<V7>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_5</comment>
|
<comment>PIECES_KO_5</comment>
|
||||||
<offset>1708</offset>
|
<offset>1500</offset>
|
||||||
<plc_address>DBD1708</plc_address>
|
<plc_address>DBD1500</plc_address>
|
||||||
</V7>
|
</V7>
|
||||||
<V8>
|
<V8>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_6</comment>
|
<comment>PIECES_KO_6</comment>
|
||||||
<offset>1712</offset>
|
<offset>1504</offset>
|
||||||
<plc_address>DBD1712</plc_address>
|
<plc_address>DBD1504</plc_address>
|
||||||
</V8>
|
</V8>
|
||||||
<V9>
|
<V9>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_7</comment>
|
<comment>PIECES_KO_7</comment>
|
||||||
<offset>1716</offset>
|
<offset>1508</offset>
|
||||||
<plc_address>DBD1716</plc_address>
|
<plc_address>DBD1508</plc_address>
|
||||||
</V9>
|
</V9>
|
||||||
<V10>
|
<V10>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_8</comment>
|
<comment>PIECES_KO_8</comment>
|
||||||
<offset>1720</offset>
|
<offset>1512</offset>
|
||||||
<plc_address>DBD1720</plc_address>
|
<plc_address>DBD1512</plc_address>
|
||||||
</V10>
|
</V10>
|
||||||
<V11>
|
<V11>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_9</comment>
|
<comment>PIECES_KO_9</comment>
|
||||||
<offset>1724</offset>
|
<offset>1516</offset>
|
||||||
<plc_address>DBD1724</plc_address>
|
<plc_address>DBD1516</plc_address>
|
||||||
</V11>
|
</V11>
|
||||||
<V12>
|
<V12>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_10</comment>
|
<comment>PIECES_KO_10</comment>
|
||||||
<offset>1728</offset>
|
<offset>1520</offset>
|
||||||
<plc_address>DBD1728</plc_address>
|
<plc_address>DBD1520</plc_address>
|
||||||
</V12>
|
</V12>
|
||||||
<V13>
|
<V13>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_ALARM_HOURS</comment>
|
<comment>T_ALARM_HOURS</comment>
|
||||||
<offset>1732</offset>
|
<offset>1524</offset>
|
||||||
<plc_address>DBD1732</plc_address>
|
<plc_address>DBD1524</plc_address>
|
||||||
</V13>
|
</V13>
|
||||||
<V14>
|
<V14>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_DRY_CYCLE_HOURS</comment>
|
<comment>T_DRY_CYCLE_HOURS</comment>
|
||||||
<offset>1736</offset>
|
<offset>1528</offset>
|
||||||
<plc_address>DBD1736</plc_address>
|
<plc_address>DBD1528</plc_address>
|
||||||
</V14>
|
</V14>
|
||||||
<V15>
|
<V15>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_POWERED_HOURS</comment>
|
<comment>T_POWERED_HOURS</comment>
|
||||||
<offset>1740</offset>
|
<offset>1532</offset>
|
||||||
<plc_address>DBD1740</plc_address>
|
<plc_address>DBD1532</plc_address>
|
||||||
</V15>
|
</V15>
|
||||||
<V16>
|
<V16>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_PRODUCT_100_HOURS</comment>
|
<comment>T_PRODUCT_100_HOURS</comment>
|
||||||
<offset>1744</offset>
|
<offset>1536</offset>
|
||||||
<plc_address>DBD1744</plc_address>
|
<plc_address>DBD1536</plc_address>
|
||||||
</V16>
|
</V16>
|
||||||
<V17>
|
<V17>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_PRODUCT_0_HOURS</comment>
|
<comment>T_PRODUCT_0_HOURS</comment>
|
||||||
<offset>1748</offset>
|
<offset>1540</offset>
|
||||||
<plc_address>DBD1748</plc_address>
|
<plc_address>DBD1540</plc_address>
|
||||||
</V17>
|
</V17>
|
||||||
<V18>
|
<V18>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_STOP_HOURS</comment>
|
<comment>T_STOP_HOURS</comment>
|
||||||
<offset>1752</offset>
|
<offset>1544</offset>
|
||||||
<plc_address>DBD1752</plc_address>
|
<plc_address>DBD1544</plc_address>
|
||||||
</V18>
|
</V18>
|
||||||
<V19>
|
<V19>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_ALARM_MINUTES</comment>
|
<comment>T_ALARM_MINUTES</comment>
|
||||||
<offset>1756</offset>
|
<offset>1548</offset>
|
||||||
<plc_address>DBW1756</plc_address>
|
<plc_address>DBW1548</plc_address>
|
||||||
</V19>
|
</V19>
|
||||||
<V20>
|
<V20>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_DRY_CYCLE_MINUTES</comment>
|
<comment>T_DRY_CYCLE_MINUTES</comment>
|
||||||
<offset>1758</offset>
|
<offset>1550</offset>
|
||||||
<plc_address>DBW1758</plc_address>
|
<plc_address>DBW1550</plc_address>
|
||||||
</V20>
|
</V20>
|
||||||
<V21>
|
<V21>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_POWERED_MINUTES</comment>
|
<comment>T_POWERED_MINUTES</comment>
|
||||||
<offset>1760</offset>
|
<offset>1552</offset>
|
||||||
<plc_address>DBW1760</plc_address>
|
<plc_address>DBW1552</plc_address>
|
||||||
</V21>
|
</V21>
|
||||||
<V22>
|
<V22>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_PRODUCT_100_MINUTES</comment>
|
<comment>T_PRODUCT_100_MINUTES</comment>
|
||||||
<offset>1762</offset>
|
<offset>1554</offset>
|
||||||
<plc_address>DBW1762</plc_address>
|
<plc_address>DBW1554</plc_address>
|
||||||
</V22>
|
</V22>
|
||||||
<V23>
|
<V23>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_PRODUCT_0_MINUTES</comment>
|
<comment>T_PRODUCT_0_MINUTES</comment>
|
||||||
<offset>1764</offset>
|
<offset>1556</offset>
|
||||||
<plc_address>DBW1764</plc_address>
|
<plc_address>DBW1556</plc_address>
|
||||||
</V23>
|
</V23>
|
||||||
<V24>
|
<V24>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_STOP_MINUTES</comment>
|
<comment>T_STOP_MINUTES</comment>
|
||||||
<offset>1766</offset>
|
<offset>1558</offset>
|
||||||
<plc_address>DBW1766</plc_address>
|
<plc_address>DBW1558</plc_address>
|
||||||
</V24>
|
</V24>
|
||||||
</N7>
|
</N7>
|
||||||
</Struct>
|
</Struct>
|
||||||
|
@ -734,183 +734,183 @@
|
||||||
<N1>
|
<N1>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.STATO_MACCHINA</comment>
|
<comment>.DB_IOT.STATO_MACCHINA</comment>
|
||||||
<offset>1664</offset>
|
<offset>1560</offset>
|
||||||
<plc_address>DBD1664</plc_address>
|
<plc_address>DBD1560</plc_address>
|
||||||
</N1>
|
</N1>
|
||||||
<N2>
|
<N2>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.ALLARME_FERMO</comment>
|
<comment>.DB_IOT.ALLARME_FERMO</comment>
|
||||||
<offset>1668</offset>
|
<offset>1564</offset>
|
||||||
<plc_address>DBD1668</plc_address>
|
<plc_address>DBD1564</plc_address>
|
||||||
</N2>
|
</N2>
|
||||||
<N3>
|
<N3>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.WARNING_ATTIVO (che compromette produzione)</comment>
|
<comment>.DB_IOT.WARNING_ATTIVO (che compromette produzione)</comment>
|
||||||
<offset>1672</offset>
|
<offset>1568</offset>
|
||||||
<plc_address>DBD1672</plc_address>
|
<plc_address>DBD1568</plc_address>
|
||||||
</N3>
|
</N3>
|
||||||
<N4>
|
<N4>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>.DB_IOT.STATO_OPERATIVO (Semaforo)</comment>
|
<comment>.DB_IOT.STATO_OPERATIVO (Semaforo)</comment>
|
||||||
<offset>1676</offset>
|
<offset>1572</offset>
|
||||||
<plc_address>DBW1676</plc_address>
|
<plc_address>DBW1572</plc_address>
|
||||||
</N4>
|
</N4>
|
||||||
<N5>
|
<N5>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>.DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)</comment>
|
<comment>.DB_IOT.MODO_OPERATIVO (Prod,Simula,Man, ecc)</comment>
|
||||||
<offset>1678</offset>
|
<offset>1574</offset>
|
||||||
<plc_address>DBW1678</plc_address>
|
<plc_address>DBW1574</plc_address>
|
||||||
</N5>
|
</N5>
|
||||||
<N6>
|
<N6>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>.DB_IOT.ALARM_STOP_NO</comment>
|
<comment>.DB_IOT.ALARM_STOP_NO</comment>
|
||||||
<offset>1680</offset>
|
<offset>1576</offset>
|
||||||
<plc_address>DBD1680</plc_address>
|
<plc_address>DBD1576</plc_address>
|
||||||
</N6>
|
</N6>
|
||||||
<N7>
|
<N7>
|
||||||
<V1>
|
<V1>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_TOT</comment>
|
<comment>PIECES_TOT</comment>
|
||||||
<offset>1684</offset>
|
<offset>1580</offset>
|
||||||
<plc_address>DBD1684</plc_address>
|
<plc_address>DBD1580</plc_address>
|
||||||
</V1>
|
</V1>
|
||||||
<V2>
|
<V2>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_OK</comment>
|
<comment>PIECES_OK</comment>
|
||||||
<offset>1688</offset>
|
<offset>1584</offset>
|
||||||
<plc_address>DBD1688</plc_address>
|
<plc_address>DBD1584</plc_address>
|
||||||
</V2>
|
</V2>
|
||||||
<V3>
|
<V3>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_1</comment>
|
<comment>PIECES_KO_1</comment>
|
||||||
<offset>1692</offset>
|
<offset>1588</offset>
|
||||||
<plc_address>DBD1692</plc_address>
|
<plc_address>DBD1588</plc_address>
|
||||||
</V3>
|
</V3>
|
||||||
<V4>
|
<V4>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_2</comment>
|
<comment>PIECES_KO_2</comment>
|
||||||
<offset>1696</offset>
|
<offset>1592</offset>
|
||||||
<plc_address>DBD1696</plc_address>
|
<plc_address>DBD1592</plc_address>
|
||||||
</V4>
|
</V4>
|
||||||
<V5>
|
<V5>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_3</comment>
|
<comment>PIECES_KO_3</comment>
|
||||||
<offset>1700</offset>
|
<offset>1596</offset>
|
||||||
<plc_address>DBD1700</plc_address>
|
<plc_address>DBD1596</plc_address>
|
||||||
</V5>
|
</V5>
|
||||||
<V6>
|
<V6>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_4</comment>
|
<comment>PIECES_KO_4</comment>
|
||||||
<offset>1704</offset>
|
<offset>1600</offset>
|
||||||
<plc_address>DBD1704</plc_address>
|
<plc_address>DBD1600</plc_address>
|
||||||
</V6>
|
</V6>
|
||||||
<V7>
|
<V7>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_5</comment>
|
<comment>PIECES_KO_5</comment>
|
||||||
<offset>1708</offset>
|
<offset>1604</offset>
|
||||||
<plc_address>DBD1708</plc_address>
|
<plc_address>DBD1604</plc_address>
|
||||||
</V7>
|
</V7>
|
||||||
<V8>
|
<V8>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_6</comment>
|
<comment>PIECES_KO_6</comment>
|
||||||
<offset>1712</offset>
|
<offset>1608</offset>
|
||||||
<plc_address>DBD1712</plc_address>
|
<plc_address>DBD1608</plc_address>
|
||||||
</V8>
|
</V8>
|
||||||
<V9>
|
<V9>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_7</comment>
|
<comment>PIECES_KO_7</comment>
|
||||||
<offset>1716</offset>
|
<offset>1612</offset>
|
||||||
<plc_address>DBD1716</plc_address>
|
<plc_address>DBD1612</plc_address>
|
||||||
</V9>
|
</V9>
|
||||||
<V10>
|
<V10>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_8</comment>
|
<comment>PIECES_KO_8</comment>
|
||||||
<offset>1720</offset>
|
<offset>1616</offset>
|
||||||
<plc_address>DBD1720</plc_address>
|
<plc_address>DBD1616</plc_address>
|
||||||
</V10>
|
</V10>
|
||||||
<V11>
|
<V11>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_9</comment>
|
<comment>PIECES_KO_9</comment>
|
||||||
<offset>1724</offset>
|
<offset>1620</offset>
|
||||||
<plc_address>DBD1724</plc_address>
|
<plc_address>DBD1620</plc_address>
|
||||||
</V11>
|
</V11>
|
||||||
<V12>
|
<V12>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>PIECES_KO_10</comment>
|
<comment>PIECES_KO_10</comment>
|
||||||
<offset>1728</offset>
|
<offset>1624</offset>
|
||||||
<plc_address>DBD1728</plc_address>
|
<plc_address>DBD1624</plc_address>
|
||||||
</V12>
|
</V12>
|
||||||
<V13>
|
<V13>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_ALARM_HOURS</comment>
|
<comment>T_ALARM_HOURS</comment>
|
||||||
<offset>1732</offset>
|
<offset>1628</offset>
|
||||||
<plc_address>DBD1732</plc_address>
|
<plc_address>DBD1628</plc_address>
|
||||||
</V13>
|
</V13>
|
||||||
<V14>
|
<V14>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_DRY_CYCLE_HOURS</comment>
|
<comment>T_DRY_CYCLE_HOURS</comment>
|
||||||
<offset>1736</offset>
|
<offset>1632</offset>
|
||||||
<plc_address>DBD1736</plc_address>
|
<plc_address>DBD1632</plc_address>
|
||||||
</V14>
|
</V14>
|
||||||
<V15>
|
<V15>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_POWERED_HOURS</comment>
|
<comment>T_POWERED_HOURS</comment>
|
||||||
<offset>1740</offset>
|
<offset>1636</offset>
|
||||||
<plc_address>DBD1740</plc_address>
|
<plc_address>DBD1636</plc_address>
|
||||||
</V15>
|
</V15>
|
||||||
<V16>
|
<V16>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_PRODUCT_100_HOURS</comment>
|
<comment>T_PRODUCT_100_HOURS</comment>
|
||||||
<offset>1744</offset>
|
<offset>1640</offset>
|
||||||
<plc_address>DBD1744</plc_address>
|
<plc_address>DBD1640</plc_address>
|
||||||
</V16>
|
</V16>
|
||||||
<V17>
|
<V17>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_PRODUCT_0_HOURS</comment>
|
<comment>T_PRODUCT_0_HOURS</comment>
|
||||||
<offset>1748</offset>
|
<offset>1644</offset>
|
||||||
<plc_address>DBD1748</plc_address>
|
<plc_address>DBD1644</plc_address>
|
||||||
</V17>
|
</V17>
|
||||||
<V18>
|
<V18>
|
||||||
<type>DInt</type>
|
<type>DInt</type>
|
||||||
<comment>T_STOP_HOURS</comment>
|
<comment>T_STOP_HOURS</comment>
|
||||||
<offset>1752</offset>
|
<offset>1648</offset>
|
||||||
<plc_address>DBD1752</plc_address>
|
<plc_address>DBD1648</plc_address>
|
||||||
</V18>
|
</V18>
|
||||||
<V19>
|
<V19>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_ALARM_MINUTES</comment>
|
<comment>T_ALARM_MINUTES</comment>
|
||||||
<offset>1756</offset>
|
<offset>1652</offset>
|
||||||
<plc_address>DBW1756</plc_address>
|
<plc_address>DBW1652</plc_address>
|
||||||
</V19>
|
</V19>
|
||||||
<V20>
|
<V20>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_DRY_CYCLE_MINUTES</comment>
|
<comment>T_DRY_CYCLE_MINUTES</comment>
|
||||||
<offset>1758</offset>
|
<offset>1654</offset>
|
||||||
<plc_address>DBW1758</plc_address>
|
<plc_address>DBW1654</plc_address>
|
||||||
</V20>
|
</V20>
|
||||||
<V21>
|
<V21>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_POWERED_MINUTES</comment>
|
<comment>T_POWERED_MINUTES</comment>
|
||||||
<offset>1760</offset>
|
<offset>1656</offset>
|
||||||
<plc_address>DBW1760</plc_address>
|
<plc_address>DBW1656</plc_address>
|
||||||
</V21>
|
</V21>
|
||||||
<V22>
|
<V22>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_PRODUCT_100_MINUTES</comment>
|
<comment>T_PRODUCT_100_MINUTES</comment>
|
||||||
<offset>1762</offset>
|
<offset>1658</offset>
|
||||||
<plc_address>DBW1762</plc_address>
|
<plc_address>DBW1658</plc_address>
|
||||||
</V22>
|
</V22>
|
||||||
<V23>
|
<V23>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_PRODUCT_0_MINUTES</comment>
|
<comment>T_PRODUCT_0_MINUTES</comment>
|
||||||
<offset>1764</offset>
|
<offset>1660</offset>
|
||||||
<plc_address>DBW1764</plc_address>
|
<plc_address>DBW1660</plc_address>
|
||||||
</V23>
|
</V23>
|
||||||
<V24>
|
<V24>
|
||||||
<type>Int</type>
|
<type>Int</type>
|
||||||
<comment>T_STOP_MINUTES</comment>
|
<comment>T_STOP_MINUTES</comment>
|
||||||
<offset>1766</offset>
|
<offset>1662</offset>
|
||||||
<plc_address>DBW1766</plc_address>
|
<plc_address>DBW1662</plc_address>
|
||||||
</V24>
|
</V24>
|
||||||
</N7>
|
</N7>
|
||||||
</Struct>
|
</Struct>
|
||||||
|
|
|
@ -158,11 +158,6 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
expand_dbs(udt_json, db_json) # Expand DBs with UDT definitions
|
expand_dbs(udt_json, db_json) # Expand DBs with UDT definitions
|
||||||
|
|
||||||
for db_name, db_content in db_json.items():
|
|
||||||
calculate_offsets(
|
|
||||||
db_content
|
|
||||||
) # Calculate offsets including special handling for Bool and String
|
|
||||||
|
|
||||||
# Display the expanded DBs as a table
|
# Display the expanded DBs as a table
|
||||||
df = display_as_table(db_json)
|
df = display_as_table(db_json)
|
||||||
save_dataframe_to_file(df) # Save the DataFrame to a CSV file
|
save_dataframe_to_file(df) # Save the DataFrame to a CSV file
|
||||||
|
|
96
ExpandDB.py
96
ExpandDB.py
|
@ -1,6 +1,15 @@
|
||||||
import re
|
import re
|
||||||
import json
|
import json
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
import pprint
|
||||||
|
from copy import deepcopy
|
||||||
|
|
||||||
|
|
||||||
|
def debug_print_db_struct(db_struct):
|
||||||
|
pprint.pprint(
|
||||||
|
db_struct, width=80, indent=2
|
||||||
|
) # Ajusta el parámetro 'width' según necesidad
|
||||||
|
|
||||||
|
|
||||||
def expand_udt_references(db_struct, udts):
|
def expand_udt_references(db_struct, udts):
|
||||||
"""
|
"""
|
||||||
|
@ -17,11 +26,9 @@ def expand_udt_references(db_struct, udts):
|
||||||
'"'
|
'"'
|
||||||
) # Remove quotes which may wrap UDT names with spaces
|
) # Remove quotes which may wrap UDT names with spaces
|
||||||
if type_name in udts:
|
if type_name in udts:
|
||||||
# Replace the UDT reference with its definition, if it exists
|
# Replace the UDT reference with its deeply copied definition
|
||||||
db_struct["fields"] = udts[
|
db_struct["fields"] = deepcopy(udts[type_name])
|
||||||
type_name
|
print(f"Expanded UDT '{type_name}' at field '{key}'")
|
||||||
].copy() # Assume structure to insert is under 'fields'
|
|
||||||
print(f"Expanded UDT '{type_name}' at field '{key}' ")
|
|
||||||
elif isinstance(db_struct, list):
|
elif isinstance(db_struct, list):
|
||||||
for item in db_struct:
|
for item in db_struct:
|
||||||
expand_udt_references(item, udts)
|
expand_udt_references(item, udts)
|
||||||
|
@ -38,21 +45,27 @@ def handle_array_types(db_struct):
|
||||||
# Recursively process nested dictionaries
|
# Recursively process nested dictionaries
|
||||||
handle_array_types(value)
|
handle_array_types(value)
|
||||||
|
|
||||||
if isinstance(value, dict) and 'type' in value:
|
if isinstance(value, dict) and "type" in value:
|
||||||
match = re.match(r"Array\[(\d+)\.\.(\d+)\] of (\w+)", value['type'])
|
match = re.match(r"Array\[(\d+)\.\.(\d+)\] of (\w+)", value["type"])
|
||||||
if match:
|
if match:
|
||||||
lower_bound, upper_bound, base_type = int(match.group(1)), int(match.group(2)), match.group(3)
|
lower_bound, upper_bound, base_type = (
|
||||||
comment = value.get('comment', '')
|
int(match.group(1)),
|
||||||
|
int(match.group(2)),
|
||||||
|
match.group(3),
|
||||||
|
)
|
||||||
|
comment = value.get("comment", "")
|
||||||
|
|
||||||
# Instead of popping the original key, initialize a sub-dictionary
|
# Instead of popping the original key, initialize a sub-dictionary
|
||||||
value['Array'] = {} # Initialize a sub-dictionary for array elements
|
value["Array"] = (
|
||||||
|
{}
|
||||||
|
) # Initialize a sub-dictionary for array elements
|
||||||
|
|
||||||
for i in range(lower_bound, upper_bound + 1):
|
for i in range(lower_bound, upper_bound + 1):
|
||||||
element_key = f"[{i}]"
|
element_key = f"[{i}]"
|
||||||
value['Array'][element_key] = {
|
value["Array"][element_key] = {
|
||||||
'type': base_type,
|
"type": base_type,
|
||||||
'comment': comment,
|
"comment": comment,
|
||||||
'is_array_element': True
|
"is_array_element": True,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Optionally, modify or remove the original type designation if necessary
|
# Optionally, modify or remove the original type designation if necessary
|
||||||
|
@ -63,9 +76,6 @@ def handle_array_types(db_struct):
|
||||||
handle_array_types(value)
|
handle_array_types(value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type_sizes = {
|
type_sizes = {
|
||||||
"Int": 2,
|
"Int": 2,
|
||||||
"DInt": 4,
|
"DInt": 4,
|
||||||
|
@ -80,9 +90,7 @@ def calculate_plc_address(type_name, byte_offset, bit_offset=None):
|
||||||
"""
|
"""
|
||||||
Calculate the PLC address notation based on byte size, byte offset and bit offset.
|
Calculate the PLC address notation based on byte size, byte offset and bit offset.
|
||||||
"""
|
"""
|
||||||
byte_size = type_sizes.get(
|
byte_size = type_sizes.get(type_name, 0)
|
||||||
type_name, 0
|
|
||||||
)
|
|
||||||
if type_name == "Bool":
|
if type_name == "Bool":
|
||||||
if bit_offset is not None:
|
if bit_offset is not None:
|
||||||
return f"DBX{byte_offset}.{bit_offset}" # Address for single bits
|
return f"DBX{byte_offset}.{bit_offset}" # Address for single bits
|
||||||
|
@ -95,31 +103,35 @@ def calculate_plc_address(type_name, byte_offset, bit_offset=None):
|
||||||
return f"DBX{byte_offset}.0" # Default to bit address for types longer than 4 bytes (e.g., strings)
|
return f"DBX{byte_offset}.0" # Default to bit address for types longer than 4 bytes (e.g., strings)
|
||||||
|
|
||||||
|
|
||||||
def calculate_offsets(db_struct, current_offset=0, parent=None):
|
def calculate_offsets(db_struct, current_offset=0):
|
||||||
"""
|
"""
|
||||||
Recursively calculate byte offsets for each field in the DB structure considering special types.
|
Recursively calculate byte offsets for each field in the DB structure considering special types.
|
||||||
"""
|
"""
|
||||||
|
is_array_element = False
|
||||||
last_key_was_bool = False
|
last_key_was_bool = False
|
||||||
last_bit_offset = 0 # To track bit offsets within a byte
|
last_bit_offset = 0 # To track bit offsets within a byte
|
||||||
if isinstance(db_struct, dict):
|
if isinstance(db_struct, dict):
|
||||||
for key, value in list(db_struct.items()):
|
for key, value in db_struct.items():
|
||||||
if isinstance(value, dict):
|
# Skip 'fields' and 'Struct' keys in the name path
|
||||||
if "type" in value:
|
#
|
||||||
|
if (
|
||||||
|
isinstance(value, dict) and "type" in value
|
||||||
|
): # Directly a field with 'type'
|
||||||
type_name = value["type"]
|
type_name = value["type"]
|
||||||
is_array_element = value.get('is_array_element', False)
|
is_array_element = value.get("is_array_element", False)
|
||||||
size = type_sizes.get(
|
size = type_sizes.get(
|
||||||
type_name, 0
|
type_name, 0
|
||||||
) # Default to 1 byte if type is not recognized
|
) # Default to 1 byte if type is not recognized
|
||||||
|
|
||||||
if not is_array_element and current_offset % 2 != 0:
|
if not is_array_element and current_offset % 2 != 0:
|
||||||
current_offset += 1 # Align to the next even offset if it's not an array element
|
current_offset += (
|
||||||
|
1 # Align to the next even offset if it's not an array element
|
||||||
|
)
|
||||||
last_bit_offset = 0
|
last_bit_offset = 0
|
||||||
|
|
||||||
plc_address = value.get('plc_address', False)
|
plc_address = calculate_plc_address(
|
||||||
if plc_address is not False:
|
type_name, current_offset, last_bit_offset
|
||||||
print("Address Already Calcolated!")
|
)
|
||||||
|
|
||||||
plc_address = calculate_plc_address(type_name, current_offset, last_bit_offset)
|
|
||||||
|
|
||||||
# Special handling for String types
|
# Special handling for String types
|
||||||
if "String" in type_name:
|
if "String" in type_name:
|
||||||
|
@ -127,9 +139,13 @@ def calculate_offsets(db_struct, current_offset=0, parent=None):
|
||||||
last_bit_offset = 0
|
last_bit_offset = 0
|
||||||
if match:
|
if match:
|
||||||
length = int(match.group(1))
|
length = int(match.group(1))
|
||||||
size = length + 2 # Account for null-termination and string length prefix
|
size = (
|
||||||
|
length + 2
|
||||||
|
) # Account for null-termination and string length prefix
|
||||||
else:
|
else:
|
||||||
size = type_sizes.get(type_name, 1) # Default to generic size if not an array
|
size = type_sizes.get(
|
||||||
|
type_name, 1
|
||||||
|
) # Default to generic size if not an array
|
||||||
|
|
||||||
# Adjusting Bool sizes based on grouping
|
# Adjusting Bool sizes based on grouping
|
||||||
if type_name == "Bool":
|
if type_name == "Bool":
|
||||||
|
@ -143,15 +159,18 @@ def calculate_offsets(db_struct, current_offset=0, parent=None):
|
||||||
last_key_was_bool = False
|
last_key_was_bool = False
|
||||||
|
|
||||||
value["offset"] = current_offset
|
value["offset"] = current_offset
|
||||||
value['plc_address'] = plc_address # Store the calculated PLC address
|
value["plc_address"] = plc_address # Store the calculated PLC address
|
||||||
|
print(f"Offset '{current_offset}' at field '{key}' ")
|
||||||
current_offset += size
|
current_offset += size
|
||||||
|
|
||||||
current_offset = calculate_offsets(
|
# Recursively handle nested dictionaries and lists
|
||||||
value, current_offset, value
|
if isinstance(value, dict) or isinstance(value, list):
|
||||||
) # Recurse into nested structs
|
current_offset = calculate_offsets(value, current_offset)
|
||||||
elif isinstance(db_struct, list):
|
elif isinstance(db_struct, list):
|
||||||
|
for index, item in enumerate(db_struct):
|
||||||
for item in db_struct:
|
for item in db_struct:
|
||||||
current_offset = calculate_offsets(item, current_offset, parent)
|
current_offset = calculate_offsets(item, current_offset)
|
||||||
|
|
||||||
return current_offset
|
return current_offset
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,4 +183,5 @@ def expand_dbs(udts, dbs):
|
||||||
expand_udt_references(db_content, udts)
|
expand_udt_references(db_content, udts)
|
||||||
handle_array_types(db_content)
|
handle_array_types(db_content)
|
||||||
calculate_offsets(db_content)
|
calculate_offsets(db_content)
|
||||||
|
debug_print_db_struct(db_content)
|
||||||
print(f"Completed expansion for DB: {db_name}")
|
print(f"Completed expansion for DB: {db_name}")
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue