11-04-2020 05:07 AM
Dear
I have a CDAQmx with four sloty. In one slot is a 24bit alaog input card NI9209.
I tried to measure continously a chunk of 100 samples witha sample rate ov 1000Hz.
My main consumer starts the measurement and ma ADC consumer shall do the measurement.
So far so well.
It performs like expected.
Caling the ADC consumer from my Main consumer to fetch actual data works to.
What happens is tzhat the ADC consumer gets slower and slowe all the time.
Has anyone of you a idea why thia happens?
Best regards
Martin
11-04-2020 05:44 AM
Hi Martin,
@Martin_Kunze wrote:
Caling the ADC consumer from my Main consumer to fetch actual data works to.
What happens is tzhat the ADC consumer gets slower and slowe all the time.
Has anyone of you a idea why thia happens?
Why do you need to initialize the task each time and why do you need to kill the task each time?
Is there a reason to use a "Finite samples" setting when you want to read more then 100 samples?
Btw. are you sure you are reading 100 samples when you just use the mean of the samples you read? To read exactly 100 samples you should request exactly 100 samples from DAQmxRead…
11-04-2020 06:14 AM
Hi GerdW
Thank you for the hint.
I measure now with a simpler attempt and fetch 100 saples from the read vi.
I do this 20 times.
repeat the measurment with the expectation to get always the same values.
That works two or three times and that the first value is bad.
The card measures 10.4V while it should measure 120mV.
Later the secound value is 10,4V too and so on.
This is is not explainable because the relais that lead the voltage to the AI are working fine and the clamp voltage at the NI card is correct at measurement time.
It looks linke somehow there are samples avvumelated after the end of measurement and with a new call the wrong values are read in.
Does a possibility exist to erase the internal cDAQ chassi or PC internal buffer?
Regards
Martin
11-04-2020 06:22 AM
Hi Martin,
@Martin_Kunze wrote:
I measure now with a simpler attempt and fetch 100 saples from the read vi.
I do this 20 times.
repeat the measurment with the expectation to get always the same values.
That works two or three times and that the first value is bad.
Does a possibility exist to erase the internal cDAQ chassi or PC internal buffer?
Mind to attach your current "simpler attempt" so we know what you are talking about?
To erase any buffers you can:
Again: attach your code!
11-04-2020 06:24 AM
Sorry.
11-04-2020 06:32 AM
Hi Gerd
these are the results.
Two times I get the correct value and that the first value is wrong and will be further wrong.
Later the secound value will be wrong too and so on.
11-04-2020 06:45 AM - edited 11-04-2020 06:45 AM
Hi Martin,
@Martin_Kunze wrote:
these are the results.
Two times I get the correct value and that the first value is wrong and will be further wrong.
Later the secound value will be wrong too and so on.
These numbers are meaningless to us as we don't know nothing about your DUT or the way you setup your measurement parameters…
Problems with your VI:
11-04-2020 06:57 AM
Hi Gerd,
the AI card can sample with more than 10K in high res mode.
To clear up a little bit...
The 10k sample rate worked always fine.
1k samples also.
As long as the values at the AI pin don't chnge the reault is always the same.
I will go back 10 finite samples and read out all samples using -1 at the read function.
Reduce the sample rate to 1k and the samples to 100.
Let's see. Ithink that nothing will change
I simply wont to measure 100 samples on demand.
This is it and I don't understand where the failure is comming from.
Can you correct my VI so that is does exactly what I want and nothing more?
Regards
Martin
11-04-2020 07:04 AM
Hi Gerd,
I have tried the recent version on the target and it's just the same.
The first 10 measurements are correct and the eleventh and so on are wrong.
11-04-2020 07:36 AM
Have you tried using MAX or one of the shipping examples for voltage measurement to help troubleshoot? If not, you should.
To be blunt: over the years on these forums, I've learned to start with a bit of skepticism about posters' self-diagnosis of their problems. A pretty significant majority of the time, the answer comes down to, "you're doing it wrong". The user's code, approach, or assumptions are flawed somewhere, not LabVIEW, DAQmx, or DAQ hardware. There are exceptions, but they're pretty rare.
MAX and the shipping examples have been tested out pretty thoroughly. If you get expected results there but not with your own code, well, probably "you're doing it wrong" somewhere.
-Kevin P