Add services for Thorlabs TDC001 and KDC101 cube motors #169
Labels
collaborators
Worked on by external collaborator. Might need some extra help on code integration.
hardware
Integrate new hardware
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.
The text was updated successfully, but these errors were encountered: