Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling multiple points/multiple channel

Hi,
 
I'd like to be able to sample continuous data points from multiple channels on the PCI-6259 board as follow:
1.  Sample 4 points at 250KHZ from channel AI0
2.  Sample 4 points at 250KHZ from channel AI1
3.  Sample 4 points at 250KHZ from channel AI2
4.  Sample 4 points at 250KHZ from channel AI3
5.  Repeat 1 to 4 continuously.
How can I do the above by setting up just 1 task, or do I need to setup 4 different tasks?  BTW, I'm using LabWindows/CVI 8.5
 
TIA
 
0 Kudos
Message 1 of 8
(3,899 Views)
Hey nantek,

It is possible to do round robin sampling in one task, but you can only sample 1 point at each interval. To do this sampling 4 points you will have to create 4 separate tasks and start and stop them.
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 2 of 8
(3,873 Views)
Actually you don't need separate tasks. You can use DAQmx Create Channel to add channels to a task. The channels do not have to be all different. For some reason this only works for me if I wire something to the "name to assign" input.

Chris R.
0 Kudos
Message 3 of 8
(3,861 Views)
Hey nantek,

I was actually mistaken. Check out the example below. You can do this by creating 4 channels for each input. You can place the Create Channels in the order that you want to sample in. Just make sure to name each channel differently.

Sampling Different Channels at Different Rates with NI-DAQmx
http://digital.ni.com/public.nsf/allkb/96FD2F4685065C7686256F25006EE8DE?OpenDocument
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 4 of 8
(3,856 Views)

Hi Chris,

Do you have the above example in LabWindows/CVI?

thanks

0 Kudos
Message 5 of 8
(3,852 Views)
BTW, the reason that I want to do that is I need to average 4 data points from each channel, and only want to switch the multiplex 4 times instead of 16 times.
0 Kudos
Message 6 of 8
(3,847 Views)
Hi Chris,
I figure it out how to do it in LabWindows/CVI.
Thank you for your help.
0 Kudos
Message 7 of 8
(3,846 Views)
Sorry, I forgot you were using LabWindows/CVI and no I only have a LabVIEW example. I attached a screenshot of the example so you can see the programming flow. The flow will be the same for LabWindows/CVI and LabVIEW. In your CVI code you will have 16 total DAQmxCreateAIVoltageChan function calls or 4 for each input. Again, make sure to change the "Name To Assign To Channel" for each function call.
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 8 of 8
(3,843 Views)