Merge branch 'release/IobWinMBus_09'

This commit is contained in:
Samuele Locatelli
2025-02-03 16:00:56 +01:00
3 changed files with 43 additions and 1 deletions
+13 -1
View File
@@ -4152,7 +4152,7 @@ namespace IOB_WIN_FORM.Iob
/// - invio in blocco pezzi
/// - aggiornamento del contapezzi (passato come ref) x nuovo valore post invio
/// </summary>
public void trySendPzCountBlock(string forceMachName)
protected virtual void trySendPzCountBlock(string forceMachName)
{
// in primis HA SENSO procedere SOLO SE server MP è Online...
if (MPOnline)
@@ -5678,12 +5678,24 @@ namespace IOB_WIN_FORM.Iob
// di discesa
if (item.isChanged(i, (uint)currStatus))
{
lgInfo($"Alarm state change | {item.memAddr} | i: {i} | prev: {item.alarmsState[i]} | curr: {currStatus}");
// registro gli allarmi attivi e trasmetto...
if (sendAlarmVariations(item.memAddr, i, item.alarmsState[i], (uint)(item.alarmsMask[i] & currStatus), item.messages))
{
// se inviato --> salvo stato da current...
item.updStatusVal(i, (uint)(item.alarmsMask[i] & currStatus));
}
else
{
lgError($"Errore in sendAlarmVariations | {item.memAddr} | i: {i} | prev: {item.alarmsState[i]} | curr: {currStatus}");
}
}
else
{
if (currStatus>0)
{
lgTrace($"Alarm UNCHANGED but Active | {item.memAddr} | i: {i} | prev: {item.alarmsState[i]} | curr: {currStatus}");
}
}
}
}
@@ -87,6 +87,21 @@ namespace IOB_WIN_MBUS.IobModbusTCP
B_input = byteSignals;
}
/// <summary>
/// Effettua verifica se abilitato invio pezzi in blocco e nel caso
/// - invio in blocco pezzi
/// - aggiornamento del contapezzi (passato come ref) x nuovo valore post invio
/// </summary>
protected override void trySendPzCountBlock(string forceMachName)
{
// non fa nulla se non accettare lato IOB i pezzi del PLC... su GWMS NON è gestito il contapezzi
if (contapezziIOB != contapezziPLC)
{
contapezziIOB = contapezziPLC;
lgTrace($"Registrata variazione contapezzi");
}
}
#endregion Protected Methods
}
}
@@ -200,6 +200,21 @@ namespace IOB_WIN_SIEMENS.IobSiemens
B_input = byteSignals;
}
/// <summary>
/// Effettua verifica se abilitato invio pezzi in blocco e nel caso
/// - invio in blocco pezzi
/// - aggiornamento del contapezzi (passato come ref) x nuovo valore post invio
/// </summary>
protected override void trySendPzCountBlock(string forceMachName)
{
// non fa nulla se non accettare lato IOB i pezzi del PLC... su GWMS NON è gestito il contapezzi
if (contapezziIOB != contapezziPLC)
{
contapezziIOB = contapezziPLC;
lgTrace($"Registrata variazione contapezzi");
}
}
#endregion Protected Methods
#region Private Methods