Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How does the ReadMultiSample method work

Hi,

 

I am fairly new at this and have tried to find this information. I hav the following scenario:

 

I have an I/O-board that takes an analog signal and outputs another scaled signal. I want to measure the input signal for instance 5 volts and then the output signal 2.5 volts. I want to do this with say 1000 samples but I want it to read 1 sample from the input and then one sample at the output 1000 times. Little pseudo code would look something like this:

 

do 1000 times

valuein[i] = Read channel ai0 one time

valueout[i] = Read channel ai2 one time

 

 

I have created the, Task, VoltageChannels and named them, created an AnalogMultiChannelReader and.

 

My question is then: Can I use double[,] values = theReader.ReadMultiSample(1000) to achieve what I want to do.

 

Are there any other settings I have to make on my ChannelReader or Task to make it work as I want? 

 

I appologize for this newbie-question.

 

Regards

Kjell

 

 

 

I hav a NI USB-6289 M-Series with Windows XP.

 

0 Kudos
Message 1 of 2
(3,069 Views)

Hey,

 

 

I'm not sure if I completely udnerstood what you want, there where so many "ins" and "outs" mixed together.

 

But if you want to get a measurement which does something like:

AI0 0

AI1 0

AI0 1

AI1 1

AI0 2

.

.

.

AI0 999

AI1 999

 

then this is exaclty what your card does when your acquire 1000 samples at AI0,AI1.

 

For more information please see here: http://digital.ni.com/public.nsf/allkb/DBE7AC32661BCF9B86256AC000682154

 

 

Christian

0 Kudos
Message 2 of 2
(2,997 Views)