% MatLab 2012a script for Micro-Manager & LC device control The following MatLab script provides an example of controlling (setting & reading) properties available via the device adapter interface. jar at the end, for instance:Ĭ:/Micro-Manager-1.4/plugins/Micro-Manager/MMCoreJ.jarĬ:/Micro-Manager-1.4/plugins/Micro-Manager/MMJ_.jarĬ:/Micro-Manager-1.4/plugins/Micro-Manager/Ĭ:/Micro-Manager-1.4/plugins/Micro-Manager/swingx-0.9.5.jarĪdd the location of the dll files, for instance: dll files) to the windows PATH enviromental variable (Start->Settings->Control Panel->System->Advanced->Environment Variables, make a new 'User variable for Administrator named 'PATH' and set it to the location of Micro-Manager (for instance: C:/Micro-Manager-1.4).Īdd the location of the jar file you just installed (its in the Micro-Manager folder), include the.
#Matlab 2012 java drivers#
Save this configuration file to 'C:\Micro-Manager1.4\MM_GenericLC_demo.cfg' and exit Micro-ManagerĪdd the path with the drivers (all the. Please note some LC hardware may only work under centain OS supported by their device driver. Any MatLab script developed using the GenericLC device adapter is applicable to actual device adapters.
#Matlab 2012 java software#
For this tutorial we use the GenericLC (demo) device adapter which is included in the OpenPolScope software installer. Install Micro-Manager in a path without any spaces (for instance: C:\Micro-Manager-1.4). After setting up the Java environment as described above, MMCoreJ.jar must be added to Matlab Java class path and the directory for the MMCore dynamic libraries (including MMCoreJ_wrap) must be added to the system path. MMCore can be used in Matlab through its Java interface. On Windows, the native library file is MMCoreJ_wrap.dll and it must reside either in the system path or in the current working directory of the program in order to be detected by the Java run-time. Default locations and exact names of libraries are platform dependent. This library must be visible to the Java run-time. When CMMCore Java object is first created in the calling program it will automatically attempt to load native library MMCoreJ_wrap. Any Java program (including Matlab) that wants to use the Micro-Manager API needs to put MMCoreJ.jar in its ClassPath. The Micro-Manager Core Java API is contained in the file MMCoreJ.jar. Matlab has an extensive Java support which makes things easy and support Windows, Mac and Linux, just do the following: The following was tested using MM of version 1.4.5 with MatLab 2012a.