completo eliminazione area EOK da AdapterESA

This commit is contained in:
Samuele E. Locatelli
2017-03-17 09:39:30 +01:00
parent 01de0135ea
commit c3ed9b6d24
2 changed files with 0 additions and 37 deletions
-33
View File
@@ -863,46 +863,13 @@ namespace MTC_Adapter
sb.AppendLine(string.Format("Load: {0}", UnOpLoad));
// -------------------------------------------
// recupero dati dai contatori EOK
bool needSave = false;
// ore totali accensione
int MinMaccOn = (int)ncDevice.PLC_MemoryAreaEOK[0];
int OreMaccOn = (int)ncDevice.PLC_MemoryAreaEOK[1];
istOreMaccOn = OreMaccOn + (double)MinMaccOn / 60;
needSave = procOreMaccOn(needSave);
// ore totali lavoro
int MinMaccLav = (int)ncDevice.PLC_MemoryAreaEOK[2];
int OreMaccLav = (int)ncDevice.PLC_MemoryAreaEOK[3];
istOreMaccLav = OreMaccLav + (double)MinMaccLav / 60;
needSave = procOreMaccLav(needSave);
// giri totali degli elettromandrini!
for (int i = 0; i < currAdpConf.nUnOp; i++)
{
istGiriElettrom[i] = (uint)ncDevice.PLC_MemoryAreaEOK[4 + i];
}
needSave = procGiriTotUnOp(needSave);
needSave = procNumCU(needSave);
// per ESA calcolo a mano se ci sia stato impiego assi... salvo le istantanee mov precedenti...
double precVal = 0;
DateTime adesso = DateTime.Now;
TimeSpan accumTime = adesso.Subtract(lastChekAccumTimeAxis);
// spostamento totale assi!
for (int i = 0; i < 3; i++)
{
precVal = istDistMovAssi[i];
// primo è metri, secondo km (moltiplico x 1000)
istDistMovAssi[i] = ncDevice.PLC_MemoryAreaEOK[8 + 2 * i] + ncDevice.PLC_MemoryAreaEOK[9 + 2 * i] * 1000;
// verifico SE devo aggiungere tempo lavoro sui singoli assi (se si sono spostati...) -- è a maglie LARGHE poiché leggiamo lo "scatto ogni metro" x cui se campiono velocemente ma assi muovono lenti prendo MENO tempo di movimento del reale...
if (precVal != istDistMovAssi[i])
{
istAccTimeAssi[i] += accumTime.TotalHours;
}
}
// salvo valore lastChekAccumTimeAxis
lastChekAccumTimeAxis = adesso;
-4
View File
@@ -90,10 +90,6 @@ namespace SCMCncLib
/// </summary>
public UInt32[] PLC_MemAreaV_tmp;
/// <summary>
/// memorie a 1 byte (8 bit) x area EOK (status e valori vari)
/// </summary>
public uint[] PLC_MemoryAreaEOK;
/// <summary>
/// memorie a 1 byte (32 bit) x area ETK (status e valori vari)
/// </summary>
public UInt32[] PLC_MemoryAreaETK;