Trouble while using micro-manager to control camera

I have a blackfly S camera and I want to use micromanager to control it. My goal is let it take a photo after my Ti2 microscope finishes moving xyz stage and objective automatically. Actually I can use micromanager’s interface to take photos with this camera manually, all configuration is good.
According to the suggestion on micromanager website, I used core.snapImage() to capture image with java code. But it didn’t work----in project, it has been run but nothing happened. I wonder whether I lost some important setups. Is there any example about how to use core.snapImage().

This sounds like the “Snap On Move” plugin (Plugins > Beta > Snap On Move Preview). Does that fill your needs?

The core.snapImage() function is a low level function that will start camera exposure and do nothing else. It always should be followed by a core.getImage() function (or core.getTaggedImage()). You probably are more interested in the high level API, where mm.live().snap(true), will snap an image and display it. For an introduction to scripting with Micro-Manager, see I2K-MM

yes, I want to achieve the function to take a photo and store it with customized name. mm.live().snap(true) may be good one, but once I used mm, the idea can not resolve it. What statement should import first?

The process we want to use java code to do is that
1> move xy stage;
2>change the objective;
3>move z piezo to focus
4>take one photo and store it with a name
Then repeat 1>-4> on next spot. Now 1>-3> is achieved by “core.setproperty”, I met problems on 4>

For my camera, I can not set the property of its trigger activation. just shown in the picture

Try it in the Beanshell environment included in Micro-Manager ( Tools > Script Panel…).

I guess you meant to write IDE (Integrated Development Environment)? mm is an instance (that you get for free in the Script Panel) of org.micromanager.Studio. How to create your own instance depends on the environment your code is running in. How did you get the core instance?