Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx read multiple channels in continuous mode

Solved!
Go to solution

Hi

 

using USB NI-6009 with my own C# code

 

I'm trying to read multiple AI channels (single task) in continuous mode but I can't understand how to do it.

I have already read a lot of documentations.....

 

can you help?

 

Thank you

Hanan

0 Kudos
Message 1 of 2
(818 Views)
Solution
Accepted by topic author hananz

I just figured it out.. 🙂

 

here is the C# code for any future reference / needs

 

Task MyAnalogInTask = new Task();

 

AIChannel MyAIChannels;

 

MyAIChannels = MyAnalogInTask.AIChannels.CreateVoltageChannel("dev1/ai0:6", "MyAIChannels", AITerminalConfiguration.Rse, 0, 5, AIVoltageUnits.Volts);


MyAnalogInTask.Timing.ConfigureSampleClock("", 6857, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, 10000);

 

AnalogMultiChannelReader daqMultiReader = new AnalogMultiChannelReader(MyAnalogInTask.Stream);

 

double[] VoltageLevel_Multi;

 

VoltageLevel_Multi = daqMultiReader.ReadSingleSample();

 

 

0 Kudos
Message 2 of 2
(789 Views)