Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I count, I'm serious?

I am trying to read data from a spreadsheet, and pick just the value below a user inputted control. Using the index array vi, I have the correct column, and I just want the row to start at zero, and count up until the value is above the user input. My only other programing was years ago with Basic, so somewhat like this.

for x=1 to 9999999999
if valueinrowx > userinput then out
next x

out:

I have attached this part of my file, thanks for taking a look.
Download All
0 Kudos
Message 1 of 3
(2,205 Views)
Hi Bradle95,

From what I understand you want to select a specific column of data from your file then for each entry in that column you want to check if it�s greater than some user supplied value. If it�s greater than you want to display this value. I would suggest using a for loop instead of a while loop. A for loop in LabVIEW is very similar to a for loop in Basic. I�m attaching an example that demonstrates doing this with a for loop.

In this example the loop executes fairly fast. If you want to slow it down you can increase the wait inside the loop. It�s currently set to 100ms. Better yet you can accumulate all the values that are above your threshold using a shift register and the Build Array function located on the array palette to accumulate
all these value into an array. The LabVIEW help has lots of information on how to use these functions.

I hope this helps. Please post back if you have more questions.

Sarah Miracle
National Instruments
Message 2 of 3
(2,205 Views)
Got it. Thank you.
0 Kudos
Message 3 of 3
(2,205 Views)