From cc3c7b9bbf90175979d06381fefe5f40e77fbf5c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 28 Jun 2017 11:50:02 +0200 Subject: [PATCH] fix GCode path 2 + fix visualizzazione debug x OSAI --- MTC_Adapter/MTC_Adapter/AdapterGeneric.cs | 20 +++++++++++++------- MTC_Adapter/MTC_Adapter/AdapterOsai.cs | 2 +- MTC_Adapter/MTC_Adapter/App.config | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs index 32f97e3..aa8fcd9 100644 --- a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs +++ b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs @@ -1958,6 +1958,7 @@ namespace MTC_Adapter } else if (ciclo == gatherCycle.MF) { + resetDebugConsole(); // leggo parametri a media freq (dati globali, path, assi, Unità Operatrice) getGlobalData(); getUnOp(); @@ -1976,6 +1977,7 @@ namespace MTC_Adapter // ciclo lento else if (ciclo == gatherCycle.LF) { + //resetDebugConsole(); // leggo EVENTUALI parametri da config file getConfigParam(); ///acquisisco dati su programma in esecuzione e dati generali (stato, orologio, power...) @@ -1983,8 +1985,8 @@ namespace MTC_Adapter // eventuale log! if (utils.CRB("recTime")) logTimeResults(); - // salva richiesta update x dati debug - showDebugData = true; + //// salva richiesta update x dati debug + //showDebugData = true; } // ciclo lentissimo else if (ciclo == gatherCycle.VLF) @@ -2046,16 +2048,20 @@ namespace MTC_Adapter eh_refreshed(this, new EventArgs()); } } + + private void resetDebugConsole() + { + // resetto console debug... + parentForm.dataMonitor_1 = ""; + parentForm.dataMonitor_2 = ""; + parentForm.dataMonitor_3 = ""; + } + /// /// recupero dati globali (e comuni) /// public virtual void getGlobalData() { - // svuoto... - parentForm.dataMonitor_1 = ""; - parentForm.dataMonitor_2 = ""; - parentForm.dataMonitor_3 = ""; - // accodo dati path in DataMonitor...... StringBuilder sb1 = new StringBuilder(); StringBuilder sb2 = new StringBuilder(); diff --git a/MTC_Adapter/MTC_Adapter/AdapterOsai.cs b/MTC_Adapter/MTC_Adapter/AdapterOsai.cs index f1dd15f..4d4adb1 100644 --- a/MTC_Adapter/MTC_Adapter/AdapterOsai.cs +++ b/MTC_Adapter/MTC_Adapter/AdapterOsai.cs @@ -912,7 +912,7 @@ namespace MTC_Adapter parentForm.commPlcActive = true; inizio = DateTime.Now; OSAI_ref.getPathGCodeMod(1, ref vettGCodes_01); - OSAI_ref.getPathGCodeMod(2, ref vettGCodes_01); + OSAI_ref.getPathGCodeMod(2, ref vettGCodes_02); if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks); parentForm.commPlcActive = false; } diff --git a/MTC_Adapter/MTC_Adapter/App.config b/MTC_Adapter/MTC_Adapter/App.config index 7fcadb7..4ab28e2 100644 --- a/MTC_Adapter/MTC_Adapter/App.config +++ b/MTC_Adapter/MTC_Adapter/App.config @@ -17,7 +17,7 @@ - +