capture and display all buffers from channels

Post your VB and VBA discussions here
Post Reply
sachi_impedx
Newbie
Posts: 0
Joined: Mon Feb 29, 2016 8:22 pm

capture and display all buffers from channels

Post by sachi_impedx »

Hi,
I have a picoscope 5444A and have downloaded the SDK for it. I have modified the PS5000A excel file with GetData VBA to get data from channel A and Channel B of the picoscope.
However, my actual goal is to get to display 5 buffers/5 waveforms for each channel. I know I have to ue memorysegments and setnoofcaptures, which I have.

Code: Select all

status = ps5000aGetTimebase(handle, timebase, numSamples, timeInterval, maxSamples, 0)
    
    ' set memoty segments
    Call ps5000aMemorySegments(handle, 64, maxSamples)
    Call ps5000aSetNoOfCaptures(handle, 5)
   
    ' Set Data Buffers
    Call ps5000aSetDataBuffer(handle, 0, valuesChA(0), numSamples, 0, 0) ' segment index 0, no downsampling
    Call ps5000aSetDataBuffer(handle, 1, valuesChB(0), numSamples, 0, 0) ' segment index 0, no downsampling
    
But I am not sure how to setdatabuffers and getvaluesbulk to get it to display all 5 waveforms for each channel. Could someone please help with this code.

Hitesh

Re: capture and display all buffers from channels

Post by Hitesh »

Hi sachi_impedx,

This post may provide provide some useful guidance.

You will need to set up a 3D array where each channel/segment combination has a data array assigned to it. These are then individually set with the ps5000aSetDataBuffer() function so that the driver has a location to write the data to when the ps5000aGetValuesBulk() function is called.

Are you using Rapid Block mode to capture events with minimum re-arm time or do you just need to capture 5 events per channel?

Regards,

sachi_impedx
Newbie
Posts: 0
Joined: Mon Feb 29, 2016 8:22 pm

Re: capture and display all buffers from channels

Post by sachi_impedx »

I am just using regular runblock function. I am trying to get 5 buffers per channel displayed on my excel file;
Is there a code I could use to set up 3D arrays and use SetDataBuffers?

Hitesh

Re: capture and display all buffers from channels

Post by Hitesh »

Hi sachi_impedx,

How far apart are the events that you are trying to capture for each channel?

This will determine if you can use a standard block capture approach in a loop (you would not need to set up a 3D array in this case) or use the rapid block functions.

Regards,

Post Reply