From 7f1fffb6d077364f307dd91d8b2db3873056a2b1 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 29 May 2017 17:34:52 +0200 Subject: [PATCH] =?UTF-8?q?rivista=20modalit=C3=A0=20update=20show=20dati?= =?UTF-8?q?=20in=20finestra=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MTC_Adapter/MTC_Adapter/AdapterFanuc.cs | 2 -- MTC_Adapter/MTC_Adapter/AdapterGeneric.cs | 13 ++++++++++++- MTC_Adapter/MTC_Adapter/AdapterOsai.cs | 2 -- MTC_Adapter/MTC_Adapter/AdapterSiemens.cs | 2 -- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/MTC_Adapter/MTC_Adapter/AdapterFanuc.cs b/MTC_Adapter/MTC_Adapter/AdapterFanuc.cs index b265cc3..df6cea1 100644 --- a/MTC_Adapter/MTC_Adapter/AdapterFanuc.cs +++ b/MTC_Adapter/MTC_Adapter/AdapterFanuc.cs @@ -722,8 +722,6 @@ namespace MTC_Adapter Buffer.BlockCopy(tabDatiMtzByte, 0, tabDatiMtz, 0, tabDatiMtzByte.Length); // decodifico aree memoria secondo tab configurazione processMaintData(tabDatiMtz, maintData); - // verifica se debba salvare e mostrare dati - checkSavePersDataLayer(); } /// /// Gestione lettura dati analogici diff --git a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs index 982c781..bc64d51 100644 --- a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs +++ b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs @@ -1906,6 +1906,8 @@ namespace MTC_Adapter // processing degli strobes di allarme (da ULTIMA rappresentazione vettore dell'ADP) processAlarm(); + bool showDebugData = false; + // verifico se processare tutto "in un colpo solo" if (procIotMem) { @@ -1947,6 +1949,8 @@ namespace MTC_Adapter // SOLO in modalità testing forzo il controllo continuo allarmi... forceAlarmCheck(); } + // salva richiesta update x dati debug + showDebugData = true; } // ciclo lento else if (ciclo == gatherCycle.LF) @@ -1958,6 +1962,8 @@ namespace MTC_Adapter // eventuale log! if (utils.CRB("recTime")) logTimeResults(); + // salva richiesta update x dati debug + showDebugData = true; } // ciclo lentissimo else if (ciclo == gatherCycle.VLF) @@ -1969,6 +1975,11 @@ namespace MTC_Adapter // processo e svuoto eventuali code di invio per Codici M/S/T trySendCodMST(); } + if (showDebugData) + { + // verifica se debba salvare e mostrare dati + checkSavePersDataLayer(); + } // INVIO dati variati! mAdapter.SendChanged(); @@ -3162,7 +3173,7 @@ namespace MTC_Adapter { // dati da PC mClock.Value = string.Format("{0:yyyy-MM-dd} {0:HH:mm:ss}", DateTime.Now); - + // gestisco lettura dati manutenzione da PLC... getMtzDataFromPlc(); // gestisco lettura dati analogici da PLC... diff --git a/MTC_Adapter/MTC_Adapter/AdapterOsai.cs b/MTC_Adapter/MTC_Adapter/AdapterOsai.cs index fe182f7..cdf0432 100644 --- a/MTC_Adapter/MTC_Adapter/AdapterOsai.cs +++ b/MTC_Adapter/MTC_Adapter/AdapterOsai.cs @@ -611,8 +611,6 @@ namespace MTC_Adapter if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtz.Length * 4), DateTime.Now.Subtract(inizio).Ticks); // decodifico aree memoria secondo tab configurazione processMaintData(tabDatiMtz, maintData); - // verifica se debba salvare e mostrare dati - checkSavePersDataLayer(); } fatto = true; } diff --git a/MTC_Adapter/MTC_Adapter/AdapterSiemens.cs b/MTC_Adapter/MTC_Adapter/AdapterSiemens.cs index 85b36e2..8143e19 100644 --- a/MTC_Adapter/MTC_Adapter/AdapterSiemens.cs +++ b/MTC_Adapter/MTC_Adapter/AdapterSiemens.cs @@ -615,8 +615,6 @@ namespace MTC_Adapter if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtz.Length * 4), DateTime.Now.Subtract(inizio).Ticks); // decodifico aree memoria secondo tab configurazione processMaintData(tabDatiMtz, maintData); - // verifica se debba salvare e mostrare dati - checkSavePersDataLayer(); } fatto = true; }