works fine for values >= 16ns
sampleInterval = ctypes.c_int32(4) --> not work well for values <=16ns
The program raise the follwoing error Traceback (most recent call last):
File "C:\00_Progs\picosdk-python-wrappers-master\ps2000aExamples\ps2000aStreamingExample.py", line 123, in
assert_pico_ok(status["runStreaming"])
File "C:\00_Progs\Python\Python38\lib\site-packages\picosdk\functions.py", line 160, in assert_pico_ok
raise PicoSDKCtypesError("PicoSDK returned '{}'".format(PICO_STATUS_LOOKUP[status]))
picosdk.errors.PicoSDKCtypesError: PicoSDK returned 'PICO_INVALID_SAMPLE_INTERVAL'
Is that a feature or miss i something? I thought with 500MS/s i could get a sample rate of 4ns for both channels? What could i do to reach this?
Thanks Thomas
-->
I use the PicoScope 2206B and with the PicoScope® 6 (6.14.23.5207) it's possible to grap data by 2ns (500MS/s).
But, if I use the "ps2000aStreamingExample.py" all run fine down to a sample rate of 16ns.
For that I changed two lines of code (timbase from US to NS) sampleUnits = ps.PS2000A_TIME_UNITS['PS2000A_NS'] actualSampleIntervalNs = actualSampleInterval
sampleInterval = ctypes.c_int32(16) --> works fine for values >= 16ns
sampleInterval = ctypes.c_int32(4) --> not work well for values <=16ns
The program raise the follwoing error Traceback (most recent call last):
File "C:\00_Progs\picosdk-python-wrappers-master\ps2000aExamples\ps2000aStreamingExample.py", line 123, in
assert_pico_ok(status["runStreaming"])
File "C:\00_Progs\Python\Python38\lib\site-packages\picosdk\functions.py", line 160, in assert_pico_ok
raise PicoSDKCtypesError("PicoSDK returned '{}'".format(PICO_STATUS_LOOKUP[status]))
picosdk.errors.PicoSDKCtypesError: PicoSDK returned 'PICO_INVALID_SAMPLE_INTERVAL'
Is that a feature or miss i something? I thought with 500MS/s i could get a sample rate of 4ns for both channels? What could i do to reach this?
There are 2 different modes of operation that you are referring to. I would suggest going here: https://www.picotech.com/library/a-to-z and looking at the descriptions for 'Block Capture Mode' and 'Streaming Mode', to understand the difference between them.
So, the 2ns sample interval value that you refer to in PicoScope 6 is actually using what is referred to as 'Block Capture Mode' when using your own coded application or 'Fast Sampling Mode' when using PicoScope 6 software. Your code example is using the 'Streaming Mode' capture example, which would be 'Slow Sampling Mode' in PicoScope 6 software. By default, in PicoScope 6, the sampling Mode is 'Fast sampling Mode', (you notice when you are in fast sampling mode because the waveform capture is typically occurring so quickly that all of the data points of the waveform across the graph change at the same time), but it switches to 'Slow sampling Mode' when you use Timebase values longer than 100ms/div (you notice when it switches to slow sampling mode because the displayed data can be seen accumulating as the image is drawn across the graph from left to right).
So, if you want faster sample rates you need to use the 'Block Capture Mode' example.
Using repeated Block Capture Mode captures results in a very low waveform update rate - although the setup itself is quick, there is a long setup time.
Using Rapid Block Mode removes the long setup time, but it only captures a fixed number of captures.
As you point out, using Streaming Mode doesn't allow the fast sampling.
Using Picoscope 6, I can easily set it up based on a trigger to capture at a high sampling rate and a high waveform update rate, and leave it running for hours capturing in that state. How do I do the same through the API?
It sounds like you're using Rapid Trigger Mode in PicoScope 6 (where you get the little silhouette of a Hare in the bottom right of the display indicating how many Rapid Trigger captures you are performing at once). Could you post the psdata file so that we can confirm what you are doing on PicoScope 6, and then explain how to do it in the SDK.
If you have done multiple posts they wil become visible immediately, the first couple of posts will be moderated by a moderator.
This is to prevent spam bots from spamming the forum. The post counter is broken (for a couple of years now) and they have to do a manual post counter update.
The data file that you sent is using an automatic trigger (which is firing every 2 seconds) which is not a high waveform update rate. Could you send the data file that you said gave you the high waveform update rate, high sample rate and unlimited captures (because I don't believe I've seen one).