-
Notifications
You must be signed in to change notification settings - Fork 42
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
ASI controller stage settings #289
Comments
I looked into this and there are a few issues involved. My testing was lousy. 1- The getter and setter functions were not taking into account the return values where readonly. This is fixed. 2- The answers provided by the controller are not consistent. The "standard" answer for a getter is
3- Looking again to the return of the INFO command in @iandobbie controller I realized that the order of the command and the units is reversed compared to my controller.
I tested on the remote with controller = asi.ASIMS2000("/dev/ttyUSB0", baudrate=115200, timeout=0.5)
s = controller.devices["stage"]
for n, v in s.get_all_settings().items():
assert s.get_setting(n) == v
if not s.describe_setting(n)["readonly"]:
s.set_setting(n, v) And there are still some issues with settings where the getters return something different than what the setters take. But all otherwise good. Can you test this from my branch? https://github.com/juliomateoslangerak/microscope/tree/ASI_controller |
I added an optional I push all of this to master. |
This is also an option :o) |
Yes, but the system is actually running with an ancient version of slidebook and I don't want to brake the running TIRF setup, sorry. |
I don't think this parameter is optional. I think we need to test if lights exists as this generated an error until I added lights=[] to the setup call. With this if you call get_number_leds() it errors as the led_mapper doesn't exist. Just a bit of error checking needed I think, I will have a play and try and suggest a fix. |
No. It’s not optional. In fact I get it through kwargs, which is probably not a good idea. Anyway, in the last commit i avoid this error you mention and you don’t have to provide an empty list of lights. |
Rather than a try except why not switch on if learns.has_key(‘lights’)?
We should also do the same for the stage parameter as we could easily have a controller that does light and/or other hardware but not a stage.
Ian
Sent from my iPhone
On 3 Nov 2023, at 15:33, Julio Mateos Langerak ***@***.***> wrote:
No. It’s not optional. In fact I get it through kwargs, which is probably not a good idea. Anyway, in the last commit i avoid this error you mention and you don’t have to provide an empty list of lights.
—
Reply to this email directly, view it on GitHub<#289 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABJTBBKOVQMX4FU5PE6SON3YCVBJRAVCNFSM6AAAAAA6TJDBHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJSHE4TEMBXGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
As I said I am reluctant, but can I just give a big shout out to a company which gives you explicit instructions on how you can update the firmware on their hardware. Big congrats to ASI! |
So with the updated info where we are now reading the info output most of this isnt working on my MS200 (very old). If I connect to cockpit, grab the device and call get_all_settings:
This geenrate a flod of errors in microscope.....
And returns a basically empty settings dict...
Both outputs are truncated...
The text was updated successfully, but these errors were encountered: