Merge branch 'release/IobGomba11'
This commit is contained in:
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Coda massima ammessa per FLog (se <=0 disattivata...)
|
||||
/// Coda massima ammessa per FLog (se ‹= 0 disattivata...)
|
||||
/// </summary>
|
||||
protected int maxQueueFLog { get; set; } = utils.CRI("maxQueueFLog");
|
||||
|
||||
/// <summary>
|
||||
/// Coda massima ammessa per FLog (se <=0 disattivata...)
|
||||
/// Coda massima ammessa per FLog (se ‹= 0 disattivata...)
|
||||
/// </summary>
|
||||
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
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sync archivio ricette (Macchina <--> MES)
|
||||
/// Sync archivio ricette (Macchina ‹--› MES)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
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
|
||||
};
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace IOB_WIN_NEXT
|
||||
/// Indirizzo Ip del CNC Controllato
|
||||
/// </summary>
|
||||
public string cncIpAddr { get; set; } = "127.0.0.1";
|
||||
|
||||
/// <summary>
|
||||
/// Indirizzo Ip per PING dell'impianto (se NON valorizzato usa cncIpAddr x ping)
|
||||
/// </summary>
|
||||
@@ -60,11 +61,6 @@ namespace IOB_WIN_NEXT
|
||||
/// </summary>
|
||||
public bool disableExeTask { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se le code vadano gestite su redis o meno
|
||||
/// </summary>
|
||||
public bool EnableRedisQueue { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 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;
|
||||
|
||||
/// <summary>
|
||||
/// Nome del file IOB di avvio (REDIS <--> MAN)
|
||||
/// Indica se le code vadano gestite su redis o meno
|
||||
/// </summary>
|
||||
public bool EnableRedisQueue { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Nome del file IOB di avvio (REDIS - MAN)
|
||||
/// </summary>
|
||||
public string filenameIOB { get; set; } = "ND";
|
||||
|
||||
|
||||
@@ -219,12 +219,11 @@ namespace IOB_WIN_NEXT.IobNet
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
protected bool pingStatusOk()
|
||||
{
|
||||
bool answ = true;
|
||||
|
||||
@@ -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
|
||||
/// </summary>
|
||||
/// <param name="reqIN">Tipo richiesta: IN (true) / OUT (false)</param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user