LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

For Loop with Numeric Indicator Percentages

Hi,
 
I have a 'For Loop' set up which takes three text documents and plots them on an XY graph with respect to Wavelength and Transmittance.  I need help incorporating three numeric indicators that give me an average percent transmittance value for each of the three plotted data sets over a 180nm field (470nm - 650nm).
My problem lies in being able to find the right set up of string/array conversions when I read the files.  I am not sure whether or not to use the Read from Spreadsheet File vi, or the Read Characters from File vi, cause both are giving me very strange results.
 
Attached is the VI that I have set up already...
...and I will attach the 3 text documents on the next post.
 
Thanks
0 Kudos
Message 1 of 8
(3,261 Views)
The three text documents...
Download All
0 Kudos
Message 2 of 8
(3,258 Views)
Since the VI you 'set up already' is the one I gave you in a previous post, maybe you can explain what the exact problem is. There is a small bug in that the value to the index value in the Array Subset function should be 1 in order to remove the first row. Also, in your 'modified' example, you have number (3) wired to the for loop 'N' terminal. This is not necessary. A basic fundamental of a for loop is that is will automatically iterate for the size of the input array.
Message 3 of 8
(3,244 Views)
There is no problem with the VI that you gave to me, my problem is I have to get the average percentage of the transmittance values on the three of those plots.
 
I tried setting the numeric indicators in an array like the file paths but the data was only going into the first row of the array.  So I decided to simply use three seperate numeric indicators.  It's not really a problem, its more on the lines of me not being able to translate the three text documents information into three average percentages.  Do I 'Read from Spreadsheet' or 'Read Characters from File'?
 
I attached the file you had given me earlier cause in my own efforts I made a very confusing and disgusting VI that I cannot even understand anymore.
 
Your help is greatly appreciated Dennis.
 
 
0 Kudos
Message 4 of 8
(3,237 Views)
You wouldn't use either. There would be no point in loading the text information again. You already have the information in the separate numeric arrays. You would want to perform some arithmatic operation on one of the arrays. If you do the math inside the for loop so that it creates a scalar, you would wire this value out of the for loop. At the exit tunnel, select Create Indicator and you will create an array of values, Each element in the array would represent the calulated value for each array read from a single file. Why don't you provide some more information of the processing you want to do to the data. Is it a subset of the data, what type of calculation, etc.
0 Kudos
Message 5 of 8
(3,226 Views)
I wanted to find the average transmittance values, and I did the calculations and added the indicator to the exit tunnel and now have a functional array that gives me different percentage.  Thanks for the help Smiley Very Happy

Message Edited by Steve.Briggs on 11-13-2006 01:54 PM

0 Kudos
Message 6 of 8
(3,224 Views)

If you just want the mean of the transmittance column, this is all you have to do. The Mean function is on the Analyze>Mathematics>Probability and Statistics palette. I also show the fix to eliminate the first row from the data.

Message Edited by Dennis Knutson on 11-13-2006 01:01 PM

Message 7 of 8
(3,219 Views)

Just by pointing out the "Analyze>Mathematics>Probability and Statistics palette" you opened an entire new realm of LabVIEW to me which should help in the future.

Once again, I can't thank you enough.

0 Kudos
Message 8 of 8
(3,205 Views)