diff --git a/IOB-WIN-NEXT/Iob/Generic.cs b/IOB-WIN-NEXT/Iob/Generic.cs
index 676862aa..c29915a1 100644
--- a/IOB-WIN-NEXT/Iob/Generic.cs
+++ b/IOB-WIN-NEXT/Iob/Generic.cs
@@ -61,8 +61,10 @@ namespace IOB_WIN_NEXT.Iob
lastLogStartup = DateTime.Now;
// setup currProdData & last prod data
- currProdData = redisMan.redGetHashDict(rKeyCurrProdData);
+ currProdData = redisMan.redGetHashDict(rKeyCurrProdData);
+#if false
lastProdData = redisMan.redGetHashDict(rKeyCurrProdData);
+#endif
// aggiungo altri defaults
setDefaults(true);
@@ -4136,12 +4138,12 @@ namespace IOB_WIN_NEXT.Iob
protected int maxPingRetry { get; set; } = 5;
///
- /// Coda massima ammessa per FLog (se <=0 disattivata...)
+ /// Coda massima ammessa per FLog (se ‹= 0 disattivata...)
///
protected int maxQueueFLog { get; set; } = utils.CRI("maxQueueFLog");
///
- /// Coda massima ammessa per FLog (se <=0 disattivata...)
+ /// Coda massima ammessa per FLog (se ‹= 0 disattivata...)
///
protected int maxQueueRawTransf { get; set; } = utils.CRI("maxQueueRawTransf");
@@ -5279,7 +5281,7 @@ namespace IOB_WIN_NEXT.Iob
// sistemo valori
item.value = item.reqValue;
lgInfo($"Richiesta update parametro {item.uid} | actVal = {item.value} | reqVal = {item.reqValue}");
- //item.reqValue = "";
+ item.reqValue = "";
// salvo in lista da ritrasmettere
updatedPar.Add(item);
}
@@ -5397,7 +5399,7 @@ namespace IOB_WIN_NEXT.Iob
}
///
- /// Sync archivio ricette (Macchina <--> MES)
+ /// Sync archivio ricette (Macchina ‹--› MES)
///
///
protected virtual bool processRecipeSyncArch()
@@ -7069,6 +7071,7 @@ namespace IOB_WIN_NEXT.Iob
name = item.Key,
description = memMap.mMapWrite[item.Key].description,
reqValue = memMap.mMapWrite[item.Key].value,
+ value = item.Value,
lastRequest = DateTime.Now,
writable = true
};
diff --git a/IOB-WIN-NEXT/IobConfiguration.cs b/IOB-WIN-NEXT/IobConfiguration.cs
index a6979c52..c4af051d 100644
--- a/IOB-WIN-NEXT/IobConfiguration.cs
+++ b/IOB-WIN-NEXT/IobConfiguration.cs
@@ -35,6 +35,7 @@ namespace IOB_WIN_NEXT
/// Indirizzo Ip del CNC Controllato
///
public string cncIpAddr { get; set; } = "127.0.0.1";
+
///
/// Indirizzo Ip per PING dell'impianto (se NON valorizzato usa cncIpAddr x ping)
///
@@ -60,11 +61,6 @@ namespace IOB_WIN_NEXT
///
public bool disableExeTask { get; set; } = false;
- ///
- /// Indica se le code vadano gestite su redis o meno
- ///
- public bool EnableRedisQueue { get; set; } = false;
-
///
/// Indica che sono disabilitate le fasi controllo stato/semafori (tipicamente x impianti
/// con PLC "suddivisi", PLC + HMI)
@@ -72,7 +68,12 @@ namespace IOB_WIN_NEXT
public bool disableStateCh { get; set; } = false;
///
- /// Nome del file IOB di avvio (REDIS <--> MAN)
+ /// Indica se le code vadano gestite su redis o meno
+ ///
+ public bool EnableRedisQueue { get; set; } = false;
+
+ ///
+ /// Nome del file IOB di avvio (REDIS - MAN)
///
public string filenameIOB { get; set; } = "ND";
diff --git a/IOB-WIN-NEXT/IobNet/Ping.cs b/IOB-WIN-NEXT/IobNet/Ping.cs
index a6e1f4b9..f2f76cf9 100644
--- a/IOB-WIN-NEXT/IobNet/Ping.cs
+++ b/IOB-WIN-NEXT/IobNet/Ping.cs
@@ -219,12 +219,11 @@ namespace IOB_WIN_NEXT.IobNet
}
///
- /// calcola status ping:
- /// se ha < 50% coda richiesta --> true
- /// se ha > 50% del max coda --> true se èmaggior parte a 1 (true)
+ /// Calcola status ping:
+ /// - se ha ‹ 50% coda richiesta --› true
+ /// - se ha › 50% coda richiesta --› true se è maggior parte a 1 (true)
///
///
-
protected bool pingStatusOk()
{
bool answ = true;
diff --git a/IOB-WIN-NEXT/IobSoap/Gomba.cs b/IOB-WIN-NEXT/IobSoap/Gomba.cs
index 00b0146c..88a6ec26 100644
--- a/IOB-WIN-NEXT/IobSoap/Gomba.cs
+++ b/IOB-WIN-NEXT/IobSoap/Gomba.cs
@@ -340,27 +340,57 @@ namespace IOB_WIN_NEXT.IobSoap
// salvo i valori di setup x prox pesata...
upsertKey(item.uid, item.value);
bool fatto = false;
+ bool isPesata = false;
+ gestWeightOut answ = new gestWeightOut();
// se è richiesta pesata IN/OUT --> mando chiamata
if (item.uid == "reqIN")
{
- fatto = reqWeight(true);
+ isPesata = true;
+ answ = reqWeight(true);
+ fatto = answ.feedback == "C";
}
else if (item.uid == "reqOUT")
{
- fatto = reqWeight(false);
+ isPesata = true;
+ answ = reqWeight(false);
+ fatto = answ.feedback == "C";
}
else if (item.uid == "RM" || item.uid.StartsWith("Cod"))
{
// comunque segno fatto x altri casi
fatto = true;
}
- // se fatto --> aggiorno!
- if (fatto)
+
+ // se è pesata...
+ if (isPesata)
{
- //item.value = item.reqValue;
- item.reqValue = "";
- item.lastRead = DateTime.Now;
- item.UM = "";
+ // se è OK
+ if (fatto)
+ {
+ item.value = answ.feedback;
+ item.reqValue = "";
+ item.lastRead = DateTime.Now;
+ item.UM = "";
+ string recPesata = formatPesata(answ, item.uid == "reqIN");
+ lgInfo($"reqWeight | OK effettuato pesata | {recPesata}");
+ }
+ else
+ {
+ item.value = answ.feedback;
+ item.reqValue = "";
+ lgError($"reqWeight | Errore in richiesta peso GOMBA | {answ.feedback} | {answ.notes}");
+ }
+ }
+ else
+ {
+ // se fatto --> aggiorno!
+ if (fatto)
+ {
+ //item.value = item.reqValue;
+ item.reqValue = "";
+ item.lastRead = DateTime.Now;
+ item.UM = "";
+ }
}
}
}
@@ -370,9 +400,9 @@ namespace IOB_WIN_NEXT.IobSoap
///
/// Tipo richiesta: IN (true) / OUT (false)
///
- protected bool reqWeight(bool reqIN)
+ protected gestWeightOut reqWeight(bool reqIN)
{
- bool fatto = false;
+ gestWeightOut answ = null;
try
{
Stopwatch sw = new Stopwatch();
@@ -387,12 +417,7 @@ namespace IOB_WIN_NEXT.IobSoap
string Cod5 = getCurrProdData("Cod5", ""); //string.IsNullOrEmpty(currProdData["Cod5"]) ? "" : currProdData["Cod5"];
string Cod6 = getCurrProdData("Cod6", ""); //string.IsNullOrEmpty(currProdData["Cod6"]) ? "" : currProdData["Cod6"];
// faccio chiamata
- var answ = gombaConn.memWeight(tipoRic, rm, Cod1, Cod2, Cod3, Cod4, Cod5, Cod6);
- fatto = answ.feedback == "C";
- if(!fatto)
- {
- lgError($"reqWeight | Errore in richiesta peso GOMBA | {answ.feedback} | {answ.notes}");
- }
+ answ = gombaConn.memWeight(tipoRic, rm, Cod1, Cod2, Cod3, Cod4, Cod5, Cod6);
sw.Stop();
lgInfo($"SOAP: effettuata chiamata reqWeightList in {sw.Elapsed.TotalMilliseconds}ms | {dataFrom} --> {dataTo}");
}
@@ -400,7 +425,7 @@ namespace IOB_WIN_NEXT.IobSoap
{
lgError($"reqWeight | errore richiesta pesatura{Environment.NewLine}{exc}");
}
- return fatto;
+ return answ;
}
#endregion Protected Methods