Coder Social home page Coder Social logo

thorlabs_apt's Introduction

thorlabs_apt

python package wrapping Thorlabs' APT.dll shared library.

Installation

Since this package is based on APT.dll it only works on Windows. For Linux and Mac you can try thorpy

  1. Install thorlabs_apt using setup.py

  2. Check whether your python is a 32 bit or 64 bit version and install the corresponding Thorlabs' APT software

  3. Copy APT.dll from the "APT installation path\APT Server" directory to one of the following locations:

    • Windows\System32
    • into the "thorlabs_apt" folder
    • your python application directory

List of reported working devices

I have tested thorlabs_apt only with the K10CR1 rotation stage, but it should work with all motors supported by APT. If it works with other motors as well, please let me know and I will add it here. Otherwise file a bug report or fix the problem yourself and open a pull request.

  • BSC101
    • NRT150
  • BSC201
  • K10CR1 (*)
  • KDC101
  • LTS150
  • NT100 (#12)
  • TDC001

(*) see known issues.

Known issues

  • If the package has been imported and a new device is plugged into the USB port, list_available_devices() cannot find it. The reason is that the list of available devices in APT.DLL is initialized when APTInit() is called. However, calling APTCleanUp() and APTInit() will kill all existing communication to other devices. If you have a good solution for that, I'm happy to hear it, but I fear that this is a limitation of APT.DLL.
  • K10CR1: default move home parameters are invalid which prevents homing. Use set_move_home_parameters() to set them manually.

Example

The following example checks for all connected devices and then connects to the one specified by its serial number. The motor is first homed (blocking) and then moved relative by 45 degree.

    >>> import thorlabs_apt as apt
    >>> apt.list_available_devices()
    [(50, 55000038)]
    >>> motor = apt.Motor(55000038)
    >>> motor.move_home(True)
    >>> motor.move_by(45)

References

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.