From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Biomedical User Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Be sure to use "One header per segment" option when saving data

Hi, I just noticed a trick on using the ECG Feature Extractor of NI Biomedical Starter Kit. When you save the data acquired from your DAQ, either in LVM or TDMS format, be sure to check "One header per segment" in "Write to Measurement File" express VI. Otherwise, ECG Feature Extractor will only load the part of the data specified by the "Samples" tag.

Another solution is to manually change the number of samples by your actual amount of samples in the "Samples" tag if you chose "One header only" when saving the data.

--
Forrest Sheng Bao, Ph.D.
Assistant Professor, Dept. of Electrical & Computer Engineering
University of Akron, Akron, OH, USA
https://sites.google.com/site/forrestbao/
Message 1 of 3
(3,840 Views)

Hi Forrest,

Thanks for your trick .

ZJ Gu

0 Kudos
Message 2 of 3
(2,860 Views)

For those who do not know what I mean by "Samples" tag, I am attaching a snapshot to explain. On Linux or Mac OS X, you can use head command to check the head part of your LVM file. The Samples tag is highlighed. By default, it is the number of samples per segment. But since i chose only one header for all segments when saving it, it was 1000. Now I have changed it to 84000 and ECG Extractor has no problem with it.

Samples.png

Also, for those who have no idea on the number of samples, I am attaching another snapshot to explain.

numbers.png

If you use tail command on Linux or Mac OS X, you can see the ending part of your LVM file. The last line of my file is 83.999000, -0.070161. According the specification in the head, 83,999000 is the last time stamp. So the number of samples is [(last time stamp) - (X0) ] / Delta_X where X0 and Delta_X are specified in the header as shown in the snapshot above.

For more details about LVM format, please refer to the specification: http://zone.ni.com/devzone/cda/tut/p/id/4139

--
Forrest Sheng Bao, Ph.D.
Assistant Professor, Dept. of Electrical & Computer Engineering
University of Akron, Akron, OH, USA
https://sites.google.com/site/forrestbao/
0 Kudos
Message 3 of 3
(2,860 Views)