Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add services for Thorlabs TDC001 and KDC101 cube motors #169

Closed
ivalaginja opened this issue Mar 25, 2024 · 0 comments · Fixed by #200
Closed

Add services for Thorlabs TDC001 and KDC101 cube motors #169

ivalaginja opened this issue Mar 25, 2024 · 0 comments · Fixed by #200
Assignees
Labels
collaborators Worked on by external collaborator. Might need some extra help on code integration. hardware Integrate new hardware

Comments

@ivalaginja
Copy link
Collaborator

ivalaginja commented Mar 25, 2024

Summary of the dev process and Python library choice:

Initially, we thought we would be using https://gitlab.com/ptapping/thorlabs-apt-device since it's very clean and the API is easy to use. However, the service using this library we ran into some issues as described here #170 (comment). The original service using this API can be found in the history of #170 (the respective service has been deleted).

We then moved on to use https://pypi.org/project/thorlabs-apt/ instead, which is the latest service in #170. This works fine when running a single service, both a TDC as well as a KDC, however, we are not able to run more than one motor service like this at a time, see #170.

At this point we went back to try to resolve the issues we had been having with https://gitlab.com/ptapping/thorlabs-apt-device. In short, there is no way to access the serial number of a device until the serial port was actually opened and the connection established. And even so, the returned serial numbers seem to be garbage, so there seems to be no way to identify motors by serial number. We would have to keep track of the respective (virtual) COM ports and that would likely get too tedious with 10+ motors.

At this point, @a-sevin suggested to install the Kinesis 64-Bit Software for 64-Bit Windows and use their official Python library, https://github.com/Thorlabs/Motion_Control_Examples/tree/main/Python, which had also been suggested here: #170 (comment).

After the Kinesis installation, @a-sevin then found the following, cleaner examples of how to implement this, both under an MIT license:
https://github.com/MSLNZ/msl-equipment/blob/main/msl/examples/equipment/thorlabs/kdc101.py
https://github.com/aquilesC/experimentor/blob/main/experimentor/drivers/thorlabs/tdc001.py

Final choice

Using bits of the official vendor Python library https://github.com/Thorlabs/Motion_Control_Examples/tree/main/Python with an installation of the Kinesis software, see PR #200.

@ivalaginja ivalaginja added hardware Integrate new hardware collaborators Worked on by external collaborator. Might need some extra help on code integration. labels Mar 25, 2024
@ivalaginja ivalaginja self-assigned this Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collaborators Worked on by external collaborator. Might need some extra help on code integration. hardware Integrate new hardware
Projects
None yet
3 participants