Merge branch 'develop'

This commit is contained in:
Samuele Locatelli
2021-09-09 19:19:24 +02:00
5 changed files with 18 additions and 4 deletions
+2 -1
View File
@@ -55,7 +55,8 @@ MAX_SEND_PZC_BLOCK=100
; GEST DATI DYN
ENABLE_DYN_DATA=TRUE
FORCE_DYN_DATA=TRUE
; gestione scrittura string/char[]: true = string
WRITE_PRE=FALSE
; conf parametri memoria READ/WRITE
PARAM_CONF=1032.json
+4 -2
View File
@@ -2886,8 +2886,10 @@ namespace IOB_WIN_NEXT
/// </summary>
protected void setupMemMap()
{
lgInfo($"Decodifica aree memMap: trovati {memMap.mMapRead.Count} valori TSVC");
lgInfo($"Decodifica aree memMap: trovati {memMap.mMapWrite.Count} parametri ");
lgInfo($"Decodifica aree memMap: trovati {memMap.mMapRead.Count} valori Read TSVC");
lgInfo($"Decodifica aree memMap: trovati {memMap.mMapWrite.Count} parametri da scrivere");
string rawMemConf = JsonConvert.SerializeObject(memMap, Formatting.Indented);
lgInfo($"Configurazione memoria R/W:{Environment.NewLine}{rawMemConf}");
// se ho variabili read --> genero dati TSVC...
if (memMap.mMapRead.Count > 0)
{
+5
View File
@@ -70,6 +70,11 @@ namespace IOB_WIN_NEXT
{
memMap = new plcMemMap();
writePre = true;
if (IOBConf.optPar.ContainsKey("WRITE_PRE"))
{
bool.TryParse(IOBConf.optPar["WRITE_PRE"], out writePre);
lgInfo($"Override Write pre da conf: {IOBConf.optPar["WRITE_PRE"]} --> {writePre}");
}
if (IOBConf != null)
{
// gestione invio ritardato contapezzi
+4
View File
@@ -206,6 +206,10 @@ namespace IOB_WIN_NEXT
MemBlock = S7.Net.Types.Int.ToByteArray(valInt);
}
}
else
{
lgError($"Errore: non trovata chiave write in memMap.mMapWrite per {item.Key}");
}
taskVal = item.Value;
break;
+3 -1
View File
@@ -1,4 +1,5 @@
using MapoSDK;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -199,7 +200,8 @@ namespace IOB_WIN_NEXT
}
else
{
lgError($"Errore: non trovata chiave write in memMap.mMapWrite per {item.Key}");
string rawMemConf = JsonConvert.SerializeObject(memMap, Formatting.Indented);
lgError($"Errore: non trovata chiave write in memMap.mMapWrite per {item.Key}{Environment.NewLine}Configurazione memoria R/W:{Environment.NewLine}{rawMemConf}");
}
taskVal = item.Value;
break;