LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing waveforms to file

I'm having problems writing waveforms to a file.
I have a very simple VI in which I've used the DAQ assistant to acquire two voltage signals. I would like to read that data to a file, but it seems to only write the amount of data that I specify in the "samples to read" field when I use "continuous samples" acquisition mode. Is there a way to just read a continuous amount of data without specifying the amount of samples to read? When I put in a very large number for "samples to read" i get an error. It seems strange that one has to specify the number of samples to read in a continuous reading mode, so there is something that I am missing here.
Thanks.


0 Kudos
Message 1 of 3
(2,673 Views)
Mw1,


The way a DAQ application works is that if you select continuous samples, the DAQ card will acquire data continuously and the samples to read determines how many samples are pulled into LabVIEW from memory. What I suspect is happening with your program is that you do not have the DAQ assistant in a Loop and therefore it is only being called once, in which case it makes sense that your are only writing to files the amount specified in samples to read. For you to continuously write samples to a file, you would have to place your DAQ assistant VI in while loop.

To give you a more specific example, say you have set-up the DAQ assistant you acquire at 1KHz and the samples to read to 100. In this case the DAQ card will acquire continuously 1000 points every second and storing them on a buffer. Every time the DAQ assistant is called, 100 samples are read from the buffer into LabVIEW. Putting the DAQ assistant in a Loop means that you would continuously be reading "chunks" of data out of the buffer and into LabVIEW.



Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(2,641 Views)
Hi Eli S.,

Unfortunately I have already included the DAQ assistant in a loop (please see attached picture of my VI). Do you have any other suggestions?

Thanks.

mw1




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