Closed bhathawayML closed 9 months ago
Hello!
Thank you for the very detailed report, and sorry for the later reply!
The only possibility I can see is that the device is opened in some other software (APT, Kinesis, or another Python instance). This usually does not interfere with the device discovery, but it does prevent actually connecting to the device. To check this, I would suggest restarting the PC and only start one Python interpreter instance with your code. If that still doesn't work (i.e., it shows the same exact error as before), you can also try using pyft232
directly:
import ft232
inst=ft232.Ft232("40330594",115200,rtscts=False) # assuming '40330594' is your device serial number
inst.close()
(again, make sure that the device is not being used in any other software). If that still raises an error, then the only explanation I can come up with is some problem with pyft232
package or the corresponding drivers.
Thanks Alex!
Turns out my stepper motor was broken and need to be returned to Thorlabs for repairs. Our new one works fine with your code :)
Thanks again for the help.
Hello!
I am trying to communicate with a Thorlabs stage (HDR50) with the BSC201 Stepper Motor Controller, but I keep getting the following error when calling
pylablib.devices.Thorlabs.KinesisMotor("40330594")
:I can use
pylablib.devices.Thorlabs.list_kinesis_devices()
orprint(comm_backend.list_backend_resources("ft232"))
to show the device is detected:[('40330594', 'APT Stepper Motor Controller')]
...and I can control the device in the Kinesis software ok.
Things I've tried with no luck:
pylablib.devices.Thorlabs.BasicKinesisMotor
(encountered same error)Thanks in advance!
Specs: Windows 10 64bit, PyCharm 2023.1.4, python 3.10, pylablib v1.4.1