This repository contains LabVIEW code to control the cellfree2
microchemostat setup at LBNC-EPFL. The setup consists of three modules:
- Nikon Ti2 Eclipse microscope with motorised XYZ-stage
- Hamamatsu Orca-Flash4.0 digital CMOS camera
- Electric solenoid valves for actuating microfluidic control lines, connected to a relay board
The code is likewise divided into modules for independently controlling the microscope stage, image acquisition, and solenoid valves. Interfacing with the Ti2 microscope is done using a Matlab--Micro-Manager layer. The VI allows for automated time-lapse imaging, pumping, mixing, and programmable dilution of the microchemostat chip described in Niederholtmeyer et al. 2013 and Niederholtmeyer et al. 2015.
The setup has been tested with the following software:
- LabVIEW 2018 Version 18.0f2 (64-bit)
- Matlab R2018b 64-bit
- Micro-Manager V2.0beta3 build 20190201 - V2.0 or higher is required.
- Nikon Ti2 Control version 2.10.70, 64-bit - Windows drivers for Nikon Ti2
- Hamamatsu DCAM-API 19.1.5703 - Windows drivers for Hamamatsu camera
- Hamamatsu HVC_4418 Video Capture library - LabVIEW interface to Hamamatsu camera
- Windows 10
First install the required software. LabVIEW and Matlab are used to control the setup. The microscope requires Micro-Manager as well as Nikon Ti2 Control. The camera requires the DCAM-API drivers and the HVC_4418 LabVIEW interface.
- Test the microscope connection using Ti2 Control: there should be no errors.
- Copy the library
Ti2_Mic_Driver.dll
, installed by Ti2 Control, to the main Micro-Manager folder. - Run Micro-Manager, add the microscope and generate a cfg file. Further instructions are found on the Micro-Manager website.
- Add the location of Micro-Manager's dlls to a new Windows path variable. To do this, go to
Start->Settings->Control Panel->System->Advanced->Environment Variables
. Make a new user variable namedPATH
and set it to the location of Micro-Manager (for example, C:\Program Files\Micro-Manager-2.0beta).
- In Matlab run command
edit([prefdir '/javaclasspath.txt']);
to first create, then edit javapaths for Matlab. Add the following paths to thejavaclasspath.txt
file (actual paths will depend on your setup):
C:\Program Files\Micro-Manager-2.0beta\ij.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\MMAcqEngine.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\MMCoreJ.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\MMJ_.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\clojure.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\bsh-2.0b4.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\swingx-0.9.5.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\swing-layout-1.0.4.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\commons-math-2.0.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\ome-xml.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\scifio.jar
C:\Program Files\Micro-Manager-2.0beta\plugins\Micro-Manager\guava-17.0.jar
- Run command
edit librarypath.txt
and add the following path:
C:\Program Files\Micro-Manager-2.0beta
- Add the location of Micro-Manager's dlls to a new Windows path variable:
(Start->Settings->Control Panel->System->Advanced->Environment Variables
, make a new 'User variable for Administrator' namedPATH
and set it to the location of Micro-Manager (for instance: C:\Program Files\Micro-Manager-2.0beta). - Matlab should now be able to access the Micro-Manager MMCore library. Run the following to import MMCore, load a configuration, and shut down the microscope:
import mmcorej.*;
mmc=CMMCore;
mmc.loadSystemConfiguration('C:\Program Files\Micro-Manager-2.0beta\TI2_V1.cfg');
mmc.unloadAllDevices()
The system configuration path should point to the cfg file you generated when first setting up the microscope. An example cfg file and matlab test script showing some basic commands can be found in the /matlab/
subfolder of this repository.
More information for this step can be found on the Micro-Manager's Matlab configuration description.
- Open up the main VI
NikonTI2_Hama_valves_V1.vi
. Check that the Hamamatsu LabVIEW interface has installed correctly. There are then two links which must be made. - Set the name of the USB-serial interface to the valves' relay board (default value is
COM4
but this will change depending on the individual machine). - Set the path to the Micro-Manager cfg file in the
matlab_TI2_init.vi
subVI.
Typically, the Windows path variable (Step 2) and the javaclasspath (Step 3) must be set for every individual user on a machine.