libplctag.NativeImport 2.0.0-alpha.4

This is a prerelease version of libplctag.NativeImport.
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.4
                    
NuGet\Install-Package libplctag.NativeImport -Version 2.0.0-alpha.4
                    
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.4" />
                    
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.4" />
                    
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.4
                    
#r "nuget: libplctag.NativeImport, 2.0.0-alpha.4"
                    
#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.
#addin nuget:?package=libplctag.NativeImport&version=2.0.0-alpha.4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=libplctag.NativeImport&version=2.0.0-alpha.4&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 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 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 was computed.  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 is compatible.  netcoreapp3.1 is compatible. 
.NET Framework net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.0

    • No dependencies.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.7.1

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • net5.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (2)

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

Package Downloads
libplctag

A library for PLC communication

ABPlcRx

A Reactive Allen Bradley PLC library

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-alpha.5 2,557 12/1/2024
2.0.0-alpha.4 126 9/7/2024
2.0.0-alpha.3 109 8/22/2024
2.0.0-alpha.2 2,562 7/26/2024
2.0.0-alpha.1 88 7/17/2024
2.0.0-alpha.0 76 7/17/2024
1.0.41 30,153 7/13/2024
1.0.40 1,041 7/12/2024
1.0.39 2,221 6/15/2024
1.0.38 167 6/8/2024
1.0.37 87,849 12/1/2022
1.0.36 508 11/19/2022
1.0.35 554 11/4/2022
1.0.34 7,859 9/28/2022
1.0.33 11,558 7/5/2022
1.0.32 8,268 2/14/2022
1.0.31 1,082 1/27/2022
1.0.30 563 1/10/2022
1.0.29 495 12/31/2021
1.0.28 464 12/27/2021
1.0.25 2,099 12/16/2021
1.0.24 2,983 11/25/2021
1.0.23 475 11/14/2021
1.0.22 1,071 11/5/2021
1.0.21 535 10/28/2021
1.0.20 464 10/24/2021
1.0.19 3,230 10/15/2021
1.0.18 525 10/15/2021
1.0.17 13,287 9/24/2021
1.0.16 726 9/22/2021
1.0.15 765 9/18/2021
1.0.14 908 8/30/2021
1.0.13 3,354 3/20/2021
1.0.12 5,879 3/13/2021
1.0.11 516 3/13/2021
1.0.10 2,566 3/7/2021
1.0.9 806 2/24/2021
1.0.8 456 2/21/2021
1.0.8-beta.1 216 2/21/2021
1.0.7 511 2/16/2021
1.0.7-beta.0 219 2/16/2021
1.0.6 485 2/14/2021
1.0.5 452 2/13/2021
1.0.4 482 2/9/2021
1.0.3 461 2/4/2021
1.0.2 8,176 1/11/2021
1.0.1 1,889 10/28/2020
1.0.0 1,064 9/16/2020
0.0.14 829 9/9/2020
0.0.13 579 9/9/2020
0.0.12 562 9/1/2020
0.0.11-beta 2,809 8/4/2020
0.0.11-alpha 562 7/29/2020
0.0.10-alpha 497 7/27/2020
0.0.9-alpha 520 7/25/2020
0.0.8-alpha 548 7/21/2020
0.0.7-alpha 580 7/18/2020
0.0.6-alpha 477 7/14/2020
0.0.5-alpha 544 7/11/2020
0.0.4-alpha 448 7/11/2020