Table of Contents
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 onBNC1
orBNC8
ASI Scanner
with theFAST_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
.
Plugin Startup
When the plugin is first opened a dialog box will ask you to send settings to the PLogic card, click “Yes”
to call the method that sets up the PLogic card with the correct settings to trigger the camera on the output BNC connector.
There is a button on the scanner tab to send the PLogic program settings in case you click “No”
.
This method sets the PLogic device “TriggerSource”
property to “1 - Micro-mirror card”
to synchronize with the scanner.
Devices are set in the Device Property Browser
, set these properties before opening the plugin:
“Core-Galvo”
⇒ Scanner“Core-Shutter”
⇒ PLogic
The camera trigger output BNC is determined by the “PLogicMode”
preinitialization property:
PLogicMode Property | Output BNC |
---|---|
“diSPIM Shutter” | BNC1 |
“Four-channel shutter” | BNC1 |
“Seven-channel shutter” | BNC8 |
“Seven-channel TTL shutter” | BNC8 |
Operation
The scanner sweeps the laser beam in a circle around the sample at a fixed rate in hertz.
The PLogic device listens to the scanner and outputs a TTL pulse at the completion of each circle.
The “FastCirclesRate(Hz)”
property needs to be set to the correct value based on the camera exposure.
The scanner laser beam should sweep through a single circle for each camera exposure period in milliseconds.
Convert from milliseconds to hertz, the expression (1 / Camera Exposure) * 1000
computes the correct “FastCirclesRate(Hz)”
.
For example, if we use an exposure of 20 milliseconds, we need to determine how many circles per second: (1 / 20 ms) * 1000 = 50 Hz
.
There is one missing variable: “Number of Circles”; this is used to sweep multiple circles around the sample per camera exposure period.
This changes the computation to: (1 / Camera Exposure) * (1000 * Number of Circles)
.
Note: increasing “Number of Circles” will also increase the number of TTL pulses per camera exposure period. Only true for firmware < 3.51, new firmware will emit a single TTL pulse.
Acquisition Scripts
You can write Beanshell scripts that run 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:
- Set the
exposure time
in Micro-Manager - Press the
Set Fast Circles Hz
button - Press the
Beam On
button - Press the
Fast Circles On
button - 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.
- Setup
- Set the camera trigger mode to
external
- Set the scanner
“BeamEnabled”
property to“On”
- Set the scanner
“FastCirclesRate(Hz)”
property to(1 / exposure) * 1000
- Set the scanner
“FastCirclesState”
to“Restart”
.
- Calibration Loop
- Increase scanner
“FastCirclesRadius(deg)”
by calibration increment - Set the scanner
“FastCirclesState”
to“On”
. - Snap image with imaging camera
- Set the scanner
“FastCirclesState”
to“Off”
.
- Finish
- Set the scanner
“FastCirclesState”
to“Off”
. - Set the scanner
“BeamEnabled”
property to“Off”
- Set the camera trigger mode to
internal
- Restore the original
“FastCirclesRadius(deg)”
value
Plugin Interface
Scanner Tab
Scanner Control
Fast Circles Asymmetry: set the scanner “FastCirclesAsymmetry”
property and then set “FastCirclesState”
to “Restart”
.
Reduces the circularity of the scanner beam. The default value is 1.
Fast Circles Radius: set the scanner “FastCirclesRadius(deg)”
property and then set “FastCirclesState”
to “Restart”
.
This value is set in degrees.
Number of Circles: set the number of circles per camera exposure period and then set “FastCirclesState”
to “Restart”
.
Only used if you want to sweep multiple circles of the scanner beam around the sample per camera exposure period.
The default value is 1.
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 fast circles mode. Toggles between circular and standard scanner beam.
Set Fast Circles Hz: set the scanner “FastCirclesRate(Hz)”
property to the following value and then set “FastCirclesState”
to “Restart”
.
FastCirclesRate(Hz) ⇒ (1 / 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, changing this value performs an absolute move.
Scanner I: the scanner beam I axis position, changing this value performs an absolute move.
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 Settings 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.
- Setup
- Run the startup Beanshell script and wait for the startup script delay in milliseconds (start laser)
- Set the camera trigger mode to
external
- Set the scanner
“BeamEnabled”
property to“On”
- Set the scanner
“FastCirclesRate(Hz)”
property to(1 / Camera Exposure) * (1000 * Number of Circles)
- Set the scanner
“FastCirclesState”
to“Restart”
.
- Run Acquisition
- Acquire (“Number of Images” on
Datastore
tab) images
- Finish
- Set the scanner
“FastCirclesState”
to“Off”
. - Set the scanner
“BeamEnabled”
property to“Off”
- Set the camera trigger mode to
internal
- Run the shutdown Beanshell script (turn off laser)
Live: use the camera for live mode.