Hello,
I am currently using a USB-6008 with LabWindows/CVI. I have an external TTL signal that is being routed into the 6008's counter channel (PFI0) and I would like to be able to use this signal to trigger data collection for the analog input channels. Here is sort of a general summary of the code I am using:
DAQmxBaseCreateTask("",&tH2);
DAQmxBaseCreateAIVoltageChan(tH2,"Dev1/ai0:3", ...etc... );
DAQmxBaseCfgDigEdgeStartTrig (tH2, "Dev1/PFI0", DAQmx_Val_Rising);
DAQmxBaseStartTask(tH2);
From what I understand, each rising edge on the TTL signal should result in the current analog input values being written to the 6008's buffer. Then, calling DAQmxBaseReadAnalogF64() should allow me to collect all of the data in the buffer. The problem is that every time I call DAQmxBaseReadAnalogF64(), I only retrieve two readings from each channel, regardless of how long I wait. A longer delay between calls should result in more data being acquired from the buffer, correct? I've also tried using DAQmxBaseCfgSampClkTiming() in place of DAQmxBaseCfgDigEdgeStartTrig(), but I ran into the same problem.
I'm wondering if I am approaching this the wrong way, or if there is something that I don't fully understand. Any help would be very much appreciated.
Thanks in advance,
Eric