Python
This documentation is for version 26.22.0 of the module.
The zahner_link Python library provides full programmatic control of the Zahner IM7/c/x Electrochemical Workstations. Built on a compiled C++ core, this job-based library lets you automate complex measurement protocols and integrate electrochemical experiments directly into your data analysis workflows.
The C++ core library used by zahner_link is exactly the same as that used by Zahner Lab. This means you get identical functionality whether you work in the GUI or write Python 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.
Python Integration: Seamlessly integrates with popular Python libraries for data analysis and visualization.
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 numerous examples both in this documentation (see Examples) and on GitHub.
https://github.com/Zahner-elektrik/zahner_link
You can easily install the package from PyPI using pip: https://pypi.org/project/zahner-link/
Below, an example demonstrates the elegant simplicity of zahner_link - connecting to your instrument and performing an EIS measurement:
import zahner_link as zl
link = zl.ZahnerLinkExc("localhost", "1994")
link.connect()
switch_on_job = zl.control.SwitchOnJob(
potentiostat="MAIN:1:POT",
coupling=zl.PotentiostatCoupling.POTENTIOSTATIC,
bias=1.0,
voltage_range_index=0,
compliance_range_index=0,
)
link.do_job(switch_on_job)
eis_generate_job = zl.meas.EisGenerateJob(
bias=0,
min_frequency=10,
max_frequency=1e5,
start_frequency=10e3,
points_per_decade_upper=8,
points_per_decade_lower=5,
pre_duration=0.1,
pre_waves=1,
meas_duration=1,
meas_waves=4,
amplitude=1e-2,
)
link.do_job(eis_generate_job)
eis_data = link.get_job_result_data(eis_generate_job)
switch_off_job = zl.control.SwitchOffJob(potentiostat="MAIN:1:POT")
link.do_job(switch_off_job)
link.disconnect()
Applications
The zahner_link 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 analysis tools like pandas, numpy, and matplotlib.
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
Python 3.11 or later
Pre-built wheels are available for:
Windows x86_64
Linux x86_64 (glibc and musl)
Linux on ARM is available on request
API Documentation
Complete documentation for all available jobs and functions:
Examples
There is a Jupyter notebook for each example, which explains the example code in detail.
BasicIntroduction.ipynb provides the most basic introduction and describes the connection setup in detail.
The notebooks should be viewed in the order they are listed, as some build on each other and not all explanations are repeated.
The examples are also available on GitHub:
https://github.com/Zahner-elektrik/zahner_link
The zahner_link library also includes third-party software components. The licenses for these components can be found in the zahner_link/third_party_licenses directory of the installed package.