Skip to content

Commit 5c8c046

Browse files
committed
fix bugs in shortgroup
1 parent 2129204 commit 5c8c046

File tree

8 files changed

+7
-1
lines changed

8 files changed

+7
-1
lines changed
-175 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

SCADA/Program/DataService/PLCGroup.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,13 @@ protected override unsafe void Poll()
979979
}
980980
else
981981
{
982-
if (addr.ByteOrder.HasFlag(ByteOrder.BigEndian)) prcv[iShort1] = IPAddress.HostToNetworkOrder(prcv[iShort1]);
982+
if (addr.ByteOrder.HasFlag(ByteOrder.BigEndian))
983+
{
984+
for (int i = 0; i < addr.DataSize / 2; i++)
985+
{
986+
prcv[iShort1] = IPAddress.HostToNetworkOrder(prcv[iShort1]);
987+
}
988+
}
983989
if (addr.DataSize <= 2)
984990
{
985991
if (prcv[iShort1] != cache[iShort]) _changedList.Add(index);

SCADA/dll/DataService.dll

512 Bytes
Binary file not shown.

SCADA/dll/ModbusDriver.dll

0 Bytes
Binary file not shown.

SCADA/dll/OPCDriver.dll

0 Bytes
Binary file not shown.

SCADA/dll/SiemensPLCDriver.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)