Thomas Jäger 50b026d7a5 Read TPKT/COTP packets / Read MaxPDU size from PLC
Read responses from the PLS using classes for TPKT and COPT. This
makes the communication more robust. It will now handle empty COTP
packets that SoftPLS and WinAC based PLCs send out. I use RFC names for
functions and classes.

Change logic to use COTP and S7Comm reponse codes instead of
relying on packet sizes.

Read Max PDU size from connection setup. Ref #21
Change logic to use MaxPDUSize when reading istead of hardcoded limit.

I tried using MaxPDUSize when writing data but this failed when packet size is
over 256 on snap7. So i decided to drop changes to write size.
I have done some tests against WinAC cpu and it seems to handle bigger pdu's
when writing if negotiated in the connection setup. This might just be a SNAP7 bug.

Fix MaxPDUSize for readbytes

Remove debug line

Simplify byte copy. Remove unessesarry buffer
2018-04-19 00:34:11 +02:00
2015-02-09 14:19:50 -06:00
2017-08-31 20:59:39 +01:00
2018-02-05 20:07:11 +00:00
2017-09-14 18:26:49 +01:00
2017-08-31 21:17:31 +01:00

s7netplus

A .NET Library for Siemens S7 Connectivity

Overview

S7.Net Plus is a continuation of the work done on the S7.Net project by Juergen1969. I found the library simple and effective, but the project has languished unchanged since late 2009.

I was doing some automation work already and saw a few places where the code base could be improved. Because Juergen did not respond to my request for committing code, I decided to pick up where he left off here on GitHub.

Documentation

Check the Wiki and feel free to edit it: https://github.com/killnine/s7netplus/wiki

S7.Net Plus has a User Manual, check it out.

Supported PLC

  • Compatible S7 PLC (S7-200, S7-300, S7-400, S7-1200, S7-1500)

Target framework

  • .NET Framework 3.5 or higher
  • Universal Windows Application (.Net Core) - see S7.UniversalWindowsApp.sln

Compile

You need at least Visual Studio 2015 (you can download the Community Edition for free).

Nuget

PM> Install-Package S7netplus

Latest build (Appveyor)

Build status https://ci.appveyor.com/project/mesta1/s7netplus

Running the tests

Unit tests use Snap7 server, so port 102 must be not in use. If you have Siemens Step7 installed, the service s7oiehsx64 is stopped when running unit tests. You have to restart the service manually if you need it.

Description
S7.NET+ -- A .NET library to connect to Siemens Step7 devices
Readme 3.2 MiB
Languages
C# 100%