diff --git a/IOB-WIN/IobKawasaki.cs b/IOB-WIN/IobKawasaki.cs index d96134c1..50b73ca4 100644 --- a/IOB-WIN/IobKawasaki.cs +++ b/IOB-WIN/IobKawasaki.cs @@ -160,6 +160,73 @@ namespace IOB_WIN } } + + /// + /// Processo i task richiesti e li elimino dalla coda 1:1 + /// + /// + public override Dictionary executeTasks(Dictionary task2exe) + { + // Verificare il protocollo: dovrebeb togliere SOLO i task eseguiti... + Dictionary answ = new Dictionary(); + + // cerco task specifici: se ho startSetup --> imposto bit DBB701.DBB0.4 + foreach (var item in task2exe) + { + // controllo sulal KEY + switch (item.Key) + { + case "forceResetPzCount": + // reset contapezzi inizio setup + resetContapezziCNC(); + answ.Add(item.Key, "FORCE RESET PZ COUNT"); + break; + case "startSetup": + // reset contapezzi inizio setup + resetContapezziCNC(); + answ.Add(item.Key, "RESET: SETUP START"); + break; +#if false + case "stopSetup": + // reset contapezzi fine setup + resetContapezziCNC(); + answ.Add(item.Key, "RESET: SETUP END"); + break; +#endif + default: + // anche se non faccio nulla SEGNO con value = NOT DONE + answ.Add(item.Key, "UNKNOWN KEY | NO EXEC"); + break; + } + } + + return answ; + } + /// + /// Effettua reset del contapezzi + /// + /// + public override bool resetContapezziCNC() + { + bool answ = false; + // ...SE abilitato da conf IOB + if (cIobConf.optPar.Count > 0 && getOptPar("ENABLE_PZ_RESET") == "TRUE") + { + // scrivo valore 0 x il contapezzi + try + { + pzCounter = 0; + } + catch (Exception exc) + { + lgError(exc, "Errore in RESET contapezzi FANUC"); + connectionOk = false; + } + answ = true; + } + return answ; + } + /// /// Imposto connessione /// @@ -397,7 +464,7 @@ namespace IOB_WIN { comando = string.Format("i_cicli={0}", value); // scrivo valore cicli - resDataArray = KAWASAKI_ref.command(comando, 3000); // imposto cicli depositati/fatti a 3 --> " 0\r\n" + resDataArray = KAWASAKI_ref.command(comando, 3000); // imposto cicli depositati/fatti --> " 0\r\n" } } } @@ -588,6 +655,7 @@ namespace IOB_WIN #region Metodi specifici (da verificare/completare in implementazione) + /// /// Effettua vero processing contapezzi /// diff --git a/Jenkinsfile b/Jenkinsfile index 545f9a00..1863756b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=425']) { + withEnv(['NEXT_BUILD_NUMBER=427']) { // env.versionNumber = VersionNumber(versionNumberString : '2.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '2.3.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN'