Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Analog Inputs

Hi

Does any body have a clue of how to get two continuous ( and simultaneous) analog inputs from a M series ( 6259) daq with Labview 7.1. I did wire two seperate channels but get a error when debugging it.

Mal
0 Kudos
Message 1 of 6
(4,229 Views)
Put both channels in the same task. In your Physical Channel control type Dev1/ai0, Dev1/ai1 or Dev1/ai0:1 for continuous ranges. On a single board, you can only run one analog input task at a time. You will also need to use a Multiple Channels version of the Read VI, which you are already doing.
Message 2 of 6
(4,223 Views)
Hi

Thanks. I did the changes. But there is a 200279 error requesting to increase the buffer size. How do you increase the buffer size in daqmx create virtual channel.vi. Also how do you get the 1D array output containing the input channels ( in a single data path) to two seperate data paths. Can you do the necessary changes in the programme.

Mal
0 Kudos
Message 3 of 6
(4,211 Views)
Hi,

Thank you for posting your questions.

With regards to your first question, I believe it is possible to specify the buffer size by wiring a constant value to the "sample per hannel" part of the DAQ MX Timing Sample clock vi. or to specify via Measurement and Automation Explorer.

Thanks,
Kurt
0 Kudos
Message 4 of 6
(4,101 Views)
Mal,

I have modified your VI to allow you to set the buffer size, as well as separating your output into two separate waveforms. For your first problem (the -200279 error), I have added the DAQmx Configure Input Buffer.vi. This will allow you to set the size of the buffer you are reading into. It is important to remember, that if you are getting this error, it is because you are not reading data out of the buffer fast enough. This could be caused by doing CPU intensive operations (i.e. .. FFT, auto-scaling charts/graphs, etc)on a slow computer, or having a lot of other things running in the background. If this is the case, increasing your buffer size will allow the program to run for longer before it errors, however it will not really fix the problem. However I was able to run your example at a sample rate of 100 kHz on my 1 GHz computer without error.

As for the data, using the 1D Wfm-NChan NSamp read flavor, you will get a 1 D array of waveforms back. This array will contain a waveform for every channel in your acquisition. The order of the array will match the order in which you specified your channels. To separate these channels, simply use the index array function to index into the array to the channel you are looking for. I have also added this to your example VI. Please let me know if you have any other questions.

Hope this helps,
Dan
0 Kudos
Message 5 of 6
(4,089 Views)
Hi

Thanks for the help.

Mal
0 Kudos
Message 6 of 6
(4,052 Views)