Merge branch 'develop'
This commit is contained in:
@@ -513,4 +513,5 @@ namespace IOB_UT_NEXT
|
||||
/// </summary>
|
||||
ULog
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.2207.1318, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MapoSDK.6.14.2207.1318\lib\MapoSDK.dll</HintPath>
|
||||
<Reference Include="MapoSDK, Version=6.14.2207.2913, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MapoSDK.6.14.2207.2913\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,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MapoSDK" version="6.14.2207.1318" targetFramework="net462" />
|
||||
<package id="MapoSDK" version="6.14.2207.2913" 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" />
|
||||
|
||||
@@ -14,7 +14,7 @@ IP=10.150.0.20
|
||||
PORT=502
|
||||
|
||||
[SERVER]
|
||||
MPIP=https://10.150.0.1
|
||||
MPIP=http://10.150.0.1
|
||||
MPURL=/MP/IO
|
||||
CMDBASE=/IOB/input/
|
||||
CMDFLOG=/IOB/flog/
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
"name": "NumPacchi",
|
||||
"description": "Numero Pacchi Richiesti",
|
||||
"memAddr": "41098",
|
||||
"tipoMem": "INT",
|
||||
"tipoMem": "IntLH",
|
||||
"index": 1098,
|
||||
"size": 2,
|
||||
"unit": "#",
|
||||
@@ -117,7 +117,7 @@
|
||||
"name": "NumPacchiFatti",
|
||||
"description": "Numero Pacchi Fatti",
|
||||
"memAddr": "41100",
|
||||
"tipoMem": "INT",
|
||||
"tipoMem": "IntLH",
|
||||
"index": 1100,
|
||||
"size": 2,
|
||||
"unit": "#",
|
||||
@@ -129,7 +129,7 @@
|
||||
"name": "EpochStart",
|
||||
"description": "DateTime inizio lavorazione formato EPOCH",
|
||||
"memAddr": "41102",
|
||||
"tipoMem": "INT",
|
||||
"tipoMem": "IntLH",
|
||||
"index": 1102,
|
||||
"size": 2,
|
||||
"unit": "EPOCH",
|
||||
@@ -141,7 +141,7 @@
|
||||
"name": "EpochStop",
|
||||
"description": "DateTime fine lavorazione formato EPOCH",
|
||||
"memAddr": "41104",
|
||||
"tipoMem": "INT",
|
||||
"tipoMem": "IntLH",
|
||||
"index": 1104,
|
||||
"size": 2,
|
||||
"unit": "EPOCH",
|
||||
|
||||
@@ -112,8 +112,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>ExtLib\krcc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MapoSDK, Version=6.14.2207.1318, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MapoSDK.6.14.2207.1318\lib\MapoSDK.dll</HintPath>
|
||||
<Reference Include="MapoSDK, Version=6.14.2207.2913, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MapoSDK.6.14.2207.2913\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>
|
||||
|
||||
@@ -1199,6 +1199,21 @@ namespace IOB_WIN_NEXT
|
||||
valore = listInt[0];
|
||||
}
|
||||
break;
|
||||
|
||||
case plcDataType.IntLH:
|
||||
case plcDataType.DIntLH:
|
||||
if (size == 4)
|
||||
{
|
||||
Array.Reverse(listInt);
|
||||
valore = ModbusClient.ConvertRegistersToLong(listInt);
|
||||
}
|
||||
else if (size == 2)
|
||||
{
|
||||
Array.Reverse(listInt);
|
||||
valore = ModbusClient.ConvertRegistersToInt(listInt);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return valore;
|
||||
}
|
||||
@@ -1333,6 +1348,14 @@ namespace IOB_WIN_NEXT
|
||||
// valore string...
|
||||
valString = ModbusClient.ConvertRegistersToString(listInt, 0, item.Value.size);
|
||||
}
|
||||
//else if (item.Value.unit == "EPOCH")
|
||||
//{
|
||||
// // devo prendere i dati come UInt quindi li metto insieme upper/lower
|
||||
// UInt32 uint32 = (uint)listInt[0];
|
||||
// uint32 <<= 16;
|
||||
// uint32 |= (uint)listInt[1];
|
||||
// valore = (double)uint32;
|
||||
//}
|
||||
else
|
||||
{
|
||||
// valori numerici...
|
||||
@@ -1394,6 +1417,21 @@ namespace IOB_WIN_NEXT
|
||||
// valore string...
|
||||
valString = ModbusClient.ConvertRegistersToString(listInt, 0, item.Value.size);
|
||||
}
|
||||
//else if (item.Value.unit == "EPOCH")
|
||||
//{
|
||||
// // devo prendere i dati come UInt quindi li metto insieme upper/lower
|
||||
// var hVal = BitConverter.ToUInt16(BitConverter.GetBytes(listInt[0]), 0);
|
||||
// var lVal = BitConverter.ToUInt16(BitConverter.GetBytes(listInt[1]), 0);
|
||||
// // ricostruisco da due Uint16 un Uint32
|
||||
// UInt32 uint32 = hVal;
|
||||
// uint32 <<= 16;
|
||||
// uint32 |= lVal;
|
||||
// valore = (double)uint32;
|
||||
// //byte[] rawData = new byte[4];
|
||||
// //Array.Copy(BitConverter.GetBytes(listInt[0]), 0, rawData, 2, 2);
|
||||
// //Array.Copy(BitConverter.GetBytes(listInt[1]), 0, rawData, 0, 2);
|
||||
// //var valTest = BitConverter.ToUInt32(rawData, 0);
|
||||
//}
|
||||
else
|
||||
{
|
||||
valore = convertFromReg(listInt, item.Value.size, item.Value.tipoMem);
|
||||
|
||||
@@ -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.2207.1318" targetFramework="net462" />
|
||||
<package id="MapoSDK" version="6.14.2207.2913" 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" />
|
||||
|
||||
Reference in New Issue
Block a user