psj-lib: Piezosystem Jena Device Library

_images/psj-lib-header.png

psj-lib is a comprehensive Python library for controlling piezoelectric amplifiers and control devices manufactured by piezosystem jena GmbH. The library provides an intuitive, asynchronous interface for precision position control, waveform generation, data acquisition, and advanced control system configuration.

Key Features:

  • Asynchronous Architecture: Built on Python’s asyncio for efficient, non-blocking device communication

  • Multi-Device Support: Extensible framework supporting d-Drive, 30DV50/300, and selected NV-series devices

  • Comprehensive Capabilities: Full access to position control, PID tuning, waveform generation, data recording, and filtering

  • Multiple Transport Protocols: Connect via Serial (USB) or Telnet (Ethernet)

  • Type-Safe API: Complete type hints for excellent IDE autocomplete and type checking

  • Extensive Documentation: Comprehensive docstrings, examples, and developer guides

Currently Supported Devices:

  • d-Drive: Modular piezo amplifiers with 20-bit resolution, 50 kHz sampling, and advanced control features

  • 30DV50/300: Single-channel, standalone amplifier

  • NV40/3, NV40/3CLE: NV-series amplifiers with open-loop and closed-loop variants

Not currently supported:

Quick Start:

import asyncio
from psj_lib import DDriveDevice, TransportType

async def main():
    device = DDriveDevice(TransportType.SERIAL, "COM3")

    async with device:
        channel = device.channels[0]
        await channel.closed_loop_controller.set(True)
        await channel.setpoint.set(50.0)
        print(f"Position: {await channel.position.get():.2f} µm")

asyncio.run(main())

Documentation

Indices and Tables