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.2.1.tar.gz
(2.2 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
benhw-0.2.1-py3-none-any.whl
(2.2 MB
view details)
File details
Details for the file benhw-0.2.1.tar.gz.
File metadata
- Download URL: benhw-0.2.1.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16f2128c49132a1e945d1574bf7b31b2c3a39cf174b912bef4ce782bbd983a8f
|
|
| MD5 |
463c954b2fe1d0084f03532cdb847357
|
|
| BLAKE2b-256 |
35b9aa8e945b220b40f1c474687af602c6cc00d78f22b9e5475aa0ccf239e44b
|
File details
Details for the file benhw-0.2.1-py3-none-any.whl.
File metadata
- Download URL: benhw-0.2.1-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.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
047879703b8969ca5d20f0d1ce8d01e726bff40a5a546fd6e68c6d3e528271d8
|
|
| MD5 |
744067f027a0c41e4c7086a381b1e089
|
|
| BLAKE2b-256 |
b86d1655395bdbc7cf8b526ef58adf07e3c752e2ca1550da4f7b4de6ba5ea356
|