diff --git a/Sharp7/S7Client.cs b/Sharp7/S7Client.cs index 6630b5b..2b70b04 100644 --- a/Sharp7/S7Client.cs +++ b/Sharp7/S7Client.cs @@ -698,6 +698,7 @@ namespace Sharp7 public int ConnectTo(string Address, int Rack, int Slot) { + PLCIpAddress = Address; UInt16 RemoteTSAP = (UInt16)((ConnType << 8) + (Rack * 0x20) + Slot); SetConnectionParams(Address, 0x0100, RemoteTSAP); return Connect(); @@ -2268,6 +2269,8 @@ namespace Sharp7 } } + public string PLCIpAddress { get; private set; } + public int PLCPort { get => _PLCPort;