MATLAB code to readout a preset condition from cfg file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MATLAB code to readout a preset condition from cfg file

Shun Ohsima
Hello everyone, I’m Shun Ohsima, a student at Kogakuin University in
Japan. Thanks to your helpful response in this mailing list, previously
I could solve a problem on control of a 4 wavelength LED light source (
LED4D014, 365/455/590/660 nm, output current: 0~1200 mA, Thorlabs) to
observe fluorescent cells by using Micro-Manager.

Today I’d like to ask you about control of the LED light source by using
Micro-Manager through MATLAB environment.

Now, I can select an output condition (wavelength and output current,
here “455 nm_500 mA” ) of the LED light source from the list of
conditions (“455 nm_500 mA”, “590 nm_100 mA”) by using Micro-manager
script shown in here (time for illumination is ignored here).



============================================================

String channelGroup = "LED";

String[] light_channel = {"455 nm_500 mA", "590 nm_100 mA"}; //Two
different condition "455 nm_500 mA" and "590 nm_100 mA" are preset in
configuration settings of Micro-manager in advance and they are stored
into light_channel array [0], and [1] respectively

mmc.setConfig(channelGroup, light_channel[0]); //Select light_channel
array [0]

mmc.setShutterOpen(true); //Turn LED on with the condition "455 nm_500
mA"

mmc.setShutterOpen(false); //Turn LED off

mmc.setConfig(channelGroup, light_channel[1]);

mmc.setShutterOpen(true);

mmc.setShutterOpen(false);

============================================================



At the moment, although I can do only “on-off” control of the LED light
source with a single condition (e.g. 455 nm_500 mA that preset in the
LED light source controller itself) with following MATLAB code, I cannot
select condition from preset conditions in configuration settings of
Micro-manager.



============================================================

mmc = CMMCore;

mmc.loadSystemConfiguration('C:\Users\LIVA\Desktop\micromanager\MMConfig
_LED.cfg');

%Readout of LED configuration written in MMConfig_LED.cfg in Micro-
Manager.

mmc.setShutterOpen(true);

mmc.setShutterOpen(false);

============================================================



I suppose that preset conditions are stored in “\MMConfig_LED.cfg”,
however I don’t know the MATLAB code to readout (select) a condition
from the stored list of conditions.

Could you tell me the MATLAB code to readout the condition stored in “\
MMConfig_LED.cfg” ?



Sincerely yours



Shun

Shun Oshima
Department of Mechanical Systems Engineering, Faculty of Engineering, Kogakuin University
E-Mail:[hidden email]

_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: MATLAB code to readout a preset condition from cfg file

nanthony
Hi Shun,

I'm not sure that I correctly understand what you are looking for.
As you show in your first example, the mmc.setConfig() function can be used
to select a preset.

If you look at the "Configuration Groups" section of the CMMCore
documentation:
https://valelab4.ucsf.edu/~MM/doc/MMCore/html/class_c_m_m_core.html

you will see that there are a number of other useful configuration related
functions such as getAvailableConfigGroups () and getAvailableConfigs()
which allow you to get information about the available configurations.

Hope that helps,
  Nick



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general