LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need help with txt files.

Hi, to all the pepole here that make a fantastic work thanks.
i never see a form like that, i'm new to labview so i have a lot of trable to do
a simple statistic report.
 
after i read out the data from the txt file i need to do some calculation. i dont know how to get the number out peer test.
alsow i neet to read out result and make an avrege peer test. need to read alsow the unit,lower,upper and display that .
after that i need to save all the result peer test and display them (if i press buttun) from the min to max.
 
 I hope that  u can help me with that.
 
i attached all the file.
 
Note that the TXT FILE CIH_BX.TXT MUST BE PLACED IN C: DRIVE.
 
regrads
 
eyal.

Message Edited by Support on 09-15-2005 10:53 AM

0 Kudos
Message 1 of 5
(2,815 Views)
Here is a vi that hopefully will parse out the data from your file and place it in a cluster array.  You can easily change this to a set of arrays if you want to group your data by type. 
Randall Pursley
0 Kudos
Message 2 of 5
(2,801 Views)
Could you please describe in more detail what you want to achieve? What is a 'peer test'? What are the two data files (CIH_BX.TXT and DATA.008) in your .zip file?
 
Please to do not create another thread for you answer, just reply to this one.
0 Kudos
Message 3 of 5
(2,797 Views)

Hi Fahlevs,

The cih_bx.txt is the file that i take the name test from there, and look for them in the Data.008 txt file

and if they axsit there i place them on the screen. now "peer test" i mean that i take the result of 1 test

and make an average for this test for example:

 No.   Test Name              Decis.  Result    Units          Lower                Upper                                                   

811   U1.Power-up cur.    Pass    3.52        mA               0.10                  20.00

811   U1.Power-up cur.    Pass    2.58         mA              0.10                  20.00

(3.52+2.58)/2=......

all over the file take anuder test name take the result and make average....

and i need to display the unit next to the average.

regards,

eyal


0 Kudos
Message 4 of 5
(2,795 Views)
What you try to do involves a lot of parsing, as others have explained already. Parsing data is a tedious and time consuming task normally, but Labview fortunately offers quite some functions to assist you. Unfortunately, however, one needs some experience to apply them. I assembled a VI (see attachment) which probably comes close to want you want.
When you look into its code you will see some of the parsing techniques. Also notice that I tried to bring the string data from the original file into some other, more useful structure. I do not claim to always have chosen the optimum structure.
 
Also I did not do any error checking. So I noticed at the end, that some of the data (although contained in the original file) are missing in the summary produced by my VI. The resaon seems to be an inconsistent use of delimiter characters in that file: mostly individual entries are delimited by a series of blank characters, but sometimes an entry is missing (eg. do some of the lines neither contain 'Pass' or 'Fail', but just another blank instead. Since I took a series of consecutive blanks as a delimiter, my counting of entries had to fail.
 
Try to get a more consistently created raw-data file, e.g. one where tab characters are used as delimiters. Otherwise the parsing will be unnecessarily complicated.
 
Good luck
 
 
-Franz
0 Kudos
Message 5 of 5
(2,759 Views)