C++
This documentation is for version 26.13.0 of the module.
The zahner_link library provides comprehensive programmatic control of the Zahner IM7/c/x Electrochemical Workstations. This job-based library enables you to automate complex measurement protocols and integrate electrochemical experiments into your data analysis workflows.
What makes this library particularly powerful is that it uses the exact same C++ core library as Zahner Lab itself. This means you get identical functionality whether you’re working in the GUI or writing code - no feature compromises or compatibility issues to worry about.
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.
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
Below, an example demonstrates the elegant simplicity of zahner_link - connecting to your instrument and performing an EIS measurement:
ZahnerLinkExc link("localhost", "1994");
link.connect();
SwitchOnJob switchOnJob({
.potentiostat = "MAIN:1:POT",
.coupling = PotentiostatCoupling::POTENTIOSTATIC,
.bias = 1.0, // Start at 1.0 V
.voltage_range_index = 0,
.compliance_range_index = 0});
link.doJob(switchOnJob);
EisGenerateJob eisGenerateJob({
.bias = 0,
.min_frequency = 100,
.max_frequency = 1e4,
.start_frequency = 1e3,
.points_per_decade_upper = 20,
.points_per_decade_lower = 6,
.pre_duration = 0.1,
.pre_waves = 1,
.meas_duration = 0.2,
.meas_waves = 3,
.amplitude = 0.01});
link.doJob(eisGenerateJob);
auto eisDataset = link.getJobResultDataT(eisGenerateJob);
SwitchOffJob switchOffJob({.potentiostat = "MAIN:1:POT"});
link.doJob(switchOffJob);
link.disconnect();
API Documentation
Since the Python library is based on C++, and all jobs have the same names and only the methods differ due to naming conventions, the Python documentation is also valid here. Similarly, the examples can also be developed using Python, as C++ has the same or a larger range of functions.
Build Requirements
To use the zahner_link C++ library, you need to have the following prerequisites:
C++23 compiler (e.g., MSVC, GCC)
OpenSSL