Merge branch 'release/IobGomba13'
This commit is contained in:
@@ -1,23 +1,14 @@
|
||||
{
|
||||
"mMapWrite": {
|
||||
"reqIN": {
|
||||
"name": "reqIN",
|
||||
"description": "Registra Peso IN",
|
||||
"reqPesata": {
|
||||
"name": "reqPesata",
|
||||
"description": "Registra Peso IN/OUT",
|
||||
"memAddr": "000",
|
||||
"tipoMem": "String",
|
||||
"index": 0,
|
||||
"size": 1,
|
||||
"displOrdinal": 5
|
||||
},
|
||||
"reqOUT": {
|
||||
"name": "reqOUT",
|
||||
"description": "Registra Peso OUT",
|
||||
"memAddr": "000",
|
||||
"tipoMem": "String",
|
||||
"index": 0,
|
||||
"size": 1,
|
||||
"displOrdinal": 6
|
||||
},
|
||||
},
|
||||
"RM": {
|
||||
"name": "RM",
|
||||
"description": "Codice Pesata",
|
||||
@@ -83,6 +74,15 @@
|
||||
}
|
||||
},
|
||||
"mMapRead": {
|
||||
"logReq": {
|
||||
"name": "logReq",
|
||||
"description": "Esito Comando Pesata",
|
||||
"memAddr": "000",
|
||||
"tipoMem": "String",
|
||||
"index": 0,
|
||||
"size": 1,
|
||||
"displOrdinal": 6
|
||||
},
|
||||
"lastWeightIn": {
|
||||
"name": "lastWeightIn",
|
||||
"description": "Ultima Pesata IN (kg)",
|
||||
|
||||
@@ -59,6 +59,6 @@ CLI_INST=SteamWareSim
|
||||
;STARTLIST=SIMUL_02
|
||||
|
||||
;NB: mettere copy always ai file di conf x fare test...
|
||||
STARTLIST=SIMUL_01
|
||||
STARTLIST=IMI_GOMBA
|
||||
|
||||
MAXCNC=10
|
||||
@@ -489,10 +489,14 @@
|
||||
</Compile>
|
||||
<Compile Include="UAClient.cs" />
|
||||
<Compile Include="utils.cs" />
|
||||
<None Include="DATA\CONF\IMI_GOMBA.json" />
|
||||
<None Include="DATA\CONF\IMI_GOMBA.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\IMI_PAMA_392.ini" />
|
||||
<None Include="DATA\CONF\IMI_PAMA_392.json" />
|
||||
<None Include="DATA\CONF\IMI_GOMBA.ini" />
|
||||
<None Include="DATA\CONF\IMI_GOMBA.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\IMI_SOITAAB_Z2342_02.ini" />
|
||||
<None Include="DATA\CONF\IMI_SOITAAB_Z2342_02.json" />
|
||||
<None Include="DATA\CONF\IMI_SOITAAB_Z2342_01.ini" />
|
||||
|
||||
@@ -6106,7 +6106,7 @@ namespace IOB_WIN_NEXT.Iob
|
||||
if (trovato == null)
|
||||
{
|
||||
currValore = "";
|
||||
//se ho valori current li impiego...
|
||||
// se ho valori current li impiego...
|
||||
if (currProdData.ContainsKey(item.Value.name))
|
||||
{
|
||||
currValore = currProdData[item.Value.name];
|
||||
|
||||
@@ -114,11 +114,6 @@ namespace IOB_WIN_NEXT.IobSoap
|
||||
{
|
||||
// valore non presente in vers default... se gestito fare override
|
||||
Dictionary<string, string> outVal = new Dictionary<string, string>();
|
||||
|
||||
// FIXME TODO FARE !!!
|
||||
// recuperare elenco pesate e inserire in param list elenco nuove pesate (eventualmente ripetendo ultima?)
|
||||
// usare redis x salvare ultima pesata registrata in locale...
|
||||
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
// test lettura elenco pesate... se NON nullo --> OK!
|
||||
@@ -128,7 +123,7 @@ namespace IOB_WIN_NEXT.IobSoap
|
||||
sw.Stop();
|
||||
lgInfo($"getDynData | SOAP: effettuata chiamata reqWeightList in {sw.Elapsed.TotalMilliseconds}ms | {dataFrom} --> {dataTo} | {listPesateCurr.Count} rec");
|
||||
|
||||
// verifico se siano pesate nuove o meno...
|
||||
// verifico se ci siano pesate nuove o meno...
|
||||
if (listPesateCurr.Count != listPesateArch.Count)
|
||||
{
|
||||
// elenco indici
|
||||
@@ -172,10 +167,22 @@ namespace IOB_WIN_NEXT.IobSoap
|
||||
listPesateArch = tmpPesate;
|
||||
}
|
||||
}
|
||||
|
||||
// processo comunque le aree memoria READ...
|
||||
if (memMap.mMapRead.Count > 0)
|
||||
{
|
||||
foreach (var item in memMap.mMapRead)
|
||||
{
|
||||
var currVal = getCurrProdData(item.Key, "");
|
||||
outVal.Add(item.Key, $"{currVal}");
|
||||
}
|
||||
}
|
||||
|
||||
lastReadPLC = DateTime.Now;
|
||||
return outVal;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Effettua lettura semafori principale <paramref name="currDispData">Parametri da
|
||||
/// aggiornare x display in form</paramref>
|
||||
@@ -187,10 +194,7 @@ namespace IOB_WIN_NEXT.IobSoap
|
||||
B_input = 1;
|
||||
currDispData.semIn = Semaforo.SV;
|
||||
|
||||
// refresh pesate...
|
||||
|
||||
// se ho pesate in memoria nel periodo richiesto --> RUN
|
||||
|
||||
if (listPesateCurr != null && listPesateCurr.Count > 0)
|
||||
{
|
||||
B_input += (1 << 1);
|
||||
@@ -334,6 +338,7 @@ namespace IOB_WIN_NEXT.IobSoap
|
||||
protected override void plcWriteParams(ref List<objItem> updatedPar)
|
||||
{
|
||||
lgTrace($"plcWriteParams: richiesta per {updatedPar.Count} params");
|
||||
List<objItem> extraPar = new List<objItem>();
|
||||
foreach (var item in updatedPar)
|
||||
{
|
||||
lgInfo($"ITEM | {item.uid} | {item.value}");
|
||||
@@ -341,17 +346,14 @@ namespace IOB_WIN_NEXT.IobSoap
|
||||
upsertKey(item.uid, item.value);
|
||||
bool fatto = false;
|
||||
bool isPesata = false;
|
||||
bool isIN = false;
|
||||
gestWeightOut answ = new gestWeightOut();
|
||||
// se è richiesta pesata IN/OUT --> mando chiamata
|
||||
if (item.uid == "reqIN")
|
||||
if (item.uid == "reqPesata")
|
||||
{
|
||||
isPesata = true;
|
||||
answ = reqWeight(true);
|
||||
}
|
||||
else if (item.uid == "reqOUT")
|
||||
{
|
||||
isPesata = true;
|
||||
answ = reqWeight(false);
|
||||
isIN = item.value.ToUpper() == "IN";
|
||||
answ = reqWeight(isIN);
|
||||
}
|
||||
else if (item.uid == "RM" || item.uid.StartsWith("Cod"))
|
||||
{
|
||||
@@ -365,19 +367,33 @@ namespace IOB_WIN_NEXT.IobSoap
|
||||
// se è OK
|
||||
if (answ.feedback == "C")
|
||||
{
|
||||
item.value = $"{answ.feedback} | {answ.notes}";
|
||||
item.reqValue = "";
|
||||
item.lastRead = DateTime.Now;
|
||||
item.UM = "";
|
||||
string recPesata = formatPesata(answ, item.uid == "reqIN");
|
||||
lgInfo($"reqWeight | OK effettuato pesata | {recPesata}");
|
||||
// aggiorno dati pesate IN/OUT...
|
||||
if(isIN)
|
||||
{
|
||||
upsertKey("lastWeightIn", answ.weightIn);
|
||||
upsertKey("lastRecIn", recPesata);
|
||||
}
|
||||
else
|
||||
{
|
||||
upsertKey("lastWeightOut", answ.weightOut);
|
||||
upsertKey("lastRecOut", recPesata);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item.value = $"{answ.feedback} | {answ.notes}";
|
||||
item.reqValue = "";
|
||||
lgError($"reqWeight | Errore in richiesta peso GOMBA | {answ.feedback} | {answ.notes}");
|
||||
}
|
||||
item.value = "";
|
||||
//item.value = $"{answ.feedback} | {answ.notes}";
|
||||
item.reqValue = "";
|
||||
item.lastRead = DateTime.Now;
|
||||
item.UM = "";
|
||||
// salvo esito richiesta comunque
|
||||
upsertKey("logReq", $"{answ.feedback} | {answ.notes}");
|
||||
// faccio in modo di eseguire subito getDynData
|
||||
demFactDynData = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user