LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what decides the writing rate to a text file in DAQmx

Hello All,

     i was going through the example VI(WriteTxtFile_GoodExample.vi) in this link . When i used wite to spreasheet file.vi and run the vi for 10sec, i observed that I do not obtain 25,000Hz*10sec = 250,000 data points. 

Instead, the file contained (25,000Hz/ 1000samples per channel) = (25samples/sec )*10sec = 250 samples...

 

However, if i used Write_to_measurement_file.vi and ran the code for 10sec, i observed that I have 25,000*10 = 250,000 data points in my file.

 

I am little confused with this, can anyone please explain me the logic behind saving methods of these 2 files???

 

i understand that the loop timing in this case is determined by the (sampling rate/ number of samples), and that could affect the Write-to-spreadsheet-file.vi, but, then why it doesn;t affect write to measurementfile.vi???

 

thanks

 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 1 of 7
(3,281 Views)

The WriteTxtFile_GoodExamples uses NChan NSamples. Is that what you mean or perhaps a single channel would be sufficient?

Ben D.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,241 Views)

N-channel N-samples, as most of applications have multiple channel analog i/p's

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 3 of 7
(3,234 Views)

Do you have the express VI in the loop? Would you mind including a screenshot of the settings for it and the entire block diagram?

Ben D.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(3,218 Views)

Ben,

please see the attached file... i have edited the example vi and saving 2 files using 2 different vi's (write to spreadsheet.vi and write to measurement.vi). you will observe that the file saved using write to spreadsheet.vi will save the data points at rate -- 10,000/1000 = 10 samples/sec

however, write to measurement.vi will save data points at 10,000 samples/sec rate.

 

Can you please explain why is there a difference like this? is this a bug rather being a FEATURE of labview?

Now on LabVIEW 10.0 on Win7
Download All
0 Kudos
Message 5 of 7
(3,191 Views)

You are using Write to Spreadsheet in a completely incorrect manner. You are not only throwing away the timing information but also most of the data because you have wired the waveform output to the 1D array input. The red coercion dot is a big clue that something is not right. In order to get all of the data points written, you must use Export Waveforms to Spreadsheet File.

0 Kudos
Message 6 of 7
(3,183 Views)

Dennis, THanks for that input... that explains why am i getting only 10samples/sec in the spreadsheet file instead of 10,000 samples/sec.

now that this point is clear, can you please throw some light on adding a counter input data to this data-file, something like this...

??

i have observed lot of problems using this format of data-saving and yet don't have a answer how to write data to file using multiple types of inputs.

usual problem include:

1. counter input being written at the rate of loop (in this case it would be written at 10 samples/sec, and analog input would be written at 10,000 samples/sec.

2. loss of counter input data.

 

please advice.

thanks

 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 7 of 7
(3,169 Views)