Correzione slow data e deadBand
This commit is contained in:
@@ -19,7 +19,7 @@ namespace IOB_UT_NEXT.Config.Base
|
||||
/// <summary>
|
||||
/// Sample period generale (x evitare invii troppo frequenti)
|
||||
/// </summary>
|
||||
public int SamplePeriod { get; set; } = 600;
|
||||
public int SamplePeriod { get; set; } = 1800;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se inviare all'avvio applicazione tutti i valori
|
||||
|
||||
@@ -257,16 +257,16 @@
|
||||
"rovrd": "PATH RAPID OVERRIDE"
|
||||
},
|
||||
"paramsEndThresh": {
|
||||
"Counter": 9,
|
||||
"Temperature": 9,
|
||||
"Weight": 9,
|
||||
"Overfeeding": 9,
|
||||
"Speed": 9,
|
||||
"Master": 9
|
||||
"Counter": 10,
|
||||
"Temperature": 10,
|
||||
"Weight": 10,
|
||||
"Overfeeding": 10,
|
||||
"Speed": 10,
|
||||
"Master": 10
|
||||
},
|
||||
"paramsContainsThresh": {
|
||||
"Spindle ": 9,
|
||||
"Humidity": 9
|
||||
"Spindle ": 10,
|
||||
"Humidity": 10
|
||||
},
|
||||
"mMapWrite": {
|
||||
"setArt": {
|
||||
|
||||
@@ -1566,8 +1566,7 @@ namespace IOB_WIN_OPC_UA.IobOpc
|
||||
var currDataItemMem = FluxMem[uuid];
|
||||
// controllo SE SIA scaduto il tempo massimo...
|
||||
int sendVeto = currDataItemMem.SamplePeriod > IOBConfFull.FluxLog.SamplePeriod ? currDataItemMem.SamplePeriod : IOBConfFull.FluxLog.SamplePeriod;
|
||||
if (Math.Abs(currDataItemMem.LastUpdated.Subtract(adesso).TotalSe
|
||||
conds) > sendVeto)
|
||||
if (Math.Abs(currDataItemMem.LastUpdated.Subtract(adesso).TotalSeconds) > sendVeto)
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
@@ -1576,7 +1575,7 @@ namespace IOB_WIN_OPC_UA.IobOpc
|
||||
// ALTRIMENTI controllo SE diverso
|
||||
if (currDataItemMem.Value != $"{NotifyValue}")
|
||||
{
|
||||
// controllo SE ho DeadBand..
|
||||
// controllo SE ho DeadBand.. forse si può evitare controllo..
|
||||
double dBand = currDataItemMem.DeadBand > IOBConfFull.FluxLog.DeadBand ? currDataItemMem.DeadBand : IOBConfFull.FluxLog.DeadBand;
|
||||
if (dBand > 0)
|
||||
{
|
||||
@@ -1590,7 +1589,7 @@ namespace IOB_WIN_OPC_UA.IobOpc
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Math.Abs(newVal - oldVal) > dBand)
|
||||
if (Math.Abs(newVal - oldVal) >= dBand)
|
||||
{
|
||||
// indico da salvare..
|
||||
answ = true;
|
||||
|
||||
Reference in New Issue
Block a user