LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need help read txt file

hello all,
I need to read  text file (1.4M), and scan all the file line and get some info (string,number ect..) from the line.
the program doing that but  the execution speed is unreasonable is take abut 30sec to do that while in VB.net it's take only
1~2sec???? can some one help me!!!!!
i'm using Labview 7.0;
 
my code goes like this:
 
open file-->read file-->while loop-->pick a line [the iteration in the while loop is connected to line index]--> get the info from output string.
 
Regards,
 
eyal.

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

0 Kudos
Message 1 of 2
(2,174 Views)
It is the 'Pick Line' function which makes your VI so slow. I attach a modified version of your VI, where the large multi-line sting read from the *.txt file is converted to an array of lines first. This array then controls a FOR loop (which replaces your while loop). The VI "statistic tester report11.vi" runs in less than a second.
 
First I hadn't thought about the 'Pick Line' function and therefore had tried to simplify your source code in order to make the VI faster. You may want to have a look at that attempt, too, since it does the same job, but the source code is a factor of 8 smaller. It is  "statistic tester report10.vi".
 
 
-Franz
0 Kudos
Message 2 of 2
(2,157 Views)