LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Quirk In My Analog Input Signal

Solved!
Go to solution

Hi All,

 

I'm fairly new to LabView so bear with me. I have an issue with my analog input signals and I can't figure out where it is. Regardless of my sampling rate via the DAQ Assistant, I'll get pockets of "constant" values in my signal. This shows up in my measurement file that I'm writing to, and viewing in real time might I add, as plateaus in my data. Attached is a matlab plot of 10k data points acquired at a sample rate of 5kHz. This should be a fairly smooth analog signal but it's not. This data is simply literal voltage over time. I use a voltage divider to cut the signal so it's in reading range of the DAQ then post process it back up to its original value. I have two other channels that show the same anomaly. The "batches" of constant data are acquired every 0.155s. Confirmed this after analyzing measurement files for 5kHz acquisition and 2kHz acquisition. 

 

I have also attached my VI. It's not very complicated which is why I'm frustrated that I can't find where the problem is coming from. Is it a timing thing? The DAQ is acquiring at 5kHz and I'm reading 500 samples per loop with a 100ms wait on the loop. I should be reading every sample acquired every second.

 

Any ideas and thoughts are appreciated. Thanks in advance.

 

Matt

Download All
0 Kudos
Message 1 of 6
(1,001 Views)

Couple of questions:

 

- What are the units for the graph you attached

- What hardware are you using

 

Some possible things which jump to mind. Neither seem overly likely though I do admit.

- The steps that you are seeing is actually the maximum resolution of your hardware although I think this is unlikely

- Your hardware has a slow maximum sampling rate, this is typical for some thermocouple cards for example

 

As an aside, you don't need the wait function. The DAQ Assistant will wait until it has the number of samples that you have requested. Having a wait function in there means that you risk that waiting for longer than it takes to acquire you samples and then missing samples.

0 Kudos
Message 2 of 6
(967 Views)

Graph units are simply time on the x-axis, voltage on the y. Based on my setup, if the experiment were ideal, I would be getting a constant voltage. Fluctuations cause that to vary in an irregular pattern e.g. there are no frequencies in this signal to extract.

 

Hardware is C-series module. I don't recall the exact module number off the top of my head. Will have to check that when I get back on Monday but I had the same though. It's very unlikely this is a hardware limitation. I'm not doing anything crazy. And I do not have any thermocouples/temperature sensors.

 

Hmm ok I'll ditch the wait function. I was encountering buffer issues for a little bit and that seemed to help but theoretically it does seem unnecessary.

 

Matt

0 Kudos
Message 3 of 6
(951 Views)
Solution
Accepted by topic author matt10101

The DAQ Assistant is marked as "high resolution" on the timing. Depending on the module, that might cause such a slowdown?

 

In particular, the NI-9219 ("Universal Analog Input", which seems plausible from the "Current Sense" channel you have) claims 100 samples/s/ch, but only if in "high speed" mode. See (if relevant to you) 9219 datasheet

 

The 9209 ("Voltage Input") (which actually, looking at the timing and the VI you send, I would bet is your module) lists 500S/s (samples/s) - note that:

  • There is no "/ch" here, so the sampling rate is shared, and 
  • The datasheet lists the following text:
    Conversion time (per channel)
    High-Resolution Mode 52 ms
    High-Speed Mode 2 ms

That is, in high-res mode, with 3 channels, you'd expect one sample from each channel every 156 ms if collecting together in that way.

 

Probably switch to high-speed mode and you'll have an improved experience (but you still can't get 500S/s/ch, so you'll have to reduce your target rate, or number of channels).


GCentral
0 Kudos
Message 4 of 6
(924 Views)

@myEHtrip Login wrote:

Hi All,

 

I'm fairly new to LabView so bear with me. I have an issue with my analog input signals and I can't figure out where it is. Regardless of my sampling rate via the DAQ Assistant, I'll get pockets of "constant" values in my signal. This shows up in my measurement file that I'm writing to, and viewing in real time might I add, as plateaus in my data. Attached is a matlab plot of 10k data points acquired at a sample rate of 5kHz. This should be a fairly smooth analog signal but it's not. This data is simply literal voltage over time. I use a voltage divider to cut the signal so it's in reading range of the DAQ then post process it back up to its original value. I have two other channels that show the same anomaly. The "batches" of constant data are acquired every 0.155s. Confirmed this after analyzing measurement files for 5kHz acquisition and 2kHz acquisition. 

 

I have also attached my VI. It's not very complicated which is why I'm frustrated that I can't find where the problem is coming from. Is it a timing thing? The DAQ is acquiring at 5kHz and I'm reading 500 samples per loop with a 100ms wait on the loop. I should be reading every sample acquired every second.

 

Any ideas and thoughts are appreciated. Thanks in advance.

 

Matt


Why is RDP Considered Less Secure Than LogMeIn or VPN?

0 Kudos
Message 5 of 6
(911 Views)

That's the last time I ever make an assumption about my hardware. I'm using the 9207 module. You're right. Max sample rate of 500S/s not /ch so it's shared among 3 channels and being split. Thanks so much. Need to find a different module to use..

 

Cheers,

Matt

0 Kudos
Message 6 of 6
(890 Views)