Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple analog inputs at different sampling rates

Hi!,
I am using PCI 6023 and NI-DAQ 6.9.1 for Windows.

I wish to acquire data from 5 channels but at different sampling rates. The acquisition can start and stop together (not simultaneous but just 'together' to keep things simple). The issue is that the sensors (and thus data type) is different. It is 0-10 VDC on all channels though . But while two channels are Thermocouple, one is Load, one is RPM and the last is Vibration (using accelerometer). For all channels except vibration acquiring point data at relatively slow sampling of say 10 samples per second is acceptable. The problem is with vibration data. I understand I need to acquire waveforms at very high sampling and then do a FFT, right? How do I achieve t
his? Not only is the sampling rate different but also the type of acquisition (ie point and waveform).

Your help is truly appreciated. Thanks!

Best,
Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 1 of 8
(4,057 Views)
Hello Gurdas,

Actually, due to the architecture of the hardware, you must sample all channels at the same rate. So you cannot set up multiple acquisitions acquiring at different rates. The workaround is to sample all channels at the rate that the fastest channel requires. You can always ignore/average the extra samples on the slower channels.

You are correct about your vibration measurments. Just remember that you will have to sample your signal at least two times the highest frequency component of the signal to prevent aliasing. (According to Mr. Nyquist)

Also, you might consider our SCXI and SCC lines of signal conditioning for your accelerometer inputs.

Russell
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 8
(4,057 Views)
Thanks Russell.

This is how I understand things:
I sample ALL channels at twice my vibration frequency and store in an indexed array. I then divide the array into two segmented outputs. One for slow samples (which I get by either averaging or decimating) and the other for vibration. I chose my FFT window and get my vibration results. Right?

Also, I understand that the sampling rate and interchanel delay is SAME for ALL channels.

However, can I acquire for different periods from each channel (at same sample rate and interchannel delay)? Thats means, can I sample channel-0 for Y1 secs at S samples/sec and then sample channel-1 for Y2 secs at S samples/sec and so on?
If yes, please specify how.

Gurdas S Sandhu
Systems Engineer
Quantum Age Tech
Solutions
India
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 3 of 8
(4,057 Views)
Yes, you are correct. Now, you could separate the acquisitions like you are saying. Acquire ch0 for Y1 seconds at one scan rate, then acquire ch2 for Y2 seconds at another scan rate. However, there will be a slight software delay between transitions because you will have to stop the ch0 acquisition, then configure and start the ch1 acquisition. The point I am trying to make is that the transitions won't be completely seamless (as if the hardware were conrtrolling it). But if this is acceptable, then I suppose you can do it.

As far as the implementation, I would use a state machine with the equivalent of the "Acquire N Scans" shipping example within each state.

I hope this helps!

Russell
Applications Engineer
National Instruments

http://www.ni.com/support
0 Kudos
Message 4 of 8
(4,057 Views)
I am stuck!
I am using AI config, AI scan and AI read to acquire data from 5 channels at 30Ksamples/sec. I am using waveform mode.
I am also able to index and get each channel's data out. But I do NOT want all the 30Ksamples/sec for the non-vibration channels.

I need a vi which allows me to pick the first reading or say Nth reading from my non-vibration channels. Thus I display just ONE reading (with time+date stamp) out of the many thousands that have been acquired.

For the vibration channel I will use the full sampling rate to do my FFT.

Also, can you write to me directly at gurdas@qagetech.com to facilitate more efficient exchange?

Gurdas
gurdas@qagetech.com
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 5 of 8
(4,057 Views)
Hello Gurdas,

The best way I think I can explain what I belive you are asking for is an example. Attached, I have modified the "Acquire N Scans.VI" shipping example. I selected the channel I wanted from the waveform array, then I selected a single "Mth" element from that channels data array. Then using a little bit of math, I calculated the timestamp of that element from the initial waveform timestamp.

I hope this helps!

Russell
0 Kudos
Message 6 of 8
(4,057 Views)
That helped. Thanks a ton!

There is another issue that needs attention. I have connected the ICP accelerometer (PCB make and comes with its own sigcon) to channel 1. The accelerometer senstivity is 100mv/g and range is ±50g. Thus output from sigcon is ±5V.

When I test this channel in MAX, I get signal levels which look correct. But, when I use ANY AI vi (in scaled or waveform mode) and display the results, I get absurd readings (as high as 30). The channel is configured in MAX as accelerometer.

My questions:

1. Does MAX show pure voltage signals as coming from the board?

2. What is my vi showing? If its voltage or 'g' then the readings are beyond sensor range.

3. What do the high and low limit settings on
my AI vi mean? Are they the limits of the board (I am using 6023 and thus it is ±10VDC) or the channel (±5V)?

Also, when I configure the channel as voltage and specify range as ±5V the readings from my AI vi are same as from MAX!

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 7 of 8
(4,057 Views)
I'm sure it's something small. Let's distinguish the difference between some things. There are two ways to read a channel.

1) You can read the physical channel (0,1,2,...)
2) Or you can create a Virtual Channel name such as "accelerometer_1"

So let me confirm something. You have successfully configured an accelerometer channel in MAX. When you view it's test panel you get satisfactory readings (+-50g) OR are you reading the physical channel (+-5V)?

Since your accelerometer has it's own signal conditioning, you will not need to use the "accelerometer" Virtual Channel. Instead you should create a "Voltage" virtual channel and enter the scaling and units accordingly. From your program, you should u
se the name of the channel you created as the channel (maybe it's "accelerometer_1") not 0,1,2,etc...

Once you are satisfied with the readings that MAX gives you, if you read from the same channel name in LabVIEW, you will get the same results.

If you're still stuck, it might be easier to work through this over the phone. Go ahead and create a phone support service request at http://www.ni.com/contact and we'll get this straightened out.

Best Regards,

Russell
Applications Engineer
National Instruments
http://www.ni.com/support1
0 Kudos
Message 8 of 8
(4,057 Views)