Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 575 Bytes

GettingStarted.md

File metadata and controls

30 lines (21 loc) · 575 Bytes

Getting started

1. Create Solution

dotnet new sln

mkdir S7App
cd S7App
dotnet new console
dotnet add package IPS7LnkNet.Advanced

cd ..
dotnet sln add ./S7App/S7App.csproj

2. Implement S7 App

var device = new SimaticDevice("192.168.0.80", SimaticDeviceType.S71500);

using (var connection = device.CreateConnection()) {
    connection.Open();
    Console.WriteLine("Device connection is opened...");
    
    var temperature = connection.ReadDouble("DB10.DBD 20");
    Console.WriteLine($"Current Temperature is {temperature} °C");
}