Hello,
I'm using a USB-6008 and I want to get a timestamp for each sample that I acquire. As you can see in my code I'm using an AnalogWaveform. I found out that I have to set the Timing enumeration of the WaveformAttributeModes property to gather the time data and include it with your waveform data. But I don't know where to set the WaveformAttributeMode??
private AnalogMultiChannelReader analogInReaderCheck;
private int samplesPerChannel = 50;
private int rateHz = 500;
private Task checkTask;
private AsyncCallback analogCallbackCheck;
.........
checkTask = new Task();
// Create a virtual channel
checkTask.AIChannels.CreateVoltageChannel("dev1/ai0:3", "",
AITerminalConfiguration.Differential, -1, 5, AIVoltageUnits.Volts);
// Configure the timing parameters
checkTask.Timing.ConfigureSampleClock("", rateHz,
SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, 1000);
// Verify the Task
checkTask.Control(TaskAction.Verify);
analogInReaderCheck = new AnalogMultiChannelReader(checkTask.Stream);
analogCallbackCheck = new AsyncCallback(MyCallback);
analogInReaderCheck.SynchronizeCallbacks = true;
analogInReaderCheck.BeginReadWaveform(samplesPerChannel, analogCallbackCheck, checkTask);
.............
kind regards