‎03-22-2007 04:35 PM
‎03-22-2007 04:41 PM
‎03-22-2007 05:02 PM
I have a DAQ gathering data. We are aquiring voltage and desire all data above 2 volts. We have our loop set up to continue to gather data until voltage drops below 2 volts. Once voltage drops below 2 volts we want the program to stop. All voltages above 2 volts durring this while loop need to be transfered out in order to be analized by other parts of our program such as a case structure to handle if between 2.1 and 2.2 to do Task A and if between 2.3 and 2.4 to do Task B.
currently we have tried to run just a wire out with numerical indicator however this data will collect but not release from the while loop until the loop is stoped. upon which only 1 set of data is released.
we want continuous set of data released from the while loop begining at start point and until stop of loop.
‎03-23-2007
04:42 PM
- last edited on
‎09-17-2026
03:31 PM
by
Content Cleaner
You are most likely getting unexpected results in your application due to the fact that you have wired the data out of your While loop. The way that dataflow works in LabVIEW is that no outputs are generated until the node has completed execution. Thus, the output tunnels of the While loop will not pass any data until the loop finishes its execution.
If you'd like to analyze or process your data while you are still acquiring, I would recommend using a queue in a producer / consumer design pattern. You will find a VI template in the File >> New menu that starts you off with a basic producer / consumer architecture. With this architecture you can pass the data from your data acquisition loop to either of your two processing tasks. I hope this information is useful for you. Good luck with your application!
Mike D.
National Instruments
Applications Engineer
‎03-23-2007 04:53 PM
Try using a state machine, with the "default" state constanly reading DAQ analog input. In that same state, you write voltage sensing logic to take the program to other states that perform other tasks A and B.
Joey
-CLD