PLCcomforS7 16.2.1

dotnet add package PLCcomforS7 --version 16.2.1
                    
NuGet\Install-Package PLCcomforS7 -Version 16.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PLCcomforS7" Version="16.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PLCcomforS7" Version="16.2.1" />
                    
Directory.Packages.props
<PackageReference Include="PLCcomforS7" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PLCcomforS7 --version 16.2.1
                    
#r "nuget: PLCcomforS7, 16.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PLCcomforS7@16.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PLCcomforS7&version=16.2.1
                    
Install as a Cake Addin
#tool nuget:?package=PLCcomforS7&version=16.2.1
                    
Install as a Cake Tool

PLCcom for S7: A .NET SDK for Communication with S7 Plcs

The PLCcom library is a highly performant and optimized component especially designed for .net-Developer to access data provided by a Siemens PLC in the most comfortable way. With PLCcom for S7 you can read and write data from a PLC with ease.

What provides PLCCom for S7 SDK?

Depending on the package the library consist purely of Java or .Net files. The driver can be integrated directly as a reference so that no API calls are necessary. PLCcom is platform independent and works on 32 as well as 64bit.

Within the scope of supply are various code examples to illustrate the connection between your application and different controllers. These examples can also be used in your own projects.

In its current version, PLCcom is compatible with S7 controllers (200, 300, 400, 1200, 1500, SoftSPS WinAC RTX as well as Logo! 0BA7 / 0BA8 / 0BA0 / 0BA1 / 0BA2) as well as CPUs from other manufacturers (e.g. VIPA 100V/200V/300V/300S, etc.)
Symbolic access is possible to S7 controllers of the 1200 and 1500 series.
The driver will be delivered with Code-Examples, which shows you how easy it is to connect the PLC to your application.

Communication:

  • Ethernet TCP/IP (Profinet)
  • Serial adapter MPI
  • Serial adapter PPI

Note: PPI and MPI Communikation only supported on Windows OS via Put/Get. A serial port and a serial to PPI/MPI adapter is required e.g. Green Cable (VIPA PLC only).

Features

  • Access via put/get or symbolic addressing
  • Reading of data blocks, inputs, outputs, data blocks, flags, timers, counters
  • Several operations possible in one function call, each operation returns a detailed return value
  • Simultaneous access to different CPUs possible
  • Implemented high-performance access, the required accesses to the PLC are reduced to the absolute minimum
  • Internal help and conversion functions for simple reading and writing of certain PLC data types
  • Provision of the PLCcom data server for cyclical read accesses with event-controlled notification of value changes
  • Starting and stopping the CPU
  • Reading out the serial number and firmware version
  • Reading out the key switch position
  • Reading LED information
  • Reading and setting the PLC time
  • Reading the system status list
  • Reading the block list
  • Reading block lengths
  • Backup of blocks
  • Restoring blocks
  • Restoring blocks under a changed block number
  • Deleting blocks
  • Output of block details such as code, creation languages, author, etc.
  • Sending the connection password
  • Reading out the diagnostic data
  • AutoConnect
  • Asynchronous connection
  • Reading the alarm system
  • Subscribing alarms
  • Acknowledge alarms
  • Subscribing variables
  • And much more

Note: The previous list is not complete, furthermore there are exclusions depending on the PLC type. A complete list of supported functions depending on PLC type and communication path can be found here: https://docs.plccom.net/help_s7/net/help/html/R_Project_PLCCom_Documentation.htm

Included in the software package are extensive code examples and tutorials, which illustrate the easy connection between your application and a S7 Plc and can also be used in your projects. For development support, test server and client applications are included in the delivery package.

Prerequisites

To create applications with the toolkit, advanced programming skills in a .Net programming language are advantageously required with C # or Visual Basic. The following system components are also required for the operation of the PLCcom for S7 library:

  • Microsoft .net Framework 4.7.2 or higher
  • Microsoft .net 5.0 or higher
  • Microsoft .net 6.0 or higher
  • Microsoft .net 7.0 or higher
  • Microsoft .net 8.0 or higher
  • Microsoft .net 9.0 or higher
  • Microsoft .net 10.0 or higher
  • A development environment that is compatible with .net Standard 2.1 (e.g. Xamarin)

To execute the included examples you need to have

  • Visual Studio 2022 or higher
  • or a code editor compatible with .net framework

Important notes for using PLCcom with S7-1200/1500/ET200SP controllers

Prerequisites for the classic way

It is possible to access inputs, outputs, flags, and accessible DBs. The access to a S7-1200, 1500,ET200SP is disabled by default. You have to process the following steps:

Allow the general access. Activate in the property settings section protection the option 'Connection mechanism - Allow access PUT/GET communication from remote partner. Enable access to your DBs. Go to DB properties and deactivate 'optimized access'. Load to PLC, done! If the changes don't have any effect, use 'extended download to device' to load to PLC.

