Aggiunto reset pzCoutn x kawasaki

This commit is contained in:
Samuele E. Locatelli
2019-05-30 09:39:43 +02:00
parent 4968fb180f
commit 40dfdd3c4f
2 changed files with 70 additions and 2 deletions
+69 -1
View File
@@ -160,6 +160,73 @@ namespace IOB_WIN
}
}
/// <summary>
/// Processo i task richiesti e li elimino dalla coda 1:1
/// </summary>
/// <param name="task2exe"></param>
public override Dictionary<string, string> executeTasks(Dictionary<string, string> task2exe)
{
// Verificare il protocollo: dovrebeb togliere SOLO i task eseguiti...
Dictionary<string, string> answ = new Dictionary<string, string>();
// 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;
}
/// <summary>
/// Effettua reset del contapezzi
/// </summary>
/// <returns></returns>
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;
}
/// <summary>
/// Imposto connessione
/// </summary>
@@ -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)
/// <summary>
/// Effettua vero processing contapezzi
/// </summary>
Vendored
+1 -1
View File
@@ -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'