Bugfix to kinesis.py when using ThorLabs HDR50/M rotation stage with BSC201 controller#46
Open
mnirkko wants to merge 4 commits intoAlexShkarin:devfrom
Open
Bugfix to kinesis.py when using ThorLabs HDR50/M rotation stage with BSC201 controller#46mnirkko wants to merge 4 commits intoAlexShkarin:devfrom
mnirkko wants to merge 4 commits intoAlexShkarin:devfrom
Conversation
Fix to avoid warnings and calculate scale correctly when connecting to a HDR50/M rotational stage with BSC201 controller.
Sets the scale correctly when using a HDR50 rotation stage and a BSC201 motor controller, which gets recognised by the model query as SCC201.
Author
|
The PR now points to the development branch rather than the base branch. |
Author
|
@AlexShkarin any update on this? I have received some feedback from various people implementing these changes, so it could be useful to include in a future release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
UserWarningto be printed:model number SCC201 doesn't match the device ID prefix 40((BSC101|SSC20.)).UserWarningis printed:can't recognize motor model SCC201; setting all scales to internal units. This causes all scales to be set to internal units(1,1,1), so the stage cannot be rotated in units ofdegas intended.Debugging
SCC201(note the double C), which does not match anything inkinesis.py.BSC201, which is also not listed as an available match.40which means the model number is compared with(BSC101|SSC20.)as a regex expression by the function_model_match(). This function returnsFalse, causingget_device_info()to print a warning.Solution
BSC201andSCC201as search patterns, and include theSCC20pattern when attempting to set the scale correctly.KinesisMotor._scalevalues are(75093.25279758392, 4031005.8101743045, 826.1143307371219). This matches the values from the APT User Manual (search for "HDR50")(75091, 4030885, 826)divided by0.99997 deg(normalisation).