02-27-2006 06:28 AM - edited 02-27-2006 06:28 AM
Message Edited by BoVJ on 02-27-2006 06:29 AM
02-27-2006 11:05 AM - edited 02-27-2006 11:05 AM
Hi,
At first glance, I see exactly what is wrong. I had the same thing happen to me when I started using the new LV 8.0 file I/O functions. After you get done writting all of your data to file, you must call the "Set File Position" VI to set the read pointer back to the start of the file.
The file write and read pointers always point to the same location, so in your code you start writting data to file and LV is updating the read/write pointer to be at the end of the file. Then when you went to read the data, the read pointer was already at the end of the file, hence the EOF error and no data. This is why you must call the "set file position" VI to move the read pointer back to the start of the file.
Given that, you can stop using the flatten string functions and just write your cluster to file. This will clean up your read and write operations. I have attached a modified version of your VI.
-Jared
Message Edited by JaredW on 02-27-2006 11:07 AM
02-28-2006 02:25 AM
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
Thank you very much Jared. You just saved me a lot trouble.
It looked so simple in the help files describing the method for reading binary files... except the problem with the @#¤€&½øåæ#£*€ file Pointer.
Have a nice day.
Bo Vestergård Jensen
Denmark