diff --git a/IOB-WIN/App.config b/IOB-WIN/App.config index 69358f13..1daf0340 100644 --- a/IOB-WIN/App.config +++ b/IOB-WIN/App.config @@ -9,6 +9,7 @@ + diff --git a/IOB-WIN/IobFanuc.cs b/IOB-WIN/IobFanuc.cs index 8192988e..d45022d0 100644 --- a/IOB-WIN/IobFanuc.cs +++ b/IOB-WIN/IobFanuc.cs @@ -458,12 +458,12 @@ namespace IOB_WIN //string numAlarm = answ.alarm.ToString(); // preparo i singoli valori dell'array... //outVal.Add("DYNDATA", string.Format("{0}#{1}#{2}", actf, acts, numAlarm)); - outVal.Add("DYNDATA", string.Format("FEED {0} | SPEED_RPM {1}", actf, acts)); + outVal.Add("DYNDATA", string.Format("FEED {0}#SPEED_RPM {1}", actf, acts)); if (utils.CRB("SendFeedSpeed")) { outVal.Add("FEED", actf); outVal.Add("SPEED_RPM", acts); - //outVal.Add("NUM_ALARM", numAlarm); + //outVal.Add("NUM_ALARM", numAlarm); } if (utils.CRB("SendAxPos")) { @@ -484,10 +484,42 @@ namespace IOB_WIN } return outVal; } - - public override void processOverride() + /// + /// Recupero dati override + /// + /// + public override Dictionary getOverrides() { - base.processOverride(); + Dictionary outVal = new Dictionary(); + inizio = DateTime.Now; + + if (utils.CRB("enableOverrides")) + { + // leggo da G0 a G30 perché DOVREBBE contenere tutto quanto mi serve: G12 FeedOver, G30 SpeedOver... + try + { + inizio = DateTime.Now; + int memIndex = 0; + byte[] MemBlock = new byte[30]; + FanucMemRW(R, FANUC.MemType.G, memIndex, ref MemBlock); + if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks); + + // SALVO! G12 e G30... + string allG = ""; + for (int i = 0; i < MemBlock.Length; i++) + { + allG += string.Format("{0}:{1}#", i, MemBlock[i]); + } + outVal.Add("OVERRIDES", allG); + //outVal.Add("FEED_OVER", string.Format("G10 {0}#G11 {1}#G12 {3}", MemBlock[10], MemBlock[11], MemBlock[12])); + //outVal.Add("SPEED_OVER", string.Format("G27 {0}#G28 {1}#G29 {3}", MemBlock[27], MemBlock[28], MemBlock[29])); + } + catch (Exception exc) + { + lg.Error(exc, "Errore in getOverrides"); + } + } + return outVal; } /// diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs index 3829296f..0a4eede5 100644 --- a/IOB-WIN/IobGeneric.cs +++ b/IOB-WIN/IobGeneric.cs @@ -152,6 +152,10 @@ namespace IOB_WIN /// Ultimo DynData letto /// public string lastDynData { get; set; } + /// + /// Ultimo Override set letto + /// + public string lastOverride { get; set; } /// /// Array dei contatori x segnali blinking @@ -1497,6 +1501,15 @@ namespace IOB_WIN return outVal; } /// + /// Restituisce info OVERRIDES + /// + /// + public virtual Dictionary getOverrides() + { + Dictionary outVal = new Dictionary(); + return outVal; + } + /// /// Restituisce programma in esecuzione /// public virtual string getPrgName() @@ -1580,7 +1593,7 @@ namespace IOB_WIN } else { - currDynData.Add("DYN-DEMO", string.Format("D-{0:HHmm}", DateTime.Now)); + currDynData.Add("DYNDATA", string.Format("D-{0:HHmm}", DateTime.Now)); } // verifico SE sia cambiato il programma... if (lastDynData != currDynData["DYNDATA"]) @@ -1607,7 +1620,36 @@ namespace IOB_WIN /// Effettua processing del recupero delle OVERRIDE (spindle, feedrate, rapid) /// public virtual void processOverride() - { } + { + Dictionary currOverride = new Dictionary(); + if (!DemoIn) + { + currOverride = getDynData(); + } + else + { + currOverride.Add("OVERRIDES", string.Format("D-{0:HHmm}", DateTime.Now)); + } + // verifico SE sia cambiato il programma... + if (lastOverride != currOverride["OVERRIDES"]) + { + // salvo! + lastDynData = currOverride["OVERRIDES"]; + // per ogni valore del dizionario mostro ed accodo! + string sVal = ""; + foreach (var item in currOverride) + { + sVal = string.Format("[OVERRIDES]{0}|{1}", item.Key, item.Value); + displayOtherData(sVal); + // --> accodo (valore già formattato)! + QueueFLog.Enqueue(qEncodeFLog(item.Key, item.Value)); + // Gestione counter FLog! + counterFLog++; + // se supera 10k resetto... + if (counterFLog > 9999) counterFLog = 0; + } + } + } /// /// metodo dummy x salvataggio aree memoria conf x CN /// diff --git a/IOB-WIN/Readme/ToDo.txt b/IOB-WIN/Readme/ToDo.txt index bf0544dd..2db4a2ac 100644 --- a/IOB-WIN/Readme/ToDo.txt +++ b/IOB-WIN/Readme/ToDo.txt @@ -12,23 +12,28 @@ OK - salvataggio su file dello storico eventi rilevati OK - gestione dei segnali ballerini (BITMASK!) OK - gestione contapezzi CUSTOM - fare gestione configurabile lettura FANUC - - togliere dati G43 +OK - gestione dati G43 - togliere dati F (E0 | 90) - fare integrazione ALTRI varori FANUC, tra cui - allarmi - - load/speed - - nuovo metodo chiamata x MP/IO (che dovrà avere nuovo comando x accettare queste chiamate e salvare su tabella SENZA processing, come eventi o come extra... evento NOTA?) +OK - load/speed + - override + +OK - nuovo metodo chiamata x MP/IO (che dovrà avere nuovo comando x accettare queste chiamate e salvare su tabella SENZA processing, come eventi o come extra... evento NOTA?) - verificare segnali: (vedi doc gsheet) - F001.0: ALARM_PRESENT - F001.7: CN_READY / POWER_ON - STL000.5: AUTO (vers 1) - STL000.7: AUTO (vers 2) +- Cambiare ordine valutazione eventi frequenza VLF-->VHF +- Azzerare I contatori quanto si arriva al più lento (quando si azzera lui ripartono comunque tutti...) -> in questo modo scatta un contatore QUANDO GENERAL_COUNTER MOD periodo_Ccntatore == 0 +- rendere parametrica l'assegnazione delel funzioni al diverso ambito frequenza tra i 5 (VHF, HF, NF, LF, VLF) +- procedura x gestione dati REALTIME (da NON salvare su db ma al limite su REDIS, simil EQN con 2 tab x eliminare dati scaduti) - -FINIRE SISTEMAZIONE JETCO: - - install servers - - install DB - - conf acquisitore togliendo parti abbozzate x contapezzi/fineciclo +OK FINIRE SISTEMAZIONE JETCO: +OK - install servers +OK - install DB +OK - conf acquisitore togliendo parti abbozzate x contapezzi/fineciclo OK - part program name MAIN con nuova funzione CREARE NUOVO SW (o configurazione? o ramo alternativo a develop?) x mapping INIZIALE della macchina... ad esempio diff --git a/Jenkinsfile b/Jenkinsfile index 83fd5adf..80e0cd73 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=176']) { + withEnv(['NEXT_BUILD_NUMBER=177']) { // env.versionNumber = VersionNumber(versionNumberString : '1.15.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '1.15.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN'