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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make one while loop that runs 1 piece of data at a time?

I have a question about a while loop.  Currently, I have 4 or 5 dynamic data lines that I would like to run through a while loop that will tell me if the data is within a certain range or not.  However, the ranges are different for each piece of data, and I dont know how to do each one separately.  Do I have to make 5 different while loops? Thanks!

 

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

Hi,

 

You could use arrays to hold the wave forms and the limits, then use indexing of a loop to pick the waveform and limits for each loop.

 

So the arrays would feed into a loop, and inside the loop would be your analysis of the waveform and limits that are passed in.

-------
Mark Ramsdale
-------
0 Kudos
Message 2 of 3
(2,007 Views)

@pg22aw wrote:

I have a question about a while loop.  Currently, I have 4 or 5 dynamic data lines that I would like to run through a while loop that will tell me if the data is within a certain range or not.  However, the ranges are different for each piece of data, and I dont know how to do each one separately.  Do I have to make 5 different while loops? Thanks!

 


Do you want to compare the value with a defined value and also the ranges for the 5 data is different?. What are you doing in the while loop. If the data is in an array of dynamic data you can seperate the amplitude value and check the whole array of value with the ranges that is also build same as the data theh you will get the output as a boolean array.
-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 3
(1,999 Views)