09-12-2009 07:38 PM
Hello,
I want to scan a file to find a value for wCHI^2, which is given somewhere in the text file in the following way:
wCHI^2 = 739.59
The text file is an output file retrieved by some program. It is very long with many other informations and having alphabets and numerics both. I thought to scan for exact string 'wCHI' from the file but I do not know how it works.
Can somebody help me here please??
thanks a lot in advance
Solved! Go to Solution.
09-12-2009 08:45 PM - edited 09-12-2009 08:46 PM
09-13-2009 05:15 AM
Hi Ravens
thanks for the reply. Still it is not clear to me how to scan the complete file for a particular string? I did not see any function for scanning the file.
to search for the following string+number from a particular file:
wCHI^2 = (some number to be read from the file)
Further, if there are more than one row with this string, is it possible to retrieve all the values from this file?
thanks again
09-13-2009 06:15 AM
maybe this will help:
09-13-2009 06:33 AM
this may also help you:
http://forums.ni.com/ni/board/message?board.id=170&message.id=418142&query.id=339123#M418142
09-13-2009 03:47 PM
Thanks Harold,
I could not open the VI you posted as I ám using the older version 8.5.
The link was also helpful but partially, as the position of the string in the file is not fixed and I want to scan large number of files and the position of the string in the file varies from one to another.
It would be helpful if I can get the VI which I can open in LabVIEW 8.5
09-13-2009 05:43 PM
09-13-2009 06:03 PM
09-13-2009 06:11 PM
ravens fan is correct it is better to use the read from txt file function here that is:
09-17-2009 04:22 AM
Finally my problme is solved.
Thanks a lot to Harold Timmis for explaining in detail and also to Raven Fan (though I could not use the example correctly, but thts my mistake).