zaber_device_python
This Python package (zaber_device) creates a class named ZaberDevice, which contains an instance of serial_interface.SerialInterface and adds methods to it to interface to Zaber motorized linear slides.
Authors:
Peter Polidoro <peterpolidoro@gmail.com>
License:
BSD
Example Usage:
from zaber_device import ZaberDevice
dev = ZaberDevice() # Might automatically find device if one available
# if it is not found automatically, specify port directly
dev = ZaberDevice(port='/dev/ttyUSB0') # Linux
dev = ZaberDevice(port='/dev/tty.usbmodem262471') # Mac OS X
dev = ZaberDevice(port='COM3') # Windows
dev.get_actuator_count()
2
dev.get_position()
[130000, 160000]
dev.home()
dev.moving()
[True, True]
dev.moving()
[False, False]
dev.get_position()
[0, 0]
dev.move_relative(10000)
dev.get_position()
[10000, 10000]
dev.move_relative(10000,0)
dev.moving()
[True, False]
dev.get_position()
[20000, 10000]
dev.store_position(0)
dev.get_stored_position(0)
[20000, 10000]
dev.move_at_speed(1000)
dev.stop()
dev.get_position()
[61679, 51679]
dev.move_to_stored_position(0)
dev.get_position()
[20000, 10000]
from zaber_device import ZaberDevices
devs = ZaberDevices() # Might automatically find all available devices
# if they are not found automatically, specify ports to use
devs = ZaberDevices(use_ports=['/dev/ttyUSB0','/dev/ttyUSB1']) # Linux
devs = ZaberDevices(use_ports=['/dev/tty.usbmodem262471','/dev/tty.usbmodem262472']) # Mac OS X
devs = ZaberDevices(use_ports=['COM3','COM4']) # Windows
devs.keys()
dev = devs[serial_number]
from zaber_device import ZaberStage
stage = ZaberStage() # Might automatically find all available devices
# if they are not found automatically, specify ports to use
stage = ZaberStage(use_ports=['/dev/ttyUSB0','/dev/ttyUSB1']) # Linux
stage = ZaberStage(use_ports=['/dev/tty.usbmodem262471','/dev/tty.usbmodem262472']) # Mac OS X
stage = ZaberStage(use_ports=['COM3','COM4']) # Windows
stage.get_aliases()
{123: [10, 11]}
serial_number = 123
alias = 10
stage.set_x_axis(serial_number,alias)
alias = 11
stage.set_y_axis(serial_number,alias)
# Lookup microstep_size on Zaber website
stage.set_x_microstep_size(0.49609375e-3)
stage.get_x_microstep_size()
0.00049609375
stage.set_y_microstep_size(0.49609375e-3)
stage.home()
stage.moving()
(True, True, False)
stage.moving()
(False, False, False)
stage.get_positions()
[0.0, 0.0, 0.0]
stage.move_x_at_speed(5)
stage.moving()
(True, False, False)
stage.get_positions()
[76.4619375, 0.0, 0.0]
stage.stop_x()
stage.moving()
(False, False, False)
stage.get_positions()
[94.38133984375, 0.0, 0.0]
stage.move_y_relative(125)
stage.moving()
(False, True, False)
stage.moving()
(False, False, False)
stage.get_positions()
[94.38133984375, 124.99975, 0.0]
stage.move_x_absolute(50)
stage.move_y_absolute(75)
stage.moving()
(False, False, False)
stage.store_x_position(0)
stage.get_stored_x_position(0)
49.99980078125
stage.move_x_relative(50)
stage.get_positions()
[99.9996015625, 74.99994921875, 0.0]
stage.move_to_stored_x_position(0)
stage.get_positions()
[49.99980078125, 74.99994921875, 0.0]
Metadata
Release files for zaber-device 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| zaber_device-2.1.1.tar.gz | 11.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zaber_device-2.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 23.0 kB
Release files / zaber_device-2.1.1.tar.gz
| Download URL | zaber_device-2.1.1.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
807362df7fa8b75cee7373bc1d47c3c1b12eb6d875df78dcb1bc3b04666ab1f9
|
|
BLAKE2b-256 checksum How to use checksums |
e6df0fdb621280eba497d9f97902f8592eec33efec510a7cbfd1c07be933ec10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|
Release files / zaber_device-2.1.1-py2.py3-none-any.whl
| Download URL | zaber_device-2.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
afc78b32c163b693c56858112484bfdbd3898f79bf2a47b252654f34c07f969d
|
|
BLAKE2b-256 checksum How to use checksums |
af79eaffede07bcdd5b83af5f8e953453ede1cb55db6c589ffa165b27ccac3c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|
Security for zaber-device 2.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.