Python wrappers for Thorlabs Elliptec ELLx modules on a shared serial bus.
Reason this release was yanked:
Superseded by 1.0.0.
Project description
Thorlabs Elliptec Motorized Stages
Python wrappers for Thorlabs Elliptec ELLx modules, organized by device family and built on a shared serial-bus architecture.
This project provides:
- a shared RS-232 transport layer (
ElliptecBus) - common protocol/motion mixins (
ElliptecBase) - device-family APIs for rotary, linear, slider, and iris modules
- a practical bench test script for ELL16 (
ell16_bench_test.py)
Project Structure
ElliptecBus/elliptec_bus.py: low-level bus I/O, packet parsing, address handling, status checkselliptec_models.py:DeviceInfoandMotorInfodata models
ElliptecBase/elliptec_base.py: shared parsing helpers and base mixins used by all families
ElliptecRotaryStages/ELL14.py,ELL16.py,ELL18.py,ELL21.py,rotary_base.py
ElliptecLinearStages/ELL17.py,ELL20.py,linear_base.py
ElliptecMultiPositionSlider/ELL6.py,ELL6B.py,ELL9.py,ELL12.py,slider_base.py
ElliptecMotorized_IRIS/ELL15.py,ELL15Z.py,iris_base.py
ell16_bench_test.py: CLI smoke test for ELL16
Supported Device Groups
Rotary
Ell14Ell16Ell18Ell21
Linear
Ell17Ell20
Multi-Position Slider
Ell6Ell6BEll9Ell12
Iris
Ell15Ell15Z
Requirements
- Python 3.9+ recommended
pyserial
Install runtime dependency:
pip install pyserial
PyPI Installation (Planned)
When the package is published to PyPI, install it with:
pip install <YOUR_PACKAGE_NAME>
Placeholders:
- PyPI package name:
<YOUR_PACKAGE_NAME> - PyPI project URL:
<ADD_YOUR_PYPI_URL_HERE>
Quick Start
1) Connect to a bus
from ElliptecBus.elliptec_bus import ElliptecBus
from ElliptecRotaryStages.ELL16 import Ell16
with ElliptecBus("COM18") as bus:
stage = Ell16(bus, address="0")
print(stage.get_info())
print(stage.get_status())
print(stage.get_position_degrees())
2) Typical motion calls
with ElliptecBus("COM18") as bus:
stage = Ell16(bus, address="0")
stage.home(direction="cw")
stage.move_absolute_degrees(90.0)
stage.set_jog_step_degrees(5.0)
stage.jog_forward()
Bench Validation Script (ELL16)
Use the included test helper:
python ell16_bench_test.py COM18
python ell16_bench_test.py COM18 --home --move 90
python ell16_bench_test.py COM18 --jog-forward 5
python ell16_bench_test.py COM18 --jog-backward 2
Useful options:
--address(default0)--motion-timeout--auto-validate-model
On Windows, find your COM port in Device Manager (Ports (COM & LPT)).
Addressing and Bus Behavior
- Elliptec device addresses are hexadecimal:
0toF. - One serial bus can host multiple modules on different addresses.
- The wrappers are designed for addressed communication over one shared bus object.
Communication protocol
For the complete communication protocol covering all Thorlabs ELLx models, see the official Thorlabs manual:
Error Handling
Core exceptions from ElliptecBus:
ElliptecError: base exceptionElliptecTimeoutError: no response in timeElliptecProtocolError: malformed/unexpected packetElliptecDeviceError: non-zeroGSstatus code returned by device
STATUS_MESSAGES maps known GS codes to human-readable descriptions.
Documentation (Sphinx / Read the Docs)
Sphinx docs are included in docs/ and configured via:
.readthedocs.yamlrequirements-docs.txtdocs/conf.pydocs/index.rstdocs/api.rst
Local docs build:
pip install -r requirements-docs.txt
python -m sphinx -b html docs docs/_build/html
Documentation:
https://thorlabs-elliptec-motorized-stages.readthedocs.io/en/latest/
License
This project is licensed under the Apache License 2.0.
See the LICENSE file for full terms.
Notes
- This project focuses on command/control protocol behavior for ELLx modules.
- Always verify device model/address before issuing motion commands on shared buses.
- For production integrations, consider adding application-level retries, logging, and safety interlocks.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file thorlabs_elliptec_motorized_stages-0.1.0.tar.gz.
File metadata
- Download URL: thorlabs_elliptec_motorized_stages-0.1.0.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43795317f340e3bc06d8572ec6d0c05ebd75a46527a2feac1d43a6c18b465fc4
|
|
| MD5 |
e798d0e6398c0e750ff9b8c6263091b6
|
|
| BLAKE2b-256 |
d886890a5657851f79471d92ad17d13c26e566318464d5fe985fa947d3f97a4e
|
File details
Details for the file thorlabs_elliptec_motorized_stages-0.1.0-py3-none-any.whl.
File metadata
- Download URL: thorlabs_elliptec_motorized_stages-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4a87037c8fe7e10ce8e08cc53b91f90c5e5d7c21a4a794d8cbc603b0d449c12
|
|
| MD5 |
fc5253b7ebab9e9ff5b82a845de4145f
|
|
| BLAKE2b-256 |
a1473a10578eb83882ebe89f4331469120a1ff5451dac808c28023c72ff2cf70
|