User Tools

Site Tools


ringtirf

This is an old revision of the document!


ASI Ring TIRF Control

The ASI Ring TIRF Control plugin is used to control a Ring TIRF microscope using ASI hardware.

This plugin comes with the latest nightly build of Micro-Manager 2.0 as of November 2022.

Requirements:

  • Micro-Manager 2.0
  • Tiger Controller
  • PLogic card to trigger the camera on BNC1
  • ASI Scanner with the FAST_CIRCLES module

If your camera or laser is not supported in the plugin yet, but has a Micro-Manager Device Adapter, you can use the acquisition scripts to setup your hardware manually. Please contact ASI and we can integrate your hardware into the plugin if it has a Micro-Manager Device Adapter.

Acquisition Scripts

You can write Beanshell scripts that fire before and after an acquisition. You can write a script that turns the laser on, and one that turns the laser off. You can send serial commands through Beanshell, which can help you get around a lack of device adapter support. If there is a device adapter you can use mmc.setProperty() to setup your hardware.

Because Beanshell scripts run independently of the acquisition thread, after the startup script is run, the acquisition thread sleeps for the user specified delay in milliseconds to ensure that it can make it to the end of the script before starting the acquisition. You can see an example of measuring the script execution time in the serial command example.

Example Beanshell Scripts
Here's an example of setting up a laser when the device adapter exists in Micro-Manager.

String deviceName = "iChrome-MLE";
String laserEnableProperty = "Laser 3: 1. Enable";
String laserEmissionProperty = "Laser 3: 2. Emission";
String laserLevelProperty = "Laser 3: 3. Level %";

// set device properties
mmc.setProperty(deviceName, laserEnableProperty, 1);
mmc.setProperty(deviceName, laserEmissionProperty, 1);
mmc.setProperty(deviceName, laserLevelProperty, 5); // turn down laser intensity

And here's how you would shutdown the laser:

String deviceName = "iChrome-MLE";
String laserEnableProperty = "Laser 3: 1. Enable";
mmc.setProperty(deviceName, laserEnableProperty, 0);

Example Beanshell Serial Commands
This is a generic way to open a serial port to communicate with a device that doesn't have a Micro-Manager Device Adapter.

// measure script execution time
start = System.currentTimeMillis();

// port settings
String comPort = "COM5";
int baudRate = 115200;
String sendTerm = "\r\n";
String answerTerm = "\r\n";
String deviceName = "SerialPort";

// unload the device if already loaded to the prevent this error =>
// "The specified device label "SerialPort" is already in use"
String[] devices = mmc.getLoadedDevices().toArray();
for (String device : devices) {
	if (device.equals(deviceName)) {
		 mmc.unloadDevice(deviceName);
	}
}

// serial port setup
mmc.loadDevice(deviceName, "SerialManager", comPort);
mmc.setProperty(deviceName, "BaudRate", baudRate);
mmc.setProperty(deviceName, "StopBits", "1");
mmc.setProperty(deviceName, "DataBits", "8");
mmc.setProperty(deviceName, "Parity", "None");
mmc.initializeDevice(deviceName);

// send the serial commmand and get the response
mmc.setSerialPortCommand(deviceName, "who", sendTerm);
String response = mmc.getSerialPortAnswer(deviceName, answerTerm);
mm.scripter().message(response);

// make sure to unload the device when done
mmc.unloadDevice(deviceName);

// report elapsed time
end = System.currentTimeMillis();
mm.scripter().message("Execution Time: " + (end-start) + " ms");


MDA - Multi-Dimensional Acquisition Window

You can use the MDA window with the Ring TIRF plugin. To run an acquisition using the camera's external trigger, check the Time Points box, and set the Interval to 0 ms. Here's an image to help you find the controls in the MDA window:

Steps:

  1. Set the exposure time in Micro-Manager
  2. Press the Set Fast Circles Hz button
  3. Press the Beam On button
  4. Press the Fast Circles On button
  5. Setup MDA time points and click Acquire!

Fast Circles Radius Calibration

You can run an acquisition to test various fast circles radius parameters. Calibration start is the starting fast circles radius, calibration increment is how much the radius increases per image, and calibration images is the number of images to take. Once you decide on the settings, press the Calibrate System button to start the routine.

Scanner Tab

Scanner Control

Fast Circles Asymmetry: set the scanner “FastCirclesAsymmetry” property and then set “FastCirclesState” to “Restart”.

Fast Circles Radius: set the scanner “FastCirclesRadius(deg)” property and then set “FastCirclesState” to “Restart”.

Number of Circles: set the number of circles and then set “FastCirclesState” to “Restart”.

Beam On: toggle the scanner “BeamEnabled” property between “On” and “Off”.
Updates the scanner H and I position spinner controls when pressed.
Enable or disable the scanner beam.

Fast Circles On: toggle the scanner “FastCirclesState” property between “On” and “Off”.
Enable or disable the fast circles mode.

Set Fast Circles Hz: set the scanner “FastCirclesRate(Hz)” property to the following value and then set “FastCirclesState” to “Restart”.
FastCirclesRate(Hz) ⇒ (1.0 / Camera Exposure) * (1000 * Number of Circles).
Computes the fast circles rate in hertz based on the camera exposure.

Scanner H: the scanner beam H axis position.

Scanner I: the scanner beam I axis position.

Fast Circles Radius Calibration

Calibration Images: the number of images to take at different fast circles radius values during the calibration test.

Calibration Start: set the starting value for the fast circles radius in the calibration test.

Calibration Increment: the amount to increment the fast circles radius with each image taken in the calibration test.

Calibrate System: pressing this button starts the calibration test.

Other

Save to Flash: save the scanner settings, this is equivalent to setting the “SaveCardSettings” property to “save settings done” in the Device Property Browser.

Datastore Tab

Datastore

Number of Images: the number of images to capture during an acquisition.

Save Format: the type of Datastore created is determined by the save format.

Save Directory: the directory to save the image data.

Save File Name: the name of the save file.

Acquisition Scripts

Startup Script: the Beanshell script that runs before an acquisition, the check box must be checked for the script to run.

Shutdown Script: the Beanshell script that runs after an acquisition, the check box must be checked for the script to run.

Script Delay [ms}: the time in milliseconds to delay after running the startup script

Main Window

Start Acquisition: start an acquisition using the plugin settings.

  1. Setup
    1. Run the startup Beanshell script and wait for the startup script delay in milliseconds (start laser)
    2. Set the camera trigger mode to external
    3. Set the scanner “BeamEnabled” property to “On”
    4. Set the scanner “FastCirclesRate(Hz)” property to (1.0 / Camera Exposure) * (1000 * Number of Circles)
    5. Set the scanner “FastCirclesState” to “Restart”.
  2. Run Acquisition
    1. Acquire (“Number of Images” on Datastore tab) images
  3. Finish
    1. Set the scanner “FastCirclesState” to “Off”.
    2. Set the scanner “BeamEnabled” property to “Off”
    3. Set the camera trigger mode to internal
    4. Run the shutdown Beanshell script (turn off laser)

Live: use the camera for live mode.

Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
ringtirf.1706225738.txt.gz · Last modified: by brandon