Leica M205A and MicroManager

Hello all,

I have a M205A stereoscope that I would love to control via Micromanager. I have my digital camera working through the uManager, but I’d love to also gain control of the motorized focus for stacking.

I read a few posts in the archives about the same desire, but I did not see any evidence for a good solution.

One person seemed hopeful, writing:

The answer is probably yes, if you want to control stuff like focus and zoom. Leica uses an ascii based protocol via virtual serial port for this, and they have apparently not changed that protocol for years.

I’d very much enjoy hearing from anybody that has been successful at controlling the focus or zoom function.

Thanks so much!

1 Like

You will have to see if your microscope came with any documentation on how to use an API they may have provided. I haven’t worked with Leica microscopes but I have used Zeiss MTB API which has great documentation. If nothing else works you could use Windows Automation functions to move the focus since you already can control the camera you are one step closer to fully controlling acquisition. Let me know if your microscope came with a .NET API like Zeiss does and I will be able to help. I have made .NET projects which may be of use incase Leica provided a .NET API. GitHub - BiologyTools/BioImager: A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts. and GitHub - BiologyTools/BioCore: Bio Library in .NET6. Bio is a library & program for annotating, & editing various microscopy imaging formats using Bioformats supported images. including whole slide, pyramidal & series.

Thank you for your interest in this problem!

The good news for me is that I’ve been able to control the Leica camera and Marzhauser stage (Blue Oasis controller) using Micro-Manager. This means that I can execute an x-y stitch. The only thing left for me to figure out is control of the Z-axis, for which the motor and controller are integral to the M205A stand. I can control the Z-position using a Leica dial controller and also with the LAS core software but I don’t have the special software module that allows me to execute an automated Z-stack. The perfect solution would be to gain access to the Z-motor using Micro-Manager.

It is unfamiliar territory for me, but I’ll explore whether I can find .NET API information for the M205A.

Thanks again, and best wishes.

1 Like

No I haven’t worked with Micromanager. I’ve worked with Zeiss & Olympus microscopes. Automating both with .NET approach. Which was easier with Zeiss compared to Olympus due to the MTB API being well documented. From my understanding you would have to create a new plugin for micromanager maybe ask this question on image.sc as well since more people view that forum. If you want to automate windows be sure to get inspect.exe which is useful in seeing what elements the program has.

Thanks again Erik. I’ll explore that possibility.

Much appreciated!



I meant to ask…

Is the Windows Automation approach totally independent of Micro-Manager? Or would it work in concert with Micro-Manager?

If you were involved with Micro-Manager, my hat is off to you. It is quite an impressive tool.