device adapter for Thorlabs MCM3000 stage controller

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

device adapter for Thorlabs MCM3000 stage controller

Nikita Vladimirov

Dear MM community,

I am trying to implement a device adapter for Thorlabs MCM3000 stage controller. Has anyone did it before?
I have some experience with adapters that communicate via text serial commands (eg RAMPS), but this beast is different. It has some rudimentary binary serial protocol, and additionally a closed-source driver (dll + header).

What are some beginner-friendly examples of device adapters that communicate via manufacturer-provided API (using header file and a dll), from which I can learn the ropes?

Thank you in advance, and happy holidays,

Nikita

-- 
Nikita Vladimirov, PhD

Preibisch Lab / Systems Biology Imaging
Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center for Molecular Medicine (MDC)
Hannoversche Str. 28, room 2.73
10115 Berlin
twitter.com/nvladimus
github.com/nvladimus


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: device adapter for Thorlabs MCM3000 stage controller

nanthony
Hi Nikita,


I think there are probably many good examples but I recently added two adapters that use a manufacturer SDK. They are `NKTSuperK` and `KuriosLCTF`.

In project properties you'll want to check "C++->General->AdditionalIncludeDirectories" to make sure it points to the location of the header.

You'll also want to add the location of the dll to "Linker->General->AdditionalLibraryDependancies"

Finally, i think if there is a .lib file you should add it to "Linker->Input->AdditionalDependencies"


Make sure you do this for all configurations debug/release and x64/Win32. Also make sure that the x64 is using the 64bit sdk and the Win32 is using the 32bit sdk.

Hope this helps,
   Nick


From: Nikita Vladimirov <[hidden email]>
Sent: Thursday, December 19, 2019 11:17 AM
To: Micro-Manager General <[hidden email]>
Subject: [micro-manager-general] device adapter for Thorlabs MCM3000 stage controller
 

Dear MM community,

I am trying to implement a device adapter for Thorlabs MCM3000 stage controller. Has anyone did it before?
I have some experience with adapters that communicate via text serial commands (eg RAMPS), but this beast is different. It has some rudimentary binary serial protocol, and additionally a closed-source driver (dll + header).

What are some beginner-friendly examples of device adapters that communicate via manufacturer-provided API (using header file and a dll), from which I can learn the ropes?

Thank you in advance, and happy holidays,

Nikita

-- 
Nikita Vladimirov, PhD

Preibisch Lab / Systems Biology Imaging
Berlin Institute for Medical Systems Biology (BIMSB)
Max Delbrück Center for Molecular Medicine (MDC)
Hannoversche Str. 28, room 2.73
10115 Berlin
twitter.com/nvladimus
github.com/nvladimus


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: device adapter for Thorlabs MCM3000 stage controller

Nico Stuurman-2
In reply to this post by Nikita Vladimirov
Hi Nikita,
> I am trying to implement a device adapter for Thorlabs MCM3000
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.thorlabs.com_thorproduct.cfm-3Fpartnumber-3DMCM3000&d=DwMDaQ&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=DPva5ANLu11yoh0X3S-5jOjvGRUJBKUNlqSqtQsKJbM&s=o07-rnnFJbmQGb28bDTYnp1l3wSYQlJirHTf_o_6Uo0&e=>
> stage controller. Has anyone did it before?
>
> I have some experience with adapters that communicate via text serial
> commands (eg RAMPS), but this beast is different. It has some
> rudimentary /binary /serial protocol, and additionally a closed-source
> driver (dll + header).
>

If the binary serial protocol is complete, then the advantage of using
it is that your code will work on all operating systems.  A possible
advantage of using the vendor provided dlls is that the vendor may take
care of communicating with different devices, versions, etc..

> What are some beginner-friendly examples of device adapters that
> communicate via manufacturer-provided API (using header file and a
> dll), from which I can learn the ropes?
>

MM does have facilities to do binary serial communication.  Things are a
bit more difficult since you have to determine yourself when a message
terminates.  The ZeissCAN and ZeissCAN29 adapters are examples of
complicated binary serial protocols that are all implemented in MM
device adapters (and, in that case, I am quite happy we did so, the code
has been working for more then a decade, and you can run it on linux and
Mac if you so wish).  Trouble shooting binary serial is a bit rougher
than text based protocols, but certainly not undoable.

Best,


Nico



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: device adapter for Thorlabs MCM3000 stage controller

oftakofta
Hi Nikita et. al!

This is great news, since my plan for January involves doing something similar. Please contact me in case you think that a self-taught Python programmer can be of use to you.

Dr. Jens Eriksson, manager

Sellin Imaging Platform

Uppsala University



On Thu, Dec 19, 2019 at 8:15 PM Nico Stuurman <[hidden email]> wrote:
Hi Nikita,
> I am trying to implement a device adapter for Thorlabs MCM3000
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.thorlabs.com_thorproduct.cfm-3Fpartnumber-3DMCM3000&d=DwMDaQ&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=DPva5ANLu11yoh0X3S-5jOjvGRUJBKUNlqSqtQsKJbM&s=o07-rnnFJbmQGb28bDTYnp1l3wSYQlJirHTf_o_6Uo0&e=>
> stage controller. Has anyone did it before?
>
> I have some experience with adapters that communicate via text serial
> commands (eg RAMPS), but this beast is different. It has some
> rudimentary /binary /serial protocol, and additionally a closed-source
> driver (dll + header).
>

If the binary serial protocol is complete, then the advantage of using
it is that your code will work on all operating systems.  A possible
advantage of using the vendor provided dlls is that the vendor may take
care of communicating with different devices, versions, etc..

> What are some beginner-friendly examples of device adapters that
> communicate via manufacturer-provided API (using header file and a
> dll), from which I can learn the ropes?
>

MM does have facilities to do binary serial communication.  Things are a
bit more difficult since you have to determine yourself when a message
terminates.  The ZeissCAN and ZeissCAN29 adapters are examples of
complicated binary serial protocols that are all implemented in MM
device adapters (and, in that case, I am quite happy we did so, the code
has been working for more then a decade, and you can run it on linux and
Mac if you so wish).  Trouble shooting binary serial is a bit rougher
than text based protocols, but certainly not undoable.

Best,


Nico



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


--
Science is built up of facts, as a house is built of stones; but an accumulation of facts is no more a science than a heap of stones is a house.  /Henri Poincaré


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general