User talk:Steffen

From Micro-Manager

Jump to: navigation, search

Hi, I'm currently a computer course, my topic is to create an adapter controls stages conected to PI GCS controllers and conect via a PCI port. I wanted to know if you could send me your code about this, as well as some explanations to understand how you did. This will allow me to adjust my program to a PCI port. Thank you in advance. Sincerely.

Hi,

the source code for the PI GCS adapter is included in the micro-manager-source code. The adapter connects via RS-232 to several PI GCS controller. This interface is provided by micro-manager's frame work and so it was very easy to adapt existing adapters.

If you want to access a controller via PCI port you need a device driver. I doubt micro-manager provide a genreal PCI driver, as such drivers are usually very special for each board and operating system.

What controller board do you use? I guess E-761 or C-843, because these are the only PI PCI boards I know of.

best, Steffen


Thank you for your answer.

But I don't understand where is the code source for the adapter PI GCS? My controller board is C-843. How I proceed to program this and insert it into the adapter??

Sincerely.


Hi, The source code should be somewhere in a folder "DeviceAdapters/PI_GCS". It's in the 1.2 series. I cannot find a download link, maybe you need to ask the developers of micro-manager for the source code, since there may be changes from the version I checked in several months ago. But I do not think it will help you very much.

The PI_GCS adapter sends ASCII commands to a serial port. The driver for the serial port is included in micro-manager, so it was very easy for me to write the adapter.

The C-843 cannot be connected to a serial interface but needs a very special device driver. We (PI) provide PCI drivers and libraries for the C-843 for Windows and Linux. But you need to include them somehow in micro-manager. I do not know if this is possible.

If you manage to include the C843_GCS_DLL in your build of micro-manager you can call the functions C843_GcsCommandset/GetAnswerSize/GetAnswer to communicate with the PCI board. You do not need to build micro.manager completly. The "MMDeviceKit" should be sufficient.

And the C-843 is not a stand-alone controller and does not use absolute sensors, so the initialization will be a bit more complicated.


best, Steffen



I'm sorry but i learned. What you put in as your adapter? I did not find the source code DeviceAdapter / PI_GCS.

For C843 must add the dll in MMdevice kit and after I will call on the adapter, is what I understood?



That's correct - you need to link with the C843_GCS_DLL and be able to call the methods of this DLL. Once you have gotten this far, I can help you with the correct sequence of commands.

the PI_GCS source code should be in the current beta release 1.2.*. I can only see 1.1.* on the web page. Please ask the developers of micro-manager for the current source code.

best, Steffen


Thank you very much for your help. I put the C843_GSC_DLL in MMDevice.h because it is called by all other .h (DeviceBase.h, Interface.h, ...). Now I will create an adapter that will manage my piece (that is a part of the microscope that moves on an axis Z) and furthermore to link the port with only a PCI or adapter for the port PCI? What must be put in this adapter? I asked the developers the source code of PI-GCS.


I think, to insert C843_GCS_DLL in MMdevice.h, just call C843_GCS_DLL.h in MMDevice.h with a insert and put C843_GCS_DLL.h and that call him in file of MMdevice kit. It's correct?

What is the role of the adapter? It makes the link between what and what?


Hi, I'm no micro-manager expert. Please see http://micro-manager.org/downloads.php?object=devkit for how to develop an adapter. I simply took an existing example (I think it was Nikon) and modified it to my needs.

You do not need to change any source code outside the adapter to include another stage. I only had the device kit and could do everything I want. For questions regarding the internal micro-manger framework or how to build an adapter please see the homepage or contact the developers. I think the mailing list participants are very friendly and helpful. Once you can call C843_Connect() and C843_qIDN() from within the adapter I can help you further.

best, Steffen


Thank you very for your explanations. I'll try what you tell me. I surely come back to you to call C843. Thank you very much. One more question to link with the C843_GCS_DLL, I just include C843_GCS_DLL.h in code adapter and i don't change MMDevice.h?


I make my adapter and now where i insert C843_Connect() and C843_qIDN()?

It's possible to send me your adapter please? just to understand how you use "DeviceAdapters/PI_GCS".


I am sorry you have inundated with questions ...

I managed to communicate with Nico Sturman. He gave me all the information needed to build the adapter. Let me know if you could help me to include orders call at the port PCI and remove those that match the serial port?