Certain requirements must be met for symbolic access:

If you use plc controller, created with TIA till version 16, you can use the legacy access. If the controller have been created with at least TIA version 17, you can use the TLS access. If a data block has been created with a previous version, it must have been recompiled once with TIA from V17.

To perform symbolic access to Siemens S7-1200, S7-1500, ET200SP or PLCSim with PLCcom, the following requirements apply:

TLS access (TIA version 17 or higher):

Unrestricted symbolic access to PLC and PLCSim

  • S7-1200: Firmware version V4.5 or higher (tested up to V4.7 [TIA V21]) *
  • S7-1200 G2: Firmware version V4.0 or higher (tested up to V4.1 [TIA V21]) *
  • S7-1500/ET200SP: Firmware version V2.9 or higher (tested up to V4.1 [TIA V21]) *
  • Authentication via password or user/password possible
Legacy access (up to TIA version 16):
  • S7-1200: Firmware version tested from V4.1 up to V4.7 [TIA V21] *
  • S7-1500/ET200SP: Firmware version tested V2.1 up to V4.1 [TIA V21] *
  • Symbolic access to PLC with password authentication
  • Direct symbolic access to PLCSim without password possible

* Tested and approved within the specified firmware versions. Older or newer versions have not been tested, functionality is not guaranteed.

Supported data types

The following data types are supported for classic (Put/Get) optimized read and write functions:

  • Raw (Byte Array)
  • Bit
  • Byte
  • Word
  • DWord
  • LWord
  • INT
  • DINT
  • LINT
  • Real
  • LReal
  • BCD8
  • BCD16
  • BCD32
  • BCD64
  • Date
  • Time
  • LTime
  • Date_And_Time
  • LDate_And_Time
  • Time_OF_DAY
  • LTime_OF_DAY
  • DTL
  • S5Time
  • Char
  • String
  • S7_String
  • S7_WString

The following data types are supported for symbolic optimized read and write functions:

  • Array[n..m] (read-write access to the complete array or its individual elements)
  • Bool (read-write)
  • Byte (read-write)
  • Char (read-write)
  • Counter (read-write)
  • Date (read-write)
  • Date_And_Time (read-write)
  • DInt (read-write)
  • DWord (read-write)
  • Int (read-write)
  • LDT (read-write)
  • LInt (read-write)
  • LReal (read-write)
  • LTime (read-write)
  • LTime_Of_Day (read-write)
  • LWord (read-write)
  • Real (read-write)
  • S5Time (read-write)
  • SInt (read-write)
  • String (read-write)
  • Time (read-write)
  • Time_Of_Day (read-write)
  • Timer (read-write)
  • UDInt (read-write)
  • UInt (read-write)
  • ULInt (read-write)
  • USInt (read-write)
  • WChar (read-write)
  • WString (read-write)
  • Word (read-write)
  • CREF (read-write access to the complete struct or its individual elements)
  • NREF (read-write access to the complete struct or its individual elements)
  • DTL (read-write access to the complete struct or its individual elements)
  • ErrorStruct (read-write access to the complete struct or its individual elements)
  • IEC_COUNTER (read-write access to the complete struct or its individual elements)
  • IEC_DCOUNTER (read-write access to the complete struct or its individual elements)
  • IEC_LCOUNTER (read-write access to the complete struct or its individual elements)
  • IEC_LTIMER (read-write access to the complete struct or its individual elements)
  • IEC_SCOUNTER (read-write access to the complete struct or its individual elements)
  • IEC_TIMER (read-write access to the complete struct or its individual elements)
  • IEC_UCOUNTER (read-write access to the complete struct or its individual elements)
  • IEC_UDCOUNTER (read-write access to the complete struct or its individual elements)
  • IEC_ULCOUNTER (read-write access to the complete struct or its individual elements)
  • IEC_USCOUNTER (read-write access to the complete struct or its individual elements)
  • Struct (read-access to the complete struct or its individual elements, write access to its individual elements)

Getting started

To get started with the PLCcom for S7 library, follow these steps:

1.Install the NuGet package: Install the PLCcomForS7 NuGet package into your project. You can find it in the NuGet package manager or by searching for "PLCcomForS7" in the NuGet package search. 2.Import the necessary namespaces: In your C# code, import the required namespaces from the PLCcom for S7 package. For example:

using PLCcom;
using PLCcom.Core;
  1. Enter your licence key
////Note: Without any licence informations (blank fields), the library is working for 15 minutes
string LicenseUserName = "<Enter your UserName here>";
string LicenseSerial = "<Enter your Serial here>";

Note: without any license informations (blank fields), the runtime is limited to 15 minutes.

  1. Create a PLCcom device instance and pass hostname or ip addresse and plc password
