Update naming PLC/CNC e IOB

This commit is contained in:
Samuele E. Locatelli
2020-09-30 22:35:43 +02:00
parent a6c55487b5
commit a3909e39c6
2 changed files with 989 additions and 953 deletions
+16 -16
View File
@@ -17,16 +17,16 @@ namespace IOB_UT
/// </summary>
protected double _lastTC { get; set; } = 0;
/// <summary>
/// Contapezzi CNC
/// </summary>
protected int _pzCountCNC { get; set; } = 0;
/// <summary>
/// Contapezzi IOB
/// </summary>
protected int _pzCountIOB { get; set; } = 0;
/// <summary>
/// Contapezzi PLC
/// </summary>
protected int _pzCountPLC { get; set; } = 0;
/// <summary>
/// Fattore lambda (innovazione) per calcolo EWMA valore TCiclo corrente
/// </summary>
@@ -68,7 +68,7 @@ namespace IOB_UT
{
bool answ = false;
// solo se ho dei pezzi rilevati...
if (pzCountCNC > 0 && pzCountIOB > 0)
if (pzCountPLC > 0 && pzCountIOB > 0)
{
answ = (DateTime.Now.Subtract(lastObservedData).TotalSeconds >= limitTC);
}
@@ -110,18 +110,23 @@ namespace IOB_UT
}
/// <summary>
/// Contapezzi CNC
/// Contapezzi IOB
/// </summary>
public int pzCountCNC
public int pzCountIOB { get; set; } = 0;
/// <summary>
/// Contapezzi PLC
/// </summary>
public int pzCountPLC
{
get
{
return _pzCountCNC;
return _pzCountPLC;
}
set
{
DateTime adesso = DateTime.Now;
int incrPz = value - _pzCountCNC;
int incrPz = value - _pzCountPLC;
if (incrPz > 0)
{
// calcolo lastTC...
@@ -133,15 +138,10 @@ namespace IOB_UT
avgTC = lambda * lastTC + (1 - lambda) * avgTC;
}
}
_pzCountCNC = value;
_pzCountPLC = value;
}
}
/// <summary>
/// Contapezzi IOB
/// </summary>
public int pzCountIOB { get; set; } = 0;
#endregion contapezzi e TCiclo
}
}
+973 -937
View File
File diff suppressed because it is too large Load Diff