LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Run Data Aquisition in Background

I'm trying to do some simple Temperature Aquisition with a DAQ Module (as seen in the bottom-right corner below).  I'm taking this temperature data while cycling a power supply (the inner loop).  The problem is that the DAQ Module is only executed when I first am in the outer loop.  If the number of samples I request is too small and it finishes before the inner-loop is done, it will miss some temperature readings.  If I sample too many times, the inner loop will finish, exit, and then an error pops up that I'm trying to call the DAQ Assistant Module again when it hasn't finished the first run.  

 

I guess my general question is: How do you run multiple processes concurrently in labview?  Like continually take temperature readings and do something else simultaneously.  Or count up, while doing something else at the same time.  I'm relatively new to labview so I'm not familiar with more complicated structures that might enable this type of programming.  If this is not possible, how would you achieve what I'm trying to do?

 

Thanks.

 

labview_program.PNG

0 Kudos
Message 1 of 2
(2,379 Views)

rman1234,

 

One of the great things about graphical dataflow is how easy it is to have different sections of code run concurrently.  Simply create two loops with no data dependencies (i.e. wires between them) and they will both run at the same time.

 

 vi_snippet.png

 

I used for loops in the code same above since that appears to be what you are doing with your while loops.  Both will work but typically you use a for loop when you know ahead of time how many loop iterations you need.  While loops typically run until a condition is met.

 

Hope this helps.

 

~SimonH 

0 Kudos
Message 2 of 2
(2,352 Views)