Control a Zeiss Axio Imager from Python

Discuss macros to control the hardware functions of your ZEISS microscope
Jo Bas
Posts: 2
Joined: Tue Jul 19, 2022 7:27 am

Control a Zeiss Axio Imager from Python

Post by Jo Bas »

Hello,

I would like to control a Axio Imager M2M microscope from Python.

Is it possible to call just the ZEN Blue DLL and not have the ZEN Software graphical user interface window open? We would like to not have the ZEN software graphical user interface open.

Let's say I just plug the Zeiss Axio Imager M2M in "USB" to a computer.
Would someone have just a simple .py file example showing how to change one thing on the microscope, for example change the focus? (I don't need the image itself for now, only control the focus).

Thank you in advance for your help.

PS: can we do an automatic device selection in the Python code, or do we need to configure the microscope device in another software before? (which one?)
CarlZeissMicroscopy3
Posts: 180
Joined: Wed May 20, 2020 10:10 am

Re: Control a Zeiss Axio Imager from Python

Post by CarlZeissMicroscopy3 »

Hello Jo Bas,

Is it possible to call just the ZEN Blue DLL

No, absolutely not, as quite a lot of 'initialization' is happening when Zen blue starts. Without this startup procedure you will not get a working ‘environment’.
In addition, you are not allowed to use the DLLs coming with Zen in another software. If you do it anyway you will be confronted with more than 2000 classes that work ‘somehow’ together. Unless you want to apply for a programmer’s job at Zeiss, don’t do it ;-)

Let's say I just plug the Zeiss Microscope in "USB" to a computer.

Sorry, you will have to buy the Open Application Development (OAD) to develop applications. There is no way around the ‘Simple Interface’ that is covered by OAD.

Would someone have just a simple .py file example showing how to change one thing on the microscope, for example change the focus

Included in OAD are interfaces to Zen which can be used via TCP or COM. Then you can use a .py file to build up the ‘connect to Zen’ and e.g., change the focus.

You can also search for 'interface' in this forum to get other contributions ...
Jo Bas
Posts: 2
Joined: Tue Jul 19, 2022 7:27 am

Re: Control a Zeiss Axio Imager from Python

Post by Jo Bas »

Thank you for your answer.

> Sorry, you will have to buy the Open Application Development (OAD) to develop applications. There is no way around the ‘Simple Interface’ that is covered by OAD.

The OAD you are speaking about, is it this link: https://github.com/zeiss-microscopy/OAD ? (this one seems free open source - GPL). Or is there another version that we need to buy?

> Included in OAD are interfaces to Zen which can be used via TCP or COM. Then you can use a .py file to build up the ‘connect to Zen’ and e.g., change the focus.


Are you speaking about "RunZenfromPython.py" from https://github.com/zeiss-microscopy/OAD ... COM_Python?

I tried this one, but since we have "ZEN Core" and not "ZEN Blue", it did not seem to work.

Can we use it with ZEN Core?

If not, should we install ZEN Blue additionnally to ZEN Core?


PS: would you also recommend to use MTB 2011 Micro Toolbox?

PS2: is there a phone number I can call? (Sometimes a 5-minute phone-call can save hours of emailing... By the way we are buying new Zeiss microscopes these days so it is still supported)

PS3:

> Unless you want to apply for a programmer’s job at Zeiss, don’t do it ;-)

One day maybe ;-)
CarlZeissMicroscopy3
Posts: 180
Joined: Wed May 20, 2020 10:10 am

Re: Control a Zeiss Axio Imager from Python

Post by CarlZeissMicroscopy3 »

Hello Jo Bas,

The OAD you are speaking about, is it this link: https://github.com/zeiss-microscopy/OAD ?
Yes, but this is a bit more than what we are talking about!

this one seems free open source - GPL
Yes, it seems, but in fact it is not really!

What you will need is the OAD Macro Environment, see attachment!
You can buy this as a module for Zen blue and Zen Core (with some restrictions).
Please keep in mind, that you just can access e.g. the Analysis module via OAD if you have a license for that.

All the other features of the page mentioned above are partly free, but mostly not for commercial usage, or show separate modules that you have to buy like 'experiment feedback'.

Please be aware that the COM interface and the TCP interface are only supported by Zen blue!
In other words, if you want to automate Zen as a 'server' coming from another software, being the ‘client’, then Zen blue is in the (only) choice.

Hope this helps ...
Attachments
OAD Maco.png
OAD Maco.png (289.34 KiB) Viewed 3238 times
Mira Sherronm
Posts: 2
Joined: Wed Feb 15, 2023 4:33 am

Re: Control a Zeiss Axio Imager from Python

Post by Mira Sherronm »

Summer Tonkin wrote: Thu Feb 09, 2023 4:54 pm After the changes are made, you can save the file as a new holistic family doctor near me word wipe

file or overwrite the original. It is recommended to always make a backup of important files before making changes.
Thank you for reminding me, I have been careless many times and forgot to restore the data
gemma lyly
Posts: 1
Joined: Wed Mar 15, 2023 5:29 am

Re: Control a Zeiss Axio Imager from Python

Post by gemma lyly »

These are just some basic examples to get you started. The ZEN SDK provides a wide range of functions and tools for controlling your microscope,
contexto
JerryRomero JerryRomero
Posts: 1
Joined: Thu Mar 23, 2023 4:44 pm

Re: Control a Zeiss Axio Imager from Python

Post by JerryRomero JerryRomero »

In my opinion these are just some basic examples to get you started. ZEN SDK provides many functions and tools to control your microscope, and I just found a website where everything is free to download, most of the software and tools in All of them support the job market, you can access it to find out the information you need
Danial Bunkla
Posts: 2
Joined: Sun Apr 02, 2023 6:54 pm

Re: Control a Zeiss Axio Imager from Python

Post by Danial Bunkla »

Summer Tonkin wrote: Thu Feb 09, 2023 4:54 pm After the changes are made, you can save the file as a new positive s words

file or overwrite the original. It is recommended to always make a backup of important files before making change if you come across the 1551 angel number.
So, I made a backup on my SD card. However, when I inserted it into my laptop, it said I had to reboot the card..but there are all the files that I needed! Any idea what to do? How can I download the full backup? Also, what does the number 1551 mean that you have mentioned?
Bekean Loinse
Posts: 2
Joined: Mon Apr 03, 2023 8:57 am

Re: Control a Zeiss Axio Imager from Python

Post by Bekean Loinse »

Check if the microscope has a software subway surfers development kit (SDK) or an application programming interface (API) that provides a way to control it programmatically. If it does, obtain the SDK or API documentation and familiarize yourself with its capabilities and limitations.
David Brown
Posts: 1
Joined: Wed May 10, 2023 7:21 am

Re: Control a Zeiss Axio Imager from Python

Post by David Brown »

These are, in my perspective drift hunters, simply some simple examples to get you going.
Post Reply