Biomedical User Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with opening lvm files with no header and no time

Hello!

I've been receiving data using the attached "serial_arduino3_copy" file attached. It simply saves the values without time information and without headers. I attached a sample file entitled "sample". When I try to open these files using the "OpenLVM_copy" file, the output graphs do not come out right. 

Here comes the weird part, I tried saving the recieved files with header and I've attached that file as "testRewrite". The header of this specific file has Relative as its time prefernce but more importantly the Delta_X is 0.001 which is important to read the file as having a sampling of 1kHz. The file,"testRewrite", is able to be read successfully by the OpenLVM_copy file. Oddly, I am not able to reproduce this type of header in any other testing.

BUT luckily, I found out that if I open the testRewrite file then open one of the files without time info or headers (in this case, "sample"), and re-write the file with header and finally open it again, it turns out that the file is successfully read. Sorry for the complication, but this can be best understood by looking at the series of Read and Write VIs at the upper left corner of the OpenLVM_v1_copy file. The successful opening of the files is implemented using the OpenLVM_v1_copy but take note that you must open the testRewrite file first by allowing "Read Measurement FIle3" to find the "testRewrite".

Currently, all the VIs attached are set to work with all the files placed in the dektop. So just download everything and copy all of them to the desktop. Try opening the sample file with the OpenLVM, then try opening it with the OpenLVM_v1.

Is there an easier way to achieve the proper opening of the files without going through the open testRewrite, open file, re-save file, and open file?

And an explanation on why OpenLVM_v1 works would also be helpful.

Note that I tried in serial_arduino3_copy to save files with header, but was unable to acquire a file similar to the testRewrite, the Delta_X is either wrong or 0.

Thank you!

I hope someone can help, I really need this.

0 Kudos
Message 1 of 5
(4,336 Views)

Hi,

For sample.lvm, it has no header and time. Please uncheck "First column is time channel" in Read from Measurement File.

For testRewrite.lvm, it has header. Please uncheck "Read generic text files" in Read from Measurement File.

Thanks!

ZJ Gu

0 Kudos
Message 2 of 5
(3,195 Views)

And I sugget that you use TDMS file format. It is very easy to use.

0 Kudos
Message 3 of 5
(3,195 Views)

Will using TDMS file be compatible with the OpenLVM copy I have already built?

0 Kudos
Message 4 of 5
(3,195 Views)

I think so. You could choose "Binary (TDMS)" in Read from Measurement File Express VI.

Thanks!

ZJ Gu

0 Kudos
Message 5 of 5
(3,195 Views)