Aggiunta metodi x set contapezzi in KAWASAKI
This commit is contained in:
@@ -909,6 +909,15 @@ namespace IOB_WIN
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/// <summary>
|
||||
/// Metodo generico di IMPOSTAZIONE FORZATA del contapezzi...
|
||||
/// </summary>
|
||||
/// <param name="newPzCount">Pezzi richiesti</param>
|
||||
/// <returns></returns>
|
||||
public virtual bool setContapezziCNC(int newPzCount)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica e se necessario comprime directory log...
|
||||
|
||||
@@ -183,6 +183,20 @@ namespace IOB_WIN
|
||||
taskOk = resetContapezziCNC();
|
||||
taskVal = taskOk ? "FORCE RESET PZ COUNT" : "FORCE RESET DISABLED | NO EXEC";
|
||||
break;
|
||||
case "forceSetPzCount":
|
||||
// reset contapezzi inizio setup
|
||||
int newPzCount = 0;
|
||||
int.TryParse(item.Value, out newPzCount);
|
||||
if (newPzCount >= 0)
|
||||
{
|
||||
setContapezziCNC(newPzCount);
|
||||
answ.Add(item.Key, $"FORCE SET PZ COUNT TO {newPzCount}");
|
||||
}
|
||||
else
|
||||
{
|
||||
answ.Add(item.Key, $"ERROR IN FORCE SET PZ COUNT TO {newPzCount}");
|
||||
}
|
||||
break;
|
||||
case "startSetup":
|
||||
// reset contapezzi inizio setup
|
||||
taskOk = resetContapezziCNC();
|
||||
@@ -234,6 +248,34 @@ namespace IOB_WIN
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua IMPOSTAZIONE FORZATA del contapezzi
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override bool setContapezziCNC(int newPzCount)
|
||||
{
|
||||
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 = newPzCount;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lgError(exc, "Errore in SET contapezzi KAWASAKI");
|
||||
connectionOk = false;
|
||||
}
|
||||
answ = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
lgError("Impossibile effettuare SET contapezzi KAWASAKI, mancanza parametro OPT:ENABLE_PZ_RESET");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Imposto connessione
|
||||
|
||||
Reference in New Issue
Block a user