Tls13Device tlsDevice = new Tls13Device("192.168.1.100","User","Password");

or for legacy access:

LegacySymbolicDevice legacyDevice = new LegacySymbolicDevice("192.168.1.100","Password");

Usage

Symbolic Read Optimization (Expert Edition)

PLCcom provides several optimization modes for symbolic read operations. These modes control how read requests are internally grouped and executed.

Symbolic read optimizations are available in the PLCcom Expert edition. Write operations are not affected by these settings.

Available optimization modes

NONE
No optimization is applied.
Each variable is read individually in the order it was requested.
This mode provides maximum transparency and deterministic behavior and is recommended for troubleshooting and diagnostics.

OBJECT_BASED (Expert Edition)
PLCcom may group variables that belong to the same logical object (for example arrays, structures or datablocks) and read them together instead of individually when beneficial.
Read requests remain isolated per root object (for example per datablock).

CROSS_OBJECT (Expert Edition)
Extends OBJECT_BASED by allowing PLCcom to combine read requests across multiple root objects (for example multiple datablocks) into fewer read operations when beneficial.

SMART (Expert Edition, TLS connections only)
PLCcom dynamically analyzes the structure and distribution of the requested variables and creates a request-specific execution plan.
The internal optimization strategy is intentionally abstract and may change between versions.

Example

ReadSymbolicRequest readRequest = new ReadSymbolicRequest
{
    SymbolicReadOptimizationMode = eSymbolicReadOptimizationMode.SMART
};

readRequest.AddFullVariableName("DataBlock_1.MyArray[10]");
readRequest.AddFullVariableName("DataBlock_1.MyStruct.Value");

var result = tlsDevice.ReadData(readRequest);

Reading data

// Which variables do you want to read?
ReadSymbolicRequest readRequest = new ReadSymbolicRequest();
readRequest.AddFullVariableName("DataBlock_1.ByteValue");
readRequest.AddFullVariableName("DataBlock_1.RealValue");

// Read from device
var readResult = tlsDevice.ReadData(readRequest);

Writing data

List<PlcCoreVariable> writeVariables = new List<PlcCoreVariable>();

//get a variable body for writing
var variableBody = GetEmptyVariableBody(tlsDevice,"DataBlock_1.ByteValue");
// Set the value and add the variable to the write list
if (variableBody != null)
{
    variableBody.Value = 1;
    writeVariables.Add(variableBody);
}

//get a variable body for writing
variableBody = GetEmptyVariableBody(tlsDevice,"DataBlock_1.RealValue");
// Set the value and add the variable to the write list
if (variableBody != null)
{
    variableBody.Value = 123.456f;
    writeVariables.Add(variableBody);
}

// create a write request
WriteSymbolicRequest writeRequest = new WriteSymbolicRequest(writeVariables);

// write to device
var writeResult = tlsDevice.WriteData(writeRequest);

Subscribing to data changes

//Create a new non activated subscription with a 300ms cyling period
CreateSubscriptionRequest createSubscriptionRequest = new("TestSubscription", 300);

// Which variables do you want to subcribe?
createSubscriptionRequest.AddFullVariableName("DataBlock_1.ByteValue");
createSubscriptionRequest.AddFullVariableName("DataBlock_1.RealValue");

//create the subscription
CreateSubscriptionResult createSubResult = tlsDevice.CreateSubscription(createSubscriptionRequest);

PlcSubscription subscription = createSubResult.GetSubscription();

//register variable change handler
subscription.VariableChange += Subscription_VariableChange;

//register the new subscription with Plc
RegisterSubscriptionResult registerSubscriptionResult = tlsDevice.RegisterSubscription(new RegisterSubscriptionRequest(subscription));

Console.WriteLine($"Subscription {subscription.SubscriptionName} registered!");

Additional documentation

To provide feedback or report issues, please use the ressorces of your download packet. The online class documentation can you find here: https://docs.plccom.net/help_s7/net/help/html/R_Project_PLCCom_Documentation.htm In addition, you can find detailed code examples in our Github repository: https://github.com/Indi-An/PLCcomforS7-examples-dotnet

Cyber Resilience Act (CRA) documents

Feedback

To provide feedback or report issues, please write an email to support@indi-an.com

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net472 is compatible.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
16.2.1 298 2/5/2026
16.1.3 176 1/27/2026
16.1.1 111 1/22/2026
15.7.3 578 11/26/2025
15.7.2 219 11/24/2025
15.7.1 515 11/21/2025
15.6.5 696 10/22/2025
15.6.3 364 10/7/2025
15.5.5 499 9/12/2025
15.5.4 221 9/8/2025
15.5.2 330 9/2/2025
15.5.1 449 8/29/2025
15.4.7 244 8/22/2025
Loading failed