-
Notifications
You must be signed in to change notification settings - Fork 71
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
Improvements to APT #167
Improvements to APT #167
Conversation
|
… into feature-apt-tables
The tests are currently failing as the new APT tests in particular refer to the |
OK, something went seriously wrong with trying to extend the loopback communicator to deal with empty terminators. I'll try to fix it ASAP, sorry for leaving the PR in a broken state. In the meantime, I've merged develop back in to see if that fixes the |
I didn't anticipate that there'd be a significant number of calls of the form |
1 similar comment
thanks for all the work. I just tried it out (using python 3.5) and found a couple of issues on my linux machine using a K10CR1:
|
@tobiasgehring: I've been testing on a KDC-101, so I can't comment on the K10CR1 in particular. Unfortunately, the way the APT devices set min and max velocities depends a lot on the particular model of controller and motor, such that this PR by no means is intended to finish supporting all APT devices. As for the status bits, as noted by the comment in your quoted code snipppet, the documentation provided by ThorLabs on how the status bits work is in contradiction with what we've seen in the past from actual devices. Currently, my and @crazy4pi314's experimentation with the KDC-101 has been focused on getting the absolute move commands working on the new controller and motor models that have been added since the last improvements to APT support. This has been somewhat complicated by driver issues with the new FTDI chip and driver combination that ThorLabs seems to be shipping (hence #176). Long story short, we haven't gotten status bits working yet as it that is beyond the scope of this PR and PRs #176, #169. |
@cgranade: Thanks for your answer. I'm fine with this being beyond this PR, no doubt, I just wanted to share my observations. I'm wondering, did you have a look at thorpy? This works very well with my stage and is using the same protocol. Did you try it with your stage? At least for mine it solves problems with the status bits so it might give you some inspiration. |
Resurrecting this PR, I think its in a decent-enough state to be merged in now. While I understand that the changes to the Thorlabs instruments may be incomplete, the comments in #188 indicate that they do help. This PR also includes additional unit tests to help cover a few use cases for these few Thorlabs APT methods that are now known-functional. And since I know that @cgranade and @crazy4pi314 have moved on from their jobs when this work was originally being worked on, I'm afraid we won't get a chance to work on this for a while. I might at some point be able to borrow some of this equipment from work, but I don't know what the timeline on that would be. It's better at this point to get it merged in since its still net-positive. |
* Drop support for Python 3.4 (#200) * Fix issue #197 (#201) Where checking if value is in enum will raise value error in Py38 * Improvements to APT (#167) * Added driver/motor tables for T/KDC001 APT devs. * Moved TODO comment to avoid pylint error. * Misc Py3k changes for ThorLabs APT * motion_timeout for APT motor cmds, fix scale factor * ThorLabsAPT: Example of new config support. * More pylint fixes * Fix for line continuation convention. * Rearranged imports into standard order. * Added an APT test. Not working yet. * Fix linting issues * New handling in loopback for empty terminator. * struct.Struct for contents of hw_info packets * Support for specifying expected apt pkt sizes * Fixes to APT and APT tests * Missed a conflict marker. * Fixed bug due to `if size` falling through on size == 0. * Removed trailing whitespace. * Locked requirements.txt; see #174. * Remove numpy version pinning in requirements.txt * Add tests to cover additional loopback comm behaviour * Make pylint happy * Revert changes to size=0 behaviour in loopback comm * Fix bug with SCPIFunctionGenerator.function, add tests (#202) * Fix bug with SCPIFunctionGenerator.function, add tests * Fix linting * Fix Agilent 33220a, add tests (#203) * Function Generator single/multi-channel consistency (#206) * Function Generator single/multi-channel consistency * Fix Py27 linting issue * Fix linting issue * Add tests for FunctionGenerator abstract instrument * Adding support for the minghe mhs5200 (#150) * added mhs5200 * added minghe function generator * added absolute_import * fixed scaling on frequency * switched to abstract instrument class * fixed a few docstrings * after testing with device * Minghe MHS5200 - Add instrument to docs * isolating changes from cc1 test station: * Revert "isolating changes from cc1 test station:" This reverts commit 87b8dec. * reverting changes and fixing duty cycle * Update for new FunctionGenerator multichannel consistency update * Docstring modifications (#207)
This PR (developed in collaboration w/ @crazy4pi314) fixes the Thorlabs APT classes for Python 3 support, and adds new scale factor tables, including for the recently released KDC-101 driver. Also included is a fix for terminators on serial communicators, and a new motion_timeout on APT for slow-moving motor drivers. These changes have been tested some on hardware, but we still need to add better tests (coverage decrease, plus a lack of testing on APT before), hence the WIP tag. As before, I wanted to open the PR early to get design feedback before finishing all tests. Thanks!