readme.md: added link for documentation and removed example that was not compiling.

Signed-off-by: Michele Cattafesta <michele.cattafesta@mesta-automation.com>
This commit is contained in:
Michele Cattafesta
2016-05-08 20:06:30 +02:00
parent 021d8b2983
commit 77cd5a34d7

View File

@@ -9,6 +9,9 @@ I found the library simple and effective, but the project has languished unchang
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
S7.Net Plus has a [User Manual](https://github.com/killnine/s7netplus/blob/master/Documentation/Documentation.pdf), check it out.
## Supported PLC
+ Compatible S7 PLC (S7-200, S7-300, S7-400, S7-1200, S7-1500)
@@ -21,42 +24,6 @@ to my request for committing code, I decided to pick up where he left off here o
PM> Install-Package S7netplus
## Basic Usage
```C#
//Basic connection properties
string deviceIpAddress = "172.25.116.87";
int rackNumber = 0;
int slotNumber = 2;
//Connection to device
using (var plc = new PLC(CPU_Type.S7300, deviceIpAddress, rackNumber, slotNumber))
{
//Ensure IP is responding
if (plc.IsAvailable)
{
ErrorCode connectionResult = plc.Open();
//Verify that connection was successful
if (connectionResult.Equals(ErrorCode.NoError))
{
//Get data
object data = plc.Read("MB59");
Console.WriteLine("SUCCESS: Read result of MB59 is {0}", data);
}
else
{
Console.WriteLine("ERROR: Device is available but connection was unsuccessful!");
}
}
else
{
Console.WriteLine("ERROR: Device is not available!");
}
}
```
## Running the tests
Unit tests use Snap7 server, so port 102 must be not in use.