We are using the rapid mode with one memory segment and 3125000 samples.
Function ps6000GetValuesBulk makes (throws) an access violation.
You can reproduce this using the ps6000 c# example provided with the SDK.
Modify this in ConsoleExmple class:
class ConsoleExample
{
public const int BUFFER_SIZE = 3125000; // -<<<
You do need to ensure that the number of segments, channels and buffer size will not cause you to exceed the internal memory of the scope when running in Block or Rapid Block mode.
Can you try using "immediate block", only capturing one block of data, or "rapid block", which is designed to capture however many you require, specifying number of capture as 1 you should find it works.
Unplug then replug the scope
Start the application
Set all channels to desired voltage using v
Run "Immediate Block"
Run "Rapid Block" with number of captures 1
With one block of data there is no advantage to using Rapid Block over Immediate Block, this mode is intended for capturing multiple consecutive blocks to the scopes memory so that the trigger re-arm time can be reduced to the smallest possible value. Only when all blocks have been captured does the data get sent to the PC.
It is working for me provided I use the sequence above, however if I select Rapid Block first I get an error. I am referencing driver 1.0.0.272 but I don't believe that is the problem. I suspect it is the example code not setting buffers up correctly when using multiple channels.
I wanted to let you know that I am having the same problem with the Picoscope 6403.
Here is my developing environment:
OS: Windows 7 64bit -- Also tested the code on some old Windows XP 32 bit computer a while back
Driver Version: 2.0.3.7
Picoscope Software Version: 6.6.28.1 (latest stable at time of writing)
Matlab: R2012a (7.14.0.739) 32-bit (win32) -- This allows us to use the 32bit dlls provided.
Matlab compiler: The one that comes stock with Matlab 2012a
I know my developing environment is not standard but since somebody else was having the bug I thought I would help corroborate it. I can upload my matlab code somewhere, but basically when using RapidBlock mode, if I use
ps6000SetDataBufferBulk and ps6000GetValuesBulk
it will crash with an access violation for when trying to get data from all 4 channels with the number segments greater than something like 3-4.
If i use
ps6000SetDataBuffer and ps6000GetValues
in a loop, it will not crash.
I know Picotech does not support Matlab, but I'm pretty sure it would be reproducible with standard C code.
Anyway, those are my two cents. I hope we can figure this out.
Mark,
I'm also using Matlab (but with a PicoScope 4227). I've been using RunBlock and GetValues in a loop using normal block mode. Now I'm trying to switch to rapid block mode but am having trouble setting up the buffer and getting the data using SetDataBufferBulk and GetValuesBulk. Would you post a Matlab code snipet? I'd like to see if I'm doing something wacky or it's the same access violation as with the PicoScope 6xxx.