LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from binary measure file starting a specified time

I have a write to measure VI running on a data acquisition. It's saving data in a binary format with XML headers from a channel.

I want to have the capability of reading back in the data starting at a specified time. What's the best way to do it? In another words, I don't want to read in the entire file from the beginning. I want the ability to start a specified time. I know that t0 is saved. I have the sampling frequency.

Thanks.
0 Kudos
Message 1 of 4
(2,773 Views)

I assume that you are writing to a TDM file. If you want to perform random reads, you can do so with the binary file that contains the raw data. I've attached a VI that writes

a 100x1 array in a binary file and you can then read back the element you need without having to read all the data from the file. The Set File Position allows you to do so.



Message Edited by KostasB on 03-07-2008 05:23 AM
Download All
0 Kudos
Message 2 of 4
(2,758 Views)
so I have to use read and write from binary files and can't use the express VIs?
0 Kudos
Message 3 of 4
(2,751 Views)
You can not use the Express vi's to perform random read/ writes. You can use the data storage vi's to perform queries in your dataset depending on specific conditions (e.g. display all the channels
 
when maximum temerature was >55 C). If you do not really need the hierarchical structure and channel properties that the TDM file format provide ( because of the XML header- file), I would suggest that you just save your data
 
in binary files. This will allow you to perform random read/writes, it will be faster and will reserve less disk space. 
 
KostasB
 
NIUK
0 Kudos
Message 4 of 4
(2,743 Views)