Completata revisione gestione contatori con VC...
This commit is contained in:
+1115
-1109
File diff suppressed because it is too large
Load Diff
@@ -728,35 +728,35 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Conteggio ISTANTANEO ore macchina ON
|
||||
/// </summary>
|
||||
public double istOreMaccOn;
|
||||
public sampleVect istOreMaccOn;
|
||||
/// <summary>
|
||||
/// isteggio ISTANTANEO ore macchina IN LAVORO
|
||||
/// </summary>
|
||||
public double istOreMaccLav;
|
||||
public sampleVect istOreMaccLav;
|
||||
/// <summary>
|
||||
/// Conteggio ISTANTANEO contatore del numero movimenti Slitta Tastatore
|
||||
/// </summary>
|
||||
public double istSlittaTast;
|
||||
public sampleVect istSlittaTast;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori giri cumulati elettromandrino (migliaia)
|
||||
/// </summary>
|
||||
public uint[] istGiriElettrom;
|
||||
public sampleVect[] istGiriElettrom;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del movimento degli assi
|
||||
/// </summary>
|
||||
public double[] istDistMovAssi;
|
||||
public sampleVect[] istDistMovAssi;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del LOAD degli assi
|
||||
/// </summary>
|
||||
public double[] istLoadAssi;
|
||||
public sampleVect[] istLoadAssi;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del tempo cumulato degli assi
|
||||
/// </summary>
|
||||
public double[] istAccTimeAssi;
|
||||
public sampleVect[] istAccTimeAssi;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del num inv degli assi
|
||||
/// </summary>
|
||||
public uint[] istNumInvAssi;
|
||||
public sampleVect[] istNumInvAssi;
|
||||
/// <summary>
|
||||
/// vettore dei Program Name dei path ISTANTANEI (nuovi/letti)
|
||||
/// </summary>
|
||||
@@ -768,23 +768,23 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del num pezzi fatti x PartId
|
||||
/// </summary>
|
||||
public uint[] istPathPartCount;
|
||||
public sampleVect[] istPathPartCount;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del work time x VacPump
|
||||
/// </summary>
|
||||
public uint[] istVacPumpWrkTime;
|
||||
public sampleVect[] istVacPumpWrkTime;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del numero impieghi VacAct
|
||||
/// </summary>
|
||||
public uint[] istVacActCount;
|
||||
public sampleVect[] istVacActCount;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del Lubro
|
||||
/// </summary>
|
||||
public uint[] istLubroCount;
|
||||
public sampleVect[] istLubroCount;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del numero cambi utensili x UnOp
|
||||
/// </summary>
|
||||
public uint[] istNumCambiUt;
|
||||
public sampleVect[] istNumCambiUt;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori generici
|
||||
/// </summary>
|
||||
@@ -792,11 +792,11 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del numero movimenti Slitta Magazzino
|
||||
/// </summary>
|
||||
public uint[] istSlittaMag;
|
||||
public sampleVect[] istSlittaMag;
|
||||
/// <summary>
|
||||
/// Vettore ISTANTANEO dei contatori del numero movimenti Protezione Magazzino
|
||||
/// </summary>
|
||||
public uint[] istProtMag;
|
||||
public sampleVect[] istProtMag;
|
||||
|
||||
/// <summary>
|
||||
/// vettore valori in file interscambio
|
||||
@@ -1792,9 +1792,9 @@ namespace MTC_Adapter
|
||||
contOreMaccLav = currAdpConf.ContOreMaccLav;
|
||||
contSlittaTast = currAdpConf.ContSlittaTast;
|
||||
contGiriElettrom = new uint[currAdpConf.nUnOp];
|
||||
istGiriElettrom = new uint[currAdpConf.nUnOp];
|
||||
istGiriElettrom = new sampleVect[currAdpConf.nUnOp];
|
||||
currNumCambiUt = new uint[currAdpConf.nUnOp];
|
||||
istNumCambiUt = new uint[currAdpConf.nUnOp];
|
||||
istNumCambiUt = new sampleVect[currAdpConf.nUnOp];
|
||||
for (int i = 0; i < currAdpConf.nUnOp; i++)
|
||||
{
|
||||
// leggo tutti i dati...
|
||||
@@ -1812,12 +1812,12 @@ namespace MTC_Adapter
|
||||
}
|
||||
// imposto num assi e leggo valori salvati...
|
||||
contDistMovAssi = new double[currAdpConf.nAxis];
|
||||
istDistMovAssi = new double[currAdpConf.nAxis];
|
||||
istLoadAssi = new double[currAdpConf.nAxis];
|
||||
istDistMovAssi = new sampleVect[currAdpConf.nAxis];
|
||||
istLoadAssi = new sampleVect[currAdpConf.nAxis];
|
||||
contNumInvAssi = new uint[currAdpConf.nAxis];
|
||||
istAccTimeAssi = new double[currAdpConf.nAxis];
|
||||
istAccTimeAssi = new sampleVect[currAdpConf.nAxis];
|
||||
contAccTimeAssi = new double[currAdpConf.nAxis];
|
||||
istNumInvAssi = new uint[currAdpConf.nAxis];
|
||||
istNumInvAssi = new sampleVect[currAdpConf.nAxis];
|
||||
lastChekAccumTimeAxis = DateTime.Now;
|
||||
for (int i = 0; i < currAdpConf.nAxis; i++)
|
||||
{
|
||||
@@ -1840,7 +1840,7 @@ namespace MTC_Adapter
|
||||
currPathProgrName = new string[currAdpConf.nPath];
|
||||
istPathProgrName = new string[currAdpConf.nPath];
|
||||
currPathPartCount = new uint[currAdpConf.nPath];
|
||||
istPathPartCount = new uint[currAdpConf.nPath];
|
||||
istPathPartCount = new sampleVect[currAdpConf.nPath];
|
||||
for (int i = 0; i < currAdpConf.nPath; i++)
|
||||
{
|
||||
// leggo tutti i dati...
|
||||
@@ -1856,7 +1856,7 @@ namespace MTC_Adapter
|
||||
vettPath[i].mPathAlarmPLC.Normal();
|
||||
}
|
||||
currVacPumpWrkTime = new uint[currAdpConf.nVacuumPump];
|
||||
istVacPumpWrkTime = new uint[currAdpConf.nVacuumPump];
|
||||
istVacPumpWrkTime = new sampleVect[currAdpConf.nVacuumPump];
|
||||
for (int i = 0; i < currAdpConf.nVacuumPump; i++)
|
||||
{
|
||||
// leggo tutti i dati...
|
||||
@@ -1867,7 +1867,7 @@ namespace MTC_Adapter
|
||||
currVacPumpWrkTime[i] = Convert.ToUInt32(riVacPumpWrk.Value);
|
||||
}
|
||||
currVacActCount = new uint[currAdpConf.nVacuumAct];
|
||||
istVacActCount = new uint[currAdpConf.nVacuumAct];
|
||||
istVacActCount = new sampleVect[currAdpConf.nVacuumAct];
|
||||
for (int i = 0; i < currAdpConf.nVacuumAct; i++)
|
||||
{
|
||||
// leggo tutti i dati...
|
||||
@@ -1878,7 +1878,7 @@ namespace MTC_Adapter
|
||||
currVacActCount[i] = Convert.ToUInt32(riVacActCount.Value);
|
||||
}
|
||||
currLubroCount = new uint[currAdpConf.nLubro];
|
||||
istLubroCount = new uint[currAdpConf.nLubro];
|
||||
istLubroCount = new sampleVect[currAdpConf.nLubro];
|
||||
for (int i = 0; i < currAdpConf.nLubro; i++)
|
||||
{
|
||||
// leggo tutti i dati...
|
||||
@@ -1889,7 +1889,7 @@ namespace MTC_Adapter
|
||||
currLubroCount[i] = Convert.ToUInt32(riLubro.Value);
|
||||
}
|
||||
currSlittaMag = new uint[currAdpConf.nSlittaMag];
|
||||
istSlittaMag = new uint[currAdpConf.nSlittaMag];
|
||||
istSlittaMag = new sampleVect[currAdpConf.nSlittaMag];
|
||||
for (int i = 0; i < currAdpConf.nSlittaMag; i++)
|
||||
{
|
||||
// leggo tutti i dati...
|
||||
@@ -1900,7 +1900,7 @@ namespace MTC_Adapter
|
||||
currSlittaMag[i] = Convert.ToUInt32(riSlittaMag.Value);
|
||||
}
|
||||
currProtMag = new uint[currAdpConf.nProtMag];
|
||||
istProtMag = new uint[currAdpConf.nProtMag];
|
||||
istProtMag = new sampleVect[currAdpConf.nProtMag];
|
||||
for (int i = 0; i < currAdpConf.nProtMag; i++)
|
||||
{
|
||||
// leggo tutti i dati...
|
||||
@@ -3333,15 +3333,15 @@ namespace MTC_Adapter
|
||||
// decodifico...
|
||||
if (maintData[i].varName == "ACC_TIME")
|
||||
{
|
||||
istOreMaccOn = tabDatiMtz[i];
|
||||
istOreMaccOn.addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
else if (maintData[i].varName == "ACC_TIME_WORK")
|
||||
{
|
||||
istOreMaccLav = tabDatiMtz[i];
|
||||
istOreMaccLav.addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
else if (maintData[i].varName == "SlittaTastatore_Count")
|
||||
{
|
||||
istSlittaTast = tabDatiMtz[i];
|
||||
istSlittaTast.addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
else if (maintData[i].varName.StartsWith("Counter_"))
|
||||
{
|
||||
@@ -3354,7 +3354,6 @@ namespace MTC_Adapter
|
||||
}
|
||||
if (numero > 0 && istCounters.Length >= numero)
|
||||
{
|
||||
//istCounters[numero - 1] = tabDatiMtz[i];
|
||||
istCounters[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
}
|
||||
@@ -3386,7 +3385,7 @@ namespace MTC_Adapter
|
||||
{ }
|
||||
if (numero > 0 && istDistMovAssi.Length >= numero)
|
||||
{
|
||||
istDistMovAssi[numero - 1] = tabDatiMtz[i];
|
||||
istDistMovAssi[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
}
|
||||
else if (maintData[i].varName.EndsWith("_Invers"))
|
||||
@@ -3409,7 +3408,7 @@ namespace MTC_Adapter
|
||||
valRead = 0;
|
||||
lg.Error(string.Format("Errore in recupero num inversioni:{0}parametro: {1}{0}i: {2}{0}Exc: {3}", Environment.NewLine, maintData[i].varName, i, exc));
|
||||
}
|
||||
istNumInvAssi[numero - 1] = valRead;
|
||||
istNumInvAssi[numero - 1].addValue(DateTime.Now, Convert.ToInt32(valRead));
|
||||
}
|
||||
}
|
||||
else if (maintData[i].varName.EndsWith("_AccTime"))
|
||||
@@ -3432,7 +3431,7 @@ namespace MTC_Adapter
|
||||
valRead = 0;
|
||||
lg.Error(string.Format("Errore in recupero num inversioni:{0}parametro: {1}{0}i: {2}{0}Exc: {3}", Environment.NewLine, maintData[i].varName, i, exc));
|
||||
}
|
||||
istAccTimeAssi[numero - 1] = valRead;
|
||||
istAccTimeAssi[numero - 1].addValue(DateTime.Now, Convert.ToInt32(valRead));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3448,7 +3447,7 @@ namespace MTC_Adapter
|
||||
{ }
|
||||
if (numero > 0 && istGiriElettrom.Length >= numero)
|
||||
{
|
||||
istGiriElettrom[numero - 1] = tabDatiMtz[i];
|
||||
istGiriElettrom[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
}
|
||||
else if (maintData[i].varName.EndsWith("_NumCambiUT"))
|
||||
@@ -3461,7 +3460,7 @@ namespace MTC_Adapter
|
||||
{ }
|
||||
if (numero > 0 && istNumCambiUt.Length >= numero)
|
||||
{
|
||||
istNumCambiUt[numero - 1] = tabDatiMtz[i];
|
||||
istNumCambiUt[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3477,7 +3476,7 @@ namespace MTC_Adapter
|
||||
{ }
|
||||
if (numero > 0 && istVacPumpWrkTime.Length >= numero)
|
||||
{
|
||||
istVacPumpWrkTime[numero - 1] = tabDatiMtz[i];
|
||||
istVacPumpWrkTime[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3493,7 +3492,7 @@ namespace MTC_Adapter
|
||||
{ }
|
||||
if (numero > 0 && istVacActCount.Length >= numero)
|
||||
{
|
||||
istVacActCount[numero - 1] = tabDatiMtz[i];
|
||||
istVacActCount[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3509,7 +3508,7 @@ namespace MTC_Adapter
|
||||
{ }
|
||||
if (numero > 0 && istLubroCount.Length >= numero)
|
||||
{
|
||||
istLubroCount[numero - 1] = tabDatiMtz[i];
|
||||
istLubroCount[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3525,7 +3524,7 @@ namespace MTC_Adapter
|
||||
{ }
|
||||
if (numero > 0 && istSlittaMag.Length >= numero)
|
||||
{
|
||||
istSlittaMag[numero - 1] = tabDatiMtz[i];
|
||||
istSlittaMag[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3541,7 +3540,7 @@ namespace MTC_Adapter
|
||||
{ }
|
||||
if (numero > 0 && istProtMag.Length >= numero)
|
||||
{
|
||||
istProtMag[numero - 1] = tabDatiMtz[i];
|
||||
istProtMag[numero - 1].addValue(DateTime.Now, Convert.ToInt32(tabDatiMtz[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4090,28 +4089,31 @@ namespace MTC_Adapter
|
||||
/// <returns></returns>
|
||||
public bool procOreMaccOn(bool needSave)
|
||||
{
|
||||
double delta = istOreMaccOn - contOreMaccOn;
|
||||
// controllo delta < 50% max...
|
||||
if (delta < double.MaxValue / 2)
|
||||
if (istOreMaccOn.vcValid)
|
||||
{
|
||||
// processo comunque sempre...
|
||||
double contatore = updateValDoubleByIncr(0, delta, "ACC_TIME");
|
||||
currAdpConf.ContOreMaccOn += delta;
|
||||
// salvo valore su persistent layer
|
||||
mAccTime.Value = contatore.ToString("0.000", CultureInfo.InvariantCulture);
|
||||
// controllo incremento...
|
||||
if (delta > 0)
|
||||
double delta = istOreMaccOn.vcMedian - contOreMaccOn;
|
||||
// controllo delta < 50% max...
|
||||
if (delta < double.MaxValue / 2)
|
||||
{
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
}
|
||||
// salvo su maschera...
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine(string.Format("ACC_TIME: {0}", mAccTime.Value));
|
||||
parentForm.dataMonitor_1 += sb.ToString();
|
||||
// processo comunque sempre...
|
||||
double contatore = updateValDoubleByIncr(0, delta, "ACC_TIME");
|
||||
currAdpConf.ContOreMaccOn += delta;
|
||||
// salvo valore su persistent layer
|
||||
mAccTime.Value = contatore.ToString("0.000", CultureInfo.InvariantCulture);
|
||||
// controllo incremento...
|
||||
if (delta > 0)
|
||||
{
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
}
|
||||
// salvo su maschera...
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine(string.Format("ACC_TIME: {0}", mAccTime.Value));
|
||||
parentForm.dataMonitor_1 += sb.ToString();
|
||||
|
||||
// ...aggiorno valore riferimento...
|
||||
contOreMaccOn = istOreMaccOn;
|
||||
// ...aggiorno valore riferimento...
|
||||
contOreMaccOn = istOreMaccOn.vcMedian;
|
||||
}
|
||||
}
|
||||
return needSave;
|
||||
}
|
||||
@@ -4122,27 +4124,30 @@ namespace MTC_Adapter
|
||||
/// <returns></returns>
|
||||
public bool procOreMaccLav(bool needSave)
|
||||
{
|
||||
double delta = istOreMaccLav - contOreMaccLav;
|
||||
// controllo delta < 50% max...
|
||||
if (delta < double.MaxValue / 2)
|
||||
if (istOreMaccLav.vcValid)
|
||||
{
|
||||
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)
|
||||
double delta = istOreMaccLav.vcMedian - contOreMaccLav;
|
||||
// controllo delta < 50% max...
|
||||
if (delta < double.MaxValue / 2)
|
||||
{
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
}
|
||||
// salvo su maschera...
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine(string.Format("ACC_TIME_WORK: {0}", mAccTimeWork.Value));
|
||||
parentForm.dataMonitor_1 += sb.ToString();
|
||||
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_1 += sb.ToString();
|
||||
|
||||
// ...aggiorno valore riferimento...
|
||||
contOreMaccLav = istOreMaccLav;
|
||||
// ...aggiorno valore riferimento...
|
||||
contOreMaccLav = istOreMaccLav.vcMedian;
|
||||
}
|
||||
}
|
||||
return needSave;
|
||||
}
|
||||
@@ -4153,27 +4158,30 @@ namespace MTC_Adapter
|
||||
/// <returns></returns>
|
||||
public bool procSlittaTast(bool needSave)
|
||||
{
|
||||
double delta = istSlittaTast - contSlittaTast;
|
||||
// controllo delta < 50% max...
|
||||
if (delta < double.MaxValue / 2)
|
||||
if (istSlittaTast.vcValid)
|
||||
{
|
||||
double contatore = updateValDoubleByIncr(0, delta, "SlittaTastatore_Count");
|
||||
currAdpConf.ContSlittaTast += delta;
|
||||
// salvo valore su persistent layer
|
||||
mSlittaTast.Value = contatore.ToString("0", CultureInfo.InvariantCulture);
|
||||
// controllo valore riferimento...
|
||||
if (delta > 0)
|
||||
double delta = istSlittaTast.vcMedian - contSlittaTast;
|
||||
// controllo delta < 50% max...
|
||||
if (delta < double.MaxValue / 2)
|
||||
{
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
}
|
||||
// salvo su maschera...
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine(string.Format("SlittaTastatore_Count: {0}", mSlittaTast.Value));
|
||||
parentForm.dataMonitor_1 += sb.ToString();
|
||||
double contatore = updateValDoubleByIncr(0, delta, "SlittaTastatore_Count");
|
||||
currAdpConf.ContSlittaTast += delta;
|
||||
// salvo valore su persistent layer
|
||||
mSlittaTast.Value = contatore.ToString("0", CultureInfo.InvariantCulture);
|
||||
// controllo valore riferimento...
|
||||
if (delta > 0)
|
||||
{
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
}
|
||||
// salvo su maschera...
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine(string.Format("SlittaTastatore_Count: {0}", mSlittaTast.Value));
|
||||
parentForm.dataMonitor_1 += sb.ToString();
|
||||
|
||||
// ...aggiorno valore riferimento...
|
||||
contSlittaTast = istSlittaTast;
|
||||
// ...aggiorno valore riferimento...
|
||||
contSlittaTast = istSlittaTast.vcMedian;
|
||||
}
|
||||
}
|
||||
return needSave;
|
||||
}
|
||||
@@ -4244,11 +4252,11 @@ namespace MTC_Adapter
|
||||
for (int i = 0; i < currAdpConf.nPath; i++)
|
||||
{
|
||||
// controllo valore riferimento variato...
|
||||
if (istPathPartCount[i] != currPathPartCount[i])
|
||||
if (istPathPartCount[i].vcMedian != currPathPartCount[i])
|
||||
{
|
||||
if (istPathPartCount[i] > currPathPartCount[i])
|
||||
if (istPathPartCount[i].vcMedian > currPathPartCount[i])
|
||||
{
|
||||
uint delta = istPathPartCount[i] - currPathPartCount[i];
|
||||
uint delta = Convert.ToUInt32(istPathPartCount[i].vcMedian) - currPathPartCount[i];
|
||||
//uint contatore = updatePathRefListByIncr(i, delta, "Path_{0:00}_PZ_TOT");
|
||||
uint contatore = updateValUIntByIncr(i, delta, "Path_{0:00}_PZ_TOT");
|
||||
// passo valore num pz all'adapter
|
||||
@@ -4256,7 +4264,7 @@ namespace MTC_Adapter
|
||||
}
|
||||
else // variato x difetto... azzero!!!
|
||||
{
|
||||
uint newVal = istPathPartCount[i];
|
||||
uint newVal = Convert.ToUInt32(istPathPartCount[i].vcMedian);
|
||||
updateValUInt(i, newVal, "Path_{0:00}_PZ_TOT");
|
||||
// passo valore num pz all'adapter
|
||||
vettPath[i].mPathPartCount.Value = newVal;
|
||||
@@ -4265,7 +4273,7 @@ namespace MTC_Adapter
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
// ...aggiorno valore riferimento...
|
||||
currPathPartCount[i] = istPathPartCount[i];
|
||||
currPathPartCount[i] = Convert.ToUInt32(istPathPartCount[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettPath[i].mPathPartCount.Value);
|
||||
}
|
||||
@@ -4284,7 +4292,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("UnOp_[1-{0}]_KRev: ", currAdpConf.nUnOp);
|
||||
for (int i = 0; i < currAdpConf.nUnOp; i++)
|
||||
{
|
||||
delta = istGiriElettrom[i] - contGiriElettrom[i];
|
||||
delta = Convert.ToUInt32(istGiriElettrom[i].vcMedian) - contGiriElettrom[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{
|
||||
@@ -4299,7 +4307,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
contGiriElettrom[i] = istGiriElettrom[i];
|
||||
contGiriElettrom[i] = Convert.ToUInt32(istGiriElettrom[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettUnOp[i].mUnOpAccTime.Value);
|
||||
}
|
||||
@@ -4318,7 +4326,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("UnOp_[1-{0}]_NumCU: ", currAdpConf.nUnOp);
|
||||
for (int i = 0; i < currAdpConf.nUnOp; i++)
|
||||
{
|
||||
delta = istNumCambiUt[i] - currNumCambiUt[i];
|
||||
delta = Convert.ToUInt32(istNumCambiUt[i]) - currNumCambiUt[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{
|
||||
@@ -4333,7 +4341,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currNumCambiUt[i] = istNumCambiUt[i];
|
||||
currNumCambiUt[i] = Convert.ToUInt32(istNumCambiUt[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettUnOp[i].mUnOpNumCU.Value);
|
||||
}
|
||||
@@ -4352,7 +4360,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("Axis_[1-{0}]_DistDone: ", currAdpConf.nAxis);
|
||||
for (int i = 0; i < currAdpConf.nAxis; i++)
|
||||
{
|
||||
delta = istDistMovAssi[i] - contDistMovAssi[i];
|
||||
delta = Convert.ToUInt32(istDistMovAssi[i]) - contDistMovAssi[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < double.MaxValue / 2)
|
||||
{
|
||||
@@ -4367,7 +4375,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
contDistMovAssi[i] = istDistMovAssi[i];
|
||||
contDistMovAssi[i] = Convert.ToUInt32(istDistMovAssi[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettAxis[i].mAxDistDone.Value);
|
||||
}
|
||||
@@ -4386,7 +4394,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("Axis_[1-{0}]_AccTime: ", currAdpConf.nAxis);
|
||||
for (int i = 0; i < currAdpConf.nAxis; i++)
|
||||
{
|
||||
delta = istAccTimeAssi[i] - contAccTimeAssi[i];
|
||||
delta = Convert.ToUInt32(istAccTimeAssi[i]) - contAccTimeAssi[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < double.MaxValue / 2)
|
||||
{
|
||||
@@ -4400,7 +4408,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
contAccTimeAssi[i] = istAccTimeAssi[i];
|
||||
contAccTimeAssi[i] = Convert.ToUInt32(istAccTimeAssi[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettAxis[i].mAxAccTime.Value);
|
||||
}
|
||||
@@ -4419,7 +4427,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("Axis_[1-{0}]_InvDDone: ", currAdpConf.nAxis);
|
||||
for (int i = 0; i < currAdpConf.nAxis; i++)
|
||||
{
|
||||
delta = istNumInvAssi[i] - contNumInvAssi[i];
|
||||
delta = Convert.ToUInt32(istNumInvAssi[i]) - contNumInvAssi[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < long.MaxValue / 2)
|
||||
{
|
||||
@@ -4434,7 +4442,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
contNumInvAssi[i] = istNumInvAssi[i];
|
||||
contNumInvAssi[i] = Convert.ToUInt32(istNumInvAssi[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettAxis[i].mAxInvDDone.Value);
|
||||
}
|
||||
@@ -4453,7 +4461,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("VacPump_[1-{0}]_WrkTime: ", currAdpConf.nVacuumPump);
|
||||
for (int i = 0; i < currAdpConf.nVacuumPump; i++)
|
||||
{
|
||||
delta = istVacPumpWrkTime[i] - currVacPumpWrkTime[i];
|
||||
delta = Convert.ToUInt32(istVacPumpWrkTime[i]) - currVacPumpWrkTime[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{
|
||||
@@ -4468,7 +4476,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currVacPumpWrkTime[i] = istVacPumpWrkTime[i];
|
||||
currVacPumpWrkTime[i] = Convert.ToUInt32(istVacPumpWrkTime[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettVacPump[i].mVacPumpWrkTime.Value);
|
||||
}
|
||||
@@ -4487,7 +4495,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("VacPump_[1-{0}]_Count: ", currAdpConf.nVacuumPump);
|
||||
for (int i = 0; i < currAdpConf.nVacuumAct; i++)
|
||||
{
|
||||
delta = istVacActCount[i] - currVacActCount[i];
|
||||
delta = Convert.ToUInt32(istVacActCount[i]) - currVacActCount[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{
|
||||
@@ -4502,7 +4510,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currVacActCount[i] = istVacActCount[i];
|
||||
currVacActCount[i] = Convert.ToUInt32(istVacActCount[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettVacAct[i].mVacActCount.Value);
|
||||
}
|
||||
@@ -4521,7 +4529,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("Lubro_[1-{0}]_Count: ", currAdpConf.nLubro);
|
||||
for (int i = 0; i < currAdpConf.nLubro; i++)
|
||||
{
|
||||
delta = istLubroCount[i] - currLubroCount[i];
|
||||
delta = Convert.ToUInt32(istLubroCount[i]) - currLubroCount[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{
|
||||
@@ -4536,7 +4544,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currLubroCount[i] = istLubroCount[i];
|
||||
currLubroCount[i] = Convert.ToUInt32(istLubroCount[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettLubro[i].mLubroNum.Value);
|
||||
}
|
||||
@@ -4593,7 +4601,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("SlittaMagazzino_[1-{0}]_Count: ", currAdpConf.nSlittaMag);
|
||||
for (int i = 0; i < currAdpConf.nSlittaMag; i++)
|
||||
{
|
||||
delta = istSlittaMag[i] - currSlittaMag[i];
|
||||
delta = Convert.ToUInt32(istSlittaMag[i]) - currSlittaMag[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{
|
||||
@@ -4608,7 +4616,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currSlittaMag[i] = istSlittaMag[i];
|
||||
currSlittaMag[i] = Convert.ToUInt32(istSlittaMag[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettSlittaMag[i].mSlittaMagCount.Value);
|
||||
}
|
||||
@@ -4627,7 +4635,7 @@ namespace MTC_Adapter
|
||||
string outString = string.Format("ProtMagazzino_[1-{0}]_Count: ", currAdpConf.nProtMag);
|
||||
for (int i = 0; i < currAdpConf.nProtMag; i++)
|
||||
{
|
||||
delta = istProtMag[i] - currProtMag[i];
|
||||
delta = Convert.ToUInt32(istProtMag[i]) - currProtMag[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{
|
||||
@@ -4642,7 +4650,7 @@ namespace MTC_Adapter
|
||||
needSave = true;
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currProtMag[i] = istProtMag[i];
|
||||
currProtMag[i] = Convert.ToUInt32(istProtMag[i]);
|
||||
}
|
||||
outString += string.Format("{0} | ", vettProtMag[i].mProtMagCount.Value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user