LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring continuous data, but read LVM only reads first 100 points.

I am reading in a continuous signal using the DAQ express tool, but it writes it 100 samples at a time to the file.  I know this because when I forgot to change the setting to write only 1 header I had a new header every 100 samples.  When I come to read the file using the read LVM tool, specifying "read entire sample," it only reads 100 points.  I have to specify the exact number of samples that I want it to read.  How can I have it read the entire sample?
0 Kudos
Message 1 of 17
(3,759 Views)

Hi GMik,

you can read your file in a loop, until EOF? is true.

 

Mike

0 Kudos
Message 2 of 17
(3,735 Views)

I was using the  "read LVM" express tool.  The file was written with the "write LVM" tool.  I used the "DAQmx" tool to acquire the data continuously (it defaults to 1KHz, and it also defaults to 100 samples, but I don't think that option means anything when reading continuously).

 

When reading the file, an option in the tool asks either to "read entire file" or "specify number of samples."  If I select "read entire file" it only reads first 100 samples...which I guess is related to it writing 100 samples at a time through the express tool, but I don't know how to turn that off.  If I specify a number of samples to read it reads them all...

0 Kudos
Message 3 of 17
(3,723 Views)
I'm sorry not the DAQmx tool, I meant I used the DAQ assistant express...
0 Kudos
Message 4 of 17
(3,716 Views)

GMik,

 

Is there any reason you are doing one header per chunk of samples? I might suggest using one header only in the Express VI to write your file.

 

Ahh, I see that you forgot to set this option. Can you not just re-run your VI that writes the values? You could also open u p the LVM in excel and manually remove all the headers if you want to do further analysis on it.
Message Edited by Chris_VH on 04-01-2009 11:26 AM
Chris Van Horn
Applications Engineer
0 Kudos
Message 5 of 17
(3,713 Views)
Oh, I initially forgot the option, but I did change it to only 1 header (not per segment) and reran it, but it didnt seem to change the read LVM express from stopping at 100 points.  Funny thing is it reads fine if I tell it to read 24,000 points or whatever...
0 Kudos
Message 6 of 17
(3,707 Views)

Hmmm,

 

Could you maybe attach your lvm and possibly a screenshot of your code?

Chris Van Horn
Applications Engineer
0 Kudos
Message 7 of 17
(3,704 Views)
Sure, attached is the vi that reads strain, then a VI that reads the LVM and filters it, and a sample LVM.
0 Kudos
Message 8 of 17
(3,698 Views)

Hi!

 

I have come across this problem before.  What happens is you use the "Write Measurement File" and input a Waveform datatype (perhaps) and place this in a loop.  The one header option seems resonable but you will see in that first header is a line under "Channels" called "Samples" and the value is probably "100".  The Read Measurement File function will only read the number of samples specified in the header.  So your first measurement hits the Write Measurement File, and creates the appropriate header information for that first measurement.  When the second measurement comes along, Write Measruement File only appends to the data (but unfortently does not update the header).

 

I've written the attached VI "Read LVM to DAQ Cluster (SubVI).vi" which should disect any LVM file (saved in a number of ways w/ different options) and create a cluster with all the data in that LVM file.  The "output cluster" has the Waveform Data in the proper format included in it.

 

Hope this work.  This is v8.6 file.  Let me know if you want me to convert it to a different LV version (although I'm limited to 8.0+).

 

-Nic

0 Kudos
Message 9 of 17
(3,695 Views)
Oh, the Find and Replace "feature" is because I use this in my reporting toolkit to produce graphs from test data.  Sometimes the channel isn't given a very "report friendly" name or units, so this is a table i use to change the names of the waveforms on the graph.
0 Kudos
Message 10 of 17
(3,693 Views)