libplctag.NativeImport 2.0.0-alpha.10

This is a prerelease version of libplctag.NativeImport.
This package has a SemVer 2.0.0 package version: 2.0.0-alpha.10+core.2.7.2.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package libplctag.NativeImport --version 2.0.0-alpha.10
                    
NuGet\Install-Package libplctag.NativeImport -Version 2.0.0-alpha.10
                    
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="libplctag.NativeImport" Version="2.0.0-alpha.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="libplctag.NativeImport" Version="2.0.0-alpha.10" />
                    
Directory.Packages.props
<PackageReference Include="libplctag.NativeImport" />
                    
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 libplctag.NativeImport --version 2.0.0-alpha.10
                    
#r "nuget: libplctag.NativeImport, 2.0.0-alpha.10"
                    
#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 libplctag.NativeImport@2.0.0-alpha.10
                    
#: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=libplctag.NativeImport&version=2.0.0-alpha.10&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=libplctag.NativeImport&version=2.0.0-alpha.10&prerelease
                    
Install as a Cake Tool

libplctag.NativeImport

libplctag.NativeImport provides low-level (raw) access to the libplctag core library which is written in C. The purpose of this package is to expose the API for this library to .NET applications, and handle platform and configuration issues.

NOTE: Most application developers will not need to directly reference the Native Import library, it is primarily for use by other wrapper libraries.

Example

var tagHandle = plctag.plc_tag_create("protocol=ab_eip&gateway=10.10.10.10&path=1,0&plc=LGX&elem_size=4&elem_count=1&name=PROGRAM:SomeProgram.SomeDINT", 5000);

var statusAfterCreate = (STATUS_CODES)plctag.plc_tag_status(tagHandle);
if (statusAfterCreate != STATUS_CODES.PLCTAG_STATUS_OK)
{
    throw new Exception($"Something went wrong: {statusAfterCreate}");
}

var statusAfterRead = (STATUS_CODES)plctag.plc_tag_read(tagHandle, 5000);
if (statusAfterRead != STATUS_CODES.PLCTAG_STATUS_OK)
{
    throw new Exception($"Something went wrong: {statusAfterRead}");
}

var theValue = plctag.plc_tag_get_uint32(tagHandle, 0);

Console.WriteLine(theValue);

plctag.plc_tag_destroy(tagHandle);

Further examples can be found here.

How it works

The libplctag core library can be compiled for many platforms, and not all supported platforms are shipped with this wrapper. If you get a TypeLoadException, chances are that you can still use this wrapper but you will need to supply the core libplctag library yourself.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 was computed.  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 was computed.  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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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.
  • .NETStandard 2.0

  • net10.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on libplctag.NativeImport:

Package Downloads
libplctag

A library for PLC communication

ABPlcRx

A Reactive Allen Bradley PLC library

L5Sharp.Gateway

A gateway library for reading and writing Allen-Bradley Logix controller data using L5Sharp and libplctag

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on libplctag.NativeImport:

Repository Stars
tnunnink/L5Sharp
A library for intuitively interacting with Rockwell's L5X import/export files.
Version Downloads Last Updated
2.0.0-alpha.12 173 11/17/2026
2.0.0-alpha.11 65 11/17/2026
2.0.0-alpha.10 79 11/15/2026
2.0.0-alpha.9 764 9/18/2026
2.0.0-alpha.8 1,090 5/24/2026
2.0.0-alpha.7 124 5/16/2026
2.0.0-alpha.6 353 5/10/2026
2.0.0-alpha.5 34,988 12/1/2024
2.0.0-alpha.4 235 9/7/2024
2.0.0-alpha.3 245 8/22/2024
2.0.0-alpha.2 4,257 7/26/2024
2.0.0-alpha.1 3,406 7/17/2024
2.0.0-alpha.0 267 7/17/2024
1.1.0 924 11/15/2026
1.0.42 53 11/15/2026
1.0.41 189,819 7/13/2024
1.0.40 2,140 7/12/2024
1.0.39 4,658 6/15/2024
1.0.38 326 6/8/2024
1.0.37 113,228 12/1/2022
Loading failed