NAutomation.Leadshine.EtherCAT 1.0.0

dotnet add package NAutomation.Leadshine.EtherCAT --version 1.0.0
                    
NuGet\Install-Package NAutomation.Leadshine.EtherCAT -Version 1.0.0
                    
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="NAutomation.Leadshine.EtherCAT" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NAutomation.Leadshine.EtherCAT" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="NAutomation.Leadshine.EtherCAT" />
                    
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 NAutomation.Leadshine.EtherCAT --version 1.0.0
                    
#r "nuget: NAutomation.Leadshine.EtherCAT, 1.0.0"
                    
#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 NAutomation.Leadshine.EtherCAT@1.0.0
                    
#: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=NAutomation.Leadshine.EtherCAT&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=NAutomation.Leadshine.EtherCAT&version=1.0.0
                    
Install as a Cake Tool

NAutomation.Leadshine.EtherCAT

Typed .NET facade for Leadshine EtherCAT motion-control cards, implemented from Chapter 7 of the Leadshine EtherCAT programming manual. The package hides the vendor dmc_* P/Invoke API and copies the x64 LTDMC.dll runtime to the application's output directory automatically.

Requirements

  • Windows x64
  • .NET Framework 4.7.2 or later
  • Leadshine card, driver, and firmware supported by the supplied LTDMC runtime

Set the consuming executable's Platform target to x64.

Quick start

using NAutomation.Leadshine.EtherCAT;

using (var controller = LeadshineController.Open(0))
{
    var x = controller.Axis(0);
    x.Enable();
    x.SetEquivalent(0.001);
    x.SetProfile(new MotionProfile(0, 100, 0.2, 0.2));
    x.MoveTo(50);

    controller.Io.Write(0, true);
}

API groups

  • Axis(...): enable/reset state, homing, point/JOG motion, encoder, handwheel, PVT and compensation.
  • Coordinate(...): line, arc, rectangle, ellipse, tangent following and continuous interpolation.
  • Io: bit/port I/O, pulse output and input counters.
  • Pwm: immediate PWM output; continuous PWM commands are available on ContinuousPath.
  • Compare: low/high-speed 1D and 2D position comparison.
  • Latch: hardware and software position latch.
  • Safety: circular-zone motion limit.

All native return codes are checked. A failed command throws LeadshineException, whose Operation and ErrorCode properties identify the failed operation.

The managed facade is MIT licensed. LTDMC.dll is a Leadshine vendor runtime and remains subject to the vendor's own distribution and use terms.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.

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
1.0.0 157 8/14/2026

Initial typed facade based on Chapter 7 of the Leadshine EtherCAT programming manual.