Re: [micro-manager-general] Matlab Configuration - CMMCore Object
Status: Beta
Brought to you by:
nicost
|
From: Kiana Go <gok...@be...> - 2018-07-13 00:04:05
|
Hi Kyle,
So I finally ran the code in Matlab. However, I am getting the following
error:
>>import mmcorej.*;
>> mmc= CMMCore;
>> mmc.loadDevice("Port", "SerialManager", "COM5");
>> mmc.initializeDevice("Port");
>> mmc.loadDevice("ZStage", "Prior", "ZStage");
*>> mmc.initializeDevice("ZStage");*
Java exception occurred:
java.lang.Exception: Error in device "ZStage": Serial command failed. Is
the device connected
to the serial port? (14)
at mmcorej.MMCoreJJNI.CMMCore_initializeDevice(Native Method)
at mmcorej.CMMCore.initializeDevice(CMMCore.java:305)
*>> mmc.setPosition("ZStage", 10);*
Java exception occurred:
java.lang.Exception: Error in device "ZStage": Unknown error in the device
(1)
at mmcorej.MMCoreJJNI.CMMCore_setPosition__SWIG_0(Native Method)
at mmcorej.CMMCore.setPosition(CMMCore.java:1161)
The ZStage is connected to serial port COM5. The ZStage also works fine
through Micro-Manager and its own software controller. Thus, it is
connected. There seems to be a problem with matlab's interface with
Micro-Manager to recognize and configure the ZStage.
For reference, I am using Prior's ZStage. I am also using the ProScan
III controller. Not sure why the ZStage will not initialize and move when
given the appropriate methods.
Any help would be genuinely appreciated!
Much Appreciated,
Kiana
On Thu, Jul 12, 2018 at 5:02 PM, Kiana Go <gok...@be...> wrote:
> Hi Kyle,
>
> So I finally ran the code in Matlab. However, I am getting the
> following error:
>
> >>import mmcorej.*;
> >> mmc= CMMCore;
> >> mmc.loadDevice("Port", "SerialManager", "COM5");
> >> mmc.initializeDevice("Port");
> >> mmc.loadDevice("ZStage", "Prior", "ZStage");
>
> *>> mmc.initializeDevice("ZStage");*
> Java exception occurred:
> java.lang.Exception: Error in device "ZStage": Serial command failed. Is
> the device connected
> to the serial port? (14)
>
> at mmcorej.MMCoreJJNI.CMMCore_initializeDevice(Native Method)
>
> at mmcorej.CMMCore.initializeDevice(CMMCore.java:305)
>
>
> *>> mmc.setPosition("ZStage", 10);*
> Java exception occurred:
> java.lang.Exception: Error in device "ZStage": Unknown error in the device
> (1)
>
> at mmcorej.MMCoreJJNI.CMMCore_setPosition__SWIG_0(Native Method)
>
> at mmcorej.CMMCore.setPosition(CMMCore.java:1161)
>
>
> The ZStage is connected to serial port COM5. The ZStage also works
> fine through Micro-Manager and its own software controller. Thus, it is
> connected. There seems to be a problem with matlab's interface with
> Micro-Manager to recognize and configure the ZStage.
> For reference, I am using Prior's ZStage. I am also using the ProScan
> III controller. Not sure why the ZStage will not initialize and move when
> given the appropriate methods.
>
> Any help would be genuinely appreciated!
>
> Much Appreciated,
> Kiana
>
> On Tue, Jul 3, 2018 at 12:00 AM, Kyle Douglass <kyl...@gm...>
> wrote:
>
>> Hi Kiana Go,
>>
>>
>> On Fri, Jun 29, 2018 at 8:51 PM, Kiana Go <gok...@be...> wrote:
>>
>>> Hi Kyle,
>>>
>>> Quick question. I am using a XYStage Prior and want to load it. Is
>>> the following correct? The stage is Prior and its corresponding
>>> adapter is the ProScanIII.
>>>
>>> *mmc.loadDevice("XYStage", "Prior", "ProScanIII");*
>>> * throw (CMMError)*
>>>
>>> or should it be like:
>>>
>>> *mmc.loadDevice("XYStage", "Prior", "Prior");*
>>> * throw (CMMError)*
>>>
>>>
>>
>> I don't currently have Micro-Manager installed on the machine in front of
>> me, but I believe you can find an explanation in the Micro-Manager
>> documentation here: https://micro-manager.org/wiki
>> /Micro-Manager_Programming%20Guide#Loading_devices (Keep in mind that
>> this is Java code, but the arguments to loadDevice() should be the same.)
>>
>> In particular:
>>
>> We can use it like this:
>>
>> CMMCore core = new CMMCore();
>> core.loadDevice("Camera", "DemoCamera", "DCam");
>>
>> The command above has three parameters: label, library and name. Device
>> label is the name we want to assign to a specific device. It is completely
>> arbitrary and entirely up to us. We chose to call our camera simply
>> "Camera". "DemoCamera" is the dynamic library name where the adapter
>> resides. "DCam" is the name of the device adapter we want to load.
>>
>> I hope this helps!
>> Kyle
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> micro-manager-general mailing list
>> mic...@li...
>> https://lists.sourceforge.net/lists/listinfo/micro-manager-general
>>
>>
>
>
> --
> Class of 2021
>
--
Class of 2021
|