LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running timing, image analysis and parallel port control simultaneously.

I've been working on a program in LabVIEW for image acqusition, basic image analysis but also instrument control (by way of LPT1 port). I have all these functions working at the moment, but the problem now comes with timing and (I think) running loops.

 

The problem is, I want to be able to switch a pin in the LPT1 on for a user-defined amount of time, then off for a user-defined amount of time, then back on, etc, in a continuous way. The image analysis aspect involves measuring the light intensity of a ROI marked on the captured image stream. However, I want to plot these values only every 10 seconds on a chart (this value should also be able to be changed by the user). However, the image stream should be constant, with only the values recorded on the chart (also recorded in excel) every 10 seconds.

 

What do I need to do to achieve this? Unfourtunately it's difficult for me to post the VI and/or pictures of the VI on this forum as I'm unable to access this forum from my LabVIEW installed PC.

 

Thanks in advance,

David.

0 Kudos
Message 1 of 3
(2,861 Views)

Put three loops in parallel. One for image acqusition, one for instrument control and one for analysis.

Put a 4th loop in parallel if you need it, with an event, a timeout every 10 sec, for plotting or saving files.

This "10 secs" can be changed by the user, if you create a control.

 

There are a lot of ways to share the data between those loops.

I suggest, although i don't know if it is the proper one, functional globals.

 

 

0 Kudos
Message 2 of 3
(2,851 Views)

Pnt is right about splitting your application into multiple loops.

 

Take a look at the following webcast that will help explain some of the multi-loop architectures and how you go about communicating between the different loops.

 

Software Design Architecture in NI LabVIEW

 

Here is also an example of how to use the Functional Global Variabls that Pnt mentioned. which are great for passing information between loops.

 

Multi-Functionl Global Variables


Rich

NI | UK

0 Kudos
Message 3 of 3
(2,834 Views)