-
Notifications
You must be signed in to change notification settings - Fork 70
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
Updates & Fixes for Thorlabs APT, APTMotorController #334
Conversation
14 bytes of data are expected according to the manual. Therefore, the `expect_data_len` must be set to 14 in order to clean out the buffer.
(not an InstrumentKit user, just a fan) Just want to mention that we've tried to implement a complete sans-io protocol [1]. Our dream was to have one implementation of the protocol that several projects could benefit from, shared debugging resources etc. It's a very lightweight dependency. Might be beneficial to you. |
@untzag We'll have to take a look!! Thanks for pointing it out |
Data that is returned are "made up" but might be somehow reasonable...
Thanks @untzag, this looks very interesting, need to spend some more time on it! |
Cannot test with my hardware (KDC101), but notes added after manual
Looks like this fixes the issue I had and closes #335. Main new feautres / fixes:
|
``OSError`` otherwise. Devices that work according to the | ||
manual are: TSC001, KSC101, BSC10x, BSC20x, LTS150, LTS300, | ||
MLJ050, MLJ150, TIM101, KIM101. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this note since the status_bits
is not working with the KDC101, and according to the manual should not work with it.
apt.channel[0].backlash_correction = corr | ||
|
||
corr_received = apt.channel[0].backlash_correction | ||
unit_eq(corr_received, corr, abs=1e-3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now using the extended unit_eq
FYI github actions is struggling right now, so I'll rerun when I see that it is clear : https://www.githubstatus.com/ |
Add backlash correction property to
APTMotorController
.Currently, my stage finishes the first move correctly, with a correct package being returned. The second move then fails with an OS Error since the wrong package is returned. Need to figure out where this issue is coming from and how to fix it. That will be part of this PR as well.