I have troubles when aquiring data in streaming mode.
The buffers I register with this code (like in the example-file)
- Code: Select all
...
unsigned long sampleCount= BUFFER_SIZE * 10;
unsigned long sampleInterval = 1;
...
for (i = 0; i < unit->ChannelCount; i++) // create data buffers
{
ps4000SetDataBuffers(unit->handle, i, buffers[i * 2],
buffers[i * 2 + 1], sampleCount);
}
Then i start streaming with
- Code: Select all
status = ps4000RunStreaming(unit->handle, &sampleInterval, PS4000_US,0, BUFFER_SIZE,FALSE, 1, sampleCount);
The buffer is filled by
- Code: Select all
status =ps4000GetStreamingLatestValues(
unit->handle,CallBackStreaming, NULL);
This code works fine for sampling sine-functions with frequencies up to 50kHz. Then the trouble starts. The collected data looks like the sampling frequency is too low. But i have read that the minimum sampleinterval is 75ns in streaming mode, which means i can measure 6MHz in streaming mode. I dont need 6MHz
I have also problems with the aggregation-thing. Now my buffer is filled with 2 values for every channel. As I understood the maximum and minimum value in the current sample interval. Is there a way to switch this aggregation off?
The second problem is this oversampling-thing. What is this for? Why do i have to put oversampling AND samplinginterval to 1 in ps4000RunStreaming to get the fastest sampling rate?
The third problem is, when I use PS4000_NS as timescale instead of PS4000_US the program crashes. Even if I put sampleInterval to 100 or even 1000.
Thanks for any advises
Sven
Cart
