LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing data to a file

Hi

 

My application writing data to a file using producer consumer loop architechture. Producer loop is acquiring data form DAQmx, process data and output the result to a output channel of daqmx one sample at a time (my application is a control system). consumer loop writes data to a file for later analysis using another software. I need to write format, title, nchannel and list of channels to the file first (thease are some lines) . I think that is how other software reads the data or recoganize how many channels to do the analysis. i want to write these lines to the file first and then data. i was able to write data. Is there anyway to write these lines before i write data to the file.

 

Thanks 

0 Kudos
Message 1 of 4
(2,713 Views)
Sure.  Have a special case in your consumer loop.  Either on iteration zero of the loop, or when a special command is sent through the queue, that the header data is written.  Or you could have the header data written to the file before the consumer loop starts.
Message 2 of 4
(2,703 Views)
Thanks for the reply. Could you explain how to write the header lines before the consumer loop starts? thanks
0 Kudos
Message 3 of 4
(2,679 Views)

Like this.

 

Message Edited by Ravens Fan on 09-17-2008 09:45 AM
Message 4 of 4
(2,675 Views)