aggiunto try/catch x persLayer

This commit is contained in:
Samuele E. Locatelli
2017-05-09 16:55:21 +02:00
parent 0561c3af75
commit 76ddc6f698
+45 -38
View File
@@ -1486,47 +1486,54 @@ namespace MTC_Adapter
public void loadPersData()
{
// nuova lettura valori da file persistenza...
contOreMaccOn = getStoredValDouble("ACC_TIME");
contOreMaccLav = getStoredValDouble("ACC_TIME_WORK");
contSlittaTast = getStoredValDouble("SlittaTastatore_Count");
for (int i = 0; i < currAdpConf.nUnOp; i++)
try
{
contGiriElettrom[i] = getStoredValUInt(string.Format("UnOp_{0:00}_AccTime", i + 1));
currNumCambiUt[i] = getStoredValUInt(string.Format("UnOp_{0:00}_NumCU", i + 1));
// nuova lettura valori da file persistenza...
contOreMaccOn = getStoredValDouble("ACC_TIME");
contOreMaccLav = getStoredValDouble("ACC_TIME_WORK");
contSlittaTast = getStoredValDouble("SlittaTastatore_Count");
for (int i = 0; i < currAdpConf.nUnOp; i++)
{
contGiriElettrom[i] = getStoredValUInt(string.Format("UnOp_{0:00}_AccTime", i + 1));
currNumCambiUt[i] = getStoredValUInt(string.Format("UnOp_{0:00}_NumCU", i + 1));
}
for (int i = 0; i < currAdpConf.nAxis; i++)
{
contDistMovAssi[i] = getStoredValUInt(string.Format("Axis_{0:00}_DistDone", i + 1));
contNumInvAssi[i] = getStoredValUInt(string.Format("Axis_{0:00}_InvDDone", i + 1));
contAccTimeAssi[i] = getStoredValDouble(string.Format("Axis_{0:00}_AccTime", i + 1));
}
for (int i = 0; i < currAdpConf.nVacuumPump; i++)
{
currVacPumpWrkTime[i] = getStoredValUInt(string.Format("VacPump_{0:00}_WrkTime", i + 1));
}
for (int i = 0; i < currAdpConf.nVacuumAct; i++)
{
currVacActCount[i] = getStoredValUInt(string.Format("VacAct_{0:00}_Count", i + 1));
}
for (int i = 0; i < currAdpConf.nLubro; i++)
{
currLubroCount[i] = getStoredValUInt(string.Format("Lubro_{0:00}_Count", i + 1));
}
for (int i = 0; i < currAdpConf.nSlittaMag; i++)
{
currSlittaMag[i] = getStoredValUInt(string.Format("SlittaMagazzino_{0:00}_Count", i + 1));
}
for (int i = 0; i < currAdpConf.nProtMag; i++)
{
currProtMag[i] = getStoredValUInt(string.Format("ProtMagazzino_{0:00}_Count", i + 1));
}
}
for (int i = 0; i < currAdpConf.nAxis; i++)
catch(Exception exc)
{
contDistMovAssi[i] = getStoredValUInt(string.Format("Axis_{0:00}_DistDone", i + 1));
contNumInvAssi[i] = getStoredValUInt(string.Format("Axis_{0:00}_InvDDone", i + 1));
contAccTimeAssi[i] = getStoredValDouble(string.Format("Axis_{0:00}_AccTime", i + 1));
}
for (int i = 0; i < currAdpConf.nVacuumPump; i++)
{
currVacPumpWrkTime[i] = getStoredValUInt(string.Format("VacPump_{0:00}_WrkTime", i + 1));
}
for (int i = 0; i < currAdpConf.nVacuumAct; i++)
{
currVacActCount[i] = getStoredValUInt(string.Format("VacAct_{0:00}_Count", i + 1));
}
for (int i = 0; i < currAdpConf.nLubro; i++)
{
currLubroCount[i] = getStoredValUInt(string.Format("Lubro_{0:00}_Count", i + 1));
}
for (int i = 0; i < currAdpConf.nSlittaMag; i++)
{
currSlittaMag[i] = getStoredValUInt(string.Format("SlittaMagazzino_{0:00}_Count", i + 1));
}
for (int i = 0; i < currAdpConf.nProtMag; i++)
{
currProtMag[i] = getStoredValUInt(string.Format("ProtMagazzino_{0:00}_Count", i + 1));
lg.Error(string.Format("Eccezione in decodifica valori PersLayer: {0}{1}", Environment.NewLine, exc));
}
}