From ce359789dcd27839473aff206d5a2365d01fbfb1 Mon Sep 17 00:00:00 2001 From: Michael Croes Date: Thu, 14 Mar 2019 22:33:57 +0100 Subject: [PATCH] Add explicit support for Logo0BA8 Unsure if the PLC actually requires the specfically provided TSAP's, but these have been verified to work. --- S7.Net/Enums.cs | 5 +++++ S7.Net/Protocol/ConnectionRequest.cs | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/S7.Net/Enums.cs b/S7.Net/Enums.cs index ccb8941..ff33d04 100644 --- a/S7.Net/Enums.cs +++ b/S7.Net/Enums.cs @@ -10,6 +10,11 @@ /// S7200 = 0, + /// + /// Siemens Logo 0BA8 + /// + Logo0BA8 = 1, + /// /// S7 300 cpu type /// diff --git a/S7.Net/Protocol/ConnectionRequest.cs b/S7.Net/Protocol/ConnectionRequest.cs index f0a4567..64e2b5d 100644 --- a/S7.Net/Protocol/ConnectionRequest.cs +++ b/S7.Net/Protocol/ConnectionRequest.cs @@ -34,6 +34,14 @@ namespace S7.Net.Protocol bSend1[17] = 0x10; bSend1[18] = 0x00; break; + case CpuType.Logo0BA8: + // These values are taken from NodeS7, it's not verified if these are + // exact requirements to connect to the Logo0BA8. + bSend1[13] = 0x01; + bSend1[14] = 0x00; + bSend1[17] = 0x01; + bSend1[18] = 0x02; + break; case CpuType.S71200: case CpuType.S7300: case CpuType.S7400: