From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-16-2018 06:09 PM
I am using NI USB-6361 to collected voltage data from system. The block diagram as what I showed below in Pic. 1, it is very straight forward, It is like a While loop includes DAQ assistance and Write to measurement. I set 500 as samples to read number, 1000 as rete. However when I check the text file which was written by Write to measurement function, the time increment column have big time gap at the end of each 500 samples, as shown in Pic. 2.
Also I tried DAQMX serious instead DAQ assistance to acquire signal, now the time increment delay onset to each of samples. It shown in Pic. 3.
I am so confusing about what is happening, and please help me to solve this problem!
08-16-2018 08:53 PM
Well, LabVIEW needs time to write to the file before the loop can go to the next iteration, at which time the DAQ needs to start again. You want to use lowlevel daq and file IO and a produce/consumer architecture to take the file IO out of the DAQ loop.
08-16-2018 10:07 PM
sorry what are lowlevel daq and produce/consumer architecture means? and If I move the Write in measurement out of loop, it will not write in data anymore.
08-16-2018 11:22 PM
"Baby LabVIEW" (Express VIs and dynamic data) are not suitable if performance is an issue. As a first step, go here and look for the section "LabVIEW training resources". Then look at the examples that ship with LabVIEW, and search the forum for similar questions.
08-16-2018 11:30 PM
I have been using Labview for 1year, I have never met this problem because what I am currently using is the only DAQ card without chassis which means no embed clock. And during last couple, days I tried all potential block diagram, none of them work. And I search through the form and did not find any solution. That is why I am need help, if you can give me the rough ideal with a block diagram, I will really appreciate.
08-17-2018 12:59 AM
Hi John,
if you can give me the rough ideal with a block diagram, I will really appreciate.
- LabVIEW comes with a huge library of example VIs, lots of them dedicated to explain (nearly) all aspects of DAQmx! (NONE of those example VIs use the DAQAssistent…)
- There is this wonderful article about DAQmx!
On your task:
When you set a sample rate of more than 100Hz you should NEVER use DAQmxRead with mode "1 chan 1 sample"! Use "1 chan N samples" with "number of samples" set to ~ 1/10 of the sample rate to read an array (or waveform) of samples! Reading just one sample is way too demanding for such a task…
08-18-2018 11:38 AM
@JohnJoy wrote:
.... because what I am currently using is the only DAQ card without chassis which means no embed clock. .....
The USB-6361 with its price tag and its 2 MS/s sampling rate certainly has an internal clock!
08-18-2018 02:45 PM
Go to the Help Menu then Choose Find Examples, search DAQmx Voltage - Finite Input or Continuous Input. Those VIs are extremely helpful for getting started. They also have logging built in, so no need for producer consumer.
mcduff
08-19-2018 08:19 AM
@GerdW wrote:
Hi John,
if you can give me the rough ideal with a block diagram, I will really appreciate.
- LabVIEW comes with a huge library of example VIs, lots of them dedicated to explain (nearly) all aspects of DAQmx! (NONE of those example VIs use the DAQAssistent…)
- There is this wonderful article about DAQmx!
On your task:
When you set a sample rate of more than 100Hz you should NEVER use DAQmxRead with mode "1 chan 1 sample"! Use "1 chan N samples" with "number of samples" set to ~ 1/10 of the sample rate to read an array (or waveform) of samples! Reading just one sample is way too demanding for such a task…
Better yet use 1 channel n samples with samples to read =-1
Why are you not using TDMS. and the DAQmx LOGGING feature? (Look in the examples) Tha DAQmx logging is hyper-optomized with streaming to file that is ORDERS OF MAGNITUDE. Faster than Write to measurement express.vi set to text data.
Some of my fellow Champions need a DAQmx refresher. Look around the Badge section for free training.