From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

advice on best architecture

Hello.
I am an engineer with some experience of using Labview for sequential and simple vision based application.
I am after a bit of guidance to help me select the best architecture for the following project.

 

I have developed a single loop state machine type VI to allow the user to control several motorised stages and would like to add vision capability (IMAQdx)
I need to:
- show the user a live image from a single camera
- allow the user to change camera attributes, trigger a snap
- perform image analysis to provide quantitative data extracted from the live image (histogram, focus, sample orientation, etc…)

 

I am OK with the details of the IMAQ functions I need to use and have tested them on their own but I am now wondering the best way to integrate this so I can combine flexible motion control and vision.

I am not so clear about:
- should I use another while loop in parallel for vision stuff or integrate it in the existing state machine loop
- how to wire/pass session and image between the various cases/loops.

 

Long term I want to use this application to allow the user to align a sample and launch fixed test protocols which will take over motion, drive additional instruments and still require vision data.


If you could point me in the right direction, it would be much appreciated.

0 Kudos
Message 1 of 3
(4,411 Views)

Hi LV@optofab

 

There are many ways to achieve what you want but it all depends on your application. Are you doing all of this on a Real Time target? What are you trying to achieve in your overall application?

Jinfone
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(4,353 Views)

Jinfone,

 

Thank you for your reply.

 

I am not planning to use real time hardware. I have to do this using the existing equipment.

I will try to describe the application below.

 

In terms of hardware the application combines:

- 4x motorised stages for X,Y,Z, Theta(rotary) motion 

- waveform generator 

- oscilloscope 

- temperature controller 

- camera 

 

While I have well defined testing requirements (see below) I would like the application to be as versatile as possible so that various testing procedures involving some or all of the instruments can be setup easily.

 

The application can be broken down into 2 main parts

1- sample alignment

2- test sequence selection/setup

3- testing loop execution

 

Sample alignment requires vision and motion control. Some analysis is done on the live image to provide information about focus and sample orientation.

 

For the test sequence selection/setup, displaying the test parameters will do just fine. I want to use a test config file to be able to load/save these parameters.

 

The testing loop will repeat the following tasks

a- set temperature

b- move to X,Y,Theta

c- autofocus (vision + Z motion)

d- turn testing waveform on

e- get measurement data from oscilloscope (to 4 DBL variables)

f-  turn testing waveform off

repeat from a

 

All the data will be saved in a cvs file (data vs temp, X,Y,Theta,Z) for further processing, probably in excel.

 

I can do all the individual tasks with the various instruments, my question is more about the general architecture.

I am not so clear about how to (and where from) control the test sequence so it is done in the right order.

 Instruments like the oscilloscope, the temperature controller, the waveform generator just just need to be initialised once at the start then controlled using simple commands.

So far, my application does sample alignment. A state machine loop is dealing with motion control and motion related GUI interaction; it runs in parallel with a while loop for vision which grabs image continuously and does some image analysis.

 

Some advice will be much appreciated.

 

0 Kudos
Message 3 of 3
(4,339 Views)