Aggiunta stack trace su errore + condizione run esclusa se vuota
This commit is contained in:
+20
-10
@@ -500,7 +500,6 @@ namespace IOB_WIN_NEXT
|
||||
private void UA_ref_eh_MonItChange(object sender, opcUaMonitItemChange e)
|
||||
{
|
||||
checkAndSend(e.CurrMonitoredItem, $"{e.CurrNotify.Value}", false);
|
||||
|
||||
lastCurrent = DateTime.Now;
|
||||
}
|
||||
|
||||
@@ -548,19 +547,30 @@ namespace IOB_WIN_NEXT
|
||||
// cerco nell'elenco delle condizioni che indicano lavora se sono ok faccio +1 conteggio......
|
||||
foreach (var item in checkList)
|
||||
{
|
||||
if (getDataItemValue(item.keyName) == item.targetValue)
|
||||
if (string.IsNullOrEmpty(item.keyName))
|
||||
{
|
||||
numCondOk++;
|
||||
lgError($"Attenzione: item vuoto in checkMultiCondition{Environment.NewLine}StackTrace: {Environment.StackTrace}");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getDataItemValue(item.keyName) == item.targetValue)
|
||||
{
|
||||
numCondOk++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (checkMode == boolCheckMode.AND)
|
||||
{
|
||||
answ = (numCond == numCondOk);
|
||||
}
|
||||
else if (checkMode == boolCheckMode.OR)
|
||||
{
|
||||
answ = numCondOk > 0;
|
||||
}
|
||||
}
|
||||
if (checkMode == boolCheckMode.AND)
|
||||
else
|
||||
{
|
||||
answ = (numCond == numCondOk);
|
||||
}
|
||||
else if (checkMode == boolCheckMode.OR)
|
||||
{
|
||||
answ = numCondOk > 0;
|
||||
answ = true;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
@@ -864,7 +874,7 @@ namespace IOB_WIN_NEXT
|
||||
string answ = "";
|
||||
if (string.IsNullOrEmpty(diKey))
|
||||
{
|
||||
lgError("Attenzione: richiesta chiave vuota in getDataItemValue");
|
||||
lgError($"Attenzione: richiesta chiave vuota in getDataItemValue{Environment.NewLine}StackTrace: {Environment.StackTrace}");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace IOB_WIN_NEXT
|
||||
|
||||
// se valido il check ping lo eseguo... altrimenti lo do x buono
|
||||
bool checkPing = !opcUaParams.pingAsPowerOn;
|
||||
string currRun = "";
|
||||
string currRun = "N.A.";
|
||||
if (!checkPing)
|
||||
{
|
||||
checkPing = (testPingMachine == IPStatus.Success);
|
||||
@@ -83,7 +83,10 @@ namespace IOB_WIN_NEXT
|
||||
B_input = powerOnOk ? 1 : 0;
|
||||
|
||||
// variabili RUN...
|
||||
currRun = getDataItemValue(opcUaParams.keyRunMode);
|
||||
if (!string.IsNullOrEmpty(opcUaParams.keyRunMode))
|
||||
{
|
||||
currRun = getDataItemValue(opcUaParams.keyRunMode);
|
||||
}
|
||||
|
||||
// salvo running come = working...
|
||||
isRunning = isWorking;
|
||||
|
||||
Reference in New Issue
Block a user