diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs index a97459eb..a585bd82 100644 --- a/IOB-WIN/IobGeneric.cs +++ b/IOB-WIN/IobGeneric.cs @@ -1350,16 +1350,16 @@ namespace IOB_WIN private void svuotaCodaContapezzi() { - pzCntReload(true); // se ho contapezzi OLTRE limite... - while (lastCountCNC > contapezzi + maxSendPzCountBlock) + while (lastCountCNC > contapezzi + minSendPzCountBlock) { + pzCntReload(true); // provo invio trySendPzCountBlock(); // aspetto x dare tempo calcolo Thread.Sleep(300); - // rileggo - pzCntReload(true); + //// rileggo + //pzCntReload(true); } } @@ -3186,8 +3186,8 @@ namespace IOB_WIN // verifico se la funzione SIA abilitata if (enableSendPzCountBlock) { - // rileggo qta da server... - pzCntReload(true); + //// rileggo qta da server... + //pzCntReload(true); int delta = lastCountCNC - contapezzi; // se รจ abilitata verifico differenza: se ho DELTA > minSendPzCountBlock --> invio un blocco <= maxSendPzCountBlock if (delta > minSendPzCountBlock) @@ -3205,8 +3205,6 @@ namespace IOB_WIN int.TryParse(resp, out qtyAdded); if (qtyAdded > 0) { - // rileggo qta da server... - pzCntReload(true); lgInfo($"Inviato incremento contapezzi: send {numIncr} | resp {qtyAdded}"); // invio conferma contapezzi.. string retVal = utils.callUrl($"{urlSetPzCount}{contapezzi}"); diff --git a/IOB-WIN/IobSimula.cs b/IOB-WIN/IobSimula.cs index e0968aba..1571aba3 100644 --- a/IOB-WIN/IobSimula.cs +++ b/IOB-WIN/IobSimula.cs @@ -302,13 +302,11 @@ namespace IOB_WIN } else { - // rileggo qta da server... - pzCntReload(true); string retVal = utils.callUrl($"{urlSetPzCount}{contapezzi}"); sigPzCount = false; } } - lgInfo($"Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}"); + lgInfo($"S01: Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}"); } } } @@ -361,8 +359,8 @@ namespace IOB_WIN if (!isMulti) { lastCountCNC += delta; + lgInfo($"S01: Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}"); } - lgInfo($"Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}"); // SOLO SE sono online... if (IobOnline) { @@ -390,7 +388,7 @@ namespace IOB_WIN sendContapezzi = true; // registro contapezzi contapezzi++; - lgInfo($"Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}"); + lgInfo($"S01 Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}"); } if (sendContapezzi) {