Thank you for your code. I'm currently using it to make a UI.
It appears there is an when using discover_stages() if the stages have already been "discovered", preventing me to use them. Also, when I import and find another Thorlabs instrument such as a spectrometer, a conflict appears again preventing to discover the stages.
My fix for now was to write:
try:
from thorpy.comm.discovery import discover_stages
try: #Checking if the 2 stages have already been discovered
if len(stages)==2:
print(stages)
else:
raise("error stages")
except:
stages = list(discover_stages())
print(stages)
except:
print('failed to import thorpy.comm.discovery or load the stages')
pass
basically the idea was just to go around both problems, allowing my code to not work sometimes and forcing me to kill the current kernel and start a new one (using spyder 3).
For my first problem, I fell like a fix could be to disconnect the stages. Is this possible ? Is there another fix that could do the job properly ?
For the second problem, it seems like I can fix this by forcing to load the stages before the thorlabs spectrometer, which in my case is not very convenient. Is this a known issue ?
Hello,
Thank you for your code. I'm currently using it to make a UI. It appears there is an when using discover_stages() if the stages have already been "discovered", preventing me to use them. Also, when I import and find another Thorlabs instrument such as a spectrometer, a conflict appears again preventing to discover the stages. My fix for now was to write:
basically the idea was just to go around both problems, allowing my code to not work sometimes and forcing me to kill the current kernel and start a new one (using spyder 3). For my first problem, I fell like a fix could be to disconnect the stages. Is this possible ? Is there another fix that could do the job properly ? For the second problem, it seems like I can fix this by forcing to load the stages before the thorlabs spectrometer, which in my case is not very convenient. Is this a known issue ?
Thank you Best regards,
Léo