diff --git a/IOB-UT-NEXT/IOB-UT-NEXT.csproj b/IOB-UT-NEXT/IOB-UT-NEXT.csproj index 1fdf8d09..6c00d9c9 100644 --- a/IOB-UT-NEXT/IOB-UT-NEXT.csproj +++ b/IOB-UT-NEXT/IOB-UT-NEXT.csproj @@ -59,8 +59,8 @@ ..\packages\SharpZipLib.1.3.1\lib\net45\ICSharpCode.SharpZipLib.dll - - ..\packages\MapoSDK.6.14.2205.2808\lib\MapoSDK.dll + + ..\packages\MapoSDK.6.14.2207.1318\lib\MapoSDK.dll ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll diff --git a/IOB-UT-NEXT/packages.config b/IOB-UT-NEXT/packages.config index 26591de3..860e4d82 100644 --- a/IOB-UT-NEXT/packages.config +++ b/IOB-UT-NEXT/packages.config @@ -1,6 +1,6 @@  - + diff --git a/IOB-WIN-NEXT/DATA/CONF/GIACO_CENTERFRIGO.json b/IOB-WIN-NEXT/DATA/CONF/GIACO_CENTERFRIGO.json index 7b06ce3d..8dcb58fc 100644 --- a/IOB-WIN-NEXT/DATA/CONF/GIACO_CENTERFRIGO.json +++ b/IOB-WIN-NEXT/DATA/CONF/GIACO_CENTERFRIGO.json @@ -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" } }, diff --git a/IOB-WIN-NEXT/DATA/CONF/MAIN.ini b/IOB-WIN-NEXT/DATA/CONF/MAIN.ini index 54d5fe95..8de8fe46 100644 --- a/IOB-WIN-NEXT/DATA/CONF/MAIN.ini +++ b/IOB-WIN-NEXT/DATA/CONF/MAIN.ini @@ -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 \ No newline at end of file diff --git a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj index fcd58840..45662c9c 100644 --- a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj +++ b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj @@ -112,8 +112,8 @@ False ExtLib\krcc.dll - - ..\packages\MapoSDK.6.14.2206.2718\lib\MapoSDK.dll + + ..\packages\MapoSDK.6.14.2207.1318\lib\MapoSDK.dll ..\packages\MathNet.Numerics.4.15.0\lib\net461\MathNet.Numerics.dll diff --git a/IOB-WIN-NEXT/IobGeneric.cs b/IOB-WIN-NEXT/IobGeneric.cs index a662ab24..3945d1f8 100644 --- a/IOB-WIN-NEXT/IobGeneric.cs +++ b/IOB-WIN-NEXT/IobGeneric.cs @@ -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); diff --git a/IOB-WIN-NEXT/IobModbusTCP.cs b/IOB-WIN-NEXT/IobModbusTCP.cs index 6f6de41f..1620d1bc 100644 --- a/IOB-WIN-NEXT/IobModbusTCP.cs +++ b/IOB-WIN-NEXT/IobModbusTCP.cs @@ -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 /// /// Indirizzo di partenza - /// NUm registri da leggere (max 120) + /// Num registri da leggere (max 120) private void readBlockHoldingReg(int startAddr, int numReg, int baseAddr) { bool allOk = false; diff --git a/IOB-WIN-NEXT/packages.config b/IOB-WIN-NEXT/packages.config index 39da1e80..ad4d2632 100644 --- a/IOB-WIN-NEXT/packages.config +++ b/IOB-WIN-NEXT/packages.config @@ -6,7 +6,7 @@ - +