Skip to main content

No project description provided

Project description

BenHW SDK - Python Interface

Python interface for Bentham Instruments Hardware Control DLL.

Installation

pip install benhw

Usage

Example

from benhw import BenHW, exceptions, tokens

hw = BenHW()

try:
  hw.build_system_model("system.cfg")
  hw.load_setup("setup.atr")
  hw.initialise()
  hw.park()
  hw.select_wavelength(wl=555)
  hw.set("motor1", tokens.MotorPosition, 0, 4455)
  signal = hw.automeasure()
  print(f"signal: {signal}")
except exceptions.BenHWException as e:
  print(f"BenHW error: {e}")

Accessing Tokens and Errors

from benhw import tokens, errors

# Access tokens via namespace
print(tokens.ADCVolts)           # 504
print(tokens.MonochromatorCurrentWL)  # 11

# Access error codes via namespace
print(errors.BI_OK)      # 0
print(errors.BI_error)   # -1

Requirements

  • Python 3.12+
  • Windows operating system

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benhw-0.7.0.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benhw-0.7.0-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file benhw-0.7.0.tar.gz.

File metadata

  • Download URL: benhw-0.7.0.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for benhw-0.7.0.tar.gz
Algorithm Hash digest
SHA256 f82a688d06ea3e223eeeb25742f2d6a9439204a88bbbab13a88572650495c3b3
MD5 eb3811a96a21b12ce9a5f21686ad18b7
BLAKE2b-256 f96d47e7a1c292411f16015b5f16dbc945023af6f74032441f25a0c442c0d482

See more details on using hashes here.

File details

Details for the file benhw-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: benhw-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for benhw-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0d9966e276d0b9c16ef8e30d89377e80ea6c4b5d16afd8b37865048c9722caa
MD5 dd07284a3a47da979e26c0bf0cfb377c
BLAKE2b-256 bc22b10cac9a2bd71498c3840461528bb667d7bea39ee13b19be82570b28a00f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page