Dedicated buttons for Snap, Live and Acquire

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Dedicated buttons for Snap, Live and Acquire

Amit Cherian
Hi,

I would like to link buttons via Arduino to access buttons on micromanager.

Basically have a dedicated button for Live, Snap and Acquire in Multi-D.
Is there a way to access these options in micromanager?

Thanks in advance
Regards
Amit


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dedicated buttons for Snap, Live and Acquire

Nico Stuurman-2
Hi Amit,

> I would like to link buttons via Arduino to access buttons on micromanager.
>
> Basically have a dedicated button for Live, Snap and Acquire in Multi-D.
> Is there a way to access these options in micromanager?

Can you explain a little better what you try to do?  Do you want to have
a physical button (i.e. a button that is not on the computer keyboard,
but somewhere else), that you can press to start live mode, snap an
image, start MD acquisition?  Why not use the keyboard?

Or do you want a certain input signal on your Arduino to trigger any of
these actions?

Best,

Nico



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dedicated buttons for Snap, Live and Acquire

Amit Cherian
Hi Nico,

The idea is to have a dedicated control pad like the one that's there on Leica SP5 confocals.

dedicated infinite rotary encoders or sliders for exposure, gain, laser power etc. depending on how it is mapped.

dedicated push buttons for snap, live and Acquire (Multi-D) or other push buttons depending on how it is mapped.

I think this would be a great tool for anyone who uses micromanager.

Thanks in advance
Amit
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dedicated buttons for Snap, Live and Acquire

JonD
Administrator
Amit Cherian wrote
The idea is to have a dedicated control pad like the one that's there on Leica SP5 confocals.

dedicated infinite rotary encoders or sliders for exposure, gain, laser power etc. depending on how it is mapped.

dedicated push buttons for snap, live and Acquire (Multi-D) or other push buttons depending on how it is mapped.
I have given some thought to creating something similar to what you are describing but haven't done anything with my ideas.  I'd love to see someone run with it, and I'm happy to help as possible.

I was thinking that the behavior of the physical inputs could be mapped to specific actions using the property browser with a properly written device adapter.  Or perhaps a plugin combined with a minimal device adapter would have some advantages, though then it's not usable via Matlab/Python.  I'm not sure if it's possible to call GUI/ScriptInterface methods from a device adapter (e.g. runAcquisition() which is equivalent of running a MDA), but certainly it is possible from a plugin, and it will be easier to access/manipulate a list of all available properties from the Java layer for the mapping you mention.

I started investigating low latency signalling between the hardware and MM.  Serial is universal but generally it takes ~10 milliseconds per transaction (due to OS constraints as far as I can tell) and I'd like faster if easily possible.  I started looking into HID and suspect it will be better but don't have experience with it yet.



Amit Cherian wrote
I think this would be a great tool for anyone who uses micromanager.
I wholeheartedly agree!


Jon

-------------------------------------------
Jon Daniels
Applied Scientific Instrumentation
29391 West Enid Rd, Eugene, OR 97402
Phone: (541) 461-8181 x118
-------------------------------------------
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dedicated buttons for Snap, Live and Acquire

Amit Cherian
Thank you for your response Jon.

Even I feel making a plugin would be the way to go about doing this. Having that being stated, it's going to be my first time working with developing a plugin for micromanager, and I'm already very excited with the whole project.

Since micromanager already allows one to set custom keyboard shortcut, it should be easy to make the snap and live buttons. For this I it would be to a nice idea to re-program a numeric keyboard like the one shown in the image,  and assign a key to have the function of let's say "- + 5", or any such combination that one would never use on a system. This should solve the issue of the Snap and Live.

Challenge comes with mapping a rotary encoder or a slider to increment or decrement the value with respect to the current value.

It'd be great if you can guide me on how to start off with this.

Thanks in advance.
Amit
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dedicated buttons for Snap, Live and Acquire

JonD
Administrator
Amit Cherian wrote
Even I feel making a plugin would be the way to go about doing this. Having that being stated, it's going to be my first time working with developing a plugin for micromanager, and I'm already very excited with the whole project.
I'm not sure if it will be possible without a device adapter.  But certainly there is a design decision to be made of which aspects to implement in a device adapter and which in a plugin.


Amit Cherian wrote
Since micromanager already allows one to set custom keyboard shortcut, it should be easy to make the snap and live buttons. For this I it would be to a nice idea to re-program a numeric keyboard like the one shown in the image... and assign a key to have the function of let's say "- + 5", or any such combination that one would never use on a system. This should solve the issue of the Snap and Live.
So I think you are saying this can be done via keyboard shortcuts without any extra device adapter or plugin.  I've never used the keyboard shortcuts but this seems reasonable.  I suggest you start by implementing this.


Amit Cherian wrote
Challenge comes with mapping a rotary encoder or a slider to increment or decrement the value with respect to the current value.
As you realized this is a fundamentally different task responding to key presses because you need to receive and respond to analog information.  You need the hardware capable of measuring that analog information and transmitting it to Micro-Manager.  There are multiple possible ways of doing both the "measure" and "transmit" tasks and the best path isn't clear to me.  For "measure" you can definitely do things with Arduino or other microcontroller, e.g. an Arduino reading a quadrature rotary encoder.  It is worth considering leveraging an existing input device like a game controller or device like this: http://www.contourdesign.com/US/product/shuttlexpress/.  On the "transmit" side, I'm not sure if it's best to have the hardware streaming the values or or just have Micro-Manager (either plugin or device adapter) poll the hardware for the latest value on some regular interval, and the cleanest solution may depend on the "measure" path taken.

Once Micro-Manager is receiving analog information from the physical input device it can call SetProperty() of whatever property has been paired with the input device.  This pairing would be set up either using a property in the device adapter or as a drop-down in the Java plugin.

Jon

-------------------------------------------
Jon Daniels
Applied Scientific Instrumentation
29391 West Enid Rd, Eugene, OR 97402
Phone: (541) 461-8181 x118
-------------------------------------------
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dedicated buttons for Snap, Live and Acquire

Amit Cherian
I was able to reprogram a standard keyboard to have a macro assigned with the help of the following tutorial.

https://github.com/TaranVH/2nd-keyboard/tree/master/Intercept
and it's corresponding video at https://www.youtube.com/watch?v=y3e_ri-vOIo 

Now it's time to hook it up to micromanager and see what can be done.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dedicated buttons for Snap, Live and Acquire

Nico Stuurman-2
Hi Amit,


On 6/20/2017 2:27 PM, Amit Cherian wrote:
> I was able to reprogram a standard keyboard to have a macro assigned with the
> help of the following tutorial.
>
> https://github.com/TaranVH/2nd-keyboard/tree/master/Intercept
> and it's corresponding video at https://www.youtube.com/watch?v=y3e_ri-vOIo

Why not use the shortcut feature in Micro-Manager?  Seems a lot easier.

Best

Nico


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dedicated buttons for Snap, Live and Acquire

Amit Cherian
Yes, Nico. The time taken to re-program a keyboard is not worth it when looking into the hotkey scripting capabilities that micromanager offers. I'd rather spend that time learning to script in micromanager.

If you could guide me how to do multi key shortcuts, I see that the hotkey allows only a single key.

This should solve all the button expressions.

Now configuring sliders or POTs for parameters like laser power, exposure, gain etc. is the next challenge.

Loading...