Laser control via script

Hello,

I would like to ask for help regarding laser control via script. I have Micro-Manager 2.0 gamma.
In my optical setup, I have got two lasers, blue one and red one. Each time I want to control, just one laser. Both lasers are Cobolt 06-01 and are built in C-FLEX. Everything looks compatible and works well when it is controlled manually.
I am just wondering why is the laser marked as shutter (but it is might not important).

I am able to select the wanted laser via:
mmc.setProperty(“Core”, “Shutter”, “Cobolt red Laser”);

Following commands works as well (start/stop Emission):
mmc.setShutterOpen(true);
mmc.setShutterOpen(false);

BUT I am not able to set Power of laser or find out the current Power. I have tried following commands but any of then did not work:
mmc.getProperty(“Cobolt red Laser”,“Power”);
mmc.setProperty(“Cobolt red Laser”,“Power”);

or
mmc.getProperty(“Cobolt red Laser”,“Power Setpoint [mW]”);
mmc.setProperty(“Cobolt red Laser”,“Power Setpoint [mW]”);

even
mmc.getProperty(“Cobolt red Laser”,“Cobolt red Laser-12-Power Setpoint [mW]”);
mmc.setProperty(“Cobolt red Laser”,“Cobolt red Laser-12-Power Setpoint [mW]”);

I am attaching a picture as a view to the Property Name in my Hardware configuration.
I tried to be inspired here as well but it didn’t solve my problem: GUI panel for Cobolt laser control - Micro-Manager.

Please, how should look like the correct commands, which find out the power value and to set the new power in my case?

Thank You very much!
Best regards,

Jiri

I am just wondering why is the laser marked as shutter (but it is might not important).

The software device interface of Micro-Manager knows about a couple of device types. The “abstract” device that switches a light source on and off was called “Shutter”. So, indeed not very important (and it is really difficult to name things well!).

mmc.getProperty(“Cobolt red Laser”,“Power Setpoint [mW]”);

Try:

mmc.getProperty(“Cobolt red Laser”,“12-Power Setpoint [mW]”);
mmc.setProperty(“Cobolt red Laser”,“12-Power Setpoint [mW]”, "5.0");

I do not know why, but the author of the Cobolt device adapter decided to number the properties. Those numbers are part of the name of the property. It is even possible that there is a space at the end of "red Laser “, and the beginning of " 12-Po”. Hard to tell from the picture, but compare with other devices.

1 Like

At first, I couldn’t figure out if this was my Cobolt driver or the “official” one, and then I saw the numbers. Not my driver. :wink:

… As nico wrote, those need to be included, and any white spaces…

1 Like

Correct is “12-Power Setpoint [mW]” without space :slight_smile:

Thank You!
Jiri