Re: [micro-manager-general] Device Adapter Programming (clarification!)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [micro-manager-general] Device Adapter Programming (clarification!)

Hoover, Karl
Hello Trevor,

A better (more complete) answer is in order. It it of course better to make the port a programmable property and to use the 'pre-initialization property feature. You can take a look at the laser device 'Coherent Cube'  In there you'll see that the constructor adds property "Port."  The user selects these properties before initialization set he is communicating with the correct device. I hope this answer is clear and helpful.

Best Regards,
Karl Hoover




________________________________________
From: Hoover, Karl
Sent: Monday, January 25, 2010 14:25
To: Micro-Manager General
Subject: RE: [micro-manager-general] Device Adapter Programming

Hello Trevor,

Following the examples of the other xy stages in the sort code, 'port_' can be a std::string name of the serial port communication device. On Windows you could indeed initialize it with a statement like
port_ = "COM4";
as you have found.

Best Regards,
Karl

________________________________________
From: [hidden email] [[hidden email]]
Sent: Monday, January 25, 2010 13:20
To: [hidden email]
Subject: [micro-manager-general] Device Adapter Programming

Hello,

My name is Trevor Osborn, and I work at Conix Research. I have been
working on implementing a device adapter for our stage systems. I have no
previous
experience working with Micro Manager, so I have a few questions. First,
in my device adapter I tried using port_.c_str() as the name of the COM
port in the SendSerialCommand function, as I had seen in other device
adapters. However, I was unable to send anything out of the port until I
added the line:

port_ = "COM4";

to the initialize function. Obviously this is not the correct way to set
this variable, but it worked. So, my question is, what is the correct way
to set this variable. These are the lines I added to my conifiguration
file to load my adapter if that helps.

# Devices
Device,COM4,SerialManager,COM4
Device,XY,ConixStage,ConixXYStage

# Pre-init settings for COM ports
Property,COM4,AnswerTimeout,7000.00
Property,COM4,BaudRate,57600
Property,COM4,DelayBetweenCharsMs,0.0000
Property,COM4,Handshaking,Software
Property,COM4,Parity,None
Property,COM4,StopBits,1

Once I get the port_ issue resolved I would like to submit this adapter to
the project. Before I do submit the adapter I was wondering if one of the
developers could take a quick look at my code and point out any major
problems or features that I failed to implement. Thanks you for your time.

Regards,

Trevor Osborn
Conix Research Inc.



------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general