Connecting to a ThorLabs HDR50/M rotation stage with BSC201 motor controller causes a bunch of warnings of type UserWarning to be printed: model number SCC201 doesn't match the device ID prefix 40((BSC101|SSC20.)).
A second UserWarning is 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 of deg as intended.
Debugging
The hardware model query return SCC201 (note the double C), which does not match anything in kinesis.py.
The printed label on the back of the device hardware says BSC201, which is also not listed as an available match.
The serial number starts with 40 which means the model number is compared with (BSC101|SSC20.) as a regex expression by the function _model_match(). This function returns False, causing get_device_info() to print a warning.
Solution
Edit the regex expression to include BSC201 and SCC201 as search patterns, and include the SCC20 pattern when attempting to set the scale correctly.
Now, no more warnings appear when connecting to the stage.
The resulting KinesisMotor._scale values are (75093.25279758392, 4031005.8101743045, 826.1143307371219). This matches the values from the APT User Manual (search for "HDR50") (75091, 4030885, 826) divided by 0.99997 deg (normalisation).
Problem
UserWarning
to be printed:model number SCC201 doesn't match the device ID prefix 40((BSC101|SSC20.))
.UserWarning
is 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 ofdeg
as intended.Debugging
SCC201
(note the double C), which does not match anything inkinesis.py
.BSC201
, which is also not listed as an available match.40
which 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
BSC201
andSCC201
as search patterns, and include theSCC20
pattern when attempting to set the scale correctly.KinesisMotor._scale
values 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).