diff --git a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs
index 44cfdea..9bd0b90 100644
--- a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs
+++ b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs
@@ -2128,11 +2128,11 @@ namespace MTC_Adapter
{
// segnalo necessità salvataggio!
needSave = true;
- // salvo su maschera...
- StringBuilder sb = new StringBuilder();
- sb.AppendLine(string.Format("ACC_TIME: {0}", mAccTime.Value));
- parentForm.dataMonitor += sb.ToString();
}
+ // salvo su maschera...
+ StringBuilder sb = new StringBuilder();
+ sb.AppendLine(string.Format("ACC_TIME: {0}", mAccTime.Value));
+ parentForm.dataMonitor += sb.ToString();
// ...aggiorno valore riferimento...
contOreMaccOn = istOreMaccOn;
@@ -2145,18 +2145,21 @@ namespace MTC_Adapter
///
public bool procOreMaccLav(bool needSave)
{
- double delta = 0;
- // controllo valore riferimento...
- if (istOreMaccLav > contOreMaccLav)
- {
- delta = istOreMaccLav - contOreMaccLav;
- // segnalo necessità salvataggio!
- needSave = true;
- }
+ double delta = istOreMaccLav - contOreMaccLav;
double contatore = updateValDoubleByIncr(0, delta, "ACC_TIME_WORK");
currAdpConf.ContOreMaccLav += delta;
// salvo valore su persistent layer
mAccTimeWork.Value = contatore.ToString("0.000", CultureInfo.InvariantCulture);
+ // controllo valore riferimento...
+ if (delta > 0)
+ {
+ // segnalo necessità salvataggio!
+ needSave = true;
+ }
+ // salvo su maschera...
+ StringBuilder sb = new StringBuilder();
+ sb.AppendLine(string.Format("ACC_TIME_WORK: {0}", mAccTimeWork.Value));
+ parentForm.dataMonitor += sb.ToString();
// ...aggiorno valore riferimento...
contOreMaccLav = istOreMaccLav;
@@ -2169,7 +2172,7 @@ namespace MTC_Adapter
///
public bool procProgrName(bool needSave)
{
- // controllo valore riferimento x tutti i path se sia cambiato num pz...
+ // controllo valore riferimento x tutti i path se sia cambiato programma...
for (int i = 0; i < currAdpConf.nPath; i++)
{
if (istPathProgrName[i] != null)
@@ -2224,6 +2227,7 @@ namespace MTC_Adapter
///
public bool procPzProd(bool needSave)
{
+ string outString = string.Format("Path_[1-{0}]_PZ_TOT: ", currAdpConf.nPath);
// controllo valore riferimento x tutti i path se sia cambiato qta pezzi...
for (int i = 0; i < currAdpConf.nPath; i++)
{
@@ -2251,7 +2255,10 @@ namespace MTC_Adapter
// ...aggiorno valore riferimento...
currPathPartCount[i] = istPathPartCount[i];
}
+ outString += string.Format("{0} | ", vettPath[i].mPathPartCount.Value);
}
+ // salvo su maschera...
+ parentForm.dataMonitor += string.Format("{0}{1}", outString.Substring(0, outString.Length - 3), Environment.NewLine);
return needSave;
}
///
@@ -2261,24 +2268,27 @@ namespace MTC_Adapter
///
public bool procGiriTotUnOp(bool needSave)
{
+ uint delta = 0;
+ string outString = string.Format("UnOp_[1-{0}]_KRev: ", currAdpConf.nUnOp);
for (int i = 0; i < currAdpConf.nUnOp; i++)
{
- uint delta = 0;
- // controllo valore riferimento...
- if (istGiriElettrom[i] > contGiriElettrom[i])
- {
- delta = istGiriElettrom[i] - contGiriElettrom[i];
- // segnalo necessità salvataggio!
- needSave = true;
- }
+ delta = istGiriElettrom[i] - contGiriElettrom[i];
// processo comunque sempre...
uint contatore = updateValUIntByIncr(i, delta, "UnOp_{0:00}_AccTime");
// passo valore num giri (migliaia) all'adapter
vettUnOp[i].mUnOpAccTime.Value = contatore;
+ // controllo valore riferimento...
+ if (delta > 0)
+ {
+ // segnalo necessità salvataggio!
+ needSave = true;
+ }
// ...aggiorno valore riferimento...
contGiriElettrom[i] = istGiriElettrom[i];
+ outString += string.Format("{0} | ", vettUnOp[i].mUnOpAccTime.Value);
}
-
+ // salvo su maschera...
+ parentForm.dataMonitor += string.Format("{0}{1}", outString.Substring(0, outString.Length - 3), Environment.NewLine);
return needSave;
}
///
@@ -2316,7 +2326,7 @@ namespace MTC_Adapter
public bool procMovTotAssi(bool needSave)
{
double delta = 0;
- string AxisDistDone = string.Format("Axis_[1-{0}]_DistDone: ", currAdpConf.nAxis);
+ string outString = string.Format("Axis_[1-{0}]_DistDone: ", currAdpConf.nAxis);
for (int i = 0; i < currAdpConf.nAxis; i++)
{
delta = istDistMovAssi[i] - contDistMovAssi[i];
@@ -2332,11 +2342,10 @@ namespace MTC_Adapter
}
// ...aggiorno valore riferimento...
contDistMovAssi[i] = istDistMovAssi[i];
- AxisDistDone += string.Format("{0} | ", vettAxis[i].mAxDistDone.Value);
+ outString += string.Format("{0} | ", vettAxis[i].mAxDistDone.Value);
}
// salvo su maschera...
- parentForm.dataMonitor += AxisDistDone.Substring(0, AxisDistDone.Length - 3);
-
+ parentForm.dataMonitor += string.Format("{0}{1}", outString.Substring(0, outString.Length - 3), Environment.NewLine);
return needSave;
}
///