C#
The ZahnerLink.Net library provides full programmatic control of the Zahner IM7/c/x Electrochemical Workstations.
Built on the same compiled C++ core, this job-based library lets you automate complex measurement protocols and integrate electrochemical experiments directly into your .NET applications.
The C++ core library used by ZahnerLink.Net is exactly the same as that used by Zahner Lab.
This means you get identical functionality whether you work in the GUI or write C# code - no feature gaps or compatibility issues.
Key Features
Job-Based Architecture: Each instrument function is mapped to a specific job that can be executed independently or combined into complex protocols.
High Performance: The library leverages a compiled C++ core for optimal speed and reliability.
Full Instrument Access: Complete programmatic control over all instrument features and measurement parameters.
Self-Contained Package: The NuGet package carries the native library for every supported platform - nothing else has to be installed or copied.
Familiar Names: Job classes carry the same names as in C++ and Python, so an example written in one language reads almost unchanged in another.
Getting Started
The library is built on a simple, job-based architecture and is fully documented to ensure a smooth onboarding experience. To simplify device integration and help you get started quickly, we have provided examples in this documentation (see Examples).
You can install the package from NuGet:
dotnet add package ZahnerLink.Net
Once the package is installed, you are ready to connect to your instrument.
Below, an example demonstrates the elegant simplicity of ZahnerLink.Net - connecting to your instrument and performing an EIS measurement:
using Zahner.Link;
using Zahner.Link.Jobs;
using var link = new ZahnerLink("169.254.73.242", "1994");
link.Connect();
using var switchOnParameters = new SwitchOnParameters
{
Potentiostat = "MAIN:1:POT",
Coupling = PotentiostatCoupling.Potentiostatic,
Bias = 1.0,
VoltageRangeIndex = 0,
ComplianceRangeIndex = 0,
};
using var switchOnJob = new SwitchOnJob(switchOnParameters);
link.DoJob(switchOnJob);
using var eisParameters = new EisGenerateParameters
{
Bias = 0,
MinFrequency = 10,
MaxFrequency = 1e5,
StartFrequency = 10e3,
PointsPerDecadeUpper = 8,
PointsPerDecadeLower = 5,
PreDuration = 0.1,
PreWaves = 1,
MeasDuration = 1,
MeasWaves = 4,
Amplitude = 1e-2,
};
using var eisJob = new EisGenerateJob(eisParameters);
link.DoJob(eisJob);
using DataSet eisData = link.GetJobResultData(eisJob);
using var switchOffJob = new SwitchOffJob(new SwitchOffParameters { Potentiostat = "MAIN:1:POT" });
link.DoJob(switchOffJob);
link.Disconnect();
Every job follows the same shape: build a parameters object, wrap it in a job, hand the job to DoJob. Results are fetched with GetJobResultData.
Parameters and results own native memory, so they are disposable, and using releases them at
the end of the enclosing scope. A parameters object with a single field, as in the last step above,
can be passed straight into the job instead: the job takes its own copy, and the temporary is
cleaned up on collection rather than at a point you choose.
Applications
The ZahnerLink.Net library enables a wide range of electrochemical applications:
Research Automation: Develop automated measurement sequences for systematic studies and parameter optimization.
Data Integration: Connect electrochemical measurements directly with the .NET data and analysis ecosystem.
Custom Protocols: Design specialized measurement procedures tailored to your specific research requirements.
High-Throughput Testing: Implement automated testing workflows for battery characterization, corrosion studies, and material evaluation.
Adaptive Measurements: Use real-time feedback and stop conditions to create responsive experimental protocols.
Requirements
.NET 8.0 or later, or .NET Framework 4.8
The package targets net8.0 and net48; .NET 9 and .NET 10 consume the net8.0 assembly.
Native payloads are included for:
Windows x86_64 and x86
Linux x86_64
Linux on ARM64
macOS on ARM64
API Documentation
Complete documentation for all available jobs and functions:
Examples
There is a complete, compilable program for each example.
BasicIntroduction.cs provides the most basic introduction and describes the connection setup in detail.
The examples should be read in the order they are listed, as some build on each other and not all explanations are repeated.
Each example page links to the Python notebook of the same name, which explains the underlying
concepts in more detail — EIS Waves here corresponds to EisWaves.ipynb in the
Python examples.