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 ThorlabsFW102CDll service for controlling Thorlabs FW102C motorized filter wheel #180

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

a-sevin
Copy link
Collaborator

@a-sevin a-sevin commented Apr 16, 2024

This service uses the Thorlabs FW102C filter wheel SDK v5.0.0.

The Thorlabs FW102C filter wheel SDK is available at https://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=FW102C.

This version lets you identify the filter wheel by its serial number.

I have a few questions about this version.

  1. It's only compatible with Windows. The DLL provided by Thorlabs isn't an "Assembly DLL file", so Python can't load it on Linux. Is this an issue?
  2. I prefer using the standard SDK installation path as the os.add_dll_directory parameter instead of adding the DLL to the repository. What's the good choice ?
  3. The official Thorlabs module uses the 32bit version of the DLL for Windows. Should I try to detect the OS type and load the correct one or could we admit that the 64bit is a standard? (Is anyone still using Windows 7 32-bit?)

@a-sevin a-sevin self-assigned this Apr 16, 2024
@ivalaginja
Copy link
Collaborator

@a-sevin what I know about dlls in catkit2 is that we keep them off repo. Some other Thorlabs services implement an autodetection of the DLL, I think the picomotors for example (pm).

@ivalaginja
Copy link
Collaborator

ivalaginja commented Apr 16, 2024

For reference, this is the implementation for the 102C in one of our outdated repositories:
https://github.com/spacetelescope/catkit/blob/c89dfbd87533b7a402d0ce8217daef5be25389c8/catkit/hardware/thorlabs/ThorlabsFW102C.py

That's also what I based the Newport filter wheel service in THD2 on. Not sure if this is helpful to you.

@a-sevin
Copy link
Collaborator Author

a-sevin commented Apr 16, 2024

That's also what I based the Newport filter wheel service in THD2 on. Not sure if this is helpful to you.

The issue with this implementation is that it is not possible to know which device is connected to it. At best, the type can be identified, but not the serial number. As there are two 102C on the THD bench, this could potentially lead to difficulties at some point.

@a-sevin a-sevin force-pushed the feature/thorlabs_fw102c_dll branch from e1f2341 to fd2fa83 Compare April 16, 2024 18:26
@a-sevin a-sevin added enhancement New feature or request hardware Integrate new hardware collaborators Worked on by external collaborator. Might need some extra help on code integration. and removed hardware Integrate new hardware labels Apr 16, 2024
@a-sevin a-sevin added the hardware Integrate new hardware label Apr 16, 2024
@RemiSoummer RemiSoummer marked this pull request as draft April 30, 2024 12:30
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. enhancement New feature or request hardware Integrate new hardware
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants