Skip to content

Commit 36097d6

Browse files
committed
update host.ini
1 parent 6c228c5 commit 36097d6

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

SCADA/DataConfig/host.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
[HOST]
2+
23
SERVER=lochost
34

45
[DATABASE]
6+
57
CONNSTRING=Data Source=.\SQLEXPRESS;Initial Catalog=SCADA;Integrated Security=True
8+
69
ARCHIVE=D:\HDA
10+
711
TYPE=MSSQL

SCADA/Program/ModbusDriver/ModbusRTUDriver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ public byte[] ReadBytes(DeviceAddress address, ushort size)
332332
{
333333
while (numBytesRead != frameBytes.Length)
334334
numBytesRead += _serialPort.Read(frameBytes, numBytesRead, frameBytes.Length - numBytesRead);
335-
if (frameBytes[0] == func && Utility.CheckSumCRC(frameBytes))
335+
if (frameBytes[0] == address.Area && Utility.CheckSumCRC(frameBytes))
336336
{
337337
Array.Copy(frameBytes, 3, data, 0, data.Length);
338338
return data;

SCADA/dll/ModbusDriver.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)