06-06-2020 11:21 PM
im just trying using DAQ PCI6224 to acquire three channel data with synchronization. when got the data array from DAQ with only AI1 connection available, the other two arrays for channel(AI0,AI2) have the values as well. What could be the problem? Here is my code via C#
continuousTask = new NationalInstruments.DAQmx.Task();
// Configure the task and create required channels in task
continuousTask.AIChannels.CreateVoltageChannel("Dev1/ai0", "", AITerminalConfiguration.Differential, -10.0, 10.0, AIVoltageUnits.Volts);
continuousTask.AIChannels.CreateVoltageChannel("Dev1/ai1", "", AITerminalConfiguration.Differential, -10.0, 10.0, AIVoltageUnits.Volts);
continuousTask.AIChannels.CreateVoltageChannel("Dev1/ai2", "", AITerminalConfiguration.Differential, -10.0, 10.0, AIVoltageUnits.Volts);
continuousTask.Timing.ConfigureSampleClock("", 30000, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, samplesPerChannel);
continuousTask.Control(TaskAction.Verify);
analogReader = new AnalogMultiChannelReader(continuousTask.Stream);
analogReader.SynchronizeCallbacks = false;
analogCallback = new AsyncCallback(AnalogReadCallback);
// Create a reference (runningTask) to the task running (continuousTask)
runningTask = continuousTask;
analogReader.BeginReadMultiSample(Convert.ToInt32(continuousTask.Timing.SamplesPerChannel), analogCallback, continuousTask);
data1 = analogReader.EndReadMultiSample (ar);
i using the following two files for data acquisition. Is this the problem ?
National Instruments Analysis Enterprise version is 8.1.20.472
NationalInstruments.DAQmx.dll version is 15.5.45.109