LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Microscope autofocus by using arduino and stepper motor

Hello everyone, a week ago I received an assignment from my coursework supervisor to do a project that will control the microscope autofocus by using stepper motor, i have done something but it's not  finished and now I actually don't know what to do so could you please help me I attached everything I did below. So what my supervisor want. I need to do a small subproject (it can be organized in a large project or in another file) and in that subproject should be a program which will send a signal to the stepper motor to move along the z axis (Stepper Steps-z). That program can be organized by comparing two images (previous and current) or can be organized based on the assessment of the quality of the received image, there are no restrictions here, everything is limited by your imagination but the essence is the same, this program should send a signal to the stepper motor which, using gears, will turn the toggle switch on the microscope which is responsible for focusing, I hope you understand the main purpose of my request, thanks everyone who read this post and also thanks everyone who will help me to get my bachelor degree. If you have any questions, please ask, I will be happy to answer them.

0 Kudos
Message 1 of 6
(364 Views)

@eseses wrote:

I hope you understand the main purpose of my request, thanks everyone who read this post and also thanks everyone who will help me to get my bachelor degree. If you have any questions, please ask, I will be happy to answer them.


Good morning, @sss.  I read your post, and am happy to help you get your Bachelor's degree.

 

Here is my advice -- Find someone who writes good LabVIEW code at your Institution and "apprentice yourself" to her (or him) for a few weeks and learn how to write good LabVIEW code.  That will give you a potentially useful skill, which you can then use to completely re-write the "spaghetti code" mess you are trying to untangle.

 

As I understand it, your basic task is to manipulate a single axis.  Great -- write a single axis program.  Think about what you want to do -- are there sub-tasks (like "acquire an Image" or "compare two Images and choose one as better") that can be turned into sub-VIs?  Is there an overall structure (such as a State Machine or Queued Message Handler or Channel Message Handler) into which the entire Task fits?  What are the (minimal) set of Controls and Indicators you need?

 

Pay attention to "LabVIEW Style".  [If you are unfamiliar with that term, do a Web search.  One of the best books I read when I started learning LabVIEW was "The LabVIEW Style Book" by Peter Blume.]

 

Bob Schor

0 Kudos
Message 2 of 6
(296 Views)

Hello Bob, thanks for your advices I'll try to find somebody, but the main problem is that students at my university study this program for only half a year (1 semester) that's why almost no one knows this program, but thanks for the advices anyway, I'll definitely read the book you recommended to me

0 Kudos
Message 3 of 6
(292 Views)

I had this in my archive but never used it, it may be of use to you in regards to focus quality.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 6
(279 Views)

 Hello AK2D, thanks for your program, I will definitely show it to my supervisor, really interesting what will he say about it.

 
0 Kudos
Message 5 of 6
(262 Views)

Forgot to include the source page of the example:

https://forums.ni.com/t5/Example-Code/Detect-Quality-of-Focus-on-a-Camera/ta-p/3501181

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 6
(196 Views)