I have certain doubts about how to configure the samples/channel at a determinate rate for a continuous acquisition using the NIDAQmx library in Visual Studio C#.
I am acquiring 5 analog channels using the NI USB-6212 board. I want to acquire at a 200Hz per channel rate, so the total acquisition rate should be 1200 Hz (200Hz per channel)?, or the rate specified at ConfigureSampleClock method is per channel (1200Hz per channel)? There is no specification for this.
myTask.AIChannels.CreateVoltageChannel("dev1/ai0:4", "", AITerminalConfiguration.Rse,
minValue, maxValue, AIVoltageUnits.Volts);```
myTask.Timing.ConfigureSampleClock("", rate, SampleClockActiveEdge.Rising,
SampleQuantityMode.ContinuousSamples, sampleperchannel);```
Also, what should be the relation between rate and sampleperchannel?
For the
SampleQuantityMode.ContinuousSamplesmode,samplesPerChannelis a size of a per-channel buffer: docs.It should be sufficient to hold at least
myTask.EveryNSamplesReadEventIntervalsamples, which you get in theEveryNSamplesReadevent handler.