diff --git a/SCADA/Program/ModbusDriver/ModbusTCPDriver.cs b/SCADA/Program/ModbusDriver/ModbusTCPDriver.cs index cdabe91..0829f80 100644 --- a/SCADA/Program/ModbusDriver/ModbusTCPDriver.cs +++ b/SCADA/Program/ModbusDriver/ModbusTCPDriver.cs @@ -137,6 +137,13 @@ namespace ModbusDriver set { _ip = value; } } + int _port = 502; + public int Port + { + get { return _port; } + set { _port = value; } + } + public bool IsClosed { get @@ -172,7 +179,7 @@ namespace ModbusDriver public bool Connect() { - int port = 502; + //int port = 502; try { if (tcpSynCl != null) @@ -185,7 +192,7 @@ namespace ModbusDriver tcpSynCl.SendTimeout = _timeout; tcpSynCl.ReceiveTimeout = _timeout; tcpSynCl.NoDelay = true; - tcpSynCl.Connect(_ip, port); + tcpSynCl.Connect(_ip, _port); return true; } catch (SocketException error) diff --git a/SCADA/dll/ModbusDriver.dll b/SCADA/dll/ModbusDriver.dll index f0882e6..2a2c0f7 100644 Binary files a/SCADA/dll/ModbusDriver.dll and b/SCADA/dll/ModbusDriver.dll differ