aggiunto display wrkTime VacPump + VacCount

This commit is contained in:
Samuele E. Locatelli
2017-04-21 00:06:22 +02:00
parent cab65c2a5d
commit 1f44b4324a
+24 -16
View File
@@ -2417,23 +2417,27 @@ namespace MTC_Adapter
/// <returns></returns>
public bool procVacPump(bool needSave)
{
uint delta = 0;
string outString = string.Format("VacPump_[1-{0}]_WrkTime: ", currAdpConf.nVacuumPump);
for (int i = 0; i < currAdpConf.nVacuumPump; i++)
{
uint delta = 0;
// controllo valore riferimento...
if (istVacPumpWrkTime[i] > currVacPumpWrkTime[i])
{
delta = istVacPumpWrkTime[i] - currVacPumpWrkTime[i];
// segnalo necessità salvataggio!
needSave = true;
}
delta = istVacPumpWrkTime[i] - currVacPumpWrkTime[i];
// processo comunque sempre...
uint contTot = updateValUIntByIncr(i, delta, "VacPump_{0:00}_WrkTime");
// passo valore totale all'adapter
vettVacPump[i].mVacPumpWrkTime.Value = contTot;
// controllo valore riferimento...
if (delta > 0)
{
// segnalo necessità salvataggio!
needSave = true;
}
// ...aggiorno valore riferimento...
currVacPumpWrkTime[i] = istVacPumpWrkTime[i];
outString += string.Format("{0} | ", vettVacPump[i].mVacPumpWrkTime.Value);
}
// salvo su maschera...
parentForm.dataMonitor += string.Format("{0}{1}", outString.Substring(0, outString.Length - 3), Environment.NewLine);
return needSave;
}
/// <summary>
@@ -2443,23 +2447,27 @@ namespace MTC_Adapter
/// <returns></returns>
public bool procVacAct(bool needSave)
{
uint delta = 0;
string outString = string.Format("VacPump_[1-{0}]_Count: ", currAdpConf.nVacuumPump);
for (int i = 0; i < currAdpConf.nVacuumAct; i++)
{
uint delta = 0;
// controllo valore riferimento...
if (istVacActCount[i] > currVacActCount[i])
{
delta = istVacActCount[i] - currVacActCount[i];
// segnalo necessità salvataggio!
needSave = true;
}
delta = istVacActCount[i] - currVacActCount[i];
// processo comunque sempre...
uint contTot = updateValUIntByIncr(i, delta, "VacAct_{0:00}_Count");
// passo valore totale all'adapter
vettVacAct[i].mVacActCount.Value = contTot;
// controllo valore riferimento...
if (delta > 0)
{
// segnalo necessità salvataggio!
needSave = true;
}
// ...aggiorno valore riferimento...
currVacActCount[i] = istVacActCount[i];
outString += string.Format("{0} | ", vettVacPump[i].mVacPumpWrkTime.Value);
}
// salvo su maschera...
parentForm.dataMonitor += string.Format("{0}{1}", outString.Substring(0, outString.Length - 3), Environment.NewLine);
return needSave;
}
/// <summary>