Enabling a single channel and setting
time_base to 0
no downsampling
should result in 1GS/s sampling frequency.
The value time_interval_ns returned from the GetTimeBase2 call is also 1 ns.
Yet, apparently, the data read from the scope appears to be sampled with a 2 ns time step instead of a 1 ns time step.
---
I tested with the built-in Sine wave generator set to 1 MHz fed back into channel A of the scope.
When I read a buffer of 1000 samples with the above settings (i.e. 1 us of trace), the Sine signal is captured for two periods instead of one within the 1000 samples.
---
Another observation is:
When time_base is set to 1 (e.g. when a second channel is enabled), the number of Sine wave periods captured doubles to 4. This is expected, given that the sampling frequency divided by a factor of two when enabling a second channel.
When time_base is set to 2 (e.g. when a third channel is enabled), the number of Sine wave periods captured increases by a factor of 4 to 16. Instead, I expected another increase of factor 2 to 8 (from the manual .
---
When I do the same using the PicoScope software, everything looks fine, but there may be something else going on behind the scenes that I don't know about.
yes, I have played around with enabling and disabling the various channels. After opening the device I first call SetChannels on all four channels, enabling only channel A, and disabling all others.
Then when I call GetTimeBase, I get a timeInterval of 1 ns back.
Still, when I then look at the sampled data, it appears to be sampled at 2 ns intervals.
What is the value of the timebase argument that is passed to the ps2000aRunBlock() function? I'd just like to check that the value has not changed between querying ps2000aGetTimebase() and the start of data acquisition.
If the value has not changed, it might be useful to see your code.
The value for time_interval_ns does not change between the two calls.
I'll make a minimal example. Can I post it in this forum, or should I send it to another address?
I've fixed the problem on my side. Sorry for the inconvenience.
My error was, that I gave the timeIntervalNanoseconds returned from the GetTimebase() call to the RunBlock() function. Correct is of course to supply the same timebase to RunBlock() as to GetTimebase().