LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous Execution with image capture

Hi I'm writing a program that I want to simultaneously run two loops. One moves an actuator a given amount then saves the current image, we'll call it the actuator loop. The other loop would provide a live view of our images from our camera.

The problem is that I need the live preview image to run before the other loop so I can change exposure, etc. I also need it to run after I start the moving actuator loop. While both are running I will need to be able to send the images from the live view loop to the moving actuator loop. Is this possible and what kind of design pattern would you recommend?


I can explain more if this made no sense.

Thanks,

-Shane
0 Kudos
Message 1 of 3
(2,620 Views)

Hi Shane,

The LabVIEW Application Design Patterns presentation would be a good place to start, but with the information you have given it seems pretty clear you're looking for a Producer/Consumer architecture. In LabVIEW, there is a VI template for Producer/Consumer, so most of the work is done for you.

Producer/Consumer allows you to pass information between loops using queues without losing any data. In this case, the data queued is going to be an image from a camera.

Let me know if you have any further questions/comments/concerns. Cheers.

 

| Michael K | Project Manager | LabVIEW R&D | National Instruments |

0 Kudos
Message 2 of 3
(2,600 Views)
Thanks for the help, I'll try that. I'll even forgive you for being a milan fan.

-Shane
0 Kudos
Message 3 of 3
(2,558 Views)