01-17-2016 05:02 AM
Hi,
I use NI-Daq 9237 to measure with strain gauge. In Labview I take the acquisition with 'Daq Assistant' and save the data with 'Write to measurement file': here i save in TDMS. The file have three columns: in the first I can read the Time given by the clock, in the third the strain values and in the second i should read the intervals between the measurments in second, but here, where for examples i should read intervals of 0,1 seconds, I read always 0,1,2,3 and so on, even if I change Rate and Number of Samples for the acquisition. Someone know how to solve this problem?
01-19-2016 08:43 AM
I would not even use the Write To Meaurement File function. In the DAQ Assistant is a tab for logging. You can just have the data stream straight to a TDMS file for you. It is a lot more efficient.
01-20-2016 04:35 AM
Hi Pietro,
my suggestion is to use the low level TDMS functions, they are more fast than the "Write to measurement file". However, you can also use it without problem.
For setting the interval to your desired one you can try to build a waveform with the desired dt based on the acquisition rate. Then you pass the waveform to the "Write to measurement file".
I hope my answer helped you.
Kind regards.
01-20-2016 05:26 AM
I attach my LabView Code here: I can't find something I could change. I set frequency and number of samples, so I can't undeerstand why in the TDMS file I generate I can't see the right time interval of 0,1 s.
Thank you for your answer, I hope you can help me solving my problem!
01-20-2016 06:59 AM
Hey Pietro,
check out the modified vi taht you can find attached.
Kind regards
01-20-2016 07:12 AM - edited 01-20-2016 07:13 AM
1. No need for the wait in your loop. The waiting for DAQ samples to come in will limit the loop rate.
2. The DAQ Assistant is giving you 160 samples. Yet, you only use 1 of those samples and only from 1 channel. Configure the From DDT VI to convert to a 1D Array of Waveforms.
3. Similarly, your To DDT VI should be configured to take in a 1D Array of Waveforms.
4. Your Stop Acquisition button should be wired to the Stop input of the DAQ Assistant. Then the Stopped output should be wired to your loop conditional terminal. This will allow the DAQmx task to be properly closed out.
01-20-2016 10:05 AM
Thank you very much to both! I will verify your correction as soon as possible!