-
Notifications
You must be signed in to change notification settings - Fork 22
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
Practical examples would be very helpful #20
Comments
Furthermore, it would be great to somehow relate this project with e.g. https://github.com/qpit/thorlabs_apt/: I can see the latter exposes much more user-friendly commands, and uses APT.dll on Windows. So it seems to be a frontend for this library -- could thorpy substitute APT.dll and become a backend for thorlabs_apt for Linux? Then there is https://github.com/freespace/pyAPT, apparently with rather friendly API, using a FTDI's driver to get along without APT.dll. Another project communicates with one Thorlabs instrument using the visa library https://github.com/clade/ThorlabsPM100. And it is unclear to me how yet another project, https://github.com/ekarademir/thorlabs-kinesis, interfaces the hardware. It is quite hard to get acquainted with the Thorlabs-related libraries here on github! Most potential users are not real programmers, just scientists and engineers needing to get their instrumentation up and running...
|
Hey Filip |
Hi Ben and Filip, |
Sorry for being slightly off-topic here, but this concerns the very basic question of how the future of this project could look like. Bad news is that there is massive redundancy of lab control projects here on github. Aside of at least 5 projects focused on Thorlabs, there are unbelievable 35+ projects [https://github.com/LabPy/labpy-discussion/issues/23] attempting to support laboratory instrumentation of multiple manufacturers, often including Thorlabs. Much of capabilities of these projects overlap, but none of them is a clear superset of others. Good news is that this has been noticed in last two years and part of the developers discuss collaborative unification of their instrumentation drivers into one package [https://github.com/python-data-acquisition/meta/issues/14]. So currently I am considering to get inspired by the code here and port the functionality into a more universal package. But I greatly appreciate the work spent on |
Don't mean to butt in, just want to mention https://pypi.org/project/thorlabs-apt-protocol/, which is what I use. In my opinion it is preferable to always use the serial interface. This works out-of-the-box on Linux, and on Windows you can enable it in the device manager:
It then becomes really simple to make cross-platform Thorlabs APT interfaces. In comparison the dll is not portable and makes installation a bigger hassle. Just my humble thoughts---I'm interested in the broader fragmentation problem but I don't have any concrete answers right now. |
Thank you, I can see |
really all we'd need is some sort of easy-to-use moveAbsolute() and moveRelative() function, eg:
(literally just copying @FilipDominec 's) and either
or
(i have no idea what, functionally, is different between calling move_relative_long vs just polling the current location and calling move_absolute_long). chuck these wherever you like, or change motorObj to self and chuck it into the GenericStage class (honestly, i thought i'd be able to call motorObj.position(newPosition) and get my stage to move. nope! oh well. no big deal. but there should be a method in there for absolute or relative motion imo). (i may go ahead and do this myself with a commit. after a bit more testing of course...) |
The following two additions to the genericStage class:
let you just call set / change with your stage object. eg, my rudimentary "move x and y to, or by" script might look like this: I still find it a little peculiar that the second "def position" is literally exactly what we need to call in order to set the position. we just....can't seem to call it. (all i did was copy and paste it here, and gave it a new name). |
While I was able to get the linear stage moving (through trial and error) using
it would be much better if the project supplied some short practical examples of typical use.
(E.g. I did not find out how to make the commands to block further program flow until the movement is finished. I am
using time.sleep(delay)
hoping that the controller will finish within the delay.) The official Thorlabs guides were useless for me.The text was updated successfully, but these errors were encountered: