Merge branch 'develop'
This commit is contained in:
@@ -1858,6 +1858,7 @@ namespace IOB_WIN_NEXT
|
||||
if (updatedPar.Count > 0)
|
||||
{
|
||||
// scrivo valore!
|
||||
lgInfo("Chiamate processMem2Write --> plcWriteParams");
|
||||
plcWriteParams(updatedPar);
|
||||
}
|
||||
}
|
||||
@@ -2705,6 +2706,7 @@ namespace IOB_WIN_NEXT
|
||||
}
|
||||
}
|
||||
// richiamo scrittura parametri su PLC
|
||||
lgInfo("Chiamate processMemWriteRequests --> plcWriteParams");
|
||||
plcWriteParams(updatedPar);
|
||||
// invio su cloud parametri!
|
||||
string rawData = JsonConvert.SerializeObject(updatedPar);
|
||||
@@ -2888,8 +2890,11 @@ namespace IOB_WIN_NEXT
|
||||
{
|
||||
lgInfo($"setupMemMap | trovati {memMap.mMapRead.Count} parametri Read (TSVC)");
|
||||
lgInfo($"setupMemMap | trovati {memMap.mMapWrite.Count} parametri Write");
|
||||
string rawMemConf = JsonConvert.SerializeObject(memMap, Formatting.Indented);
|
||||
lgInfo($"setupMemMap | configurazione memoria R/W:{Environment.NewLine}{rawMemConf}");
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
string rawMemConf = JsonConvert.SerializeObject(memMap, Formatting.Indented);
|
||||
lgInfo($"setupMemMap | configurazione memoria R/W:{Environment.NewLine}{rawMemConf}");
|
||||
}
|
||||
// se ho variabili read --> genero dati TSVC...
|
||||
if (memMap.mMapRead.Count > 0)
|
||||
{
|
||||
|
||||
@@ -436,10 +436,10 @@ namespace IOB_WIN_NEXT
|
||||
MemBlock = new byte[byteSize];
|
||||
// faccio preliminarmente upsertKey...
|
||||
upsertKey(currMem.name, currMem.value);
|
||||
serObj = JsonConvert.SerializeObject(item);
|
||||
serObj = JsonConvert.SerializeObject(item, Formatting.Indented);
|
||||
lgInfo($"Inizio processing plcWriteParams per {currMem.name} | valore richiesto {currMem.value}");
|
||||
lgInfo($"---------------{Environment.NewLine}UPDATED PARAM:{Environment.NewLine}{serObj}{Environment.NewLine}---------------");
|
||||
serObj = JsonConvert.SerializeObject(currMem);
|
||||
serObj = JsonConvert.SerializeObject(currMem, Formatting.Indented);
|
||||
lgInfo($"---------------{Environment.NewLine}MEMORY CONTENT:{Environment.NewLine}{serObj}{Environment.NewLine}---------------");
|
||||
switch (currMem.tipoMem)
|
||||
{
|
||||
@@ -526,8 +526,6 @@ namespace IOB_WIN_NEXT
|
||||
/// </summary>
|
||||
protected override void setParamPlc()
|
||||
{
|
||||
// carico conf vettore memoria...
|
||||
loadMemConf();
|
||||
// Creo oggetto connessione NC
|
||||
parentForm.commPlcActive = true;
|
||||
lgInfo("Start init Adapter SIEMENS all'IP {0} | CPU: {1} | R/S: {2}/{3} | --> IOB {4}", cIobConf.cncIpAddr, cIobConf.cpuType, cIobConf.rack, cIobConf.slot, cIobConf.codIOB);
|
||||
@@ -597,11 +595,8 @@ namespace IOB_WIN_NEXT
|
||||
lgError($"Errore in ping: esito {esitoPing}");
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
#if false
|
||||
// carico conf vettore memoria...
|
||||
loadMemConf();
|
||||
#endif
|
||||
|
||||
bool enableByApp = utils.CRB("enableContapezzi");
|
||||
bool enableByIob = (getOptPar("ENABLE_PZCOUNT") == "TRUE");
|
||||
bool disableByIob = (getOptPar("DISABLE_PZCOUNT") == "TRUE");
|
||||
@@ -1447,7 +1442,7 @@ namespace IOB_WIN_NEXT
|
||||
Buffer.BlockCopy(stringPar, 0, MemBlock, startPos, shiftStrByte);
|
||||
}
|
||||
Buffer.BlockCopy(strByte, 0, MemBlock, startPos + shiftStrByte, byteLen);
|
||||
lgInfo($"saveStringOnMemBlock: Final MemBlock{Environment.NewLine}{MemBlock.ValToBinString()}");
|
||||
lgInfo($"saveStringOnMemBlock: Final MemBlock{Environment.NewLine}{BitConverter.ToString(MemBlock)}");
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
|
||||
@@ -258,7 +258,12 @@ namespace IOB_WIN_NEXT
|
||||
// scrivo!
|
||||
taskOk = S7WriteBB(ref MemBlock, memAddrWrite);
|
||||
}
|
||||
if (!taskOk)
|
||||
if (taskOk)
|
||||
{
|
||||
// aggiorno valore memoria...
|
||||
memMap.mMapWrite[item.Key].value = item.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
lgError($"Errore in S7WriteBB durante executeTasks: {item.Key} | {item.Value}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user