Merge branch 'release/UpdateCenterfrigoWrite'

This commit is contained in:
Samuele Locatelli
2022-07-13 19:22:17 +02:00
8 changed files with 73 additions and 31 deletions
+2 -2
View File
@@ -59,8 +59,8 @@
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.1.9, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.1\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="MapoSDK, Version=6.14.2205.2808, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2205.2808\lib\MapoSDK.dll</HintPath>
<Reference Include="MapoSDK, Version=6.14.2207.1318, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2207.1318\lib\MapoSDK.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\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.2205.2808" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2207.1318" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
<package id="NLog" version="4.7.13" targetFramework="net462" />
+52 -20
View File
@@ -1,31 +1,63 @@
{
"mMapWrite": {
"TestWrite": {
"name": "TestWrite",
"description": "Test Scrittura",
"memAddr": "41621",
"tipoMem": "Real",
"index": 1621,
"SetPoint_Tunnel_Req": {
"name": "SetPoint_Tunnel_Req",
"description": "Setpoint Tunnel",
"memAddr": "44010",
"tipoMem": "RealLH",
"index": 4010,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
},
"SetPoint_Tunnel": {
"name": "SetPoint_Tunnel",
"description": "Setpoint Tunnel",
"memAddr": "41560",
"tipoMem": "Real",
"index": 1560,
"SetPoint_Cella_01_Req": {
"name": "SetPoint_Cella_01_Req",
"description": "Setpoint Cella 01",
"memAddr": "44012",
"tipoMem": "RealLH",
"index": 4012,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
},
"SetPoint_Cella_02_Req": {
"name": "SetPoint_Cella_02_Req",
"description": "Setpoint Cella 02",
"memAddr": "44014",
"tipoMem": "RealLH",
"index": 4014,
"size": 2,
"factor": 1,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
},
"SetPoint_Cella_03_Req": {
"name": "SetPoint_Cella_03_Req",
"description": "Setpoint Cella 03",
"memAddr": "44016",
"tipoMem": "RealLH",
"index": 4016,
"size": 2,
"factor": 1,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
},
"SetPoint_Cella_04_Req": {
"name": "SetPoint_Cella_04_Req",
"description": "Setpoint Cella 04",
"memAddr": "44018",
"tipoMem": "RealLH",
"index": 4018,
"size": 2,
"factor": 1,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
}
},
+1 -1
View File
@@ -38,6 +38,6 @@ CLI_INST=SteamWareSim
;STARTLIST=GIACO_ICOEL_002
;STARTLIST=GIACO_CENTERFRIGO
;STARTLIST=GIACO_NWSE
STARTLIST=SIMUL_01
STARTLIST=GIACO_CENTERFRIGO
MAXCNC=10
+2 -2
View File
@@ -112,8 +112,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>ExtLib\krcc.dll</HintPath>
</Reference>
<Reference Include="MapoSDK, Version=6.14.2206.2718, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2206.2718\lib\MapoSDK.dll</HintPath>
<Reference Include="MapoSDK, Version=6.14.2207.1318, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2207.1318\lib\MapoSDK.dll</HintPath>
</Reference>
<Reference Include="MathNet.Numerics, Version=4.15.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MathNet.Numerics.4.15.0\lib\net461\MathNet.Numerics.dll</HintPath>
+1 -1
View File
@@ -1367,7 +1367,7 @@ namespace IOB_WIN_NEXT
* */
// serializzo il valore...
BaseRawTransf newVal = new BaseRawTransf(DateTime.Now, mesContent, mesType);
BaseRawTransf newVal = new BaseRawTransf(DateTime.Now, (Newtonsoft.Json.Linq.JObject)mesContent, mesType);
string encodedVal = JsonConvert.SerializeObject(newVal);
// --> accodo (valore già formattato)!
QueueRawTransf.Enqueue(encodedVal);
+13 -3
View File
@@ -817,11 +817,19 @@ namespace IOB_WIN_NEXT
// break;
case plcDataType.Real:
case plcDataType.RealHL:
valDouble = getScaledDouble(currMem);
CurrVal = ModbusClient.ConvertFloatToRegisters((float)valDouble, ModbusClient.RegisterOrder.HighLow);
fatto = writeInputReg(currMem.index, CurrVal);
break;
case plcDataType.FloatBADC:
case plcDataType.RealLH:
valDouble = getScaledDouble(currMem);
CurrVal = ModbusClient.ConvertFloatToRegisters((float)valDouble, ModbusClient.RegisterOrder.LowHigh);
fatto = writeInputReg(currMem.index, CurrVal);
break;
//case plcDataType.String:
// // se ho writePre --> "allungo" di 2 la dimensione della stringa x MemBlock...
// if (writePre)
@@ -1137,6 +1145,7 @@ namespace IOB_WIN_NEXT
switch (tipoMem)
{
case plcDataType.Real:
case plcDataType.RealHL:
case plcDataType.FloatABCD:
if (size == 4)
{
@@ -1148,16 +1157,17 @@ namespace IOB_WIN_NEXT
}
break;
case plcDataType.RealLH:
case plcDataType.FloatCDAB:
if (size == 4)
{
// invero array...
// inverto array...
Array.Reverse(listInt);
valore = ModbusClient.ConvertRegistersToDouble(listInt);
}
else if (size == 2)
{
// non serve cambaire nulla...
// inverto array...
Array.Reverse(listInt);
valore = ModbusClient.ConvertRegistersToFloat(listInt);
}
@@ -1419,7 +1429,7 @@ namespace IOB_WIN_NEXT
/// Effettua lettura blocco memoria indicato e lo salva in copia locale HoldingRegisterLUT
/// </summary>
/// <param name="startAddr">Indirizzo di partenza</param>
/// <param name="numReg">NUm registri da leggere (max 120)</param>
/// <param name="numReg">Num registri da leggere (max 120)</param>
private void readBlockHoldingReg(int startAddr, int numReg, int baseAddr)
{
bool allOk = false;
+1 -1
View File
@@ -6,7 +6,7 @@
<package id="EgwProxy.MultiCncLib" version="3.6.2207.1211" targetFramework="net462" />
<package id="EgwProxy.OsaiCncLib" version="3.6.2205.2015" targetFramework="net462" />
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2206.2718" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2207.1318" targetFramework="net462" />
<package id="MathNet.Numerics" version="4.15.0" targetFramework="net462" />
<package id="Microsoft.CodeAnalysis.NetAnalyzers" version="6.0.0" targetFramework="net462" developmentDependency="true" />
<package id="Microsoft.VisualStudio.SlowCheetah" version="4.0.8" targetFramework="net462" developmentDependency="true" />