This commit is contained in:
Samuele E. Locatelli
2025-10-07 10:47:01 +02:00
38 changed files with 905 additions and 323 deletions
+2 -2
View File
@@ -62,8 +62,8 @@
<Reference Include="ICSharpCode.SharpZipLib, Version=1.4.2.13, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="MapoSDK, Version=6.14.2508.516, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2508.516\lib\MapoSDK.dll</HintPath>
<Reference Include="MapoSDK, Version=6.14.2509.1018, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2509.1018\lib\MapoSDK.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MapoSDK" version="6.14.2508.516" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2509.1018" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="9.0.0" targetFramework="net462" />
+1 -1
View File
@@ -1861,7 +1861,7 @@ namespace IOB_WIN_FORM
rtrQueueLen = iobObj.QueueRawTransf.Count;
ulQueueLen = iobObj.QueueULog.Count;
// aggiorno labels counters...
counterIob = $"pz IOB {iobObj.contapezziIOB}";
counterIob = $"pz MES {iobObj.contapezziIOB}";
counterMac = $"pz PLC {iobObj.contapezziPLC}";
Dictionary<string, string> setPar = new Dictionary<string, string>();
setPar.Add("IP", iobObj.IOBConfFull.Device.Connect.IpAddr);
+2 -2
View File
@@ -38,8 +38,8 @@
<Reference Include="FluentFTP, Version=52.1.0.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL">
<HintPath>..\packages\FluentFTP.52.1.0\lib\net462\FluentFTP.dll</HintPath>
</Reference>
<Reference Include="MapoSDK, Version=6.14.2508.516, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2508.516\lib\MapoSDK.dll</HintPath>
<Reference Include="MapoSDK, Version=6.14.2509.1018, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2509.1018\lib\MapoSDK.dll</HintPath>
</Reference>
<Reference Include="MathNet.Numerics, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MathNet.Numerics.5.0.0\lib\net461\MathNet.Numerics.dll</HintPath>
+83 -13
View File
@@ -129,7 +129,7 @@ namespace IOB_WIN_FORM.Iob
protected bool enableCliRestart = false;
/// <summary>
/// Boolean x indicare contapezzi abilitato a livello di conf apoplicazione
/// Boolean x indicare contapezzi abilitato a livello di conf applicazione
/// </summary>
protected bool enablePzCountByApp = true;
@@ -3080,7 +3080,7 @@ namespace IOB_WIN_FORM.Iob
if (checkServerAlive)
{
string url2call = $"{urlRemTask2Exe}{taskName}";
if(!string.IsNullOrEmpty(codTav))
if (!string.IsNullOrEmpty(codTav))
{
url2call = $"{urlRemTask2ExeTav(codTav)}{taskName}";
}
@@ -3919,12 +3919,90 @@ namespace IOB_WIN_FORM.Iob
}
/// <summary>
/// Effettua verifica se abilitato invio pezzi in blocco e nel caso
/// Effettua verifica se abilitato invio pezzi in blocco PER TAVOLE e nel caso
/// - invio in blocco pezzi
/// - aggiornamento del contapezzi (passato come ref) x nuovo valore post invio
/// </summary>
protected virtual void trySendPzCountBlock(string forceMachName)
/// <param name="fullCode">Idx macchina completo, con tavola/pallet di invio</param>
/// <param name="pzCountMes">Contapezzi MES (IOB) attuale</param>
/// <param name="pzCountImp">Contapezzi impianto (per la tavola indicata)</param>
protected virtual int trySendPzCountBlock(string fullCode, int pzCountMes, int pzCountImp)
{
int qtyAdded = 0;
lgDebug($"Chiamata trySendPzCountBlock MULTI | fullCode: {fullCode} | pzCountMes: {pzCountMes} | pzCountImp: {pzCountImp}");
// in primis HA SENSO procedere SOLO SE server MP è Online...
if (MPOnline)
{
// SOLO SE online la macchina...
if (IobOnline)
{
int numIncr = 0;
// verifico se la funzione SIA abilitata
if (enableSendPzCountBlock)
{
int delta = pzCountImp - pzCountMes;
// se è abilitata verifico differenza: se ho DELTA > minSendPzCountBlock -->
// invio un blocco <= maxSendPzCountBlock
if (delta > minSendPzCountBlock)
{
// init genObj display
newDisplayData currDispData = new newDisplayData();
// resta indietro di ALMENO minSendPzCountBlock pezzi x recuperare 1:1...
numIncr = delta > maxSendPzCountBlock + minSendPzCountBlock ? maxSendPzCountBlock : delta - minSendPzCountBlock;
// invio il num max di pezzi ammesso in blocco!
lastUrl = $"{urlAddPzCount}{numIncr}".Replace(IOBConfFull.General.CodIOB, fullCode);
string resp = utils.callUrlNow(lastUrl);
if (!string.IsNullOrEmpty(resp))
{
// dalla risposta (come numero) capisco SE ha aggiunto i pezzi (e quanti)
int.TryParse(resp, out qtyAdded);
if (qtyAdded > 0)
{
// aggiorno contapezzi ...
pzCountMes += qtyAdded;
lgInfo($"SEND incremento contapezzi: send: {numIncr} | resp: {qtyAdded} | contapezziMES: {pzCountMes}");
// invio conferma contapezzi..
string fullUrl = $"{urlSetPzCount}{pzCountMes}".Replace(IOBConfFull.General.CodIOB, fullCode);
string retVal = utils.callUrl(fullUrl);
// verifica se tutto OK
if (retVal != $"{pzCountMes}")
{
// errore salvataggio contapezzi
lgError($"trySendPzCountBlock: errore salvataggio contapezzi: contapezziMES {pzCountMes} | risposta: {retVal}");
}
}
else
{
lgError($"Richiesto incremento {numIncr} ma NON registrato su server MP-IO");
}
}
currDispData.newUrlCallData = lastUrl;
currDispData.counter = pzCountMes;
currDispData.semOut = Semaforo.SV;
raiseRefresh(currDispData);
}
}
}
else
{
lgError("Impossibile trySendPzCountBlock: IobOnline è false");
}
}
else
{
lgError("Impossibile trySendPzCountBlock: MPOnline è false");
}
return qtyAdded;
}
/// <summary>
/// Effettua verifica se abilitato invio pezzi in blocco (caso macchina standard/singolo contapezzi) e nel caso
/// - invio in blocco pezzi
/// - aggiornamento del contapezzi (passato come ref) x nuovo valore post invio
/// </summary>
protected virtual void trySendPzCountBlock()
{
lgDebug($"Chiamata trySendPzCountBlock STD | pzCountMes: {contapezziIOB} | pzCountImp: {contapezziPLC}");
// in primis HA SENSO procedere SOLO SE server MP è Online...
if (MPOnline)
{
@@ -3947,10 +4025,6 @@ namespace IOB_WIN_FORM.Iob
numIncr = delta > maxSendPzCountBlock + minSendPzCountBlock ? maxSendPzCountBlock : delta - minSendPzCountBlock;
// invio il num max di pezzi ammesso in blocco!
lastUrl = $"{urlAddPzCount}{numIncr}";
if (!string.IsNullOrEmpty(forceMachName))
{
lastUrl = lastUrl.Replace(IOBConfFull.General.CodIOB, forceMachName);
}
string resp = utils.callUrlNow(lastUrl);
if (!string.IsNullOrEmpty(resp))
{
@@ -3963,10 +4037,6 @@ namespace IOB_WIN_FORM.Iob
lgInfo($"SEND incremento contapezzi: send: {numIncr} | resp: {qtyAdded} | contapezziIOB: {contapezziIOB}");
// invio conferma contapezzi..
string fullUrl = $"{urlSetPzCount}{contapezziIOB}";
if (!string.IsNullOrEmpty(forceMachName))
{
fullUrl = fullUrl.Replace(IOBConfFull.General.CodIOB, forceMachName);
}
string retVal = utils.callUrl(fullUrl);
// verifica se tutto OK
if (retVal != contapezziIOB.ToString())
@@ -5327,7 +5397,7 @@ namespace IOB_WIN_FORM.Iob
// provo invio
if (!isMulti)
{
trySendPzCountBlock("");
trySendPzCountBlock();
}
// verifica per evitare loop infinito invio fallito
if (oldContapezzi == contapezziIOB)
+74 -54
View File
@@ -272,6 +272,16 @@ namespace IOB_WIN_FORM.Iob
}
}
/// <summary>
/// Dizionario contapezzi Macchina (valori da impianto) x macchine multi tavola/pallet
/// </summary>
public Dictionary<string, int> DictPzCountImp { get; set; } = new Dictionary<string, int>();
/// <summary>
/// Dizionario contapezzi MES (valori salvati su server) x macchine multi tavola/pallet
/// </summary>
public Dictionary<string, int> DictPzCountMes { get; set; } = new Dictionary<string, int>();
/// <summary>
/// Contatore x invio dati FluxLog
/// </summary>
@@ -2538,8 +2548,11 @@ namespace IOB_WIN_FORM.Iob
var linkVal = getOptWriteLink(item.Key);
if (!string.IsNullOrEmpty(linkVal))
{
// aggiungo a task2add...
task2Add.Add(linkVal, item.Value);
// aggiungo a task2add SE manca...
if (!task2Add.ContainsKey(linkVal))
{
task2Add.Add(linkVal, item.Value);
}
lgInfo($"Aggiunta task linked: {linkVal} -> {item.Value}");
}
}
@@ -2604,66 +2617,73 @@ namespace IOB_WIN_FORM.Iob
{
if (checkServerAlive)
{
// leggo PRIMA ODL ....
calcUrl = string.IsNullOrEmpty(forceMach) ? urlGetCurrODL : urlGetCurrODL.Replace(IOBConfFull.General.CodIOB, forceMach);
lastIdxODL = utils.callUrl(calcUrl);
lgTrace($"Lettura ODL dall'url {calcUrl} --> {lastIdxODL}");
// se ho valori in coda da trasmettere uso dati REDIS
if (forceCountRec)
if (isMulti)
{
// uso dati da TCiclo registrati...
calcUrl = string.IsNullOrEmpty(forceMach) ? urlGetPzCountRec : urlGetPzCountRec.Replace(IOBConfFull.General.CodIOB, forceMach);
currServerCount = utils.callUrl(calcUrl);
lgInfo($"Lettura contapezzi da TCiclo registrati dall'url {calcUrl} --> num pz: {currServerCount}");
// disabilitato per macchina MULTI, da riportare logica da OpcUa ...
}
else
{
// uso il contapezzi dichiarato dall'IOB stesso
calcUrl = string.IsNullOrEmpty(forceMach) ? urlGetPzCount : urlGetPzCount.Replace(IOBConfFull.General.CodIOB, forceMach);
currServerCount = utils.callUrl(calcUrl);
lgInfo($"Lettura contapezzi dall'url {calcUrl} --> {currServerCount}");
}
// controllo: SE NON HO ODL...
if (string.IsNullOrEmpty(lastIdxODL) || lastIdxODL == "0")
{
// NON AGGIORNO
contapezziIOB = contapezziPLC;
lgError($"Errore lettura ODL (vuoto) resta tutto invariato contapezzi: {contapezziIOB} | contapezziPLC {contapezziPLC}");
}
else
{
if (!string.IsNullOrEmpty(currServerCount))
// leggo PRIMA ODL ....
calcUrl = string.IsNullOrEmpty(forceMach) ? urlGetCurrODL : urlGetCurrODL.Replace(IOBConfFull.General.CodIOB, forceMach);
lastIdxODL = utils.callUrl(calcUrl);
lgTrace($"Lettura ODL dall'url {calcUrl} --> {lastIdxODL}");
// se ho valori in coda da trasmettere uso dati REDIS
if (forceCountRec)
{
// se "-1" resto a ultimo...
if (currServerCount != "-1")
{
int newVal = -1;
Int32.TryParse(currServerCount, out newVal);
contapezziIOB = newVal > -1 ? newVal : contapezziIOB;
lgInfo("Ricevuta conferma da server di {0} pezzi registrati per ODL", currServerCount);
}
else
{
// NON AGGIORNO
contapezziIOB = contapezziPLC;
lgError($"Errore lettura contapezzi (-1) - uso contapezziPLC --> {contapezziPLC}");
}
// uso dati da TCiclo registrati...
calcUrl = string.IsNullOrEmpty(forceMach) ? urlGetPzCountRec : urlGetPzCountRec.Replace(IOBConfFull.General.CodIOB, forceMach);
currServerCount = utils.callUrl(calcUrl);
lgInfo($"Lettura contapezzi da TCiclo registrati dall'url {calcUrl} --> num pz: {currServerCount}");
}
else
{
// registro che ho UN NUOVO ODL
lgInfo($"Lettura ODL in pzCntReload, currIdxODL {currIdxODL} --> lastIdxODL {lastIdxODL}");
// se ODL differente e NUOVO è zero --> resetto!
if (currIdxODL.ToString() != lastIdxODL && lastIdxODL == "0")
{
// cambiato ODL quindi reset...
contapezziIOB = 0;
lgInfo("Nuovo ODL==0, RESET contapezzi (-->ZERO)");
}
// uso il contapezzi dichiarato dall'IOB stesso
calcUrl = string.IsNullOrEmpty(forceMach) ? urlGetPzCount : urlGetPzCount.Replace(IOBConfFull.General.CodIOB, forceMach);
currServerCount = utils.callUrl(calcUrl);
lgInfo($"Lettura contapezzi dall'url {calcUrl} --> {currServerCount}");
}
// controllo: SE NON HO ODL...
if (string.IsNullOrEmpty(lastIdxODL) || lastIdxODL == "0")
{
// NON AGGIORNO
contapezziIOB = contapezziPLC;
lgError($"Errore lettura ODL (vuoto) resta tutto invariato contapezzi: {contapezziIOB} | contapezziPLC {contapezziPLC}");
}
else
{
if (!string.IsNullOrEmpty(currServerCount))
{
// se "-1" resto a ultimo...
if (currServerCount != "-1")
{
int newVal = -1;
Int32.TryParse(currServerCount, out newVal);
contapezziIOB = newVal > -1 ? newVal : contapezziIOB;
lgInfo("Ricevuta conferma da server di {0} pezzi registrati per ODL", currServerCount);
}
else
{
// NON AGGIORNO
contapezziIOB = contapezziPLC;
lgError($"Errore lettura contapezzi (-1) - uso contapezziPLC --> {contapezziPLC}");
}
}
else
{
// registro che ho UN NUOVO ODL
lgInfo($"Lettura ODL in pzCntReload, currIdxODL {currIdxODL} --> lastIdxODL {lastIdxODL}");
// se ODL differente e NUOVO è zero --> resetto!
if (currIdxODL.ToString() != lastIdxODL && lastIdxODL == "0")
{
// cambiato ODL quindi reset...
contapezziIOB = 0;
lgInfo("Nuovo ODL==0, RESET contapezzi (-->ZERO)");
}
}
// provo a salvare nuovo ODL
int.TryParse(lastIdxODL, out currIdxODL);
lgInfo($"ODL | currIdxODL: {currIdxODL}");
}
// provo a salvare nuovo ODL
int.TryParse(lastIdxODL, out currIdxODL);
lgInfo($"ODL | currIdxODL: {currIdxODL}");
}
}
else
@@ -3104,7 +3124,7 @@ namespace IOB_WIN_FORM.Iob
if (!DemoOut)
{
// SE server alive...
if (checkServerAlive || false)
if (checkServerAlive)
{
// chiamo URL!
string answ = callUrlWithPayload(lastUrl, payload, doAsync);
+1 -1
View File
@@ -1118,7 +1118,7 @@ namespace IOB_WIN_FORM.Iob
if ((contapezziPLC - contapezziIOB) > minSendPzCountBlock)
{
sigPzCount = true;
trySendPzCountBlock(machName);
trySendPzCountBlock(machName, contapezziIOB, contapezziPLC);
sigPzCount = false;
}
// altrimenti invio 1 segnale
+1 -1
View File
@@ -2,7 +2,7 @@
<packages>
<package id="EgwProxy.Ftp" version="3.6.2410.816" targetFramework="net462" />
<package id="FluentFTP" version="52.1.0" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2508.516" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2509.1018" targetFramework="net462" />
<package id="MathNet.Numerics" version="5.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="9.0.0" targetFramework="net462" />
+1 -1
View File
@@ -172,7 +172,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="FluentFTP" publicKeyToken="f4af092b1d8df44f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-52.0.0.0" newVersion="52.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-52.1.0.0" newVersion="52.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
+1 -1
View File
@@ -15,7 +15,7 @@ VENDOR=FRER
MODEL=MCIMIDETH
[CNC]
IP=192.168.0.171
IP=192.168.0.172
PORT=502
[SERVER]
+2 -1
View File
@@ -15,7 +15,8 @@ VENDOR=FRER
MODEL=MCIMIDETH
[CNC]
IP=192.168.0.172
;IP=192.168.0.171
IP=192.168.0.193
PORT=502
[SERVER]
+2 -1
View File
@@ -15,7 +15,8 @@ VENDOR=FRER
MODEL=MCIMIDETH
[CNC]
IP=192.168.0.189
;IP=192.168.0.189
IP=192.168.0.194
PORT=502
[SERVER]
+2 -1
View File
@@ -15,7 +15,8 @@ VENDOR=FRER
MODEL=MCIMIDETH
[CNC]
IP=192.168.0.152
;IP=192.168.0.152
IP=192.168.0.195
PORT=502
[SERVER]
+2 -1
View File
@@ -15,7 +15,8 @@ VENDOR=FRER
MODEL=MCIMIDETH
[CNC]
IP=192.168.0.178
;IP=192.168.0.178
IP=192.168.0.196
PORT=502
[SERVER]
+2 -1
View File
@@ -24,7 +24,8 @@ CLI_INST=SteamWareSim
;STARTLIST=WPS
;STARTLIST=Tend_FIMAT_01
;STARTLIST=PIZ04
STARTLIST=4001-ENR
;STARTLIST=4001-ENR
;STARTLIST=3029-ENR
STARTLIST=_FRER
MAXCNC=10
+6 -6
View File
@@ -15,7 +15,7 @@ VENDOR=FRER
MODEL=MCIMIDETH
[CNC]
IP=192.168.0.999
IP=192.168.0.154
PORT=502
[SERVER]
@@ -66,16 +66,16 @@ FORCE_DYN_DATA=TRUE
DELTA_VAL=0.1
; clock base (da 10ms)
timerIntMs=10
timerIntMs=50
; conf parametri memoria READ/WRITE
PARAM_CONF=999999-ENR.json
PARAM_CONF=_FRER.json
NO_PING=FALSE
; conf blocchi memoria x READ
MEM_BLOCK=999999-ENR_MBlock.json
;; conf aree allarme
;ALARM_CONF=999999-ENR_alarm.json
MEM_BLOCK=_FRER_MBlock.json
VETO_SIG_IN=true
DISAB_KEEPALIVE=true
; rimozione check limiti min/max dynData
disDynDataRangeCheck=true
+28 -33
View File
@@ -11,7 +11,7 @@
"index": 4096,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -25,7 +25,7 @@
"index": 4098,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -39,7 +39,7 @@
"index": 4100,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -53,7 +53,7 @@
"index": 4102,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -67,7 +67,7 @@
"index": 4104,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -81,7 +81,7 @@
"index": 4106,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -95,7 +95,7 @@
"index": 4108,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -109,7 +109,7 @@
"index": 4110,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -123,7 +123,7 @@
"index": 4112,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -137,7 +137,7 @@
"index": 4114,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -151,7 +151,7 @@
"index": 4116,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -165,7 +165,7 @@
"index": 4118,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -179,7 +179,7 @@
"index": 4134,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -193,7 +193,7 @@
"index": 4142,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -207,7 +207,7 @@
"index": 4150,
"size": 2,
"func": "MEDIAN",
"period": 300,
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 500,
@@ -220,8 +220,8 @@
"tipoMem": "RealHL",
"index": 4352,
"size": 2,
"func": "MAX",
"period": 300,
"func": "MEDIAN",
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
@@ -234,8 +234,8 @@
"tipoMem": "RealHL",
"index": 4354,
"size": 2,
"func": "MAX",
"period": 300,
"func": "MEDIAN",
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
@@ -248,8 +248,8 @@
"tipoMem": "RealHL",
"index": 4356,
"size": 2,
"func": "MAX",
"period": 300,
"func": "MEDIAN",
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
@@ -262,8 +262,8 @@
"tipoMem": "RealHL",
"index": 4358,
"size": 2,
"func": "MAX",
"period": 300,
"func": "MEDIAN",
"period": 3600,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
@@ -276,8 +276,8 @@
"tipoMem": "RealHL",
"index": 4142,
"size": 2,
"func": "MAX",
"period": 60,
"func": "MEDIAN",
"period": 600,
"factor": 0.001,
"minVal": 0,
"maxVal": 999999999,
@@ -291,17 +291,12 @@
"tipoMem": "RealHL",
"index": 4358,
"size": 2,
"func": "MAX",
"period": 60,
"func": "MEDIAN",
"period": 600,
"factor": 0.001,
"minVal": 0,
"minVal": 0.01,
"maxVal": 999999999,
"unit": "KWh"
}
}
//"optKVP": {
// "fluxLogReduce": true,
// "fluxLogRedDeadBand": 1.0,
// "fluxLogResendPeriod": 600
//}
}
+18 -24
View File
@@ -47,8 +47,8 @@
<Reference Include="EasyModbus, Version=5.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EasyModbusTCP.5.6.0\lib\net40\EasyModbus.dll</HintPath>
</Reference>
<Reference Include="MapoSDK, Version=6.14.2505.2916, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2505.2916\lib\MapoSDK.dll</HintPath>
<Reference Include="MapoSDK, Version=6.14.2509.1018, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2509.1018\lib\MapoSDK.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
@@ -69,7 +69,7 @@
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.8\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
</Reference>
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.8.24\lib\net461\StackExchange.Redis.dll</HintPath>
<HintPath>..\packages\StackExchange.Redis.2.8.58\lib\net461\StackExchange.Redis.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
@@ -242,27 +242,15 @@
<None Include="DATA\CONF\3028-ENR.ini" />
<None Include="DATA\CONF\3028-ENR.json" />
<None Include="DATA\CONF\3028-ENR_MBlock.json" />
<None Include="DATA\CONF\3029-ENR.ini">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\3029-ENR.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\3029-ENR.ini" />
<None Include="DATA\CONF\3029-ENR.json" />
<None Include="DATA\CONF\3026-MBus.ini" />
<None Include="DATA\CONF\3026-MBus.json" />
<None Include="DATA\CONF\3026-MBus_alarm.json" />
<None Include="DATA\CONF\3029-ENR_MBlock.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\4001-ENR.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\4001-ENR.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\4001-ENR_MBlock.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\3029-ENR_MBlock.json" />
<None Include="DATA\CONF\4001-ENR.ini" />
<None Include="DATA\CONF\4001-ENR.json" />
<None Include="DATA\CONF\4001-ENR_MBlock.json" />
<None Include="DATA\CONF\4002-ENR.ini" />
<None Include="DATA\CONF\4002-ENR.json" />
<None Include="DATA\CONF\4002-ENR_MBlock.json" />
@@ -436,9 +424,15 @@
<None Include="DATA\CONF\Tend_FIMAT_01_MBlock.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\_FRER.ini" />
<None Include="DATA\CONF\_FRER.json" />
<None Include="DATA\CONF\_FRER_MBlock.json" />
<None Include="DATA\CONF\_FRER.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\_FRER.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\_FRER_MBlock.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\HIST\.placeholder">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
+24 -7
View File
@@ -58,6 +58,17 @@ namespace IOB_WIN_MBUS.IobModbusTCP
};
#endif
setParamPlc();
//
string sMinWait = getOptPar("minWait");
if (!string.IsNullOrEmpty(sMinWait))
{
int.TryParse(sMinWait, out minWait);
}
string sMaxWait = getOptPar("maxWait");
if (!string.IsNullOrEmpty(sMaxWait))
{
int.TryParse(sMaxWait, out maxWait);
}
// salvo info su conf IOB...
string iobConfSer = "";
@@ -75,7 +86,14 @@ namespace IOB_WIN_MBUS.IobModbusTCP
lgError("Impossibile avviare, IOBConf nullo/non valido!");
}
}
/// <summary>
/// Min attesa chiamate consecutive ModBus
/// </summary>
private int minWait = 40;
/// <summary>
/// Max attesa chiamate consecutive ModBus
/// </summary>
private int maxWait = 60;
#endregion Public Constructors
#region Public Methods
@@ -217,10 +235,7 @@ namespace IOB_WIN_MBUS.IobModbusTCP
public override Dictionary<string, string> getDynData()
{
Random rnd = new Random();
int minWait = 40;
int maxWait = 60;
int.TryParse(getOptPar("minWait"), out minWait);
int.TryParse(getOptPar("maxWait"), out maxWait);
// valore non presente in vers default... se gestito fare override
Dictionary<string, string> outVal = new Dictionary<string, string>();
if (utils.CRB("enableTSVC"))
@@ -1111,8 +1126,10 @@ namespace IOB_WIN_MBUS.IobModbusTCP
#endif
var strMaxError = getOptPar("MAX_ERROR_READ");
int.TryParse(strMaxError, out maxErrorRead);
if (!string.IsNullOrEmpty(strMaxError))
{
int.TryParse(strMaxError, out maxErrorRead);
}
//if ((enableByApp || enableByIob) && !(disableByIob))
if (enabPzCnt)
{
+1 -1
View File
@@ -94,7 +94,7 @@ namespace IOB_WIN_MBUS.IobModbusTCP
/// - invio in blocco pezzi
/// - aggiornamento del contapezzi (passato come ref) x nuovo valore post invio
/// </summary>
protected override void trySendPzCountBlock(string forceMachName)
protected override void trySendPzCountBlock()
{
// non fa nulla se non accettare lato IOB i pezzi del PLC... su GWMS NON è gestito il contapezzi
if (contapezziIOB != contapezziPLC)
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EasyModbusTCP" version="5.6.0" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2505.2916" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2509.1018" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="9.0.0" targetFramework="net462" />
@@ -9,7 +9,7 @@
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
<package id="NLog" version="5.3.4" targetFramework="net462" />
<package id="Pipelines.Sockets.Unofficial" version="2.2.8" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.8.24" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.8.58" targetFramework="net462" />
<package id="System.Buffers" version="4.6.0" targetFramework="net462" />
<package id="System.Diagnostics.DiagnosticSource" version="9.0.0" targetFramework="net462" />
<package id="System.Diagnostics.PerformanceCounter" version="9.0.0" targetFramework="net462" />
+3 -1
View File
@@ -44,7 +44,9 @@ REM ROBOCOPY %2 \\10.51.90.5\Steamware\IOB-WIN-MBUS-DEB /MIR /log:RobocopyTransf
REM ROBOCOPY %2 Z:\IOB-WIN-MBUS-DEB /MIR
REM ROBOCOPY %2 \\10.51.90.10\Steamware\IOB-WIN-MBUS-DEB /MIR
REM ROBOCOPY %2 \\10.51.90.11\Steamware\IOB-WIN-MBUS-DEB /MIR
ROBOCOPY %2 \\10.51.90.16\Steamware\IOB-WIN-MBUS-DEB /MIR
REM ROBOCOPY %2 \\10.51.90.16\Steamware\IOB-WIN-MBUS-DEB /MIR
ROBOCOPY %2 \\10.74.83.27\Steamware\IOB-WIN-MBUS-DEB /MIR
goto END
+2 -29
View File
@@ -179,39 +179,12 @@
"ns=4;s=ext_stringa2_popup",
"ns=4;s=ext_stringa3_popup",
"ns=4;s=Hmi_Rcp_DmActName",
"ns=4;s=InvRuote_10_11_IOut",
"ns=4;s=InvRuote_12_13_IOut",
"ns=4;s=InvRuote_14_15_IOut",
"ns=4;s=InvRuote_16_17_IOut",
"ns=4;s=invRuote_18_1_IOut",
"ns=4;s=InvRuote_19_20_IOut",
"ns=4;s=InvRuote_2_3_IOut",
"ns=4;s=InvRuote_4_5_IOut",
"ns=4;s=InvRuote_6_7_IOut",
"ns=4;s=InvRuote_8_9_IOut",
"ns=4;s=invTavola_IOut",
"ns=4;s=num_pressione_robot2_sv",
"ns=4;s=num_pressione_robot3_sv",
"ns=4;s=num_pressione_robot4_sv",
"ns=4;s=num_pressione_sv",
"ns=4;s=rele_automatico",
"ns=4;s=rele_ciclo_automatico",
"ns=4;s=rele_emergenza",
"ns=4;s=rele_inserzione_pm",
"ns=4;s=rele_manuale",
"ns=4;s=rele_reset_allarmi",
"ns=4;s=ruota_attiva_robot2_sv",
"ns=4;s=ruota_attiva_robot3_sv",
"ns=4;s=ruota_attiva_robot4_sv",
"ns=4;s=ruota_attiva_sv",
"ns=4;s=valore_pressione_robot2_sv",
"ns=4;s=valore_pressione_robot3_sv",
"ns=4;s=valore_pressione_robot4_sv",
"ns=4;s=valore_pressione_sv",
"ns=4;s=velocita_rot2_SV",
"ns=4;s=velocita_rot3_SV",
"ns=4;s=velocita_rot4_SV",
"ns=4;s=velocita_rot_SV"
"ns=4;s=rele_reset_allarmi"
],
"mMapWrite": {
@@ -252,7 +225,7 @@
"description": "Scrittura Commessa + Quantita + Articolo",
"tipoMem": "String",
"memAddr": "ns=4;s=ext_codice_lotto",
"ComposedVal": "[[setComm]] | [[setPzComm]] pz | [[setArt]]",
"ComposedVal": "[[setComm]] | Art: [[setArt]] x [[setPzComm]] pz ",
"index": 0,
"size": 50
},
+4 -22
View File
@@ -2,7 +2,7 @@
"BrowseFullVal": "ns=4;s=NxController.GlobalVars",
"BrowseNSIndex": 4,
"BrowseValue": 5001,
"keyPartCount": "ext_prod_parziale_robot4",
"keyPartCount": "ext_prod_parziale_mes_robot4",
"keyPartReq": "",
"keyPartId": "",
"keyProgName": "",
@@ -168,7 +168,7 @@
"ns=4;s=ext_prod_parziale_robot1",
"ns=4;s=ext_prod_parziale_robot2",
"ns=4;s=ext_prod_parziale_robot3",
"ns=4;s=ext_prod_parziale_robot4",
"ns=4;s=ext_prod_parziale_mes_robot4",
"ns=4;s=ext_prod_totale_robot1",
"ns=4;s=ext_prod_totale_robot2",
"ns=4;s=ext_prod_totale_robot3",
@@ -252,7 +252,7 @@
"description": "Scrittura Commessa + Quantita + Articolo",
"tipoMem": "String",
"memAddr": "ns=4;s=ext_codice_lotto",
"ComposedVal": "[[setComm]] | [[setPzComm]] pz | [[setArt]]",
"ComposedVal": "[[setComm]] | Art: [[setArt]] x [[setPzComm]] pz ",
"index": 0,
"size": 50
},
@@ -278,7 +278,7 @@
"name": "OPC_SelProg",
"description": "Prog Selezionato",
"tipoMem": "Int",
"memAddr": "ns=4;s=ext_codice_lotto",
"memAddr": "ns=4;s=hmi_rcp_dmActive",
"index": 0,
"size": 50
}
@@ -287,23 +287,5 @@
"setArt": "processOtherInfo",
"setComm": "processOtherInfo",
"setPzComm": "processOtherInfo"
},
"StepActionList": {
"processOtherInfo": [
{
"IdxAct": 1,
"Name": "Abilita Popup",
"FixVal": "True",
"MMapWrite": "showPopup",
"WaitTimeMs": 0
},
{
"IdxAct": 2,
"Name": "Disabilita Popup",
"FixVal": "False",
"MMapWrite": "showPopup",
"WaitTimeMs": 50
}
]
}
}
+19 -19
View File
@@ -5,8 +5,8 @@
"keyPartCount": "",
"isMulti": true,
"keyPartCountTav": {
"TAV1": "MES A PIECE COUNTER",
"TAV2": "MES U PIECE COUNTER"
"TAV_1": "Mes a Piece Counter",
"TAV_2": "Mes U Piece Counter"
},
"keyPartReq": "",
"keyPartId": "",
@@ -16,7 +16,7 @@
"Identity": {},
"condWork": [
{
"keyName": "WarningLight Green",
"keyName": "Warning Light Green",
"targetValue": "True"
}
],
@@ -24,26 +24,26 @@
"checkMode": "AND",
"checkList": [
{
"keyName": "WarningLight Green",
"keyName": "Warning Light Green",
"targetValue": "True"
}
]
},
"condAreaTav1": {
"condActTav1": {
"checkMode": "AND",
"checkList": [
{
"keyName": "T1 WorkingArea",
"targetValue": "true"
"keyName": "T1 Working Area",
"targetValue": "True"
}
]
},
"condAreaTav2": {
"condActTav2": {
"checkMode": "AND",
"checkList": [
{
"keyName": "T2 WorkingArea",
"targetValue": "true"
"keyName": "T2 Working Area",
"targetValue": "True"
}
]
},
@@ -53,7 +53,7 @@
"checkMode": "AND",
"checkList": [
{
"keyName": "WarningLight Blue",
"keyName": "Warning Light Blue",
"targetValue": "True"
}
]
@@ -62,7 +62,7 @@
"checkMode": "AND",
"checkList": [
{
"keyName": "WarningLight Yellow",
"keyName": "Warning Light Yellow",
"targetValue": "True"
}
]
@@ -80,7 +80,7 @@
"checkMode": "AND",
"checkList": [
{
"keyName": "WarningLight Red",
"keyName": "Warning Light Red",
"targetValue": "True"
}
]
@@ -189,17 +189,17 @@
"name": "setPzComm#TAV_1",
"description": "Qty TAV1 (A)",
"tipoMem": "Int",
"memAddr": "ns=1;s=/swcp-assets/137eada7-bd15-474d-8aaf-4e6f2f8ea72a/MES_OUT_A_STRING2",
"memAddr": "ns=1;s=/swcp-assets/137eada7-bd15-474d-8aaf-4e6f2f8ea72a/MES_OUT_A_PIECE_TARGET",
"index": 0,
"size": 4
},
"forceResetPzCount#TAV_1": {
"name": "forceResetPzCount#TAV_1",
"description": "Reset Contapezzi TAV1 (A)",
"tipoMem": "Int",
"tipoMem": "Boolean",
"memAddr": "ns=1;s=/swcp-assets/137eada7-bd15-474d-8aaf-4e6f2f8ea72a/MES_OUT_A_RESET_COUNTER_TRIGGER",
"index": 0,
"size": 4
"size": 1
},
"setComm#TAV_2": {
"name": "setComm#TAV_2",
@@ -221,17 +221,17 @@
"name": "setPzComm#TAV_2",
"description": "Qty TAV2 (U)",
"tipoMem": "Int",
"memAddr": "ns=1;s=/swcp-assets/137eada7-bd15-474d-8aaf-4e6f2f8ea72a/MES_OUT_U_STRING2",
"memAddr": "ns=1;s=/swcp-assets/137eada7-bd15-474d-8aaf-4e6f2f8ea72a/MES_OUT_U_PIECE_TARGET",
"index": 0,
"size": 4
},
"forceResetPzCount#TAV_2": {
"name": "forceResetPzCount#TAV_2",
"description": "Reset Contapezzi TAV2 (U)",
"tipoMem": "Int",
"tipoMem": "Boolean",
"memAddr": "ns=1;s=/swcp-assets/137eada7-bd15-474d-8aaf-4e6f2f8ea72a/MES_OUT_U_RESET_COUNTER_TRIGGER",
"index": 0,
"size": 4
"size": 1
}
},
"mMapRead": {
+1 -1
View File
@@ -27,7 +27,7 @@ CLI_INST=SteamWareSim
;STARTLIST=Tend_RAMA_10_47
;STARTLIST=3026
;STARTLIST=TFT_RAMA_001
;STARTLIST=SIM_DP_02
;STARTLIST=SIM_DP_01
;STARTLIST=1042
STARTLIST=2016
+99
View File
@@ -0,0 +1,99 @@
;Configurazione IOB-WIN
[IOB]
CNCTYPE=SIMULA
PING_MS_TIMEOUT=500
MinDeltaSec=5
EnableRedisQueue=true
[MACHINE]
VENDOR=STEAMWARE
MODEL=DEMO_SIMULATOR_MULTI
[CNC]
IP=127.0.0.1
PORT=0000
[SERVER]
MPIP=http://10.74.82.218
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
CMD_ODL_STARTED=/IOB/getCurrOdlStart/
CMD_FORCLE_SPLIT_ODL=/IOB/forceSplitOdlFull/
CMD_IDLE_TIME=/IOB/getIdlePeriod/
[MEMORY]
[BLINK]
MAX_COUNTER_BLINK = 15
BLINK_FILT=0
[OPTPAR]
AUTO_CHANGE_ODL=true
CHANGE_ODL_MODE=DAILY_CONF_PZ
CHANGE_ODL_HOURS=24
CHANGE_ODL_IDLE_MIN=0
; gestione custom timer
timerIntMs=200
;elenco comma separated delle sub-machine (tipicamente tavole)
IOB_MULTI_CNAME=TAV_1,TAV_2
;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
PZCOUNT_MODE=BIT
ENABLE_PZ_RESET=TRUE
;gestione invio pezzi in blocco
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
MIN_DURATA_ODL=960
; per il simulatore: 50|1 = WAIT 50, DURATION 1 con riferimento al PERIODO base (PER_BASE in ms, default 10 secondi)
PER_BASE=10500
SIM_PZCNT=10|3
SIM_ALARM=1000|20
SIM_MANU=50|6
; 1 = indica che la macchina è multi --> allo scadere del contapezzo gestisce ANCHE il giro tavola sui bit relativi
IS_MULTI=1
; indica gestione e simulazione bit 5 --> slow/emergenza
SIM_SLOW=3500|20
; indica gestione e simulazione bit 6 --> warmup/cooldown
SIM_WUCD=8000|20
; indica gestione e simulazione bit 7 --> emergenza
SIM_EMRG=4000|10
; indica simulazione delle funzionalità power ON/ OFF
SIM_POW_ON_OFF=true
T_ON=6
T_OFF=22
; indica simulazione controlli utente
SIM_RC=681|1
; indica simulazione registro scarti
SIM_RS=461|1
; indica simulazione dichiarazioni (note) utente
SIM_DICH=761|1
; indica matricola opr simulata
SIM_MATR_OPR=1
; conf parametri memoria READ/WRITE
PARAM_CONF=SIM_DP_01.json
;conf test FTP
FTP_SERVER=ftp.steamware.net
FTP_USER=testftpuser
FTP_PWD=we4reFromB3rghem!
FTP_CERT=
FTP_SKIP=TRUE
FTP_LOC_DIR=temp\csv
FTP_REM_DIR=
CSV_ADD_HEADER=true
[BRANCH]
NAME=master
; Tags manuali
[TAGS]
Customer=Steamware
HostOS=WIN
HostName=IOB-WIN-SIMULA
HostAddr=10.74.82.76
+216
View File
@@ -0,0 +1,216 @@
{
"mMapRead": {
"TEMP_01": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "TEMP_01",
"description": "Temperatura 01",
"memAddr": "",
"tipoMem": "Real",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 24.0,
"minVal": 18.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 4
},
"POWER_01": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "POWER_01",
"description": "Potenza impianto",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 80.0,
"minVal": 40.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 5
},
"FEED_OVER": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "FEED_OVER",
"description": "FEED override",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 100.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 6
},
"RAPID_OVER": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "RAPID_OVER",
"description": "RAPID override",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 120.0,
"minVal": 50.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 7
},
"POS_X": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "POS_X",
"description": "Asse X",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 2000.0,
"minVal": -2000.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 8
},
"POS_Y": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "POS_Y",
"description": "Asse Y",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 2000.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 9
},
"POS_Z": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "POS_Z",
"description": "Asse Z",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 1500.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 10
}
},
"mMapWrite": {
"setArt": {
"name": "setArt",
"description": "Articolo",
"memAddr": "DB150.DBB12",
"tipoMem": "String",
"index": 12,
"size": 20,
"factor": 1.0,
"maxVal": 9999.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 1
},
"setComm": {
"name": "setComm",
"description": "Commessa",
"memAddr": "DB150.DBB32",
"tipoMem": "String",
"index": 32,
"size": 20,
"factor": 1.0,
"maxVal": 9999.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 2
},
"setPzComm": {
"name": "setPzComm",
"description": "Qta Richiesta",
"memAddr": "DB150.DBB8",
"tipoMem": "Int",
"index": 8,
"size": 4,
"factor": 1.0,
"maxVal": 9999.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 3
},
"forceSetPzCount": {
"name": "forceSetPzCount",
"description": "Imposta Qta",
"memAddr": "DB150.DBB8",
"tipoMem": "Int",
"index": 8,
"size": 4,
"factor": 1.0,
"maxVal": 9999.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 11
}
},
"DataDecodMap": {},
"FileDecod": {},
"mMapWriteLink": {},
"OptKVP": {
"fluxLogReduce": "true",
"fluxLogRedDeadBand": "2.5",
"fluxLogResendPeriod": "30",
"hasRecipe": "true",
"maxPodlQty": "530",
"useLocalRecipe": "true",
"path-locBase": "C:\\MesData\\",
"path-00-Arch": "ArchivioRicette\\FIMAT",
"path-01-Temp": "01-Temp\\FIMAT",
"path-02-Sent": "02-Inviate\\FIMAT",
"path-03-Recv": "03-Ricevute\\FIMAT",
"path-04-remReq": "Y:\\",
"path-05-remExe": "C:\\MesData\\Remote\\Dosed",
"path-06-remRec": "R:\\",
"path-outReport": "C:\\MesData\\Report",
"path-confSetup": "C:\\MesData\\Setup\\setupConsumi.json",
"replace-<Variant>": "<Variant>{{PODL}}",
"replace-<Info1>": "<Info1>Kg{{Qty}} | {{Note}}"
},
"OptMemPar": {}
}
+7 -9
View File
@@ -47,8 +47,8 @@
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference>
<Reference Include="MapoSDK, Version=6.14.2506.2618, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2506.2618\lib\MapoSDK.dll</HintPath>
<Reference Include="MapoSDK, Version=6.14.2509.1018, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2509.1018\lib\MapoSDK.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
@@ -87,7 +87,7 @@
<HintPath>..\packages\S7netplus.0.1.9\lib\net45\S7.Net.dll</HintPath>
</Reference>
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.8.24\lib\net461\StackExchange.Redis.dll</HintPath>
<HintPath>..\packages\StackExchange.Redis.2.8.58\lib\net461\StackExchange.Redis.dll</HintPath>
</Reference>
<Reference Include="System">
<HintPath>..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.dll</HintPath>
@@ -246,12 +246,10 @@
<None Include="DATA\CONF\MECART_80.json" />
<None Include="DATA\CONF\OPC_UA.ini" />
<None Include="DATA\CONF\OPC_UA.json" />
<None Include="DATA\CONF\SIM_DP_02.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\SIM_DP_02.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\SIM_DP_01.ini" />
<None Include="DATA\CONF\SIM_DP_01.json" />
<None Include="DATA\CONF\SIM_DP_02.ini" />
<None Include="DATA\CONF\SIM_DP_02.json" />
<None Include="DATA\CONF\STEL_200.ini" />
<None Include="DATA\CONF\STEL_200.json" />
<None Include="DATA\CONF\STEL_210.ini" />
+217 -75
View File
@@ -54,8 +54,24 @@ namespace IOB_WIN_OPC_UA.IobOpc
setupOptMemPar();
setupOptMemPar();
setupFileDecod();
// gestione multi: init del contapezzi...
if (opcUaParams.isMulti)
{
// init dizionari contapezz
DictPzCountMes = new Dictionary<string, int>();
DictPzCountImp = new Dictionary<string, int>();
// inizializzo a zero con le tavole configurate...
if (opcUaParams.keyPartCountTav != null && opcUaParams.keyPartCountTav.Count > 0)
{
UpdatePzCountMes(opcUaParams.keyPartCountTav);
}
}
}
#endregion Public Constructors
#region Public Methods
@@ -438,7 +454,11 @@ namespace IOB_WIN_OPC_UA.IobOpc
/// <returns></returns>
public override string getPrgName()
{
string prgName = getDataItemValue(opcUaParams.keyProgName);
string prgName = "";
if (!string.IsNullOrEmpty(opcUaParams.keyProgName))
{
prgName = getDataItemValue(opcUaParams.keyProgName);
}
return prgName;
}
@@ -449,106 +469,228 @@ namespace IOB_WIN_OPC_UA.IobOpc
{
if (enablePzCountByApp)
{
bool hasReset = false;
string currPzCount = "";
// modalità 1: verifico se ho condizioni di abilitazione del contapezzi
if (checkMultiCondition(opcUaParams.condCountEnabled) || opcUaParams.condCountEnabled.checkList.Count == 0)
// verifico conf macchina stadard / MULTI
if (!opcUaParams.isMulti)
{
lgTrace($"processContapezzi | check 01 | opcUaParams.keyPartCount: {opcUaParams.keyPartCount}");
// cerco parametro contapezzi...
currPzCount = getDataItemValue(opcUaParams.keyPartCount);
processContapezziSingle();
}
else
{
lgTrace("processContapezzi | check 01 | manca parametro per keyPartCount");
processContapezziMulti();
}
// modalità 2: verifico conf di keyPartCount
if (string.IsNullOrEmpty(opcUaParams.keyPartCount))
{
lgTrace("processContapezzi | check 02 | check 022 | manca parametro per keyPartCount");
}
else
{
lgTrace($"processContapezzi | check 02 | opcUaParams.keyPartCount: {opcUaParams.keyPartCount}");
// cerco parametro contapezzi... gest alternativa se è un parametro SPECIALE
// (con "#")
if (opcUaParams.keyPartCount.Contains(opcUaParams.kvDelim))
{
int iPos = opcUaParams.keyPartCount.IndexOf(opcUaParams.kvDelim);
string kRef = opcUaParams.keyPartCount.Substring(0, iPos);
string varDef = opcUaParams.keyPartCount.Substring(iPos + 1);
// recupero byte
byte[] bArray = getDataItemValueBytes(kRef);
currPzCount = ConvFromBArr(bArray, varDef, opcUaParams.memDelim);
}
else
{
currPzCount = getDataItemValue(opcUaParams.keyPartCount);
}
}
}
}
// se ho un contapezzi... processo...
if (!string.IsNullOrEmpty(currPzCount))
{
int newVal = -1;
bool fatto = Int32.TryParse(currPzCount, out newVal);
/// <summary>
/// Contapezzi assoluto standard
/// </summary>
private void processContapezziSingle()
{
bool hasReset = false;
string currPzCount = "";
// modalità 1: verifico se ho condizioni di abilitazione del contapezzi
if (checkMultiCondition(opcUaParams.condCountEnabled) || opcUaParams.condCountEnabled.checkList.Count == 0)
{
lgTrace($"processContapezzi | check 01 | opcUaParams.keyPartCount: {opcUaParams.keyPartCount}");
// cerco parametro contapezzi...
currPzCount = getDataItemValue(opcUaParams.keyPartCount);
}
else
{
lgTrace("processContapezzi | check 01 | manca parametro per keyPartCount");
}
if (fatto)
{
// gestione decremento contapezzi: viene "messo via" solo SE c'è un
// effettivo decremento contapezzi...
if (newVal < contapezziPLC)
{
hasReset = true;
// incremento contatore richiesta
countKeyRichiesta = countKeyRichiesta + 1;
// log
lgInfo("Rilevato Reset Contapezzi PLC 01");
}
// se ho un contapezzi... processo...
if (!string.IsNullOrEmpty(currPzCount))
{
int newVal = -1;
bool fatto = Int32.TryParse(currPzCount, out newVal);
// salvo nuovo valore contapezziPLC
contapezziPLC = newVal > -1 ? newVal : contapezziPLC;
}
else
{
lgError($"Errore in decodifica valore contapezzi, valore rilevato: {currPzCount}");
}
}
else
if (fatto)
{
lgError($"Errore in decodifica valore contapezzi da {opcUaParams.keyPartCount} | valore vuoto!");
}
// controllo comunque, se è ZERO il contapezzi, e sul server è maggiore il
// valore x ODL e NON abilitato il trigger reset --> abilito trigger...
if (!pzCountResetted && contapezziPLC <= IOBConfFull.Odl.ResetCountMaxPost && contapezziIOB >= IOBConfFull.Odl.ResetCountMinPre)
{
// controllo comunque, se è ZERO il contapezzi, e sul server è maggiore il
// valore x ODL e NON abilitato il trigger reset --> abilito trigger...
if (!pzCountResetted && contapezziPLC <= IOBConfFull.Odl.ResetCountMaxPost && contapezziIOB >= IOBConfFull.Odl.ResetCountMinPre)
// gestione decremento contapezzi: viene "messo via" solo SE c'è un
// effettivo decremento contapezzi...
if (newVal < contapezziPLC)
{
hasReset = true;
// incremento contatore richiesta
countKeyRichiesta = countKeyRichiesta + 1;
// log
lgInfo($"Rilevato Reset Contapezzi PLC 02 | PLC = {contapezziPLC} <= {IOBConfFull.Odl.ResetCountMaxPost} | IOB = {contapezziIOB} >= {IOBConfFull.Odl.ResetCountMinPre}) | pzCountResetted = true");
lgInfo("Rilevato Reset Contapezzi PLC 01");
}
// salvo nuovo valore contapezziPLC
contapezziPLC = newVal > -1 ? newVal : contapezziPLC;
}
else
{
lgError($"Errore in decodifica valore contapezzi, valore rilevato: {currPzCount}");
}
}
else
{
lgError($"Errore in decodifica valore contapezzi da {opcUaParams.keyPartCount} | valore vuoto!");
}
// controllo comunque, se è ZERO il contapezzi, e sul server è maggiore il
// valore x ODL e NON abilitato il trigger reset --> abilito trigger...
if (!pzCountResetted && contapezziPLC <= IOBConfFull.Odl.ResetCountMaxPost && contapezziIOB >= IOBConfFull.Odl.ResetCountMinPre)
{
// controllo comunque, se è ZERO il contapezzi, e sul server è maggiore il
// valore x ODL e NON abilitato il trigger reset --> abilito trigger...
if (!pzCountResetted && contapezziPLC <= IOBConfFull.Odl.ResetCountMaxPost && contapezziIOB >= IOBConfFull.Odl.ResetCountMinPre)
{
hasReset = true;
// incremento contatore richiesta
countKeyRichiesta = countKeyRichiesta + 1;
// log
lgInfo($"Rilevato Reset Contapezzi PLC 02 | PLC = {contapezziPLC} <= {IOBConfFull.Odl.ResetCountMaxPost} | IOB = {contapezziIOB} >= {IOBConfFull.Odl.ResetCountMinPre}) | pzCountResetted = true");
}
// incremento contatore richiesta
countKeyRichiesta = countKeyRichiesta + 1;
// log
lgInfo($"Rilevato Reset Contapezzi PLC 02 | PLC = {contapezziPLC} <= {IOBConfFull.Odl.ResetCountMaxPost} | IOB = {contapezziIOB} >= {IOBConfFull.Odl.ResetCountMinPre}) | pzCountResetted = true");
}
// 2025.03.05 calcolo condizione contapezzi con NUOVO CONF
if (IOBConfFull.Odl.ChangeOnResetCount)
// 2025.03.05 calcolo condizione contapezzi con NUOVO CONF
if (IOBConfFull.Odl.ChangeOnResetCount)
{
pzCountResetted = hasReset;
lgInfo("Registrato trigger pzCountResetted");
}
if (string.IsNullOrEmpty(opcUaParams.keyPartCount))
{
lgTrace("processContapezzi | check 02 | manca parametro per keyPartCount");
}
else
{
lgTrace($"processContapezzi | check 02 | opcUaParams.keyPartCount: {opcUaParams.keyPartCount}");
// cerco parametro contapezzi... gest alternativa se è un parametro SPECIALE
// (con "#")
if (opcUaParams.keyPartCount.Contains(opcUaParams.kvDelim))
{
pzCountResetted = hasReset;
lgInfo("Registrato trigger pzCountResetted");
int iPos = opcUaParams.keyPartCount.IndexOf(opcUaParams.kvDelim);
string kRef = opcUaParams.keyPartCount.Substring(0, iPos);
string varDef = opcUaParams.keyPartCount.Substring(iPos + 1);
// recupero byte
byte[] bArray = getDataItemValueBytes(kRef);
currPzCount = ConvFromBArr(bArray, varDef, opcUaParams.memDelim);
}
else
{
currPzCount = getDataItemValue(opcUaParams.keyPartCount);
}
}
}
/// <summary>
/// Contapezzi assoluto macchina multi
/// </summary>
/// <exception cref="NotImplementedException"></exception>
private void processContapezziMulti()
{
/*------------------------------------------------------------
* procedura AdHoc/semplificata per contapezzi multiplo (NO gestioni reset & co)...
* 1) verifica il contapezzi CORRENTE x tutte le tavole da MP-IO...
* 2) verifica valore contapezzi da conf macchina
* 3) se ci sono variazioni invia contapezzi x la tavola corrente
* */
DateTime adesso = DateTime.Now;
// rileggo da server (!!!FixMe ToDo da gestire veto lettura server ogni 1-5 minuti?
if (adesso > lastPzCountMesRead.AddMinutes(vetoReadPzCountMes))
{
UpdatePzCountMes(opcUaParams.keyPartCountTav);
}
bool doRefresh = false;
// ciclo sulla conf multipla contapezzi x leggere contapezzi attuali...
foreach (var kvp in opcUaParams.keyPartCountTav)
{
int counterImp = 0;
// recupero val corrente e attuale...
var rawCount = getDataItemValue(kvp.Value);
int.TryParse(rawCount, out counterImp);
// verifico contapezzi corrente, se variato invio...
if (counterImp > 0)
{
// cerco se ci sia valore gestito
if (DictPzCountMes.ContainsKey(kvp.Key))
{
int delta = counterImp - DictPzCountMes[kvp.Key];
lgDebug($"Verifica Contapezzi | {kvp.Key} | Delta: {delta} | IMP: {counterImp} | MES: {DictPzCountMes[kvp.Key]}");
if (delta > 0)
{
string codIobTav = $"{IOBConfFull.General.CodIOB}|{kvp.Key}";
// invio in blocco...
int incrDone = trySendPzCountBlock(codIobTav, DictPzCountMes[kvp.Key], counterImp);
//se ha fatto incremento... registro!
if (incrDone > 0)
{
DictPzCountMes[kvp.Key] += incrDone;
}
// loggo
lgInfo($"Contapezzi MULTI inviato: {kvp.Key} | IMP: {counterImp} | MES: {DictPzCountMes[kvp.Key]}");
doRefresh = true;
}
}
}
}
if (doRefresh)
{
Thread.Sleep(200);
UpdatePzCountMes(opcUaParams.keyPartCountTav);
}
}
/// <summary>
/// ultima lettura contapezzi da server...
/// </summary>
private DateTime lastPzCountMesRead = DateTime.Now.AddHours(-1);
/// <summary>
/// veto rilettura da MES del contapezzi x verifica...
/// </summary>
private int vetoReadPzCountMes = 1;
/// <summary>
/// Esegue update valori counter leggendo dal server MP-IO i valori correnti x ogni tavola
/// </summary>
private void UpdatePzCountMes(Dictionary<string, string> dictCounters)
{
// di default metto lettura 30 sec prima
DateTime lastRead = DateTime.Now.AddSeconds(-30);
foreach (var item in dictCounters)
{
int actVal = 0;
if (checkServerAlive)
{
// recupero valore dal server MES (se disponibile)
string pzCountMesUrl = $"{urlGetPzCountRec}|{item.Key}";
string rawCount = utils.callUrl(pzCountMesUrl);
if (!string.IsNullOrEmpty(rawCount))
{
int.TryParse(rawCount, out actVal);
}
// se valido (>=0) altrimenti uso zero......
actVal = actVal >= 0 ? actVal : 0;
lastRead = DateTime.Now;
}
// se esiste aggiorno...
if (DictPzCountMes.ContainsKey(item.Key))
{
DictPzCountMes[item.Key] = actVal;
}
// altrimenti aggiungo
else
{
DictPzCountMes.Add(item.Key, actVal);
}
}
// salvo dataora ultima lettura da MES...
lastPzCountMesRead = lastRead;
}
/// <summary>
/// Effettua lettura semafori principale <paramref name="currDispData">Parametri da
/// aggiornare x display in form</paramref>
@@ -1437,7 +1579,7 @@ namespace IOB_WIN_OPC_UA.IobOpc
}
else
{
if (getDataItemValue(item.keyName) == item.targetValue)
if (getDataItemValue(item.keyName).Equals(item.targetValue, StringComparison.InvariantCultureIgnoreCase))
{
numCondOk++;
}
+2 -2
View File
@@ -35,7 +35,7 @@ namespace IOB_WIN_OPC_UA.IobOpc
#region Public Methods
/// <summary>
/// Effettua reset del contapezzi, NON POSSIBILE in questa versione
@@ -76,7 +76,7 @@ namespace IOB_WIN_OPC_UA.IobOpc
{
if (compoValue.Contains($"[[{item.Key}]]"))
{
compoValue.Replace($"[[{item.Key}]]", item.Value);
compoValue = compoValue.Replace($"[[{item.Key}]]", item.Value);
}
}
// imposto il valore e forzo la scrittura ...
+39
View File
@@ -6,6 +6,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Threading;
namespace IOB_WIN_OPC_UA.IobOpc
{
@@ -87,6 +88,15 @@ namespace IOB_WIN_OPC_UA.IobOpc
}
lgInfo($"Chiamato {tName} | addResetPzCount: {addResetPzCount}");
break;
case taskType.stopSetup:
forceDbSync = true;
// reset contapezzi inizio setup
if (IOBConfFull.Counters.ResetOnSetupStop)
{
addResetPzCount = true;
}
lgInfo($"Chiamato {tName} | addResetPzCount: {addResetPzCount}");
break;
}
}
}
@@ -103,6 +113,35 @@ namespace IOB_WIN_OPC_UA.IobOpc
{
task2exe.Add("forceSetPzCount", "0");
task2exe.Add("forceResetPzCount", "0");
}
if (addResetPzCount)
{
// se è una doppia tavola aggiungo anche tag "processOtherInfo"...
if (isMulti)
{
bool resetTav = false;
// se contiene chiave reset x tavola...
foreach (var item in IOBConfFull.Device.MultiIobList)
{
string keyName = $"forceResetPzCount#{item}";
resetTav = resetTav || memMap.mMapWrite.ContainsKey(keyName);
if (resetTav)
{
processOtherInfo(keyName, "True");
}
}
if (resetTav)
{
// attendo
Thread.Sleep(500);
// mando chiusura...
foreach (var item in IOBConfFull.Device.MultiIobList)
{
processOtherInfo($"forceResetPzCount#{item}", "False");
}
}
}
lgInfo("Aggiunti task reset contapezzi (ex EMCO) tramite forceSetPzCount e forceResetPzCount");
}
}
+31 -1
View File
@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Threading;
using System.Threading.Tasks;
using static IOB_UT_NEXT.CustomObj;
@@ -35,7 +36,7 @@ namespace IOB_WIN_OPC_UA.IobOpc
#if false
/// <summary>
/// Effettua reset del contapezzi, NON POSSIBILE in questa versione
/// Effettua reset del contapezzi sulla tavola richiesta
/// </summary>
/// <returns></returns>
public override bool resetContapezziPLC(string codTav)
@@ -218,6 +219,35 @@ namespace IOB_WIN_OPC_UA.IobOpc
return answ;
}
/// <summary>
/// Override x scrittura valori tipo IMPULSO (es reset contapezzi impulsivo impianti SW)
/// </summary>
/// <param name="keyReq">chaive memwrite da usare</param>
/// <param name="valReq">valore da scrivere</param>
/// <returns></returns>
protected override bool processOtherInfo(string keyReq, string valReq)
{
bool answ = false;
if (memMap != null && memMap.mMapWrite != null)
{
// preparo elenco parametri da inviare...
var list2Write = new List<objItem>();
// aggiungo bit popupz
objItem currData = new objItem()
{
uid = keyReq,
reqValue = valReq,
name = keyReq
};
list2Write.Add(currData);
// scrivo!
plcWriteParams(ref list2Write);
lgInfo($"processOtherInfo | eseguito plcWriteParams per keyReq: {keyReq} | valReq: {valReq}");
answ = true;
}
return answ;
}
#endregion Private Methods
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle.Cryptography" version="2.5.0" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2506.2618" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2509.1018" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.HashCode" version="6.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="9.0.0" targetFramework="net462" />
@@ -15,7 +15,7 @@
<package id="OPCFoundation.NetStandard.Opc.Ua.Security.Certificates" version="1.5.374.158" targetFramework="net462" />
<package id="Pipelines.Sockets.Unofficial" version="2.2.8" targetFramework="net462" />
<package id="S7netplus" version="0.1.9" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.8.24" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.8.58" targetFramework="net462" />
<package id="System.Buffers" version="4.6.0" targetFramework="net462" />
<package id="System.Diagnostics.DiagnosticSource" version="9.0.0" targetFramework="net462" />
<package id="System.Diagnostics.PerformanceCounter" version="9.0.0" targetFramework="net462" />
+3 -3
View File
@@ -45,7 +45,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="EgwProxy.Shelly, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EgwProxy.Shelly.3.7.2508.708\lib\EgwProxy.Shelly.dll</HintPath>
<HintPath>..\packages\EgwProxy.Shelly.3.7.2509.219\lib\EgwProxy.Shelly.dll</HintPath>
</Reference>
<Reference Include="Flurl, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Flurl.4.0.0\lib\net461\Flurl.dll</HintPath>
@@ -53,8 +53,8 @@
<Reference Include="Flurl.Http, Version=4.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Flurl.Http.4.0.2\lib\net461\Flurl.Http.dll</HintPath>
</Reference>
<Reference Include="MapoSDK, Version=6.14.2508.516, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2508.516\lib\MapoSDK.dll</HintPath>
<Reference Include="MapoSDK, Version=6.14.2509.1018, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2509.1018\lib\MapoSDK.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
+2 -2
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EgwProxy.Shelly" version="3.7.2508.708" targetFramework="net462" />
<package id="EgwProxy.Shelly" version="3.7.2509.219" targetFramework="net462" />
<package id="Flurl" version="4.0.0" targetFramework="net462" />
<package id="Flurl.Http" version="4.0.2" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2508.516" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2509.1018" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="9.0.0" targetFramework="net462" />
+1 -1
View File
@@ -207,7 +207,7 @@ namespace IOB_WIN_SIEMENS.IobSiemens
/// - invio in blocco pezzi
/// - aggiornamento del contapezzi (passato come ref) x nuovo valore post invio
/// </summary>
protected override void trySendPzCountBlock(string forceMachName)
protected override void trySendPzCountBlock()
{
// non fa nulla se non accettare lato IOB i pezzi del PLC... su GWMS NON è gestito il contapezzi
if (contapezziIOB != contapezziPLC)
+1 -1
View File
@@ -440,7 +440,7 @@ namespace IOB_WIN_SIEMENS.IobSiemens
// verifico se variato contapezzi... e se passato ritardo minimo...
if ((contapezziPLC - contapezziIOB) > minSendPzCountBlock)
{
trySendPzCountBlock("");
trySendPzCountBlock();
}
// invio a server contapezzi (aggiornato)