09-27-2005 10:56 AM
09-27-2005 12:18 PM
09-28-2005 04:59 AM
I'm also having a problem with the Read LVM express VI. It will either read segments in the original size or read a specified number of samples as a segment. My problem is I wrote data to a LVM as 20 sample segments and if I read in the original size the Read LVM only reads the first 20 samples (ie. the first segment). If I change the Read LVM to read n samples it can only it if I've already found out how many samples my LVM file contains.
Why can't the Read LVM express VI work out where the end of the LVM file is and display all the data?
Cheers,
Bob
09-28-2005 06:44 PM - edited 09-28-2005 06:44 PM
Bob,
This is simply the way that LVM file reading/writing has been chosen to be implemented. It is actually a huge feature that an LVM file parses the data into the segments in which they are written. If you simply want to read an entire file all at once, you should just use the EOF (end of file) output and keep reading the file one segment at a time until you've reached the end. I've included an image below of this concept:
I added the Append Signals VI into the mix to make one contiguous signal in the end, but you could handle the data however you wanted. Hope this helps you out!
Message Edited by AESulzer on 09-28-2005 06:44 PM
09-29-2005 03:37 AM
Thanks E. Sulzer!
That has helped me out a lot! I did think that some kind of loop must be the answer...
Bob
09-30-2005 03:04 PM
The LVM I'm using is just a tab-delimited file with 16 8-digit numbers, like:
0 12312412 12312441 12455623 12414124 12312443 12345433
The file was created using the Write LVM Express VI that came with LabVIEW. I'm trying to read it back with the Read LVM Express VI that also comes with LabVIEW. I think it's looking for a termination character or something like that, but I'm not exactly sure. I know that I have to click the "Read generic text file" checkbox to receive the "Error 4 End of file encountered" message or else I receive the "Error 100 File contains erroneous data. Normally for user data files" message. I can see the data split up into columns in the Sample File Data table in the dialog box of the VI, so I know it can at least read the file that much. I've tried to create a VI where the only thing in it is the Read LVM Express VI wired to a numeric indicator and it gives me the same errors. I would really appreciate anyone who has any insight on this problem.
09-30-2005 03:30 PM
09-30-2005 03:46 PM
10-03-2005 06:33 PM - edited 10-03-2005 06:33 PM
I was able to read the LVM file just fine without any errors. Below I've posted the way that I configured the LVM Read.vi. Make sure that you have the proper settings!
Message Edited by AESulzer on 10-03-2005 06:33 PM