I am having difficulty getting my head around this "Task" based i/o with DAQmx in Measurement Studio 8.0, using C#.
This is the problem I am trying to solve:
I have different devices attached to separate channels of a 6035E MIO board.
I have written classes for each of the different devices, and each class has a Read method.
The Read method attempts to read from a specific channel for the MIO board.
I have found out that I can only have 1 task of a particular type (for
instance Analog Input) running at a time, so I put all of my Analog
input channels into 1 task.
I want to create a separate data reader for each channel that I want to
reader so that I can pass the data readers to each of my device classes
and then I can read from each separate channel using the
ReadMultiSample method of an AnalogSingleChannelReader that I created
from the Stream of the Analog Input task. The thing is, the task
contains multiple channels.
How can I specify a different channel to read for each AnalogSingleChannelReader I create?