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-25-2013 10:24 PM - edited 08-25-2013 10:30 PM
Hello,
I have made a simple analog voltage data acquiring system with DAQMX.
It is made for capacitance readout, where capacitance value output comes out from the circuit in periodical voltage signal.
What I want is to get data from four capacitors simultaneously via four channel, using n channel n samples (2d dbl).
My VI's structure is nearly similar with the continuous voltage sampling examples in LabView, except for some other calculations in the loop.
And for the trigger sync, I fixed the trigger edge with the external signal from the capacitance readout circuit.
Version no.1 has one channel for input voltage data. Version no.2 has four channels for input data.
While ver.1 can acquire the accurate data from the readout circuit of four capacitor each(one channel at a time),
ver.2 acquires four channels of data, with only one channel data fine, others all got wrong.
I saw an error -200279 occur at the DAQMX read 2d dbl part, so I tried increasing buffers by changing sampling rate or number of samples, but it didn't work any.
I looked up for most of forums with error -200279, but the solution wouldn't work out on mine.
Can anyone look for the problem? I will attach my VIs. It may include a bit of Korean language, but most of them is in English, won't be too difficult to recognize. Sorry for the inconvenience.
Oh I forgot, my DAQ is NI USB-6259, and it runs in Win XP sp3, and LabView 8.6.
Thank you.
Solved! Go to Solution.
08-26-2013 06:10 AM
If you looked up the error in LabVIEW, you would see this definition of the error:
Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
You need to acquire more samples in a given read. Or better would be to read all of the available samples (set samples to read to -1).
08-26-2013 07:58 AM
There are various reasons responsible for this error to occur.
You will find this interesting.
08-26-2013 04:31 PM
@crossrulz wrote:
You need to acquire more samples in a given read. Or better would be to read all of the available samples (set samples to read to -1).
I've tried it before posting, by increasing sampling rate or decreasing sample number or defining buffer space. but it didn't work..
Thank you.
08-26-2013 04:39 PM
@moderator1983 wrote:
There are various reasons responsible for this error to occur.
You will find this interesting.
Yes, I've been reading it since the error occured but any of them hasn't worked.
They seem to be nice answers but I can't solve my error with them.
I even tried my VI in an advanced PC rather than the previous computer being suspcious of out of memory, but it didn't work. I'm getting frustrated a bit.
Thank you.
08-26-2013 07:00 PM
Oh, I think I found the problem. The reason I couldn't get the data is that DAQ doesn't readout all four signals at the same time
when I give the trigger signal; instead it readout four signals sequentially, meanwhile data change to unintended state.
But I need precise sampling for all the data. How can I sample all four channels at the same time?
08-26-2013 07:12 PM
Hello Azurenight,
The 6259 is a multiplexed M-series DAQ card, meaning that it isn't possible to sample each signal at the same instant, rather the channels are all sent through the same ADC and must be sampled in order. More information on this can be found here:
LabVIEW Help: Multiplexed Versus Simultaneous Sampling
http://zone.ni.com/reference/en-XX/help/370466W-01/mxcncpts/multisimulsamp/
It might still be possible to get the data you need with the card you have- could you provide more information on the maximum allowable delay between samples on different channels?
If you need *actual* simultaneous sampling, you'll likely need different hardware.
Regards,
08-26-2013 07:33 PM
Thank you for answering, Tom.
I've checked my signals: four signals come out at the same time and all of them last 6us after the trigger signal.
So I think all signals should be sampled in 6us. Would it be possible?
08-26-2013 07:37 PM
08-26-2013 07:50 PM
Well, I solved the error by reorganizing my VI in to flat sequence that at each frame DAQ task starts and stops in other to sample a channel at a frame, and with four frames for each channel I checked correct data acquired. It is slow and inefficient however, so I have to think of other methods anyway. It is the problem of multiplexed sampling.