diff --git a/S7.Net/PLC.cs b/S7.Net/PLC.cs index b5c65c7..d62e783 100644 --- a/S7.Net/PLC.cs +++ b/S7.Net/PLC.cs @@ -26,7 +26,7 @@ namespace S7.Net /// /// PORT Number of the PLC, default is 102 /// - public int PORT { get; private set; } + public int Port { get; private set; } /// /// CPU type of the PLC @@ -125,7 +125,7 @@ namespace S7.Net /// rack of the PLC, usually it's 0, but check in the hardware configuration of Step7 or TIA portal /// slot of the CPU of the PLC, usually it's 2 for S7300-S7400, 0 for S7-1200 and S7-1500. /// If you use an external ethernet card, this must be set accordingly. - public Plc(CpuType cpu, string ip,int port, Int16 rack, Int16 slot) + public Plc(CpuType cpu, string ip, int port, Int16 rack, Int16 slot) { if (!Enum.IsDefined(typeof(CpuType), cpu)) throw new ArgumentException($"The value of argument '{nameof(cpu)}' ({cpu}) is invalid for Enum type '{typeof(CpuType).Name}'.", nameof(cpu)); @@ -135,7 +135,7 @@ namespace S7.Net CPU = cpu; IP = ip; - PORT = port; + Port = port; Rack = rack; Slot = slot; MaxPDUSize = 240; @@ -161,7 +161,7 @@ namespace S7.Net CPU = cpu; IP = ip; - PORT = 102; + Port = 102; Rack = rack; Slot = slot; MaxPDUSize = 240; diff --git a/S7.Net/PlcAsynchronous.cs b/S7.Net/PlcAsynchronous.cs index cef0414..eb44f87 100644 --- a/S7.Net/PlcAsynchronous.cs +++ b/S7.Net/PlcAsynchronous.cs @@ -45,7 +45,7 @@ namespace S7.Net { tcpClient = new TcpClient(); ConfigureConnection(); - await tcpClient.ConnectAsync(IP, PORT); + await tcpClient.ConnectAsync(IP, Port); stream = tcpClient.GetStream(); } diff --git a/S7.Net/PlcSynchronous.cs b/S7.Net/PlcSynchronous.cs index c825650..69c6056 100644 --- a/S7.Net/PlcSynchronous.cs +++ b/S7.Net/PlcSynchronous.cs @@ -51,7 +51,7 @@ namespace S7.Net { tcpClient = new TcpClient(); ConfigureConnection(); - tcpClient.Connect(IP, PORT); + tcpClient.Connect(IP, Port); stream = tcpClient.GetStream(); } catch (SocketException sex)