09-05-2007 04:13 PM
09-05-2007 04:35 PM
09-05-2007 04:53 PM
continuing from tbob;
... When you read past the end of the file, you'll get an error (4?) indicating EOF. Trap on that to stop the loop and remember the last record from the loop needs deleted.
Ben
09-05-2007 09:48 PM - edited 09-05-2007 09:48 PM
@jgkempen wrote:
There does not seem to be an easy way to read fixed with ascii files in labview.
Reading a file does not depend on its contents. Unless the file is gigantic, you can just read it as one big string and parse it later, especiall if you want the entire contents of the file.
If you only need a subset, you can calculate the offsets and sizes as multiples of your record size. That's the beauty of fixed size records. 🙂
It is typically not efficient to read a file in a loop, small portions at a time, so I would not recommend that except in some very specific situations.
Could you be a bit more specific on what exactly you need to do? Is your problem with reading or with parsing the fixed sized records? Could you attach a sample file and some description on what you need to read from it.
Message Edited by altenbach on 09-05-2007 07:50 PM