diff --git a/IOB-WIN-NEXT/Iob/Generic.cs b/IOB-WIN-NEXT/Iob/Generic.cs index fc6a3527..8f949a0c 100644 --- a/IOB-WIN-NEXT/Iob/Generic.cs +++ b/IOB-WIN-NEXT/Iob/Generic.cs @@ -339,6 +339,7 @@ namespace IOB_WIN_NEXT.Iob // imposto veto invio per i prossimi sec dtVetoQueueIN = DateTime.Now.AddSeconds(vetoQueueIn); + lgInfoStartup($"Impostato veto QUEUE-IN a {vetoQueueIn}s | fino alle {dtVetoQueueIN:yyyy.MM.dd HH:mm:ss}"); // concluso! lgInfoStartup("Istanziata classe preliminare IOBGeneric"); } diff --git a/IOB-WIN-NEXT/Iob/MTConnect.cs b/IOB-WIN-NEXT/Iob/MTConnect.cs index 2f8413e0..e7cb1340 100644 --- a/IOB-WIN-NEXT/Iob/MTConnect.cs +++ b/IOB-WIN-NEXT/Iob/MTConnect.cs @@ -125,26 +125,32 @@ namespace IOB_WIN_NEXT.Iob /// public override void readSemafori(ref newDisplayData currDispData) { -#if false - base.readSemafori(ref currDispData); -#endif - try + DateTime adesso = DateTime.Now; + // verifico non sia in veto invio iniziale... + if (dtVetoQueueIN >= adesso) { - if (verboseLog) - { - lgInfo("inizio read semafori"); - } - - currDispData.semIn = Semaforo.SV; - - // decodifica e gestione - decodeToBaseBitmap(); - reportRawInput(ref currDispData); + lgDebug($"[VETO readSemafori] | veto attivo sino alle {adesso:yyyy.MM.dd HH:mm:ss}"); } - catch (Exception exc) + else { - currDispData.semIn = Semaforo.SR; - lgError($"Eccezione in readSemafori:{Environment.NewLine}{exc}"); + try + { + if (verboseLog) + { + lgInfo("inizio read semafori"); + } + + currDispData.semIn = Semaforo.SV; + + // decodifica e gestione + decodeToBaseBitmap(); + reportRawInput(ref currDispData); + } + catch (Exception exc) + { + currDispData.semIn = Semaforo.SR; + lgError($"Eccezione in readSemafori:{Environment.NewLine}{exc}"); + } } }