Hi,
I am controlling the Picolog 1216 for data acquisition by using some C routines. I am modifying the C code examples to get 1 minute of acquisition at 10 Ksps per two channels in streaming mode, but it is not clear to me how I can get the samples from two channels using the pl1000GetValues function. Any suggestions/references?
Moreover, I would also like to retrieve the time-stamp from each acquired sample, is there any function in the lib file that could retrieve it?
status = pl1000SetInterval(g_handle, &usForBlock, nSamples, channels, nChannels);
status = pl1000GetValues(g_handle, &samples[0], &nSamplesCollected, overflow, &triggerIndex);
The samples array will have the collected samples from channel 1 & channel 2 interleaved....1st value = channel 1, 2nd value = channel 2, 3rd value = channel 1, 4th value = channel 2, etc.
There isn't a function to record timestamps. This will have to be calculated from the sample interval, and the number of samples collected.
I set the sampling rate to 10 Ksamp/s by setting the variables "usForBlock" and "nSamples" respectively to 60000000 and 600000, for two channels acquisition as previously mentioned.
Therefore, I call the getValue function every 400 milliseconds considering a number of samples per channel ( variable "nSamplesPerChannel") equal to 8000 (maximum capability of the buffer).
Unfortunately instead of retrieving 8 Ksamples at each call as I would expect ( 10Ksamp/s * 2 channels * 0.4 s = 8 Ksamples), I get only 4 Ksamples at each call, making my acquisition two times longer than I want. It seems to me that the rate of writing the samples in the buffer is the same as the sampling rate of each channel, instead of the sampling rate of each channel multiplied by the number of channels.